@hackler/react-sdk 11.24.1 → 11.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(l){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(r){if(r.__esModule)return r;var n=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),n}var L,t={},F=new Uint8Array(16);function j(){if(L=L||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return L(F);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var V=/^(?:[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 H(e){return"string"==typeof e&&V.test(e)}for(var B,z,G=[],K=0;K<256;++K)G.push((K+256).toString(16).substr(1));function J(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase();if(H(e))return e;throw TypeError("Stringified UUID is invalid")}var Y=0,q=0;function $(e){if(!H(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function X(e,s,a){function t(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),16!==(t="string"==typeof t?$(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(t),o.set(e,t.length),(o=a(o))[6]=15&o[6]|s,o[8]=63&o[8]|128,r){n=n||0;for(var i=0;i<16;++i)r[n+i]=o[i];return r}return J(o)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function W(e){return 14+(e+64>>>9<<4)+1}function Z(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function Q(e,t,r,n,o,i){return Z((t=Z(Z(t,e),Z(n,i)))<<o|t>>>32-o,r)}function ee(e,t,r,n,o,i,s){return Q(t&r|~t&n,e,t,o,i,s)}function te(e,t,r,n,o,i,s){return Q(t&n|r&~n,e,t,o,i,s)}function re(e,t,r,n,o,i,s){return Q(t^r^n,e,t,o,i,s)}function ne(e,t,r,n,o,i,s){return Q(r^(t|~n),e,t,o,i,s)}var r=X("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}for(var n=function(e,t){e[t>>5]|=128<<t%32,e[W(t)-1]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=o,l=i;r=ee(r,n,o,i,e[s],7,-680876936),i=ee(i,r,n,o,e[s+1],12,-389564586),o=ee(o,i,r,n,e[s+2],17,606105819),n=ee(n,o,i,r,e[s+3],22,-1044525330),r=ee(r,n,o,i,e[s+4],7,-176418897),i=ee(i,r,n,o,e[s+5],12,1200080426),o=ee(o,i,r,n,e[s+6],17,-1473231341),n=ee(n,o,i,r,e[s+7],22,-45705983),r=ee(r,n,o,i,e[s+8],7,1770035416),i=ee(i,r,n,o,e[s+9],12,-1958414417),o=ee(o,i,r,n,e[s+10],17,-42063),n=ee(n,o,i,r,e[s+11],22,-1990404162),r=ee(r,n,o,i,e[s+12],7,1804603682),i=ee(i,r,n,o,e[s+13],12,-40341101),o=ee(o,i,r,n,e[s+14],17,-1502002290),n=ee(n,o,i,r,e[s+15],22,1236535329),r=te(r,n,o,i,e[s+1],5,-165796510),i=te(i,r,n,o,e[s+6],9,-1069501632),o=te(o,i,r,n,e[s+11],14,643717713),n=te(n,o,i,r,e[s],20,-373897302),r=te(r,n,o,i,e[s+5],5,-701558691),i=te(i,r,n,o,e[s+10],9,38016083),o=te(o,i,r,n,e[s+15],14,-660478335),n=te(n,o,i,r,e[s+4],20,-405537848),r=te(r,n,o,i,e[s+9],5,568446438),i=te(i,r,n,o,e[s+14],9,-1019803690),o=te(o,i,r,n,e[s+3],14,-187363961),n=te(n,o,i,r,e[s+8],20,1163531501),r=te(r,n,o,i,e[s+13],5,-1444681467),i=te(i,r,n,o,e[s+2],9,-51403784),o=te(o,i,r,n,e[s+7],14,1735328473),n=te(n,o,i,r,e[s+12],20,-1926607734),r=re(r,n,o,i,e[s+5],4,-378558),i=re(i,r,n,o,e[s+8],11,-2022574463),o=re(o,i,r,n,e[s+11],16,1839030562),n=re(n,o,i,r,e[s+14],23,-35309556),r=re(r,n,o,i,e[s+1],4,-1530992060),i=re(i,r,n,o,e[s+4],11,1272893353),o=re(o,i,r,n,e[s+7],16,-155497632),n=re(n,o,i,r,e[s+10],23,-1094730640),r=re(r,n,o,i,e[s+13],4,681279174),i=re(i,r,n,o,e[s],11,-358537222),o=re(o,i,r,n,e[s+3],16,-722521979),n=re(n,o,i,r,e[s+6],23,76029189),r=re(r,n,o,i,e[s+9],4,-640364487),i=re(i,r,n,o,e[s+12],11,-421815835),o=re(o,i,r,n,e[s+15],16,530742520),n=re(n,o,i,r,e[s+2],23,-995338651),r=ne(r,n,o,i,e[s],6,-198630844),i=ne(i,r,n,o,e[s+7],10,1126891415),o=ne(o,i,r,n,e[s+14],15,-1416354905),n=ne(n,o,i,r,e[s+5],21,-57434055),r=ne(r,n,o,i,e[s+12],6,1700485571),i=ne(i,r,n,o,e[s+3],10,-1894986606),o=ne(o,i,r,n,e[s+10],15,-1051523),n=ne(n,o,i,r,e[s+1],21,-2054922799),r=ne(r,n,o,i,e[s+8],6,1873313359),i=ne(i,r,n,o,e[s+15],10,-30611744),o=ne(o,i,r,n,e[s+6],15,-1560198380),n=ne(n,o,i,r,e[s+13],21,1309151649),r=ne(r,n,o,i,e[s+4],6,-145523070),i=ne(i,r,n,o,e[s+11],10,-1120210379),o=ne(o,i,r,n,e[s+2],15,718787259),n=ne(n,o,i,r,e[s+9],21,-343485551),r=Z(r,a),n=Z(n,u),o=Z(o,c),i=Z(i,l)}return[r,n,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(W(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),o=[],i=32*n.length,s="0123456789abcdef",a=0;a<i;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);o.push(u)}return o});function oe(e,t){return e<<t|e>>>32-t}var n=X("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var o=0;o<n.length;++o)e.push(n.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var p=0;p<s;++p){for(var f=new Uint32Array(80),d=0;d<16;++d)f[d]=a[p][d];for(var h=16;h<80;++h)f[h]=oe(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var y=r[0],v=r[1],m=r[2],g=r[3],E=r[4],w=0;w<80;++w)var T=Math.floor(w/20),T=oe(y,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(T,v,m,g)+E+t[T]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=T;r[0]=r[0]+y>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});var ie,se,ae,ue,ce,le,pe,fe,de,he,ye,ve,me,ge,Ee,we,Te,_e,be,Ae,Ie,Oe,Ne,Re,Ce,Se,xe,Me,ke,Pe,Ue,r=D(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||B,r=void 0!==e.clockseq?e.clockseq:z,s=(null!=i&&null!=r||(s=e.random||(e.rng||j)(),null==i&&(i=B=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=z=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:q+1,u=s-Y+(a-q)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||Y<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Y=s,z=r,u=(1e4*(268435455&(s+=122192928e5))+(q=a))%4294967296,o[n++]=u>>>24&255,o[n++]=u>>>16&255,o[n++]=u>>>8&255,o[n++]=255&u,e=s/4294967296*1e4&268435455,o[n++]=e>>>8&255,o[n++]=255&e,o[n++]=e>>>24&15|16,o[n++]=e>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var c=0;c<6;++c)o[n+c]=i[c];return t||J(o)},v3:r,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||j)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return J(n)},v5:n,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(H(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:H,stringify:J,parse:$})),n={exports:{}},De=(n.exports=(0,qn="function"==typeof atob,h="function"==typeof btoa,y="function"==typeof Buffer,ie="function"==typeof TextDecoder?new TextDecoder:void 0,se="function"==typeof TextEncoder?new TextEncoder:void 0,ae=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ue=function(){var r={};return ae.forEach(function(e,t){return r[e]=t}),r}(),ce=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,le=String.fromCharCode.bind(String),pe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},fe=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},de=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,r,n,o="",i=e.length%3,s=0;s<e.length;){if(255<(t=e.charCodeAt(s++))||255<(r=e.charCodeAt(s++))||255<(n=e.charCodeAt(s++)))throw new TypeError("invalid character found");o+=ae[(t=t<<16|r<<8|n)>>18&63]+ae[t>>12&63]+ae[t>>6&63]+ae[63&t]}return i?o.slice(0,i-3)+"===".substring(i):o},ye=y?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],r=0,n=e.length;r<n;r+=4096)t.push(le.apply(null,e.subarray(r,r+4096)));return he(t.join(""))},me=function(e){var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?le(192|t>>>6)+le(128|63&t):le(224|t>>>12&15)+le(128|t>>>6&63)+le(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),le(240|t>>>18&7)+le(128|t>>>12&63)+le(128|t>>>6&63)+le(128|63&t))},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,we=y?function(e){return Buffer.from(e,"utf8").toString("base64")}:se?function(e){return ye(se.encode(e))}:function(e){return he(Ee(e))},_e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,be=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return le(55296+(t>>>10))+le(56320+(1023&t));case 3:return le((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return le((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},vt=function(e){if(e=e.replace(/\s+/g,""),!ce.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,r,n,o="",i=0;i<e.length;)t=ue[e.charAt(i++)]<<18|ue[e.charAt(i++)]<<12|(r=ue[e.charAt(i++)])<<6|(n=ue[e.charAt(i++)]),o+=64===r?le(t>>16&255):64===n?le(t>>16&255,t>>8&255):le(t>>16&255,t>>8&255,255&t);return o},Oe=y?function(e){return pe(Buffer.from(e,"base64"))}:function(e){return pe(Ie(e).split("").map(function(e){return e.charCodeAt(0)}))},Re=y?function(e){return Buffer.from(e,"base64").toString("utf8")}:ie?function(e){return ie.decode(Oe(e))}:function(e){return Ae(Ie(e))},Ce=function(e){return de(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},xe=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Pe={version:"3.7.5",VERSION:"3.7.5",atob:Ie=qn?function(e){return atob(de(e))}:y?function(e){return Buffer.from(e,"base64").toString("binary")}:vt,atobPolyfill:vt,btoa:he=h?function(e){return btoa(e)}:y?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:Se=function(e){return Re(Ce(e))},toBase64:Te=function(e,t){return(t=void 0===t?!1:t)?fe(we(e)):we(e)},encode:Te,encodeURI:qn=function(e){return Te(e,!0)},encodeURL:qn,utob:Ee=function(e){return e.replace(ge,me)},btou:Ae=function(e){return e.replace(_e,be)},decode:Se,isValid:function(e){if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:ve=function(e,t){return(t=void 0===t?!1:t)?fe(ye(e)):ye(e)},toUint8Array:Ne=function(e){return Oe(Ce(e))},extendString:Me=function(){function e(e,t){Object.defineProperty(String.prototype,e,xe(t))}e("fromBase64",function(){return Se(this)}),e("toBase64",function(e){return Te(this,e)}),e("toBase64URI",function(){return Te(this,!0)}),e("toBase64URL",function(){return Te(this,!0)}),e("toUint8Array",function(){return Ne(this)})},extendUint8Array:ke=function(){function e(e,t){Object.defineProperty(Uint8Array.prototype,e,xe(t))}e("toBase64",function(e){return ve(this,e)}),e("toBase64URI",function(){return ve(this,!0)}),e("toBase64URL",function(){return ve(this,!0)})},extendBuiltins:function(){Me(),ke()},Base64:{}},Object.keys(Pe).forEach(function(e){return Pe.Base64[e]=Pe[e]}),Pe),l.setUserId=void 0,l.sanitizeUser=void 0,l.resolveIdentifiers=void 0,l.removeUserId=void 0,l.getUserId=void 0,l.Version=void 0,l.Variation=void 0,l.TargetingType=void 0,l.TargetRule=void 0,l.TargetMatch=void 0,l.TargetKey=void 0,l.TargetCondition=void 0,l.TargetAction=void 0,l.Target=void 0,l.TARGET_KEY_TYPES=void 0,l.TARGET_ACTION_TYPES=void 0,l.Slot=void 0,l.Segment=void 0,l.SEGMENT_TYPES=void 0,l.RemoteConfigTargetRule=void 0,l.RemoteConfigParameterValue=void 0,l.RemoteConfigParameter=void 0,l.RemoteConfigDecision=void 0,l.PropertyOperationsBuilder=void 0,l.PropertyOperations=void 0,l.ParameterConfiguration=void 0,l.MetaVersion=void 0,l.MATCH_VALUE_TYPES=void 0,l.MATCH_TYPES=void 0,l.MATCH_OPERATORS=void 0,l.Logger=void 0,l.InAppMessageUserOverride=void 0,l.InAppMessageTextStyle=void 0,l.InAppMessageTextAttribute=void 0,l.InAppMessageText=void 0,l.InAppMessageTargetContext=void 0,l.InAppMessagePeriodCustom=void 0,l.InAppMessagePeriodAlways=void 0,l.InAppMessageImage=void 0,l.InAppMessageIdentifierCap=void 0,l.InAppMessageEventTriggerRule=void 0,l.InAppMessageEventTrigger=void 0,l.InAppMessageEventFrequencyCap=void 0,l.InAppMessageDurationCap=void 0,l.InAppMessageDecision=void 0,l.InAppMessageContextMessage=void 0,l.InAppMessageContextLayout=void 0,l.InAppMessageContext=void 0,l.InAppMessageButtonStyle=void 0,l.InAppMessageButton=void 0,l.InAppMessageBackground=void 0,l.InAppMessageAction=void 0,l.InAppMessage=void 0,l.IdentifiersBuilder=void 0,l.IdentifierType=void 0,l.IAM_TIMEUNIT=void 0,l.IAM_STATUS=void 0,l.IAM_PLATFORM_TYPE=void 0,l.IAM_ORIENTATION=void 0,l.IAM_LAYOUT_TYPE=void 0,l.IAM_DISPLAY_TYPE=void 0,l.IAM_BEHAVIOR=void 0,l.IAM_ACTION_TYPE=void 0,l.IAM_ACTION_AREA=void 0,l.FeatureFlagDecision=void 0,l.Experiment=void 0,l.EventType=void 0,l.EmptyParameterConfig=void 0,l.EmptyHackleRemoteConfig=void 0,l.DecisionReason=void 0,l.Decision=void 0,l.CoreVersion=void 0,l.ContainerGroup=void 0,l.Container=void 0,l.Cohort=void 0,l.Bucket=void 0,Object.defineProperty(t,"__esModule",{value:!0}),r),Le=n.exports,a=(Ge.isNotNullOrUndefined=function(e){return null!=e},Ge.isNullOrUndefined=function(e){return null==e},Ge.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},Ge.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r},Ge),p=(ze.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);a.isNotNullOrUndefined(i)&&r.push(i)}return r},ze.mapOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r},ze.associateTo=function(e,t,r){for(var n=0,o=e;n<o.length;n++){var i=r(o[n]);t.set(i[0],i[1])}return t},ze.associate=function(e,t){return this.associateTo(e,new Map,t)},ze.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},ze.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},ze),Fe={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},o=(Be.setLogLevel=function(e){this.logLevel=e=void 0===e?Fe.INFO:e},Be.initCounter=function(t){this.counters=p.associate(Object.keys(Fe),function(e){return[e,t(e)]})},Be._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)je.log(e,r,t.message,t);else try{je.log(e,r,t)}catch(e){}},Be.increment=function(e){var t;null!=(t=null==(t=Be.counters)?void 0:t.get(e))&&t.increment()},Be.logLevel=Fe.INFO,Be.log={error:function(e){Fe.ERROR<=Be.logLevel&&(Be._log("ERROR",e),Be.increment("ERROR"))},warn:function(e){Fe.WARN<=Be.logLevel&&(Be._log("WARN",e),Be.increment("WARN"))},info:function(e){Fe.INFO<=Be.logLevel&&(Be._log("INFO",e),Be.increment("INFO"))},debug:function(e){Fe.DEBUG<=Be.logLevel&&(Be._log("DEBUG",e),Be.increment("DEBUG"))}},Be),je=(He.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},He),Ve=function(e,t){return(Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function He(){}function Be(){}function ze(){}function Ge(){}function Ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ve(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((u=u.apply(e,s||[])).next())})}function u(n,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((a=0<(a=u.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],s=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Je(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var Ye=o.log,qe=(at.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},at.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},at.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],i=o[0],o=o[1];this.isValidType(i)?(o=this.sanitizeValue(o),a.isNullOrUndefined(o)?Ye.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(i,"]")):t[i]=o):Ye.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(i,"]"))}return t},at.isValidType=function(e){return!a.isNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},at.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},at.MAX_IDENTIFIER_TYPE_LENGTH=128,at.MAX_IDENTIFIER_VALUE_LENGTH=512,at),$e=o.log,Xe=(st.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o,i=n[r],s=i[0],i=i[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){$e.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(i,"]"));break}this.isValidKey(s)?(o=this.sanitizeValue(s,i),a.isNullOrUndefined(o)?$e.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(i,"]")):t[s]=o):$e.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},st.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},st.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},st.sanitizeValue=function(e,t){var r=this;return"string"==typeof e&&e.startsWith(this.SYSTEM_PROPERTY_KEY_PREFIX)?t:this.isValidValue(t)?Array.isArray(t)?t.filter(function(e){return r.isValidElement(e)}):t:null},st.isValidValue=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e?!isNaN(e)&&isFinite(e):"boolean"==typeof e||Array.isArray(e))},st.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},st.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},st.SYSTEM_PROPERTY_KEY_PREFIX="$",st.MAX_PROPERTIES_COUNT=128,st.MAX_PROPERTY_KEY_LENGTH=128,st.MAX_PROPERTY_VALUE_LENGTH=1024,st),We=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Ze=(i.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C0);case"seconds":return e/(i.C3/i.C0);case"minutes":return e/(i.C4/i.C0);case"hours":return e/(i.C5/i.C0);case"days":return e/(i.C6/i.C0)}},i.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C1);case"microseconds":return e;case"seconds":return e/(i.C3/i.C1);case"minutes":return e/(i.C4/i.C1);case"hours":return e/(i.C5/i.C1);case"days":return e/(i.C6/i.C1)}},i.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C2/i.C0);case"microseconds":return e*(i.C2/i.C1);case"milliseconds":return e;case"seconds":return e/(i.C3/i.C2);case"minutes":return e/(i.C4/i.C2);case"hours":return e/(i.C5/i.C2);case"days":return e/(i.C6/i.C2)}},i.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C3/i.C0);case"microseconds":return e*(i.C3/i.C1);case"milliseconds":return e*(i.C3/i.C2);case"seconds":return e;case"minutes":return e/(i.C4/i.C3);case"hours":return e/(i.C5/i.C3);case"days":return e/(i.C6/i.C3)}},i.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C4/i.C0);case"microseconds":return e*(i.C4/i.C1);case"milliseconds":return e*(i.C4/i.C2);case"seconds":return e*(i.C4/i.C3);case"minutes":return e;case"hours":return e/(i.C5/i.C4);case"days":return e/(i.C6/i.C4)}},i.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C5/i.C0);case"microseconds":return e*(i.C5/i.C1);case"milliseconds":return e*(i.C5/i.C2);case"seconds":return e*(i.C5/i.C3);case"minutes":return e*(i.C5/i.C4);case"hours":return e;case"days":return e/(i.C6/i.C5)}},i.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C6/i.C0);case"microseconds":return e*(i.C6/i.C1);case"milliseconds":return e*(i.C6/i.C2);case"seconds":return e*(i.C6/i.C3);case"minutes":return e*(i.C6/i.C4);case"hours":return e*(i.C6/i.C5);case"days":return e}},i.C6=24*(i.C5=60*(i.C4=60*(i.C3=1e3*(i.C2=1e3*(i.C1=1e3*(i.C0=1)))))),i.converter={nanoseconds:i.nanosToUnit,microseconds:i.microsToUnit,milliseconds:i.millisToUnit,seconds:i.secondsToUnit,minutes:i.minutesToUnit,hours:i.hoursToUnit,days:i.daysToUnit},i),Qe=(it.prototype.tick=function(){return 1e3*Date.now()},it.prototype.currentMillis=function(){return Date.now()},it.instance=new it,it),et=(ot.prototype.get=function(e,t){return t},ot),tt=(nt.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t},nt),rt=o.log;function nt(e){this.parameters=e}function ot(){}function it(){}function i(){}function st(){}function at(){}function ut(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||rt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function ct(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,o=t;n<o.length;n++){var i=ut(e,o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r}}function lt(e){var t=new At;return t.addIdentifiers(e.identifiers||{}),t.add(bt.ID,e.id),t.add(bt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(bt.USER,e.userId),t.build()}function pt(e){var t,r={};return r.id=null!=(t=qe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=qe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=qe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Xe.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=qe.sanitize(e.identifiers)),Boolean(r.id||r.userId||r.deviceId||r.identifiers&&0<Object.keys(r.identifiers).length)?r:null}sr.of=function(e,t){return new sr(e,t)};var ft=sr,dt=(ir.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},ir.of=function(e,t,r){return new ir(t,r,e)},ir),ht=(or.of=function(e,t,r){return new or(e,t,r=void 0===r?new et:r)},or.prototype.get=function(e,t){return this.config.get(e,t)},or),yt=(nr.on=function(e,t){return new nr(!0,e,t=void 0===t?new et:t)},nr.off=function(e,t){return new nr(!1,e,t=void 0===t?new et:t)},nr.prototype.get=function(e,t){return this.config.get(e,t)},nr),vt=(rr.prototype.get=function(e,t){return t},rr),mt=(tr.fromJson=function(e){return new tr(e.id,new tt(p.associate(e.parameters,function(e){return[e.key,e.value]})))},tr.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}},tr),f=(d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",d),gt=(er.fromJson=function(e,t){var r=er.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new Et(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),o=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),i=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return St.fromJson(e,mr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return It.fromJson(e,mr.PROPERTY)}),a=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return St.fromJson(e,mr.PROPERTY)}),u=Ct.fromJson(t.execution.defaultRule);return r&&u&&new er(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,o,i,s,a,u,t.containerId,t.winnerVariationId)},er.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void rt.debug("Unsupported status [".concat(e,"]"))}},er.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},er.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},er.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},er),Et=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},wt=(Qt.fromJson=function(e){return new Qt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Tt(t,r,e)}))},Qt),Tt=(Zt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},Zt),_t=(Wt.fromJson=function(e){return new Wt(e.id,e.key)},Wt),bt=(Xt.ID="$id",Xt.USER="$userId",Xt.DEVICE="$deviceId",Xt.SESSION="$sessionId",Xt.HACKLE_DEVICE="$hackleDeviceId",Xt),At=($t.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},$t.prototype.add=function(e,t){var r=qe.sanitizeValue(t);return qe.isValidType(e)&&r?this.identifiers[e]=t:rt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},$t.prototype.build=function(){return this.identifiers},$t),It=(qt.fromJson=function(e,t){return new qt(p.mapNotNullOrUndefined(e.conditions,function(e){return Ot.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},qt),Ot=(Yt.fromJson=function(e,t){var r=Nt.fromJson(e.key);if(r&&t.supports(r.type))return(t=Rt.fromJson(e.match))&&new Yt(r,t)},Yt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},Yt),Nt=(Jt.fromJson=function(e){var t=ut(yr,e.type);return t&&new Jt(t,e.name)},Jt.prototype.toJson=function(){return{type:this.type,name:this.name}},Jt),Rt=(Kt.fromJson=function(e){var t=ut(pr,e.type),r=ut(dr,e.operator),n=ut(fr,e.valueType);return t&&r&&n&&new Kt(t,r,n,e.values)},Kt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},Kt),Ct=(Gt.fromJson=function(e){var t=ut(hr,e.type);return t&&new Gt(t,e.variationId,e.bucketId)},Gt),St=(zt.fromJson=function(e,t){t=It.fromJson(e.target,t),e=Ct.fromJson(e.action);return t&&e&&new zt(t,e)},zt),xt=(Bt.fromJson=function(e){var t=ut(vr,e.type);return t&&new Bt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.SEGMENT)}))},Bt),Mt=(Ht.fromJson=function(e){return new Ht(e.id,e.bucketId,e.groups.map(function(e){return kt.fromJson(e)}))},Ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},Ht),kt=(Vt.fromJson=function(e){return new Vt(e.id,e.experiments)},Vt),Pt=(jt.fromJson=function(e){var t=ut(fr,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Ut.fromJson(e,mr.PROPERTY)}),n=Dt.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)},jt),Ut=(Ft.fromJson=function(e,t){t=It.fromJson(e.target,t);return t&&new Ft(e.key,e.name,t,e.bucketId,Dt.fromJson(e.value))},Ft),Dt=(Lt.fromJson=function(e){return new Lt(e.id,e.value)},Lt);function Lt(e,t){this.id=e,this.rawValue=t}function Ft(e,t,r,n,o){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=o}function jt(e,t,r,n,o,i){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=o,this.defaultValue=i}function Vt(e,t){this.id=e,this.experiments=t}function Ht(e,t,r){this.id=e,this.bucketId=t,this.groups=r}function Bt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function zt(e,t){this.target=e,this.action=t}function Gt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}function Kt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}function Jt(e,t){this.type=e,this.name=t}function Yt(e,t){this.key=e,this.match=t}function qt(e){this.conditions=e}function $t(){this.identifiers={}}function Xt(){}function Wt(e,t){this.id=e,this.key=t}function Zt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}function Qt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}function er(e,t,r,n,o,i,s,a,u,c,l,p,f,d,h){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=o,this.version=i,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.targetRules=p,this.defaultRule=f,this.containerId=d,this.winnerVariationId=h}function d(){}function tr(e,t){this.id=e,this.config=t}function rr(){}function nr(e,t,r){this.isOn=e,this.reason=t,this.config=r}function or(e,t,r){this.variation=e,this.reason=t,this.config=r}function ir(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}function sr(e,t){this.value=e,this.reason=t}function ar(e){this.id=e}gn.tryParse=function(e){var t,r,n,o,e=gn.regExp.exec(e);if(e)return e[0],t=e[1],r=void 0===(r=e[2])?"0":r,n=void 0===(n=e[3])?"0":n,o=e[4],e=e[5],new gn(new cr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),lr.parse(o),lr.parse(e))},gn.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},gn.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},gn.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},gn.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},gn.prototype.isLessThan=function(e){return this.compareTo(e)<0},gn.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},gn.regExp=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;var ur=gn,cr=(mn.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},mn),lr=(vn.parse=function(e){return e?new vn(e.split(".")):vn.EMPTY},vn.prototype.isEmpty=function(){return 0===this.identifiers.length},vn.prototype.isNotEmpty=function(){return!this.isEmpty()},vn.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},vn.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=vn.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},vn.compareIdentifiers=function(e,t){return vn.numericIdentifierRegExp.test(e)&&vn.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},vn.EMPTY=new vn([]),vn.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,vn),pr=["MATCH","NOT_MATCH"],fr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","NULL","UNKNOWN"],dr=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],hr=["VARIATION","BUCKET"],yr=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],vr=["USER_ID","USER_PROPERTY"],mr=(yn.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},yn.IDENTIFIER=new yn("SEGMENT"),yn.PROPERTY=new yn("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),yn.SEGMENT=new yn("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),yn),gr=["ACTIVE","DRAFT","PAUSE"],Er=["WEB","ANDROID","IOS"],wr=["IMMEDIATE","CUSTOM"],Tr=["MODAL"],_r=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],br=["VERTICAL","HORIZONTAL"],Ar=["CLICK"],Ir=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Or=(hn.fromJson=function(e){var t,r=ut(gr,e.status);if(!a.isNullOrUndefined(r)){switch(ut(wr,e.timeUnit)){case"IMMEDIATE":t=new Nr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Rr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,o,i=Dr.fromJson(e.messageContext);if(!a.isNullOrUndefined(i))return n=e.eventTriggerRules.map(Sr.fromJson),o=xr.fromJson(e.eventFrequencyCap),new hn(e.id,e.key,r,t,new Cr(n,o),Pr.fromJson(e.targetContext),i)}},hn.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},hn),Nr=(dn.prototype.within=function(e){return!0},dn),Rr=(fn.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},fn),Cr=function(e,t){this.rules=e,this.frequencyCap=t},Sr=(pn.fromJson=function(e){return new pn(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.PROPERTY)}))},pn),xr=(ln.fromJson=function(e){return e?new ln(e.identifiers.map(Mr.fromJson),kr.fromJson(e.duration)):null},ln),Mr=(cn.fromJson=function(e){return new cn(e.identifierType,e.countPerIdentifier)},cn),kr=(un.fromJson=function(e){if(!e)return null;var t=ut(We,e.durationUnit.timeUnit);return t?new un(Ze.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},un),Pr=(an.fromJson=function(e){return new an(e.overrides.map(Ur.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.PROPERTY)}))},an),Ur=(sn.fromJson=function(e){return new sn(e.identifierType,e.identifiers)},sn),Dr=(on.fromJson=function(e){var t=ct(Er,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=ct(br,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,Lr.fromJson);if(!a.isNullOrUndefined(n))return new on(e.defaultLang,t,r,n)}}},on),Lr=(nn.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,jr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,zr.fromJson);if(!a.isNullOrUndefined(n)){var o=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(o=zr.fromJson2(e.closeButton),!a.isNullOrUndefined(o)))return new nn(e.lang,t,r,e.text?Vr.fromJson(e.text):void 0,n,o,new Kr(e.background.color))}}}},nn.prototype.toJson=function(){var e;return{lang:this.lang,layout:{layoutType:this.layout.layoutType,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color}}},nn),Fr=(rn.fromJson=function(e){var t=ut(_r,e.layoutType),e=ut(Tr,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new rn(e,t)},rn),jr=(tn.fromJson=function(e){var t=ut(br,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=Jr.fromJson(e.action),!a.isNullOrUndefined(r)))return new tn(t,e.imagePath,r)}},tn.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}},tn),Vr=(en.fromJson=function(e){return new en(Hr.fromJson(e.title),Hr.fromJson(e.body))},en.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}},en),Hr=(Qr.fromJson=function(e){return new Qr(e.text,new Br(e.style.textColor))},Qr),Br=function(e){this.color=e},zr=(Zr.fromJson=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Zr(e.text,new Gr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Zr.fromJson2=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Zr("✕",new Gr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Zr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},Zr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Zr),Gr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Kr=function(e){this.color=e},Jr=(Wr.fromJson=function(e){var t=ut(Ar,e.behavior);if(!a.isNullOrUndefined(t)){var r=ut(Ir,e.type);if(!a.isNullOrUndefined(r))return new Wr(t,r,null!=(t=e.value)?t:void 0)}},Wr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Wr),Yr=(Xr.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Xr.prototype.tag=function(e,t){return this._tags[e]=t,this},Xr.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Xr),qr=($r.start=function(e){return new $r(e=void 0===e?$r.defaultClock:e)},$r.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},$r.defaultClock=new Qe,$r);function $r(e){this._clock=e,this.startTime=this._clock.tick()}function Xr(e){this.name=e,this._tags={},this.name=e}function Wr(e,t,r){this.behavior=e,this.type=t,this.value=r}function Zr(e,t,r){this.text=e,this.style=t,this.action=r}function Qr(e,t){this.text=e,this.style=t}function en(e,t){this.title=e,this.body=t}function tn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function rn(e,t){this.displayType=e,this.layoutType=t}function nn(e,t,r,n,o,i,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=o,this.closeButton=i,this.background=s}function on(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function sn(e,t){this.identifierType=e,this.identifiers=t}function an(e,t){this.overrides=e,this.targets=t}function un(e,t){this.durationMillis=e,this.count=t}function cn(e,t){this.identifierType=e,this.count=t}function ln(e,t){this.identifierCaps=e,this.durationCap=t}function pn(e,t){this.eventKey=e,this.targets=t}function fn(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function dn(){this.type="IMMEDIATE"}function hn(e,t,r,n,o,i,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=o,this.targetContext=i,this.messageContext=s}function yn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function vn(e){this.identifiers=e}function mn(e,t,r){this.major=e,this.minor=t,this.patch=r}function gn(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}wn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},wn.prototype.tag=function(e,t){return this._tags[e]=t,this},wn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var En=wn;function wn(e){this.name=e,this._tags={}}Object.defineProperty(_n.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Tn=_n;function _n(e,t){this.valueSupplier=t,this.field=e}function bn(e,t){return e.name===t.name&&qe.isEquals(e.tags,t.tags)}Mn.prototype.count=function(){return this.counterValue},Mn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Mn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]};var An,In=Mn,On=(xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new In(this.id),e},xn.prototype.count=function(){return this.currentCounter.count()},xn.prototype.increment=function(e){this.currentCounter.increment(e)},xn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},xn),Nn=(Sn.prototype.values=function(){return Array.from(this.data.values())},Sn.prototype.keys=function(){return Array.from(this.data.keys())},Sn.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},Sn.prototype.has=function(e){return void 0!==this.get(e)},Sn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Sn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Sn.prototype.forEach=function(e){this.data.forEach(e)},Sn.prototype.filter=function(e){for(var t=new Sn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var o=n[r];e(o[0],o[1])&&t.add(o[0],o[1])}return t},Sn.prototype.entries=function(){return Array.from(this.data.entries())},Sn),h=(Object.defineProperty(Cn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Cn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Cn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Cn.prototype.counter=function(e,t){return void 0===t&&(t={}),new En(e).tags(t).register(this)},Cn.prototype.timer=function(e,t){return void 0===t&&(t={}),new Yr(e).tags(t).register(this)},Cn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Cn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Cn.prototype.close=function(){},Cn),y=(Ke(Rn,An=h),Rn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),o.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Rn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),o.log.debug("PushMetricRegistry stopped.")},Rn.prototype.close=function(){this.stop()},Rn);function Rn(e,t){var r=An.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}function Cn(){this.id=De.v4(),this.name="MetricRegistry",this._metrics=new Nn(bn)}function Sn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function xn(e){this.id=e,this.currentCounter=new In(e)}function Mn(e){this.counterValue=0,this.id=e}Bn.prototype.count=function(){return this._count},Bn.prototype.totalTime=function(e){return Ze.nanosToUnit(this._total,e)},Bn.prototype.max=function(e){return Ze.nanosToUnit(this._max,e)},Bn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Bn.prototype.record=function(e,t){e<0||(t=Ze.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Bn.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]};var kn,Pn=Bn,Un=(Hn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Pn(this.id),e},Hn.prototype.count=function(){return this.currentTimer.count()},Hn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Hn.prototype.max=function(e){return this.currentTimer.max(e)},Hn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Hn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Hn.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Hn),v=(Ke(Vn,kn=y),Vn.prototype.createCounter=function(e){return new On(e)},Vn.prototype.createTimer=function(e){return new Un(e)},Vn.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(t,e)},Vn.prototype.close=function(){kn.prototype.close.call(this)},Vn),Dn=(jn.prototype.count=function(){return 0},jn.prototype.increment=function(e){},jn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},jn),Ln=(Object.defineProperty(Fn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),Fn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},Fn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},Fn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},Fn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},Fn);function Fn(e){this._counters=new Nn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Dn(e)}function jn(e){this.id=e}function Vn(e,t){return kn.call(this,e,t)||this}function Hn(e){this.id=e,this.currentTimer=new Pn(e)}function Bn(e){this._count=0,this._total=0,this._max=0,this.id=e}Io.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Io.prototype.count=function(){return 0},Io.prototype.totalTime=function(e){return 0},Io.prototype.max=function(e){return 0},Io.prototype.mean=function(e){return 0},Io.prototype.record=function(e,t){};var zn,Gn,Kn,Jn=Io,Yn=(Object.defineProperty(Ao.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Ao.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Ao.prototype.max=function(e){return this.firstTimer.max(e)},Ao.prototype.mean=function(e){return this.firstTimer.mean(e)},Ao.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Ao.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Ao.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Ao.prototype.count=function(){return this.firstTimer.count()},Ao.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Ao),qn=(Ke(bo,Kn=h),bo.prototype.createCounter=function(e){e=new Ln(e);return this.addRegistry(e),e},bo.prototype.createTimer=function(e){e=new Yn(e);return this.addRegistry(e),e},bo.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},bo.prototype.add=function(t){t instanceof bo||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},bo.prototype.close=function(){this.registries.forEach(function(e){e.close()})},bo),$n=(_o.counter=function(e,t){return _o.globalRegistry.counter(e,t)},_o.timer=function(e,t){return _o.globalRegistry.timer(e,t)},_o.addRegistry=function(e){_o.globalRegistry.add(e),o.log.debug("MetricRegistry added ".concat(e.name))},_o.globalRegistry=new qn,_o),Xn=(To.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},To),Wn=(wo.builder=function(){return new Zn},wo.get=function(e){return wo.builder().url(e).build()},wo.prototype.toBuilder=function(){return new Zn(this)},wo),Zn=(Eo.prototype.url=function(e){return this._url=e,this},Eo.prototype.method=function(e){return this._method=e,this},Eo.prototype.body=function(e){return this._body=e,this},Eo.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Eo.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Eo.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Wn(this._url,this._method,this._body,this._headers.build(),e)},Eo),Qn=(go.ok=function(e,t){return go.of(200,e,t)},go.of=function(e,t,r){return new go(e,null!=t?t:null,null!=r?r:eo.empty())},go.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},go.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},go.prototype.isNotModified=function(){return 304===this.statusCode},go),eo=(mo.empty=function(){return new mo(new Map)},mo.builder=function(){return new to(new Map)},mo.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],o=n[0],n=n[1];if(Xn.equalsIgnoreCase(o,e))return n}return null},mo.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},mo.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},mo.prototype.toBuilder=function(){return new to(this.headers)},mo.IF_MODIFIED_SINCE="If-Modified-Since",mo.LAST_MODIFIED="Last-Modified",mo),to=(vo.prototype.add=function(e,t){return this.headers.set(e,t),this},vo.prototype.build=function(){return new eo(this.headers)},vo),ro=(Ke(yo,Gn=v),yo.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){r.dispatch(e,t)})},yo.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},yo.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return o.log.debug("Failed to flushing metrics: ".concat(e))})},yo.prototype.createRequest=function(e){return Wn.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},yo.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},yo.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},yo.prototype.createCounter=function(e){return new On(e)},yo.prototype.createTimer=function(e){return new Un(e)},yo.prototype.close=function(){Gn.prototype.close.call(this)},yo),no=(ho.experiment=function(e,t,r){t=$n.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},ho.featureFlag=function(e,t,r){t=$n.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},ho.remoteConfig=function(e,t,r){t=$n.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},ho.inAppMessage=function(e,t,r){t=$n.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},ho),oo=(fo.record=function(e,t,r){e=$n.timer("api.call",{operation:e,success:fo.success(r)});t.stop(e)},fo.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},fo),io=(po.decide=function(e,t,r,n){if(a.isNullOrUndefined(r))return this.decision(e,t,"NULL",r,n);switch(typeof r){case"string":return this.decision(e,t,"STRING",r,n);case"number":return this.decision(e,t,"NUMBER",r,n);case"boolean":return this.decision(e,t,"BOOLEAN",r,n);default:return this.decision(e,t,"UNKNOWN",r,n)}},po.decision=function(e,t,r,n,o){return a.isNullOrUndefined(t)?ft.of(n,f.INVALID_INPUT):e.remoteConfig(t,o,r,n)},po),so=o.log,ao=(lo.prototype.get=function(e,t){var r,n=qr.start();try{r=this.decide(e,t)}catch(n){so.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=ft.of(t,f.EXCEPTION)}return no.remoteConfig(n,e,r),r.value},lo.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return io.decide(this.core,e,t,r)},lo),uo=(co.prototype.contains=function(e){return this._properties.has(e)},co.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},co.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},co.prototype.add=function(e,t,r){if((r=void 0===r?!1:r)&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;r=Xe.sanitizeValue(e,t);return r&&this._properties.set(e,r),this},co.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},co.prototype.build=function(){return this._properties},co);function co(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function lo(e,t,r){this.core=e,this.userManager=t,this.user=r}function po(){}function fo(){}function ho(){}function yo(e,t,r,n,o){n=Gn.call(this,n,o)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}function vo(e){this.headers=e}function mo(e){this.headers=e}function go(e,t,r){this.statusCode=e,this.body=t,this.headers=r}function Eo(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:eo.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}function wo(e,t,r,n,o){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=o}function To(){}function _o(){}function bo(){var e=null!==Kn&&Kn.apply(this,arguments)||this;return e.registries=new Nn(function(e,t){return e.id===t.id}),e}function Ao(e){this._timers=new Nn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Jn(e)}function Io(e){this.id=e}(r=zn=zn||{}).SET="$set",r.SET_ONCE="$setOnce",r.UNSET="$unset",r.INCREMENT="$increment",r.APPEND="$append",r.APPEND_ONCE="$appendOnce",r.PREPEND="$prepend",r.PREPEND_ONCE="$prependOnce",r.REMOVE="$remove",r.CLEAR_ALL="$clearAll";vi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new uo).addProperties(e).addProperties(t).build()};var Oo,No,Ro,Co,So,xo=vi,Mo=(yi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new uo).addProperties(e).addProperties(t,!0).build()},yi),ko=(hi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new uo).addProperties(e).remove(t).build()},hi),Po=(di.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new uo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},di.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},di),n=(fi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new uo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},fi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},fi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},fi.prototype.contains=function(e,t){return e.includes(t)},fi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Je([e],t,!0)},fi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Je(Je([],e,!0),[t],!1)},fi),Uo=(Ke(pi,So=n),pi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)},pi),Do=(Ke(li,Co=n),li.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},li.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},li),Lo=(Ke(ci,Ro=n),ci.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},ci),Fo=(Ke(ui,No=n),ui.prototype.operateArray=function(e,t){var r=this;return t.reduce(this.appendOnce.bind(this),[]).reduceRight(function(e,t){return r.prependOnce.bind(r)(t,e)},e)},ui.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},ui.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},ui),jo=(Ke(ai,Oo=n),ai.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},ai.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},ai),Vo=(si.prototype.operate=function(e,t){return new Map},si),Ho=(ii.get=function(e){switch(e){case zn.SET:return new xo;case zn.SET_ONCE:return new Mo;case zn.UNSET:return new ko;case zn.INCREMENT:return new Po;case zn.APPEND:return new Uo;case zn.APPEND_ONCE:return new Do;case zn.PREPEND:return new Lo;case zn.PREPEND_ONCE:return new Fo;case zn.CLEAR_ALL:return new Vo;case zn.REMOVE:return new jo}},ii),Bo=(oi.prototype.set=function(e,t){return this.add(zn.SET,e,t)},oi.prototype.setOnce=function(e,t){return this.add(zn.SET_ONCE,e,t)},oi.prototype.unset=function(e){return this.add(zn.UNSET,e,"-")},oi.prototype.increment=function(e,t){return this.add(zn.INCREMENT,e,t)},oi.prototype.append=function(e,t){return this.add(zn.APPEND,e,t)},oi.prototype.appendOnce=function(e,t){return this.add(zn.APPEND_ONCE,e,t)},oi.prototype.prepend=function(e,t){return this.add(zn.PREPEND,e,t)},oi.prototype.prependOnce=function(e,t){return this.add(zn.PREPEND_ONCE,e,t)},oi.prototype.remove=function(e,t){return this.add(zn.REMOVE,e,t)},oi.prototype.clearAll=function(){return this.add(zn.CLEAR_ALL,"clearAll","-")},oi.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new zo(new Map(e))},oi.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},oi.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new uo);e=this.operations.get(e);return null!=e&&e.add(t,r),this},oi),zo=(ni.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Ho.get(t).operate(r,e)}),r},ni.prototype.toEvent=function(){var o={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;o.properties=c(c({},o.properties),((r={})[t]=c(c({},null==(n=o.properties)?void 0:n[t]),Xe.sanitize(a.fromMap(e))),r))}),o},ni.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n},ni),Go=(ri.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})},ri),Ko=o.log,Jo=(m.prototype.initialize=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Ko.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Ko.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Ko.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},m.prototype.getSessionId=function(){return this.sessionManager.sessionId},m.prototype.getUser=function(){return this.userManager.currentUser},m.prototype.setUser=function(e){try{var t=pt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(Ko.warn("invalid user"),Promise.resolve())}catch(e){return Ko.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},m.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=qe.sanitizeValue(e);if(!t)return Ko.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return Ko.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},m.prototype.setDeviceId=function(e){try{var t=qe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(Ko.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return Ko.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},m.prototype.setUserProperty=function(e,t){e=(new Bo).set(e,t).build();return this.updateUserProperties(e)},m.prototype.setUserProperties=function(e){try{var t=Xe.sanitize(e),r=new Bo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return Ko.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},m.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return Ko.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},m.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new Bo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return Ko.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},m.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},m.prototype.variationDetail=function(r,n,e){var o=e||"A",e=qr.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,o)}catch(e){return Ko.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(o,"] : ").concat(e)),ht.of(o,f.EXCEPTION)}}(this);return no.experiment(e,r,t),t},m.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},m.prototype.featureFlagDetail=function(r,n){var e=qr.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Ko.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),yt.off(f.EXCEPTION)}}(this);return no.featureFlag(e,r,t),t},m.prototype.track=function(e,t){try{Ko.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Ko.error("Unexpected exception while tracking event: ".concat(e))}},m.prototype.trackPageView=function(e){Ko.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},m.prototype.remoteConfig=function(e){return new ao(this.core,this.userManager,e)},m.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},m.prototype.onInitialized=function(r){var n;return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Go.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),Ko.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},m.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},m.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Ko.debug("UserExplorer opened."),$n.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Ko.error("UserExplorer is not provided")},m.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Ko.warn("There is no active HackleDevtools.")},m.prototype.close=function(){Ko.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},m),Yo=o.log,qo=(ti.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user}},o=this.invocationProcessor.process(n);if(!o)throw new Error("invoke result data not exists");switch(r){case"number":return Number(o);case"boolean":return Boolean(o);default:return o}}catch(r){return Yo.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},ti),$o=(ei.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},ei.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")},ei),Xo=(Qo.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},Qo.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},Qo.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},Qo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",o="",i="",s="",a=(r.isCrossSubdomain&&(n=(a=Qo.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),o="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(i+="; secure"),e+"="+encodeURIComponent(t)+o+"; path=/"+n+s+i);return document.cookie=a},Qo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Qo.prototype.getOptions=function(){return this.options},Qo.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),Qo.storage=Qo.storage?Qo.storage:new Qo(e)},Qo),Wo=(Zo.initialize=function(){Xo.getInstance().getItem("_hackle_hid")||wi()},Zo);function Zo(){}function Qo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function ei(){}function ti(e,t){this.invocationProcessor=e,this.user=t}function m(e,t,r,n,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=o,this.initialized=!1,this.initialization=this.initialize()}function ri(){}function ni(e){this.operations=null!=e?e:new Map}function oi(){this.operations=new Map}function ii(){}function si(){}function ai(){return null!==Oo&&Oo.apply(this,arguments)||this}function ui(){return null!==No&&No.apply(this,arguments)||this}function ci(){return null!==Ro&&Ro.apply(this,arguments)||this}function li(){return null!==Co&&Co.apply(this,arguments)||this}function pi(){return null!==So&&So.apply(this,arguments)||this}function fi(){}function di(){}function hi(){}function yi(){}function vi(){}function mi(){var e=Xo.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||wi()}function gi(e){Xo.getInstance().setItem("_hackle_id",e)}function Ei(){Xo.getInstance().removeItem("_hackle_id")}function wi(){var e=De.v4();return Xo.getInstance().setItem("_hackle_hid",e),e}bi.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},bi.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Ti=bi,_i=o.log;function bi(e){this.invocator=e}function Ai(e){return e&&e.Math==Math&&e}function g(e){try{return!!e()}catch(e){return!0}}w.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:mi()}catch(e){return _i.error("Unexpected exception while get sessionId: ".concat(e)),mi()}},w.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=pt(t))?e:this.defaultUser()}catch(e){return _i.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},w.prototype.setUser=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=pt(n)))return _i.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set user: ".concat(e))}return[2]})})},w.prototype.setUserId=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return _i.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},w.prototype.setDeviceId=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return _i.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},w.prototype.setUserProperty=function(r,n){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},w.prototype.setUserProperties=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{t=Xe.sanitize(n),r=new Bo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){_i.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},w.prototype.updateUserProperties=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},w.prototype.resetUser=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},w.prototype.variation=function(e,t,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},o=this.invocationProcessor.process(n);if(o)return o;throw new Error("invoke result data not exists")}catch(t){return _i.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),r}},w.prototype.variationDetail=function(e,t,r){var n;void 0===r&&(r="A");try{var o={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},i=this.invocationProcessor.process(o);if(null===i)throw new Error("invoke result data not exists");return ht.of(i.variation,i.reason,new tt(new Map(Object.entries(null!=(n=i.config.parameters)?n:{}))))}catch(t){return _i.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),ht.of(r,f.EXCEPTION)}},w.prototype.isFeatureOn=function(e,t){try{var r={command:"isFeatureOn",parameters:{featureKey:e,user:this.convertUser(t)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(t){return _i.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),!1}},w.prototype.featureFlagDetail=function(e,t){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:e,user:this.convertUser(t)}},o=this.invocationProcessor.process(n);if(null===o)throw new Error("invoke result data not exists");return new yt(o.isOn,o.reason,new tt(new Map(Object.entries(null!=(r=o.config.parameters)?r:{}))))}catch(t){return _i.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),yt.off(f.EXCEPTION)}},w.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while tracking event: ".concat(e))}},w.prototype.trackPageView=function(e){_i.info("Web to app integration feature is not support 'trackPageView' method")},w.prototype.remoteConfig=function(e){return new qo(this.invocationProcessor,this.convertUser(e))},w.prototype.onReady=function(e,t){e()},w.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){_i.error("Unexpected exception while show userExplorer: ".concat(e))}},w.prototype.hideUserExplorer=function(){_i.info("Web to app integration feature is not support 'hideUserExplorer' method")},w.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},w.prototype.close=function(){_i.info("Web to app integration feature is not support 'close' method")},w.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},w.prototype.convertUser=function(e){return"string"==typeof e?e:e&&null!=(e=pt(e))?e:void 0},w.prototype.defaultUser=function(){return{deviceId:mi()}};var Ii=w,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},h=Ai("object"==typeof globalThis&&globalThis)||Ai("object"==typeof window&&window)||Ai("object"==typeof self&&self)||Ai("object"==typeof y&&y)||function(){return this}()||Function("return this")(),qn={},v=!g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),r=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Oi=Function.prototype.call,n=r?Oi.bind(Oi):function(){return Oi.apply(Oi,arguments)},e={},y={}.propertyIsEnumerable,Ni=Object.getOwnPropertyDescriptor,E=Ni&&!y.call({1:2},1);function w(e){this.invocationProcessor=e}e.f=E?function(e){e=Ni(this,e);return!!e&&e.enumerable}:y;function Ri(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Ci(e){return qi(Yi(e),8,-1)}function Si(e){if(null==e)throw Zi("Can't call method on "+e);return e}function xi(e){return Qi(es(e))}function T(e){return"function"==typeof e}function Mi(e){return"object"==typeof e?null!==e:ts(e)}function ki(e,t){return arguments.length<2?(r=rs[e],ns(r)?r:void 0):rs[e]&&rs[e][t];var r}function Pi(e){try{return hs(e)}catch(e){return"Object"}}function Ui(e){if(ys(e))return e;throw ms(vs(e)+" is not a function")}function Di(e,t){return null==(e=e[t])?void 0:gs(e)}function Li(t,r){try{As(bs,t,{value:r,configurable:!0,writable:!0})}catch(e){bs[t]=r}return r}function Fi(e){return Rs(Ns(e))}function ji(e){return"Symbol("+(void 0===e?"":e)+")_"+ks(++xs+Ms,36)}function Vi(e){var t;return Us(js,e)&&(Ls||"string"==typeof js[e])||(t="Symbol."+e,Ls&&Us(Vs,e)?js[e]=Vs[e]:js[e]=(Fs&&Hs?Hs:Bs)(t)),js[e]}function Hi(e){return e=function(e,t){if(!Gs(e)||Ks(e))return e;var r=Js(e,$s);if(r){if(r=zs(r,e,t=void 0===t?"default":t),!Gs(r)||Ks(r))return r;throw qs("Can't convert object to primitive value")}return Ys(e,t=void 0===t?"number":t)}(e,"string"),Xs(e)?e:e+""}function Bi(e){return Zs?Ws.createElement(e):{}}function zi(e){if(ua(e))return e;throw la(ca(e)+" is not an object")}var E=r,y=Function.prototype,Gi=y.bind,Ki=y.call,Ji=E&&Gi.bind(Ki,Ki),y=E?function(e){return e&&Ji(e)}:function(e){return e&&function(){return Ki.apply(e,arguments)}},Gi=y,Yi=Gi({}.toString),qi=Gi("".slice),E=g,$i=Ci,Xi=Object,Wi=y("".split),Gi=E(function(){return!Xi("z").propertyIsEnumerable(0)})?function(e){return"String"==$i(e)?Wi(e,""):Xi(e)}:Xi,Zi=TypeError,Qi=Gi,es=Si,ts=T,rs=h,ns=T,E=y({}.isPrototypeOf),os=ki("navigator","userAgent")||"",is=os,ss=h.process,as=h.Deno,ss=ss&&ss.versions||as&&as.version,as=ss&&ss.v8,ss=ds=!(ds=as?0<(_=as.split("."))[0]&&_[0]<4?1:+(_[0]+_[1]):ds)&&is&&(!(_=is.match(/Edge\/(\d+)/))||74<=_[1])&&(_=is.match(/Chrome\/(\d+)/))?+_[1]:ds,us=ss,as=g,is=!!Object.getOwnPropertySymbols&&!as(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&us&&us<41}),_=is&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,cs=ki,ls=T,ps=E,fs=Object,ds=_?function(e){return"symbol"==typeof e}:function(e){var t=cs("Symbol");return ls(t)&&ps(t.prototype,fs(e))},hs=String,ys=T,vs=Pi,ms=TypeError,gs=Ui,Es=n,ws=T,Ts=Mi,_s=TypeError,as={exports:{}},bs=h,As=Object.defineProperty,Is=Li,Is=h["__core-js_shared__"]||Is("__core-js_shared__",{}),Os=Is,Ns=((as.exports=function(e,t){return Os[e]||(Os[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Si),Rs=Object,Cs=Fi,Ss=y({}.hasOwnProperty),b=Object.hasOwn||function(e,t){return Ss(Cs(e),t)},A=y,xs=0,Ms=Math.random(),ks=A(1..toString),A=h,Ps=as.exports,Us=b,Ds=ji,Ls=is,Fs=_,js=Ps("wks"),Vs=A.Symbol,Hs=Vs&&Vs.for,Bs=Fs?Vs:Vs&&Vs.withoutSetter||Ds,zs=n,Gs=Mi,Ks=ds,Js=Di,Ys=function(e,t){var r,n;if("string"===t&&ws(r=e.toString)&&!Ts(n=Es(r,e)))return n;if(ws(r=e.valueOf)&&!Ts(n=Es(r,e)))return n;if("string"!==t&&ws(r=e.toString)&&!Ts(n=Es(r,e)))return n;throw _s("Can't convert object to primitive value")},qs=TypeError,$s=Vi("toPrimitive"),Xs=ds,is=Mi,Ws=h.document,Zs=is(Ws)&&is(Ws.createElement),Qs=Bi,_=!v&&!g(function(){return 7!=Object.defineProperty(Qs("div"),"a",{get:function(){return 7}}).a}),ea=n,ta=e,ra=Ri,na=xi,oa=Hi,ia=b,sa=_,aa=Object.getOwnPropertyDescriptor,Ps=(qn.f=v?aa:function(e,t){if(e=na(e),t=oa(t),sa)try{return aa(e,t)}catch(e){}if(ia(e,t))return ra(!ea(ta.f,e,t),e[t])},{}),A=v&&g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),ua=Mi,ca=String,la=TypeError,pa=_,fa=zi,da=Hi,ha=TypeError,ya=Object.defineProperty,va=Object.getOwnPropertyDescriptor,ma=(Ps.f=v?A?function(e,t,r){var n;return fa(e),t=da(t),fa(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=va(e,t))&&n.writable&&(e[t]=r.value,r={configurable:("configurable"in r?r:n).configurable,enumerable:("enumerable"in r?r:n).enumerable,writable:!1}),ya(e,t,r)}:ya:function(e,t,r){if(fa(e),t=da(t),fa(r),pa)try{return ya(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ha("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ps),ga=Ri,Ds=v?function(e,t,r){return ma.f(e,t,ga(1,r))}:function(e,t,r){return e[t]=r,e},ds={exports:{}},is=v,e=b,_=Function.prototype,Ea=is&&Object.getOwnPropertyDescriptor,e=e(_,"name"),e={EXISTS:e,PROPER:e&&"something"===function(){}.name,CONFIGURABLE:e&&(!is||Ea(_,"name").configurable)},is=T,Ea=Is,wa=y(Function.toString);is(Ea.inspectSource)||(Ea.inspectSource=function(e){return wa(e)});function Ta(e){return ja[e]||(ja[e]=Fa(e))}function _a(e,t,r,n){var o=(n=n||{}).enumerable,i=void 0!==n.name?n.name:t;if(tu(r)&&nu(r,i,n),n.global)o?e[t]=r:ou(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:ru.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ba(e){return(e=+e)!=e||0==e?0:au(e)}function Aa(e,t){return(e=uu(e))<0?cu(e+t,0):lu(e,t)}function I(e){return 0<(e=e.length)?fu(pu(e),9007199254740991):0}function Ia(a){return function(e,t,r){var n,o=du(e),i=yu(o),s=hu(r,i);if(a&&t!=t){for(;s<i;)if((n=o[s++])!=n)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===t)return a||s||0;return!a&&-1}}function Oa(e,t){var r,n=mu(e),o=0,i=[];for(r in n)!vu(Eu,r)&&vu(n,r)&&wu(i,r);for(;t.length>o;)!vu(n,r=t[o++])||~gu(i,r)||wu(i,r);return i}function Na(e,t,r){for(var n=Ru(t),o=Su.f,i=Cu.f,s=0;s<n.length;s++){var a=n[s];Nu(e,a)||r&&Nu(r,a)||o(e,a,i(t,a))}}function Ra(e,t){return(e=Uu[Pu(e)])==Lu||e!=Du&&(Mu(t)?xu(t):!!t)}function O(e,t){var r,n,o,i,s=e.target,a=e.global,u=e.stat;if(r=a?Fu:u?Fu[s]||Bu(s,{}):(Fu[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(i=ju(r,n))&&i.value:r[n],!Gu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;zu(o,i)}(e.sham||i&&i.sham)&&Vu(o,"sham",!0),Hu(r,n,o,e)}}var Ca,Sa,xa,Ma,ka,Pa,Ua,Da,_=Ea.inspectSource,is=T,Ea=_,La=h.WeakMap,is=is(La)&&/native code/.test(Ea(La)),Ea=as.exports,Fa=ji,ja=Ea("keys"),La={},as=y,Va=Mi,Ha=Ds,Ba=b,Ea=Is,N=Ta,R=La,za=h.TypeError,Ga=h.WeakMap,is=(Ua=is||Ea.state?(Ca=Ea.state||(Ea.state=new Ga),Sa=as(Ca.get),xa=as(Ca.has),Ma=as(Ca.set),ka=function(e,t){if(xa(Ca,e))throw new za("Object already initialized");return t.facade=e,Ma(Ca,e,t),t},Pa=function(e){return Sa(Ca,e)||{}},function(e){return xa(Ca,e)}):(R[Da=N("state")]=!0,ka=function(e,t){if(Ba(e,Da))throw new za("Object already initialized");return t.facade=e,Ha(e,Da,t),t},Pa=function(e){return Ba(e,Da)?e[Da]:{}},function(e){return Ba(e,Da)}),{set:ka,get:Pa,has:Ua,enforce:function(e){return Ua(e)?Pa(e):ka(e,{})},getterFor:function(t){return function(e){if(Va(e)&&(e=Pa(e)).type===t)return e;throw za("Incompatible receiver, "+t+" required")}}}),Ea=g,Ka=T,Ja=b,Ya=v,qa=e.CONFIGURABLE,$a=_,Xa=is.enforce,Wa=is.get,Za=Object.defineProperty,Qa=Ya&&!Ea(function(){return 8!==Za(function(){},"length",{value:8}).length}),eu=String(String).split("String"),Ga=ds.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Ja(e,"name")||qa&&e.name!==t)&&(Ya?Za(e,"name",{value:t,configurable:!0}):e.name=t),Qa&&r&&Ja(r,"arity")&&e.length!==r.arity&&Za(e,"length",{value:r.arity});try{r&&Ja(r,"constructor")&&r.constructor?Ya&&Za(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Xa(e);return Ja(r,"source")||(r.source=eu.join("string"==typeof t?t:"")),e},tu=(Function.prototype.toString=Ga(function(){return Ka(this)&&Wa(this).source||$a(this)},"toString"),T),ru=Ps,nu=ds.exports,ou=Li,as={},iu=Math.ceil,su=Math.floor,au=Math.trunc||function(e){e=+e;return(0<e?su:iu)(e)},uu=ba,cu=Math.max,lu=Math.min,pu=ba,fu=Math.min,du=xi,hu=Aa,yu=I,R={includes:Ia(!0),indexOf:Ia(!1)},vu=b,mu=xi,gu=R.indexOf,Eu=La,wu=y([].push),N=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Tu=Oa,_u=N.concat("length","prototype"),Ea=(as.f=Object.getOwnPropertyNames||function(e){return Tu(e,_u)},{}),Ga=(Ea.f=Object.getOwnPropertySymbols,ki),bu=as,Au=Ea,Iu=zi,Ou=y([].concat),Ea=Ga("Reflect","ownKeys")||function(e){var t=bu.f(Iu(e)),r=Au.f;return r?Ou(t,r(e)):t},Nu=b,Ru=Ea,Cu=qn,Su=Ps,xu=g,Mu=T,ku=/#|\.prototype\./,Pu=Ra.normalize=function(e){return String(e).replace(ku,".").toLowerCase()},Uu=Ra.data={},Du=Ra.NATIVE="N",Lu=Ra.POLYFILL="P",Ga=Ra,Fu=h,ju=qn.f,Vu=Ds,Hu=_a,Bu=Li,zu=Na,Gu=Ga,Ea=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ku=b,Ju=T,Yu=Fi,qu=Ta("IE_PROTO"),$u=Object,Xu=$u.prototype,Ea=Ea?$u.getPrototypeOf:function(e){e=Yu(e);if(Ku(e,qu))return e[qu];var t=e.constructor;return Ju(t)&&e instanceof t?t.prototype:e instanceof $u?Xu:null},Wu=T,Zu=String,Qu=TypeError,ec=y,tc=zi,rc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=ec(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return tc(e),function(e){if("object"==typeof e||Wu(e))return;throw Qu("Can't set "+Zu(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),nc={},oc=Oa,ic=N,C=Object.keys||function(e){return oc(e,ic)},sc=Ps,ac=zi,uc=xi,cc=C;nc.f=v&&!A?Object.defineProperties:function(e,t){ac(e);for(var r,n=uc(t),o=cc(t),i=o.length,s=0;s<i;)sc.f(e,r=o[s++],n[r]);return e};function lc(){}function pc(e){e.write(Rc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function fc(e,t){return Dc(e),void 0===t?e:Lc?Fc(e,t):function(){return e.apply(t,arguments)}}function dc(e){return void 0!==e&&(jc.Array===e||Hc[Vc]===e)}function hc(e){if(null!=e)return qc(e,Xc)||qc(e,"@@iterator")||$c[Yc(e)]}function yc(e,t){if(t=arguments.length<2?tl(e):t,Zc(t))return Qc(Wc(t,e));throw rl(el(e)+" is not iterable")}function vc(e,t,r){var n,o;ol(e);try{if(!(n=il(e,"return"))){if("throw"===t)throw r;return r}n=nl(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return ol(n),r}function mc(e,t){this.stopped=e,this.result=t}function gc(e,t,r){function n(e){return i&&yl(i,"normal",e),new mc(!0,e)}function o(e){return f?(ul(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var i,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=sl(t,p);if(d)i=e.iterator;else if(h)i=e;else{if(!(r=hl(e)))throw vl(cl(e)+" is not iterable");if(ll(r)){for(s=0,a=pl(e);s<a;s++)if((u=o(e[s]))&&fl(ml,u))return u;return new mc(!1)}i=dl(e,r)}for(c=(d?e:i).next;!(l=al(c,i)).done;){try{u=o(l.value)}catch(e){yl(i,"throw",e)}if("object"==typeof u&&u&&fl(ml,u))return u}return new mc(!1)}function Ec(e){if("Symbol"===gl(e))throw TypeError("Cannot convert a Symbol value to a string");return El(e)}function wc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,o=bl(Pl,this);return Il?r=Il(new Ml,o?Al(this):Pl):(r=o?this:Nl(Pl),Rl(r,xl,"Error")),void 0!==t&&Rl(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:wl(e)}(t)),Sl&&Rl(r,"stack",function(e,t){if(kc&&"string"==typeof e&&!Sc.prepareStackTrace)for(;t--;)e=xc(e,Mc,"");return e}(r.stack,1)),o=r,Pc(t=n)&&"cause"in t&&Uc(o,"cause",t.cause),Cl(e,kl,{that:n=[]}),Rl(r,"errors",n),r}var Tc,C=ki("document","documentElement"),_c=zi,bc=nc,Ac=N,A=La,Ic=C,Oc=Bi,Nc=Ta("IE_PROTO"),Rc=function(e){return"<script>"+e+"<\/script>"},Cc=function(){try{Tc=new ActiveXObject("htmlfile")}catch(e){}var e,t;Cc="undefined"==typeof document||document.domain&&Tc?pc(Tc):((t=Oc("iframe")).style.display="none",Ic.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Rc("document.F=Object")),e.close(),e.F);for(var r=Ac.length;r--;)delete Cc.prototype[Ac[r]];return Cc()},nc=(A[Nc]=!0,Object.create||function(e,t){var r;return null!==e?(lc.prototype=_c(e),r=new lc,lc.prototype=null,r[Nc]=e):r=Cc(),void 0===t?r:bc.f(r,t)}),Sc=Error,xc=y("".replace),N=String(Sc("zxcasd").stack),Mc=/\n\s*at [^:]*:[^\n]*/,kc=Mc.test(N),Pc=Mi,Uc=Ds,Dc=Ui,Lc=r,Fc=y(y.bind),A={},jc=A,Vc=Vi("iterator"),Hc=Array.prototype,N={},N=(N[Vi("toStringTag")]="z","[object z]"===String(N)),S=N,Bc=T,zc=Ci,Gc=Vi("toStringTag"),Kc=Object,Jc="Arguments"==zc(function(){return arguments}()),S=S?zc:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Kc(e),Gc))?t:Jc?zc(e):"Object"==(t=zc(e))&&Bc(e.callee)?"Arguments":t},Yc=S,qc=Di,$c=A,Xc=Vi("iterator"),Wc=n,Zc=Ui,Qc=zi,el=Pi,tl=hc,rl=TypeError,nl=n,ol=zi,il=Di,sl=fc,al=n,ul=zi,cl=Pi,ll=dc,pl=I,fl=E,dl=yc,hl=hc,yl=vc,vl=TypeError,ml=mc.prototype,gl=S,El=String,wl=Ec,Tl=Ri,x=!g(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Tl(1,7)),7!==e.stack)}),_l=O,bl=E,Al=Ea,Il=rc,Ol=Na,Nl=nc,Rl=Ds,M=Ri,Cl=gc,Sl=x,xl=Vi("toStringTag"),Ml=Error,kl=[].push,Pl=(Il?Il(wc,Ml):Ol(wc,Ml,{name:!0}),wc.prototype=Nl(Ml.prototype,{constructor:M(1,wc),message:M(1,""),name:M(1,"AggregateError")})),x=(_l({global:!0,constructor:!0,arity:2},{AggregateError:wc}),Vi),Ol=nc,M=Ps.f,Ul=x("unscopables"),Dl=Array.prototype;null==Dl[Ul]&&M(Dl,Ul,{configurable:!0,value:Ol(null)});function Ll(e){Dl[Ul][e]=!0}var Fl,_l=g,x=T,M=Ea,Ol=_a,jl=Vi("iterator"),Vl=!1;[].keys&&("next"in(Gl=[].keys())?(M=M(M(Gl)))!==Object.prototype&&(Fl=M):Vl=!0);function Hl(e,t,r){(e=e&&!r?e.prototype:e)&&!Jl(e,Yl)&&Kl(e,Yl,{configurable:!0,value:t})}function Bl(){return this}function zl(e,t,r,n,o,i,s){var a=r,u=t,c=void 0;function l(e){if(e===o&&v)return v;if(!fp&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}}u+=" Iterator",a.prototype=$l(ql,{next:Xl(+!c,n)}),Wl(a,u,!1),Zl[u]=Ql;var p,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[dp]||h["@@iterator"]||o&&h[o],v=!fp&&y||l(o);if((n="Array"==t&&h.entries||y)&&(a=np(n.call(new e)))!==Object.prototype&&a.next&&(np(a)!==pp&&(op?op(a,pp):rp(a[dp])||ap(a,dp,Bl)),ip(a,c,!0)),cp&&"values"==o&&y&&"values"!==y.name&&(lp?sp(h,"name","values"):(d=!0,v=function(){return tp(y,this)})),o)if(p={values:l("values"),keys:i?v:l("keys"),entries:l("entries")},s)for(f in p)!fp&&!d&&f in h||ap(h,f,p[f]);else ep({target:t,proto:!0,forced:fp||d},p);return h[dp]!==v&&ap(h,dp,v,{name:o}),up[t]=v,p}x((Fl=null==Fl||_l(function(){var e={};return Fl[jl].call(e)!==e})?{}:Fl)[jl])||Ol(Fl,jl,function(){return this});var Gl={IteratorPrototype:Fl,BUGGY_SAFARI_ITERATORS:Vl},Kl=Ps.f,Jl=b,Yl=Vi("toStringTag"),ql=Gl.IteratorPrototype,$l=nc,Xl=Ri,Wl=Hl,Zl=A,Ql=function(){return this},ep=O,tp=n,rp=T,np=Ea,op=rc,ip=Hl,sp=Ds,ap=_a,up=A,cp=e.PROPER,lp=e.CONFIGURABLE,pp=Gl.IteratorPrototype,fp=Gl.BUGGY_SAFARI_ITERATORS,dp=Vi("iterator"),hp=xi,M=Ll,x=A,_l=is,Ol=Ps.f,Vl=zl,e=v,yp=_l.set,vp=_l.getterFor("Array Iterator"),Gl=Vl(Array,"Array",function(e,t){yp(this,{type:"Array Iterator",target:hp(e),index:0,kind:t})},function(){var e=vp(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),A=x.Arguments=x.Array;if(M("keys"),M("values"),M("entries"),e&&"values"!==A.name)try{Ol(A,"name",{value:"values"})}catch(g1){}function mp(e){var e=bp(e),t=Ap.f;Ip&&e&&!e[Op]&&t(e,Op,{configurable:!0,get:function(){return this}})}function gp(e,t){if(Np(t,e))return e;throw Rp("Incorrect invocation")}function Ep(){}function wp(e){if(!Cp(e))return!1;try{return kp(Ep,Mp,e),!0}catch(e){return!1}}function Tp(e){if(!Cp(e))return!1;switch(Sp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Dp||!!Up(Pp,xp(e))}catch(e){return!0}}var _p=S,_l=(N||_a(Object.prototype,"toString",N?{}.toString:function(){return"[object "+_p(this)+"]"},{unsafe:!0}),"process"==Ci(h.process)),bp=ki,Ap=Ps,Ip=v,Op=Vi("species"),Np=E,Rp=TypeError,Vl=y,x=g,Cp=T,Sp=S,xp=_,Mp=[],kp=ki("Reflect","construct"),Pp=/^\s*(?:class|function)\b/,Up=Vl(Pp.exec),Dp=!Pp.exec(Ep);Tp.sham=!0;function Lp(e,t){var r,e=zp(e).constructor;if(void 0===e||null==(r=zp(e)[Gp]))return t;if(Vp(e=r))return e;throw Bp(Hp(e)+" is not a constructor")}var Fp,jp,M=!kp||x(function(){var e;return wp(wp.call)||!wp(Object)||!wp(function(){e=!0})||e})?Tp:wp,Vp=M,Hp=Pi,Bp=TypeError,zp=zi,Gp=Vi("species"),e=Function.prototype,Kp=e.apply,Jp=e.call,Ol="object"==typeof Reflect&&Reflect.apply||(r?Jp.bind(Kp):function(){return Jp.apply(Kp,arguments)}),A=y([].slice),Yp=TypeError,N=/(?:ipad|iphone|ipod).*applewebkit/i.test(os),qp=h,$p=Ol,E=fc,Xp=T,Wp=b,S=g,Zp=C,Qp=A,ef=Bi,Vl=N,x=_l,e=qp.setImmediate,r=qp.clearImmediate,tf=qp.process,rf=qp.Dispatch,nf=qp.Function,C=qp.MessageChannel,of=qp.String,sf=0,af={};try{Fp=qp.location}catch(g1){}function uf(e){return function(){pf(e)}}function cf(e){pf(e.data)}function lf(e){qp.postMessage(of(e),Fp.protocol+"//"+Fp.host)}var pf=function(e){var t;Wp(af,e)&&(t=af[e],delete af[e],t())};e&&r||(e=function(e){var t=arguments.length,r=1;if(t<r)throw Yp("Not enough arguments");var n=Xp(e)?e:nf(e),o=Qp(arguments,1);return af[++sf]=function(){$p(n,void 0,o)},jp(sf),sf},r=function(e){delete af[e]},x?jp=function(e){tf.nextTick(uf(e))}:rf&&rf.now?jp=function(e){rf.now(uf(e))}:C&&!Vl?(Vl=(x=new C).port2,x.port1.onmessage=cf,jp=E(Vl.postMessage,Vl)):qp.addEventListener&&Xp(qp.postMessage)&&!qp.importScripts&&Fp&&"file:"!==Fp.protocol&&!S(lf)?(jp=lf,qp.addEventListener("message",cf,!1)):jp="onreadystatechange"in ef("script")?function(e){Zp.appendChild(ef("script")).onreadystatechange=function(){Zp.removeChild(this),pf(e)}}:function(e){setTimeout(uf(e),0)});function ff(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function df(){this.head=null,this.tail=null}function hf(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=Uf(r),this.reject=Uf(n)}var yf,vf,mf,gf,Ef,wf,Tf,C={set:e,clear:r},x=h,E=/ipad|iphone|ipod/i.test(os)&&void 0!==x.Pebble,Vl=/web0s(?!.*chrome)/i.test(os),S=h,e=fc,r=qn.f,_f=C.set,x=N,qn=E,N=Vl,bf=_l,E=S.MutationObserver||S.WebKitMutationObserver,Vl=S.document,Af=S.process,If=S.Promise,r=r(S,"queueMicrotask"),r=r&&r.value,N=(r||(yf=function(){var e,t;for(bf&&(e=Af.domain)&&e.exit();vf;){t=vf.fn,vf=vf.next;try{t()}catch(e){throw vf?gf():mf=void 0,e}}mf=void 0,e&&e.enter()},gf=x||bf||N||!E||!Vl?!qn&&If&&If.resolve?((x=If.resolve(void 0)).constructor=If,Tf=e(x.then,x),function(){Tf(yf)}):bf?function(){Af.nextTick(yf)}:(_f=e(_f,S),function(){_f(yf)}):(Ef=!0,wf=Vl.createTextNode(""),new E(yf).observe(wf,{characterData:!0}),function(){wf.data=Ef=!Ef})),r||function(e){e={fn:e,next:void 0};mf&&(mf.next=e),vf||(vf=e,gf()),mf=e}),Of=h,qn=(df.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},df),If=h.Promise,x="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,e=!x&&!_l&&"object"==typeof window&&"object"==typeof document,S=h,Nf=If,Vl=T,E=Ga,Rf=_,r=Vi,Cf=e,Sf=x,xf=ss,Mf=(Nf&&Nf.prototype,r("species")),kf=!1,Pf=Vl(S.PromiseRejectionEvent),_={CONSTRUCTOR:E("Promise",function(){var e=Rf(Nf),t=e!==String(Nf);if(!t&&66===xf)return!0;if(!xf||xf<51||!/native code/.test(e)){var e=new Nf(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Mf]=r,!(kf=e.then(function(){})instanceof r))return!0}return!t&&(Cf||Sf)&&!Pf}),REJECTION_EVENT:Pf,SUBCLASSING:kf},e={},Uf=Ui;e.f=function(e){return new hf(e)};function Df(e,t){var r,n,o,i,s=t.value,a=1==t.state,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(2===t.rejection&&(i=t,Bf(qf,Hf,function(){var e=i.facade;Vf?ad.emit("rejectionHandled",e):dd("rejectionhandled",e,i.value)})),t.rejection=1),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),o=!0)),r===e.promise?l(id("Promise-chain cycle")):(n=pd(r))?Bf(n,r,c,l):c(r)):l(s)}catch(e){p&&!o&&p.exit(),l(e)}}var Lf,Ff,jf,x=O,Vf=_l,Hf=h,Bf=n,r=_a,Vl=rc,S=Hl,E=mp,zf=Ui,Gf=T,Kf=Mi,Jf=gp,Yf=Lp,qf=C.set,$f=N,Xf=ff,Wf=qn,C=is,N=If,qn=e,Zf=_.CONSTRUCTOR,Qf=_.REJECTION_EVENT,ed=_.SUBCLASSING,td=C.getterFor("Promise"),rd=C.set,C=N&&N.prototype,nd=N,od=C,id=Hf.TypeError,sd=Hf.document,ad=Hf.process,ud=qn.f,cd=ud,ld=!!(sd&&sd.createEvent&&Hf.dispatchEvent),pd=function(e){var t;return!(!Kf(e)||!Gf(t=e.then))&&t},fd=function(r,o){r.notified||(r.notified=!0,$f(function(){for(var e,n,t=r.reactions;e=t.get();)Df(e,r);r.notified=!1,o&&!r.rejection&&(n=r,Bf(qf,Hf,function(){var e,t=n.facade,r=n.value;if(hd(n)&&(e=Xf(function(){Vf?ad.emit("unhandledRejection",r,t):dd("unhandledrejection",t,r)}),n.rejection=Vf||hd(n)?2:1,e.error))throw e.value}))}))},dd=function(e,t,r){var n;ld?((n=sd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Hf.dispatchEvent(n)):n={promise:t,reason:r},!Qf&&(t=Hf["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Of.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},hd=function(e){return 1!==e.rejection&&!e.parent},yd=function(t,r,n){return function(e){t(r,e,n)}},vd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,fd(e,!0))},md=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw id("Promise can't be resolved itself");var n=pd(e);n?$f(function(){var t={done:!1};try{Bf(n,e,yd(md,t,r),yd(vd,t,r))}catch(e){vd(t,e,r)}}):(r.value=e,r.state=1,fd(r,!1))}catch(e){vd({done:!1},e,r)}}};if(Zf&&(od=(nd=function(e){Jf(this,od),zf(e),Bf(Lf,this);var t=td(this);try{e(yd(md,t),yd(vd,t))}catch(e){vd(t,e)}}).prototype,(Lf=function(e){rd(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Wf,rejection:!1,state:0,value:void 0})}).prototype=r(od,"then",function(e,t){var r=td(this),n=ud(Yf(this,nd));return r.parent=!0,n.ok=!Gf(e)||e,n.fail=Gf(t)&&t,n.domain=Vf?ad.domain:void 0,0==r.state?r.reactions.add(n):$f(function(){Df(n,r)}),n.promise}),Ff=function(){var e=new Lf,t=td(e);this.promise=e,this.resolve=yd(md,t),this.reject=yd(vd,t)},qn.f=ud=function(e){return e===nd||void 0===e?new Ff:cd(e)},Gf(N)&&C!==Object.prototype)){jf=C.then,ed||r(C,"then",function(e,t){var r=this;return new nd(function(e,t){Bf(jf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete C.constructor}catch(g1){}Vl&&Vl(C,od)}x({global:!0,constructor:!0,wrap:!0,forced:Zf},{Promise:nd}),S(nd,"Promise",!1),E("Promise");var gd=Vi("iterator"),Ed=!1;try{var wd=0,Td={next:function(){return{done:!!wd++}},return:function(){Ed=!0}};Td[gd]=function(){return this},Array.from(Td,function(){throw 2})}catch(g1){}function _d(e,t){if(!t&&!Ed)return!1;var r=!1;try{var n={};n[gd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function bd(e,t){return Vd(e),Hd(t)&&t.constructor===e?t:((0,(e=Bd.f(e)).resolve)(t),e.promise)}function Ad(o){return function(e,t){var r,e=ah(uh(e)),t=sh(t),n=e.length;return t<0||n<=t?o?"":void 0:(r=lh(e,t))<55296||56319<r||t+1===n||(n=lh(e,t+1))<56320||57343<n?o?ch(e,t):r:o?ph(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Id(e,t){if(e){if(e[wh]!==_h)try{Eh(e,wh,_h)}catch(t){e[wh]=_h}if(e[Th]||Eh(e,Th,t),mh[t])for(var r in gh)if(e[r]!==gh[r])try{Eh(e,r,gh[r])}catch(t){e[r]=gh[r]}}}var Od,Nd=If,qn=_.CONSTRUCTOR||!_d(function(e){Nd.all(e).then(void 0,function(){})}),Rd=n,Cd=Ui,Sd=e,xd=ff,Md=gc,N=(O({target:"Promise",stat:!0,forced:qn},{all:function(e){var a=this,t=Sd.f(a),u=t.resolve,c=t.reject,r=xd(function(){var n=Cd(a.resolve),o=[],i=0,s=1;Md(e,function(e){var t=i++,r=!1;s++,Rd(n,a,e).then(function(e){r||(r=!0,o[t]=e,--s||u(o))},c)}),--s||u(o)});return r.error&&c(r.value),t.promise}}),O),ed=If,r=ki,Vl=T,C=_a,x=ed&&ed.prototype,kd=(N({target:"Promise",proto:!0,forced:_.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),Vl(ed)&&(Zf=r("Promise").prototype.catch,x.catch!==Zf&&C(x,"catch",Zf,{unsafe:!0})),n),Pd=Ui,Ud=e,Dd=ff,Ld=gc,Fd=(O({target:"Promise",stat:!0,forced:qn},{race:function(e){var r=this,n=Ud.f(r),o=n.reject,t=Dd(function(){var t=Pd(r.resolve);Ld(e,function(e){kd(t,r,e).then(n.resolve,o)})});return t.error&&o(t.value),n.promise}}),n),jd=e,Vd=(O({target:"Promise",stat:!0,forced:_.CONSTRUCTOR},{reject:function(e){var t=jd.f(this);return Fd(t.reject,void 0,e),t.promise}}),zi),Hd=Mi,Bd=e,S=O,E=_.CONSTRUCTOR,zd=bd,Gd=(ki("Promise"),S({target:"Promise",stat:!0,forced:E},{resolve:function(e){return zd(this,e)}}),n),Kd=Ui,Jd=e,Yd=ff,qd=gc,$d=(O({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Jd.f(a),u=t.resolve,r=t.reject,n=Yd(function(){var n=Kd(a.resolve),o=[],i=0,s=1;qd(e,function(e){var t=i++,r=!1;s++,Gd(n,a,e).then(function(e){r||(r=!0,o[t]={status:"fulfilled",value:e},--s||u(o))},function(e){r||(r=!0,o[t]={status:"rejected",reason:e},--s||u(o))})}),--s||u(o)});return n.error&&r(n.value),t.promise}}),n),Xd=Ui,Wd=ki,Zd=e,Qd=ff,eh=gc,Td=(O({target:"Promise",stat:!0},{any:function(e){var u=this,c=Wd("AggregateError"),t=Zd.f(u),l=t.resolve,p=t.reject,r=Qd(function(){var n=Xd(u.resolve),o=[],i=0,s=1,a=!1;eh(e,function(e){var t=i++,r=!1;s++,$d(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,o[t]=e,--s||p(new c(o,"No one promise resolved")))})}),--s||p(new c(o,"No one promise resolved"))});return r.error&&p(r.value),t.promise}}),O),N=If,Vl=g,th=ki,rh=T,nh=Lp,oh=bd,ed=_a,ih=N&&N.prototype,C=(Td({target:"Promise",proto:!0,real:!0,forced:!!N&&Vl(function(){ih.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=nh(this,th("Promise")),e=rh(t);return this.then(e?function(e){return oh(r,t()).then(function(){return e})}:t,e?function(e){return oh(r,t()).then(function(){throw e})}:t)}}),rh(N)&&(r=th("Promise").prototype.finally,ih.finally!==r&&ed(ih,"finally",r,{unsafe:!0})),y),sh=ba,ah=Ec,uh=Si,ch=C("".charAt),lh=C("".charCodeAt),ph=C("".slice),fh=(Ad(!1),Ad(!0)),dh=Ec,x=is,Zf=zl,hh=x.set,yh=x.getterFor("String Iterator"),qn=(Zf(String,"String",function(e){hh(this,{type:"String Iterator",string:dh(e),index:0})},function(){var e=yh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=fh(t,r),e.index+=t.length,{value:t,done:!1})}),h),_=(qn.Promise,Bi("span").classList),S=_&&_.constructor&&_.constructor.prototype,E=S===Object.prototype?void 0:S,vh=h,mh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},If=E,gh=Gl,Eh=Ds,Td=Vi,wh=Td("iterator"),Th=Td("toStringTag"),_h=gh.values;for(Od in mh)Id(vh[Od]&&vh[Od].prototype,Od);Id(If,"DOMTokenList");function bh(e,t,r){(t=qh(t))in e?$h.f(e,t,Xh(0,r)):e[t]=r}function Ah(e){if(9007199254740991<e)throw hy("Maximum allowed index exceeded");return e}function Ih(e,t){return yy(e=e)&&(r=e.constructor,(vy(r)&&(r===Ey||yy(r.prototype))||my(r)&&null===(r=r[gy]))&&(r=void 0)),new(void 0===r?Ey:r)(0===t?0:t);var r}function Oh(t){return 51<=Ty||!wy(function(){var e=[];return(e.constructor={})[_y]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Nh(e,t){if(!delete e[t])throw My("Cannot delete property "+xy(t)+" of "+xy(e))}function Rh(f){var d=1==f,h=2==f,y=3==f,v=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var o,i,s=Vy(e),a=jy(s),u=Fy(t,r),c=Hy(a),l=0,t=n||By,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(i=u(o=a[l],l,s),f))if(d)p[l]=i;else if(i)switch(f){case 3:return!0;case 5:return o;case 6:return l;case 2:zy(p,o)}else switch(f){case 4:return!1;case 7:zy(p,o)}return m?-1:y||v?v:p}}function Ch(e,t){var r=[][e];return!!r&&Gy(function(){r.call(null,t||function(){return 1},1)})}function Sh(u){var c=1==u;return function(e,t,r){for(var n,o=rv(e),i=tv(o),s=ev(t,r),a=nv(i);0<a--;)if(s(n=i[a],a,o))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function xh(e,t,r,n,o,i,s,a){for(var u,c,l=o,p=0,f=!!s&&cv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<i&&sv(u)?(c=av(u),l=xh(e,t,u,c,l,i-1)-1):(uv(l+1),e[l]=u),l++),p++;return l}function Mh(c){return function(e,t,r,n){Fv(t);var o=jv(e),i=Vv(o),s=Hv(o),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in i){n=i[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw Bv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in i&&(n=t(n,i[a],a,o));return n}}function kh(e,t,r){for(var n=sm(e),o=im(t,n),i=im(void 0===r?n:r,n),s=um(cm(i-o,0)),a=0;o<i;o++,a++)am(s,a,e[o]);return s.length=a,s}function Ph(e,t){var r=e.length,n=pm(r/2);if(r<8){for(var o,i,s=e,a=t,u=s.length,c=1;c<u;){for(o=s[i=c];i&&0<a(s[i-1],o);)s[i]=s[--i];i!==c++&&(s[i]=o)}return s}for(var l=e,p=Ph(lm(e,0,n),t),f=Ph(lm(e,n),t),d=t,h=p.length,y=f.length,v=0,m=0;v<h||m<y;)l[v+m]=v<h&&m<y?d(p[v],f[m])<=0?p[v++]:f[m++]:v<h?p[v++]:f[m++];return l}function Uh(e){Qm(e,ig,{value:{objectID:"O"+sg++,weakData:{}}})}function Dh(e,t,r){for(var n in t)vg(e,n,t[n],r);return e}var Lh,Fh,jh,Vh,Hh,Bh,zh,Gh=e,Kh=ff,Jh=(O({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Gh.f(this),e=Kh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),zi),Yh=vc,qh=Hi,$h=Ps,Xh=Ri,Wh=fc,Zh=n,Qh=Fi,ey=dc,ty=M,ry=I,ny=bh,oy=yc,iy=hc,sy=Array,ay=(O({target:"Array",stat:!0,forced:!_d(function(e){Array.from(e)})},{from:function(e){var t=Qh(e),e=ty(this),r=arguments.length,n=1<r?arguments[1]:void 0,o=void 0!==n;o&&(n=Wh(n,2<r?arguments[2]:void 0));var i,s,a,u,c,l,r=iy(t),p=0;if(!r||this===sy&&ey(r))for(i=ry(t),s=e?new this(i):sy(i);p<i;p++)l=o?n(t[p],p):t[p],ny(s,p,l);else for(c=(u=oy(t,r)).next,s=e?new this:[];!(a=Zh(c,u)).done;p++)l=o?function(e,t,r,n){try{return n?t(Jh(r)[0],r[1]):t(r)}catch(t){Yh(e,"throw",t)}}(u,n,[a.value,p],!0):a.value,ny(s,p,l);return s.length=p,s}}),Ci),Vl=Array.isArray||function(e){return"Array"==ay(e)},uy=(O({target:"Array",stat:!0},{isArray:Vl}),M),cy=bh,ly=Array,py=(O({target:"Array",stat:!0,forced:g(function(){function e(){}return!(ly.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(uy(this)?this:ly)(t);e<t;)cy(r,e,arguments[e++]);return r.length=t,r}}),Fi),fy=I,dy=ba,N=Ll,hy=(O({target:"Array",proto:!0},{at:function(e){var t=py(this),r=fy(t),e=dy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),N("at"),TypeError),yy=Vl,vy=M,my=Mi,gy=Vi("species"),Ey=Array,wy=g,Ty=ss,_y=Vi("species"),ed=O,r=g,by=Vl,Ay=Mi,Iy=Fi,Oy=I,Ny=Ah,Ry=bh,Cy=Ih,C=Oh,x=ss,Sy=Vi("isConcatSpreadable"),Zf=51<=x||!r(function(){var e=[];return e[Sy]=!1,e.concat()[0]!==e}),_=C("concat"),xy=(ed({target:"Array",proto:!0,arity:1,forced:!Zf||!_},{concat:function(e){for(var t,r,n,o=Iy(this),i=Cy(o,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Ay(e))return!1;var t=e[Sy];return void 0!==t?!!t:by(e)}(n=-1===a?o:arguments[a]))for(r=Oy(n),Ny(s+r),t=0;t<r;t++,s++)t in n&&Ry(i,s,n[t]);else Ny(s+1),Ry(i,s++,n);return i.length=s,i}}),Pi),My=TypeError,ky=Fi,Py=Aa,Uy=I,Dy=Nh,Ly=Math.min,S=Ll,Fy=(O({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=ky(this),n=Uy(r),o=Py(e,n),i=Py(t,n),e=2<arguments.length?arguments[2]:void 0,s=Ly((void 0===e?n:Py(e,n))-i,n-o),a=1;for(i<o&&o<i+s&&(a=-1,i+=s-1,o+=s-1);0<s--;)i in r?r[o]=r[i]:Dy(r,o),o+=a,i+=a;return r}}),S("copyWithin"),fc),jy=Gi,Vy=Fi,Hy=I,By=Ih,zy=y([].push),E={forEach:Rh(0),map:Rh(1),filter:Rh(2),some:Rh(3),every:Rh(4),find:Rh(5),findIndex:Rh(6),filterReject:Rh(7)},Gy=g,Ky=E.every,Jy=(O({target:"Array",proto:!0,forced:!Ch("every")},{every:function(e){return Ky(this,e,1<arguments.length?arguments[1]:void 0)}}),Fi),Yy=Aa,qy=I,Gl=Ll,$y=(O({target:"Array",proto:!0},{fill:function(e){for(var t=Jy(this),r=qy(t),n=arguments.length,o=Yy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,i=void 0===n?r:Yy(n,r);o<i;)t[o++]=e;return t}}),Gl("fill"),E.filter),Ds=(O({target:"Array",proto:!0,forced:!Oh("filter")},{filter:function(e){return $y(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Xy=E.find,Td=Ll,Wy=!0,If=("find"in[]&&Array(1).find(function(){Wy=!1}),Ds({target:"Array",proto:!0,forced:Wy},{find:function(e){return Xy(this,e,1<arguments.length?arguments[1]:void 0)}}),Td("find"),O),Zy=E.findIndex,e=Ll,Qy=!0,ev=("findIndex"in[]&&Array(1).findIndex(function(){Qy=!1}),If({target:"Array",proto:!0,forced:Qy},{findIndex:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),e("findIndex"),fc),tv=Gi,rv=Fi,nv=I,N={findLast:Sh(0),findLastIndex:Sh(1)},ov=N.findLast,x=Ll,iv=(O({target:"Array",proto:!0},{findLast:function(e){return ov(this,e,1<arguments.length?arguments[1]:void 0)}}),x("findLast"),N.findLastIndex),r=Ll,sv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return iv(this,e,1<arguments.length?arguments[1]:void 0)}}),r("findLastIndex"),Vl),av=I,uv=Ah,cv=fc,C=xh,lv=C,pv=Fi,fv=I,dv=ba,hv=Ih,yv=(O({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=pv(this),r=fv(t),n=hv(t,0);return n.length=lv(n,t,t,r,0,void 0===e?1:dv(e)),n}}),C),vv=Ui,mv=Fi,gv=I,Ev=Ih,wv=(O({target:"Array",proto:!0},{flatMap:function(e){var t,r=mv(this),n=gv(r);return vv(e),(t=Ev(r,0)).length=yv(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),E.forEach),ed=Ch("forEach")?[].forEach:function(e){return wv(this,e,1<arguments.length?arguments[1]:void 0)},Tv=(O({target:"Array",proto:!0,forced:[].forEach!=ed},{forEach:ed}),R.includes),Zf=Ll,_=(O({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(e){return Tv(this,e,1<arguments.length?arguments[1]:void 0)}}),Zf("includes"),O),_v=R.indexOf,S=Ch,bv=y([].indexOf),Av=!!bv&&1/bv([1],1,-0)<0,Gl=S("indexOf"),Ds=(_({target:"Array",proto:!0,forced:Av||!Gl},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Av?bv(this,e,t)||0:_v(this,e,t)}}),O),Td=Gi,Iv=xi,If=Ch,Ov=y([].join),e=Td!=Object,x=If("join",","),Nv=(Ds({target:"Array",proto:!0,forced:e||!x},{join:function(e){return Ov(Iv(this),void 0===e?",":e)}}),Ol),Rv=xi,Cv=ba,Sv=I,N=Ch,xv=Math.min,Mv=[].lastIndexOf,kv=!!Mv&&1/[1].lastIndexOf(1,-0)<0,r=N("lastIndexOf"),C=kv||!r?function(e){if(kv)return Nv(Mv,this,arguments)||0;var t=Rv(this),r=Sv(t),n=r-1;for((n=1<arguments.length?xv(n,Cv(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Mv,Pv=(O({target:"Array",proto:!0,forced:C!==[].lastIndexOf},{lastIndexOf:C}),E.map),ed=(O({target:"Array",proto:!0,forced:!Oh("map")},{map:function(e){return Pv(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Uv=Fi,Dv=I,Lv=Ah,Zf=g(function(){return 4294967297!==[].push.call({length:4294967296},1)}),R=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Fv=(ed({target:"Array",proto:!0,arity:1,forced:Zf||R},{push:function(e){var t=Uv(this),r=Dv(t),n=arguments.length;Lv(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return t.length=r}}),Ui),jv=Fi,Vv=Gi,Hv=I,Bv=TypeError,S={left:Mh(!1),right:Mh(!0)},zv=S.left,_=ss,Gl=_l,Gv=(O({target:"Array",proto:!0,forced:!Ch("reduce")||!Gl&&79<_&&_<83},{reduce:function(e){var t=arguments.length;return zv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),Td=ss,If=_l,Ds=(O({target:"Array",proto:!0,forced:!Ch("reduceRight")||!If&&79<Td&&Td<83},{reduceRight:function(e){return Gv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),O),Kv=Vl,Jv=y([].reverse),e=[1,2],x=(Ds({target:"Array",proto:!0,forced:String(e)===String(e.reverse())},{reverse:function(){return Kv(this)&&(this.length=this.length),Jv(this)}}),O),Yv=Vl,qv=M,$v=Mi,Xv=Aa,Wv=I,Zv=xi,Qv=bh,Ol=Vi,em=A,N=Oh("slice"),tm=Ol("species"),rm=Array,nm=Math.max,om=(x({target:"Array",proto:!0,forced:!N},{slice:function(e,t){var r,n,o,i=Zv(this),s=Wv(i),a=Xv(e,s),u=Xv(void 0===t?s:t,s);if(Yv(i)&&(r=i.constructor,(r=qv(r)&&(r===rm||Yv(r.prototype))||$v(r)&&null===(r=r[tm])?void 0:r)===rm||void 0===r))return em(i,a,u);for(n=new(void 0===r?rm:r)(nm(u-a,0)),o=0;a<u;a++,o++)a in i&&Qv(n,o,i[a]);return n.length=o,n}}),E.some),im=(O({target:"Array",proto:!0,forced:!Ch("some")},{some:function(e){return om(this,e,1<arguments.length?arguments[1]:void 0)}}),Aa),sm=I,am=bh,um=Array,cm=Math.max,lm=kh,pm=Math.floor,r=Ph,C=os.match(/firefox\/(\d+)/i),ed=!!C&&+C[1],Zf=/MSIE|Trident/.test(os),R=os.match(/AppleWebKit\/(\d+)\./),Gl=!!R&&+R[1],_=O,S=y,fm=Ui,dm=Fi,hm=I,ym=Nh,vm=Ec,_l=g,mm=r,If=Ch,gm=ed,Em=Zf,wm=ss,Tm=Gl,_m=[],bm=S(_m.sort),Am=S(_m.push),Td=_l(function(){_m.sort(void 0)}),Ds=_l(function(){_m.sort(null)}),e=If("sort"),Im=!_l(function(){if(wm)return wm<70;if(!(gm&&3<gm)){if(Em)return!0;if(Tm)return Tm<603;for(var e,t,r,n="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)_m.push({k:e+r,v:t})}for(_m.sort(function(e,t){return t.v-e.v}),r=0;r<_m.length;r++)e=_m[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),A=(_({target:"Array",proto:!0,forced:Td||!Ds||!e||!Im},{sort:function(e){void 0!==e&&fm(e);var t=dm(this);if(Im)return void 0===e?bm(t):bm(t,e);for(var r,n,o=[],i=hm(t),s=0;s<i;s++)s in t&&Am(o,t[s]);for(mm(o,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:vm(e)>vm(t)?1:-1})),r=o.length,s=0;s<r;)t[s]=o[s++];for(;s<i;)ym(t,s++);return t}}),mp("Array"),O),Om=Fi,Nm=Aa,Rm=ba,Cm=I,Sm=Ah,xm=Ih,Mm=bh,km=Nh,Ol=Oh("splice"),Pm=Math.max,Um=Math.min,x=(A({target:"Array",proto:!0,forced:!Ol},{splice:function(e,t){var r,n,o,i,s,a,u=Om(this),c=Cm(u),l=Nm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Um(Pm(Rm(t),0),c-l)),Sm(c+r-n),o=xm(u,n),i=0;i<n;i++)(s=l+i)in u&&Mm(o,i,u[s]);if(r<(o.length=n)){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:km(u,a);for(i=c;c-n+r<i;i--)km(u,i-1)}else if(n<r)for(i=c-n;l<i;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:km(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return u.length=c-n+r,o}}),Ll("flat"),Ll("flatMap"),O),Dm=Fi,Lm=I,Fm=Nh,jm=Ah,N=1!==[].unshift(0),C=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),os=(x({target:"Array",proto:!0,arity:1,forced:N||C},{unshift:function(e){var t=Dm(this),r=Lm(t),n=arguments.length;if(n){jm(r+n);for(var o=r;o--;){var i=o+n;o in t?t[i]=t[o]:Fm(t,i)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),qn.Array,{exports:{}}),R={},Vm=Ci,Hm=xi,Bm=as.f,zm=kh,Gm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],r=(R.f=function(e){if(!Gm||"Window"!=Vm(e))return Bm(Hm(e));var t=e;try{return Bm(t)}catch(t){return zm(Gm)}},g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),ed=g,Km=Mi,Jm=Ci,Ym=r,qm=Object.isExtensible,Zf=ed(function(){qm(1)})||Ym?function(e){return!!Km(e)&&(!Ym||"ArrayBuffer"!=Jm(e))&&(!qm||qm(e))}:qm,ss=!g(function(){return Object.isExtensible(Object.preventExtensions({}))}),$m=O,Xm=y,Gl=La,Wm=Mi,Zm=b,Qm=Ps.f,eg=as,tg=R,rg=Zf,ng=ss,og=!1,ig=ji("meta"),sg=0,ag=os.exports={enable:function(){ag.enable=function(){},og=!0;var o=eg.f,i=Xm([].splice),e={};e[ig]=1,o(e).length&&(eg.f=function(e){for(var t=o(e),r=0,n=t.length;r<n;r++)if(t[r]===ig){i(t,r,1);break}return t},$m({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tg.f}))},fastKey:function(e,t){if(!Wm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Zm(e,ig)){if(!rg(e))return"F";if(!t)return"E";Uh(e)}return e[ig].objectID},getWeakData:function(e,t){if(!Zm(e,ig)){if(!rg(e))return!0;if(!t)return!1;Uh(e)}return e[ig].weakData},onFreeze:function(e){return ng&&og&&rg(e)&&!Zm(e,ig)&&Uh(e),e}},ug=(Gl[ig]=!0,T),cg=Mi,lg=rc,S=O,If=h,pg=y,_l=Ga,fg=_a,_=os.exports,dg=gc,hg=gp,Td=T,yg=Mi,Ds=g,e=_d,A=Hl,vg=_a,mg=Ps.f,gg=nc,Eg=Dh,wg=fc,Tg=gp,_g=gc,bg=zl,Ag=mp,Ig=v,Og=os.exports.fastKey,Ng=is.set,Rg=is.getterFor;function Cg(e){var r=pg(Bh[e]);fg(Bh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(jh&&!yg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return jh&&!yg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(jh&&!yg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}Ol=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x={getConstructor:function(e,r,n,o){function i(e,t,r){var n,o=u(e),i=s(e,t);return i?i.value=r:(o.last=i={index:n=Og(t,!0),key:t,value:r,previous:t=o.last,next:void 0,removed:!1},o.first||(o.first=i),t&&(t.next=i),Ig?o.size++:e.size++,"F"!==n&&(o.index[n]=i)),e}function s(e,t){var r,e=u(e),n=Og(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){Tg(e,a),Ng(e,{type:r,index:gg(null),first:void 0,last:void 0,size:0}),Ig||(e.size=0),null!=t&&_g(t,e[o],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=Rg(r);return Eg(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,Ig?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),Ig?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=wg(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Eg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return i(this,0===e?0:e,t)}}:{add:function(e){return i(this,e=0===e?0:e,e)}}),Ig&&mg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",o=Rg(t),i=Rg(n);bg(e,t,function(e,t){Ng(this,{type:n,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),Ag(t)}},Fh=-1!==(N="Map").indexOf("Map"),jh=-1!==N.indexOf("Weak"),Vh=Fh?"set":"add",Hh=If.Map,Bh=Hh&&Hh.prototype,C={},_l(N,!Td(zh=Hh)||!(jh||Bh.forEach&&!Ds(function(){(new Hh).entries().next()})))?(zh=x.getConstructor(Ol,N,Fh,Vh),_.enable()):_l(N,!0)&&(qn=(Lh=new zh)[Vh](jh?{}:-0,1)!=Lh,r=Ds(function(){Lh.has(1)}),ed=e(function(e){new Hh(e)}),La=!jh&&Ds(function(){for(var e=new Hh,t=5;t--;)e[Vh](t,t);return!e.has(-0)}),ed||(((zh=Ol(function(e,t){hg(e,Bh);r=new Hh,e=e,n=zh,lg&&ug(e=e.constructor)&&e!==n&&cg(e=e.prototype)&&e!==n.prototype&&lg(r,e);var r,n=r;return null!=t&&dg(t,n[Vh],{that:n,AS_ENTRIES:Fh}),n})).prototype=Bh).constructor=zh),(r||La)&&(Cg("delete"),Cg("has"),Fh&&Cg("get")),(La||qn)&&Cg(Vh),jh&&Bh.clear&&delete Bh.clear),C.Map=zh,S({global:!0,constructor:!0,forced:zh!=Hh},C),A(zh,N),jh||x.setStrong(zh,N,Fh);function Sg(e,t){for(var r=0,n=Pg(t),o=new e(n);r<n;)o[r]=t[r++];return o}function xg(e,t,r,n){for(var o,i,s,a=Lg(e),u=Dg(a),c=Ug(t,r),l=Vg(null),p=jg(u),f=0;f<p;f++)s=u[f],(i=Fg(c(s,f,a)))in l?zg(l[i],s):l[i]=[s];if(n&&(o=n(a))!==Bg)for(i in l)l[i]=Hg(o,l[i]);return l}function Mg(e){for(var t,r,n=qg(this),o=Yg(n),i=Jg(e,1<arguments.length?arguments[1]:void 0),s=new Xg,a=$g(o),u=0;u<a;u++)t=i(r=o[u],u,n),Zg(s,t)?e0(Wg(s,t),r):Qg(s,t,[r]);return s}function kg(e){return o0[e].prototype}var Pg=I,Ug=fc,Dg=Gi,Lg=Fi,Fg=Hi,jg=I,Vg=nc,Hg=Sg,Bg=Array,zg=y([].push),Gg=xg,b=Ll,Kg=(O({target:"Array",proto:!0},{group:function(e){return Gg(this,e,1<arguments.length?arguments[1]:void 0)}}),b("group"),xg),as=Ll,Jg=(O({target:"Array",proto:!0,forced:!Ch("groupBy")},{groupBy:function(e){return Kg(this,e,1<arguments.length?arguments[1]:void 0)}}),as("groupBy"),fc),R=y,Yg=Gi,qg=Fi,$g=I,Xg=ki("Map"),Zf=Xg.prototype,Wg=R(Zf.get),Zg=R(Zf.has),Qg=R(Zf.set),e0=R([].push),ss=Ll,Gl=Mg,rc=(O({target:"Array",proto:!0,name:"groupToMap",forced:!Ch("groupByToMap")},{groupByToMap:Gl}),ss("groupByToMap"),Ll),t0=(O({target:"Array",proto:!0},{groupToMap:Mg}),rc("groupToMap"),I),r0=xi,Ga=Ll,n0=Array,o0=(O({target:"Array",proto:!0},{toReversed:function(){for(var e=r0(this),t=n0,r=t0(e),n=new t(r),o=0;o<r;o++)n[o]=e[r-o-1];return n}}),Ga("toReversed"),h),os=O,i0=Ui,s0=xi,a0=Sg,If=Ll,u0=Array,c0=y(kg("Array").sort),_l=(os({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&i0(e);var t=s0(this),t=a0(u0,t);return c0(t,e)}}),If("toSorted"),O),e=Ll,l0=Ah,p0=I,f0=Aa,d0=xi,h0=ba,y0=Array,v0=Math.max,m0=Math.min,g0=(_l({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,o,i,s=d0(this),a=p0(s),u=f0(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,m0(v0(h0(t),0),a-u)),o=l0(a+r-n),i=y0(o);c<u;c++)i[c]=s[c];for(;c<u+r;c++)i[c]=arguments[c-u+2];for(;c<o;c++)i[c]=s[c+n-r];return i}}),e("toSpliced"),I),E0=ba,w0=RangeError,T0=xi,_0=Array;O({target:"Array",proto:!0},{with:function(e,t){var r=T0(this),n=_0,o=t,i=g0(r),s=(e=E0(e))<0?i+e:e;if(i<=s||s<0)throw w0("Incorrect index");for(var a=new n(i),u=0;u<i;u++)a[u]=u===s?o:r[u];return a}});Ds=h,ed=Is,Ol=T,r=Ea,La=_a,qn=Vi("asyncIterator"),S=Ds.AsyncIterator,C=ed.AsyncIteratorPrototype;if(C)k=C;else if(Ol(S))k=S.prototype;else if(ed.USE_FUNCTION_CONSTRUCTOR||Ds.USE_FUNCTION_CONSTRUCTOR)try{iw=r(r(r(Function("return async function*(){}()")()))),r(iw)===Object.prototype&&(k=iw)}catch(g1){}Ol((k=k||{})[qn])||La(k,qn,function(){return this});function b0(e,t,r){var n=e.done;M0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function A0(e){k0(this,{type:"AsyncFromSyncIterator",iterator:S0(e),next:e.next})}function I0(e,t,r,n){try{var o=K0(e,"return");if(o)return G0("Promise").resolve(z0(o,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function O0(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:H0(B0(e).next)},u=X0("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Y0(s),new u(function(r,n){var o=function(e){I0(c,n,e,n)},i=function(){try{if(f&&p)try{$0(l)}catch(e){o(e)}u.resolve(q0(J0(t,c))).then(function(e){try{if(q0(e).done)f?(a.length=l,r(a)):r(!y&&(h||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(d)i();else if(h)e?i():I0(c,r,!1,n);else if(f)try{a[l++]=e,i()}catch(e){o(e)}else e?I0(c,r,y||t,n):i()},o):(a[l++]=t,i())}catch(e){o(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};i()})}}function N0(e,t){if(!pE||!lE(e)||!pE(e))return!1;for(var r,n=0,o=e.length;n<o;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==o}function R0(e,t,r){r.get&&fE(r.get,t,{getter:!0}),r.set&&fE(r.set,t,{setter:!0}),dE.f(e,t,r)}var C0=n,S0=zi,A=nc,x0=Di,x=Dh,N=is,b=k,M0=ki("Promise"),k0=N.set,P0=N.getterFor("AsyncFromSyncIterator"),as=(A0.prototype=x(A(b),{next:function(){var n=P0(this);return new M0(function(e,t){var r=S0(C0(n.next,n.iterator));b0(r,e,t)})},return:function(){var n=P0(this).iterator;return new M0(function(e,t){var r=x0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=S0(C0(r,n));b0(r,e,t)})}}),A0),U0=n,D0=as,L0=zi,F0=yc,j0=Di,V0=Vi("asyncIterator"),H0=Ui,B0=zi,z0=n,G0=ki,K0=Di,J0=n,Y0=Ui,q0=zi,$0=Ah,X0=ki,Gi={toArray:O0(0),forEach:O0(1),every:O0(2),some:O0(3),find:O0(4)},W0=fc,Z0=Fi,Q0=M,eE=yc,tE=hc,rE=Di,Zf=kg,nE=ki,oE=as,iE=Gi.toArray,sE=Vi("asyncIterator"),aE=Zf("Array").values,uE=(O({target:"Array",stat:!0,forced:!0},{fromAsync:function(i){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(nE("Promise"))(function(e){var t=Z0(i),r=(void 0!==a&&(a=W0(a,u)),rE(t,sE)),n=r?void 0:tE(t)||aE,o=Q0(s)?new s:[],r=r?function(e,t){t=arguments.length<2?j0(e,V0):t;return t?L0(U0(t,e)):new D0(F0(e))}(t,r):new oE(eE(t,n));e(iE(r,a,o))})}}),E.filterReject),R=Ll,cE=(O({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return uE(this,e,1<arguments.length?arguments[1]:void 0)}}),R("filterOut"),E.filterReject),Gl=Ll,ss=(O({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return cE(this,e,1<arguments.length?arguments[1]:void 0)}}),Gl("filterReject"),O),lE=Vl,pE=Object.isFrozen,fE=(ss({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!N0(e,!0))return!1;var t=e.raw;return t.length===e.length&&N0(t,!1)}}),ds.exports),dE=Ps,rc=Ll,hE=Fi,yE=I,Ga=(v&&(R0(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=hE(this),t=yE(e);return 0==t?void 0:e[t-1]},set:function(e){var t=hE(this),r=yE(t);return t[0==r?0:r-1]=e}}),rc("lastItem")),Ll),vE=Fi,mE=I,os=(v&&(R0(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=vE(this),e=mE(e);return 0==e?0:e-1}}),Ga("lastIndex")),y),gE=Ui,EE=I,wE=Fi,TE=Ih,_E=ki("Map"),If=_E.prototype,bE=os(If.forEach),AE=os(If.has),IE=os(If.set),OE=os([].push),_l=Ll;O({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=wE(this),o=EE(n),i=TE(n,0),s=new _E,a=null!=e?gE(e):function(e){return e},u=0;u<o;u++)r=a(t=n[u]),AE(s,r)||IE(s,r,t);return bE(s,function(e){OE(i,e)}),i}}),_l("uniqueBy");F_.exposure=function(e,t,r,n){return new LE(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},F_.track=function(e,t,r,n){return new FE(n,r,e,t)},F_.remoteConfig=function(e,t,r,n){return new jE(n,e,t.parameter,t.valueId,t.reason,r)},F_.isExposure=function(e){return void 0!==e.experiment},F_.isTrack=function(e){return void 0!==e.eventType},F_.isRemoteConfig=function(e){return void 0!==e.parameter},F_.isExposureDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},F_.isTrackDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},F_.isRemoteConfigDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},F_.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[bt.ID],identifiers:this.user.identifiers,userProperties:Xe.sanitize(this.user.properties),hackleProperties:Xe.sanitize(this.user.hackleProperties)}};var NE,RE,CE,SE,xE,ME,kE,PE,UE,DE=F_,LE=(Ke(L_,UE=DE),L_.prototype.copyWithUser=function(e){return new L_(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},L_.prototype.toDto=function(){return c(c({},UE.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})},L_),FE=(Ke(D_,PE=DE),D_.prototype.copyWithUser=function(e){return new D_(this.timestamp,e,this.eventType,this.event,this.insertId)},D_.prototype.toDto=function(){return c(c({},PE.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Xe.sanitize(this.event.properties)})},D_),jE=(Ke(U_,kE=DE),U_.prototype.copyWithUser=function(e){return new U_(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},U_.prototype.toDto=function(){return c(c({},kE.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Xe.sanitize(this.properties)})},U_),VE=(P_.isSessionEvent=function(e){return!!DE.isTrack(e)&&(e.event.key===P_.SESSION_START_EVENT_NAME||e.event.key===P_.SESSION_END_EVENT_NAME)},P_.prototype.onSessionStarted=function(e,t,r){this.track(P_.SESSION_START_EVENT_NAME,e,t,r)},P_.prototype.onSessionEnded=function(e,t,r){this.track(P_.SESSION_END_EVENT_NAME,e,t,r)},P_.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},P_.prototype.decorateSession=function(e,t){t=(new At).add(bt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},P_.SESSION_START_EVENT_NAME="$session_start",P_.SESSION_END_EVENT_NAME="$session_end",P_),HE=(k_.prototype.process=function(e){var t;VE.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.exposureEventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[bt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[bt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},k_.prototype.flush=function(e){this.delegate.flush(e)},k_.prototype.close=function(){this.delegate.close()},k_),BE=(M_.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!DE.isExposure(e))return!1;qe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache=new Map);var t=[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-"),e=(new Date).getTime(),r=this.cache.get(t);return void 0!==r&&e-r<=this.exposureEventDedupIntervalMillis||(this.cache.set(t,e),!1)},M_),zE=(x_.toEvent=function(e){var t;return{key:x_.EVENT_KEY,properties:{level:x_.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:x_._stacktrace(e)}}},x_._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,x_.STACK_TRACK_LIMIT).join("\n")},x_.EVENT_KEY="$trace",x_.LEVEL_ERROR="error",x_.STACK_TRACK_LIMIT=30,x_),e=(S_.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}},S_),GE=(C_.prototype.with=function(e){return new C_(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},C_.of=function(e,t,r,n){var o=this.config(e.workspace,r);return new C_(n,t.targetEvaluations,e.experiment,r.id,r.key,o)},C_.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new C_(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},C_.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},C_),KE=(Ke(R_,ME=e),R_.prototype.supports=function(e){return void 0!==e.experiment},R_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:GE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},R_),JE=(N_.of=function(e,t,r,n,o,i){return i.returnValue=Xe.truncateStringValue(n),new N_(o,t.targetEvaluations,e.parameter,r,n,i)},N_.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},N_),YE=(Ke(O_,xE=e),O_.prototype.supports=function(e){return void 0!==e.parameter},O_.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Xe.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return JE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,f.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,f.DEFAULT_RULE,r)},O_.prototype.evaluation=function(e,t,r,n,o){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?JE.ofDefault(e,t,f.TYPE_MISMATCH,o):JE.of(e,t,r.id,r.rawValue,n,o)},O_),qE=(I_.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},I_),$E=(A_.create=function(){return new A_},Object.defineProperty(A_.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(A_.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),A_.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},A_.prototype.addRequest=function(e){this._stack.push(e)},A_.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},A_.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof GE&&e.experiment.id===t.id})},A_.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},A_),XE=(b_.of=function(e,t,r,n){return new b_(e,t,r,n)},b_.by=function(e,t){return new b_(e.workspace,e.user,t,"A")},b_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},b_),WE=(__.of=function(e,t,r,n,o){return new __(e,t,r,n,o)},__.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},__),ZE=(T_.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},T_.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},T_.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},T_),QE=(w_.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var o=n[r].getVariation(e,t);if(void 0!==o)return o}},w_),ew=(E_.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},E_.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return ZE.asNumber(e)},E_.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=ZE.asNumber(t),e=ZE.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},E_.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},E_.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},E_.prototype.clear=function(){this.listStorage.clear()},E_),tw=(g_.prototype.add=function(e){this.evaluators.push(e)},g_.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)},g_),rw=(m_.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},m_.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},m_.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},m_),nw=(v_.prototype.matches=function(e,t){var r=this.valueMatcherFactory.getMatcher(t.valueType),n=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,r,n);return this.typeMatches(t.type,e)},v_.prototype.userValueMatches=function(e,t,r,n){return Array.isArray(e)?this.arrayMatches(e,t,r,n):this.singleMatches(e,t,r,n)},v_.prototype.singleMatches=function(t,e,r,n){return e.values.some(function(e){return r.matches(n,t,e)})},v_.prototype.arrayMatches=function(e,t,r,n){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n)})},v_.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},v_),h=(y_.prototype.booleanMatches=function(e,t){return e===t},y_.prototype.numberMatches=function(e,t){return e===t},y_.prototype.stringMatches=function(e,t){return e===t},y_.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},y_),Is=(h_.prototype.booleanMatches=function(e,t){return!1},h_.prototype.numberMatches=function(e,t){return!1},h_.prototype.stringMatches=function(e,t){return e.includes(t)},h_.prototype.versionMatches=function(e,t){return!1},h_),Ea=(d_.prototype.booleanMatches=function(e,t){return!1},d_.prototype.numberMatches=function(e,t){return!1},d_.prototype.stringMatches=function(e,t){return e.startsWith(t)},d_.prototype.versionMatches=function(e,t){return!1},d_),C=(f_.prototype.booleanMatches=function(e,t){return!1},f_.prototype.numberMatches=function(e,t){return!1},f_.prototype.stringMatches=function(e,t){return e.endsWith(t)},f_.prototype.versionMatches=function(e,t){return!1},f_),S=(p_.prototype.booleanMatches=function(e,t){return!1},p_.prototype.numberMatches=function(e,t){return t<e},p_.prototype.stringMatches=function(e,t){return t<e},p_.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},p_),ed=(l_.prototype.booleanMatches=function(e,t){return!1},l_.prototype.numberMatches=function(e,t){return t<=e},l_.prototype.stringMatches=function(e,t){return t<=e},l_.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},l_),Ds=(c_.prototype.booleanMatches=function(e,t){return!1},c_.prototype.numberMatches=function(e,t){return e<t},c_.prototype.stringMatches=function(e,t){return e<t},c_.prototype.versionMatches=function(e,t){return e.isLessThan(t)},c_),r=(u_.prototype.booleanMatches=function(e,t){return!1},u_.prototype.numberMatches=function(e,t){return e<=t},u_.prototype.stringMatches=function(e,t){return e<=t},u_.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},u_),ow=(a_.prototype.getMatcher=function(e){switch(e){case"IN":return a_.IN_MATCHER;case"CONTAINS":return a_.CONTAINS_MATCHER;case"STARTS_WITH":return a_.STARTS_WITH_MATCHER;case"ENDS_WITH":return a_.ENDS_WITH_MATCHER;case"GT":return a_.GT_MATCHER;case"GTE":return a_.GTE_MATCHER;case"LT":return a_.LT_MATCHER;case"LTE":return a_.LTE_MATCHER}},a_.IN_MATCHER=new h,a_.CONTAINS_MATCHER=new Is,a_.STARTS_WITH_MATCHER=new Ea,a_.ENDS_WITH_MATCHER=new C,a_.GT_MATCHER=new S,a_.GTE_MATCHER=new ed,a_.LT_MATCHER=new Ds,a_.LTE_MATCHER=new r,a_),iw=(s_.prototype.matches=function(e,t,r){t=ZE.asString(t),r=ZE.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},s_),Ol=(i_.prototype.matches=function(e,t,r){t=ZE.asNumber(t),r=ZE.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},i_),La=(o_.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},o_),qn=(n_.prototype.matches=function(e,t,r){t=ur.tryParse(t),r=ur.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},n_),nc=(r_.prototype.matches=function(e,t,r){return!1},r_),sw=(t_.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return t_.STRING_MATCHER;case"NUMBER":return t_.NUMBER_MATCHER;case"BOOLEAN":return t_.BOOLEAN_MATCHER;case"VERSION":return t_.VERSION_MATCHER;case"NULL":case"UNKNOWN":return t_.NULL_MATCHER}},t_.STRING_MATCHER=new iw,t_.NUMBER_MATCHER=new Ol,t_.BOOLEAN_MATCHER=new La,t_.VERSION_MATCHER=new qn,t_.NULL_MATCHER=new nc,t_),aw=(e_.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},e_),uw=(QT.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},QT),cw=(ZT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var o=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return o;case"NOT_MATCH":return!o}},ZT.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))},ZT),lw=(WT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},WT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},WT),pw=(XT.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},XT),is=($T.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(ZE.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var o=null!=(o=t.get(n))?o:this.evaluate(e,t,n);return this.evaluationMatches(o,r)},$T.prototype.evaluate=function(e,t,r){r=XE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},$T),fw=(Ke(qT,SE=is),qT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},qT.prototype.resolve=function(e,t){return e instanceof XE&&t.reason===f.TRAFFIC_ALLOCATED?t.with(f.TRAFFIC_ALLOCATED_BY_TARGETING):t},qT.prototype.evaluationMatches=function(e,t){return!!qT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},qT.AB_TEST_MATCHED_REASONS=[f.OVERRIDDEN,f.TRAFFIC_ALLOCATED,f.EXPERIMENT_COMPLETED,f.TRAFFIC_ALLOCATED_BY_TARGETING],qT),dw=(Ke(YT,CE=is),YT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},YT.prototype.resolve=function(e,t){return t},YT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},YT),hw=(JT.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},JT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},JT),yw=(KT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},KT.prototype.properties=function(e){return DE.isTrack(e)?e.event.properties:DE.isExposure(e)||DE.isRemoteConfig(e)?e.properties:void 0},KT),vw=(GT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})},GT),mw=(zT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}},zT),gw=(BT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},BT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},BT.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}},BT),Ew={murmurhash3_x86_32:function(e,t,r,n){for(var o,i=-4&(n=void 0===n?e.length:n),s=t,a=0;a<i;a+=4)o=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s=5*((524287&(s^=o=this.mul32(o,461845907)))<<13|s>>>19)+3864292196|0;switch(o=0,n%4){case 3:o=(255&e.charCodeAt(2+i))<<16;case 2:o|=(255&e.charCodeAt(1+i))<<8;case 1:o|=255&e.charCodeAt(i),o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s^=o=this.mul32(o,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),(s=this.mul32(s^=s>>>13,3266489909))^s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},ww=(HT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},HT.prototype.calculateSlotNumber=function(e,t,r){r=Ew.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},HT),Tw=(VT.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},VT.end=function(){return new VT(void 0,void 0)},VT.decision=function(e,t){return new VT(e,t)},VT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,o=e.reverse();n<o.length;n++)var i=o[n],r=this.decision(i,r);return r},VT),_w=(jT.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return GE.of(e,t,n,f.OVERRIDDEN);case"FEATURE_FLAG":return GE.of(e,t,n,f.INDIVIDUAL_TARGET_MATCH)}},jT),bw=(FT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?GE.ofDefault(e,t,f.EXPERIMENT_DRAFT):r.evaluate(e,t)},FT),Aw=(LT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return GE.ofDefault(e,t,f.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return GE.ofDefault(e,t,f.FEATURE_FLAG_INACTIVE)}},LT),Iw=(DT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return GE.of(e,t,r,f.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},DT),Ow=(UT.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):GE.ofDefault(e,t,f.NOT_IN_EXPERIMENT_TARGET)},UT),Nw=(PT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?GE.ofDefault(e,t,f.VARIATION_DROPPED):GE.of(e,t,n,f.TRAFFIC_ALLOCATED):GE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},PT),Rw=(kT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return GE.of(e,t,r,f.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},kT),Cw=(MT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return GE.ofDefault(e,t,f.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return GE.of(e,t,n,f.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},MT),Sw=(xT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var o=e.workspace.getContainerOrNull(n);if(o)return this.containerResolver.isUserInContainerGroup(e,t,o)?r.evaluate(e,t):GE.ofDefault(e,t,f.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},xT),xw=(ST.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):GE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND)},ST),Mw=(CT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})},CT),kw=(RT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},RT),Pw=(NT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},NT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},NT.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},NT.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)},NT),Uw=(OT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var o=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(o))throw new Error("Bucket[".concat(r.bucketId,"]"));o=this.bucketer.bucketing(o,n);if(a.isNullOrUndefined(o))return!1;n=r.getGroupOrNull(o.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(o.variationId,"]"));return n.experiments.includes(e.experiment.id)},OT),Dw=(IT.of=function(e,t,r,n){return new IT(r,t.targetEvaluations,e.inAppMessage,n)},IT),Lw=(AT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):Dw.of(e,t,f.UNSUPPORTED_PLATFORM)},AT),Fw=(bT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Dw.of(e,t,f.OVERRIDDEN,n)):r.evaluate(e,t)},bT),jw=(_T.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?Dw.of(e,t,f.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},_T),Vw=(TT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?Dw.of(e,t,f.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},TT),Hw=(wT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_PERIOD)},wT),Bw=(ET.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?Dw.of(e,t,f.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},ET),zw=(gT.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Dw.of(e,t,f.IN_APP_MESSAGE_TARGET,n)):Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},gT),Gw=(mT.prototype.resolve=function(e,t){var e=e.inAppMessage,r=e.messageContext.defaultLang,n=e.messageContext.messages.find(function(e){return e.lang===r});if(a.isNullOrUndefined(n))throw new Error("InAppMessage must be decided [".concat(e.id,"]"));return n},mT),Kw=(vT.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},vT.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},vT),Jw=(yT.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})},yT),Yw=(hT.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},hT),qw=(dT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},dT.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))},dT),$w=(fT.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},fT.getOrNull=function(e){return fT.instances.get(e)},fT.register=function(e,t){return fT.instances.set(e,t),t},fT.instances=new Map,fT),Xw=(pT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},pT.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},pT),Ww=(lT.prototype.create=function(r,e){var n=this,o=this.clock.currentMillis(),i=new Array,t=this.createEvent(r,e,o,{});return i.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[lT.ROOT_TYPE]=r.key.type,t[lT.ROOT_ID]=r.key.id;e=n.createEvent(r,e,o,t);i.push(e)}),i},lT.prototype.createEvent=function(e,t,r,n){var o;if(t instanceof GE)return n[lT.CONFIG_ID_PROPERTY_KEY]=null==(o=t.config)?void 0:o.id,n[lT.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[lT.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,DE.exposure(e.user,t,n,r);if(t instanceof JE)return DE.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},lT.ROOT_TYPE="$targetingRootType",lT.ROOT_ID="$targetingRootId",lT.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",lT.EXPERIMENT_VERSION_KEY="$experiment_version",lT.EXECUTION_VERSION_KEY="$execution_version",lT),Zw=(Ke(cT,RE=e),cT.prototype.supports=function(e){return void 0!==e.inAppMessage},cT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},cT),Qw=(uT.of=function(e,t,r,n){return new uT(e,t,r,n)},uT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},uT),eT=o.log,tT=(aT.create=function(e,t,r,n){var o=new tw,r=new QE(r),r=new Xw(o,r,n),n=new KE(r),i=new YE(r.remoteConfigParameterTargetRuleDeterminer),r=new Zw(r);return o.add(n),o.add(i),new aT(n,i,r,e,new Ww(Qe.instance),t,new rT,Qe.instance)},aT.prototype.experiment=function(e,t,r){var n=this;if(!e)return eT.error("experimentKey must not be empty"),ht.of(r,f.INVALID_INPUT);var o=this.workspaceFetcher.get();if(!o)return eT.warn("SDK not ready."),ht.of(r,f.SDK_NOT_READY);e=o.getExperimentOrNull(e);if(!e)return eT.warn("Experiment does not exist."),ht.of(r,f.EXPERIMENT_NOT_FOUND);o=XE.of(o,t,e,r),t=this.experimentInternal(o),e=t[0],r=t[1];return this.eventFactory.create(o,e).forEach(function(e){return n.eventProcessor.process(e)}),r},aT.prototype.experiments=function(r){var n=this,o=new Nn(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getExperiments().forEach(function(e){var t=XE.of(i,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},aT.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,$E.create()),t=null!=(t=e.config)?t:new et;return[e,ht.of(e.variationKey,e.reason,t)]},aT.prototype.featureFlag=function(e,t){var r=this;if(!e)return eT.error("featureKey must not be empty"),yt.off(f.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return eT.warn("SDK not ready."),yt.off(f.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return eT.warn("FeatureFlag does not exist."),yt.off(f.FEATURE_FLAG_NOT_FOUND);n=XE.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},aT.prototype.featureFlags=function(r){var n=this,o=new Nn(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getFeatureFlags().forEach(function(e){var t=XE.of(i,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},aT.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,$E.create()),t=null!=(t=e.config)?t:new et;return[e,"A"===e.variationKey?yt.off(e.reason,t):yt.on(e.reason,t)]},aT.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return eT.warn("SDK not ready."),dt.of(f.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return eT.warn("In app message does not exist."),dt.of(f.IN_APP_MESSAGE_NOT_FOUND);r=Qw.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,$E.create());return dt.of(t.reason,t.inAppMessage,t.message)},aT.prototype.tryInAppMessage=function(e,t){var r,n=qr.start();try{r=this.inAppMessage(e,t)}catch(t){eT.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=dt.of(f.EXCEPTION)}return no.inAppMessage(n,e,r),r},aT.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"==typeof e?"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new _t(0,e.key),this.eventProcessor.process(DE.track(n,e,t,r))):eT.warn("Event key must be not null. or event key must be string type."):eT.warn("Event must be event type."):eT.warn("event must not be null.")},aT.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=zE.toEvent(e),this.flush(),this.track(e,t),this.flush())},aT.prototype.flush=function(){this.eventProcessor.flush(!1)},aT.prototype.remoteConfig=function(e,t,r,n){var o=this,i=this.workspaceFetcher.get();if(a.isNullOrUndefined(i))return eT.warn("SDK not ready."),ft.of(n,f.SDK_NOT_READY);e=i.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return eT.warn("Remote config parameter does not exist."),ft.of(n,f.REMOTE_CONFIG_PARAMETER_NOT_FOUND);i=WE.of(i,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(i,$E.create());return this.eventFactory.create(i,t).forEach(function(e){return o.eventProcessor.process(e)}),ft.of(t.value,t.reason)},aT.prototype.close=function(){this.eventProcessor.close()},aT),rT=(sT.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},sT.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},sT),nT=(iT.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},iT.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},iT),oT=null;function iT(){this._installed=[],this._installations={onerror:j_,onunhandledrejection:V_}}function sT(){}function aT(e,t,r,n,o,i,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=o,this.eventProcessor=i,this.errorDedupDeterminer=s,this.clock=a}function uT(e,t,r,n){this.key=new qE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function cT(e){var t=RE.call(this)||this;return t.evaluationFlowFactory=e,t}function lT(e){this.clock=e}function pT(e,t,r){var n=new ww,e=$w.register("targetMatcher",new rw(new mw(e))),o=new gw(n),t=new Pw(t,e,o),i=new Uw(n),i=(this.abTestFlow=Tw.of(new _w(t),new xw,new Sw(i),new Ow(new Mw(e)),new bw,new Aw,new Iw,new Nw(o)),this.featureFlagFlow=Tw.of(new bw,new Aw,new Iw,new _w(t),new xw,new Rw(new kw(e),o),new Cw(o)),new Gw);this.inAppMessageFlow=Tw.of(new Lw,new Fw(new Kw,i),new jw,new Vw,new Hw,new Bw(new Yw(r)),new zw(new Jw(e),i)),this.remoteConfigParameterTargetRuleDeterminer=new qw(e,n)}function fT(){}function dT(e,t){this.targetMatcher=e,this.bucketer=t}function hT(e){this.storage=e}function yT(e){this.targetMatcher=e}function vT(){}function mT(){}function gT(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function ET(e){this.hiddenMatcher=e}function wT(){}function TT(){}function _T(){}function bT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function AT(){}function IT(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function OT(e){this.bucketer=e}function NT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function RT(e){this.targetMatcher=e}function CT(e){this.targetMatcher=e}function ST(){}function xT(e){this.containerResolver=e}function MT(e){this.actionResolver=e}function kT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function PT(e){this.actionResolver=e}function UT(e){this.experimentTargetDeterminer=e}function DT(){}function LT(){}function FT(){}function jT(e){this.overrideResolver=e}function VT(e,t){this.flowEvaluator=e,this.nextFlow=t}function HT(){}function BT(e){this.bucketer=e}function zT(e){var t=new nw(new sw,new ow);this.userConditionMatcher=new aw(new uw,t),this.eventConditionMatcher=new hw(new yw,t),this.segmentConditionMatcher=new cw(new lw(this.userConditionMatcher)),this.experimentConditionMatcher=new pw(new fw(e,t),new dw(e,t)),this.cohortConditionMatcher=new vw(t)}function GT(e){this.valueOperatorMatcher=e}function KT(){}function JT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function YT(e,t){return CE.call(this,e,t)||this}function qT(e,t){return SE.call(this,e,t)||this}function $T(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function XT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function WT(e){this.userConditionMatcher=e}function ZT(e){this.segmentMatcher=e}function QT(){}function e_(e,t){this.userValueResolver=e,this.valueOperatorMatcher=t}function t_(){}function r_(){}function n_(){}function o_(){}function i_(){}function s_(){}function a_(){}function u_(){}function c_(){}function l_(){}function p_(){}function f_(){}function d_(){}function h_(){}function y_(){}function v_(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function m_(e){this.conditionMatcherFactory=e}function g_(){this.evaluators=new Array}function E_(e){this.listStorage=e}function w_(e){this.storages=e}function T_(){}function __(e,t,r,n,o){this.key=new qE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=o}function b_(e,t,r,n){this.key=new qE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function A_(){this._stack=[],this._targetEvaluations=[]}function I_(e,t){this.type=e,this.id=t}function O_(e){var t=xE.call(this)||this;return t.targetRuleDeterminer=e,t}function N_(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=o,this.properties=i}function R_(e){var t=ME.call(this)||this;return t.evaluationFlowFactory=e,t}function C_(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=o,this.config=i}function S_(){}function x_(){}function M_(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function k_(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}function P_(e,t){this.userManager=e,this.core=t}function U_(e,t,r,n,o,i,s){e=kE.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=o,e.properties=i,e}function D_(e,t,r,n,o){e=PE.call(this,e,t,o)||this;return e.eventType=r,e.event=n,e}function L_(e,t,r,n,o,i,s,a){e=UE.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=o,e.decisionReason=i,e.properties=s,e}function F_(e,t,r){void 0===r&&(r=De.v4()),this.timestamp=e,this.user=t,this.insertId=r}function j_(i,s){oT=window.onerror,window.onerror=function(e,t,r,n,o){a.isNotNullOrUndefined(o)&&i.trackException(o,s.resolve()),oT&&oT.apply(this,arguments)}}function V_(r,n){NE=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),NE&&NE.apply(this,arguments)}}function H_(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function B_(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function z_(t,r){return Object.keys(Hb).every(function(e){return t[e]===r[e]})}RI.prototype.read=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},RI.prototype.save=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){return 0!==r.length&&(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t)),[2]})})},RI.prototype.add=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},RI.prototype.delete=function(i){return s(this,void 0,void 0,function(){var t,r,n,o=this;return u(this,function(e){switch(e.label){case 0:return t=0,[4,this.read()];case 1:r=e.sent(),e.label=2;case 2:if(!(t<r.length))return[3,4];r[t],e.label=3;case 3:return t++,[3,2];case 4:return[4,this.read()];case 5:return n=e.sent(),n=n.filter(function(e){return!o.isDeleteTarget(e,i)}),[4,this.save(n)];case 6:return e.sent(),[2]}})})},RI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},RI.prototype.clear=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var G_=RI,K_=(NI.builder=function(){return new J_},NI.empty=function(){return NI.builder().build()},NI.from=function(e){return new NI(e)},NI.fromDto=function(e){for(var t=NI.builder(),r=0,n=e.cohorts;r<n.length;r++){var o=n[r];t.put({identifier:o.identifier,cohorts:o.cohorts.map(function(e){return new ar(e)})})}return t.build()},Object.defineProperty(NI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),NI.prototype.get=function(e){return this.cohorts.get(e)},NI.prototype.filterBy=function(e){var r=lt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return NI.from(e)},NI.prototype.asArray=function(){return this.cohorts.values()},NI.prototype.asComparable=function(){return this.cohorts},NI.prototype.toBuilder=function(){return new J_(this)},NI),J_=(OI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},OI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},OI.prototype.build=function(){return new K_(this.cohorts)},OI),k="model",N="name",x="type",A="vendor",b="version",n="mobile",M="tablet",Y_=(P.parse=function(e){return{browser:P.getBrowser(e),cpu:P.getCPU(e),device:P.getDevice(e),engine:P.getEngine(e),os:P.getOS(e)}},P.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return P.mapper.rgx.call(t,e,P.regexes.browser),t.major=P.util.major(t.version),t},P.getCPU=function(e){var t={architecture:void 0};return P.mapper.rgx.call(t,e,P.regexes.cpu),t},P.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return P.mapper.rgx.call(t,e,P.regexes.device),t},P.getEngine=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.getOS=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},P.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[N,b],[/(opios)[\/\s]+([\w\.]+)/i],[[N,"Opera Mini"],b],[/\s(opr)\/([\w\.]+)/i],[[N,"Opera"],b],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[N,b],[/(konqueror)\/([\w\.]+)/i],[[N,"Konqueror"],b],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[N,"IE"],b],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[N,"Edge"],b],[/(yabrowser)\/([\w\.]+)/i],[[N,"Yandex"],b],[/(Avast)\/([\w\.]+)/i],[[N,"Avast Secure Browser"],b],[/(AVG)\/([\w\.]+)/i],[[N,"AVG Secure Browser"],b],[/(puffin)\/([\w\.]+)/i],[[N,"Puffin"],b],[/(focus)\/([\w\.]+)/i],[[N,"Firefox Focus"],b],[/(opt)\/([\w\.]+)/i],[[N,"Opera Touch"],b],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[N,"UCBrowser"],b],[/(comodo_dragon)\/([\w\.]+)/i],[[N,/_/g," "],b],[/(windowswechat qbcore)\/([\w\.]+)/i],[[N,"WeChat(Win) Desktop"],b],[/(micromessenger)\/([\w\.]+)/i],[[N,"WeChat"],b],[/(brave)\/([\w\.]+)/i],[[N,"Brave"],b],[/(whale)\/([\w\.]+)/i],[[N,"Whale"],b],[/(qqbrowserlite)\/([\w\.]+)/i],[N,b],[/(QQ)\/([\d\.]+)/i],[N,b],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[N,b],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[N,b],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[N,b],[/(MetaSr)[\/\s]?([\w\.]+)/i],[N],[/(LBBROWSER)/i],[N],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[b,[N,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[b,[N,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[N,b],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[b,[N,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[N,/(.+)/,"$1 WebView"],b],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[N,/(.+(?:g|us))(.+)/,"$1 $2"],b],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[N,"Chrome Mobile"],b],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[b,[N,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[N,"Sailfish Browser"],b],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[N,b],[/(dolfin)\/([\w\.]+)/i],[[N,"Dolphin"],b],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[N,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[N,"Opera Coast"],b],[/fxios\/([\w\.-]+)/i],[b,[N,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[b,[N,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[b,N],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[N,"GSA"],b],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[N,[b,(P.mapper={rgx:function(e,t){for(var r,n,o,i,s,a=0;a<t.length&&!i;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!i;)if(i=u[l++].exec(e))for(n=0;n<c.length;n++)s=i[++r],"object"==typeof(o=c[n])&&0<o.length?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(P.util.has(t[r][n],e))return"?"===r?void 0:r}else if(P.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(P.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[N,b],[/(navigator|netscape)\/([\w\.-]+)/i],[[N,"Netscape"],b],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[N,b]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[k,A,[x,M]],[/applecoremedia\/[\w\.]+ \((ipad)/],[k,[A,"Apple"],[x,M]],[/(apple\s{0,1}tv)/i],[[k,"Apple TV"],[A,"Apple"],[x,"smarttv"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[A,k,[x,M]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[k,[A,"Amazon"],[x,M]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[k,P.mapper.str,P.maps.device.amazon.model],[A,"Amazon"],[x,n]],[/android.+aft([bms])\sbuild/i],[k,[A,"Amazon"],[x,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[k,A,[x,n]],[/\((ip[honed|\s\w*]+);/i],[k,[A,"Apple"],[x,n]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[A,k,[x,n]],[/\(bb10;\s(\w+)/i],[k,[A,"BlackBerry"],[x,n]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[k,[A,"Asus"],[x,M]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[A,"Sony"],[k,"Xperia Tablet"],[x,M]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[A,"Sony"],[x,n]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[A,k,[x,"console"]],[/android.+;\s(shield)\sbuild/i],[k,[A,"Nvidia"],[x,"console"]],[/(playstation\s[34portablevi]+)/i],[k,[A,"Sony"],[x,"console"]],[/(sprint\s(\w+))/i],[[A,P.mapper.str,P.maps.device.sprint.vendor],[k,P.mapper.str,P.maps.device.sprint.model],[x,n]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[A,[k,/_/g," "],[x,n]],[/(nexus\s9)/i],[k,[A,"HTC"],[x,M]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[k,[A,"Huawei"],[x,n]],[/android.+(bah2?-a?[lw]\d{2})/i],[k,[A,"Huawei"],[x,M]],[/(microsoft);\s(lumia[\s\w]+)/i],[A,k,[x,n]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[k,[A,"Microsoft"],[x,"console"]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[A,"Microsoft"],[x,n]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[k,[A,"Motorola"],[x,n]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[k,[A,"Motorola"],[x,M]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[A,P.util.trim],[k,P.util.trim],[x,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[A,"Samsung"],[x,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[k,[A,"Sharp"],[x,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[A,"Samsung"],k,[x,M]],[/smart-tv.+(samsung)/i],[A,[x,"smarttv"],k],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[A,"Samsung"],k,[x,n]],[/sie-(\w*)/i],[k,[A,"Siemens"],[x,n]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[A,"Nokia"],k,[x,n]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[k,[A,"Acer"],[x,M]],[/android.+([vl]k\-?\d{3})\s+build/i],[k,[A,"LG"],[x,M]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[A,"LG"],k,[x,M]],[/(lg) netcast\.tv/i],[A,k,[x,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[k,[A,"LG"],[x,n]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[A,k,[x,M]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[k,[A,"Lenovo"],[x,M]],[/(lenovo)[_\s-]?([\w-]+)/i],[A,k,[x,n]],[/linux;.+((jolla));/i],[A,k,[x,n]],[/((pebble))app\/[\d\.]+\s/i],[A,k,[x,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[A,k,[x,n]],[/crkey/i],[[k,"Chromecast"],[A,"Google"],[x,"smarttv"]],[/android.+;\s(glass)\s\d/i],[k,[A,"Google"],[x,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[k,[A,"Google"],[x,M]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[k,[A,"Google"],[x,n]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[k,/_/g," "],[A,"Xiaomi"],[x,n]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[k,/_/g," "],[A,"Xiaomi"],[x,M]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[k,[A,"Meizu"],[x,n]],[/(mz)-([\w-]{2,})/i],[[A,"Meizu"],k,[x,n]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[k,[A,"OnePlus"],[x,n]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[k,[A,"RCA"],[x,M]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[k,[A,"Dell"],[x,M]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[k,[A,"Verizon"],[x,M]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[A,"Barnes & Noble"],k,[x,M]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[k,[A,"NuVision"],[x,M]],[/android.+;\s(k88)\sbuild/i],[k,[A,"ZTE"],[x,M]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[k,[A,"Swiss"],[x,n]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[k,[A,"Swiss"],[x,M]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[k,[A,"Zeki"],[x,M]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[A,"Dragon Touch"],k,[x,M]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[k,[A,"Insignia"],[x,M]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[k,[A,"NextBook"],[x,M]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[A,"Voice"],k,[x,n]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[A,"LvTel"],k,[x,n]],[/android.+;\s(PH-1)\s/i],[k,[A,"Essential"],[x,n]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[k,[A,"Envizen"],[x,M]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[A,k,[x,M]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[k,[A,"MachSpeed"],[x,M]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[A,k,[x,M]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[k,[A,"Rotor"],[x,M]],[/android.+(KS(.+))\s+build/i],[k,[A,"Amazon"],[x,M]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[A,k,[x,M]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[x,P.util.lowerize],A,k],[/[\s\/\(](smart-?tv)[;\)]/i],[[x,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[k,[A,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[b,[N,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[N,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[N,b],[/rv\:([\w\.]{1,9}).+(gecko)/i],[b,N]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[N,b],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[N,P.mapper.str,P.maps.os.windows],[b,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[b,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[N,"BlackBerry"],b],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[N,b],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[N,"Symbian"],b],[/\((series40);/i],[N],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[N,"Firefox OS"],b],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[N,"Linux"],b],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[N,"Chromium OS"],b],[/(sunos)\s?([\w\.\d]*)/i],[[N,"Solaris"],b],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[N,"Linux"],b],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iPhone"],[b,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iPad"],[b,/_/g,"."]],[/(haiku)\s(\w+)/i],[N,b],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[b,/_/g,"."],[N,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[N,"Mac"],[b,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[N,b]]},P),q_=(II.generate=function(e){i=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:i={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:i,screen:{width:"",height:""}}:e;var t,r,n,o,i,s=Y_.parse(i.navigator.userAgent),a=s.browser,u=s.os,s=s.device,c=(i.location.protocol||"").replace(":",""),l=i.screen,p=(null==(p=i.navigator.languages)?void 0:p[0])||"",f=p.split("-")[0],d=(null!=(d=s.type)?d:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=u.name||"",y="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,y=null!=(o=null==(n=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?o:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:a.name||"",browserMajorVersion:a.major||"",browserVersion:a.version||"",osName:h,osVersion:u.version||"",deviceModel:s.model||"",deviceType:d,deviceVendor:s.vendor||"",deviceBrand:s.vendor||"",locale:p,language:f,orientation:y,userAgent:i.navigator.userAgent||"",pagePath:i.location.pathname||"",pageTitle:i.document.title||"",host:i.location.host||"",protocol:c,referrer:i.document.referrer||"",queryParameter:i.location.search||"",screenWidth:l.width||"",screenHeight:l.height||"",timeZone:v}},II),$_=(AI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return W_.of(Z_(e,this.hackleDeviceId),K_.empty())},AI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(AI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),AI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},AI.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},AI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},AI.prototype.hackleUser=function(e){var t=(new At).addIdentifiers(e.user.identifiers||{}).add(bt.ID,e.user.id||this.hackleDeviceId).add(bt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(bt.HACKLE_DEVICE,this.hackleDeviceId);return a.isNotNullOrUndefined(e.user.userId)&&t.add(bt.USER,e.user.userId),{identifiers:t.build(),properties:e.user.properties||{},hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},AI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?q_.generate(window):e)||{}},AI.prototype.setUser=function(e){return this.updateUser(e).user},AI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},AI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},AI.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},AI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},AI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},AI.prototype.saveUser=function(e){this.storage.saveUser(e)},AI.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,H_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},AI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=Z_(r,n.hackleDeviceId),H_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},AI.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},AI.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},AI.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},AI),X_=(bI.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},bI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(bI.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(bI.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),bI.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},bI.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},bI.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},bI),W_=(_I.of=function(e,t){return new _I(e,t.filterBy(e))},_I.prototype.with=function(e){return _I.of(e,this.cohorts.filterBy(e))},_I.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return _I.of(this.user,e)},_I),Z_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},Q_=(Object.defineProperty(TI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:TI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),TI.prototype.addListener=function(e){this.sessionListeners.push(e)},TI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},TI.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},TI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},TI.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},TI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(De.v4().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},TI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},TI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},TI.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},TI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},TI.EMPTY_SESSION_ID="0.ffffffff",TI),eb=(wI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},wI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},wI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},wI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},wI),tb=(EI.postfix=function(e,t){return new EI(e,function(e){return"".concat(e).concat(t)})},EI.prefix=function(e,t){return new EI(e,function(e){return"".concat(t).concat(e)})},EI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},EI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},EI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},EI),rb=(gI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},gI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},gI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},gI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),o=0;return n.findIndex(function(e){return(o+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},gI.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},gI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},gI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),o=((r={})[e]=t,r);if(!this.isAddableItem(o)){var i=this.getVictimIndex(o);if(i<0)return;n=n.slice(i+1)}var s=JSON.stringify(n.concat(o));this.delegate.setItem(this.listKey,s)}catch(e){}},gI.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},gI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),o=JSON.stringify(n);this.delegate.setItem(this.listKey,o)}catch(t){}},gI.prototype.clear=function(){this.delegate.removeItem(this.listKey)},gI),nb=(mI.prototype.currentUser=function(){return this.userManager.resolve()},mI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},mI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},mI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},mI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},mI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},mI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},mI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},mI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},mI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},mI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},mI.prototype.increment=function(e,t){$n.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},mI),ob=(vI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},vI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},vI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},vI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},vI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},vI.monitoring=function(e){return"".concat(e,"/metrics")},vI),ib=(yI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},yI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},yI.prototype.key=function(e){return"".concat(e.key)},yI),sb=(hI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},hI),ab=(dI.prototype.handle=function(e,t){e.close()},dI.prototype.supports=function(e){return"CLOSE"===e.type},dI),ub=(fI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},fI.prototype.supports=function(e){return"WEB_LINK"===e.type},fI),cb=(pI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},pI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},pI),lb=(lI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+lI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},lI.prototype.supports=function(e){return"HIDDEN"===e.type},lI.HIDE_EXPIRATION=864e5,lI),pb=(cI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},cI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},cI),fb=(uI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},uI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},uI),db=(aI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},aI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},aI),hb=(sI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},sI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},sI),yb=(iI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},iI.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c({in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})},t.properties)};case"CLOSE":return{key:"$in_app_close",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key}};case"ACTION":return{key:"$in_app_action",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:e.action.type,action_area:e.area,action_value:e.action.value,button_text:e.text}}}},iI),vb=(oI.prototype.present=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})},oI),mb=(nI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},nI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},nI),gb=(rI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var o=n[r];if(this.eventMatcher.matches(t,o,e)){o=this.context(o,e);if(o)return o}}},rI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new B_(e.inAppMessage,e.message,t.user,Xe.sanitize({decision_reason:e.reason}))},rI),Eb=(tI.prototype.open=function(){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(tI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(tI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson()})];case 2:return e.sent(),t.classList.remove("".concat(tI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},tI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(tI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},tI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(tI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},tI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},tI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},tI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},tI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",tI.CONTAINER_CLASS_NAME="hackle-iam",tI),wb=(eI.prototype.create=function(e,t){return new Eb(this.scriptLoader,e,t)},eI),Tb=(QA.prototype.load=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},QA.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},QA.prototype.waitForLoad=function(i){return new Promise(function(e,t){function r(){i.removeEventListener("error",o),i.removeEventListener("load",n)}var n=function(){r(),e(i)},o=function(e){r(),t(e.message)};i.addEventListener("load",n),i.addEventListener("error",o)})},QA),_b=(ZA.prototype.isTriggerTarget=function(t,r,n){var o=this;return r.eventTrigger.rules.some(function(e){return o.ruleMatches(t,n,r,e)})},ZA.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=bb.of(e,t,r);return this.targetMatcher.anyMatches(e,$E.create(),n.targets)},ZA),bb=(WA.of=function(e,t,r){return new WA(new qE("IN_APP_MESSAGE",r.key),e,t.user,t)},WA),Ab=(XA.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var o=0,i=this.storage.get(t);o<i.length;o++)for(var s=i[o],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},XA.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var o=n[r];t.push(new Ib(new Ob(o)))}return e.durationCap&&t.push(new Ib(new Nb(e.durationCap))),t},XA),Ib=($A.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},$A),Ob=(Object.defineProperty(qA.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),qA.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t},qA),Nb=(Object.defineProperty(YA.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),YA.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},YA),Rb=(JA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},JA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},JA),Cb=(KA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},KA),Sb=(GA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},GA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>GA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-GA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},GA.prototype.supports=function(e){return"IMPRESSION"===e.type},GA.IMPRESSION_MAX_SIZE=100,GA),xb=(zA.prototype.process=function(e,t,r){},zA.prototype.supports=function(e){return"CLOSE"===e.type},zA),Mb=(BA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},BA.prototype.supports=function(e){return"ACTION"===e.type},BA),kb=(HA.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)},HA),Pb=(VA.prototype.matches=function(e,t,r){return!!DE.isTrack(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},VA),Ub=(jA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},jA),Db=(FA.prototype.handle=function(e,t){e.close()},FA.prototype.supports=function(e){return"CLOSE"===e.type},FA),Lb=(LA.prototype.handle=function(e,t){var r=Jr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},LA.prototype.supports=function(e){return"ACTION"===e.type},LA),Fb=(DA.prototype.open=function(e){window.location.href=e.href},DA),jb=(UA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},UA),Vb=(PA.prototype.open=function(e){window.open(e.href)},PA),Hb={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},Bb={current:void 0,referrer:void 0},zb=(kA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},Hb),t),n=new Bo,o=0,i=Object.entries(t);o<i.length;o++){var s=i[o],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},kA.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),o=this.parser.parse(),i=this.parser.parseDomain();r=o,i=i,null!==(n=n)&&(z_(r,Hb)&&i.current===i.referrer||z_(n,r))||(this.storage.set(o),this.startNewCampaign(e,o,t))},kA.prototype.onSessionEnded=function(e,t,r){},kA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},kA),Gb=(MA.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},MA.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},MA),Kb=(xA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},xA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var o=n[r].split("="),i=o[0],o=o[1];e&&!e(i,o)||(t[i]=decodeURIComponent(o))}return t},xA.getQueryParams=function(){return"undefined"==typeof window?{}:new xA(window.location.search).getQueryParams()},xA),Jb=(SA.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},SA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,SA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,SA),Yb=(CA.prototype.parse=function(){var e=Kb.getQueryParams();return{utm_campaign:e[qb],utm_content:e[$b],utm_id:e[Xb],utm_medium:e[Wb],utm_source:e[Zb],utm_term:e[Qb],gclid:e[eA],fbclid:e[tA]}},CA.prototype.parseDomain=function(){return"undefined"==typeof window?Bb:{current:Jb.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,Jb.extractDomain(e)}()}},CA),qb="utm_campaign",$b="utm_content",Xb="utm_id",Wb="utm_medium",Zb="utm_source",Qb="utm_term",eA="gclid",tA="fbclid",rA=(RA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},RA.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){o.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},RA),nA=(NA.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!(t&&t.getAttributes().integration_ga_experiment&&DE.isExposure(e))||"RUNNING"!==e.experiment.status||e.decisionReason!==f.TRAFFIC_ALLOCATED?null:e},NA),oA={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.24.1",IAM_RENDERER_VERSION_HEADER:"0.0.3"},iA=(OA.config=function(e){return c(c({},oA),e)},OA.logging=function(e){o.initCounter(function(e){return $n.counter("log",{level:e})}),o.setLogLevel(Fe.INFO),e.log_disabled?o.setLogLevel(Fe.DISABLE):e.debug&&o.setLogLevel(Fe.DEBUG)},OA.sdk=function(e,t){return o.log.debug("SDK key: ".concat(e)),e||o.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},OA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&o.log.debug("support sendBeacon API"),e},OA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},OA.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(o.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},OA),sA=(IA.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},IA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t=this;return u(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},IA.prototype.syncOnly=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},IA.prototype.close=function(){return s(this,void 0,void 0,function(){var t=this;return u(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},IA.prototype.safe=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},IA),aA=(AA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},AA.prototype.syncOnly=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},AA.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},AA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},AA.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},AA),uA=(bA.prototype.schedule=function(e,t){e=new cA(e,t);return e.start(),e},bA.prototype.schedulePeriodically=function(e,t,r){e=new lA(e,t,r);return e.start(),e},bA),cA=(_A.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},_A.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},_A),lA=(TA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},TA.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},TA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},TA),pA=(wA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},wA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},wA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},wA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},wA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},wA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},wA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},wA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},wA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},wA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},wA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},wA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},wA.prototype.getAttributes=function(){return this.attributes},wA.from=function(e){return new wA(p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return gt.fromJson("FEATURE_FLAG",e)}),e.buckets.map(wt.fromJson),e.events.map(_t.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(Mt.fromJson),e.parameterConfigurations.map(mt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Pt.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,Or.fromJson),e.workspace.attributes)},wA),fA=(EA.prototype.fetchIfModified=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return t=this.createRequest(),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},EA.prototype.createRequest=function(){var e=Wn.builder().url(this.url).method("GET");return null!==this.lastModified&&e.addHeader(eo.IF_MODIFIED_SINCE,this.lastModified),e.build()},EA.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),oo.record("get.workspace",t,null),r;case 4:return[2]}})})},EA.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");this.lastModified=e.headers.get(eo.LAST_MODIFIED);e=JSON.parse(e.body);return pA.from(e)},EA),dA=(gA.prototype.fetch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},gA.prototype.createRequest=function(e){e={identifiers:lt(e)},e=Le.Base64.encodeURL(JSON.stringify(e));return Wn.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},gA.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),oo.record("get.cohorts",t,null),r;case 4:return[2]}})})},gA.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return K_.fromDto(e)},gA),hA=(mA.prototype.get=function(){return this.workspace},mA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.httpWorkspaceFetcher.fetchIfModified()];case 1:return(t=e.sent())&&(this.workspace=t),[3,3];case 2:return t=e.sent(),o.log.error("Failed to fetch workspace: ".concat(t)),[3,3];case 3:return[2]}})})},mA.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},mA),yA=(vA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},vA.prototype.shutdownDispatch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.shutdownTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},vA.prototype.normalDispatch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})},vA);function vA(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}function mA(e){this.httpWorkspaceFetcher=e,this.workspace=null}function gA(e,t){this.url=e,this.transport=t}function EA(e,t){this.url=e,this.transport=t,this.lastModified=null}function wA(e,t,r,n,o,i,s,a,u,c){this.experiments=p.associateBy(e,function(e){return e.key}),this.featureFlags=p.associateBy(t,function(e){return e.key}),this.buckets=p.associateBy(r,function(e){return e.id}),this.eventTypes=p.associateBy(n,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(i,function(e){return e.id}),this.parameterConfigurations=p.associateBy(s,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(a,function(e){return e.key}),this.inAppMessages=p.associateBy(u,function(e){return e.key}),this.attributes=c}function TA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}function _A(e,t){this.delayMillis=e,this.task=t,this.timeout=null}function bA(){}function AA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}function IA(){this.synchronizations=[]}function OA(){}function NA(e){this.workspaceFetcher=e}function RA(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}function CA(){}function SA(){}function xA(e){this.search=e}function MA(e){this.storage=e}function kA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}function PA(){}function UA(){}function DA(){}function LA(e){this.eventHandler=e}function FA(){}function jA(e){this.handlers=e}function VA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function HA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function BA(e){this.actionHandlerFactory=e}function zA(){}function GA(e){this.impressionStorage=e}function KA(e){this.processors=e}function JA(e){this.storage=e}function YA(e){this.durationCap=e}function qA(e){this.identifierCap=e}function $A(e){this.matchCount=0,this.predicate=e}function XA(e){this.storage=e}function WA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function ZA(e){this.targetMatcher=e}function QA(e){this.scriptUrl=e}function eI(e){this.scriptLoader=e}function tI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===tI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function rI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function nI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}function oI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function iI(e){this.core=e}function sI(e){this.urlHandler=e}function aI(e){this.urlHandler=e}function uI(e){this.urlHandler=e}function cI(e){this.urlHandler=e}function lI(e,t){this.storage=e,this.clock=t}function pI(e){this.urlHandler=e}function fI(e){this.urlHandler=e}function dI(){}function hI(e){this.handlers=e}function yI(e){this.storage=e}function vI(){}function mI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}function gI(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}function EI(e,t){this.delegate=e,this.transform=t}function wI(){this.storage=window.localStorage}function TI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function _I(e,t){this.user=e,this.cohorts=t}function bI(e){this.storage=e}function AI(e,t,r,n,o,i){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.clock=n,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,i),this.storage.saveUser(this.context.user)}function II(){}function P(){}function OI(e){this.cohorts=new Nn(qe.isEqual),e&&this.putAll(e)}function NI(e){this.cohorts=e}function RI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}GI.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},GI.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof DE?DE.isExposure(e)?t.push(e.toDto()):DE.isTrack(e)?r.push(e.toDto()):DE.isRemoteConfig(e)&&n.push(e.toDto()):DE.isExposureDto(e)?t.push(e):DE.isTrackDto(e)?r.push(e):DE.isRemoteConfigDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Wn.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},GI.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),oo.record("post.events",t,null),r;case 4:return[2]}})})};var CI,SI,xI=GI,MI=(zI.prototype.add=function(e){return this.repository.add(e)},zI.prototype.delete=function(e){return this.repository.delete(e)},zI.prototype.flush=function(){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},zI),kI=(BI.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},BI.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},BI.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},Ke(HI,SI=BI),Ke(VI,CI=HI),VI.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},VI.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},VI.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},VI.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e),this.queue=[])},VI.prototype.close=function(){this.flush(!0)},VI),PI=(jI.prototype.send=function(e){e=e.toBuilder().addHeader("X-HACKLE-SDK-KEY",this.sdk.key).addHeader("X-HACKLE-SDK-NAME",this.sdk.name).addHeader("X-HACKLE-SDK-VERSION",this.sdk.version).addHeader("X-HACKLE-SDK-TIME",this.clock.currentMillis().toString()).build();return this.delegate.send(e)},jI),UI=(FI.intercept=function(e,t){return t instanceof PI?t:new PI(e,Qe.instance,t)},FI),DI=(LI.create=function(){return new LI},LI.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,o=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0!==n.status?(e=new Qn(n.status,n.responseText,function(e){var t=eo.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var o,i=n[r],s=i.indexOf(": ");0<s&&(o=i.slice(0,s),i=i.slice(s+2),t.add(o,i))}return t.build()}(n)),t(e)):r(new Error("Request Error")))},n),i=s.headers.raw();for(e in i)i.hasOwnProperty(e)&&o.setRequestHeader(e,i[e]);n.send(s.body)})},LI);function LI(){}function FI(){}function jI(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}function VI(e,t,r,n){var o=CI.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.queue=[],o.flushingJob=null,o}function HI(){return null!==SI&&SI.apply(this,arguments)||this}function BI(){this.listeners={}}function zI(e,t){this.repository=e,this.transport=t}function GI(e,t){this.url=e,this.transport=t}WI.create=function(){return new WI},WI.prototype.send=function(n){var o=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=o.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(Qn.ok())})},WI.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get("X-HACKLE-SDK-KEY");return r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault("X-HACKLE-SDK-NAME","unknown")),t.append("sdkVersion",e.headers.getOrDefault("X-HACKLE-SDK-VERSION","unknown")),e.body&&t.append("data",e.body),t};var KI,JI=WI,YI=(XI.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)},XI),qI=($I.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)},$I);function $I(e){this.invocationResponseResolver=e}function XI(e){this.invocationResponseResolver=e}function WI(){}(as=KI=KI||{}).prompt="prompt",as.function="function";t1.prototype.getInvocator=function(e,t){return e===KI.prompt?new YI(t):e===KI.function?new qI(t):null};var ZI=t1,QI=o.log,e1=null;function t1(){}function r1(e,t){var o=iA.config(t);iA.logging(o);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&"getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&"getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType&&e===window._hackleApp.getAppSdkKey()){i=window._hackleApp.getInvocationType();var r=null===(s=(new ZI).getInvocator(i,new $o))?(_i.error("Failed to get invocator with invocationType:".concat(i)),null):new Ii(new Ti(s));if(r)return r}}catch(e){QI.error("Unexpected exception while check WebApp client: ".concat(e))}t=iA.sdk(e,o);if(e1)return QI.debug("use already exists hackleClient"),e1;Wo.initialize();var n=new eb,i=Xo.getInstance({days:3650,isCrossSubdomain:!0,sameSite:o.sameSiteCookie,isSecure:o.secureCookie}),s=iA.isBeaconSupported(),r=UI.intercept(t,DI.create()),a=UI.intercept(t,JI.create()),u=r,c=(s&&(u=a),new sA),l=new aA(c,new uA,iA.pollingIntervalMillis(o)),p=new fA(ob.clientFetch(o.sdkUrl,t.key),r),p=new hA(p),f=(c.add("workspace",p),new dA(ob.userCohorts(o.sdkUrl),r)),d=new X_(tb.postfix(i,"_".concat(e))),h=d.getUser(),y=o.user||null,v=new $_(mi(),d,f,Qe.instance,h,y),m=(c.add("cohort",v),new Q_(o.sessionTimeoutMillis,tb.postfix(i,"_".concat(e.slice(8))))),d=(v.addListener(m),new G_(n,"".concat("hackle-repository-storage","_").concat(e),100)),f=new xI(ob.clientDispatch(o.eventUrl),r),y=f,g=(s&&(y=new xI(ob.beaconDispatch(o.eventUrl,t.key),a)),new MI(d,f)),c=new yA(f,y,g),s=new BE(iA.dedupIntervalMillis(o)),t=new kI(c,100,new uA,500),a=new HE(t,s,m,v),d=new ew(new rb(i,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),f=new ew(new rb(i,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),y=new ib(tb.prefix(n,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),c=new Rb(tb.prefix(n,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),E=tT.create(p,a,[d,f],y),s=new zb(new Gb(tb.postfix(i,"_".concat(e.slice(0,8)))),new Yb,E,v),n=new VE(v,E),a=(m.addListener(s),m.addListener(n),new yb(E)),i=new sb([new ab,new ub(new Fb),new cb(new Fb),new lb(y,Qe.instance),new pb(new jb),new fb(new jb),new db(new Vb),new hb(new Vb)]),n=new Cb([new Sb(c),new Mb(i),new xb]),y=new kb(Qe.instance,a,n),i=new Ub([new Db,new Lb(y)]),a=new Tb(ob.inAppMessageRenderer(o.cdnUrl,o.IAM_RENDERER_VERSION_HEADER)),n=new vb(new wb(a),y,i),a=new Pb(new _b($w.get("targetMatcher")),new Ab(c)),y=new gb(p,a,E),i=(new mb(t,y,n),new nA(p)),c=(new rA(t,i),new nb(E,v,d,f)),n=(null==(a=o.devTool)?void 0:a.userExplorer)&&"function"==typeof(null==(y=o.devTool)?void 0:y.userExplorer),p=o.devTool&&n?{manager:o.devTool,userExplorer:c}:void 0,t=new ro(ob.monitoring(o.monitoringUrl),r,u,new uA,6e4),w=($n.addRegistry(t),l.start(),new Jo(E,l,m,v,p));e1=w;function T(){g.flush()}return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){Ei(),m.updateLastEventTime((new Date).getTime()),w.close(),$n.globalRegistry.close()}),window.addEventListener("pageshow",T),document.addEventListener("visibilitychange",function(){document.hidden||T()}),o.autoOpenDevTool&&(o.devTool?w.showUserExplorer():QI.error("DevTool is not provided")),i=Date.now(),d=v.currentUser,f=m.currentSessionId,(H_(h,d)?m.startNewSessionIfNeeded(d,i):m.startNewSession(h,d,i))===f&&s.startNewCampaignIfNeeded(d,i),w.onReady(function(){(new nT).install(E,v);var t,r,e=w;if(o.auto_track_page_view){e.trackPageView();try{history.pushState=(r=history.pushState,function(){try{var e=r.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),history.replaceState=(t=history.replaceState,function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t,r,n),o}}),w}var Gi={createInstance:r1,getUserId:mi,setUserId:gi,removeUserId:Ei,Logger:o},n1=(l.Bucket=t.Bucket=wt,l.Cohort=t.Cohort=ar,l.Container=t.Container=Mt,l.ContainerGroup=t.ContainerGroup=kt,l.CoreVersion=t.CoreVersion=cr,l.Decision=t.Decision=ht,l.DecisionReason=t.DecisionReason=f,l.EmptyHackleRemoteConfig=t.EmptyHackleRemoteConfig=vt,l.EmptyParameterConfig=t.EmptyParameterConfig=et,l.EventType=t.EventType=_t,l.Experiment=t.Experiment=gt,l.FeatureFlagDecision=t.FeatureFlagDecision=yt,l.IAM_ACTION_AREA=t.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],l.IAM_ACTION_TYPE=t.IAM_ACTION_TYPE=Ir,l.IAM_BEHAVIOR=t.IAM_BEHAVIOR=Ar,l.IAM_DISPLAY_TYPE=t.IAM_DISPLAY_TYPE=Tr,l.IAM_LAYOUT_TYPE=t.IAM_LAYOUT_TYPE=_r,l.IAM_ORIENTATION=t.IAM_ORIENTATION=br,l.IAM_PLATFORM_TYPE=t.IAM_PLATFORM_TYPE=Er,l.IAM_STATUS=t.IAM_STATUS=gr,l.IAM_TIMEUNIT=t.IAM_TIMEUNIT=wr,l.IdentifierType=t.IdentifierType=bt,l.IdentifiersBuilder=t.IdentifiersBuilder=At,l.InAppMessage=t.InAppMessage=Or,l.InAppMessageAction=t.InAppMessageAction=Jr,l.InAppMessageBackground=t.InAppMessageBackground=Kr,l.InAppMessageButton=t.InAppMessageButton=zr,l.InAppMessageButtonStyle=t.InAppMessageButtonStyle=Gr,l.InAppMessageContext=t.InAppMessageContext=Dr,l.InAppMessageContextLayout=t.InAppMessageContextLayout=Fr,l.InAppMessageContextMessage=t.InAppMessageContextMessage=Lr,l.InAppMessageDecision=t.InAppMessageDecision=dt,l.InAppMessageDurationCap=t.InAppMessageDurationCap=kr,l.InAppMessageEventFrequencyCap=t.InAppMessageEventFrequencyCap=xr,l.InAppMessageEventTrigger=t.InAppMessageEventTrigger=Cr,l.InAppMessageEventTriggerRule=t.InAppMessageEventTriggerRule=Sr,l.InAppMessageIdentifierCap=t.InAppMessageIdentifierCap=Mr,l.InAppMessageImage=t.InAppMessageImage=jr,l.InAppMessagePeriodAlways=t.InAppMessagePeriodAlways=Nr,l.InAppMessagePeriodCustom=t.InAppMessagePeriodCustom=Rr,l.InAppMessageTargetContext=t.InAppMessageTargetContext=Pr,l.InAppMessageText=t.InAppMessageText=Vr,l.InAppMessageTextAttribute=t.InAppMessageTextAttribute=Hr,l.InAppMessageTextStyle=t.InAppMessageTextStyle=Br,l.InAppMessageUserOverride=t.InAppMessageUserOverride=Ur,l.Logger=t.Logger=o,l.MATCH_OPERATORS=t.MATCH_OPERATORS=dr,l.MATCH_TYPES=t.MATCH_TYPES=pr,l.MATCH_VALUE_TYPES=t.MATCH_VALUE_TYPES=fr,l.MetaVersion=t.MetaVersion=lr,l.ParameterConfiguration=t.ParameterConfiguration=mt,l.PropertyOperations=t.PropertyOperations=zo,l.PropertyOperationsBuilder=t.PropertyOperationsBuilder=Bo,l.RemoteConfigDecision=t.RemoteConfigDecision=ft,l.RemoteConfigParameter=t.RemoteConfigParameter=Pt,l.RemoteConfigParameterValue=t.RemoteConfigParameterValue=Dt,l.RemoteConfigTargetRule=t.RemoteConfigTargetRule=Ut,l.SEGMENT_TYPES=t.SEGMENT_TYPES=vr,l.Segment=t.Segment=xt,l.Slot=t.Slot=Tt,l.TARGET_ACTION_TYPES=t.TARGET_ACTION_TYPES=hr,l.TARGET_KEY_TYPES=t.TARGET_KEY_TYPES=yr,l.Target=t.Target=It,l.TargetAction=t.TargetAction=Ct,l.TargetCondition=t.TargetCondition=Ot,l.TargetKey=t.TargetKey=Nt,l.TargetMatch=t.TargetMatch=Rt,l.TargetRule=t.TargetRule=St,l.TargetingType=t.TargetingType=mr,l.Variation=t.Variation=Et,l.Version=t.Version=ur,Ue=t.createInstance=r1,t.default=Gi,l.getUserId=t.getUserId=mi,l.removeUserId=t.removeUserId=Ei,l.resolveIdentifiers=t.resolveIdentifiers=lt,l.sanitizeUser=t.sanitizeUser=pt,l.setUserId=t.setUserId=gi,function(e,t){return(n1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)});var o1=function(){return(o1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i1(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}s1.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},s1.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},s1.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Zf=s1;function s1(){this.listeners={}}u1.arePropertiesEqual=function(e,t){var r=u1.coerceUnknownToProperties(e),n=u1.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},u1.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var a1=u1;function u1(){}l1.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&a1.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&a1.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var c1=l1;function l1(){}var p1=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function o(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=Ue(e,o1(o1({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.24.1"})),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return n1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),o.prototype.getUser=function(){return this.client.getUser()},o.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},o.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},o.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},o.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},o.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},o.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},o.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},o.prototype.track=function(e,t){this.client.track(e,t||void 0)},o.prototype.trackPageView=function(e){this.client.trackPageView(o1(o1({},e),{user:(null==e?void 0:e.user)||void 0}))},o.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},o.prototype.onReady=function(e,t){this.client.onReady(e,t)},o.prototype.onInitialized=function(e){return this.client.onInitialized(e)},o.prototype.emitUpdatedUser=function(e){c1.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},o.prototype.showUserExplorer=function(){this.client.showUserExplorer()},o.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},o}(Zf);var U={exports:{}},R={},f1=Object.getOwnPropertySymbols,d1=Object.prototype.hasOwnProperty,h1=Object.prototype.propertyIsEnumerable;var E=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))d1.call(r,i)&&(n[i]=r[i]);if(f1)for(var s=f1(r),a=0;a<s.length;a++)h1.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},y1=E,Gl="function"==typeof Symbol&&Symbol.for,v1=Gl?Symbol.for("react.element"):60103,m1=Gl?Symbol.for("react.portal"):60106,Vl=Gl?Symbol.for("react.fragment"):60107,g1=Gl?Symbol.for("react.strict_mode"):60108,ss=Gl?Symbol.for("react.profiler"):60114,E1=Gl?Symbol.for("react.provider"):60109,w1=Gl?Symbol.for("react.context"):60110,T1=Gl?Symbol.for("react.forward_ref"):60112,ds=Gl?Symbol.for("react.suspense"):60113,_1=Gl?Symbol.for("react.memo"):60115,b1=Gl?Symbol.for("react.lazy"):60116,A1="function"==typeof Symbol&&Symbol.iterator;function I1(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var O1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N1={};function R1(e,t,r){this.props=e,this.context=t,this.refs=N1,this.updater=r||O1}function C1(){}function S1(e,t,r){this.props=e,this.context=t,this.refs=N1,this.updater=r||O1}R1.prototype.isReactComponent={},R1.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(I1(85));this.updater.enqueueSetState(this,e,t,"setState")},R1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C1.prototype=R1.prototype;var Ps=S1.prototype=new C1,x1=(Ps.constructor=S1,y1(Ps,R1.prototype),Ps.isPureReactComponent=!0,{current:null}),M1=Object.prototype.hasOwnProperty,k1={key:!0,ref:!0,__self:!0,__source:!0};function P1(e,t,r){var n,o={},i=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)M1.call(t,n)&&!k1.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(1===a)o.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===o[n]&&(o[n]=a[n]);return{$$typeof:v1,type:e,key:i,ref:s,props:o,_owner:x1.current}}function U1(e){return"object"==typeof e&&null!==e&&e.$$typeof===v1}var D1=/\/+/g,L1=[];function F1(e,t,r,n){var o;return L1.length?((o=L1.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function j1(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,L1.length<10&&L1.push(e)}function V1(e,t,r){return null==e?0:function e(t,r,n,o){var i=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case v1:case m1:i=!0}}if(i)return n(o,t,""===r?"."+H1(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+H1(a=t[s],s);i+=e(a,u,n,o)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=A1&&t[A1]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)i+=e(a=a.value,u=r+H1(a,s++),n,o);else if("object"===a)throw n=""+t,Error(I1(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return i}(e,"",t,r)}function H1(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function B1(e,t){e.func.call(e.context,t,e.count++)}function z1(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?G1(e,n,r,function(e){return e}):null!=e&&(U1(e)&&(t=o+(!(o=e).key||t&&t.key===e.key?"":(""+e.key).replace(D1,"$&/")+"/")+r,e={$$typeof:v1,type:o.type,key:t,ref:o.ref,props:o.props,_owner:o._owner}),n.push(e))}function G1(e,t,r,n,o){var i="";V1(e,z1,t=F1(t,i=null!=r?(""+r).replace(D1,"$&/")+"/":i,n,o)),j1(t)}var K1={current:null};function J1(){var e=K1.current;if(null===e)throw Error(I1(321));return e}var Y1,q1,$1,rc={ReactCurrentDispatcher:K1,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:x1,IsSomeRendererActing:{current:!1},assign:y1},v=(R.Children={map:function(e,t,r){if(null==e)return e;var n=[];return G1(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;V1(e,B1,t=F1(null,null,t,r)),j1(t)},count:function(e){return V1(e,function(){return null},null)},toArray:function(e){var t=[];return G1(e,t,null,function(e){return e}),t},only:function(e){if(U1(e))return e;throw Error(I1(143))}},R.Component=R1,R.Fragment=Vl,R.Profiler=ss,R.PureComponent=S1,R.StrictMode=g1,R.Suspense=ds,R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rc,R.cloneElement=function(e,t,r){if(null==e)throw Error(I1(267,e));var n=y1({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref,s=x1.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)M1.call(t,a)&&!k1.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:v1,type:e.type,key:o,ref:i,props:n,_owner:s}},R.createContext=function(e,t){return(e={$$typeof:w1,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:E1,_context:e},e.Consumer=e},R.createElement=P1,R.createFactory=function(e){var t=P1.bind(null,e);return t.type=e,t},R.createRef=function(){return{current:null}},R.forwardRef=function(e){return{$$typeof:T1,render:e}},R.isValidElement=U1,R.lazy=function(e){return{$$typeof:b1,_ctor:e,_status:-1,_result:null}},R.memo=function(e,t){return{$$typeof:_1,type:e,compare:void 0===t?null:t}},R.useCallback=function(e,t){return J1().useCallback(e,t)},R.useContext=function(e,t){return J1().useContext(e,t)},R.useDebugValue=function(){},R.useEffect=function(e,t){return J1().useEffect(e,t)},R.useImperativeHandle=function(e,t,r){return J1().useImperativeHandle(e,t,r)},R.useLayoutEffect=function(e,t){return J1().useLayoutEffect(e,t)},R.useMemo=function(e,t){return J1().useMemo(e,t)},R.useReducer=function(e,t,r){return J1().useReducer(e,t,r)},R.useRef=function(e){return J1().useRef(e)},R.useState=function(e){return J1().useState(e)},R.version="16.14.0",{}),Ga=Function.call.bind(Object.prototype.hasOwnProperty),X1=function(){};function W1(e,t,r,n,o){if("production"!==production)for(var i in e)if($1(e,i)){var s,a;try{if("function"!=typeof e[i])throw(a=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[i](t,i,n,r,null,Y1)}catch(e){s=e}!s||s instanceof Error||X1((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in q1)&&(q1[s.message]=!0,i=o?o():"",X1("Failed "+r+" type: "+s.message+(null!=i?i:"")))}}if("production"!==production&&(Y1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",q1={},$1=Ga,X1=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),W1.resetWarningCache=function(){"production"!==production&&(q1={})},"production"!==production){var Z1=E,Q1=W1,y="function"==typeof Symbol&&Symbol.for,eO=y?Symbol.for("react.element"):60103,tO=y?Symbol.for("react.portal"):60106,rO=y?Symbol.for("react.fragment"):60107,nO=y?Symbol.for("react.strict_mode"):60108,oO=y?Symbol.for("react.profiler"):60114,iO=y?Symbol.for("react.provider"):60109,sO=y?Symbol.for("react.context"):60110,aO=y?Symbol.for("react.concurrent_mode"):60111,uO=y?Symbol.for("react.forward_ref"):60112,cO=y?Symbol.for("react.suspense"):60113,lO=y?Symbol.for("react.suspense_list"):60120,pO=y?Symbol.for("react.memo"):60115,fO=y?Symbol.for("react.lazy"):60116,dO=y?Symbol.for("react.block"):60121,hO=y?Symbol.for("react.fundamental"):60117,yO=y?Symbol.for("react.responder"):60118,vO=y?Symbol.for("react.scope"):60119,mO="function"==typeof Symbol&&Symbol.iterator,gO="@@iterator";function EO(e){if(null===e||"object"!=typeof e)return null;e=mO&&e[mO]||e[gO];return"function"==typeof e?e:null}var wO={current:null},TO={current:null},_O=/^(.*)[\\\/]/,bO=1;function AO(e){if(null==e)return null;if("number"==typeof e.tag&&SO("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case rO:return"Fragment";case tO:return"Portal";case oO:return"Profiler";case nO:return"StrictMode";case cO:return"Suspense";case lO:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case sO:return"Context.Consumer";case iO:return"Context.Provider";case uO:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case pO:return AO(e.type);case dO:return AO(e.render);case fO:r=(t=e)._status===bO?t._result:null;if(r)return AO(r)}var t,r;return null}var IO={},OO=null;function NO(e){OO=e}IO.getCurrentStack=null,IO.getStackAddendum=function(){var e,t,r,n,o,i="",s=(OO&&(e=AO(OO.type),r=OO._owner,i+=(e=e,t=OO._source,r=r&&AO(r.type),o="",t?(n=(s=t.fileName).replace(_O,""),o=" (at "+(n=/^index\./.test(n)&&(s=s.match(_O))&&(s=s[1])?s.replace(_O,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(o=" (created by "+r+")"),"\n in "+(e||"Unknown")+o)),IO.getCurrentStack);return s&&(i+=s()||""),i};var RO={ReactCurrentDispatcher:wO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:TO,IsSomeRendererActing:{current:!1},assign:Z1};function CO(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];xO("warn",e,r)}function SO(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];xO("error",e,r)}function xO(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=RO.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});throw new Error(i)}catch(e){}}Z1(RO,{ReactDebugCurrentFrame:IO,ReactComponentTreeHook:{}});var MO={};function kO(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;MO[r]||(SO("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),MO[r]=!0)}var PO={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){kO(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){kO(e,"replaceState")},enqueueSetState:function(e,t,r,n){kO(e,"setState")}},UO={};function DO(e,t,r){this.props=e,this.context=t,this.refs=UO,this.updater=r||PO}Object.freeze(UO),DO.prototype.isReactComponent={},DO.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},DO.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var LO,FO={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(LO in FO)FO.hasOwnProperty(LO)&&!function(e,t){Object.defineProperty(DO.prototype,e,{get:function(){CO("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(LO,FO[LO]);function jO(){}function VO(e,t,r){this.props=e,this.context=t,this.refs=UO,this.updater=r||PO}jO.prototype=DO.prototype,(y=VO.prototype=new jO).constructor=VO,Z1(y,DO.prototype),y.isPureReactComponent=!0;var HO,BO,zO=Object.prototype.hasOwnProperty,GO={key:!0,ref:!0,__self:!0,__source:!0};function KO(e){if(zO.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function JO(e){if(zO.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var YO={},qO=function(e,t,r,n,o,i,s){e={$$typeof:eO,type:e,key:t,ref:r,props:s,_owner:i,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function $O(e,t,r){var n,o={},i=null,s=null,a=null,u=null;if(null!=t)for(n in KO(t)&&(s=t.ref,"string"==typeof(c=t).ref&&TO.current&&c.__self&&TO.current.stateNode!==c.__self&&(p=AO(TO.current.type),YO[p]||(SO('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',AO(TO.current.type),c.ref),YO[p]=!0))),JO(t)&&(i=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)zO.call(t,n)&&!GO.hasOwnProperty(n)&&(o[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)o.children=r;else if(1<d){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];Object.freeze&&Object.freeze(h),o.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===o[n]&&(o[n]=v[n])}function m(){BO||(BO=!0,SO("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){HO||(HO=!0,SO("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(i||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,i&&(p=o,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=o,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),qO(e,i,s,a,u,TO.current,o)}function XO(e){return"object"==typeof e&&null!==e&&e.$$typeof===eO}var WO=".",ZO=":",QO=!1,eN=/\/+/g;function tN(e){return(""+e).replace(eN,"$&/")}var rN=10,nN=[];function oN(e,t,r,n){var o;return nN.length?((o=nN.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function iN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,nN.length<rN&&nN.push(e)}function sN(e,t,r){return null==e?0:function e(t,r,n,o){var i,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case eO:case tO:a=!0}}if(a)return n(o,t,""===r?WO+aN(t,0):r),1;var u=0,c=""===r?WO:r+ZO;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(i=t[l],c+aN(i,l),n,o);else if("function"==typeof(r=EO(t))){r===t.entries&&(QO||CO("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),QO=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(i=p.value,c+aN(i,d++),n,o)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+IO.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function aN(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function uN(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function cN(e,t,r){var n=e.result,o=e.keyPrefix,i=e.func,s=e.context,i=i.call(s,t,e.count++);Array.isArray(i)?lN(i,n,r,function(e){return e}):null!=i&&(XO(i)&&(e=o+(!(s=i).key||t&&t.key===i.key?"":tN(i.key)+"/")+r,i=qO(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(i))}function lN(e,t,r,n,o){var i="",t=oN(t,i=null!=r?tN(r)+"/":i,n,o);sN(e,cN,t),iN(t)}function pN(e){return"string"==typeof e||"function"==typeof e||e===rO||e===aO||e===oO||e===nO||e===cO||e===lO||"object"==typeof e&&null!==e&&(e.$$typeof===fO||e.$$typeof===pO||e.$$typeof===iO||e.$$typeof===sO||e.$$typeof===uO||e.$$typeof===hO||e.$$typeof===yO||e.$$typeof===vO||e.$$typeof===dO)}function fN(){var e=wO.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function dN(){if(TO.current){var e=AO(TO.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var hN=!1,yN={};function vN(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=dN())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),yN[t=r]||(yN[t]=!0,r="",e&&e._owner&&e._owner!==TO.current&&(r=" It was passed a child from "+AO(e._owner.type)+"."),NO(e),SO('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),NO(null)))}function mN(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];XO(n)&&vN(n,t)}else if(XO(e))e._store&&(e._store.validated=!0);else if(e){var o=EO(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)XO(i.value)&&vN(i.value,t)}}function gN(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=AO(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==uO&&t.$$typeof!==pO)return;r=t.propTypes}r?(NO(e),Q1(r,e.props,"prop",n,IO.getStackAddendum),NO(null)):void 0===t.PropTypes||hN||(hN=!0,SO("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||SO("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function EN(e,t,r){var n,o=pN(e),t=(o||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||dN(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===eO?(s="<"+(AO(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,SO("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),$O.apply(this,arguments));if(null==t)return t;if(o)for(var i=2;i<arguments.length;i++)mN(arguments[i],e);if(e===rO){var s=t;NO(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){SO("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&SO("Invalid attribute `ref` supplied to `React.Fragment`."),NO(null)}else gN(t);return t}var wN=!1;try{var TN=Object.freeze({}),_N=new Map([[TN,null]]),bN=new Set([TN]);_N.set(0,0),bN.add(0)}catch(e){}function AN(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,i=Z1({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in KO(t)&&(a=t.ref,l=TO.current),JO(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)zO.call(t,n)&&!GO.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?i[n]=o[n]:i[n]=t[n]);var p=arguments.length-2;if(1==p)i.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];i.children=f}return qO(e.type,s,a,u,c,l,i)}.apply(this,arguments),o=2;o<arguments.length;o++)mN(arguments[o],n.type);return gN(n),n}function IN(e){var t=EN.bind(null,e);return t.type=e,wN||(wN=!0,CO("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return CO("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}y=EN,v.Children={map:function(e,t,r){if(null==e)return e;var n=[];return lN(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=oN(null,null,t,r),sN(e,uN,t),iN(t)},count:function(e){return sN(e,function(){return null},null)},toArray:function(e){var t=[];return lN(e,t,null,function(e){return e}),t},only:function(e){if(XO(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},v.Component=DO,v.Fragment=rO,v.Profiler=oO,v.PureComponent=VO,v.StrictMode=nO,v.Suspense=cO,v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RO,v.cloneElement=AN,v.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&SO("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:sO,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:iO,_context:r}),o=!1,t={$$typeof:sO,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return o||(o=!0,SO("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,SO("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},v.createElement=y,v.createFactory=IN,v.createRef=function(){var e={current:null};return Object.seal(e),e},v.forwardRef=function(e){return null!=e&&e.$$typeof===pO?SO("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?SO("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&SO("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||SO("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:uO,render:e}},v.isValidElement=XO,v.lazy=function(e){var t,r,n={$$typeof:fO,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){SO("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){SO("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},v.memo=function(e,t){return pN(e)||SO("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:pO,type:e,compare:void 0===t?null:t}},v.useCallback=function(e,t){return fN().useCallback(e,t)},v.useContext=function(e,t){var r,n=fN();return void 0!==t&&SO("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?SO("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&SO("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},v.useDebugValue=function(e,t){return fN().useDebugValue(e,t)},v.useEffect=function(e,t){return fN().useEffect(e,t)},v.useImperativeHandle=function(e,t,r){return fN().useImperativeHandle(e,t,r)},v.useLayoutEffect=function(e,t){return fN().useLayoutEffect(e,t)},v.useMemo=function(e,t){return fN().useMemo(e,t)},v.useReducer=function(e,t,r){return fN().useReducer(e,t,r)},v.useRef=function(e){return fN().useRef(e)},v.useState=function(e){return fN().useState(e)},v.version="16.14.0"}"production"===production?U.exports=R:U.exports=v;var ON=U.exports,NN=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),If=NN.Consumer,RN=NN.Provider;var CN=l.Logger.log;function SN(e,t){e=xN(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function xN(e,t){void 0===t&&(t="A");var r=U.exports.useContext(NN),n=r.hackle,o=r.userVersion,i=r.initialized,s=U.exports.useCallback(function(){return i?(null==n?void 0:n.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION):l.Decision.of(t,l.DecisionReason.SDK_NOT_READY)},[t,e,n,i]),r=i1(U.exports.useState(function(){return n?s():(CN.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],o={key:e,userVersion:o,initialized:i},u=i1(U.exports.useState(o),2),c=u[0],u=u[1];return PN(c,o)||(u(o),r(s())),{isLoading:!i,decision:a}}function MN(e){e=kN(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function kN(e){var t=U.exports.useContext(NN),r=t.hackle,n=t.userVersion,o=t.initialized,i=U.exports.useCallback(function(){return o?(null==r?void 0:r.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION):l.FeatureFlagDecision.off(l.DecisionReason.SDK_NOT_READY)},[e,r,o]),t=i1(U.exports.useState(function(){return r?i():(CN.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:o},a=i1(U.exports.useState(n),2),u=a[0],a=a[1];return PN(u,n)||(a(n),t(i())),{isLoading:!o,decision:s}}function PN(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function UN(e){var t,r=e.experimentKey,e=e.children,n=(r=SN(r)).isLoading,o=r.variation;return n?null:e&&"function"==typeof e?e(o):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?o===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:o}):null)}function DN(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function LN(e){var t=(r=MN(e.featureKey)).isLoading,r=r.isOn;return t?null:ON.createElement(ON.Fragment,null,e.children(r))}l.HackleContext=NN,l.HackleContextConsumer=If,l.HackleContextProvider=RN,l.HackleExperiment=UN,l.HackleFeature=LN,l.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(o=e.timeout)?3e3:o,o=void 0!==(o=e.supportSSR)&&o,e=e.children,i=i1(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=i[0],a=i[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return o1(o1({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return o1(o1({},e),{initialized:!0})})},function(){a(function(e){return o1(o1({},e),{initialized:!0})})}).catch(function(){a(function(e){return o1(o1({},e),{initialized:!0})})})},[t]),o||s.initialized?ON.createElement(RN,{value:s},e):null},l.HackleVariation=DN,l.createInstance=function(e,t){return new p1(e,t)},l.useFeature=function(e){var t=(n=U.exports.useContext(NN)).hackle,r=n.userVersion,n=n.initialized,o=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),i=(s=i1(U.exports.useState(function(){return t?o():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=i1(U.exports.useState(r),2))[0],n=n[1];return PN(a,r)||(n(r),s(o())),i},l.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(NN)).hackle,r=n.userVersion,n=n.initialized,o=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION)},[e,t,n]),i=(s=i1(U.exports.useState(function(){return t?o():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=i1(U.exports.useState(r),2))[0],n=n[1];return PN(a,r)||(n(r),s(o())),i},l.useLoadableFeature=MN,l.useLoadableFeatureDetail=kN,l.useLoadableRemoteConfig=function(){var e=(i=U.exports.useContext(NN)).hackle,t=i.userVersion,r=i.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),o=(i=i1(U.exports.useState(function(){return e||CN.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(a=i1(U.exports.useState(t),2))[0],a=a[1];return PN(s,t)||(a(t),i(n())),{isLoading:!r,remoteConfig:o}},l.useLoadableVariation=SN,l.useLoadableVariationDetail=xN,l.useRemoteConfig=function(){var e=(r=U.exports.useContext(NN)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),o=(i=i1(U.exports.useState(function(){return e||CN.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(r=i1(U.exports.useState(t),2))[0],r=r[1];return PN(s,t)||(r(t),i(n())),o},l.useTrack=function(){var t=U.exports.useContext(NN).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(CN.error("HackleClient is not existed"),function(){})},l.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(NN)).hackle,n=a.userVersion,o=a.initialized,i=U.exports.useCallback(function(){return o&&(null==r?void 0:r.variation(e))||t},[t,e,r,o]),s=(a=i1(U.exports.useState(function(){return r?i():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(c=i1(U.exports.useState(n),2))[0],c=c[1];return PN(u,n)||(c(n),a(i())),s},l.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(o=U.exports.useContext(NN)).hackle,n=o.userVersion,o=o.initialized,i=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION)},[t,e,r,o]),s=(a=i1(U.exports.useState(function(){return r?i():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(o=i1(U.exports.useState(n),2))[0],o=o[1];return PN(u,n)||(o(n),a(i())),s},Object.defineProperty(l,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(l){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(r){if(r.__esModule)return r;var n=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),n}var L,t={},F=new Uint8Array(16);function j(){if(L=L||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return L(F);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var V=/^(?:[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 H(e){return"string"==typeof e&&V.test(e)}for(var B,z,G=[],K=0;K<256;++K)G.push((K+256).toString(16).substr(1));function J(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase();if(H(e))return e;throw TypeError("Stringified UUID is invalid")}var Y=0,q=0;function $(e){if(!H(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function X(e,s,a){function t(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),16!==(t="string"==typeof t?$(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(t),o.set(e,t.length),(o=a(o))[6]=15&o[6]|s,o[8]=63&o[8]|128,r){n=n||0;for(var i=0;i<16;++i)r[n+i]=o[i];return r}return J(o)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function W(e){return 14+(e+64>>>9<<4)+1}function Z(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function Q(e,t,r,n,o,i){return Z((t=Z(Z(t,e),Z(n,i)))<<o|t>>>32-o,r)}function ee(e,t,r,n,o,i,s){return Q(t&r|~t&n,e,t,o,i,s)}function te(e,t,r,n,o,i,s){return Q(t&n|r&~n,e,t,o,i,s)}function re(e,t,r,n,o,i,s){return Q(t^r^n,e,t,o,i,s)}function ne(e,t,r,n,o,i,s){return Q(r^(t|~n),e,t,o,i,s)}var r=X("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}for(var n=function(e,t){e[t>>5]|=128<<t%32,e[W(t)-1]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=o,l=i;r=ee(r,n,o,i,e[s],7,-680876936),i=ee(i,r,n,o,e[s+1],12,-389564586),o=ee(o,i,r,n,e[s+2],17,606105819),n=ee(n,o,i,r,e[s+3],22,-1044525330),r=ee(r,n,o,i,e[s+4],7,-176418897),i=ee(i,r,n,o,e[s+5],12,1200080426),o=ee(o,i,r,n,e[s+6],17,-1473231341),n=ee(n,o,i,r,e[s+7],22,-45705983),r=ee(r,n,o,i,e[s+8],7,1770035416),i=ee(i,r,n,o,e[s+9],12,-1958414417),o=ee(o,i,r,n,e[s+10],17,-42063),n=ee(n,o,i,r,e[s+11],22,-1990404162),r=ee(r,n,o,i,e[s+12],7,1804603682),i=ee(i,r,n,o,e[s+13],12,-40341101),o=ee(o,i,r,n,e[s+14],17,-1502002290),n=ee(n,o,i,r,e[s+15],22,1236535329),r=te(r,n,o,i,e[s+1],5,-165796510),i=te(i,r,n,o,e[s+6],9,-1069501632),o=te(o,i,r,n,e[s+11],14,643717713),n=te(n,o,i,r,e[s],20,-373897302),r=te(r,n,o,i,e[s+5],5,-701558691),i=te(i,r,n,o,e[s+10],9,38016083),o=te(o,i,r,n,e[s+15],14,-660478335),n=te(n,o,i,r,e[s+4],20,-405537848),r=te(r,n,o,i,e[s+9],5,568446438),i=te(i,r,n,o,e[s+14],9,-1019803690),o=te(o,i,r,n,e[s+3],14,-187363961),n=te(n,o,i,r,e[s+8],20,1163531501),r=te(r,n,o,i,e[s+13],5,-1444681467),i=te(i,r,n,o,e[s+2],9,-51403784),o=te(o,i,r,n,e[s+7],14,1735328473),n=te(n,o,i,r,e[s+12],20,-1926607734),r=re(r,n,o,i,e[s+5],4,-378558),i=re(i,r,n,o,e[s+8],11,-2022574463),o=re(o,i,r,n,e[s+11],16,1839030562),n=re(n,o,i,r,e[s+14],23,-35309556),r=re(r,n,o,i,e[s+1],4,-1530992060),i=re(i,r,n,o,e[s+4],11,1272893353),o=re(o,i,r,n,e[s+7],16,-155497632),n=re(n,o,i,r,e[s+10],23,-1094730640),r=re(r,n,o,i,e[s+13],4,681279174),i=re(i,r,n,o,e[s],11,-358537222),o=re(o,i,r,n,e[s+3],16,-722521979),n=re(n,o,i,r,e[s+6],23,76029189),r=re(r,n,o,i,e[s+9],4,-640364487),i=re(i,r,n,o,e[s+12],11,-421815835),o=re(o,i,r,n,e[s+15],16,530742520),n=re(n,o,i,r,e[s+2],23,-995338651),r=ne(r,n,o,i,e[s],6,-198630844),i=ne(i,r,n,o,e[s+7],10,1126891415),o=ne(o,i,r,n,e[s+14],15,-1416354905),n=ne(n,o,i,r,e[s+5],21,-57434055),r=ne(r,n,o,i,e[s+12],6,1700485571),i=ne(i,r,n,o,e[s+3],10,-1894986606),o=ne(o,i,r,n,e[s+10],15,-1051523),n=ne(n,o,i,r,e[s+1],21,-2054922799),r=ne(r,n,o,i,e[s+8],6,1873313359),i=ne(i,r,n,o,e[s+15],10,-30611744),o=ne(o,i,r,n,e[s+6],15,-1560198380),n=ne(n,o,i,r,e[s+13],21,1309151649),r=ne(r,n,o,i,e[s+4],6,-145523070),i=ne(i,r,n,o,e[s+11],10,-1120210379),o=ne(o,i,r,n,e[s+2],15,718787259),n=ne(n,o,i,r,e[s+9],21,-343485551),r=Z(r,a),n=Z(n,u),o=Z(o,c),i=Z(i,l)}return[r,n,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(W(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),o=[],i=32*n.length,s="0123456789abcdef",a=0;a<i;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);o.push(u)}return o});function oe(e,t){return e<<t|e>>>32-t}var n=X("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var o=0;o<n.length;++o)e.push(n.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var p=0;p<s;++p){for(var f=new Uint32Array(80),d=0;d<16;++d)f[d]=a[p][d];for(var h=16;h<80;++h)f[h]=oe(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var y=r[0],v=r[1],m=r[2],g=r[3],E=r[4],w=0;w<80;++w)var T=Math.floor(w/20),T=oe(y,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(T,v,m,g)+E+t[T]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=T;r[0]=r[0]+y>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});var ie,se,ae,ue,ce,le,pe,fe,de,he,ye,ve,me,ge,Ee,we,Te,_e,be,Ae,Ie,Oe,Ne,Re,Ce,Se,xe,Me,ke,Pe,Ue,r=D(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||B,r=void 0!==e.clockseq?e.clockseq:z,s=(null!=i&&null!=r||(s=e.random||(e.rng||j)(),null==i&&(i=B=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=z=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:q+1,u=s-Y+(a-q)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||Y<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Y=s,z=r,u=(1e4*(268435455&(s+=122192928e5))+(q=a))%4294967296,o[n++]=u>>>24&255,o[n++]=u>>>16&255,o[n++]=u>>>8&255,o[n++]=255&u,e=s/4294967296*1e4&268435455,o[n++]=e>>>8&255,o[n++]=255&e,o[n++]=e>>>24&15|16,o[n++]=e>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var c=0;c<6;++c)o[n+c]=i[c];return t||J(o)},v3:r,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||j)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return J(n)},v5:n,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(H(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:H,stringify:J,parse:$})),n={exports:{}},De=(n.exports=(0,qn="function"==typeof atob,h="function"==typeof btoa,y="function"==typeof Buffer,ie="function"==typeof TextDecoder?new TextDecoder:void 0,se="function"==typeof TextEncoder?new TextEncoder:void 0,ae=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ue=function(){var r={};return ae.forEach(function(e,t){return r[e]=t}),r}(),ce=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,le=String.fromCharCode.bind(String),pe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},fe=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},de=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,r,n,o="",i=e.length%3,s=0;s<e.length;){if(255<(t=e.charCodeAt(s++))||255<(r=e.charCodeAt(s++))||255<(n=e.charCodeAt(s++)))throw new TypeError("invalid character found");o+=ae[(t=t<<16|r<<8|n)>>18&63]+ae[t>>12&63]+ae[t>>6&63]+ae[63&t]}return i?o.slice(0,i-3)+"===".substring(i):o},ye=y?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],r=0,n=e.length;r<n;r+=4096)t.push(le.apply(null,e.subarray(r,r+4096)));return he(t.join(""))},me=function(e){var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?le(192|t>>>6)+le(128|63&t):le(224|t>>>12&15)+le(128|t>>>6&63)+le(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),le(240|t>>>18&7)+le(128|t>>>12&63)+le(128|t>>>6&63)+le(128|63&t))},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,we=y?function(e){return Buffer.from(e,"utf8").toString("base64")}:se?function(e){return ye(se.encode(e))}:function(e){return he(Ee(e))},_e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,be=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return le(55296+(t>>>10))+le(56320+(1023&t));case 3:return le((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return le((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},vt=function(e){if(e=e.replace(/\s+/g,""),!ce.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,r,n,o="",i=0;i<e.length;)t=ue[e.charAt(i++)]<<18|ue[e.charAt(i++)]<<12|(r=ue[e.charAt(i++)])<<6|(n=ue[e.charAt(i++)]),o+=64===r?le(t>>16&255):64===n?le(t>>16&255,t>>8&255):le(t>>16&255,t>>8&255,255&t);return o},Oe=y?function(e){return pe(Buffer.from(e,"base64"))}:function(e){return pe(Ie(e).split("").map(function(e){return e.charCodeAt(0)}))},Re=y?function(e){return Buffer.from(e,"base64").toString("utf8")}:ie?function(e){return ie.decode(Oe(e))}:function(e){return Ae(Ie(e))},Ce=function(e){return de(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},xe=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Pe={version:"3.7.5",VERSION:"3.7.5",atob:Ie=qn?function(e){return atob(de(e))}:y?function(e){return Buffer.from(e,"base64").toString("binary")}:vt,atobPolyfill:vt,btoa:he=h?function(e){return btoa(e)}:y?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:Se=function(e){return Re(Ce(e))},toBase64:Te=function(e,t){return(t=void 0===t?!1:t)?fe(we(e)):we(e)},encode:Te,encodeURI:qn=function(e){return Te(e,!0)},encodeURL:qn,utob:Ee=function(e){return e.replace(ge,me)},btou:Ae=function(e){return e.replace(_e,be)},decode:Se,isValid:function(e){if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:ve=function(e,t){return(t=void 0===t?!1:t)?fe(ye(e)):ye(e)},toUint8Array:Ne=function(e){return Oe(Ce(e))},extendString:Me=function(){function e(e,t){Object.defineProperty(String.prototype,e,xe(t))}e("fromBase64",function(){return Se(this)}),e("toBase64",function(e){return Te(this,e)}),e("toBase64URI",function(){return Te(this,!0)}),e("toBase64URL",function(){return Te(this,!0)}),e("toUint8Array",function(){return Ne(this)})},extendUint8Array:ke=function(){function e(e,t){Object.defineProperty(Uint8Array.prototype,e,xe(t))}e("toBase64",function(e){return ve(this,e)}),e("toBase64URI",function(){return ve(this,!0)}),e("toBase64URL",function(){return ve(this,!0)})},extendBuiltins:function(){Me(),ke()},Base64:{}},Object.keys(Pe).forEach(function(e){return Pe.Base64[e]=Pe[e]}),Pe),l.setUserId=void 0,l.sanitizeUser=void 0,l.resolveIdentifiers=void 0,l.removeUserId=void 0,l.getUserId=void 0,l.Version=void 0,l.Variation=void 0,l.TargetingType=void 0,l.TargetRule=void 0,l.TargetMatch=void 0,l.TargetKey=void 0,l.TargetCondition=void 0,l.TargetAction=void 0,l.Target=void 0,l.TARGET_KEY_TYPES=void 0,l.TARGET_ACTION_TYPES=void 0,l.Slot=void 0,l.Segment=void 0,l.SEGMENT_TYPES=void 0,l.RemoteConfigTargetRule=void 0,l.RemoteConfigParameterValue=void 0,l.RemoteConfigParameter=void 0,l.RemoteConfigDecision=void 0,l.PropertyOperationsBuilder=void 0,l.PropertyOperations=void 0,l.ParameterConfiguration=void 0,l.MetaVersion=void 0,l.MATCH_VALUE_TYPES=void 0,l.MATCH_TYPES=void 0,l.MATCH_OPERATORS=void 0,l.Logger=void 0,l.InAppMessageUserOverride=void 0,l.InAppMessageTextStyle=void 0,l.InAppMessageTextAttribute=void 0,l.InAppMessageText=void 0,l.InAppMessageTargetContext=void 0,l.InAppMessagePeriodCustom=void 0,l.InAppMessagePeriodAlways=void 0,l.InAppMessageImage=void 0,l.InAppMessageIdentifierCap=void 0,l.InAppMessageEventTriggerRule=void 0,l.InAppMessageEventTrigger=void 0,l.InAppMessageEventFrequencyCap=void 0,l.InAppMessageDurationCap=void 0,l.InAppMessageDecision=void 0,l.InAppMessageContextMessage=void 0,l.InAppMessageContextLayout=void 0,l.InAppMessageContext=void 0,l.InAppMessageButtonStyle=void 0,l.InAppMessageButton=void 0,l.InAppMessageBackground=void 0,l.InAppMessageAction=void 0,l.InAppMessage=void 0,l.IdentifiersBuilder=void 0,l.IdentifierType=void 0,l.IAM_TIMEUNIT=void 0,l.IAM_STATUS=void 0,l.IAM_PLATFORM_TYPE=void 0,l.IAM_ORIENTATION=void 0,l.IAM_LAYOUT_TYPE=void 0,l.IAM_DISPLAY_TYPE=void 0,l.IAM_BEHAVIOR=void 0,l.IAM_ACTION_TYPE=void 0,l.IAM_ACTION_AREA=void 0,l.FeatureFlagDecision=void 0,l.Experiment=void 0,l.EventType=void 0,l.EmptyParameterConfig=void 0,l.EmptyHackleRemoteConfig=void 0,l.DecisionReason=void 0,l.Decision=void 0,l.CoreVersion=void 0,l.ContainerGroup=void 0,l.Container=void 0,l.Cohort=void 0,l.Bucket=void 0,Object.defineProperty(t,"__esModule",{value:!0}),r),Le=n.exports,a=(Ge.isNotNullOrUndefined=function(e){return null!=e},Ge.isNullOrUndefined=function(e){return null==e},Ge.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},Ge.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r},Ge),p=(ze.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);a.isNotNullOrUndefined(i)&&r.push(i)}return r},ze.mapOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r},ze.associateTo=function(e,t,r){for(var n=0,o=e;n<o.length;n++){var i=r(o[n]);t.set(i[0],i[1])}return t},ze.associate=function(e,t){return this.associateTo(e,new Map,t)},ze.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},ze.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},ze),Fe={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},o=(Be.setLogLevel=function(e){this.logLevel=e=void 0===e?Fe.INFO:e},Be.initCounter=function(t){this.counters=p.associate(Object.keys(Fe),function(e){return[e,t(e)]})},Be._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)je.log(e,r,t.message,t);else try{je.log(e,r,t)}catch(e){}},Be.increment=function(e){var t;null!=(t=null==(t=Be.counters)?void 0:t.get(e))&&t.increment()},Be.logLevel=Fe.INFO,Be.log={error:function(e){Fe.ERROR<=Be.logLevel&&(Be._log("ERROR",e),Be.increment("ERROR"))},warn:function(e){Fe.WARN<=Be.logLevel&&(Be._log("WARN",e),Be.increment("WARN"))},info:function(e){Fe.INFO<=Be.logLevel&&(Be._log("INFO",e),Be.increment("INFO"))},debug:function(e){Fe.DEBUG<=Be.logLevel&&(Be._log("DEBUG",e),Be.increment("DEBUG"))}},Be),je=(He.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},He),Ve=function(e,t){return(Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function He(){}function Be(){}function ze(){}function Ge(){}function Ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ve(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((u=u.apply(e,s||[])).next())})}function u(n,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((a=0<(a=u.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],s=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Je(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var Ye=o.log,qe=(at.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},at.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},at.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],i=o[0],o=o[1];this.isValidType(i)?(o=this.sanitizeValue(o),a.isNullOrUndefined(o)?Ye.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(i,"]")):t[i]=o):Ye.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(i,"]"))}return t},at.isValidType=function(e){return!a.isNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},at.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},at.MAX_IDENTIFIER_TYPE_LENGTH=128,at.MAX_IDENTIFIER_VALUE_LENGTH=512,at),$e=o.log,Xe=(st.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o,i=n[r],s=i[0],i=i[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){$e.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(i,"]"));break}this.isValidKey(s)?(o=this.sanitizeValue(s,i),a.isNullOrUndefined(o)?$e.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(i,"]")):t[s]=o):$e.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},st.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},st.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},st.sanitizeValue=function(e,t){var r=this;return"string"==typeof e&&e.startsWith(this.SYSTEM_PROPERTY_KEY_PREFIX)?t:this.isValidValue(t)?Array.isArray(t)?t.filter(function(e){return r.isValidElement(e)}):t:null},st.isValidValue=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e?!isNaN(e)&&isFinite(e):"boolean"==typeof e||Array.isArray(e))},st.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},st.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},st.SYSTEM_PROPERTY_KEY_PREFIX="$",st.MAX_PROPERTIES_COUNT=128,st.MAX_PROPERTY_KEY_LENGTH=128,st.MAX_PROPERTY_VALUE_LENGTH=1024,st),We=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Ze=(i.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C0);case"seconds":return e/(i.C3/i.C0);case"minutes":return e/(i.C4/i.C0);case"hours":return e/(i.C5/i.C0);case"days":return e/(i.C6/i.C0)}},i.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C1/i.C0);case"milliseconds":return e/(i.C2/i.C1);case"microseconds":return e;case"seconds":return e/(i.C3/i.C1);case"minutes":return e/(i.C4/i.C1);case"hours":return e/(i.C5/i.C1);case"days":return e/(i.C6/i.C1)}},i.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C2/i.C0);case"microseconds":return e*(i.C2/i.C1);case"milliseconds":return e;case"seconds":return e/(i.C3/i.C2);case"minutes":return e/(i.C4/i.C2);case"hours":return e/(i.C5/i.C2);case"days":return e/(i.C6/i.C2)}},i.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C3/i.C0);case"microseconds":return e*(i.C3/i.C1);case"milliseconds":return e*(i.C3/i.C2);case"seconds":return e;case"minutes":return e/(i.C4/i.C3);case"hours":return e/(i.C5/i.C3);case"days":return e/(i.C6/i.C3)}},i.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C4/i.C0);case"microseconds":return e*(i.C4/i.C1);case"milliseconds":return e*(i.C4/i.C2);case"seconds":return e*(i.C4/i.C3);case"minutes":return e;case"hours":return e/(i.C5/i.C4);case"days":return e/(i.C6/i.C4)}},i.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C5/i.C0);case"microseconds":return e*(i.C5/i.C1);case"milliseconds":return e*(i.C5/i.C2);case"seconds":return e*(i.C5/i.C3);case"minutes":return e*(i.C5/i.C4);case"hours":return e;case"days":return e/(i.C6/i.C5)}},i.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(i.C6/i.C0);case"microseconds":return e*(i.C6/i.C1);case"milliseconds":return e*(i.C6/i.C2);case"seconds":return e*(i.C6/i.C3);case"minutes":return e*(i.C6/i.C4);case"hours":return e*(i.C6/i.C5);case"days":return e}},i.C6=24*(i.C5=60*(i.C4=60*(i.C3=1e3*(i.C2=1e3*(i.C1=1e3*(i.C0=1)))))),i.converter={nanoseconds:i.nanosToUnit,microseconds:i.microsToUnit,milliseconds:i.millisToUnit,seconds:i.secondsToUnit,minutes:i.minutesToUnit,hours:i.hoursToUnit,days:i.daysToUnit},i),Qe=(it.prototype.tick=function(){return 1e3*Date.now()},it.prototype.currentMillis=function(){return Date.now()},it.instance=new it,it),et=(ot.prototype.get=function(e,t){return t},ot),tt=(nt.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t},nt),rt=o.log;function nt(e){this.parameters=e}function ot(){}function it(){}function i(){}function st(){}function at(){}function ut(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||rt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function ct(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,o=t;n<o.length;n++){var i=ut(e,o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r}}function lt(e){var t=new At;return t.addIdentifiers(e.identifiers||{}),t.add(bt.ID,e.id),t.add(bt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(bt.USER,e.userId),t.build()}function pt(e){var t,r={};return r.id=null!=(t=qe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=qe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=qe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Xe.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=qe.sanitize(e.identifiers)),Boolean(r.id||r.userId||r.deviceId||r.identifiers&&0<Object.keys(r.identifiers).length)?r:null}sr.of=function(e,t){return new sr(e,t)};var ft=sr,dt=(ir.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},ir.of=function(e,t,r){return new ir(t,r,e)},ir),ht=(or.of=function(e,t,r){return new or(e,t,r=void 0===r?new et:r)},or.prototype.get=function(e,t){return this.config.get(e,t)},or),yt=(nr.on=function(e,t){return new nr(!0,e,t=void 0===t?new et:t)},nr.off=function(e,t){return new nr(!1,e,t=void 0===t?new et:t)},nr.prototype.get=function(e,t){return this.config.get(e,t)},nr),vt=(rr.prototype.get=function(e,t){return t},rr),mt=(tr.fromJson=function(e){return new tr(e.id,new tt(p.associate(e.parameters,function(e){return[e.key,e.value]})))},tr.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}},tr),f=(d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",d),gt=(er.fromJson=function(e,t){var r=er.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new Et(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),o=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),i=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return St.fromJson(e,mr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return It.fromJson(e,mr.PROPERTY)}),a=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return St.fromJson(e,mr.PROPERTY)}),u=Ct.fromJson(t.execution.defaultRule);return r&&u&&new er(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,o,i,s,a,u,t.containerId,t.winnerVariationId)},er.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void rt.debug("Unsupported status [".concat(e,"]"))}},er.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},er.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},er.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},er),Et=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},wt=(Qt.fromJson=function(e){return new Qt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Tt(t,r,e)}))},Qt),Tt=(Zt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},Zt),_t=(Wt.fromJson=function(e){return new Wt(e.id,e.key)},Wt),bt=(Xt.ID="$id",Xt.USER="$userId",Xt.DEVICE="$deviceId",Xt.SESSION="$sessionId",Xt.HACKLE_DEVICE="$hackleDeviceId",Xt),At=($t.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},$t.prototype.add=function(e,t){var r=qe.sanitizeValue(t);return qe.isValidType(e)&&r?this.identifiers[e]=t:rt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},$t.prototype.build=function(){return this.identifiers},$t),It=(qt.fromJson=function(e,t){return new qt(p.mapNotNullOrUndefined(e.conditions,function(e){return Ot.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},qt),Ot=(Yt.fromJson=function(e,t){var r=Nt.fromJson(e.key);if(r&&t.supports(r.type))return(t=Rt.fromJson(e.match))&&new Yt(r,t)},Yt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},Yt),Nt=(Jt.fromJson=function(e){var t=ut(yr,e.type);return t&&new Jt(t,e.name)},Jt.prototype.toJson=function(){return{type:this.type,name:this.name}},Jt),Rt=(Kt.fromJson=function(e){var t=ut(pr,e.type),r=ut(dr,e.operator),n=ut(fr,e.valueType);return t&&r&&n&&new Kt(t,r,n,e.values)},Kt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},Kt),Ct=(Gt.fromJson=function(e){var t=ut(hr,e.type);return t&&new Gt(t,e.variationId,e.bucketId)},Gt),St=(zt.fromJson=function(e,t){t=It.fromJson(e.target,t),e=Ct.fromJson(e.action);return t&&e&&new zt(t,e)},zt),xt=(Bt.fromJson=function(e){var t=ut(vr,e.type);return t&&new Bt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.SEGMENT)}))},Bt),Mt=(Ht.fromJson=function(e){return new Ht(e.id,e.bucketId,e.groups.map(function(e){return kt.fromJson(e)}))},Ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},Ht),kt=(Vt.fromJson=function(e){return new Vt(e.id,e.experiments)},Vt),Pt=(jt.fromJson=function(e){var t=ut(fr,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Ut.fromJson(e,mr.PROPERTY)}),n=Dt.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)},jt),Ut=(Ft.fromJson=function(e,t){t=It.fromJson(e.target,t);return t&&new Ft(e.key,e.name,t,e.bucketId,Dt.fromJson(e.value))},Ft),Dt=(Lt.fromJson=function(e){return new Lt(e.id,e.value)},Lt);function Lt(e,t){this.id=e,this.rawValue=t}function Ft(e,t,r,n,o){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=o}function jt(e,t,r,n,o,i){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=o,this.defaultValue=i}function Vt(e,t){this.id=e,this.experiments=t}function Ht(e,t,r){this.id=e,this.bucketId=t,this.groups=r}function Bt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function zt(e,t){this.target=e,this.action=t}function Gt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}function Kt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}function Jt(e,t){this.type=e,this.name=t}function Yt(e,t){this.key=e,this.match=t}function qt(e){this.conditions=e}function $t(){this.identifiers={}}function Xt(){}function Wt(e,t){this.id=e,this.key=t}function Zt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}function Qt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}function er(e,t,r,n,o,i,s,a,u,c,l,p,f,d,h){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=o,this.version=i,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.targetRules=p,this.defaultRule=f,this.containerId=d,this.winnerVariationId=h}function d(){}function tr(e,t){this.id=e,this.config=t}function rr(){}function nr(e,t,r){this.isOn=e,this.reason=t,this.config=r}function or(e,t,r){this.variation=e,this.reason=t,this.config=r}function ir(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}function sr(e,t){this.value=e,this.reason=t}function ar(e){this.id=e}gn.tryParse=function(e){var t,r,n,o,e=gn.regExp.exec(e);if(e)return e[0],t=e[1],r=void 0===(r=e[2])?"0":r,n=void 0===(n=e[3])?"0":n,o=e[4],e=e[5],new gn(new cr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),lr.parse(o),lr.parse(e))},gn.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},gn.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},gn.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},gn.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},gn.prototype.isLessThan=function(e){return this.compareTo(e)<0},gn.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},gn.regExp=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;var ur=gn,cr=(mn.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},mn),lr=(vn.parse=function(e){return e?new vn(e.split(".")):vn.EMPTY},vn.prototype.isEmpty=function(){return 0===this.identifiers.length},vn.prototype.isNotEmpty=function(){return!this.isEmpty()},vn.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},vn.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=vn.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},vn.compareIdentifiers=function(e,t){return vn.numericIdentifierRegExp.test(e)&&vn.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},vn.EMPTY=new vn([]),vn.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,vn),pr=["MATCH","NOT_MATCH"],fr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","NULL","UNKNOWN"],dr=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],hr=["VARIATION","BUCKET"],yr=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],vr=["USER_ID","USER_PROPERTY"],mr=(yn.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},yn.IDENTIFIER=new yn("SEGMENT"),yn.PROPERTY=new yn("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),yn.SEGMENT=new yn("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),yn),gr=["ACTIVE","DRAFT","PAUSE"],Er=["WEB","ANDROID","IOS"],wr=["IMMEDIATE","CUSTOM"],Tr=["MODAL"],_r=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],br=["VERTICAL","HORIZONTAL"],Ar=["CLICK"],Ir=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Or=(hn.fromJson=function(e){var t,r=ut(gr,e.status);if(!a.isNullOrUndefined(r)){switch(ut(wr,e.timeUnit)){case"IMMEDIATE":t=new Nr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Rr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,o,i=Dr.fromJson(e.messageContext);if(!a.isNullOrUndefined(i))return n=e.eventTriggerRules.map(Sr.fromJson),o=xr.fromJson(e.eventFrequencyCap),new hn(e.id,e.key,r,t,new Cr(n,o),Pr.fromJson(e.targetContext),i)}},hn.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},hn),Nr=(dn.prototype.within=function(e){return!0},dn),Rr=(fn.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},fn),Cr=function(e,t){this.rules=e,this.frequencyCap=t},Sr=(pn.fromJson=function(e){return new pn(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.PROPERTY)}))},pn),xr=(ln.fromJson=function(e){return e?new ln(e.identifiers.map(Mr.fromJson),kr.fromJson(e.duration)):null},ln),Mr=(cn.fromJson=function(e){return new cn(e.identifierType,e.countPerIdentifier)},cn),kr=(un.fromJson=function(e){if(!e)return null;var t=ut(We,e.durationUnit.timeUnit);return t?new un(Ze.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},un),Pr=(an.fromJson=function(e){return new an(e.overrides.map(Ur.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return It.fromJson(e,mr.PROPERTY)}))},an),Ur=(sn.fromJson=function(e){return new sn(e.identifierType,e.identifiers)},sn),Dr=(on.fromJson=function(e){var t=ct(Er,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=ct(br,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,Lr.fromJson);if(!a.isNullOrUndefined(n))return new on(e.defaultLang,t,r,n)}}},on),Lr=(nn.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,jr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,zr.fromJson);if(!a.isNullOrUndefined(n)){var o=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(o=zr.fromJson2(e.closeButton),!a.isNullOrUndefined(o)))return new nn(e.lang,t,r,e.text?Vr.fromJson(e.text):void 0,n,o,new Kr(e.background.color))}}}},nn.prototype.toJson=function(){var e;return{lang:this.lang,layout:{layoutType:this.layout.layoutType,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color}}},nn),Fr=(rn.fromJson=function(e){var t=ut(_r,e.layoutType),e=ut(Tr,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new rn(e,t)},rn),jr=(tn.fromJson=function(e){var t=ut(br,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=Jr.fromJson(e.action),!a.isNullOrUndefined(r)))return new tn(t,e.imagePath,r)}},tn.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}},tn),Vr=(en.fromJson=function(e){return new en(Hr.fromJson(e.title),Hr.fromJson(e.body))},en.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}},en),Hr=(Qr.fromJson=function(e){return new Qr(e.text,new Br(e.style.textColor))},Qr),Br=function(e){this.color=e},zr=(Zr.fromJson=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Zr(e.text,new Gr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Zr.fromJson2=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Zr("✕",new Gr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Zr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},Zr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Zr),Gr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Kr=function(e){this.color=e},Jr=(Wr.fromJson=function(e){var t=ut(Ar,e.behavior);if(!a.isNullOrUndefined(t)){var r=ut(Ir,e.type);if(!a.isNullOrUndefined(r))return new Wr(t,r,null!=(t=e.value)?t:void 0)}},Wr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Wr),Yr=(Xr.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Xr.prototype.tag=function(e,t){return this._tags[e]=t,this},Xr.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Xr),qr=($r.start=function(e){return new $r(e=void 0===e?$r.defaultClock:e)},$r.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},$r.defaultClock=new Qe,$r);function $r(e){this._clock=e,this.startTime=this._clock.tick()}function Xr(e){this.name=e,this._tags={},this.name=e}function Wr(e,t,r){this.behavior=e,this.type=t,this.value=r}function Zr(e,t,r){this.text=e,this.style=t,this.action=r}function Qr(e,t){this.text=e,this.style=t}function en(e,t){this.title=e,this.body=t}function tn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function rn(e,t){this.displayType=e,this.layoutType=t}function nn(e,t,r,n,o,i,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=o,this.closeButton=i,this.background=s}function on(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function sn(e,t){this.identifierType=e,this.identifiers=t}function an(e,t){this.overrides=e,this.targets=t}function un(e,t){this.durationMillis=e,this.count=t}function cn(e,t){this.identifierType=e,this.count=t}function ln(e,t){this.identifierCaps=e,this.durationCap=t}function pn(e,t){this.eventKey=e,this.targets=t}function fn(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function dn(){this.type="IMMEDIATE"}function hn(e,t,r,n,o,i,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=o,this.targetContext=i,this.messageContext=s}function yn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function vn(e){this.identifiers=e}function mn(e,t,r){this.major=e,this.minor=t,this.patch=r}function gn(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}wn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},wn.prototype.tag=function(e,t){return this._tags[e]=t,this},wn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var En=wn;function wn(e){this.name=e,this._tags={}}Object.defineProperty(_n.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Tn=_n;function _n(e,t){this.valueSupplier=t,this.field=e}function bn(e,t){return e.name===t.name&&qe.isEquals(e.tags,t.tags)}Mn.prototype.count=function(){return this.counterValue},Mn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Mn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]};var An,In=Mn,On=(xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new In(this.id),e},xn.prototype.count=function(){return this.currentCounter.count()},xn.prototype.increment=function(e){this.currentCounter.increment(e)},xn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},xn),Nn=(Sn.prototype.values=function(){return Array.from(this.data.values())},Sn.prototype.keys=function(){return Array.from(this.data.keys())},Sn.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},Sn.prototype.has=function(e){return void 0!==this.get(e)},Sn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Sn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Sn.prototype.forEach=function(e){this.data.forEach(e)},Sn.prototype.filter=function(e){for(var t=new Sn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var o=n[r];e(o[0],o[1])&&t.add(o[0],o[1])}return t},Sn.prototype.entries=function(){return Array.from(this.data.entries())},Sn),h=(Object.defineProperty(Cn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Cn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Cn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Cn.prototype.counter=function(e,t){return void 0===t&&(t={}),new En(e).tags(t).register(this)},Cn.prototype.timer=function(e,t){return void 0===t&&(t={}),new Yr(e).tags(t).register(this)},Cn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Cn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Cn.prototype.close=function(){},Cn),y=(Ke(Rn,An=h),Rn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),o.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Rn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),o.log.debug("PushMetricRegistry stopped.")},Rn.prototype.close=function(){this.stop()},Rn);function Rn(e,t){var r=An.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}function Cn(){this.id=De.v4(),this.name="MetricRegistry",this._metrics=new Nn(bn)}function Sn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function xn(e){this.id=e,this.currentCounter=new In(e)}function Mn(e){this.counterValue=0,this.id=e}Bn.prototype.count=function(){return this._count},Bn.prototype.totalTime=function(e){return Ze.nanosToUnit(this._total,e)},Bn.prototype.max=function(e){return Ze.nanosToUnit(this._max,e)},Bn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Bn.prototype.record=function(e,t){e<0||(t=Ze.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Bn.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]};var kn,Pn=Bn,Un=(Hn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Pn(this.id),e},Hn.prototype.count=function(){return this.currentTimer.count()},Hn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Hn.prototype.max=function(e){return this.currentTimer.max(e)},Hn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Hn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Hn.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Hn),v=(Ke(Vn,kn=y),Vn.prototype.createCounter=function(e){return new On(e)},Vn.prototype.createTimer=function(e){return new Un(e)},Vn.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(t,e)},Vn.prototype.close=function(){kn.prototype.close.call(this)},Vn),Dn=(jn.prototype.count=function(){return 0},jn.prototype.increment=function(e){},jn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},jn),Ln=(Object.defineProperty(Fn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),Fn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},Fn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},Fn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},Fn.prototype.measure=function(){return[new Tn("count",this.count.bind(this))]},Fn);function Fn(e){this._counters=new Nn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Dn(e)}function jn(e){this.id=e}function Vn(e,t){return kn.call(this,e,t)||this}function Hn(e){this.id=e,this.currentTimer=new Pn(e)}function Bn(e){this._count=0,this._total=0,this._max=0,this.id=e}Io.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Io.prototype.count=function(){return 0},Io.prototype.totalTime=function(e){return 0},Io.prototype.max=function(e){return 0},Io.prototype.mean=function(e){return 0},Io.prototype.record=function(e,t){};var zn,Gn,Kn,Jn=Io,Yn=(Object.defineProperty(Ao.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Ao.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Ao.prototype.max=function(e){return this.firstTimer.max(e)},Ao.prototype.mean=function(e){return this.firstTimer.mean(e)},Ao.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Ao.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Ao.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Ao.prototype.count=function(){return this.firstTimer.count()},Ao.prototype.measure=function(){var e=this;return[new Tn("count",this.count.bind(this)),new Tn("total",function(){return e.totalTime("milliseconds")}),new Tn("max",function(){return e.max("milliseconds")}),new Tn("mean",function(){return e.mean("milliseconds")})]},Ao),qn=(Ke(bo,Kn=h),bo.prototype.createCounter=function(e){e=new Ln(e);return this.addRegistry(e),e},bo.prototype.createTimer=function(e){e=new Yn(e);return this.addRegistry(e),e},bo.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},bo.prototype.add=function(t){t instanceof bo||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},bo.prototype.close=function(){this.registries.forEach(function(e){e.close()})},bo),$n=(_o.counter=function(e,t){return _o.globalRegistry.counter(e,t)},_o.timer=function(e,t){return _o.globalRegistry.timer(e,t)},_o.addRegistry=function(e){_o.globalRegistry.add(e),o.log.debug("MetricRegistry added ".concat(e.name))},_o.globalRegistry=new qn,_o),Xn=(To.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},To),Wn=(wo.builder=function(){return new Zn},wo.get=function(e){return wo.builder().url(e).build()},wo.prototype.toBuilder=function(){return new Zn(this)},wo),Zn=(Eo.prototype.url=function(e){return this._url=e,this},Eo.prototype.method=function(e){return this._method=e,this},Eo.prototype.body=function(e){return this._body=e,this},Eo.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Eo.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Eo.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Wn(this._url,this._method,this._body,this._headers.build(),e)},Eo),Qn=(go.ok=function(e,t){return go.of(200,e,t)},go.of=function(e,t,r){return new go(e,null!=t?t:null,null!=r?r:eo.empty())},go.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},go.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},go.prototype.isNotModified=function(){return 304===this.statusCode},go),eo=(mo.empty=function(){return new mo(new Map)},mo.builder=function(){return new to(new Map)},mo.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],o=n[0],n=n[1];if(Xn.equalsIgnoreCase(o,e))return n}return null},mo.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},mo.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},mo.prototype.toBuilder=function(){return new to(this.headers)},mo.IF_MODIFIED_SINCE="If-Modified-Since",mo.LAST_MODIFIED="Last-Modified",mo),to=(vo.prototype.add=function(e,t){return this.headers.set(e,t),this},vo.prototype.build=function(){return new eo(this.headers)},vo),ro=(Ke(yo,Gn=v),yo.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){r.dispatch(e,t)})},yo.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},yo.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return o.log.debug("Failed to flushing metrics: ".concat(e))})},yo.prototype.createRequest=function(e){return Wn.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},yo.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},yo.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},yo.prototype.createCounter=function(e){return new On(e)},yo.prototype.createTimer=function(e){return new Un(e)},yo.prototype.close=function(){Gn.prototype.close.call(this)},yo),no=(ho.experiment=function(e,t,r){t=$n.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},ho.featureFlag=function(e,t,r){t=$n.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},ho.remoteConfig=function(e,t,r){t=$n.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},ho.inAppMessage=function(e,t,r){t=$n.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},ho),oo=(fo.record=function(e,t,r){e=$n.timer("api.call",{operation:e,success:fo.success(r)});t.stop(e)},fo.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},fo),io=(po.decide=function(e,t,r,n){if(a.isNullOrUndefined(r))return this.decision(e,t,"NULL",r,n);switch(typeof r){case"string":return this.decision(e,t,"STRING",r,n);case"number":return this.decision(e,t,"NUMBER",r,n);case"boolean":return this.decision(e,t,"BOOLEAN",r,n);default:return this.decision(e,t,"UNKNOWN",r,n)}},po.decision=function(e,t,r,n,o){return a.isNullOrUndefined(t)?ft.of(n,f.INVALID_INPUT):e.remoteConfig(t,o,r,n)},po),so=o.log,ao=(lo.prototype.get=function(e,t){var r,n=qr.start();try{r=this.decide(e,t)}catch(n){so.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=ft.of(t,f.EXCEPTION)}return no.remoteConfig(n,e,r),r.value},lo.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return io.decide(this.core,e,t,r)},lo),uo=(co.prototype.contains=function(e){return this._properties.has(e)},co.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},co.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},co.prototype.add=function(e,t,r){if((r=void 0===r?!1:r)&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;r=Xe.sanitizeValue(e,t);return r&&this._properties.set(e,r),this},co.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},co.prototype.build=function(){return this._properties},co);function co(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function lo(e,t,r){this.core=e,this.userManager=t,this.user=r}function po(){}function fo(){}function ho(){}function yo(e,t,r,n,o){n=Gn.call(this,n,o)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}function vo(e){this.headers=e}function mo(e){this.headers=e}function go(e,t,r){this.statusCode=e,this.body=t,this.headers=r}function Eo(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:eo.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}function wo(e,t,r,n,o){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=o}function To(){}function _o(){}function bo(){var e=null!==Kn&&Kn.apply(this,arguments)||this;return e.registries=new Nn(function(e,t){return e.id===t.id}),e}function Ao(e){this._timers=new Nn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Jn(e)}function Io(e){this.id=e}(r=zn=zn||{}).SET="$set",r.SET_ONCE="$setOnce",r.UNSET="$unset",r.INCREMENT="$increment",r.APPEND="$append",r.APPEND_ONCE="$appendOnce",r.PREPEND="$prepend",r.PREPEND_ONCE="$prependOnce",r.REMOVE="$remove",r.CLEAR_ALL="$clearAll";vi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new uo).addProperties(e).addProperties(t).build()};var Oo,No,Ro,Co,So,xo=vi,Mo=(yi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new uo).addProperties(e).addProperties(t,!0).build()},yi),ko=(hi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new uo).addProperties(e).remove(t).build()},hi),Po=(di.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new uo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},di.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},di),n=(fi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new uo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},fi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},fi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},fi.prototype.contains=function(e,t){return e.includes(t)},fi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Je([e],t,!0)},fi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Je(Je([],e,!0),[t],!1)},fi),Uo=(Ke(pi,So=n),pi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)},pi),Do=(Ke(li,Co=n),li.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},li.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},li),Lo=(Ke(ci,Ro=n),ci.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},ci),Fo=(Ke(ui,No=n),ui.prototype.operateArray=function(e,t){var r=this;return t.reduce(this.appendOnce.bind(this),[]).reduceRight(function(e,t){return r.prependOnce.bind(r)(t,e)},e)},ui.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},ui.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},ui),jo=(Ke(ai,Oo=n),ai.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},ai.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},ai),Vo=(si.prototype.operate=function(e,t){return new Map},si),Ho=(ii.get=function(e){switch(e){case zn.SET:return new xo;case zn.SET_ONCE:return new Mo;case zn.UNSET:return new ko;case zn.INCREMENT:return new Po;case zn.APPEND:return new Uo;case zn.APPEND_ONCE:return new Do;case zn.PREPEND:return new Lo;case zn.PREPEND_ONCE:return new Fo;case zn.CLEAR_ALL:return new Vo;case zn.REMOVE:return new jo}},ii),Bo=(oi.prototype.set=function(e,t){return this.add(zn.SET,e,t)},oi.prototype.setOnce=function(e,t){return this.add(zn.SET_ONCE,e,t)},oi.prototype.unset=function(e){return this.add(zn.UNSET,e,"-")},oi.prototype.increment=function(e,t){return this.add(zn.INCREMENT,e,t)},oi.prototype.append=function(e,t){return this.add(zn.APPEND,e,t)},oi.prototype.appendOnce=function(e,t){return this.add(zn.APPEND_ONCE,e,t)},oi.prototype.prepend=function(e,t){return this.add(zn.PREPEND,e,t)},oi.prototype.prependOnce=function(e,t){return this.add(zn.PREPEND_ONCE,e,t)},oi.prototype.remove=function(e,t){return this.add(zn.REMOVE,e,t)},oi.prototype.clearAll=function(){return this.add(zn.CLEAR_ALL,"clearAll","-")},oi.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new zo(new Map(e))},oi.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},oi.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new uo);e=this.operations.get(e);return null!=e&&e.add(t,r),this},oi),zo=(ni.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Ho.get(t).operate(r,e)}),r},ni.prototype.toEvent=function(){var o={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;o.properties=c(c({},o.properties),((r={})[t]=c(c({},null==(n=o.properties)?void 0:n[t]),Xe.sanitize(a.fromMap(e))),r))}),o},ni.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n},ni),Go=(ri.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})},ri),Ko=o.log,Jo=(m.prototype.initialize=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Ko.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Ko.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Ko.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},m.prototype.getSessionId=function(){return this.sessionManager.sessionId},m.prototype.getUser=function(){return this.userManager.currentUser},m.prototype.setUser=function(e){try{var t=pt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(Ko.warn("invalid user"),Promise.resolve())}catch(e){return Ko.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},m.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=qe.sanitizeValue(e);if(!t)return Ko.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return Ko.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},m.prototype.setDeviceId=function(e){try{var t=qe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(Ko.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return Ko.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},m.prototype.setUserProperty=function(e,t){e=(new Bo).set(e,t).build();return this.updateUserProperties(e)},m.prototype.setUserProperties=function(e){try{var t=Xe.sanitize(e),r=new Bo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return Ko.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},m.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return Ko.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},m.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new Bo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return Ko.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},m.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},m.prototype.variationDetail=function(r,n,e){var o=e||"A",e=qr.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,o)}catch(e){return Ko.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(o,"] : ").concat(e)),ht.of(o,f.EXCEPTION)}}(this);return no.experiment(e,r,t),t},m.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},m.prototype.featureFlagDetail=function(r,n){var e=qr.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Ko.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),yt.off(f.EXCEPTION)}}(this);return no.featureFlag(e,r,t),t},m.prototype.track=function(e,t){try{Ko.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Ko.error("Unexpected exception while tracking event: ".concat(e))}},m.prototype.trackPageView=function(e){Ko.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},m.prototype.remoteConfig=function(e){return new ao(this.core,this.userManager,e)},m.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},m.prototype.onInitialized=function(r){var n;return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Go.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),Ko.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},m.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},m.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Ko.debug("UserExplorer opened."),$n.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Ko.error("UserExplorer is not provided")},m.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Ko.warn("There is no active HackleDevtools.")},m.prototype.close=function(){Ko.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},m),Yo=o.log,qo=(ti.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user}},o=this.invocationProcessor.process(n);if(!o)throw new Error("invoke result data not exists");switch(r){case"number":return Number(o);case"boolean":return Boolean(o);default:return o}}catch(r){return Yo.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},ti),$o=(ei.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},ei.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")},ei),Xo=(Qo.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},Qo.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},Qo.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},Qo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",o="",i="",s="",a=(r.isCrossSubdomain&&(n=(a=Qo.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),o="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(i+="; secure"),e+"="+encodeURIComponent(t)+o+"; path=/"+n+s+i);return document.cookie=a},Qo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Qo.prototype.getOptions=function(){return this.options},Qo.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),Qo.storage=Qo.storage?Qo.storage:new Qo(e)},Qo),Wo=(Zo.initialize=function(){Xo.getInstance().getItem("_hackle_hid")||wi()},Zo);function Zo(){}function Qo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function ei(){}function ti(e,t){this.invocationProcessor=e,this.user=t}function m(e,t,r,n,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=o,this.initialized=!1,this.initialization=this.initialize()}function ri(){}function ni(e){this.operations=null!=e?e:new Map}function oi(){this.operations=new Map}function ii(){}function si(){}function ai(){return null!==Oo&&Oo.apply(this,arguments)||this}function ui(){return null!==No&&No.apply(this,arguments)||this}function ci(){return null!==Ro&&Ro.apply(this,arguments)||this}function li(){return null!==Co&&Co.apply(this,arguments)||this}function pi(){return null!==So&&So.apply(this,arguments)||this}function fi(){}function di(){}function hi(){}function yi(){}function vi(){}function mi(){var e=Xo.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||wi()}function gi(e){Xo.getInstance().setItem("_hackle_id",e)}function Ei(){Xo.getInstance().removeItem("_hackle_id")}function wi(){var e=De.v4();return Xo.getInstance().setItem("_hackle_hid",e),e}bi.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},bi.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Ti=bi,_i=o.log;function bi(e){this.invocator=e}function Ai(e){return e&&e.Math==Math&&e}function g(e){try{return!!e()}catch(e){return!0}}w.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:mi()}catch(e){return _i.error("Unexpected exception while get sessionId: ".concat(e)),mi()}},w.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=pt(t))?e:this.defaultUser()}catch(e){return _i.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},w.prototype.setUser=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=pt(n)))return _i.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set user: ".concat(e))}return[2]})})},w.prototype.setUserId=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return _i.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},w.prototype.setDeviceId=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return _i.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},w.prototype.setUserProperty=function(r,n){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},w.prototype.setUserProperties=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){try{t=Xe.sanitize(n),r=new Bo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){_i.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},w.prototype.updateUserProperties=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},w.prototype.resetUser=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){_i.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},w.prototype.variation=function(e,t,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},o=this.invocationProcessor.process(n);if(o)return o;throw new Error("invoke result data not exists")}catch(t){return _i.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),r}},w.prototype.variationDetail=function(e,t,r){var n;void 0===r&&(r="A");try{var o={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},i=this.invocationProcessor.process(o);if(null===i)throw new Error("invoke result data not exists");return ht.of(i.variation,i.reason,new tt(new Map(Object.entries(null!=(n=i.config.parameters)?n:{}))))}catch(t){return _i.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),ht.of(r,f.EXCEPTION)}},w.prototype.isFeatureOn=function(e,t){try{var r={command:"isFeatureOn",parameters:{featureKey:e,user:this.convertUser(t)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(t){return _i.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),!1}},w.prototype.featureFlagDetail=function(e,t){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:e,user:this.convertUser(t)}},o=this.invocationProcessor.process(n);if(null===o)throw new Error("invoke result data not exists");return new yt(o.isOn,o.reason,new tt(new Map(Object.entries(null!=(r=o.config.parameters)?r:{}))))}catch(t){return _i.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),yt.off(f.EXCEPTION)}},w.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){_i.error("Unexpected exception while tracking event: ".concat(e))}},w.prototype.trackPageView=function(e){_i.info("Web to app integration feature is not support 'trackPageView' method")},w.prototype.remoteConfig=function(e){return new qo(this.invocationProcessor,this.convertUser(e))},w.prototype.onReady=function(e,t){e()},w.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){_i.error("Unexpected exception while show userExplorer: ".concat(e))}},w.prototype.hideUserExplorer=function(){_i.info("Web to app integration feature is not support 'hideUserExplorer' method")},w.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},w.prototype.close=function(){_i.info("Web to app integration feature is not support 'close' method")},w.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},w.prototype.convertUser=function(e){return"string"==typeof e?e:e&&null!=(e=pt(e))?e:void 0},w.prototype.defaultUser=function(){return{deviceId:mi()}};var Ii=w,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},h=Ai("object"==typeof globalThis&&globalThis)||Ai("object"==typeof window&&window)||Ai("object"==typeof self&&self)||Ai("object"==typeof y&&y)||function(){return this}()||Function("return this")(),qn={},v=!g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),r=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Oi=Function.prototype.call,n=r?Oi.bind(Oi):function(){return Oi.apply(Oi,arguments)},e={},y={}.propertyIsEnumerable,Ni=Object.getOwnPropertyDescriptor,E=Ni&&!y.call({1:2},1);function w(e){this.invocationProcessor=e}e.f=E?function(e){e=Ni(this,e);return!!e&&e.enumerable}:y;function Ri(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Ci(e){return qi(Yi(e),8,-1)}function Si(e){if(null==e)throw Zi("Can't call method on "+e);return e}function xi(e){return Qi(es(e))}function T(e){return"function"==typeof e}function Mi(e){return"object"==typeof e?null!==e:ts(e)}function ki(e,t){return arguments.length<2?(r=rs[e],ns(r)?r:void 0):rs[e]&&rs[e][t];var r}function Pi(e){try{return hs(e)}catch(e){return"Object"}}function Ui(e){if(ys(e))return e;throw ms(vs(e)+" is not a function")}function Di(e,t){return null==(e=e[t])?void 0:gs(e)}function Li(t,r){try{As(bs,t,{value:r,configurable:!0,writable:!0})}catch(e){bs[t]=r}return r}function Fi(e){return Rs(Ns(e))}function ji(e){return"Symbol("+(void 0===e?"":e)+")_"+ks(++xs+Ms,36)}function Vi(e){var t;return Us(js,e)&&(Ls||"string"==typeof js[e])||(t="Symbol."+e,Ls&&Us(Vs,e)?js[e]=Vs[e]:js[e]=(Fs&&Hs?Hs:Bs)(t)),js[e]}function Hi(e){return e=function(e,t){if(!Gs(e)||Ks(e))return e;var r=Js(e,$s);if(r){if(r=zs(r,e,t=void 0===t?"default":t),!Gs(r)||Ks(r))return r;throw qs("Can't convert object to primitive value")}return Ys(e,t=void 0===t?"number":t)}(e,"string"),Xs(e)?e:e+""}function Bi(e){return Zs?Ws.createElement(e):{}}function zi(e){if(ua(e))return e;throw la(ca(e)+" is not an object")}var E=r,y=Function.prototype,Gi=y.bind,Ki=y.call,Ji=E&&Gi.bind(Ki,Ki),y=E?function(e){return e&&Ji(e)}:function(e){return e&&function(){return Ki.apply(e,arguments)}},Gi=y,Yi=Gi({}.toString),qi=Gi("".slice),E=g,$i=Ci,Xi=Object,Wi=y("".split),Gi=E(function(){return!Xi("z").propertyIsEnumerable(0)})?function(e){return"String"==$i(e)?Wi(e,""):Xi(e)}:Xi,Zi=TypeError,Qi=Gi,es=Si,ts=T,rs=h,ns=T,E=y({}.isPrototypeOf),os=ki("navigator","userAgent")||"",is=os,ss=h.process,as=h.Deno,ss=ss&&ss.versions||as&&as.version,as=ss&&ss.v8,ss=ds=!(ds=as?0<(_=as.split("."))[0]&&_[0]<4?1:+(_[0]+_[1]):ds)&&is&&(!(_=is.match(/Edge\/(\d+)/))||74<=_[1])&&(_=is.match(/Chrome\/(\d+)/))?+_[1]:ds,us=ss,as=g,is=!!Object.getOwnPropertySymbols&&!as(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&us&&us<41}),_=is&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,cs=ki,ls=T,ps=E,fs=Object,ds=_?function(e){return"symbol"==typeof e}:function(e){var t=cs("Symbol");return ls(t)&&ps(t.prototype,fs(e))},hs=String,ys=T,vs=Pi,ms=TypeError,gs=Ui,Es=n,ws=T,Ts=Mi,_s=TypeError,as={exports:{}},bs=h,As=Object.defineProperty,Is=Li,Is=h["__core-js_shared__"]||Is("__core-js_shared__",{}),Os=Is,Ns=((as.exports=function(e,t){return Os[e]||(Os[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Si),Rs=Object,Cs=Fi,Ss=y({}.hasOwnProperty),b=Object.hasOwn||function(e,t){return Ss(Cs(e),t)},A=y,xs=0,Ms=Math.random(),ks=A(1..toString),A=h,Ps=as.exports,Us=b,Ds=ji,Ls=is,Fs=_,js=Ps("wks"),Vs=A.Symbol,Hs=Vs&&Vs.for,Bs=Fs?Vs:Vs&&Vs.withoutSetter||Ds,zs=n,Gs=Mi,Ks=ds,Js=Di,Ys=function(e,t){var r,n;if("string"===t&&ws(r=e.toString)&&!Ts(n=Es(r,e)))return n;if(ws(r=e.valueOf)&&!Ts(n=Es(r,e)))return n;if("string"!==t&&ws(r=e.toString)&&!Ts(n=Es(r,e)))return n;throw _s("Can't convert object to primitive value")},qs=TypeError,$s=Vi("toPrimitive"),Xs=ds,is=Mi,Ws=h.document,Zs=is(Ws)&&is(Ws.createElement),Qs=Bi,_=!v&&!g(function(){return 7!=Object.defineProperty(Qs("div"),"a",{get:function(){return 7}}).a}),ea=n,ta=e,ra=Ri,na=xi,oa=Hi,ia=b,sa=_,aa=Object.getOwnPropertyDescriptor,Ps=(qn.f=v?aa:function(e,t){if(e=na(e),t=oa(t),sa)try{return aa(e,t)}catch(e){}if(ia(e,t))return ra(!ea(ta.f,e,t),e[t])},{}),A=v&&g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),ua=Mi,ca=String,la=TypeError,pa=_,fa=zi,da=Hi,ha=TypeError,ya=Object.defineProperty,va=Object.getOwnPropertyDescriptor,ma=(Ps.f=v?A?function(e,t,r){var n;return fa(e),t=da(t),fa(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=va(e,t))&&n.writable&&(e[t]=r.value,r={configurable:("configurable"in r?r:n).configurable,enumerable:("enumerable"in r?r:n).enumerable,writable:!1}),ya(e,t,r)}:ya:function(e,t,r){if(fa(e),t=da(t),fa(r),pa)try{return ya(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ha("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ps),ga=Ri,Ds=v?function(e,t,r){return ma.f(e,t,ga(1,r))}:function(e,t,r){return e[t]=r,e},ds={exports:{}},is=v,e=b,_=Function.prototype,Ea=is&&Object.getOwnPropertyDescriptor,e=e(_,"name"),e={EXISTS:e,PROPER:e&&"something"===function(){}.name,CONFIGURABLE:e&&(!is||Ea(_,"name").configurable)},is=T,Ea=Is,wa=y(Function.toString);is(Ea.inspectSource)||(Ea.inspectSource=function(e){return wa(e)});function Ta(e){return ja[e]||(ja[e]=Fa(e))}function _a(e,t,r,n){var o=(n=n||{}).enumerable,i=void 0!==n.name?n.name:t;if(tu(r)&&nu(r,i,n),n.global)o?e[t]=r:ou(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:ru.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ba(e){return(e=+e)!=e||0==e?0:au(e)}function Aa(e,t){return(e=uu(e))<0?cu(e+t,0):lu(e,t)}function I(e){return 0<(e=e.length)?fu(pu(e),9007199254740991):0}function Ia(a){return function(e,t,r){var n,o=du(e),i=yu(o),s=hu(r,i);if(a&&t!=t){for(;s<i;)if((n=o[s++])!=n)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===t)return a||s||0;return!a&&-1}}function Oa(e,t){var r,n=mu(e),o=0,i=[];for(r in n)!vu(Eu,r)&&vu(n,r)&&wu(i,r);for(;t.length>o;)!vu(n,r=t[o++])||~gu(i,r)||wu(i,r);return i}function Na(e,t,r){for(var n=Ru(t),o=Su.f,i=Cu.f,s=0;s<n.length;s++){var a=n[s];Nu(e,a)||r&&Nu(r,a)||o(e,a,i(t,a))}}function Ra(e,t){return(e=Uu[Pu(e)])==Lu||e!=Du&&(Mu(t)?xu(t):!!t)}function O(e,t){var r,n,o,i,s=e.target,a=e.global,u=e.stat;if(r=a?Fu:u?Fu[s]||Bu(s,{}):(Fu[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(i=ju(r,n))&&i.value:r[n],!Gu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;zu(o,i)}(e.sham||i&&i.sham)&&Vu(o,"sham",!0),Hu(r,n,o,e)}}var Ca,Sa,xa,Ma,ka,Pa,Ua,Da,_=Ea.inspectSource,is=T,Ea=_,La=h.WeakMap,is=is(La)&&/native code/.test(Ea(La)),Ea=as.exports,Fa=ji,ja=Ea("keys"),La={},as=y,Va=Mi,Ha=Ds,Ba=b,Ea=Is,N=Ta,R=La,za=h.TypeError,Ga=h.WeakMap,is=(Ua=is||Ea.state?(Ca=Ea.state||(Ea.state=new Ga),Sa=as(Ca.get),xa=as(Ca.has),Ma=as(Ca.set),ka=function(e,t){if(xa(Ca,e))throw new za("Object already initialized");return t.facade=e,Ma(Ca,e,t),t},Pa=function(e){return Sa(Ca,e)||{}},function(e){return xa(Ca,e)}):(R[Da=N("state")]=!0,ka=function(e,t){if(Ba(e,Da))throw new za("Object already initialized");return t.facade=e,Ha(e,Da,t),t},Pa=function(e){return Ba(e,Da)?e[Da]:{}},function(e){return Ba(e,Da)}),{set:ka,get:Pa,has:Ua,enforce:function(e){return Ua(e)?Pa(e):ka(e,{})},getterFor:function(t){return function(e){if(Va(e)&&(e=Pa(e)).type===t)return e;throw za("Incompatible receiver, "+t+" required")}}}),Ea=g,Ka=T,Ja=b,Ya=v,qa=e.CONFIGURABLE,$a=_,Xa=is.enforce,Wa=is.get,Za=Object.defineProperty,Qa=Ya&&!Ea(function(){return 8!==Za(function(){},"length",{value:8}).length}),eu=String(String).split("String"),Ga=ds.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Ja(e,"name")||qa&&e.name!==t)&&(Ya?Za(e,"name",{value:t,configurable:!0}):e.name=t),Qa&&r&&Ja(r,"arity")&&e.length!==r.arity&&Za(e,"length",{value:r.arity});try{r&&Ja(r,"constructor")&&r.constructor?Ya&&Za(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Xa(e);return Ja(r,"source")||(r.source=eu.join("string"==typeof t?t:"")),e},tu=(Function.prototype.toString=Ga(function(){return Ka(this)&&Wa(this).source||$a(this)},"toString"),T),ru=Ps,nu=ds.exports,ou=Li,as={},iu=Math.ceil,su=Math.floor,au=Math.trunc||function(e){e=+e;return(0<e?su:iu)(e)},uu=ba,cu=Math.max,lu=Math.min,pu=ba,fu=Math.min,du=xi,hu=Aa,yu=I,R={includes:Ia(!0),indexOf:Ia(!1)},vu=b,mu=xi,gu=R.indexOf,Eu=La,wu=y([].push),N=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Tu=Oa,_u=N.concat("length","prototype"),Ea=(as.f=Object.getOwnPropertyNames||function(e){return Tu(e,_u)},{}),Ga=(Ea.f=Object.getOwnPropertySymbols,ki),bu=as,Au=Ea,Iu=zi,Ou=y([].concat),Ea=Ga("Reflect","ownKeys")||function(e){var t=bu.f(Iu(e)),r=Au.f;return r?Ou(t,r(e)):t},Nu=b,Ru=Ea,Cu=qn,Su=Ps,xu=g,Mu=T,ku=/#|\.prototype\./,Pu=Ra.normalize=function(e){return String(e).replace(ku,".").toLowerCase()},Uu=Ra.data={},Du=Ra.NATIVE="N",Lu=Ra.POLYFILL="P",Ga=Ra,Fu=h,ju=qn.f,Vu=Ds,Hu=_a,Bu=Li,zu=Na,Gu=Ga,Ea=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ku=b,Ju=T,Yu=Fi,qu=Ta("IE_PROTO"),$u=Object,Xu=$u.prototype,Ea=Ea?$u.getPrototypeOf:function(e){e=Yu(e);if(Ku(e,qu))return e[qu];var t=e.constructor;return Ju(t)&&e instanceof t?t.prototype:e instanceof $u?Xu:null},Wu=T,Zu=String,Qu=TypeError,ec=y,tc=zi,rc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=ec(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return tc(e),function(e){if("object"==typeof e||Wu(e))return;throw Qu("Can't set "+Zu(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),nc={},oc=Oa,ic=N,C=Object.keys||function(e){return oc(e,ic)},sc=Ps,ac=zi,uc=xi,cc=C;nc.f=v&&!A?Object.defineProperties:function(e,t){ac(e);for(var r,n=uc(t),o=cc(t),i=o.length,s=0;s<i;)sc.f(e,r=o[s++],n[r]);return e};function lc(){}function pc(e){e.write(Rc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function fc(e,t){return Dc(e),void 0===t?e:Lc?Fc(e,t):function(){return e.apply(t,arguments)}}function dc(e){return void 0!==e&&(jc.Array===e||Hc[Vc]===e)}function hc(e){if(null!=e)return qc(e,Xc)||qc(e,"@@iterator")||$c[Yc(e)]}function yc(e,t){if(t=arguments.length<2?tl(e):t,Zc(t))return Qc(Wc(t,e));throw rl(el(e)+" is not iterable")}function vc(e,t,r){var n,o;ol(e);try{if(!(n=il(e,"return"))){if("throw"===t)throw r;return r}n=nl(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return ol(n),r}function mc(e,t){this.stopped=e,this.result=t}function gc(e,t,r){function n(e){return i&&yl(i,"normal",e),new mc(!0,e)}function o(e){return f?(ul(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var i,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=sl(t,p);if(d)i=e.iterator;else if(h)i=e;else{if(!(r=hl(e)))throw vl(cl(e)+" is not iterable");if(ll(r)){for(s=0,a=pl(e);s<a;s++)if((u=o(e[s]))&&fl(ml,u))return u;return new mc(!1)}i=dl(e,r)}for(c=(d?e:i).next;!(l=al(c,i)).done;){try{u=o(l.value)}catch(e){yl(i,"throw",e)}if("object"==typeof u&&u&&fl(ml,u))return u}return new mc(!1)}function Ec(e){if("Symbol"===gl(e))throw TypeError("Cannot convert a Symbol value to a string");return El(e)}function wc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,o=bl(Pl,this);return Il?r=Il(new Ml,o?Al(this):Pl):(r=o?this:Nl(Pl),Rl(r,xl,"Error")),void 0!==t&&Rl(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:wl(e)}(t)),Sl&&Rl(r,"stack",function(e,t){if(kc&&"string"==typeof e&&!Sc.prepareStackTrace)for(;t--;)e=xc(e,Mc,"");return e}(r.stack,1)),o=r,Pc(t=n)&&"cause"in t&&Uc(o,"cause",t.cause),Cl(e,kl,{that:n=[]}),Rl(r,"errors",n),r}var Tc,C=ki("document","documentElement"),_c=zi,bc=nc,Ac=N,A=La,Ic=C,Oc=Bi,Nc=Ta("IE_PROTO"),Rc=function(e){return"<script>"+e+"<\/script>"},Cc=function(){try{Tc=new ActiveXObject("htmlfile")}catch(e){}var e,t;Cc="undefined"==typeof document||document.domain&&Tc?pc(Tc):((t=Oc("iframe")).style.display="none",Ic.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Rc("document.F=Object")),e.close(),e.F);for(var r=Ac.length;r--;)delete Cc.prototype[Ac[r]];return Cc()},nc=(A[Nc]=!0,Object.create||function(e,t){var r;return null!==e?(lc.prototype=_c(e),r=new lc,lc.prototype=null,r[Nc]=e):r=Cc(),void 0===t?r:bc.f(r,t)}),Sc=Error,xc=y("".replace),N=String(Sc("zxcasd").stack),Mc=/\n\s*at [^:]*:[^\n]*/,kc=Mc.test(N),Pc=Mi,Uc=Ds,Dc=Ui,Lc=r,Fc=y(y.bind),A={},jc=A,Vc=Vi("iterator"),Hc=Array.prototype,N={},N=(N[Vi("toStringTag")]="z","[object z]"===String(N)),S=N,Bc=T,zc=Ci,Gc=Vi("toStringTag"),Kc=Object,Jc="Arguments"==zc(function(){return arguments}()),S=S?zc:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Kc(e),Gc))?t:Jc?zc(e):"Object"==(t=zc(e))&&Bc(e.callee)?"Arguments":t},Yc=S,qc=Di,$c=A,Xc=Vi("iterator"),Wc=n,Zc=Ui,Qc=zi,el=Pi,tl=hc,rl=TypeError,nl=n,ol=zi,il=Di,sl=fc,al=n,ul=zi,cl=Pi,ll=dc,pl=I,fl=E,dl=yc,hl=hc,yl=vc,vl=TypeError,ml=mc.prototype,gl=S,El=String,wl=Ec,Tl=Ri,x=!g(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Tl(1,7)),7!==e.stack)}),_l=O,bl=E,Al=Ea,Il=rc,Ol=Na,Nl=nc,Rl=Ds,M=Ri,Cl=gc,Sl=x,xl=Vi("toStringTag"),Ml=Error,kl=[].push,Pl=(Il?Il(wc,Ml):Ol(wc,Ml,{name:!0}),wc.prototype=Nl(Ml.prototype,{constructor:M(1,wc),message:M(1,""),name:M(1,"AggregateError")})),x=(_l({global:!0,constructor:!0,arity:2},{AggregateError:wc}),Vi),Ol=nc,M=Ps.f,Ul=x("unscopables"),Dl=Array.prototype;null==Dl[Ul]&&M(Dl,Ul,{configurable:!0,value:Ol(null)});function Ll(e){Dl[Ul][e]=!0}var Fl,_l=g,x=T,M=Ea,Ol=_a,jl=Vi("iterator"),Vl=!1;[].keys&&("next"in(Gl=[].keys())?(M=M(M(Gl)))!==Object.prototype&&(Fl=M):Vl=!0);function Hl(e,t,r){(e=e&&!r?e.prototype:e)&&!Jl(e,Yl)&&Kl(e,Yl,{configurable:!0,value:t})}function Bl(){return this}function zl(e,t,r,n,o,i,s){var a=r,u=t,c=void 0;function l(e){if(e===o&&v)return v;if(!fp&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}}u+=" Iterator",a.prototype=$l(ql,{next:Xl(+!c,n)}),Wl(a,u,!1),Zl[u]=Ql;var p,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[dp]||h["@@iterator"]||o&&h[o],v=!fp&&y||l(o);if((n="Array"==t&&h.entries||y)&&(a=np(n.call(new e)))!==Object.prototype&&a.next&&(np(a)!==pp&&(op?op(a,pp):rp(a[dp])||ap(a,dp,Bl)),ip(a,c,!0)),cp&&"values"==o&&y&&"values"!==y.name&&(lp?sp(h,"name","values"):(d=!0,v=function(){return tp(y,this)})),o)if(p={values:l("values"),keys:i?v:l("keys"),entries:l("entries")},s)for(f in p)!fp&&!d&&f in h||ap(h,f,p[f]);else ep({target:t,proto:!0,forced:fp||d},p);return h[dp]!==v&&ap(h,dp,v,{name:o}),up[t]=v,p}x((Fl=null==Fl||_l(function(){var e={};return Fl[jl].call(e)!==e})?{}:Fl)[jl])||Ol(Fl,jl,function(){return this});var Gl={IteratorPrototype:Fl,BUGGY_SAFARI_ITERATORS:Vl},Kl=Ps.f,Jl=b,Yl=Vi("toStringTag"),ql=Gl.IteratorPrototype,$l=nc,Xl=Ri,Wl=Hl,Zl=A,Ql=function(){return this},ep=O,tp=n,rp=T,np=Ea,op=rc,ip=Hl,sp=Ds,ap=_a,up=A,cp=e.PROPER,lp=e.CONFIGURABLE,pp=Gl.IteratorPrototype,fp=Gl.BUGGY_SAFARI_ITERATORS,dp=Vi("iterator"),hp=xi,M=Ll,x=A,_l=is,Ol=Ps.f,Vl=zl,e=v,yp=_l.set,vp=_l.getterFor("Array Iterator"),Gl=Vl(Array,"Array",function(e,t){yp(this,{type:"Array Iterator",target:hp(e),index:0,kind:t})},function(){var e=vp(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),A=x.Arguments=x.Array;if(M("keys"),M("values"),M("entries"),e&&"values"!==A.name)try{Ol(A,"name",{value:"values"})}catch(g1){}function mp(e){var e=bp(e),t=Ap.f;Ip&&e&&!e[Op]&&t(e,Op,{configurable:!0,get:function(){return this}})}function gp(e,t){if(Np(t,e))return e;throw Rp("Incorrect invocation")}function Ep(){}function wp(e){if(!Cp(e))return!1;try{return kp(Ep,Mp,e),!0}catch(e){return!1}}function Tp(e){if(!Cp(e))return!1;switch(Sp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Dp||!!Up(Pp,xp(e))}catch(e){return!0}}var _p=S,_l=(N||_a(Object.prototype,"toString",N?{}.toString:function(){return"[object "+_p(this)+"]"},{unsafe:!0}),"process"==Ci(h.process)),bp=ki,Ap=Ps,Ip=v,Op=Vi("species"),Np=E,Rp=TypeError,Vl=y,x=g,Cp=T,Sp=S,xp=_,Mp=[],kp=ki("Reflect","construct"),Pp=/^\s*(?:class|function)\b/,Up=Vl(Pp.exec),Dp=!Pp.exec(Ep);Tp.sham=!0;function Lp(e,t){var r,e=zp(e).constructor;if(void 0===e||null==(r=zp(e)[Gp]))return t;if(Vp(e=r))return e;throw Bp(Hp(e)+" is not a constructor")}var Fp,jp,M=!kp||x(function(){var e;return wp(wp.call)||!wp(Object)||!wp(function(){e=!0})||e})?Tp:wp,Vp=M,Hp=Pi,Bp=TypeError,zp=zi,Gp=Vi("species"),e=Function.prototype,Kp=e.apply,Jp=e.call,Ol="object"==typeof Reflect&&Reflect.apply||(r?Jp.bind(Kp):function(){return Jp.apply(Kp,arguments)}),A=y([].slice),Yp=TypeError,N=/(?:ipad|iphone|ipod).*applewebkit/i.test(os),qp=h,$p=Ol,E=fc,Xp=T,Wp=b,S=g,Zp=C,Qp=A,ef=Bi,Vl=N,x=_l,e=qp.setImmediate,r=qp.clearImmediate,tf=qp.process,rf=qp.Dispatch,nf=qp.Function,C=qp.MessageChannel,of=qp.String,sf=0,af={};try{Fp=qp.location}catch(g1){}function uf(e){return function(){pf(e)}}function cf(e){pf(e.data)}function lf(e){qp.postMessage(of(e),Fp.protocol+"//"+Fp.host)}var pf=function(e){var t;Wp(af,e)&&(t=af[e],delete af[e],t())};e&&r||(e=function(e){var t=arguments.length,r=1;if(t<r)throw Yp("Not enough arguments");var n=Xp(e)?e:nf(e),o=Qp(arguments,1);return af[++sf]=function(){$p(n,void 0,o)},jp(sf),sf},r=function(e){delete af[e]},x?jp=function(e){tf.nextTick(uf(e))}:rf&&rf.now?jp=function(e){rf.now(uf(e))}:C&&!Vl?(Vl=(x=new C).port2,x.port1.onmessage=cf,jp=E(Vl.postMessage,Vl)):qp.addEventListener&&Xp(qp.postMessage)&&!qp.importScripts&&Fp&&"file:"!==Fp.protocol&&!S(lf)?(jp=lf,qp.addEventListener("message",cf,!1)):jp="onreadystatechange"in ef("script")?function(e){Zp.appendChild(ef("script")).onreadystatechange=function(){Zp.removeChild(this),pf(e)}}:function(e){setTimeout(uf(e),0)});function ff(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function df(){this.head=null,this.tail=null}function hf(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=Uf(r),this.reject=Uf(n)}var yf,vf,mf,gf,Ef,wf,Tf,C={set:e,clear:r},x=h,E=/ipad|iphone|ipod/i.test(os)&&void 0!==x.Pebble,Vl=/web0s(?!.*chrome)/i.test(os),S=h,e=fc,r=qn.f,_f=C.set,x=N,qn=E,N=Vl,bf=_l,E=S.MutationObserver||S.WebKitMutationObserver,Vl=S.document,Af=S.process,If=S.Promise,r=r(S,"queueMicrotask"),r=r&&r.value,N=(r||(yf=function(){var e,t;for(bf&&(e=Af.domain)&&e.exit();vf;){t=vf.fn,vf=vf.next;try{t()}catch(e){throw vf?gf():mf=void 0,e}}mf=void 0,e&&e.enter()},gf=x||bf||N||!E||!Vl?!qn&&If&&If.resolve?((x=If.resolve(void 0)).constructor=If,Tf=e(x.then,x),function(){Tf(yf)}):bf?function(){Af.nextTick(yf)}:(_f=e(_f,S),function(){_f(yf)}):(Ef=!0,wf=Vl.createTextNode(""),new E(yf).observe(wf,{characterData:!0}),function(){wf.data=Ef=!Ef})),r||function(e){e={fn:e,next:void 0};mf&&(mf.next=e),vf||(vf=e,gf()),mf=e}),Of=h,qn=(df.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},df),If=h.Promise,x="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,e=!x&&!_l&&"object"==typeof window&&"object"==typeof document,S=h,Nf=If,Vl=T,E=Ga,Rf=_,r=Vi,Cf=e,Sf=x,xf=ss,Mf=(Nf&&Nf.prototype,r("species")),kf=!1,Pf=Vl(S.PromiseRejectionEvent),_={CONSTRUCTOR:E("Promise",function(){var e=Rf(Nf),t=e!==String(Nf);if(!t&&66===xf)return!0;if(!xf||xf<51||!/native code/.test(e)){var e=new Nf(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Mf]=r,!(kf=e.then(function(){})instanceof r))return!0}return!t&&(Cf||Sf)&&!Pf}),REJECTION_EVENT:Pf,SUBCLASSING:kf},e={},Uf=Ui;e.f=function(e){return new hf(e)};function Df(e,t){var r,n,o,i,s=t.value,a=1==t.state,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(2===t.rejection&&(i=t,Bf(qf,Hf,function(){var e=i.facade;Vf?ad.emit("rejectionHandled",e):dd("rejectionhandled",e,i.value)})),t.rejection=1),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),o=!0)),r===e.promise?l(id("Promise-chain cycle")):(n=pd(r))?Bf(n,r,c,l):c(r)):l(s)}catch(e){p&&!o&&p.exit(),l(e)}}var Lf,Ff,jf,x=O,Vf=_l,Hf=h,Bf=n,r=_a,Vl=rc,S=Hl,E=mp,zf=Ui,Gf=T,Kf=Mi,Jf=gp,Yf=Lp,qf=C.set,$f=N,Xf=ff,Wf=qn,C=is,N=If,qn=e,Zf=_.CONSTRUCTOR,Qf=_.REJECTION_EVENT,ed=_.SUBCLASSING,td=C.getterFor("Promise"),rd=C.set,C=N&&N.prototype,nd=N,od=C,id=Hf.TypeError,sd=Hf.document,ad=Hf.process,ud=qn.f,cd=ud,ld=!!(sd&&sd.createEvent&&Hf.dispatchEvent),pd=function(e){var t;return!(!Kf(e)||!Gf(t=e.then))&&t},fd=function(r,o){r.notified||(r.notified=!0,$f(function(){for(var e,n,t=r.reactions;e=t.get();)Df(e,r);r.notified=!1,o&&!r.rejection&&(n=r,Bf(qf,Hf,function(){var e,t=n.facade,r=n.value;if(hd(n)&&(e=Xf(function(){Vf?ad.emit("unhandledRejection",r,t):dd("unhandledrejection",t,r)}),n.rejection=Vf||hd(n)?2:1,e.error))throw e.value}))}))},dd=function(e,t,r){var n;ld?((n=sd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Hf.dispatchEvent(n)):n={promise:t,reason:r},!Qf&&(t=Hf["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Of.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},hd=function(e){return 1!==e.rejection&&!e.parent},yd=function(t,r,n){return function(e){t(r,e,n)}},vd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,fd(e,!0))},md=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw id("Promise can't be resolved itself");var n=pd(e);n?$f(function(){var t={done:!1};try{Bf(n,e,yd(md,t,r),yd(vd,t,r))}catch(e){vd(t,e,r)}}):(r.value=e,r.state=1,fd(r,!1))}catch(e){vd({done:!1},e,r)}}};if(Zf&&(od=(nd=function(e){Jf(this,od),zf(e),Bf(Lf,this);var t=td(this);try{e(yd(md,t),yd(vd,t))}catch(e){vd(t,e)}}).prototype,(Lf=function(e){rd(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Wf,rejection:!1,state:0,value:void 0})}).prototype=r(od,"then",function(e,t){var r=td(this),n=ud(Yf(this,nd));return r.parent=!0,n.ok=!Gf(e)||e,n.fail=Gf(t)&&t,n.domain=Vf?ad.domain:void 0,0==r.state?r.reactions.add(n):$f(function(){Df(n,r)}),n.promise}),Ff=function(){var e=new Lf,t=td(e);this.promise=e,this.resolve=yd(md,t),this.reject=yd(vd,t)},qn.f=ud=function(e){return e===nd||void 0===e?new Ff:cd(e)},Gf(N)&&C!==Object.prototype)){jf=C.then,ed||r(C,"then",function(e,t){var r=this;return new nd(function(e,t){Bf(jf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete C.constructor}catch(g1){}Vl&&Vl(C,od)}x({global:!0,constructor:!0,wrap:!0,forced:Zf},{Promise:nd}),S(nd,"Promise",!1),E("Promise");var gd=Vi("iterator"),Ed=!1;try{var wd=0,Td={next:function(){return{done:!!wd++}},return:function(){Ed=!0}};Td[gd]=function(){return this},Array.from(Td,function(){throw 2})}catch(g1){}function _d(e,t){if(!t&&!Ed)return!1;var r=!1;try{var n={};n[gd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function bd(e,t){return Vd(e),Hd(t)&&t.constructor===e?t:((0,(e=Bd.f(e)).resolve)(t),e.promise)}function Ad(o){return function(e,t){var r,e=ah(uh(e)),t=sh(t),n=e.length;return t<0||n<=t?o?"":void 0:(r=lh(e,t))<55296||56319<r||t+1===n||(n=lh(e,t+1))<56320||57343<n?o?ch(e,t):r:o?ph(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Id(e,t){if(e){if(e[wh]!==_h)try{Eh(e,wh,_h)}catch(t){e[wh]=_h}if(e[Th]||Eh(e,Th,t),mh[t])for(var r in gh)if(e[r]!==gh[r])try{Eh(e,r,gh[r])}catch(t){e[r]=gh[r]}}}var Od,Nd=If,qn=_.CONSTRUCTOR||!_d(function(e){Nd.all(e).then(void 0,function(){})}),Rd=n,Cd=Ui,Sd=e,xd=ff,Md=gc,N=(O({target:"Promise",stat:!0,forced:qn},{all:function(e){var a=this,t=Sd.f(a),u=t.resolve,c=t.reject,r=xd(function(){var n=Cd(a.resolve),o=[],i=0,s=1;Md(e,function(e){var t=i++,r=!1;s++,Rd(n,a,e).then(function(e){r||(r=!0,o[t]=e,--s||u(o))},c)}),--s||u(o)});return r.error&&c(r.value),t.promise}}),O),ed=If,r=ki,Vl=T,C=_a,x=ed&&ed.prototype,kd=(N({target:"Promise",proto:!0,forced:_.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),Vl(ed)&&(Zf=r("Promise").prototype.catch,x.catch!==Zf&&C(x,"catch",Zf,{unsafe:!0})),n),Pd=Ui,Ud=e,Dd=ff,Ld=gc,Fd=(O({target:"Promise",stat:!0,forced:qn},{race:function(e){var r=this,n=Ud.f(r),o=n.reject,t=Dd(function(){var t=Pd(r.resolve);Ld(e,function(e){kd(t,r,e).then(n.resolve,o)})});return t.error&&o(t.value),n.promise}}),n),jd=e,Vd=(O({target:"Promise",stat:!0,forced:_.CONSTRUCTOR},{reject:function(e){var t=jd.f(this);return Fd(t.reject,void 0,e),t.promise}}),zi),Hd=Mi,Bd=e,S=O,E=_.CONSTRUCTOR,zd=bd,Gd=(ki("Promise"),S({target:"Promise",stat:!0,forced:E},{resolve:function(e){return zd(this,e)}}),n),Kd=Ui,Jd=e,Yd=ff,qd=gc,$d=(O({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Jd.f(a),u=t.resolve,r=t.reject,n=Yd(function(){var n=Kd(a.resolve),o=[],i=0,s=1;qd(e,function(e){var t=i++,r=!1;s++,Gd(n,a,e).then(function(e){r||(r=!0,o[t]={status:"fulfilled",value:e},--s||u(o))},function(e){r||(r=!0,o[t]={status:"rejected",reason:e},--s||u(o))})}),--s||u(o)});return n.error&&r(n.value),t.promise}}),n),Xd=Ui,Wd=ki,Zd=e,Qd=ff,eh=gc,Td=(O({target:"Promise",stat:!0},{any:function(e){var u=this,c=Wd("AggregateError"),t=Zd.f(u),l=t.resolve,p=t.reject,r=Qd(function(){var n=Xd(u.resolve),o=[],i=0,s=1,a=!1;eh(e,function(e){var t=i++,r=!1;s++,$d(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,o[t]=e,--s||p(new c(o,"No one promise resolved")))})}),--s||p(new c(o,"No one promise resolved"))});return r.error&&p(r.value),t.promise}}),O),N=If,Vl=g,th=ki,rh=T,nh=Lp,oh=bd,ed=_a,ih=N&&N.prototype,C=(Td({target:"Promise",proto:!0,real:!0,forced:!!N&&Vl(function(){ih.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=nh(this,th("Promise")),e=rh(t);return this.then(e?function(e){return oh(r,t()).then(function(){return e})}:t,e?function(e){return oh(r,t()).then(function(){throw e})}:t)}}),rh(N)&&(r=th("Promise").prototype.finally,ih.finally!==r&&ed(ih,"finally",r,{unsafe:!0})),y),sh=ba,ah=Ec,uh=Si,ch=C("".charAt),lh=C("".charCodeAt),ph=C("".slice),fh=(Ad(!1),Ad(!0)),dh=Ec,x=is,Zf=zl,hh=x.set,yh=x.getterFor("String Iterator"),qn=(Zf(String,"String",function(e){hh(this,{type:"String Iterator",string:dh(e),index:0})},function(){var e=yh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=fh(t,r),e.index+=t.length,{value:t,done:!1})}),h),_=(qn.Promise,Bi("span").classList),S=_&&_.constructor&&_.constructor.prototype,E=S===Object.prototype?void 0:S,vh=h,mh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},If=E,gh=Gl,Eh=Ds,Td=Vi,wh=Td("iterator"),Th=Td("toStringTag"),_h=gh.values;for(Od in mh)Id(vh[Od]&&vh[Od].prototype,Od);Id(If,"DOMTokenList");function bh(e,t,r){(t=qh(t))in e?$h.f(e,t,Xh(0,r)):e[t]=r}function Ah(e){if(9007199254740991<e)throw hy("Maximum allowed index exceeded");return e}function Ih(e,t){return yy(e=e)&&(r=e.constructor,(vy(r)&&(r===Ey||yy(r.prototype))||my(r)&&null===(r=r[gy]))&&(r=void 0)),new(void 0===r?Ey:r)(0===t?0:t);var r}function Oh(t){return 51<=Ty||!wy(function(){var e=[];return(e.constructor={})[_y]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Nh(e,t){if(!delete e[t])throw My("Cannot delete property "+xy(t)+" of "+xy(e))}function Rh(f){var d=1==f,h=2==f,y=3==f,v=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var o,i,s=Vy(e),a=jy(s),u=Fy(t,r),c=Hy(a),l=0,t=n||By,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(i=u(o=a[l],l,s),f))if(d)p[l]=i;else if(i)switch(f){case 3:return!0;case 5:return o;case 6:return l;case 2:zy(p,o)}else switch(f){case 4:return!1;case 7:zy(p,o)}return m?-1:y||v?v:p}}function Ch(e,t){var r=[][e];return!!r&&Gy(function(){r.call(null,t||function(){return 1},1)})}function Sh(u){var c=1==u;return function(e,t,r){for(var n,o=rv(e),i=tv(o),s=ev(t,r),a=nv(i);0<a--;)if(s(n=i[a],a,o))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function xh(e,t,r,n,o,i,s,a){for(var u,c,l=o,p=0,f=!!s&&cv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<i&&sv(u)?(c=av(u),l=xh(e,t,u,c,l,i-1)-1):(uv(l+1),e[l]=u),l++),p++;return l}function Mh(c){return function(e,t,r,n){Fv(t);var o=jv(e),i=Vv(o),s=Hv(o),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in i){n=i[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw Bv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in i&&(n=t(n,i[a],a,o));return n}}function kh(e,t,r){for(var n=sm(e),o=im(t,n),i=im(void 0===r?n:r,n),s=um(cm(i-o,0)),a=0;o<i;o++,a++)am(s,a,e[o]);return s.length=a,s}function Ph(e,t){var r=e.length,n=pm(r/2);if(r<8){for(var o,i,s=e,a=t,u=s.length,c=1;c<u;){for(o=s[i=c];i&&0<a(s[i-1],o);)s[i]=s[--i];i!==c++&&(s[i]=o)}return s}for(var l=e,p=Ph(lm(e,0,n),t),f=Ph(lm(e,n),t),d=t,h=p.length,y=f.length,v=0,m=0;v<h||m<y;)l[v+m]=v<h&&m<y?d(p[v],f[m])<=0?p[v++]:f[m++]:v<h?p[v++]:f[m++];return l}function Uh(e){Qm(e,ig,{value:{objectID:"O"+sg++,weakData:{}}})}function Dh(e,t,r){for(var n in t)vg(e,n,t[n],r);return e}var Lh,Fh,jh,Vh,Hh,Bh,zh,Gh=e,Kh=ff,Jh=(O({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Gh.f(this),e=Kh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),zi),Yh=vc,qh=Hi,$h=Ps,Xh=Ri,Wh=fc,Zh=n,Qh=Fi,ey=dc,ty=M,ry=I,ny=bh,oy=yc,iy=hc,sy=Array,ay=(O({target:"Array",stat:!0,forced:!_d(function(e){Array.from(e)})},{from:function(e){var t=Qh(e),e=ty(this),r=arguments.length,n=1<r?arguments[1]:void 0,o=void 0!==n;o&&(n=Wh(n,2<r?arguments[2]:void 0));var i,s,a,u,c,l,r=iy(t),p=0;if(!r||this===sy&&ey(r))for(i=ry(t),s=e?new this(i):sy(i);p<i;p++)l=o?n(t[p],p):t[p],ny(s,p,l);else for(c=(u=oy(t,r)).next,s=e?new this:[];!(a=Zh(c,u)).done;p++)l=o?function(e,t,r,n){try{return n?t(Jh(r)[0],r[1]):t(r)}catch(t){Yh(e,"throw",t)}}(u,n,[a.value,p],!0):a.value,ny(s,p,l);return s.length=p,s}}),Ci),Vl=Array.isArray||function(e){return"Array"==ay(e)},uy=(O({target:"Array",stat:!0},{isArray:Vl}),M),cy=bh,ly=Array,py=(O({target:"Array",stat:!0,forced:g(function(){function e(){}return!(ly.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(uy(this)?this:ly)(t);e<t;)cy(r,e,arguments[e++]);return r.length=t,r}}),Fi),fy=I,dy=ba,N=Ll,hy=(O({target:"Array",proto:!0},{at:function(e){var t=py(this),r=fy(t),e=dy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),N("at"),TypeError),yy=Vl,vy=M,my=Mi,gy=Vi("species"),Ey=Array,wy=g,Ty=ss,_y=Vi("species"),ed=O,r=g,by=Vl,Ay=Mi,Iy=Fi,Oy=I,Ny=Ah,Ry=bh,Cy=Ih,C=Oh,x=ss,Sy=Vi("isConcatSpreadable"),Zf=51<=x||!r(function(){var e=[];return e[Sy]=!1,e.concat()[0]!==e}),_=C("concat"),xy=(ed({target:"Array",proto:!0,arity:1,forced:!Zf||!_},{concat:function(e){for(var t,r,n,o=Iy(this),i=Cy(o,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Ay(e))return!1;var t=e[Sy];return void 0!==t?!!t:by(e)}(n=-1===a?o:arguments[a]))for(r=Oy(n),Ny(s+r),t=0;t<r;t++,s++)t in n&&Ry(i,s,n[t]);else Ny(s+1),Ry(i,s++,n);return i.length=s,i}}),Pi),My=TypeError,ky=Fi,Py=Aa,Uy=I,Dy=Nh,Ly=Math.min,S=Ll,Fy=(O({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=ky(this),n=Uy(r),o=Py(e,n),i=Py(t,n),e=2<arguments.length?arguments[2]:void 0,s=Ly((void 0===e?n:Py(e,n))-i,n-o),a=1;for(i<o&&o<i+s&&(a=-1,i+=s-1,o+=s-1);0<s--;)i in r?r[o]=r[i]:Dy(r,o),o+=a,i+=a;return r}}),S("copyWithin"),fc),jy=Gi,Vy=Fi,Hy=I,By=Ih,zy=y([].push),E={forEach:Rh(0),map:Rh(1),filter:Rh(2),some:Rh(3),every:Rh(4),find:Rh(5),findIndex:Rh(6),filterReject:Rh(7)},Gy=g,Ky=E.every,Jy=(O({target:"Array",proto:!0,forced:!Ch("every")},{every:function(e){return Ky(this,e,1<arguments.length?arguments[1]:void 0)}}),Fi),Yy=Aa,qy=I,Gl=Ll,$y=(O({target:"Array",proto:!0},{fill:function(e){for(var t=Jy(this),r=qy(t),n=arguments.length,o=Yy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,i=void 0===n?r:Yy(n,r);o<i;)t[o++]=e;return t}}),Gl("fill"),E.filter),Ds=(O({target:"Array",proto:!0,forced:!Oh("filter")},{filter:function(e){return $y(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Xy=E.find,Td=Ll,Wy=!0,If=("find"in[]&&Array(1).find(function(){Wy=!1}),Ds({target:"Array",proto:!0,forced:Wy},{find:function(e){return Xy(this,e,1<arguments.length?arguments[1]:void 0)}}),Td("find"),O),Zy=E.findIndex,e=Ll,Qy=!0,ev=("findIndex"in[]&&Array(1).findIndex(function(){Qy=!1}),If({target:"Array",proto:!0,forced:Qy},{findIndex:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),e("findIndex"),fc),tv=Gi,rv=Fi,nv=I,N={findLast:Sh(0),findLastIndex:Sh(1)},ov=N.findLast,x=Ll,iv=(O({target:"Array",proto:!0},{findLast:function(e){return ov(this,e,1<arguments.length?arguments[1]:void 0)}}),x("findLast"),N.findLastIndex),r=Ll,sv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return iv(this,e,1<arguments.length?arguments[1]:void 0)}}),r("findLastIndex"),Vl),av=I,uv=Ah,cv=fc,C=xh,lv=C,pv=Fi,fv=I,dv=ba,hv=Ih,yv=(O({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=pv(this),r=fv(t),n=hv(t,0);return n.length=lv(n,t,t,r,0,void 0===e?1:dv(e)),n}}),C),vv=Ui,mv=Fi,gv=I,Ev=Ih,wv=(O({target:"Array",proto:!0},{flatMap:function(e){var t,r=mv(this),n=gv(r);return vv(e),(t=Ev(r,0)).length=yv(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),E.forEach),ed=Ch("forEach")?[].forEach:function(e){return wv(this,e,1<arguments.length?arguments[1]:void 0)},Tv=(O({target:"Array",proto:!0,forced:[].forEach!=ed},{forEach:ed}),R.includes),Zf=Ll,_=(O({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(e){return Tv(this,e,1<arguments.length?arguments[1]:void 0)}}),Zf("includes"),O),_v=R.indexOf,S=Ch,bv=y([].indexOf),Av=!!bv&&1/bv([1],1,-0)<0,Gl=S("indexOf"),Ds=(_({target:"Array",proto:!0,forced:Av||!Gl},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Av?bv(this,e,t)||0:_v(this,e,t)}}),O),Td=Gi,Iv=xi,If=Ch,Ov=y([].join),e=Td!=Object,x=If("join",","),Nv=(Ds({target:"Array",proto:!0,forced:e||!x},{join:function(e){return Ov(Iv(this),void 0===e?",":e)}}),Ol),Rv=xi,Cv=ba,Sv=I,N=Ch,xv=Math.min,Mv=[].lastIndexOf,kv=!!Mv&&1/[1].lastIndexOf(1,-0)<0,r=N("lastIndexOf"),C=kv||!r?function(e){if(kv)return Nv(Mv,this,arguments)||0;var t=Rv(this),r=Sv(t),n=r-1;for((n=1<arguments.length?xv(n,Cv(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Mv,Pv=(O({target:"Array",proto:!0,forced:C!==[].lastIndexOf},{lastIndexOf:C}),E.map),ed=(O({target:"Array",proto:!0,forced:!Oh("map")},{map:function(e){return Pv(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Uv=Fi,Dv=I,Lv=Ah,Zf=g(function(){return 4294967297!==[].push.call({length:4294967296},1)}),R=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Fv=(ed({target:"Array",proto:!0,arity:1,forced:Zf||R},{push:function(e){var t=Uv(this),r=Dv(t),n=arguments.length;Lv(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return t.length=r}}),Ui),jv=Fi,Vv=Gi,Hv=I,Bv=TypeError,S={left:Mh(!1),right:Mh(!0)},zv=S.left,_=ss,Gl=_l,Gv=(O({target:"Array",proto:!0,forced:!Ch("reduce")||!Gl&&79<_&&_<83},{reduce:function(e){var t=arguments.length;return zv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),Td=ss,If=_l,Ds=(O({target:"Array",proto:!0,forced:!Ch("reduceRight")||!If&&79<Td&&Td<83},{reduceRight:function(e){return Gv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),O),Kv=Vl,Jv=y([].reverse),e=[1,2],x=(Ds({target:"Array",proto:!0,forced:String(e)===String(e.reverse())},{reverse:function(){return Kv(this)&&(this.length=this.length),Jv(this)}}),O),Yv=Vl,qv=M,$v=Mi,Xv=Aa,Wv=I,Zv=xi,Qv=bh,Ol=Vi,em=A,N=Oh("slice"),tm=Ol("species"),rm=Array,nm=Math.max,om=(x({target:"Array",proto:!0,forced:!N},{slice:function(e,t){var r,n,o,i=Zv(this),s=Wv(i),a=Xv(e,s),u=Xv(void 0===t?s:t,s);if(Yv(i)&&(r=i.constructor,(r=qv(r)&&(r===rm||Yv(r.prototype))||$v(r)&&null===(r=r[tm])?void 0:r)===rm||void 0===r))return em(i,a,u);for(n=new(void 0===r?rm:r)(nm(u-a,0)),o=0;a<u;a++,o++)a in i&&Qv(n,o,i[a]);return n.length=o,n}}),E.some),im=(O({target:"Array",proto:!0,forced:!Ch("some")},{some:function(e){return om(this,e,1<arguments.length?arguments[1]:void 0)}}),Aa),sm=I,am=bh,um=Array,cm=Math.max,lm=kh,pm=Math.floor,r=Ph,C=os.match(/firefox\/(\d+)/i),ed=!!C&&+C[1],Zf=/MSIE|Trident/.test(os),R=os.match(/AppleWebKit\/(\d+)\./),Gl=!!R&&+R[1],_=O,S=y,fm=Ui,dm=Fi,hm=I,ym=Nh,vm=Ec,_l=g,mm=r,If=Ch,gm=ed,Em=Zf,wm=ss,Tm=Gl,_m=[],bm=S(_m.sort),Am=S(_m.push),Td=_l(function(){_m.sort(void 0)}),Ds=_l(function(){_m.sort(null)}),e=If("sort"),Im=!_l(function(){if(wm)return wm<70;if(!(gm&&3<gm)){if(Em)return!0;if(Tm)return Tm<603;for(var e,t,r,n="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)_m.push({k:e+r,v:t})}for(_m.sort(function(e,t){return t.v-e.v}),r=0;r<_m.length;r++)e=_m[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),A=(_({target:"Array",proto:!0,forced:Td||!Ds||!e||!Im},{sort:function(e){void 0!==e&&fm(e);var t=dm(this);if(Im)return void 0===e?bm(t):bm(t,e);for(var r,n,o=[],i=hm(t),s=0;s<i;s++)s in t&&Am(o,t[s]);for(mm(o,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:vm(e)>vm(t)?1:-1})),r=o.length,s=0;s<r;)t[s]=o[s++];for(;s<i;)ym(t,s++);return t}}),mp("Array"),O),Om=Fi,Nm=Aa,Rm=ba,Cm=I,Sm=Ah,xm=Ih,Mm=bh,km=Nh,Ol=Oh("splice"),Pm=Math.max,Um=Math.min,x=(A({target:"Array",proto:!0,forced:!Ol},{splice:function(e,t){var r,n,o,i,s,a,u=Om(this),c=Cm(u),l=Nm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Um(Pm(Rm(t),0),c-l)),Sm(c+r-n),o=xm(u,n),i=0;i<n;i++)(s=l+i)in u&&Mm(o,i,u[s]);if(r<(o.length=n)){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:km(u,a);for(i=c;c-n+r<i;i--)km(u,i-1)}else if(n<r)for(i=c-n;l<i;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:km(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return u.length=c-n+r,o}}),Ll("flat"),Ll("flatMap"),O),Dm=Fi,Lm=I,Fm=Nh,jm=Ah,N=1!==[].unshift(0),C=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),os=(x({target:"Array",proto:!0,arity:1,forced:N||C},{unshift:function(e){var t=Dm(this),r=Lm(t),n=arguments.length;if(n){jm(r+n);for(var o=r;o--;){var i=o+n;o in t?t[i]=t[o]:Fm(t,i)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),qn.Array,{exports:{}}),R={},Vm=Ci,Hm=xi,Bm=as.f,zm=kh,Gm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],r=(R.f=function(e){if(!Gm||"Window"!=Vm(e))return Bm(Hm(e));var t=e;try{return Bm(t)}catch(t){return zm(Gm)}},g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),ed=g,Km=Mi,Jm=Ci,Ym=r,qm=Object.isExtensible,Zf=ed(function(){qm(1)})||Ym?function(e){return!!Km(e)&&(!Ym||"ArrayBuffer"!=Jm(e))&&(!qm||qm(e))}:qm,ss=!g(function(){return Object.isExtensible(Object.preventExtensions({}))}),$m=O,Xm=y,Gl=La,Wm=Mi,Zm=b,Qm=Ps.f,eg=as,tg=R,rg=Zf,ng=ss,og=!1,ig=ji("meta"),sg=0,ag=os.exports={enable:function(){ag.enable=function(){},og=!0;var o=eg.f,i=Xm([].splice),e={};e[ig]=1,o(e).length&&(eg.f=function(e){for(var t=o(e),r=0,n=t.length;r<n;r++)if(t[r]===ig){i(t,r,1);break}return t},$m({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tg.f}))},fastKey:function(e,t){if(!Wm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Zm(e,ig)){if(!rg(e))return"F";if(!t)return"E";Uh(e)}return e[ig].objectID},getWeakData:function(e,t){if(!Zm(e,ig)){if(!rg(e))return!0;if(!t)return!1;Uh(e)}return e[ig].weakData},onFreeze:function(e){return ng&&og&&rg(e)&&!Zm(e,ig)&&Uh(e),e}},ug=(Gl[ig]=!0,T),cg=Mi,lg=rc,S=O,If=h,pg=y,_l=Ga,fg=_a,_=os.exports,dg=gc,hg=gp,Td=T,yg=Mi,Ds=g,e=_d,A=Hl,vg=_a,mg=Ps.f,gg=nc,Eg=Dh,wg=fc,Tg=gp,_g=gc,bg=zl,Ag=mp,Ig=v,Og=os.exports.fastKey,Ng=is.set,Rg=is.getterFor;function Cg(e){var r=pg(Bh[e]);fg(Bh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(jh&&!yg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return jh&&!yg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(jh&&!yg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}Ol=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x={getConstructor:function(e,r,n,o){function i(e,t,r){var n,o=u(e),i=s(e,t);return i?i.value=r:(o.last=i={index:n=Og(t,!0),key:t,value:r,previous:t=o.last,next:void 0,removed:!1},o.first||(o.first=i),t&&(t.next=i),Ig?o.size++:e.size++,"F"!==n&&(o.index[n]=i)),e}function s(e,t){var r,e=u(e),n=Og(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){Tg(e,a),Ng(e,{type:r,index:gg(null),first:void 0,last:void 0,size:0}),Ig||(e.size=0),null!=t&&_g(t,e[o],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=Rg(r);return Eg(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,Ig?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),Ig?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=wg(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Eg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return i(this,0===e?0:e,t)}}:{add:function(e){return i(this,e=0===e?0:e,e)}}),Ig&&mg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",o=Rg(t),i=Rg(n);bg(e,t,function(e,t){Ng(this,{type:n,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),Ag(t)}},Fh=-1!==(N="Map").indexOf("Map"),jh=-1!==N.indexOf("Weak"),Vh=Fh?"set":"add",Hh=If.Map,Bh=Hh&&Hh.prototype,C={},_l(N,!Td(zh=Hh)||!(jh||Bh.forEach&&!Ds(function(){(new Hh).entries().next()})))?(zh=x.getConstructor(Ol,N,Fh,Vh),_.enable()):_l(N,!0)&&(qn=(Lh=new zh)[Vh](jh?{}:-0,1)!=Lh,r=Ds(function(){Lh.has(1)}),ed=e(function(e){new Hh(e)}),La=!jh&&Ds(function(){for(var e=new Hh,t=5;t--;)e[Vh](t,t);return!e.has(-0)}),ed||(((zh=Ol(function(e,t){hg(e,Bh);r=new Hh,e=e,n=zh,lg&&ug(e=e.constructor)&&e!==n&&cg(e=e.prototype)&&e!==n.prototype&&lg(r,e);var r,n=r;return null!=t&&dg(t,n[Vh],{that:n,AS_ENTRIES:Fh}),n})).prototype=Bh).constructor=zh),(r||La)&&(Cg("delete"),Cg("has"),Fh&&Cg("get")),(La||qn)&&Cg(Vh),jh&&Bh.clear&&delete Bh.clear),C.Map=zh,S({global:!0,constructor:!0,forced:zh!=Hh},C),A(zh,N),jh||x.setStrong(zh,N,Fh);function Sg(e,t){for(var r=0,n=Pg(t),o=new e(n);r<n;)o[r]=t[r++];return o}function xg(e,t,r,n){for(var o,i,s,a=Lg(e),u=Dg(a),c=Ug(t,r),l=Vg(null),p=jg(u),f=0;f<p;f++)s=u[f],(i=Fg(c(s,f,a)))in l?zg(l[i],s):l[i]=[s];if(n&&(o=n(a))!==Bg)for(i in l)l[i]=Hg(o,l[i]);return l}function Mg(e){for(var t,r,n=qg(this),o=Yg(n),i=Jg(e,1<arguments.length?arguments[1]:void 0),s=new Xg,a=$g(o),u=0;u<a;u++)t=i(r=o[u],u,n),Zg(s,t)?e0(Wg(s,t),r):Qg(s,t,[r]);return s}function kg(e){return o0[e].prototype}var Pg=I,Ug=fc,Dg=Gi,Lg=Fi,Fg=Hi,jg=I,Vg=nc,Hg=Sg,Bg=Array,zg=y([].push),Gg=xg,b=Ll,Kg=(O({target:"Array",proto:!0},{group:function(e){return Gg(this,e,1<arguments.length?arguments[1]:void 0)}}),b("group"),xg),as=Ll,Jg=(O({target:"Array",proto:!0,forced:!Ch("groupBy")},{groupBy:function(e){return Kg(this,e,1<arguments.length?arguments[1]:void 0)}}),as("groupBy"),fc),R=y,Yg=Gi,qg=Fi,$g=I,Xg=ki("Map"),Zf=Xg.prototype,Wg=R(Zf.get),Zg=R(Zf.has),Qg=R(Zf.set),e0=R([].push),ss=Ll,Gl=Mg,rc=(O({target:"Array",proto:!0,name:"groupToMap",forced:!Ch("groupByToMap")},{groupByToMap:Gl}),ss("groupByToMap"),Ll),t0=(O({target:"Array",proto:!0},{groupToMap:Mg}),rc("groupToMap"),I),r0=xi,Ga=Ll,n0=Array,o0=(O({target:"Array",proto:!0},{toReversed:function(){for(var e=r0(this),t=n0,r=t0(e),n=new t(r),o=0;o<r;o++)n[o]=e[r-o-1];return n}}),Ga("toReversed"),h),os=O,i0=Ui,s0=xi,a0=Sg,If=Ll,u0=Array,c0=y(kg("Array").sort),_l=(os({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&i0(e);var t=s0(this),t=a0(u0,t);return c0(t,e)}}),If("toSorted"),O),e=Ll,l0=Ah,p0=I,f0=Aa,d0=xi,h0=ba,y0=Array,v0=Math.max,m0=Math.min,g0=(_l({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,o,i,s=d0(this),a=p0(s),u=f0(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,m0(v0(h0(t),0),a-u)),o=l0(a+r-n),i=y0(o);c<u;c++)i[c]=s[c];for(;c<u+r;c++)i[c]=arguments[c-u+2];for(;c<o;c++)i[c]=s[c+n-r];return i}}),e("toSpliced"),I),E0=ba,w0=RangeError,T0=xi,_0=Array;O({target:"Array",proto:!0},{with:function(e,t){var r=T0(this),n=_0,o=t,i=g0(r),s=(e=E0(e))<0?i+e:e;if(i<=s||s<0)throw w0("Incorrect index");for(var a=new n(i),u=0;u<i;u++)a[u]=u===s?o:r[u];return a}});Ds=h,ed=Is,Ol=T,r=Ea,La=_a,qn=Vi("asyncIterator"),S=Ds.AsyncIterator,C=ed.AsyncIteratorPrototype;if(C)k=C;else if(Ol(S))k=S.prototype;else if(ed.USE_FUNCTION_CONSTRUCTOR||Ds.USE_FUNCTION_CONSTRUCTOR)try{iw=r(r(r(Function("return async function*(){}()")()))),r(iw)===Object.prototype&&(k=iw)}catch(g1){}Ol((k=k||{})[qn])||La(k,qn,function(){return this});function b0(e,t,r){var n=e.done;M0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function A0(e){k0(this,{type:"AsyncFromSyncIterator",iterator:S0(e),next:e.next})}function I0(e,t,r,n){try{var o=K0(e,"return");if(o)return G0("Promise").resolve(z0(o,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function O0(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:H0(B0(e).next)},u=X0("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Y0(s),new u(function(r,n){var o=function(e){I0(c,n,e,n)},i=function(){try{if(f&&p)try{$0(l)}catch(e){o(e)}u.resolve(q0(J0(t,c))).then(function(e){try{if(q0(e).done)f?(a.length=l,r(a)):r(!y&&(h||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(d)i();else if(h)e?i():I0(c,r,!1,n);else if(f)try{a[l++]=e,i()}catch(e){o(e)}else e?I0(c,r,y||t,n):i()},o):(a[l++]=t,i())}catch(e){o(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};i()})}}function N0(e,t){if(!pE||!lE(e)||!pE(e))return!1;for(var r,n=0,o=e.length;n<o;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==o}function R0(e,t,r){r.get&&fE(r.get,t,{getter:!0}),r.set&&fE(r.set,t,{setter:!0}),dE.f(e,t,r)}var C0=n,S0=zi,A=nc,x0=Di,x=Dh,N=is,b=k,M0=ki("Promise"),k0=N.set,P0=N.getterFor("AsyncFromSyncIterator"),as=(A0.prototype=x(A(b),{next:function(){var n=P0(this);return new M0(function(e,t){var r=S0(C0(n.next,n.iterator));b0(r,e,t)})},return:function(){var n=P0(this).iterator;return new M0(function(e,t){var r=x0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=S0(C0(r,n));b0(r,e,t)})}}),A0),U0=n,D0=as,L0=zi,F0=yc,j0=Di,V0=Vi("asyncIterator"),H0=Ui,B0=zi,z0=n,G0=ki,K0=Di,J0=n,Y0=Ui,q0=zi,$0=Ah,X0=ki,Gi={toArray:O0(0),forEach:O0(1),every:O0(2),some:O0(3),find:O0(4)},W0=fc,Z0=Fi,Q0=M,eE=yc,tE=hc,rE=Di,Zf=kg,nE=ki,oE=as,iE=Gi.toArray,sE=Vi("asyncIterator"),aE=Zf("Array").values,uE=(O({target:"Array",stat:!0,forced:!0},{fromAsync:function(i){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(nE("Promise"))(function(e){var t=Z0(i),r=(void 0!==a&&(a=W0(a,u)),rE(t,sE)),n=r?void 0:tE(t)||aE,o=Q0(s)?new s:[],r=r?function(e,t){t=arguments.length<2?j0(e,V0):t;return t?L0(U0(t,e)):new D0(F0(e))}(t,r):new oE(eE(t,n));e(iE(r,a,o))})}}),E.filterReject),R=Ll,cE=(O({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return uE(this,e,1<arguments.length?arguments[1]:void 0)}}),R("filterOut"),E.filterReject),Gl=Ll,ss=(O({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return cE(this,e,1<arguments.length?arguments[1]:void 0)}}),Gl("filterReject"),O),lE=Vl,pE=Object.isFrozen,fE=(ss({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!N0(e,!0))return!1;var t=e.raw;return t.length===e.length&&N0(t,!1)}}),ds.exports),dE=Ps,rc=Ll,hE=Fi,yE=I,Ga=(v&&(R0(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=hE(this),t=yE(e);return 0==t?void 0:e[t-1]},set:function(e){var t=hE(this),r=yE(t);return t[0==r?0:r-1]=e}}),rc("lastItem")),Ll),vE=Fi,mE=I,os=(v&&(R0(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=vE(this),e=mE(e);return 0==e?0:e-1}}),Ga("lastIndex")),y),gE=Ui,EE=I,wE=Fi,TE=Ih,_E=ki("Map"),If=_E.prototype,bE=os(If.forEach),AE=os(If.has),IE=os(If.set),OE=os([].push),_l=Ll;O({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=wE(this),o=EE(n),i=TE(n,0),s=new _E,a=null!=e?gE(e):function(e){return e},u=0;u<o;u++)r=a(t=n[u]),AE(s,r)||IE(s,r,t);return bE(s,function(e){OE(i,e)}),i}}),_l("uniqueBy");F_.exposure=function(e,t,r,n){return new LE(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},F_.track=function(e,t,r,n){return new FE(n,r,e,t)},F_.remoteConfig=function(e,t,r,n){return new jE(n,e,t.parameter,t.valueId,t.reason,r)},F_.isExposure=function(e){return void 0!==e.experiment},F_.isTrack=function(e){return void 0!==e.eventType},F_.isRemoteConfig=function(e){return void 0!==e.parameter},F_.isExposureDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},F_.isTrackDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},F_.isRemoteConfigDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},F_.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[bt.ID],identifiers:this.user.identifiers,userProperties:Xe.sanitize(this.user.properties),hackleProperties:Xe.sanitize(this.user.hackleProperties)}};var NE,RE,CE,SE,xE,ME,kE,PE,UE,DE=F_,LE=(Ke(L_,UE=DE),L_.prototype.copyWithUser=function(e){return new L_(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},L_.prototype.toDto=function(){return c(c({},UE.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})},L_),FE=(Ke(D_,PE=DE),D_.prototype.copyWithUser=function(e){return new D_(this.timestamp,e,this.eventType,this.event,this.insertId)},D_.prototype.toDto=function(){return c(c({},PE.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Xe.sanitize(this.event.properties)})},D_),jE=(Ke(U_,kE=DE),U_.prototype.copyWithUser=function(e){return new U_(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},U_.prototype.toDto=function(){return c(c({},kE.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Xe.sanitize(this.properties)})},U_),VE=(P_.isSessionEvent=function(e){return!!DE.isTrack(e)&&(e.event.key===P_.SESSION_START_EVENT_NAME||e.event.key===P_.SESSION_END_EVENT_NAME)},P_.prototype.onSessionStarted=function(e,t,r){this.track(P_.SESSION_START_EVENT_NAME,e,t,r)},P_.prototype.onSessionEnded=function(e,t,r){this.track(P_.SESSION_END_EVENT_NAME,e,t,r)},P_.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},P_.prototype.decorateSession=function(e,t){t=(new At).add(bt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},P_.SESSION_START_EVENT_NAME="$session_start",P_.SESSION_END_EVENT_NAME="$session_end",P_),HE=(k_.prototype.process=function(e){var t;VE.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.exposureEventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[bt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[bt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},k_.prototype.flush=function(e){this.delegate.flush(e)},k_.prototype.close=function(){this.delegate.close()},k_),BE=(M_.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!DE.isExposure(e))return!1;qe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache=new Map);var t=[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-"),e=(new Date).getTime(),r=this.cache.get(t);return void 0!==r&&e-r<=this.exposureEventDedupIntervalMillis||(this.cache.set(t,e),!1)},M_),zE=(x_.toEvent=function(e){var t;return{key:x_.EVENT_KEY,properties:{level:x_.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:x_._stacktrace(e)}}},x_._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,x_.STACK_TRACK_LIMIT).join("\n")},x_.EVENT_KEY="$trace",x_.LEVEL_ERROR="error",x_.STACK_TRACK_LIMIT=30,x_),e=(S_.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}},S_),GE=(C_.prototype.with=function(e){return new C_(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},C_.of=function(e,t,r,n){var o=this.config(e.workspace,r);return new C_(n,t.targetEvaluations,e.experiment,r.id,r.key,o)},C_.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new C_(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},C_.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},C_),KE=(Ke(R_,ME=e),R_.prototype.supports=function(e){return void 0!==e.experiment},R_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:GE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},R_),JE=(N_.of=function(e,t,r,n,o,i){return i.returnValue=Xe.truncateStringValue(n),new N_(o,t.targetEvaluations,e.parameter,r,n,i)},N_.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},N_),YE=(Ke(O_,xE=e),O_.prototype.supports=function(e){return void 0!==e.parameter},O_.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Xe.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return JE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,f.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,f.DEFAULT_RULE,r)},O_.prototype.evaluation=function(e,t,r,n,o){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?JE.ofDefault(e,t,f.TYPE_MISMATCH,o):JE.of(e,t,r.id,r.rawValue,n,o)},O_),qE=(I_.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},I_),$E=(A_.create=function(){return new A_},Object.defineProperty(A_.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(A_.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),A_.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},A_.prototype.addRequest=function(e){this._stack.push(e)},A_.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},A_.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof GE&&e.experiment.id===t.id})},A_.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},A_),XE=(b_.of=function(e,t,r,n){return new b_(e,t,r,n)},b_.by=function(e,t){return new b_(e.workspace,e.user,t,"A")},b_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},b_),WE=(__.of=function(e,t,r,n,o){return new __(e,t,r,n,o)},__.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},__),ZE=(T_.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},T_.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},T_.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},T_),QE=(w_.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var o=n[r].getVariation(e,t);if(void 0!==o)return o}},w_),ew=(E_.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},E_.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return ZE.asNumber(e)},E_.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=ZE.asNumber(t),e=ZE.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},E_.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},E_.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},E_.prototype.clear=function(){this.listStorage.clear()},E_),tw=(g_.prototype.add=function(e){this.evaluators.push(e)},g_.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)},g_),rw=(m_.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},m_.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},m_.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},m_),nw=(v_.prototype.matches=function(e,t){var r=this.valueMatcherFactory.getMatcher(t.valueType),n=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,r,n);return this.typeMatches(t.type,e)},v_.prototype.userValueMatches=function(e,t,r,n){return Array.isArray(e)?this.arrayMatches(e,t,r,n):this.singleMatches(e,t,r,n)},v_.prototype.singleMatches=function(t,e,r,n){return e.values.some(function(e){return r.matches(n,t,e)})},v_.prototype.arrayMatches=function(e,t,r,n){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n)})},v_.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},v_),h=(y_.prototype.booleanMatches=function(e,t){return e===t},y_.prototype.numberMatches=function(e,t){return e===t},y_.prototype.stringMatches=function(e,t){return e===t},y_.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},y_),Is=(h_.prototype.booleanMatches=function(e,t){return!1},h_.prototype.numberMatches=function(e,t){return!1},h_.prototype.stringMatches=function(e,t){return e.includes(t)},h_.prototype.versionMatches=function(e,t){return!1},h_),Ea=(d_.prototype.booleanMatches=function(e,t){return!1},d_.prototype.numberMatches=function(e,t){return!1},d_.prototype.stringMatches=function(e,t){return e.startsWith(t)},d_.prototype.versionMatches=function(e,t){return!1},d_),C=(f_.prototype.booleanMatches=function(e,t){return!1},f_.prototype.numberMatches=function(e,t){return!1},f_.prototype.stringMatches=function(e,t){return e.endsWith(t)},f_.prototype.versionMatches=function(e,t){return!1},f_),S=(p_.prototype.booleanMatches=function(e,t){return!1},p_.prototype.numberMatches=function(e,t){return t<e},p_.prototype.stringMatches=function(e,t){return t<e},p_.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},p_),ed=(l_.prototype.booleanMatches=function(e,t){return!1},l_.prototype.numberMatches=function(e,t){return t<=e},l_.prototype.stringMatches=function(e,t){return t<=e},l_.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},l_),Ds=(c_.prototype.booleanMatches=function(e,t){return!1},c_.prototype.numberMatches=function(e,t){return e<t},c_.prototype.stringMatches=function(e,t){return e<t},c_.prototype.versionMatches=function(e,t){return e.isLessThan(t)},c_),r=(u_.prototype.booleanMatches=function(e,t){return!1},u_.prototype.numberMatches=function(e,t){return e<=t},u_.prototype.stringMatches=function(e,t){return e<=t},u_.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},u_),ow=(a_.prototype.getMatcher=function(e){switch(e){case"IN":return a_.IN_MATCHER;case"CONTAINS":return a_.CONTAINS_MATCHER;case"STARTS_WITH":return a_.STARTS_WITH_MATCHER;case"ENDS_WITH":return a_.ENDS_WITH_MATCHER;case"GT":return a_.GT_MATCHER;case"GTE":return a_.GTE_MATCHER;case"LT":return a_.LT_MATCHER;case"LTE":return a_.LTE_MATCHER}},a_.IN_MATCHER=new h,a_.CONTAINS_MATCHER=new Is,a_.STARTS_WITH_MATCHER=new Ea,a_.ENDS_WITH_MATCHER=new C,a_.GT_MATCHER=new S,a_.GTE_MATCHER=new ed,a_.LT_MATCHER=new Ds,a_.LTE_MATCHER=new r,a_),iw=(s_.prototype.matches=function(e,t,r){t=ZE.asString(t),r=ZE.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},s_),Ol=(i_.prototype.matches=function(e,t,r){t=ZE.asNumber(t),r=ZE.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},i_),La=(o_.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},o_),qn=(n_.prototype.matches=function(e,t,r){t=ur.tryParse(t),r=ur.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},n_),nc=(r_.prototype.matches=function(e,t,r){return!1},r_),sw=(t_.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return t_.STRING_MATCHER;case"NUMBER":return t_.NUMBER_MATCHER;case"BOOLEAN":return t_.BOOLEAN_MATCHER;case"VERSION":return t_.VERSION_MATCHER;case"NULL":case"UNKNOWN":return t_.NULL_MATCHER}},t_.STRING_MATCHER=new iw,t_.NUMBER_MATCHER=new Ol,t_.BOOLEAN_MATCHER=new La,t_.VERSION_MATCHER=new qn,t_.NULL_MATCHER=new nc,t_),aw=(e_.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},e_),uw=(QT.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},QT),cw=(ZT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var o=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return o;case"NOT_MATCH":return!o}},ZT.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))},ZT),lw=(WT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},WT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},WT),pw=(XT.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},XT),is=($T.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(ZE.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var o=null!=(o=t.get(n))?o:this.evaluate(e,t,n);return this.evaluationMatches(o,r)},$T.prototype.evaluate=function(e,t,r){r=XE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},$T),fw=(Ke(qT,SE=is),qT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},qT.prototype.resolve=function(e,t){return e instanceof XE&&t.reason===f.TRAFFIC_ALLOCATED?t.with(f.TRAFFIC_ALLOCATED_BY_TARGETING):t},qT.prototype.evaluationMatches=function(e,t){return!!qT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},qT.AB_TEST_MATCHED_REASONS=[f.OVERRIDDEN,f.TRAFFIC_ALLOCATED,f.EXPERIMENT_COMPLETED,f.TRAFFIC_ALLOCATED_BY_TARGETING],qT),dw=(Ke(YT,CE=is),YT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},YT.prototype.resolve=function(e,t){return t},YT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},YT),hw=(JT.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},JT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},JT),yw=(KT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},KT.prototype.properties=function(e){return DE.isTrack(e)?e.event.properties:DE.isExposure(e)||DE.isRemoteConfig(e)?e.properties:void 0},KT),vw=(GT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})},GT),mw=(zT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}},zT),gw=(BT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},BT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},BT.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}},BT),Ew={murmurhash3_x86_32:function(e,t,r,n){for(var o,i=-4&(n=void 0===n?e.length:n),s=t,a=0;a<i;a+=4)o=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s=5*((524287&(s^=o=this.mul32(o,461845907)))<<13|s>>>19)+3864292196|0;switch(o=0,n%4){case 3:o=(255&e.charCodeAt(2+i))<<16;case 2:o|=(255&e.charCodeAt(1+i))<<8;case 1:o|=255&e.charCodeAt(i),o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s^=o=this.mul32(o,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),(s=this.mul32(s^=s>>>13,3266489909))^s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},ww=(HT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},HT.prototype.calculateSlotNumber=function(e,t,r){r=Ew.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},HT),Tw=(VT.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},VT.end=function(){return new VT(void 0,void 0)},VT.decision=function(e,t){return new VT(e,t)},VT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,o=e.reverse();n<o.length;n++)var i=o[n],r=this.decision(i,r);return r},VT),_w=(jT.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return GE.of(e,t,n,f.OVERRIDDEN);case"FEATURE_FLAG":return GE.of(e,t,n,f.INDIVIDUAL_TARGET_MATCH)}},jT),bw=(FT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?GE.ofDefault(e,t,f.EXPERIMENT_DRAFT):r.evaluate(e,t)},FT),Aw=(LT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return GE.ofDefault(e,t,f.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return GE.ofDefault(e,t,f.FEATURE_FLAG_INACTIVE)}},LT),Iw=(DT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return GE.of(e,t,r,f.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},DT),Ow=(UT.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):GE.ofDefault(e,t,f.NOT_IN_EXPERIMENT_TARGET)},UT),Nw=(PT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?GE.ofDefault(e,t,f.VARIATION_DROPPED):GE.of(e,t,n,f.TRAFFIC_ALLOCATED):GE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},PT),Rw=(kT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return GE.of(e,t,r,f.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},kT),Cw=(MT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return GE.ofDefault(e,t,f.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return GE.of(e,t,n,f.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},MT),Sw=(xT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var o=e.workspace.getContainerOrNull(n);if(o)return this.containerResolver.isUserInContainerGroup(e,t,o)?r.evaluate(e,t):GE.ofDefault(e,t,f.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},xT),xw=(ST.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):GE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND)},ST),Mw=(CT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})},CT),kw=(RT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},RT),Pw=(NT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},NT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},NT.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},NT.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)},NT),Uw=(OT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var o=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(o))throw new Error("Bucket[".concat(r.bucketId,"]"));o=this.bucketer.bucketing(o,n);if(a.isNullOrUndefined(o))return!1;n=r.getGroupOrNull(o.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(o.variationId,"]"));return n.experiments.includes(e.experiment.id)},OT),Dw=(IT.of=function(e,t,r,n){return new IT(r,t.targetEvaluations,e.inAppMessage,n)},IT),Lw=(AT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):Dw.of(e,t,f.UNSUPPORTED_PLATFORM)},AT),Fw=(bT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Dw.of(e,t,f.OVERRIDDEN,n)):r.evaluate(e,t)},bT),jw=(_T.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?Dw.of(e,t,f.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},_T),Vw=(TT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?Dw.of(e,t,f.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},TT),Hw=(wT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_PERIOD)},wT),Bw=(ET.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?Dw.of(e,t,f.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},ET),zw=(gT.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Dw.of(e,t,f.IN_APP_MESSAGE_TARGET,n)):Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},gT),Gw=(mT.prototype.resolve=function(e,t){var e=e.inAppMessage,r=e.messageContext.defaultLang,n=e.messageContext.messages.find(function(e){return e.lang===r});if(a.isNullOrUndefined(n))throw new Error("InAppMessage must be decided [".concat(e.id,"]"));return n},mT),Kw=(vT.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},vT.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},vT),Jw=(yT.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})},yT),Yw=(hT.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},hT),qw=(dT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},dT.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))},dT),$w=(fT.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},fT.getOrNull=function(e){return fT.instances.get(e)},fT.register=function(e,t){return fT.instances.set(e,t),t},fT.instances=new Map,fT),Xw=(pT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},pT.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},pT),Ww=(lT.prototype.create=function(r,e){var n=this,o=this.clock.currentMillis(),i=new Array,t=this.createEvent(r,e,o,{});return i.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[lT.ROOT_TYPE]=r.key.type,t[lT.ROOT_ID]=r.key.id;e=n.createEvent(r,e,o,t);i.push(e)}),i},lT.prototype.createEvent=function(e,t,r,n){var o;if(t instanceof GE)return n[lT.CONFIG_ID_PROPERTY_KEY]=null==(o=t.config)?void 0:o.id,n[lT.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[lT.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,DE.exposure(e.user,t,n,r);if(t instanceof JE)return DE.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},lT.ROOT_TYPE="$targetingRootType",lT.ROOT_ID="$targetingRootId",lT.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",lT.EXPERIMENT_VERSION_KEY="$experiment_version",lT.EXECUTION_VERSION_KEY="$execution_version",lT),Zw=(Ke(cT,RE=e),cT.prototype.supports=function(e){return void 0!==e.inAppMessage},cT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:Dw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},cT),Qw=(uT.of=function(e,t,r,n){return new uT(e,t,r,n)},uT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},uT),eT=o.log,tT=(aT.create=function(e,t,r,n){var o=new tw,r=new QE(r),r=new Xw(o,r,n),n=new KE(r),i=new YE(r.remoteConfigParameterTargetRuleDeterminer),r=new Zw(r);return o.add(n),o.add(i),new aT(n,i,r,e,new Ww(Qe.instance),t,new rT,Qe.instance)},aT.prototype.experiment=function(e,t,r){var n=this;if(!e)return eT.error("experimentKey must not be empty"),ht.of(r,f.INVALID_INPUT);var o=this.workspaceFetcher.get();if(!o)return eT.warn("SDK not ready."),ht.of(r,f.SDK_NOT_READY);e=o.getExperimentOrNull(e);if(!e)return eT.warn("Experiment does not exist."),ht.of(r,f.EXPERIMENT_NOT_FOUND);o=XE.of(o,t,e,r),t=this.experimentInternal(o),e=t[0],r=t[1];return this.eventFactory.create(o,e).forEach(function(e){return n.eventProcessor.process(e)}),r},aT.prototype.experiments=function(r){var n=this,o=new Nn(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getExperiments().forEach(function(e){var t=XE.of(i,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},aT.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,$E.create()),t=null!=(t=e.config)?t:new et;return[e,ht.of(e.variationKey,e.reason,t)]},aT.prototype.featureFlag=function(e,t){var r=this;if(!e)return eT.error("featureKey must not be empty"),yt.off(f.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return eT.warn("SDK not ready."),yt.off(f.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return eT.warn("FeatureFlag does not exist."),yt.off(f.FEATURE_FLAG_NOT_FOUND);n=XE.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},aT.prototype.featureFlags=function(r){var n=this,o=new Nn(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getFeatureFlags().forEach(function(e){var t=XE.of(i,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},aT.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,$E.create()),t=null!=(t=e.config)?t:new et;return[e,"A"===e.variationKey?yt.off(e.reason,t):yt.on(e.reason,t)]},aT.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return eT.warn("SDK not ready."),dt.of(f.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return eT.warn("In app message does not exist."),dt.of(f.IN_APP_MESSAGE_NOT_FOUND);r=Qw.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,$E.create());return dt.of(t.reason,t.inAppMessage,t.message)},aT.prototype.tryInAppMessage=function(e,t){var r,n=qr.start();try{r=this.inAppMessage(e,t)}catch(t){eT.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=dt.of(f.EXCEPTION)}return no.inAppMessage(n,e,r),r},aT.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"==typeof e?"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new _t(0,e.key),this.eventProcessor.process(DE.track(n,e,t,r))):eT.warn("Event key must be not null. or event key must be string type."):eT.warn("Event must be event type."):eT.warn("event must not be null.")},aT.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=zE.toEvent(e),this.flush(),this.track(e,t),this.flush())},aT.prototype.flush=function(){this.eventProcessor.flush(!1)},aT.prototype.remoteConfig=function(e,t,r,n){var o=this,i=this.workspaceFetcher.get();if(a.isNullOrUndefined(i))return eT.warn("SDK not ready."),ft.of(n,f.SDK_NOT_READY);e=i.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return eT.warn("Remote config parameter does not exist."),ft.of(n,f.REMOTE_CONFIG_PARAMETER_NOT_FOUND);i=WE.of(i,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(i,$E.create());return this.eventFactory.create(i,t).forEach(function(e){return o.eventProcessor.process(e)}),ft.of(t.value,t.reason)},aT.prototype.close=function(){this.eventProcessor.close()},aT),rT=(sT.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},sT.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},sT),nT=(iT.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},iT.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},iT),oT=null;function iT(){this._installed=[],this._installations={onerror:j_,onunhandledrejection:V_}}function sT(){}function aT(e,t,r,n,o,i,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=o,this.eventProcessor=i,this.errorDedupDeterminer=s,this.clock=a}function uT(e,t,r,n){this.key=new qE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function cT(e){var t=RE.call(this)||this;return t.evaluationFlowFactory=e,t}function lT(e){this.clock=e}function pT(e,t,r){var n=new ww,e=$w.register("targetMatcher",new rw(new mw(e))),o=new gw(n),t=new Pw(t,e,o),i=new Uw(n),i=(this.abTestFlow=Tw.of(new _w(t),new xw,new Sw(i),new Ow(new Mw(e)),new bw,new Aw,new Iw,new Nw(o)),this.featureFlagFlow=Tw.of(new bw,new Aw,new Iw,new _w(t),new xw,new Rw(new kw(e),o),new Cw(o)),new Gw);this.inAppMessageFlow=Tw.of(new Lw,new Fw(new Kw,i),new jw,new Vw,new Hw,new Bw(new Yw(r)),new zw(new Jw(e),i)),this.remoteConfigParameterTargetRuleDeterminer=new qw(e,n)}function fT(){}function dT(e,t){this.targetMatcher=e,this.bucketer=t}function hT(e){this.storage=e}function yT(e){this.targetMatcher=e}function vT(){}function mT(){}function gT(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function ET(e){this.hiddenMatcher=e}function wT(){}function TT(){}function _T(){}function bT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function AT(){}function IT(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function OT(e){this.bucketer=e}function NT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function RT(e){this.targetMatcher=e}function CT(e){this.targetMatcher=e}function ST(){}function xT(e){this.containerResolver=e}function MT(e){this.actionResolver=e}function kT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function PT(e){this.actionResolver=e}function UT(e){this.experimentTargetDeterminer=e}function DT(){}function LT(){}function FT(){}function jT(e){this.overrideResolver=e}function VT(e,t){this.flowEvaluator=e,this.nextFlow=t}function HT(){}function BT(e){this.bucketer=e}function zT(e){var t=new nw(new sw,new ow);this.userConditionMatcher=new aw(new uw,t),this.eventConditionMatcher=new hw(new yw,t),this.segmentConditionMatcher=new cw(new lw(this.userConditionMatcher)),this.experimentConditionMatcher=new pw(new fw(e,t),new dw(e,t)),this.cohortConditionMatcher=new vw(t)}function GT(e){this.valueOperatorMatcher=e}function KT(){}function JT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function YT(e,t){return CE.call(this,e,t)||this}function qT(e,t){return SE.call(this,e,t)||this}function $T(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function XT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function WT(e){this.userConditionMatcher=e}function ZT(e){this.segmentMatcher=e}function QT(){}function e_(e,t){this.userValueResolver=e,this.valueOperatorMatcher=t}function t_(){}function r_(){}function n_(){}function o_(){}function i_(){}function s_(){}function a_(){}function u_(){}function c_(){}function l_(){}function p_(){}function f_(){}function d_(){}function h_(){}function y_(){}function v_(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function m_(e){this.conditionMatcherFactory=e}function g_(){this.evaluators=new Array}function E_(e){this.listStorage=e}function w_(e){this.storages=e}function T_(){}function __(e,t,r,n,o){this.key=new qE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=o}function b_(e,t,r,n){this.key=new qE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function A_(){this._stack=[],this._targetEvaluations=[]}function I_(e,t){this.type=e,this.id=t}function O_(e){var t=xE.call(this)||this;return t.targetRuleDeterminer=e,t}function N_(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=o,this.properties=i}function R_(e){var t=ME.call(this)||this;return t.evaluationFlowFactory=e,t}function C_(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=o,this.config=i}function S_(){}function x_(){}function M_(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function k_(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}function P_(e,t){this.userManager=e,this.core=t}function U_(e,t,r,n,o,i,s){e=kE.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=o,e.properties=i,e}function D_(e,t,r,n,o){e=PE.call(this,e,t,o)||this;return e.eventType=r,e.event=n,e}function L_(e,t,r,n,o,i,s,a){e=UE.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=o,e.decisionReason=i,e.properties=s,e}function F_(e,t,r){void 0===r&&(r=De.v4()),this.timestamp=e,this.user=t,this.insertId=r}function j_(i,s){oT=window.onerror,window.onerror=function(e,t,r,n,o){a.isNotNullOrUndefined(o)&&i.trackException(o,s.resolve()),oT&&oT.apply(this,arguments)}}function V_(r,n){NE=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),NE&&NE.apply(this,arguments)}}function H_(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function B_(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function z_(t,r){return Object.keys(Hb).every(function(e){return t[e]===r[e]})}RI.prototype.read=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},RI.prototype.save=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){return 0!==r.length&&(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t)),[2]})})},RI.prototype.add=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},RI.prototype.delete=function(i){return s(this,void 0,void 0,function(){var t,r,n,o=this;return u(this,function(e){switch(e.label){case 0:return t=0,[4,this.read()];case 1:r=e.sent(),e.label=2;case 2:if(!(t<r.length))return[3,4];r[t],e.label=3;case 3:return t++,[3,2];case 4:return[4,this.read()];case 5:return n=e.sent(),n=n.filter(function(e){return!o.isDeleteTarget(e,i)}),[4,this.save(n)];case 6:return e.sent(),[2]}})})},RI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},RI.prototype.clear=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var G_=RI,K_=(NI.builder=function(){return new J_},NI.empty=function(){return NI.builder().build()},NI.from=function(e){return new NI(e)},NI.fromDto=function(e){for(var t=NI.builder(),r=0,n=e.cohorts;r<n.length;r++){var o=n[r];t.put({identifier:o.identifier,cohorts:o.cohorts.map(function(e){return new ar(e)})})}return t.build()},Object.defineProperty(NI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),NI.prototype.get=function(e){return this.cohorts.get(e)},NI.prototype.filterBy=function(e){var r=lt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return NI.from(e)},NI.prototype.asArray=function(){return this.cohorts.values()},NI.prototype.asComparable=function(){return this.cohorts},NI.prototype.toBuilder=function(){return new J_(this)},NI),J_=(OI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},OI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},OI.prototype.build=function(){return new K_(this.cohorts)},OI),k="model",N="name",x="type",A="vendor",b="version",n="mobile",M="tablet",Y_=(P.parse=function(e){return{browser:P.getBrowser(e),cpu:P.getCPU(e),device:P.getDevice(e),engine:P.getEngine(e),os:P.getOS(e)}},P.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return P.mapper.rgx.call(t,e,P.regexes.browser),t.major=P.util.major(t.version),t},P.getCPU=function(e){var t={architecture:void 0};return P.mapper.rgx.call(t,e,P.regexes.cpu),t},P.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return P.mapper.rgx.call(t,e,P.regexes.device),t},P.getEngine=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.getOS=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},P.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[N,b],[/(opios)[\/\s]+([\w\.]+)/i],[[N,"Opera Mini"],b],[/\s(opr)\/([\w\.]+)/i],[[N,"Opera"],b],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[N,b],[/(konqueror)\/([\w\.]+)/i],[[N,"Konqueror"],b],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[N,"IE"],b],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[N,"Edge"],b],[/(yabrowser)\/([\w\.]+)/i],[[N,"Yandex"],b],[/(Avast)\/([\w\.]+)/i],[[N,"Avast Secure Browser"],b],[/(AVG)\/([\w\.]+)/i],[[N,"AVG Secure Browser"],b],[/(puffin)\/([\w\.]+)/i],[[N,"Puffin"],b],[/(focus)\/([\w\.]+)/i],[[N,"Firefox Focus"],b],[/(opt)\/([\w\.]+)/i],[[N,"Opera Touch"],b],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[N,"UCBrowser"],b],[/(comodo_dragon)\/([\w\.]+)/i],[[N,/_/g," "],b],[/(windowswechat qbcore)\/([\w\.]+)/i],[[N,"WeChat(Win) Desktop"],b],[/(micromessenger)\/([\w\.]+)/i],[[N,"WeChat"],b],[/(brave)\/([\w\.]+)/i],[[N,"Brave"],b],[/(whale)\/([\w\.]+)/i],[[N,"Whale"],b],[/(qqbrowserlite)\/([\w\.]+)/i],[N,b],[/(QQ)\/([\d\.]+)/i],[N,b],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[N,b],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[N,b],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[N,b],[/(MetaSr)[\/\s]?([\w\.]+)/i],[N],[/(LBBROWSER)/i],[N],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[b,[N,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[b,[N,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[N,b],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[b,[N,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[N,/(.+)/,"$1 WebView"],b],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[N,/(.+(?:g|us))(.+)/,"$1 $2"],b],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[N,"Chrome Mobile"],b],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[b,[N,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[N,"Sailfish Browser"],b],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[N,b],[/(dolfin)\/([\w\.]+)/i],[[N,"Dolphin"],b],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[N,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[N,"Opera Coast"],b],[/fxios\/([\w\.-]+)/i],[b,[N,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[b,[N,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[b,N],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[N,"GSA"],b],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[N,[b,(P.mapper={rgx:function(e,t){for(var r,n,o,i,s,a=0;a<t.length&&!i;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!i;)if(i=u[l++].exec(e))for(n=0;n<c.length;n++)s=i[++r],"object"==typeof(o=c[n])&&0<o.length?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(P.util.has(t[r][n],e))return"?"===r?void 0:r}else if(P.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(P.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[N,b],[/(navigator|netscape)\/([\w\.-]+)/i],[[N,"Netscape"],b],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[N,b]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[k,A,[x,M]],[/applecoremedia\/[\w\.]+ \((ipad)/],[k,[A,"Apple"],[x,M]],[/(apple\s{0,1}tv)/i],[[k,"Apple TV"],[A,"Apple"],[x,"smarttv"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[A,k,[x,M]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[k,[A,"Amazon"],[x,M]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[k,P.mapper.str,P.maps.device.amazon.model],[A,"Amazon"],[x,n]],[/android.+aft([bms])\sbuild/i],[k,[A,"Amazon"],[x,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[k,A,[x,n]],[/\((ip[honed|\s\w*]+);/i],[k,[A,"Apple"],[x,n]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[A,k,[x,n]],[/\(bb10;\s(\w+)/i],[k,[A,"BlackBerry"],[x,n]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[k,[A,"Asus"],[x,M]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[A,"Sony"],[k,"Xperia Tablet"],[x,M]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[A,"Sony"],[x,n]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[A,k,[x,"console"]],[/android.+;\s(shield)\sbuild/i],[k,[A,"Nvidia"],[x,"console"]],[/(playstation\s[34portablevi]+)/i],[k,[A,"Sony"],[x,"console"]],[/(sprint\s(\w+))/i],[[A,P.mapper.str,P.maps.device.sprint.vendor],[k,P.mapper.str,P.maps.device.sprint.model],[x,n]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[A,[k,/_/g," "],[x,n]],[/(nexus\s9)/i],[k,[A,"HTC"],[x,M]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[k,[A,"Huawei"],[x,n]],[/android.+(bah2?-a?[lw]\d{2})/i],[k,[A,"Huawei"],[x,M]],[/(microsoft);\s(lumia[\s\w]+)/i],[A,k,[x,n]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[k,[A,"Microsoft"],[x,"console"]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[A,"Microsoft"],[x,n]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[k,[A,"Motorola"],[x,n]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[k,[A,"Motorola"],[x,M]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[A,P.util.trim],[k,P.util.trim],[x,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[A,"Samsung"],[x,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[k,[A,"Sharp"],[x,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[A,"Samsung"],k,[x,M]],[/smart-tv.+(samsung)/i],[A,[x,"smarttv"],k],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[A,"Samsung"],k,[x,n]],[/sie-(\w*)/i],[k,[A,"Siemens"],[x,n]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[A,"Nokia"],k,[x,n]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[k,[A,"Acer"],[x,M]],[/android.+([vl]k\-?\d{3})\s+build/i],[k,[A,"LG"],[x,M]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[A,"LG"],k,[x,M]],[/(lg) netcast\.tv/i],[A,k,[x,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[k,[A,"LG"],[x,n]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[A,k,[x,M]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[k,[A,"Lenovo"],[x,M]],[/(lenovo)[_\s-]?([\w-]+)/i],[A,k,[x,n]],[/linux;.+((jolla));/i],[A,k,[x,n]],[/((pebble))app\/[\d\.]+\s/i],[A,k,[x,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[A,k,[x,n]],[/crkey/i],[[k,"Chromecast"],[A,"Google"],[x,"smarttv"]],[/android.+;\s(glass)\s\d/i],[k,[A,"Google"],[x,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[k,[A,"Google"],[x,M]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[k,[A,"Google"],[x,n]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[k,/_/g," "],[A,"Xiaomi"],[x,n]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[k,/_/g," "],[A,"Xiaomi"],[x,M]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[k,[A,"Meizu"],[x,n]],[/(mz)-([\w-]{2,})/i],[[A,"Meizu"],k,[x,n]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[k,[A,"OnePlus"],[x,n]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[k,[A,"RCA"],[x,M]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[k,[A,"Dell"],[x,M]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[k,[A,"Verizon"],[x,M]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[A,"Barnes & Noble"],k,[x,M]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[k,[A,"NuVision"],[x,M]],[/android.+;\s(k88)\sbuild/i],[k,[A,"ZTE"],[x,M]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[k,[A,"Swiss"],[x,n]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[k,[A,"Swiss"],[x,M]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[k,[A,"Zeki"],[x,M]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[A,"Dragon Touch"],k,[x,M]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[k,[A,"Insignia"],[x,M]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[k,[A,"NextBook"],[x,M]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[A,"Voice"],k,[x,n]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[A,"LvTel"],k,[x,n]],[/android.+;\s(PH-1)\s/i],[k,[A,"Essential"],[x,n]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[k,[A,"Envizen"],[x,M]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[A,k,[x,M]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[k,[A,"MachSpeed"],[x,M]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[A,k,[x,M]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[k,[A,"Rotor"],[x,M]],[/android.+(KS(.+))\s+build/i],[k,[A,"Amazon"],[x,M]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[A,k,[x,M]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[x,P.util.lowerize],A,k],[/[\s\/\(](smart-?tv)[;\)]/i],[[x,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[k,[A,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[b,[N,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[N,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[N,b],[/rv\:([\w\.]{1,9}).+(gecko)/i],[b,N]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[N,b],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[N,P.mapper.str,P.maps.os.windows],[b,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[b,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[N,"BlackBerry"],b],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[N,b],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[N,"Symbian"],b],[/\((series40);/i],[N],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[N,"Firefox OS"],b],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[N,"Linux"],b],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[N,"Chromium OS"],b],[/(sunos)\s?([\w\.\d]*)/i],[[N,"Solaris"],b],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[N,"Linux"],b],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iPhone"],[b,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iPad"],[b,/_/g,"."]],[/(haiku)\s(\w+)/i],[N,b],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[b,/_/g,"."],[N,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[N,"Mac"],[b,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[N,b]]},P),q_=(II.generate=function(e){i=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:i={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:i,screen:{width:"",height:""}}:e;var t,r,n,o,i,s=Y_.parse(i.navigator.userAgent),a=s.browser,u=s.os,s=s.device,c=(i.location.protocol||"").replace(":",""),l=i.screen,p=(null==(p=i.navigator.languages)?void 0:p[0])||"",f=p.split("-")[0],d=(null!=(d=s.type)?d:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=u.name||"",y="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,y=null!=(o=null==(n=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?o:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:a.name||"",browserMajorVersion:a.major||"",browserVersion:a.version||"",osName:h,osVersion:u.version||"",deviceModel:s.model||"",deviceType:d,deviceVendor:s.vendor||"",deviceBrand:s.vendor||"",locale:p,language:f,orientation:y,userAgent:i.navigator.userAgent||"",pagePath:i.location.pathname||"",pageTitle:i.document.title||"",host:i.location.host||"",protocol:c,referrer:i.document.referrer||"",queryParameter:i.location.search||"",screenWidth:l.width||"",screenHeight:l.height||"",timeZone:v}},II),$_=(AI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return W_.of(Z_(e,this.hackleDeviceId),K_.empty())},AI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(AI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),AI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},AI.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},AI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},AI.prototype.hackleUser=function(e){var t=(new At).addIdentifiers(e.user.identifiers||{}).add(bt.ID,e.user.id||this.hackleDeviceId).add(bt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(bt.HACKLE_DEVICE,this.hackleDeviceId);return a.isNotNullOrUndefined(e.user.userId)&&t.add(bt.USER,e.user.userId),{identifiers:t.build(),properties:e.user.properties||{},hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},AI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?q_.generate(window):e)||{}},AI.prototype.setUser=function(e){return this.updateUser(e).user},AI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},AI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},AI.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},AI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},AI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},AI.prototype.saveUser=function(e){this.storage.saveUser(e)},AI.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,H_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},AI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=Z_(r,n.hackleDeviceId),H_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},AI.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},AI.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},AI.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},AI),X_=(bI.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},bI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(bI.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(bI.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),bI.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},bI.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},bI.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},bI),W_=(_I.of=function(e,t){return new _I(e,t.filterBy(e))},_I.prototype.with=function(e){return _I.of(e,this.cohorts.filterBy(e))},_I.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return _I.of(this.user,e)},_I),Z_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},Q_=(Object.defineProperty(TI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:TI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(TI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),TI.prototype.addListener=function(e){this.sessionListeners.push(e)},TI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},TI.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},TI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},TI.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},TI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(De.v4().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},TI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},TI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},TI.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},TI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},TI.EMPTY_SESSION_ID="0.ffffffff",TI),eb=(wI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},wI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},wI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},wI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},wI),tb=(EI.postfix=function(e,t){return new EI(e,function(e){return"".concat(e).concat(t)})},EI.prefix=function(e,t){return new EI(e,function(e){return"".concat(t).concat(e)})},EI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},EI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},EI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},EI),rb=(gI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},gI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},gI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},gI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),o=0;return n.findIndex(function(e){return(o+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},gI.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},gI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},gI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),o=((r={})[e]=t,r);if(!this.isAddableItem(o)){var i=this.getVictimIndex(o);if(i<0)return;n=n.slice(i+1)}var s=JSON.stringify(n.concat(o));this.delegate.setItem(this.listKey,s)}catch(e){}},gI.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},gI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),o=JSON.stringify(n);this.delegate.setItem(this.listKey,o)}catch(t){}},gI.prototype.clear=function(){this.delegate.removeItem(this.listKey)},gI),nb=(mI.prototype.currentUser=function(){return this.userManager.resolve()},mI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},mI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},mI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},mI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},mI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},mI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},mI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},mI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},mI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},mI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},mI.prototype.increment=function(e,t){$n.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},mI),ob=(vI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},vI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},vI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},vI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},vI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},vI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},vI.monitoring=function(e){return"".concat(e,"/metrics")},vI),ib=(yI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},yI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},yI.prototype.key=function(e){return"".concat(e.key)},yI),sb=(hI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},hI),ab=(dI.prototype.handle=function(e,t){e.close()},dI.prototype.supports=function(e){return"CLOSE"===e.type},dI),ub=(fI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},fI.prototype.supports=function(e){return"WEB_LINK"===e.type},fI),cb=(pI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},pI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},pI),lb=(lI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+lI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},lI.prototype.supports=function(e){return"HIDDEN"===e.type},lI.HIDE_EXPIRATION=864e5,lI),pb=(cI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},cI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},cI),fb=(uI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},uI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},uI),db=(aI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},aI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},aI),hb=(sI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){o.log.error("Invalid url: ".concat(t.value))}},sI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},sI),yb=(iI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},iI.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c({in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})},t.properties)};case"CLOSE":return{key:"$in_app_close",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key}};case"ACTION":return{key:"$in_app_action",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:e.action.type,action_area:e.area,action_value:e.action.value,button_text:e.text}}}},iI),vb=(oI.prototype.present=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})},oI),mb=(nI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},nI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},nI),gb=(rI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var o=n[r];if(this.eventMatcher.matches(t,o,e)){o=this.context(o,e);if(o)return o}}},rI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new B_(e.inAppMessage,e.message,t.user,Xe.sanitize({decision_reason:e.reason}))},rI),Eb=(tI.prototype.open=function(){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(tI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(tI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson()})];case 2:return e.sent(),t.classList.remove("".concat(tI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},tI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(tI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},tI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(tI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},tI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},tI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},tI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},tI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",tI.CONTAINER_CLASS_NAME="hackle-iam",tI),wb=(eI.prototype.create=function(e,t){return new Eb(this.scriptLoader,e,t)},eI),Tb=(QA.prototype.load=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},QA.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},QA.prototype.waitForLoad=function(i){return new Promise(function(e,t){function r(){i.removeEventListener("error",o),i.removeEventListener("load",n)}var n=function(){r(),e(i)},o=function(e){r(),t(e.message)};i.addEventListener("load",n),i.addEventListener("error",o)})},QA),_b=(ZA.prototype.isTriggerTarget=function(t,r,n){var o=this;return r.eventTrigger.rules.some(function(e){return o.ruleMatches(t,n,r,e)})},ZA.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=bb.of(e,t,r);return this.targetMatcher.anyMatches(e,$E.create(),n.targets)},ZA),bb=(WA.of=function(e,t,r){return new WA(new qE("IN_APP_MESSAGE",r.key),e,t.user,t)},WA),Ab=(XA.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var o=0,i=this.storage.get(t);o<i.length;o++)for(var s=i[o],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},XA.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var o=n[r];t.push(new Ib(new Ob(o)))}return e.durationCap&&t.push(new Ib(new Nb(e.durationCap))),t},XA),Ib=($A.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},$A),Ob=(Object.defineProperty(qA.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),qA.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t},qA),Nb=(Object.defineProperty(YA.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),YA.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},YA),Rb=(JA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},JA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},JA),Cb=(KA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},KA),Sb=(GA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},GA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>GA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-GA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},GA.prototype.supports=function(e){return"IMPRESSION"===e.type},GA.IMPRESSION_MAX_SIZE=100,GA),xb=(zA.prototype.process=function(e,t,r){},zA.prototype.supports=function(e){return"CLOSE"===e.type},zA),Mb=(BA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},BA.prototype.supports=function(e){return"ACTION"===e.type},BA),kb=(HA.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)},HA),Pb=(VA.prototype.matches=function(e,t,r){return!!DE.isTrack(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},VA),Ub=(jA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},jA),Db=(FA.prototype.handle=function(e,t){e.close()},FA.prototype.supports=function(e){return"CLOSE"===e.type},FA),Lb=(LA.prototype.handle=function(e,t){var r=Jr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},LA.prototype.supports=function(e){return"ACTION"===e.type},LA),Fb=(DA.prototype.open=function(e){window.location.href=e.href},DA),jb=(UA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},UA),Vb=(PA.prototype.open=function(e){window.open(e.href)},PA),Hb={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},Bb={current:void 0,referrer:void 0},zb=(kA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},Hb),t),n=new Bo,o=0,i=Object.entries(t);o<i.length;o++){var s=i[o],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},kA.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),o=this.parser.parse(),i=this.parser.parseDomain();r=o,i=i,null!==(n=n)&&(z_(r,Hb)&&i.current===i.referrer||z_(n,r))||(this.storage.set(o),this.startNewCampaign(e,o,t))},kA.prototype.onSessionEnded=function(e,t,r){},kA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},kA),Gb=(MA.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},MA.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},MA),Kb=(xA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},xA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var o=n[r].split("="),i=o[0],o=o[1];e&&!e(i,o)||(t[i]=decodeURIComponent(o))}return t},xA.getQueryParams=function(){return"undefined"==typeof window?{}:new xA(window.location.search).getQueryParams()},xA),Jb=(SA.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},SA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,SA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,SA),Yb=(CA.prototype.parse=function(){var e=Kb.getQueryParams();return{utm_campaign:e[qb],utm_content:e[$b],utm_id:e[Xb],utm_medium:e[Wb],utm_source:e[Zb],utm_term:e[Qb],gclid:e[eA],fbclid:e[tA]}},CA.prototype.parseDomain=function(){return"undefined"==typeof window?Bb:{current:Jb.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,Jb.extractDomain(e)}()}},CA),qb="utm_campaign",$b="utm_content",Xb="utm_id",Wb="utm_medium",Zb="utm_source",Qb="utm_term",eA="gclid",tA="fbclid",rA=(RA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},RA.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){o.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},RA),nA=(NA.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!(t&&t.getAttributes().integration_ga_experiment&&DE.isExposure(e))||"RUNNING"!==e.experiment.status||e.decisionReason!==f.TRAFFIC_ALLOCATED?null:e},NA),oA={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.24.2",IAM_RENDERER_VERSION_HEADER:"0.0.3"},iA=(OA.config=function(e){return c(c({},oA),e)},OA.logging=function(e){o.initCounter(function(e){return $n.counter("log",{level:e})}),o.setLogLevel(Fe.INFO),e.log_disabled?o.setLogLevel(Fe.DISABLE):e.debug&&o.setLogLevel(Fe.DEBUG)},OA.sdk=function(e,t){return o.log.debug("SDK key: ".concat(e)),e||o.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},OA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&o.log.debug("support sendBeacon API"),e},OA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},OA.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(o.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},OA),sA=(IA.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},IA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t=this;return u(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},IA.prototype.syncOnly=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},IA.prototype.close=function(){return s(this,void 0,void 0,function(){var t=this;return u(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},IA.prototype.safe=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},IA),aA=(AA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},AA.prototype.syncOnly=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),o.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},AA.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},AA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},AA.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},AA),uA=(bA.prototype.schedule=function(e,t){e=new cA(e,t);return e.start(),e},bA.prototype.schedulePeriodically=function(e,t,r){e=new lA(e,t,r);return e.start(),e},bA),cA=(_A.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},_A.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},_A),lA=(TA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},TA.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},TA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},TA),pA=(wA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},wA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},wA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},wA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},wA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},wA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},wA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},wA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},wA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},wA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},wA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},wA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},wA.prototype.getAttributes=function(){return this.attributes},wA.from=function(e){return new wA(p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return gt.fromJson("FEATURE_FLAG",e)}),e.buckets.map(wt.fromJson),e.events.map(_t.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(Mt.fromJson),e.parameterConfigurations.map(mt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Pt.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,Or.fromJson),e.workspace.attributes)},wA),fA=(EA.prototype.fetchIfModified=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return t=this.createRequest(),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},EA.prototype.createRequest=function(){var e=Wn.builder().url(this.url).method("GET");return null!==this.lastModified&&e.addHeader(eo.IF_MODIFIED_SINCE,this.lastModified),e.build()},EA.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),oo.record("get.workspace",t,null),r;case 4:return[2]}})})},EA.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");this.lastModified=e.headers.get(eo.LAST_MODIFIED);e=JSON.parse(e.body);return pA.from(e)},EA),dA=(gA.prototype.fetch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},gA.prototype.createRequest=function(e){e={identifiers:lt(e)},e=Le.Base64.encodeURL(JSON.stringify(e));return Wn.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},gA.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),oo.record("get.cohorts",t,null),r;case 4:return[2]}})})},gA.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return K_.fromDto(e)},gA),hA=(mA.prototype.get=function(){return this.workspace},mA.prototype.sync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.httpWorkspaceFetcher.fetchIfModified()];case 1:return(t=e.sent())&&(this.workspace=t),[3,3];case 2:return t=e.sent(),o.log.error("Failed to fetch workspace: ".concat(t)),[3,3];case 3:return[2]}})})},mA.prototype.close=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},mA),yA=(vA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},vA.prototype.shutdownDispatch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.shutdownTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},vA.prototype.normalDispatch=function(r){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})},vA);function vA(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}function mA(e){this.httpWorkspaceFetcher=e,this.workspace=null}function gA(e,t){this.url=e,this.transport=t}function EA(e,t){this.url=e,this.transport=t,this.lastModified=null}function wA(e,t,r,n,o,i,s,a,u,c){this.experiments=p.associateBy(e,function(e){return e.key}),this.featureFlags=p.associateBy(t,function(e){return e.key}),this.buckets=p.associateBy(r,function(e){return e.id}),this.eventTypes=p.associateBy(n,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(i,function(e){return e.id}),this.parameterConfigurations=p.associateBy(s,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(a,function(e){return e.key}),this.inAppMessages=p.associateBy(u,function(e){return e.key}),this.attributes=c}function TA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}function _A(e,t){this.delayMillis=e,this.task=t,this.timeout=null}function bA(){}function AA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}function IA(){this.synchronizations=[]}function OA(){}function NA(e){this.workspaceFetcher=e}function RA(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}function CA(){}function SA(){}function xA(e){this.search=e}function MA(e){this.storage=e}function kA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}function PA(){}function UA(){}function DA(){}function LA(e){this.eventHandler=e}function FA(){}function jA(e){this.handlers=e}function VA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function HA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function BA(e){this.actionHandlerFactory=e}function zA(){}function GA(e){this.impressionStorage=e}function KA(e){this.processors=e}function JA(e){this.storage=e}function YA(e){this.durationCap=e}function qA(e){this.identifierCap=e}function $A(e){this.matchCount=0,this.predicate=e}function XA(e){this.storage=e}function WA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function ZA(e){this.targetMatcher=e}function QA(e){this.scriptUrl=e}function eI(e){this.scriptLoader=e}function tI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===tI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function rI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function nI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}function oI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function iI(e){this.core=e}function sI(e){this.urlHandler=e}function aI(e){this.urlHandler=e}function uI(e){this.urlHandler=e}function cI(e){this.urlHandler=e}function lI(e,t){this.storage=e,this.clock=t}function pI(e){this.urlHandler=e}function fI(e){this.urlHandler=e}function dI(){}function hI(e){this.handlers=e}function yI(e){this.storage=e}function vI(){}function mI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}function gI(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}function EI(e,t){this.delegate=e,this.transform=t}function wI(){this.storage=window.localStorage}function TI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function _I(e,t){this.user=e,this.cohorts=t}function bI(e){this.storage=e}function AI(e,t,r,n,o,i){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.clock=n,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,i),this.storage.saveUser(this.context.user)}function II(){}function P(){}function OI(e){this.cohorts=new Nn(qe.isEqual),e&&this.putAll(e)}function NI(e){this.cohorts=e}function RI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}GI.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},GI.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof DE?DE.isExposure(e)?t.push(e.toDto()):DE.isTrack(e)?r.push(e.toDto()):DE.isRemoteConfig(e)&&n.push(e.toDto()):DE.isExposureDto(e)?t.push(e):DE.isTrackDto(e)?r.push(e):DE.isRemoteConfigDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Wn.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},GI.prototype.execute=function(n){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qr.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),oo.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),oo.record("post.events",t,null),r;case 4:return[2]}})})};var CI,SI,xI=GI,MI=(zI.prototype.add=function(e){return this.repository.add(e)},zI.prototype.delete=function(e){return this.repository.delete(e)},zI.prototype.flush=function(){return s(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},zI),kI=(BI.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},BI.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},BI.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},Ke(HI,SI=BI),Ke(VI,CI=HI),VI.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},VI.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},VI.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},VI.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return o.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},VI.prototype.close=function(){this.flush(!0)},VI),PI=(jI.prototype.send=function(e){e=e.toBuilder().addHeader("X-HACKLE-SDK-KEY",this.sdk.key).addHeader("X-HACKLE-SDK-NAME",this.sdk.name).addHeader("X-HACKLE-SDK-VERSION",this.sdk.version).addHeader("X-HACKLE-SDK-TIME",this.clock.currentMillis().toString()).build();return this.delegate.send(e)},jI),UI=(FI.intercept=function(e,t){return t instanceof PI?t:new PI(e,Qe.instance,t)},FI),DI=(LI.create=function(){return new LI},LI.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,o=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0!==n.status?(e=new Qn(n.status,n.responseText,function(e){var t=eo.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var o,i=n[r],s=i.indexOf(": ");0<s&&(o=i.slice(0,s),i=i.slice(s+2),t.add(o,i))}return t.build()}(n)),t(e)):r(new Error("Request Error")))},n),i=s.headers.raw();for(e in i)i.hasOwnProperty(e)&&o.setRequestHeader(e,i[e]);n.send(s.body)})},LI);function LI(){}function FI(){}function jI(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}function VI(e,t,r,n){var o=CI.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.queue=[],o.flushingJob=null,o}function HI(){return null!==SI&&SI.apply(this,arguments)||this}function BI(){this.listeners={}}function zI(e,t){this.repository=e,this.transport=t}function GI(e,t){this.url=e,this.transport=t}WI.create=function(){return new WI},WI.prototype.send=function(n){var o=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=o.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(Qn.ok())})},WI.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get("X-HACKLE-SDK-KEY");return r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault("X-HACKLE-SDK-NAME","unknown")),t.append("sdkVersion",e.headers.getOrDefault("X-HACKLE-SDK-VERSION","unknown")),e.body&&t.append("data",e.body),t};var KI,JI=WI,YI=(XI.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)},XI),qI=($I.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)},$I);function $I(e){this.invocationResponseResolver=e}function XI(e){this.invocationResponseResolver=e}function WI(){}(as=KI=KI||{}).prompt="prompt",as.function="function";t1.prototype.getInvocator=function(e,t){return e===KI.prompt?new YI(t):e===KI.function?new qI(t):null};var ZI=t1,QI=o.log,e1=null;function t1(){}function r1(e,t){var o=iA.config(t);iA.logging(o);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&"getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&"getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType&&e===window._hackleApp.getAppSdkKey()){i=window._hackleApp.getInvocationType();var r=null===(s=(new ZI).getInvocator(i,new $o))?(_i.error("Failed to get invocator with invocationType:".concat(i)),null):new Ii(new Ti(s));if(r)return r}}catch(e){QI.error("Unexpected exception while check WebApp client: ".concat(e))}t=iA.sdk(e,o);if(e1)return QI.debug("use already exists hackleClient"),e1;Wo.initialize();var n=new eb,i=Xo.getInstance({days:3650,isCrossSubdomain:!0,sameSite:o.sameSiteCookie,isSecure:o.secureCookie}),s=iA.isBeaconSupported(),r=UI.intercept(t,DI.create()),a=UI.intercept(t,JI.create()),u=r,c=(s&&(u=a),new sA),l=new aA(c,new uA,iA.pollingIntervalMillis(o)),p=new fA(ob.clientFetch(o.sdkUrl,t.key),r),p=new hA(p),f=(c.add("workspace",p),new dA(ob.userCohorts(o.sdkUrl),r)),d=new X_(tb.postfix(i,"_".concat(e))),h=d.getUser(),y=o.user||null,v=new $_(mi(),d,f,Qe.instance,h,y),m=(c.add("cohort",v),new Q_(o.sessionTimeoutMillis,tb.postfix(i,"_".concat(e.slice(8))))),d=(v.addListener(m),new G_(n,"".concat("hackle-repository-storage","_").concat(e),100)),f=new xI(ob.clientDispatch(o.eventUrl),r),y=f,g=(s&&(y=new xI(ob.beaconDispatch(o.eventUrl,t.key),a)),new MI(d,f)),c=new yA(f,y,g),s=new BE(iA.dedupIntervalMillis(o)),t=new kI(c,100,new uA,500),a=new HE(t,s,m,v),d=new ew(new rb(i,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),f=new ew(new rb(i,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),y=new ib(tb.prefix(n,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),c=new Rb(tb.prefix(n,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),E=tT.create(p,a,[d,f],y),s=new zb(new Gb(tb.postfix(i,"_".concat(e.slice(0,8)))),new Yb,E,v),n=new VE(v,E),a=(m.addListener(s),m.addListener(n),new yb(E)),i=new sb([new ab,new ub(new Fb),new cb(new Fb),new lb(y,Qe.instance),new pb(new jb),new fb(new jb),new db(new Vb),new hb(new Vb)]),n=new Cb([new Sb(c),new Mb(i),new xb]),y=new kb(Qe.instance,a,n),i=new Ub([new Db,new Lb(y)]),a=new Tb(ob.inAppMessageRenderer(o.cdnUrl,o.IAM_RENDERER_VERSION_HEADER)),n=new vb(new wb(a),y,i),a=new Pb(new _b($w.get("targetMatcher")),new Ab(c)),y=new gb(p,a,E),i=(new mb(t,y,n),new nA(p)),c=(new rA(t,i),new nb(E,v,d,f)),n=(null==(a=o.devTool)?void 0:a.userExplorer)&&"function"==typeof(null==(y=o.devTool)?void 0:y.userExplorer),p=o.devTool&&n?{manager:o.devTool,userExplorer:c}:void 0,t=new ro(ob.monitoring(o.monitoringUrl),r,u,new uA,6e4),w=($n.addRegistry(t),l.start(),new Jo(E,l,m,v,p));e1=w;function T(){g.flush().catch(function(e){return QI.warn("Failed to flush retry events: ".concat(e))})}return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){Ei(),m.updateLastEventTime((new Date).getTime()),w.close(),$n.globalRegistry.close()}),window.addEventListener("pageshow",T),document.addEventListener("visibilitychange",function(){document.hidden||T()}),o.autoOpenDevTool&&(o.devTool?w.showUserExplorer():QI.error("DevTool is not provided")),i=Date.now(),d=v.currentUser,f=m.currentSessionId,(H_(h,d)?m.startNewSessionIfNeeded(d,i):m.startNewSession(h,d,i))===f&&s.startNewCampaignIfNeeded(d,i),w.onReady(function(){(new nT).install(E,v);var t,r,e=w;if(o.auto_track_page_view){e.trackPageView();try{history.pushState=(r=history.pushState,function(){try{var e=r.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),history.replaceState=(t=history.replaceState,function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)QI.error(e);else try{QI.error(e)}catch(e){}}}function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t,r,n),o}}),w}var Gi={createInstance:r1,getUserId:mi,setUserId:gi,removeUserId:Ei,Logger:o},n1=(l.Bucket=t.Bucket=wt,l.Cohort=t.Cohort=ar,l.Container=t.Container=Mt,l.ContainerGroup=t.ContainerGroup=kt,l.CoreVersion=t.CoreVersion=cr,l.Decision=t.Decision=ht,l.DecisionReason=t.DecisionReason=f,l.EmptyHackleRemoteConfig=t.EmptyHackleRemoteConfig=vt,l.EmptyParameterConfig=t.EmptyParameterConfig=et,l.EventType=t.EventType=_t,l.Experiment=t.Experiment=gt,l.FeatureFlagDecision=t.FeatureFlagDecision=yt,l.IAM_ACTION_AREA=t.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],l.IAM_ACTION_TYPE=t.IAM_ACTION_TYPE=Ir,l.IAM_BEHAVIOR=t.IAM_BEHAVIOR=Ar,l.IAM_DISPLAY_TYPE=t.IAM_DISPLAY_TYPE=Tr,l.IAM_LAYOUT_TYPE=t.IAM_LAYOUT_TYPE=_r,l.IAM_ORIENTATION=t.IAM_ORIENTATION=br,l.IAM_PLATFORM_TYPE=t.IAM_PLATFORM_TYPE=Er,l.IAM_STATUS=t.IAM_STATUS=gr,l.IAM_TIMEUNIT=t.IAM_TIMEUNIT=wr,l.IdentifierType=t.IdentifierType=bt,l.IdentifiersBuilder=t.IdentifiersBuilder=At,l.InAppMessage=t.InAppMessage=Or,l.InAppMessageAction=t.InAppMessageAction=Jr,l.InAppMessageBackground=t.InAppMessageBackground=Kr,l.InAppMessageButton=t.InAppMessageButton=zr,l.InAppMessageButtonStyle=t.InAppMessageButtonStyle=Gr,l.InAppMessageContext=t.InAppMessageContext=Dr,l.InAppMessageContextLayout=t.InAppMessageContextLayout=Fr,l.InAppMessageContextMessage=t.InAppMessageContextMessage=Lr,l.InAppMessageDecision=t.InAppMessageDecision=dt,l.InAppMessageDurationCap=t.InAppMessageDurationCap=kr,l.InAppMessageEventFrequencyCap=t.InAppMessageEventFrequencyCap=xr,l.InAppMessageEventTrigger=t.InAppMessageEventTrigger=Cr,l.InAppMessageEventTriggerRule=t.InAppMessageEventTriggerRule=Sr,l.InAppMessageIdentifierCap=t.InAppMessageIdentifierCap=Mr,l.InAppMessageImage=t.InAppMessageImage=jr,l.InAppMessagePeriodAlways=t.InAppMessagePeriodAlways=Nr,l.InAppMessagePeriodCustom=t.InAppMessagePeriodCustom=Rr,l.InAppMessageTargetContext=t.InAppMessageTargetContext=Pr,l.InAppMessageText=t.InAppMessageText=Vr,l.InAppMessageTextAttribute=t.InAppMessageTextAttribute=Hr,l.InAppMessageTextStyle=t.InAppMessageTextStyle=Br,l.InAppMessageUserOverride=t.InAppMessageUserOverride=Ur,l.Logger=t.Logger=o,l.MATCH_OPERATORS=t.MATCH_OPERATORS=dr,l.MATCH_TYPES=t.MATCH_TYPES=pr,l.MATCH_VALUE_TYPES=t.MATCH_VALUE_TYPES=fr,l.MetaVersion=t.MetaVersion=lr,l.ParameterConfiguration=t.ParameterConfiguration=mt,l.PropertyOperations=t.PropertyOperations=zo,l.PropertyOperationsBuilder=t.PropertyOperationsBuilder=Bo,l.RemoteConfigDecision=t.RemoteConfigDecision=ft,l.RemoteConfigParameter=t.RemoteConfigParameter=Pt,l.RemoteConfigParameterValue=t.RemoteConfigParameterValue=Dt,l.RemoteConfigTargetRule=t.RemoteConfigTargetRule=Ut,l.SEGMENT_TYPES=t.SEGMENT_TYPES=vr,l.Segment=t.Segment=xt,l.Slot=t.Slot=Tt,l.TARGET_ACTION_TYPES=t.TARGET_ACTION_TYPES=hr,l.TARGET_KEY_TYPES=t.TARGET_KEY_TYPES=yr,l.Target=t.Target=It,l.TargetAction=t.TargetAction=Ct,l.TargetCondition=t.TargetCondition=Ot,l.TargetKey=t.TargetKey=Nt,l.TargetMatch=t.TargetMatch=Rt,l.TargetRule=t.TargetRule=St,l.TargetingType=t.TargetingType=mr,l.Variation=t.Variation=Et,l.Version=t.Version=ur,Ue=t.createInstance=r1,t.default=Gi,l.getUserId=t.getUserId=mi,l.removeUserId=t.removeUserId=Ei,l.resolveIdentifiers=t.resolveIdentifiers=lt,l.sanitizeUser=t.sanitizeUser=pt,l.setUserId=t.setUserId=gi,function(e,t){return(n1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)});var o1=function(){return(o1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i1(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}s1.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},s1.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},s1.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Zf=s1;function s1(){this.listeners={}}u1.arePropertiesEqual=function(e,t){var r=u1.coerceUnknownToProperties(e),n=u1.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},u1.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var a1=u1;function u1(){}l1.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&a1.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&a1.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var c1=l1;function l1(){}var p1=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function o(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=Ue(e,o1(o1({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.24.2"})),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return n1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),o.prototype.getUser=function(){return this.client.getUser()},o.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},o.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},o.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},o.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},o.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},o.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},o.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},o.prototype.track=function(e,t){this.client.track(e,t||void 0)},o.prototype.trackPageView=function(e){this.client.trackPageView(o1(o1({},e),{user:(null==e?void 0:e.user)||void 0}))},o.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},o.prototype.onReady=function(e,t){this.client.onReady(e,t)},o.prototype.onInitialized=function(e){return this.client.onInitialized(e)},o.prototype.emitUpdatedUser=function(e){c1.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},o.prototype.showUserExplorer=function(){this.client.showUserExplorer()},o.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},o}(Zf);var U={exports:{}},R={},f1=Object.getOwnPropertySymbols,d1=Object.prototype.hasOwnProperty,h1=Object.prototype.propertyIsEnumerable;var E=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))d1.call(r,i)&&(n[i]=r[i]);if(f1)for(var s=f1(r),a=0;a<s.length;a++)h1.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},y1=E,Gl="function"==typeof Symbol&&Symbol.for,v1=Gl?Symbol.for("react.element"):60103,m1=Gl?Symbol.for("react.portal"):60106,Vl=Gl?Symbol.for("react.fragment"):60107,g1=Gl?Symbol.for("react.strict_mode"):60108,ss=Gl?Symbol.for("react.profiler"):60114,E1=Gl?Symbol.for("react.provider"):60109,w1=Gl?Symbol.for("react.context"):60110,T1=Gl?Symbol.for("react.forward_ref"):60112,ds=Gl?Symbol.for("react.suspense"):60113,_1=Gl?Symbol.for("react.memo"):60115,b1=Gl?Symbol.for("react.lazy"):60116,A1="function"==typeof Symbol&&Symbol.iterator;function I1(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var O1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N1={};function R1(e,t,r){this.props=e,this.context=t,this.refs=N1,this.updater=r||O1}function C1(){}function S1(e,t,r){this.props=e,this.context=t,this.refs=N1,this.updater=r||O1}R1.prototype.isReactComponent={},R1.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(I1(85));this.updater.enqueueSetState(this,e,t,"setState")},R1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C1.prototype=R1.prototype;var Ps=S1.prototype=new C1,x1=(Ps.constructor=S1,y1(Ps,R1.prototype),Ps.isPureReactComponent=!0,{current:null}),M1=Object.prototype.hasOwnProperty,k1={key:!0,ref:!0,__self:!0,__source:!0};function P1(e,t,r){var n,o={},i=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)M1.call(t,n)&&!k1.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(1===a)o.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===o[n]&&(o[n]=a[n]);return{$$typeof:v1,type:e,key:i,ref:s,props:o,_owner:x1.current}}function U1(e){return"object"==typeof e&&null!==e&&e.$$typeof===v1}var D1=/\/+/g,L1=[];function F1(e,t,r,n){var o;return L1.length?((o=L1.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function j1(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,L1.length<10&&L1.push(e)}function V1(e,t,r){return null==e?0:function e(t,r,n,o){var i=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case v1:case m1:i=!0}}if(i)return n(o,t,""===r?"."+H1(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+H1(a=t[s],s);i+=e(a,u,n,o)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=A1&&t[A1]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)i+=e(a=a.value,u=r+H1(a,s++),n,o);else if("object"===a)throw n=""+t,Error(I1(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return i}(e,"",t,r)}function H1(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function B1(e,t){e.func.call(e.context,t,e.count++)}function z1(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?G1(e,n,r,function(e){return e}):null!=e&&(U1(e)&&(t=o+(!(o=e).key||t&&t.key===e.key?"":(""+e.key).replace(D1,"$&/")+"/")+r,e={$$typeof:v1,type:o.type,key:t,ref:o.ref,props:o.props,_owner:o._owner}),n.push(e))}function G1(e,t,r,n,o){var i="";V1(e,z1,t=F1(t,i=null!=r?(""+r).replace(D1,"$&/")+"/":i,n,o)),j1(t)}var K1={current:null};function J1(){var e=K1.current;if(null===e)throw Error(I1(321));return e}var Y1,q1,$1,rc={ReactCurrentDispatcher:K1,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:x1,IsSomeRendererActing:{current:!1},assign:y1},v=(R.Children={map:function(e,t,r){if(null==e)return e;var n=[];return G1(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;V1(e,B1,t=F1(null,null,t,r)),j1(t)},count:function(e){return V1(e,function(){return null},null)},toArray:function(e){var t=[];return G1(e,t,null,function(e){return e}),t},only:function(e){if(U1(e))return e;throw Error(I1(143))}},R.Component=R1,R.Fragment=Vl,R.Profiler=ss,R.PureComponent=S1,R.StrictMode=g1,R.Suspense=ds,R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rc,R.cloneElement=function(e,t,r){if(null==e)throw Error(I1(267,e));var n=y1({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref,s=x1.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)M1.call(t,a)&&!k1.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:v1,type:e.type,key:o,ref:i,props:n,_owner:s}},R.createContext=function(e,t){return(e={$$typeof:w1,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:E1,_context:e},e.Consumer=e},R.createElement=P1,R.createFactory=function(e){var t=P1.bind(null,e);return t.type=e,t},R.createRef=function(){return{current:null}},R.forwardRef=function(e){return{$$typeof:T1,render:e}},R.isValidElement=U1,R.lazy=function(e){return{$$typeof:b1,_ctor:e,_status:-1,_result:null}},R.memo=function(e,t){return{$$typeof:_1,type:e,compare:void 0===t?null:t}},R.useCallback=function(e,t){return J1().useCallback(e,t)},R.useContext=function(e,t){return J1().useContext(e,t)},R.useDebugValue=function(){},R.useEffect=function(e,t){return J1().useEffect(e,t)},R.useImperativeHandle=function(e,t,r){return J1().useImperativeHandle(e,t,r)},R.useLayoutEffect=function(e,t){return J1().useLayoutEffect(e,t)},R.useMemo=function(e,t){return J1().useMemo(e,t)},R.useReducer=function(e,t,r){return J1().useReducer(e,t,r)},R.useRef=function(e){return J1().useRef(e)},R.useState=function(e){return J1().useState(e)},R.version="16.14.0",{}),Ga=Function.call.bind(Object.prototype.hasOwnProperty),X1=function(){};function W1(e,t,r,n,o){if("production"!==production)for(var i in e)if($1(e,i)){var s,a;try{if("function"!=typeof e[i])throw(a=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[i](t,i,n,r,null,Y1)}catch(e){s=e}!s||s instanceof Error||X1((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in q1)&&(q1[s.message]=!0,i=o?o():"",X1("Failed "+r+" type: "+s.message+(null!=i?i:"")))}}if("production"!==production&&(Y1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",q1={},$1=Ga,X1=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),W1.resetWarningCache=function(){"production"!==production&&(q1={})},"production"!==production){var Z1=E,Q1=W1,y="function"==typeof Symbol&&Symbol.for,eO=y?Symbol.for("react.element"):60103,tO=y?Symbol.for("react.portal"):60106,rO=y?Symbol.for("react.fragment"):60107,nO=y?Symbol.for("react.strict_mode"):60108,oO=y?Symbol.for("react.profiler"):60114,iO=y?Symbol.for("react.provider"):60109,sO=y?Symbol.for("react.context"):60110,aO=y?Symbol.for("react.concurrent_mode"):60111,uO=y?Symbol.for("react.forward_ref"):60112,cO=y?Symbol.for("react.suspense"):60113,lO=y?Symbol.for("react.suspense_list"):60120,pO=y?Symbol.for("react.memo"):60115,fO=y?Symbol.for("react.lazy"):60116,dO=y?Symbol.for("react.block"):60121,hO=y?Symbol.for("react.fundamental"):60117,yO=y?Symbol.for("react.responder"):60118,vO=y?Symbol.for("react.scope"):60119,mO="function"==typeof Symbol&&Symbol.iterator,gO="@@iterator";function EO(e){if(null===e||"object"!=typeof e)return null;e=mO&&e[mO]||e[gO];return"function"==typeof e?e:null}var wO={current:null},TO={current:null},_O=/^(.*)[\\\/]/,bO=1;function AO(e){if(null==e)return null;if("number"==typeof e.tag&&SO("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case rO:return"Fragment";case tO:return"Portal";case oO:return"Profiler";case nO:return"StrictMode";case cO:return"Suspense";case lO:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case sO:return"Context.Consumer";case iO:return"Context.Provider";case uO:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case pO:return AO(e.type);case dO:return AO(e.render);case fO:r=(t=e)._status===bO?t._result:null;if(r)return AO(r)}var t,r;return null}var IO={},OO=null;function NO(e){OO=e}IO.getCurrentStack=null,IO.getStackAddendum=function(){var e,t,r,n,o,i="",s=(OO&&(e=AO(OO.type),r=OO._owner,i+=(e=e,t=OO._source,r=r&&AO(r.type),o="",t?(n=(s=t.fileName).replace(_O,""),o=" (at "+(n=/^index\./.test(n)&&(s=s.match(_O))&&(s=s[1])?s.replace(_O,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(o=" (created by "+r+")"),"\n in "+(e||"Unknown")+o)),IO.getCurrentStack);return s&&(i+=s()||""),i};var RO={ReactCurrentDispatcher:wO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:TO,IsSomeRendererActing:{current:!1},assign:Z1};function CO(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];xO("warn",e,r)}function SO(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];xO("error",e,r)}function xO(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=RO.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});throw new Error(i)}catch(e){}}Z1(RO,{ReactDebugCurrentFrame:IO,ReactComponentTreeHook:{}});var MO={};function kO(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;MO[r]||(SO("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),MO[r]=!0)}var PO={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){kO(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){kO(e,"replaceState")},enqueueSetState:function(e,t,r,n){kO(e,"setState")}},UO={};function DO(e,t,r){this.props=e,this.context=t,this.refs=UO,this.updater=r||PO}Object.freeze(UO),DO.prototype.isReactComponent={},DO.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},DO.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var LO,FO={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(LO in FO)FO.hasOwnProperty(LO)&&!function(e,t){Object.defineProperty(DO.prototype,e,{get:function(){CO("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(LO,FO[LO]);function jO(){}function VO(e,t,r){this.props=e,this.context=t,this.refs=UO,this.updater=r||PO}jO.prototype=DO.prototype,(y=VO.prototype=new jO).constructor=VO,Z1(y,DO.prototype),y.isPureReactComponent=!0;var HO,BO,zO=Object.prototype.hasOwnProperty,GO={key:!0,ref:!0,__self:!0,__source:!0};function KO(e){if(zO.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function JO(e){if(zO.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var YO={},qO=function(e,t,r,n,o,i,s){e={$$typeof:eO,type:e,key:t,ref:r,props:s,_owner:i,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function $O(e,t,r){var n,o={},i=null,s=null,a=null,u=null;if(null!=t)for(n in KO(t)&&(s=t.ref,"string"==typeof(c=t).ref&&TO.current&&c.__self&&TO.current.stateNode!==c.__self&&(p=AO(TO.current.type),YO[p]||(SO('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',AO(TO.current.type),c.ref),YO[p]=!0))),JO(t)&&(i=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)zO.call(t,n)&&!GO.hasOwnProperty(n)&&(o[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)o.children=r;else if(1<d){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];Object.freeze&&Object.freeze(h),o.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===o[n]&&(o[n]=v[n])}function m(){BO||(BO=!0,SO("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){HO||(HO=!0,SO("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(i||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,i&&(p=o,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=o,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),qO(e,i,s,a,u,TO.current,o)}function XO(e){return"object"==typeof e&&null!==e&&e.$$typeof===eO}var WO=".",ZO=":",QO=!1,eN=/\/+/g;function tN(e){return(""+e).replace(eN,"$&/")}var rN=10,nN=[];function oN(e,t,r,n){var o;return nN.length?((o=nN.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function iN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,nN.length<rN&&nN.push(e)}function sN(e,t,r){return null==e?0:function e(t,r,n,o){var i,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case eO:case tO:a=!0}}if(a)return n(o,t,""===r?WO+aN(t,0):r),1;var u=0,c=""===r?WO:r+ZO;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(i=t[l],c+aN(i,l),n,o);else if("function"==typeof(r=EO(t))){r===t.entries&&(QO||CO("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),QO=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(i=p.value,c+aN(i,d++),n,o)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+IO.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function aN(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function uN(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function cN(e,t,r){var n=e.result,o=e.keyPrefix,i=e.func,s=e.context,i=i.call(s,t,e.count++);Array.isArray(i)?lN(i,n,r,function(e){return e}):null!=i&&(XO(i)&&(e=o+(!(s=i).key||t&&t.key===i.key?"":tN(i.key)+"/")+r,i=qO(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(i))}function lN(e,t,r,n,o){var i="",t=oN(t,i=null!=r?tN(r)+"/":i,n,o);sN(e,cN,t),iN(t)}function pN(e){return"string"==typeof e||"function"==typeof e||e===rO||e===aO||e===oO||e===nO||e===cO||e===lO||"object"==typeof e&&null!==e&&(e.$$typeof===fO||e.$$typeof===pO||e.$$typeof===iO||e.$$typeof===sO||e.$$typeof===uO||e.$$typeof===hO||e.$$typeof===yO||e.$$typeof===vO||e.$$typeof===dO)}function fN(){var e=wO.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function dN(){if(TO.current){var e=AO(TO.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var hN=!1,yN={};function vN(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=dN())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),yN[t=r]||(yN[t]=!0,r="",e&&e._owner&&e._owner!==TO.current&&(r=" It was passed a child from "+AO(e._owner.type)+"."),NO(e),SO('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),NO(null)))}function mN(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];XO(n)&&vN(n,t)}else if(XO(e))e._store&&(e._store.validated=!0);else if(e){var o=EO(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)XO(i.value)&&vN(i.value,t)}}function gN(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=AO(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==uO&&t.$$typeof!==pO)return;r=t.propTypes}r?(NO(e),Q1(r,e.props,"prop",n,IO.getStackAddendum),NO(null)):void 0===t.PropTypes||hN||(hN=!0,SO("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||SO("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function EN(e,t,r){var n,o=pN(e),t=(o||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||dN(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===eO?(s="<"+(AO(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,SO("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),$O.apply(this,arguments));if(null==t)return t;if(o)for(var i=2;i<arguments.length;i++)mN(arguments[i],e);if(e===rO){var s=t;NO(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){SO("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&SO("Invalid attribute `ref` supplied to `React.Fragment`."),NO(null)}else gN(t);return t}var wN=!1;try{var TN=Object.freeze({}),_N=new Map([[TN,null]]),bN=new Set([TN]);_N.set(0,0),bN.add(0)}catch(e){}function AN(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,i=Z1({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in KO(t)&&(a=t.ref,l=TO.current),JO(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)zO.call(t,n)&&!GO.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?i[n]=o[n]:i[n]=t[n]);var p=arguments.length-2;if(1==p)i.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];i.children=f}return qO(e.type,s,a,u,c,l,i)}.apply(this,arguments),o=2;o<arguments.length;o++)mN(arguments[o],n.type);return gN(n),n}function IN(e){var t=EN.bind(null,e);return t.type=e,wN||(wN=!0,CO("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return CO("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}y=EN,v.Children={map:function(e,t,r){if(null==e)return e;var n=[];return lN(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=oN(null,null,t,r),sN(e,uN,t),iN(t)},count:function(e){return sN(e,function(){return null},null)},toArray:function(e){var t=[];return lN(e,t,null,function(e){return e}),t},only:function(e){if(XO(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},v.Component=DO,v.Fragment=rO,v.Profiler=oO,v.PureComponent=VO,v.StrictMode=nO,v.Suspense=cO,v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RO,v.cloneElement=AN,v.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&SO("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:sO,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:iO,_context:r}),o=!1,t={$$typeof:sO,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return o||(o=!0,SO("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,SO("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},v.createElement=y,v.createFactory=IN,v.createRef=function(){var e={current:null};return Object.seal(e),e},v.forwardRef=function(e){return null!=e&&e.$$typeof===pO?SO("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?SO("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&SO("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||SO("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:uO,render:e}},v.isValidElement=XO,v.lazy=function(e){var t,r,n={$$typeof:fO,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){SO("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){SO("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},v.memo=function(e,t){return pN(e)||SO("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:pO,type:e,compare:void 0===t?null:t}},v.useCallback=function(e,t){return fN().useCallback(e,t)},v.useContext=function(e,t){var r,n=fN();return void 0!==t&&SO("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?SO("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&SO("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},v.useDebugValue=function(e,t){return fN().useDebugValue(e,t)},v.useEffect=function(e,t){return fN().useEffect(e,t)},v.useImperativeHandle=function(e,t,r){return fN().useImperativeHandle(e,t,r)},v.useLayoutEffect=function(e,t){return fN().useLayoutEffect(e,t)},v.useMemo=function(e,t){return fN().useMemo(e,t)},v.useReducer=function(e,t,r){return fN().useReducer(e,t,r)},v.useRef=function(e){return fN().useRef(e)},v.useState=function(e){return fN().useState(e)},v.version="16.14.0"}"production"===production?U.exports=R:U.exports=v;var ON=U.exports,NN=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),If=NN.Consumer,RN=NN.Provider;var CN=l.Logger.log;function SN(e,t){e=xN(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function xN(e,t){void 0===t&&(t="A");var r=U.exports.useContext(NN),n=r.hackle,o=r.userVersion,i=r.initialized,s=U.exports.useCallback(function(){return i?(null==n?void 0:n.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION):l.Decision.of(t,l.DecisionReason.SDK_NOT_READY)},[t,e,n,i]),r=i1(U.exports.useState(function(){return n?s():(CN.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],o={key:e,userVersion:o,initialized:i},u=i1(U.exports.useState(o),2),c=u[0],u=u[1];return PN(c,o)||(u(o),r(s())),{isLoading:!i,decision:a}}function MN(e){e=kN(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function kN(e){var t=U.exports.useContext(NN),r=t.hackle,n=t.userVersion,o=t.initialized,i=U.exports.useCallback(function(){return o?(null==r?void 0:r.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION):l.FeatureFlagDecision.off(l.DecisionReason.SDK_NOT_READY)},[e,r,o]),t=i1(U.exports.useState(function(){return r?i():(CN.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:o},a=i1(U.exports.useState(n),2),u=a[0],a=a[1];return PN(u,n)||(a(n),t(i())),{isLoading:!o,decision:s}}function PN(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function UN(e){var t,r=e.experimentKey,e=e.children,n=(r=SN(r)).isLoading,o=r.variation;return n?null:e&&"function"==typeof e?e(o):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?o===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:o}):null)}function DN(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function LN(e){var t=(r=MN(e.featureKey)).isLoading,r=r.isOn;return t?null:ON.createElement(ON.Fragment,null,e.children(r))}l.HackleContext=NN,l.HackleContextConsumer=If,l.HackleContextProvider=RN,l.HackleExperiment=UN,l.HackleFeature=LN,l.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(o=e.timeout)?3e3:o,o=void 0!==(o=e.supportSSR)&&o,e=e.children,i=i1(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=i[0],a=i[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return o1(o1({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return o1(o1({},e),{initialized:!0})})},function(){a(function(e){return o1(o1({},e),{initialized:!0})})}).catch(function(){a(function(e){return o1(o1({},e),{initialized:!0})})})},[t]),o||s.initialized?ON.createElement(RN,{value:s},e):null},l.HackleVariation=DN,l.createInstance=function(e,t){return new p1(e,t)},l.useFeature=function(e){var t=(n=U.exports.useContext(NN)).hackle,r=n.userVersion,n=n.initialized,o=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),i=(s=i1(U.exports.useState(function(){return t?o():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=i1(U.exports.useState(r),2))[0],n=n[1];return PN(a,r)||(n(r),s(o())),i},l.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(NN)).hackle,r=n.userVersion,n=n.initialized,o=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION)},[e,t,n]),i=(s=i1(U.exports.useState(function(){return t?o():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=i1(U.exports.useState(r),2))[0],n=n[1];return PN(a,r)||(n(r),s(o())),i},l.useLoadableFeature=MN,l.useLoadableFeatureDetail=kN,l.useLoadableRemoteConfig=function(){var e=(i=U.exports.useContext(NN)).hackle,t=i.userVersion,r=i.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),o=(i=i1(U.exports.useState(function(){return e||CN.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(a=i1(U.exports.useState(t),2))[0],a=a[1];return PN(s,t)||(a(t),i(n())),{isLoading:!r,remoteConfig:o}},l.useLoadableVariation=SN,l.useLoadableVariationDetail=xN,l.useRemoteConfig=function(){var e=(r=U.exports.useContext(NN)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),o=(i=i1(U.exports.useState(function(){return e||CN.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(r=i1(U.exports.useState(t),2))[0],r=r[1];return PN(s,t)||(r(t),i(n())),o},l.useTrack=function(){var t=U.exports.useContext(NN).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(CN.error("HackleClient is not existed"),function(){})},l.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(NN)).hackle,n=a.userVersion,o=a.initialized,i=U.exports.useCallback(function(){return o&&(null==r?void 0:r.variation(e))||t},[t,e,r,o]),s=(a=i1(U.exports.useState(function(){return r?i():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(c=i1(U.exports.useState(n),2))[0],c=c[1];return PN(u,n)||(c(n),a(i())),s},l.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(o=U.exports.useContext(NN)).hackle,n=o.userVersion,o=o.initialized,i=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION)},[t,e,r,o]),s=(a=i1(U.exports.useState(function(){return r?i():("undefined"!=typeof window&&CN.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(o=i1(U.exports.useState(n),2))[0],o=o[1];return PN(u,n)||(o(n),a(i())),s},Object.defineProperty(l,"__esModule",{value:!0})});