@hackler/react-sdk 11.25.2 → 11.26.0
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.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +1 -1
- package/package.json +2 -2
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(D){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(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 F,l={},j=new Uint8Array(16);function V(){if(F=F||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return F(j);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var H=/^(?:[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 z(e){return"string"==typeof e&&H.test(e)}for(var B,G,K=[],J=0;J<256;++J)K.push((J+256).toString(16).substr(1));function Y(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase();if(z(e))return e;throw TypeError("Stringified UUID is invalid")}var q=0,$=0;function X(e){if(!z(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 W(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?X(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=a(i))[6]=15&i[6]|s,i[8]=63&i[8]|128,r){n=n||0;for(var o=0;o<16;++o)r[n+o]=i[o];return r}return Y(i)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function Z(e){return 14+(e+64>>>9<<4)+1}function Q(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ee(e,t,r,n,i,o){return Q((t=Q(Q(t,e),Q(n,o)))<<i|t>>>32-i,r)}function te(e,t,r,n,i,o,s){return ee(t&r|~t&n,e,t,i,o,s)}function re(e,t,r,n,i,o,s){return ee(t&n|r&~n,e,t,i,o,s)}function ne(e,t,r,n,i,o,s){return ee(t^r^n,e,t,i,o,s)}function ie(e,t,r,n,i,o,s){return ee(r^(t|~n),e,t,i,o,s)}var t=W("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[Z(t)-1]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=i,l=o;r=te(r,n,i,o,e[s],7,-680876936),o=te(o,r,n,i,e[s+1],12,-389564586),i=te(i,o,r,n,e[s+2],17,606105819),n=te(n,i,o,r,e[s+3],22,-1044525330),r=te(r,n,i,o,e[s+4],7,-176418897),o=te(o,r,n,i,e[s+5],12,1200080426),i=te(i,o,r,n,e[s+6],17,-1473231341),n=te(n,i,o,r,e[s+7],22,-45705983),r=te(r,n,i,o,e[s+8],7,1770035416),o=te(o,r,n,i,e[s+9],12,-1958414417),i=te(i,o,r,n,e[s+10],17,-42063),n=te(n,i,o,r,e[s+11],22,-1990404162),r=te(r,n,i,o,e[s+12],7,1804603682),o=te(o,r,n,i,e[s+13],12,-40341101),i=te(i,o,r,n,e[s+14],17,-1502002290),n=te(n,i,o,r,e[s+15],22,1236535329),r=re(r,n,i,o,e[s+1],5,-165796510),o=re(o,r,n,i,e[s+6],9,-1069501632),i=re(i,o,r,n,e[s+11],14,643717713),n=re(n,i,o,r,e[s],20,-373897302),r=re(r,n,i,o,e[s+5],5,-701558691),o=re(o,r,n,i,e[s+10],9,38016083),i=re(i,o,r,n,e[s+15],14,-660478335),n=re(n,i,o,r,e[s+4],20,-405537848),r=re(r,n,i,o,e[s+9],5,568446438),o=re(o,r,n,i,e[s+14],9,-1019803690),i=re(i,o,r,n,e[s+3],14,-187363961),n=re(n,i,o,r,e[s+8],20,1163531501),r=re(r,n,i,o,e[s+13],5,-1444681467),o=re(o,r,n,i,e[s+2],9,-51403784),i=re(i,o,r,n,e[s+7],14,1735328473),n=re(n,i,o,r,e[s+12],20,-1926607734),r=ne(r,n,i,o,e[s+5],4,-378558),o=ne(o,r,n,i,e[s+8],11,-2022574463),i=ne(i,o,r,n,e[s+11],16,1839030562),n=ne(n,i,o,r,e[s+14],23,-35309556),r=ne(r,n,i,o,e[s+1],4,-1530992060),o=ne(o,r,n,i,e[s+4],11,1272893353),i=ne(i,o,r,n,e[s+7],16,-155497632),n=ne(n,i,o,r,e[s+10],23,-1094730640),r=ne(r,n,i,o,e[s+13],4,681279174),o=ne(o,r,n,i,e[s],11,-358537222),i=ne(i,o,r,n,e[s+3],16,-722521979),n=ne(n,i,o,r,e[s+6],23,76029189),r=ne(r,n,i,o,e[s+9],4,-640364487),o=ne(o,r,n,i,e[s+12],11,-421815835),i=ne(i,o,r,n,e[s+15],16,530742520),n=ne(n,i,o,r,e[s+2],23,-995338651),r=ie(r,n,i,o,e[s],6,-198630844),o=ie(o,r,n,i,e[s+7],10,1126891415),i=ie(i,o,r,n,e[s+14],15,-1416354905),n=ie(n,i,o,r,e[s+5],21,-57434055),r=ie(r,n,i,o,e[s+12],6,1700485571),o=ie(o,r,n,i,e[s+3],10,-1894986606),i=ie(i,o,r,n,e[s+10],15,-1051523),n=ie(n,i,o,r,e[s+1],21,-2054922799),r=ie(r,n,i,o,e[s+8],6,1873313359),o=ie(o,r,n,i,e[s+15],10,-30611744),i=ie(i,o,r,n,e[s+6],15,-1560198380),n=ie(n,i,o,r,e[s+13],21,1309151649),r=ie(r,n,i,o,e[s+4],6,-145523070),o=ie(o,r,n,i,e[s+11],10,-1120210379),i=ie(i,o,r,n,e[s+2],15,718787259),n=ie(n,i,o,r,e[s+9],21,-343485551),r=Q(r,a),n=Q(n,u),i=Q(i,c),o=Q(o,l)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(Z(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),i=[],o=32*n.length,s="0123456789abcdef",a=0;a<o;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);i.push(u)}return i});function oe(e,t){return e<<t|e>>>32-t}var r=W("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 i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/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 b=Math.floor(w/20),b=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}}(b,v,m,g)+E+t[b]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=b;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 se,ae,ue,ce,le,pe,fe,de,he,ye,ve,me,ge,Ee,we,be,Te,_e,Ie,Ae,Oe,Ne,Re,Se,Ce,xe,Me,ke,Ue,Pe,t=L(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,i=t||new Array(16),o=(e=e||{}).node||B,r=void 0!==e.clockseq?e.clockseq:G,s=(null!=o&&null!=r||(s=e.random||(e.rng||V)(),null==o&&(o=B=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=G=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:$+1,u=s-q+(a-$)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||q<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");q=s,G=r,u=(1e4*(268435455&(s+=122192928e5))+($=a))%4294967296,i[n++]=u>>>24&255,i[n++]=u>>>16&255,i[n++]=u>>>8&255,i[n++]=255&u,e=s/4294967296*1e4&268435455,i[n++]=e>>>8&255,i[n++]=255&e,i[n++]=e>>>24&15|16,i[n++]=e>>>16&255,i[n++]=r>>>8|128,i[n++]=255&r;for(var c=0;c<6;++c)i[n+c]=o[c];return t||Y(i)},v3:t,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||V)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Y(n)},v5:r,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(z(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:z,stringify:Y,parse:X})),r={exports:{}},n=(r.exports=(0,g="function"==typeof atob,y="function"==typeof btoa,h="function"==typeof Buffer,se="function"==typeof TextDecoder?new TextDecoder:void 0,ae="function"==typeof TextEncoder?new TextEncoder:void 0,ue=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ce=function(){var r={};return ue.forEach(function(e,t){return r[e]=t}),r}(),le=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pe=String.fromCharCode.bind(String),fe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},de=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},he=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},So=function(e){for(var t,r,n,i="",o=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");i+=ue[(t=t<<16|r<<8|n)>>18&63]+ue[t>>12&63]+ue[t>>6&63]+ue[63&t]}return o?i.slice(0,o-3)+"===".substring(o):i},ve=h?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],r=0,n=e.length;r<n;r+=4096)t.push(pe.apply(null,e.subarray(r,r+4096)));return ye(t.join(""))},ge=function(e){var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?pe(192|t>>>6)+pe(128|63&t):pe(224|t>>>12&15)+pe(128|t>>>6&63)+pe(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),pe(240|t>>>18&7)+pe(128|t>>>12&63)+pe(128|t>>>6&63)+pe(128|63&t))},Ee=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,be=h?function(e){return Buffer.from(e,"utf8").toString("base64")}:ae?function(e){return ve(ae.encode(e))}:function(e){return ye(we(e))},_e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ie=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 pe(55296+(t>>>10))+pe(56320+(1023&t));case 3:return pe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return pe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},vt=function(e){if(e=e.replace(/\s+/g,""),!le.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,r,n,i="",o=0;o<e.length;)t=ce[e.charAt(o++)]<<18|ce[e.charAt(o++)]<<12|(r=ce[e.charAt(o++)])<<6|(n=ce[e.charAt(o++)]),i+=64===r?pe(t>>16&255):64===n?pe(t>>16&255,t>>8&255):pe(t>>16&255,t>>8&255,255&t);return i},Ne=h?function(e){return fe(Buffer.from(e,"base64"))}:function(e){return fe(Oe(e).split("").map(function(e){return e.charCodeAt(0)}))},Se=h?function(e){return Buffer.from(e,"base64").toString("utf8")}:se?function(e){return se.decode(Ne(e))}:function(e){return Ae(Oe(e))},Ce=function(e){return he(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},Me=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Pe={version:"3.7.5",VERSION:"3.7.5",atob:Oe=g?function(e){return atob(he(e))}:h?function(e){return Buffer.from(e,"base64").toString("binary")}:vt,atobPolyfill:vt,btoa:ye=y?function(e){return btoa(e)}:h?function(e){return Buffer.from(e,"binary").toString("base64")}:So,btoaPolyfill:So,fromBase64:xe=function(e){return Se(Ce(e))},toBase64:Te=function(e,t){return(t=void 0===t?!1:t)?de(be(e)):be(e)},encode:Te,encodeURI:g=function(e){return Te(e,!0)},encodeURL:g,utob:we=function(e){return e.replace(Ee,ge)},btou:Ae=function(e){return e.replace(_e,Ie)},decode:xe,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:me=function(e,t){return(t=void 0===t?!1:t)?de(ve(e)):ve(e)},toUint8Array:Re=function(e){return Ne(Ce(e))},extendString:ke=function(){function e(e,t){Object.defineProperty(String.prototype,e,Me(t))}e("fromBase64",function(){return xe(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 Re(this)})},extendUint8Array:Ue=function(){function e(e,t){Object.defineProperty(Uint8Array.prototype,e,Me(t))}e("toBase64",function(e){return me(this,e)}),e("toBase64URI",function(){return me(this,!0)}),e("toBase64URL",function(){return me(this,!0)})},extendBuiltins:function(){ke(),Ue()},Base64:{}},Object.keys(Pe).forEach(function(e){return Pe.Base64[e]=Pe[e]}),Pe),l),De=(Object.defineProperty(n,"__esModule",{value:!0}),t),Le=r.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=(Be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},Be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},Be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},Be.associate=function(e,t){return this.associateTo(e,new Map,t)},Be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},Be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},Be),Fe={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},i=(ze.setLogLevel=function(e){this.logLevel=e=void 0===e?Fe.INFO:e},ze.initCounter=function(t){this.counters=p.associate(Object.keys(Fe),function(e){return[e,t(e)]})},ze._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){}},ze.increment=function(e){var t;null!=(t=null==(t=ze.counters)?void 0:t.get(e))&&t.increment()},ze.logLevel=Fe.INFO,ze.log={error:function(e){Fe.ERROR<=ze.logLevel&&(ze._log("ERROR",e),ze.increment("ERROR"))},warn:function(e){Fe.WARN<=ze.logLevel&&(ze._log("WARN",e),ze.increment("WARN"))},info:function(e){Fe.INFO<=ze.logLevel&&(ze._log("INFO",e),ze.increment("INFO"))},debug:function(e){Fe.DEBUG<=ze.logLevel&&(ze._log("DEBUG",e),ze.increment("DEBUG"))}},ze),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 ze(){}function Be(){}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 i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function s(n,i){var o,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(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=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=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=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,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Ye=i.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 i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Ye.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Ye.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}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=i.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 i,o=n[r],s=o[0],o=o[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(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?$e.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):$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=(u.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C0);case"seconds":return e/(u.C3/u.C0);case"minutes":return e/(u.C4/u.C0);case"hours":return e/(u.C5/u.C0);case"days":return e/(u.C6/u.C0)}},u.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C1);case"microseconds":return e;case"seconds":return e/(u.C3/u.C1);case"minutes":return e/(u.C4/u.C1);case"hours":return e/(u.C5/u.C1);case"days":return e/(u.C6/u.C1)}},u.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C2/u.C0);case"microseconds":return e*(u.C2/u.C1);case"milliseconds":return e;case"seconds":return e/(u.C3/u.C2);case"minutes":return e/(u.C4/u.C2);case"hours":return e/(u.C5/u.C2);case"days":return e/(u.C6/u.C2)}},u.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C3/u.C0);case"microseconds":return e*(u.C3/u.C1);case"milliseconds":return e*(u.C3/u.C2);case"seconds":return e;case"minutes":return e/(u.C4/u.C3);case"hours":return e/(u.C5/u.C3);case"days":return e/(u.C6/u.C3)}},u.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C4/u.C0);case"microseconds":return e*(u.C4/u.C1);case"milliseconds":return e*(u.C4/u.C2);case"seconds":return e*(u.C4/u.C3);case"minutes":return e;case"hours":return e/(u.C5/u.C4);case"days":return e/(u.C6/u.C4)}},u.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C5/u.C0);case"microseconds":return e*(u.C5/u.C1);case"milliseconds":return e*(u.C5/u.C2);case"seconds":return e*(u.C5/u.C3);case"minutes":return e*(u.C5/u.C4);case"hours":return e;case"days":return e/(u.C6/u.C5)}},u.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C6/u.C0);case"microseconds":return e*(u.C6/u.C1);case"milliseconds":return e*(u.C6/u.C2);case"seconds":return e*(u.C6/u.C3);case"minutes":return e*(u.C6/u.C4);case"hours":return e*(u.C6/u.C5);case"days":return e}},u.C6=24*(u.C5=60*(u.C4=60*(u.C3=1e3*(u.C2=1e3*(u.C1=1e3*(u.C0=1)))))),u.converter={nanoseconds:u.nanosToUnit,microseconds:u.microsToUnit,milliseconds:u.millisToUnit,seconds:u.secondsToUnit,minutes:u.minutesToUnit,hours:u.hoursToUnit,days:u.daysToUnit},u),Qe=(ot.prototype.tick=function(){return 1e3*Date.now()},ot.prototype.currentMillis=function(){return Date.now()},ot.instance=new ot,ot),et=(it.prototype.get=function(e,t){return t},it),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=i.log;function nt(e){this.parameters=e}function it(){}function ot(){}function u(){}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,i=t;n<i.length;n++){var o=ut(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}function lt(e){var t=new It;return t.addIdentifiers(e.identifiers||{}),t.add(_t.ID,e.id),t.add(_t.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(_t.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=(or.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},or.of=function(e,t,r){return new or(t,r,e)},or),ht=(ir.of=function(e,t,r){return new ir(e,t,r=void 0===r?new et:r)},ir.prototype.get=function(e,t){return this.config.get(e,t)},ir),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)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return Ct.fromJson(e,mr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return At.fromJson(e,mr.PROPERTY)}),a=vn.fromJson(t.execution.targetUrls),u=er.experimentImplementationTypeOrNull(t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return Ct.fromJson(e,mr.PROPERTY)}),l=St.fromJson(t.execution.defaultRule);return r&&u&&l&&new er(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,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.experimentImplementationTypeOrNull=function(e){switch(e){case"DEFAULT":return"DEFAULT";case"SPLIT_URL":return"SPLIT_URL";default:return void rt.debug("Unsupported implementationType [".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 bt(t,r,e)}))},Qt),bt=(Zt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},Zt),Tt=(Wt.fromJson=function(e){return new Wt(e.id,e.key)},Wt),_t=(Xt.ID="$id",Xt.USER="$userId",Xt.DEVICE="$deviceId",Xt.SESSION="$sessionId",Xt.HACKLE_DEVICE="$hackleDeviceId",Xt),It=($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),At=(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),St=(Gt.fromJson=function(e){var t=ut(hr,e.type);return t&&new Gt(t,e.variationId,e.bucketId)},Gt),Ct=(Bt.fromJson=function(e,t){t=At.fromJson(e.target,t),e=St.fromJson(e.action);return t&&e&&new Bt(t,e)},Bt),xt=(zt.fromJson=function(e){var t=ut(vr,e.type);return t&&new zt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.SEGMENT)}))},zt),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),Ut=(jt.fromJson=function(e){var t=ut(fr,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Pt.fromJson(e,mr.PROPERTY)}),n=Dt.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)},jt),Pt=(Ft.fromJson=function(e,t){t=At.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,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}function jt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}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 zt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function Bt(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,i,o,s,a,u,c,l,p,f,d,h,y,v){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=d,this.containerId=h,this.implementationType=y,this.winnerVariationId=v}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 ir(e,t,r){this.variation=e,this.reason=t,this.config=r}function or(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}hn.tryParse=function(e){var t,r,n,i,e=hn.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,i=e[4],e=e[5],new hn(new cr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),lr.parse(i),lr.parse(e))},hn.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},hn.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},hn.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},hn.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},hn.prototype.isLessThan=function(e){return this.compareTo(e)<0},hn.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},hn.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=hn,cr=(dn.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},dn),lr=(fn.parse=function(e){return e?new fn(e.split(".")):fn.EMPTY},fn.prototype.isEmpty=function(){return 0===this.identifiers.length},fn.prototype.isNotEmpty=function(){return!this.isEmpty()},fn.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},fn.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=fn.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},fn.compareIdentifiers=function(e,t){return fn.numericIdentifierRegExp.test(e)&&fn.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},fn.EMPTY=new fn([]),fn.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,fn),pr=["MATCH","NOT_MATCH"],fr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","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=(pn.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},pn.IDENTIFIER=new pn("SEGMENT"),pn.PROPERTY=new pn("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),pn.SEGMENT=new pn("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),pn),gr=["ACTIVE","DRAFT","PAUSE"],Er=["WEB","ANDROID","IOS"],wr=["IMMEDIATE","CUSTOM"],br=["MODAL"],Tr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],_r=["VERTICAL","HORIZONTAL"],Ir=["CLICK"],Ar=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Or=(ln.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,i,o=Dr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Cr.fromJson),i=xr.fromJson(e.eventFrequencyCap),new ln(e.id,e.key,r,t,new Sr(n,i),Ur.fromJson(e.targetContext),o)}},ln.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},ln),Nr=(cn.prototype.within=function(e){return!0},cn),Rr=(un.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},un),Sr=function(e,t){this.rules=e,this.frequencyCap=t},Cr=(an.fromJson=function(e){return new an(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},an),xr=(sn.fromJson=function(e){return e?new sn(e.identifiers.map(Mr.fromJson),kr.fromJson(e.duration)):null},sn),Mr=(on.fromJson=function(e){return new on(e.identifierType,e.countPerIdentifier)},on),kr=(nn.fromJson=function(e){if(!e)return null;var t=ut(We,e.durationUnit.timeUnit);return t?new nn(Ze.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},nn),Ur=(rn.fromJson=function(e){return new rn(e.overrides.map(Pr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},rn),Pr=(tn.fromJson=function(e){return new tn(e.identifierType,e.identifiers)},tn),Dr=(en.fromJson=function(e){var t=ct(Er,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=ct(_r,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,Lr.fromJson);if(!a.isNullOrUndefined(n))return new en(e.defaultLang,t,r,n)}}},en),Lr=(Qr.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,Br.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=Br.fromJson2(e.closeButton),!a.isNullOrUndefined(i)))return new Qr(e.lang,t,r,e.text?Vr.fromJson(e.text):void 0,n,i,new Kr(e.background.color))}}}},Qr.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}}},Qr),Fr=(Zr.fromJson=function(e){var t=ut(Tr,e.layoutType),e=ut(br,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Zr(e,t)},Zr),jr=(Wr.fromJson=function(e){var t=ut(_r,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 Wr(t,e.imagePath,r)}},Wr.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}},Wr),Vr=(Xr.fromJson=function(e){return new Xr(Hr.fromJson(e.title),Hr.fromJson(e.body))},Xr.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}}}},Xr),Hr=($r.fromJson=function(e){return new $r(e.text,new zr(e.style.textColor))},$r),zr=function(e){this.color=e},Br=(qr.fromJson=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr(e.text,new Gr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},qr.fromJson2=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr("✕",new Gr(e.style.color,"#FFFFFF","#FFFFFF"),t)},qr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},qr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},qr),Gr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Kr=function(e){this.color=e},Jr=(Yr.fromJson=function(e){var t=ut(Ir,e.behavior);if(!a.isNullOrUndefined(t)){var r=ut(Ar,e.type);if(!a.isNullOrUndefined(r))return new Yr(t,r,null!=(t=e.value)?t:void 0)}},Yr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Yr);function Yr(e,t,r){this.behavior=e,this.type=t,this.value=r}function qr(e,t,r){this.text=e,this.style=t,this.action=r}function $r(e,t){this.text=e,this.style=t}function Xr(e,t){this.title=e,this.body=t}function Wr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function Zr(e,t){this.displayType=e,this.layoutType=t}function Qr(e,t,r,n,i,o,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=i,this.closeButton=o,this.background=s}function en(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function tn(e,t){this.identifierType=e,this.identifiers=t}function rn(e,t){this.overrides=e,this.targets=t}function nn(e,t){this.durationMillis=e,this.count=t}function on(e,t){this.identifierType=e,this.count=t}function sn(e,t){this.identifierCaps=e,this.durationCap=t}function an(e,t){this.eventKey=e,this.targets=t}function un(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function cn(){this.type="IMMEDIATE"}function ln(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function fn(e){this.identifiers=e}function dn(e,t,r){this.major=e,this.minor=t,this.patch=r}function hn(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Tn.fromDto=function(e){var t;return new Tn(e.needRedirect,(t=e.properties.type,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null),e.properties.value)};var yn=Tn,vn=(bn.fromJson=function(e){if(null!==e)return new bn(p.mapNotNullOrUndefined(e.match,function(e){return At.fromJson(e,mr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return At.fromJson(e,mr.PROPERTY)}))},bn),mn=(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.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},wn),gn=(En.start=function(e){return new En(e=void 0===e?En.defaultClock:e)},En.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},En.defaultClock=new Qe,En);function En(e){this._clock=e,this.startTime=this._clock.tick()}function wn(e){this.name=e,this._tags={},this.name=e}function bn(e,t){this.includeTargets=e,this.excludeTargets=t}function Tn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}In.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},In.prototype.tag=function(e,t){return this._tags[e]=t,this},In.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var _n=In;function In(e){this.name=e,this._tags={}}Object.defineProperty(On.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var An=On;function On(e,t){this.valueSupplier=t,this.field=e}function Nn(e,t){return e.name===t.name&&qe.isEquals(e.tags,t.tags)}Dn.prototype.count=function(){return this.counterValue},Dn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Dn.prototype.measure=function(){return[new An("count",this.count.bind(this))]};var Rn,Sn=Dn,Cn=(Pn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Sn(this.id),e},Pn.prototype.count=function(){return this.currentCounter.count()},Pn.prototype.increment=function(e){this.currentCounter.increment(e)},Pn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Pn),xn=(Un.prototype.values=function(){return Array.from(this.data.values())},Un.prototype.keys=function(){return Array.from(this.data.keys())},Un.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},Un.prototype.has=function(e){return void 0!==this.get(e)},Un.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Un.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Un.prototype.forEach=function(e){this.data.forEach(e)},Un.prototype.filter=function(e){for(var t=new Un(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},Un.prototype.entries=function(){return Array.from(this.data.entries())},Un);Object.defineProperty(kn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),kn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},kn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},kn.prototype.counter=function(e,t){return void 0===t&&(t={}),new _n(e).tags(t).register(this)},kn.prototype.timer=function(e,t){return void 0===t&&(t={}),new mn(e).tags(t).register(this)},kn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},kn.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},kn.prototype.close=function(){};Ke(Mn,Rn=y=kn),Mn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),i.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Mn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),i.log.debug("PushMetricRegistry stopped.")},Mn.prototype.close=function(){this.stop()};var h=Mn;function Mn(e,t){var r=Rn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}function kn(){this.id=De.v4(),this.name="MetricRegistry",this._metrics=new xn(Nn)}function Un(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function Pn(e){this.id=e,this.currentCounter=new Sn(e)}function Dn(e){this.counterValue=0,this.id=e}Jn.prototype.count=function(){return this._count},Jn.prototype.totalTime=function(e){return Ze.nanosToUnit(this._total,e)},Jn.prototype.max=function(e){return Ze.nanosToUnit(this._max,e)},Jn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Jn.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))},Jn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]};var Ln,Fn=Jn,jn=(Kn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Fn(this.id),e},Kn.prototype.count=function(){return this.currentTimer.count()},Kn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Kn.prototype.max=function(e){return this.currentTimer.max(e)},Kn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Kn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Kn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Kn),h=(Ke(Gn,Ln=h),Gn.prototype.createCounter=function(e){return new Cn(e)},Gn.prototype.createTimer=function(e){return new jn(e)},Gn.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)},Gn.prototype.close=function(){Ln.prototype.close.call(this)},Gn),Vn=(Bn.prototype.count=function(){return 0},Bn.prototype.increment=function(e){},Bn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Bn),Hn=(Object.defineProperty(zn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),zn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},zn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},zn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},zn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},zn);function zn(e){this._counters=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Vn(e)}function Bn(e){this.id=e}function Gn(e,t){return Ln.call(this,e,t)||this}function Kn(e){this.id=e,this.currentTimer=new Fn(e)}function Jn(e){this._count=0,this._total=0,this._max=0,this.id=e}Ni.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Ni.prototype.count=function(){return 0},Ni.prototype.totalTime=function(e){return 0},Ni.prototype.max=function(e){return 0},Ni.prototype.mean=function(e){return 0},Ni.prototype.record=function(e,t){};var Yn,qn,$n,Xn=Ni,Wn=(Object.defineProperty(Oi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Oi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Oi.prototype.max=function(e){return this.firstTimer.max(e)},Oi.prototype.mean=function(e){return this.firstTimer.mean(e)},Oi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Oi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Oi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Oi.prototype.count=function(){return this.firstTimer.count()},Oi.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Oi),y=(Ke(Ai,$n=y),Ai.prototype.createCounter=function(e){e=new Hn(e);return this.addRegistry(e),e},Ai.prototype.createTimer=function(e){e=new Wn(e);return this.addRegistry(e),e},Ai.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Ai.prototype.add=function(t){t instanceof Ai||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},Ai.prototype.close=function(){this.registries.forEach(function(e){e.close()})},Ai),Zn=(Ii.counter=function(e,t){return Ii.globalRegistry.counter(e,t)},Ii.timer=function(e,t){return Ii.globalRegistry.timer(e,t)},Ii.addRegistry=function(e){Ii.globalRegistry.add(e),i.log.debug("MetricRegistry added ".concat(e.name))},Ii.globalRegistry=new y,Ii),Qn=(_i.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},_i),ei=(Ti.builder=function(){return new ti},Ti.get=function(e){return Ti.builder().url(e).build()},Ti.prototype.toBuilder=function(){return new ti(this)},Ti),ti=(bi.prototype.url=function(e){return this._url=e,this},bi.prototype.method=function(e){return this._method=e,this},bi.prototype.body=function(e){return this._body=e,this},bi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},bi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},bi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new ei(this._url,this._method,this._body,this._headers.build(),e)},bi),ri=(wi.ok=function(e,t){return wi.of(200,e,t)},wi.of=function(e,t,r){return new wi(e,null!=t?t:null,null!=r?r:ni.empty())},wi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},wi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},wi.prototype.isNotModified=function(){return 304===this.statusCode},wi),ni=(Ei.empty=function(){return new Ei(new Map)},Ei.builder=function(){return new ii(new Map)},Ei.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(Qn.equalsIgnoreCase(i,e))return n}return null},Ei.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ei.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},{})},Ei.prototype.toBuilder=function(){return new ii(this.headers)},Ei.IF_MODIFIED_SINCE="If-Modified-Since",Ei.LAST_MODIFIED="Last-Modified",Ei),ii=(gi.prototype.add=function(e,t){return this.headers.set(e,t),this},gi.prototype.build=function(){return new ni(this.headers)},gi),oi=(Ke(mi,qn=h),mi.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){r.dispatch(e,t)})},mi.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},mi.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return i.log.debug("Failed to flushing metrics: ".concat(e))})},mi.prototype.createRequest=function(e){return ei.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},mi.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},mi.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]}))}})}},mi.prototype.createCounter=function(e){return new Cn(e)},mi.prototype.createTimer=function(e){return new jn(e)},mi.prototype.close=function(){qn.prototype.close.call(this)},mi),si=(vi.experiment=function(e,t,r){t=Zn.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},vi.featureFlag=function(e,t,r){t=Zn.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},vi.remoteConfig=function(e,t,r){t=Zn.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},vi.inAppMessage=function(e,t,r){t=Zn.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},vi),ai=(yi.record=function(e,t,r){e=Zn.timer("api.call",{operation:e,success:yi.success(r)});t.stop(e)},yi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},yi),ui=(hi.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)}},hi.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?ft.of(n,f.INVALID_INPUT):e.remoteConfig(t,i,r,n)},hi),ci=i.log,li=(di.prototype.get=function(e,t){var r,n=gn.start();try{r=this.decide(e,t)}catch(n){ci.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=ft.of(t,f.EXCEPTION)}return si.remoteConfig(n,e,r),r.value},di.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return ui.decide(this.core,e,t,r)},di),pi=(fi.prototype.contains=function(e){return this._properties.has(e)},fi.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},fi.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)},fi.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},fi.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},fi.prototype.build=function(){return this._properties},fi);function fi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function di(e,t,r){this.core=e,this.userManager=t,this.user=r}function hi(){}function yi(){}function vi(){}function mi(e,t,r,n,i){n=qn.call(this,n,i)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}function gi(e){this.headers=e}function Ei(e){this.headers=e}function wi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}function bi(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:ni.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}function Ti(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}function _i(){}function Ii(){}function Ai(){var e=null!==$n&&$n.apply(this,arguments)||this;return e.registries=new xn(function(e,t){return e.id===t.id}),e}function Oi(e){this._timers=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Xn(e)}function Ni(e){this.id=e}(y=Yn=Yn||{}).SET="$set",y.SET_ONCE="$setOnce",y.UNSET="$unset",y.INCREMENT="$increment",y.APPEND="$append",y.APPEND_ONCE="$appendOnce",y.PREPEND="$prepend",y.PREPEND_ONCE="$prependOnce",y.REMOVE="$remove",y.CLEAR_ALL="$clearAll",Eo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t).build()};var Ri,Si,Ci,xi,Mi,ki=Eo,Ui=(go.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t,!0).build()},go),Pi=(mo.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new pi).addProperties(e).remove(t).build()},mo),Di=(vo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},vo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},vo);yo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},yo.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},yo.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},yo.prototype.contains=function(e,t){return e.includes(t)},yo.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Je([e],t,!0)},yo.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Je(Je([],e,!0),[t],!1)};Ke(ho,Mi=h=yo),ho.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Li=ho,Fi=(Ke(fo,xi=h),fo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},fo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},fo),ji=(Ke(po,Ci=h),po.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},po),Vi=(Ke(lo,Si=h),lo.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)},lo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},lo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},lo),Hi=(Ke(co,Ri=h),co.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},co.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},co),zi=(uo.prototype.operate=function(e,t){return new Map},uo),Bi=(ao.get=function(e){switch(e){case Yn.SET:return new ki;case Yn.SET_ONCE:return new Ui;case Yn.UNSET:return new Pi;case Yn.INCREMENT:return new Di;case Yn.APPEND:return new Li;case Yn.APPEND_ONCE:return new Fi;case Yn.PREPEND:return new ji;case Yn.PREPEND_ONCE:return new Vi;case Yn.CLEAR_ALL:return new zi;case Yn.REMOVE:return new Hi}},ao),Gi=(so.prototype.set=function(e,t){return this.add(Yn.SET,e,t)},so.prototype.setOnce=function(e,t){return this.add(Yn.SET_ONCE,e,t)},so.prototype.unset=function(e){return this.add(Yn.UNSET,e,"-")},so.prototype.increment=function(e,t){return this.add(Yn.INCREMENT,e,t)},so.prototype.append=function(e,t){return this.add(Yn.APPEND,e,t)},so.prototype.appendOnce=function(e,t){return this.add(Yn.APPEND_ONCE,e,t)},so.prototype.prepend=function(e,t){return this.add(Yn.PREPEND,e,t)},so.prototype.prependOnce=function(e,t){return this.add(Yn.PREPEND_ONCE,e,t)},so.prototype.remove=function(e,t){return this.add(Yn.REMOVE,e,t)},so.prototype.clearAll=function(){return this.add(Yn.CLEAR_ALL,"clearAll","-")},so.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Ki(new Map(e))},so.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},so.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new pi);e=this.operations.get(e);return null!=e&&e.add(t,r),this},so),Ki=(oo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Bi.get(t).operate(r,e)}),r},oo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),Xe.sanitize(a.fromMap(e))),r))}),i},oo.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},oo),Ji=(io.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)})},io),Yi=i.log,qi=(v.prototype.initialize=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Yi.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Yi.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Yi.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},v.prototype.getSessionId=function(){return this.sessionManager.sessionId},v.prototype.getUser=function(){return this.userManager.currentUser},v.prototype.setUser=function(e){try{var t=pt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(Yi.warn("invalid user"),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},v.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=qe.sanitizeValue(e);if(!t)return Yi.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return Yi.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},v.prototype.setDeviceId=function(e){try{var t=qe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(Yi.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},v.prototype.setUserProperty=function(e,t){e=(new Gi).set(e,t).build();return this.updateUserProperties(e)},v.prototype.setUserProperties=function(e){try{var t=Xe.sanitize(e),r=new Gi;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 Yi.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},v.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return Yi.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},v.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new Gi).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return Yi.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},v.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},v.prototype.variationDetail=function(r,n,e){var i=e||"A",e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Yi.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),ht.of(i,f.EXCEPTION)}}(this);return si.experiment(e,r,t),t},v.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},v.prototype.featureFlagDetail=function(r,n){var e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Yi.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),yt.off(f.EXCEPTION)}}(this);return si.featureFlag(e,r,t),t},v.prototype.track=function(e,t){try{Yi.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Yi.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){Yi.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},v.prototype.remoteConfig=function(e){return new li(this.core,this.userManager,e)},v.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},v.prototype.onInitialized=function(r){var n;return o(this,void 0,void 0,function(){var t;return s(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,Ji.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(),Yi.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},v.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},v.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Yi.debug("UserExplorer opened."),Zn.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Yi.error("UserExplorer is not provided")},v.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Yi.warn("There is no active HackleDevtools.")},v.prototype.close=function(){Yi.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},v),$i=i.log,Xi=(no.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(r){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(r){return $i.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},no),Wi=(ro.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},ro.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")},ro),Zi=(to.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]:""},to.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},to.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},to.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=to.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},to.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},to.prototype.getOptions=function(){return this.options},to.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),to.storage=to.storage?to.storage:new to(e)},to),Qi=(eo.initialize=function(){Zi.getInstance().getItem("_hackle_hid")||_o()},eo);function eo(){}function to(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function ro(){}function no(e,t){this.invocationProcessor=e,this.user=t}function v(e,t,r,n,i){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=i,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}function io(){}function oo(e){this.operations=null!=e?e:new Map}function so(){this.operations=new Map}function ao(){}function uo(){}function co(){return null!==Ri&&Ri.apply(this,arguments)||this}function lo(){return null!==Si&&Si.apply(this,arguments)||this}function po(){return null!==Ci&&Ci.apply(this,arguments)||this}function fo(){return null!==xi&&xi.apply(this,arguments)||this}function ho(){return null!==Mi&&Mi.apply(this,arguments)||this}function yo(){}function vo(){}function mo(){}function go(){}function Eo(){}function wo(){var e=Zi.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||_o()}function bo(e){Zi.getInstance().setItem("_hackle_id",e)}function To(){Zi.getInstance().removeItem("_hackle_id")}function _o(){var e=De.v4();return Zi.getInstance().setItem("_hackle_hid",e),e}Oo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},Oo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Io=Oo,Ao=i.log;function Oo(e){this.invocator=e}function No(e){return e&&e.Math==Math&&e}function m(e){try{return!!e()}catch(e){return!0}}w.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:wo()}catch(e){return Ao.error("Unexpected exception while get sessionId: ".concat(e)),wo()}},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 Ao.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},w.prototype.setUser=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=pt(n)))return Ao.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set user: ".concat(e))}return[2]})})},w.prototype.setUserId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},w.prototype.setDeviceId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},w.prototype.setUserProperty=function(r,n){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},w.prototype.setUserProperties=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{t=Xe.sanitize(n),r=new Gi,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Ao.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},w.prototype.updateUserProperties=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},w.prototype.resetUser=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Ao.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)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(t){return Ao.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 i={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return ht.of(o.variation,o.reason,new tt(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(t){return Ao.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 Ao.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)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new yt(i.isOn,i.reason,new tt(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))))}catch(t){return Ao.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){Ao.error("Unexpected exception while tracking event: ".concat(e))}},w.prototype.trackPageView=function(e){Ao.info("Web to app integration feature is not support 'trackPageView' method")},w.prototype.remoteConfig=function(e){return new Xi(this.invocationProcessor,this.convertUser(e))},w.prototype.onReady=function(e,t){e()},w.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Ao.error("Unexpected exception while show userExplorer: ".concat(e))}},w.prototype.hideUserExplorer=function(){Ao.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(){Ao.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:wo()}};var Ro=w,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},h=No("object"==typeof globalThis&&globalThis)||No("object"==typeof window&&window)||No("object"==typeof self&&self)||No("object"==typeof y&&y)||function(){return this}()||Function("return this")(),y={},So=!m(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),g=!m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Co=Function.prototype.call,t=g?Co.bind(Co):function(){return Co.apply(Co,arguments)},r={},e={}.propertyIsEnumerable,xo=Object.getOwnPropertyDescriptor,E=xo&&!e.call({1:2},1);function w(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this)}function Mo(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function ko(e){return Qo(Zo(e),8,-1)}function Uo(e){if(null==e)throw ns("Can't call method on "+e);return e}function Po(e){return is(os(e))}function Do(e){return"function"==typeof e}function Lo(e){return"object"==typeof e?null!==e:ss(e)}function Fo(e,t){return arguments.length<2?(r=as[e],us(r)?r:void 0):as[e]&&as[e][t];var r}function jo(e){try{return ms(e)}catch(e){return"Object"}}function Vo(e){if(gs(e))return e;throw ws(Es(e)+" is not a function")}function Ho(e,t){return null==(e=e[t])?void 0:bs(e)}function zo(t,r){try{Ns(Os,t,{value:r,configurable:!0,writable:!0})}catch(e){Os[t]=r}return r}function Bo(e){return xs(Cs(e))}function Go(e){return"Symbol("+(void 0===e?"":e)+")_"+Ds(++Us+Ps,36)}function Ko(e){var t;return Fs(zs,e)&&(Vs||"string"==typeof zs[e])||(t="Symbol."+e,Vs&&Fs(Bs,e)?zs[e]=Bs[e]:zs[e]=(Hs&&Gs?Gs:Ks)(t)),zs[e]}function Jo(e){return e=function(e,t){if(!Ys(e)||qs(e))return e;var r=$s(e,Zs);if(r){if(r=Js(r,e,t=void 0===t?"default":t),!Ys(r)||qs(r))return r;throw Ws("Can't convert object to primitive value")}return Xs(e,t=void 0===t?"number":t)}(e,"string"),Qs(e)?e:e+""}function Yo(e){return ta?ea.createElement(e):{}}function qo(e){if(pa(e))return e;throw da(fa(e)+" is not an object")}r.f=E?function(e){e=xo(this,e);return!!e&&e.enumerable}:e;var E=g,$o=(e=Function.prototype).bind,Xo=e.call,Wo=E&&$o.bind(Xo,Xo),Zo=($o=e=E?function(e){return e&&Wo(e)}:function(e){return e&&function(){return Xo.apply(e,arguments)}})({}.toString),Qo=$o("".slice),E=m,es=ko,ts=Object,rs=e("".split),$o=E(function(){return!ts("z").propertyIsEnumerable(0)})?function(e){return"String"==es(e)?rs(e,""):ts(e)}:ts,ns=TypeError,is=$o,os=Uo,ss=Do,as=h,us=Do,E=e({}.isPrototypeOf),cs=k=Fo("navigator","userAgent")||"",ls=h.process,b=h.Deno,b=(ls=ls&&ls.versions||b&&b.version)&&ls.v8,ps=ls=vs=!(vs=b?0<(T=b.split("."))[0]&&T[0]<4?1:+(T[0]+T[1]):vs)&&cs&&(!(T=cs.match(/Edge\/(\d+)/))||74<=T[1])&&(T=cs.match(/Chrome\/(\d+)/))?+T[1]:vs,b=m,T=(cs=!!Object.getOwnPropertySymbols&&!b(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ps&&ps<41}))&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fs=Fo,ds=Do,hs=E,ys=Object,vs=T?function(e){return"symbol"==typeof e}:function(e){var t=fs("Symbol");return ds(t)&&hs(t.prototype,ys(e))},ms=String,gs=Do,Es=jo,ws=TypeError,bs=Vo,Ts=t,_s=Do,Is=Lo,As=TypeError,b={exports:{}},Os=h,Ns=Object.defineProperty,Rs=zo,Ss=Rs=h["__core-js_shared__"]||Rs("__core-js_shared__",{}),Cs=((b.exports=function(e,t){return Ss[e]||(Ss[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"}),Uo),xs=Object,Ms=Bo,ks=e({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return ks(Ms(e),t)},I=e,Us=0,Ps=Math.random(),Ds=I(1..toString),I=h,Ls=b.exports,Fs=_,js=Go,Vs=cs,Hs=T,zs=Ls("wks"),Bs=I.Symbol,Gs=Bs&&Bs.for,Ks=Hs?Bs:Bs&&Bs.withoutSetter||js,Js=t,Ys=Lo,qs=vs,$s=Ho,Xs=function(e,t){var r,n;if("string"===t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;if(_s(r=e.valueOf)&&!Is(n=Ts(r,e)))return n;if("string"!==t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;throw As("Can't convert object to primitive value")},Ws=TypeError,Zs=Ko("toPrimitive"),Qs=vs,cs=Lo,ea=h.document,ta=cs(ea)&&cs(ea.createElement),ra=Yo,T=!So&&!m(function(){return 7!=Object.defineProperty(ra("div"),"a",{get:function(){return 7}}).a}),na=t,ia=r,oa=Mo,sa=Po,aa=Jo,ua=_,ca=T,la=Object.getOwnPropertyDescriptor,Ls=(y.f=So?la:function(e,t){if(e=sa(e),t=aa(t),ca)try{return la(e,t)}catch(e){}if(ua(e,t))return oa(!na(ia.f,e,t),e[t])},{}),I=So&&m(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),pa=Lo,fa=String,da=TypeError,ha=T,ya=qo,va=Jo,ma=TypeError,ga=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,wa=(Ls.f=So?I?function(e,t,r){var n;return ya(e),t=va(t),ya(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=Ea(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}),ga(e,t,r)}:ga:function(e,t,r){if(ya(e),t=va(t),ya(r),ha)try{return ga(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ma("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ls),ba=Mo,js=So?function(e,t,r){return wa.f(e,t,ba(1,r))}:function(e,t,r){return e[t]=r,e},vs={exports:{}},cs=So,r=_,T=Function.prototype,Ta=cs&&Object.getOwnPropertyDescriptor,r={EXISTS:r=r(T,"name"),PROPER:r&&"something"===function(){}.name,CONFIGURABLE:r&&(!cs||Ta(T,"name").configurable)},cs=Do,Ta=Rs,_a=e(Function.toString);function Ia(e){return za[e]||(za[e]=Ha(e))}function Aa(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(ou(r)&&au(r,o,n),n.global)i?e[t]=r:uu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:su.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Oa(e){return(e=+e)!=e||0==e?0:pu(e)}function Na(e,t){return(e=fu(e))<0?du(e+t,0):hu(e,t)}function A(e){return 0<(e=e.length)?vu(yu(e),9007199254740991):0}function Ra(a){return function(e,t,r){var n,i=mu(e),o=Eu(i),s=gu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function Sa(e,t){var r,n=bu(e),i=0,o=[];for(r in n)!wu(_u,r)&&wu(n,r)&&Iu(o,r);for(;t.length>i;)!wu(n,r=t[i++])||~Tu(o,r)||Iu(o,r);return o}function Ca(e,t,r){for(var n=Mu(t),i=Uu.f,o=ku.f,s=0;s<n.length;s++){var a=n[s];xu(e,a)||r&&xu(r,a)||i(e,a,o(t,a))}}function xa(e,t){return(e=ju[Fu(e)])==Hu||e!=Vu&&(Du(t)?Pu(t):!!t)}function O(e,t){var r,n,i,o,s=e.target,a=e.global,u=e.stat;if(r=a?zu:u?zu[s]||Ju(s,{}):(zu[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(o=Bu(r,n))&&o.value:r[n],!qu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yu(i,o)}(e.sham||o&&o.sham)&&Gu(i,"sham",!0),Ku(r,n,i,e)}}cs(Ta.inspectSource)||(Ta.inspectSource=function(e){return _a(e)});var Ma,ka,Ua,Pa,Da,La,Fa,ja,T=Ta.inspectSource,cs=Do,Ta=T,Va=h.WeakMap,cs=cs(Va)&&/native code/.test(Ta(Va)),Ta=b.exports,Ha=Go,za=Ta("keys"),b=e,Ba=Lo,Ga=js,Ka=_,Ta=Rs,N=Ia,Ja=Va={},Ya=h.TypeError,qa=h.WeakMap,cs=(Fa=cs||Ta.state?(Ma=Ta.state||(Ta.state=new qa),ka=b(Ma.get),Ua=b(Ma.has),Pa=b(Ma.set),Da=function(e,t){if(Ua(Ma,e))throw new Ya("Object already initialized");return t.facade=e,Pa(Ma,e,t),t},La=function(e){return ka(Ma,e)||{}},function(e){return Ua(Ma,e)}):(Ja[ja=N("state")]=!0,Da=function(e,t){if(Ka(e,ja))throw new Ya("Object already initialized");return t.facade=e,Ga(e,ja,t),t},La=function(e){return Ka(e,ja)?e[ja]:{}},function(e){return Ka(e,ja)}),{set:Da,get:La,has:Fa,enforce:function(e){return Fa(e)?La(e):Da(e,{})},getterFor:function(t){return function(e){if(Ba(e)&&(e=La(e)).type===t)return e;throw Ya("Incompatible receiver, "+t+" required")}}}),Ta=m,$a=Do,Xa=_,Wa=So,Za=r.CONFIGURABLE,Qa=T,eu=cs.enforce,tu=cs.get,ru=Object.defineProperty,nu=Wa&&!Ta(function(){return 8!==ru(function(){},"length",{value:8}).length}),iu=String(String).split("String"),qa=vs.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),(!Xa(e,"name")||Za&&e.name!==t)&&(Wa?ru(e,"name",{value:t,configurable:!0}):e.name=t),nu&&r&&Xa(r,"arity")&&e.length!==r.arity&&ru(e,"length",{value:r.arity});try{r&&Xa(r,"constructor")&&r.constructor?Wa&&ru(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=eu(e);return Xa(r,"source")||(r.source=iu.join("string"==typeof t?t:"")),e},ou=(Function.prototype.toString=qa(function(){return $a(this)&&tu(this).source||Qa(this)},"toString"),Do),su=Ls,au=vs.exports,uu=zo,b={},cu=Math.ceil,lu=Math.floor,pu=Math.trunc||function(e){e=+e;return(0<e?lu:cu)(e)},fu=Oa,du=Math.max,hu=Math.min,yu=Oa,vu=Math.min,mu=Po,gu=Na,Eu=A,Ja={includes:Ra(!0),indexOf:Ra(!1)},wu=_,bu=Po,Tu=Ja.indexOf,_u=Va,Iu=e([].push),Au=Sa,Ou=(N=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]).concat("length","prototype");b.f=Object.getOwnPropertyNames||function(e){return Au(e,Ou)};(Ta={}).f=Object.getOwnPropertySymbols;var qa=Fo,Nu=b,Ru=Ta,Su=qo,Cu=e([].concat),Ta=qa("Reflect","ownKeys")||function(e){var t=Nu.f(Su(e)),r=Ru.f;return r?Cu(t,r(e)):t},xu=_,Mu=Ta,ku=y,Uu=Ls,Pu=m,Du=Do,Lu=/#|\.prototype\./,Fu=xa.normalize=function(e){return String(e).replace(Lu,".").toLowerCase()},ju=xa.data={},Vu=xa.NATIVE="N",Hu=xa.POLYFILL="P",qa=xa,zu=h,Bu=y.f,Gu=js,Ku=Aa,Ju=zo,Yu=Ca,qu=qa,Ta=!m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$u=_,Xu=Do,Wu=Bo,Zu=Ia("IE_PROTO"),Qu=Object,ec=Qu.prototype,Ta=Ta?Qu.getPrototypeOf:function(e){e=Wu(e);if($u(e,Zu))return e[Zu];var t=e.constructor;return Xu(t)&&e instanceof t?t.prototype:e instanceof Qu?ec:null},tc=Do,rc=String,nc=TypeError,ic=e,oc=qo,sc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=ic(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return oc(e),function(e){if("object"==typeof e||tc(e))return;throw nc("Can't set "+rc(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),ac={},uc=Sa,cc=N,R=Object.keys||function(e){return uc(e,cc)},lc=Ls,pc=qo,fc=Po,dc=R;function hc(){}function yc(e){e.write(Mc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function vc(e,t){return Vc(e),void 0===t?e:Hc?zc(e,t):function(){return e.apply(t,arguments)}}function mc(e){return void 0!==e&&(Bc.Array===e||Kc[Gc]===e)}function gc(e){if(null!=e)return Zc(e,el)||Zc(e,"@@iterator")||Qc[Wc(e)]}function Ec(e,t){if(t=arguments.length<2?ol(e):t,rl(t))return nl(tl(t,e));throw sl(il(e)+" is not iterable")}function wc(e,t,r){var n,i;ul(e);try{if(!(n=cl(e,"return"))){if("throw"===t)throw r;return r}n=al(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return ul(n),r}function bc(e,t){this.stopped=e,this.result=t}function Tc(e,t,r){function n(e){return o&&El(o,"normal",e),new bc(!0,e)}function i(e){return f?(fl(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var o,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=ll(t,p);if(d)o=e.iterator;else if(h)o=e;else{if(!(r=gl(e)))throw wl(dl(e)+" is not iterable");if(hl(r)){for(s=0,a=yl(e);s<a;s++)if((u=i(e[s]))&&vl(bl,u))return u;return new bc(!1)}o=ml(e,r)}for(c=(d?e:o).next;!(l=pl(c,o)).done;){try{u=i(l.value)}catch(e){El(o,"throw",e)}if("object"==typeof u&&u&&vl(bl,u))return u}return new bc(!1)}function _c(e){if("Symbol"===Tl(e))throw TypeError("Cannot convert a Symbol value to a string");return _l(e)}function Ic(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Nl(Fl,this);return Sl?r=Sl(new Dl,i?Rl(this):Fl):(r=i?this:xl(Fl),Ml(r,Pl,"Error")),void 0!==t&&Ml(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Il(e)}(t)),Ul&&Ml(r,"stack",function(e,t){if(Lc&&"string"==typeof e&&!Uc.prepareStackTrace)for(;t--;)e=Pc(e,Dc,"");return e}(r.stack,1)),i=r,Fc(t=n)&&"cause"in t&&jc(i,"cause",t.cause),kl(e,Ll,{that:n=[]}),Ml(r,"errors",n),r}ac.f=So&&!I?Object.defineProperties:function(e,t){pc(e);for(var r,n=fc(t),i=dc(t),o=i.length,s=0;s<o;)lc.f(e,r=i[s++],n[r]);return e};var Ac,R=Fo("document","documentElement"),Oc=qo,Nc=ac,Rc=N,I=Va,Sc=R,Cc=Yo,xc=Ia("IE_PROTO"),Mc=function(e){return"<script>"+e+"<\/script>"},kc=function(){try{Ac=new ActiveXObject("htmlfile")}catch(e){}var e,t;kc="undefined"==typeof document||document.domain&&Ac?yc(Ac):((t=Cc("iframe")).style.display="none",Sc.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Mc("document.F=Object")),e.close(),e.F);for(var r=Rc.length;r--;)delete kc.prototype[Rc[r]];return kc()},ac=(I[xc]=!0,Object.create||function(e,t){var r;return null!==e?(hc.prototype=Oc(e),r=new hc,hc.prototype=null,r[xc]=e):r=kc(),void 0===t?r:Nc.f(r,t)}),Uc=Error,Pc=e("".replace),N=String(Uc("zxcasd").stack),Dc=/\n\s*at [^:]*:[^\n]*/,Lc=Dc.test(N),Fc=Lo,jc=js,Vc=Vo,Hc=g,zc=e(e.bind),Bc=I={},Gc=Ko("iterator"),Kc=Array.prototype;(N={})[Ko("toStringTag")]="z";var S=N="[object z]"===String(N),Jc=Do,Yc=ko,qc=Ko("toStringTag"),$c=Object,Xc="Arguments"==Yc(function(){return arguments}()),Wc=S=S?Yc: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=$c(e),qc))?t:Xc?Yc(e):"Object"==(t=Yc(e))&&Jc(e.callee)?"Arguments":t},Zc=Ho,Qc=I,el=Ko("iterator"),tl=t,rl=Vo,nl=qo,il=jo,ol=gc,sl=TypeError,al=t,ul=qo,cl=Ho,ll=vc,pl=t,fl=qo,dl=jo,hl=mc,yl=A,vl=E,ml=Ec,gl=gc,El=wc,wl=TypeError,bl=bc.prototype,Tl=S,_l=String,Il=_c,Al=Mo,C=!m(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Al(1,7)),7!==e.stack)}),Ol=O,Nl=E,Rl=Ta,Sl=sc,Cl=Ca,xl=ac,Ml=js,x=Mo,kl=Tc,Ul=C,Pl=Ko("toStringTag"),Dl=Error,Ll=[].push,Fl=(Sl?Sl(Ic,Dl):Cl(Ic,Dl,{name:!0}),Ic.prototype=xl(Dl.prototype,{constructor:x(1,Ic),message:x(1,""),name:x(1,"AggregateError")})),C=(Ol({global:!0,constructor:!0,arity:2},{AggregateError:Ic}),Ko),Cl=ac,x=Ls.f,jl=C("unscopables"),Vl=Array.prototype;function Hl(e){Vl[jl][e]=!0}null==Vl[jl]&&x(Vl,jl,{configurable:!0,value:Cl(null)});var zl,Ol=m,C=Do,x=Ta,Cl=Aa,Bl=Ko("iterator"),M=!1;function Gl(e,t,r){(e=e&&!r?e.prototype:e)&&!$l(e,Xl)&&ql(e,Xl,{configurable:!0,value:t})}function Kl(){return this}function Jl(e,t,r,n,i,o,s){var a=r,u=t,c=void 0;function l(e){if(e===i&&v)return v;if(!yp&&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=Zl(Wl,{next:Ql(+!c,n)}),ep(a,u,!1),tp[u]=rp;var p,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[vp]||h["@@iterator"]||i&&h[i],v=!yp&&y||l(i);if((n="Array"==t&&h.entries||y)&&(a=sp(n.call(new e)))!==Object.prototype&&a.next&&(sp(a)!==hp&&(ap?ap(a,hp):op(a[vp])||lp(a,vp,Kl)),up(a,c,!0)),fp&&"values"==i&&y&&"values"!==y.name&&(dp?cp(h,"name","values"):(d=!0,v=function(){return ip(y,this)})),i)if(p={values:l("values"),keys:o?v:l("keys"),entries:l("entries")},s)for(f in p)!yp&&!d&&f in h||lp(h,f,p[f]);else np({target:t,proto:!0,forced:yp||d},p);return h[vp]!==v&&lp(h,vp,v,{name:i}),pp[t]=v,p}[].keys&&("next"in(Yl=[].keys())?(x=x(x(Yl)))!==Object.prototype&&(zl=x):M=!0),C((zl=null==zl||Ol(function(){var e={};return zl[Bl].call(e)!==e})?{}:zl)[Bl])||Cl(zl,Bl,function(){return this});var Yl={IteratorPrototype:zl,BUGGY_SAFARI_ITERATORS:M},ql=Ls.f,$l=_,Xl=Ko("toStringTag"),Wl=Yl.IteratorPrototype,Zl=ac,Ql=Mo,ep=Gl,tp=I,rp=function(){return this},np=O,ip=t,op=Do,sp=Ta,ap=sc,up=Gl,cp=js,lp=Aa,pp=I,fp=r.PROPER,dp=r.CONFIGURABLE,hp=Yl.IteratorPrototype,yp=Yl.BUGGY_SAFARI_ITERATORS,vp=Ko("iterator"),mp=Po,x=Hl,C=I,Ol=cs,Cl=Ls.f,M=Jl,r=So,gp=Ol.set,Ep=Ol.getterFor("Array Iterator"),Yl=M(Array,"Array",function(e,t){gp(this,{type:"Array Iterator",target:mp(e),index:0,kind:t})},function(){var e=Ep(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"),I=C.Arguments=C.Array;if(x("keys"),x("values"),x("entries"),r&&"values"!==I.name)try{Cl(I,"name",{value:"values"})}catch(De){}function wp(e){var e=Op(e),t=Np.f;Rp&&e&&!e[Sp]&&t(e,Sp,{configurable:!0,get:function(){return this}})}function bp(e,t){if(Cp(t,e))return e;throw xp("Incorrect invocation")}function Tp(){}function _p(e){if(!Mp(e))return!1;try{return Dp(Tp,Pp,e),!0}catch(e){return!1}}function Ip(e){if(!Mp(e))return!1;switch(kp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return jp||!!Fp(Lp,Up(e))}catch(e){return!0}}var Ap=S,Ol=(N||Aa(Object.prototype,"toString",N?{}.toString:function(){return"[object "+Ap(this)+"]"},{unsafe:!0}),"process"==ko(h.process)),Op=Fo,Np=Ls,Rp=So,Sp=Ko("species"),Cp=E,xp=TypeError,M=e,C=m,Mp=Do,kp=S,Up=T,Pp=[],Dp=Fo("Reflect","construct"),Lp=/^\s*(?:class|function)\b/,Fp=M(Lp.exec),jp=!Lp.exec(Tp);function Vp(e,t){var r,e=Jp(e).constructor;if(void 0===e||null==(r=Jp(e)[Yp]))return t;if(Bp(e=r))return e;throw Kp(Gp(e)+" is not a constructor")}Ip.sham=!0;var Hp,zp,Bp=x=!Dp||C(function(){var e;return _p(_p.call)||!_p(Object)||!_p(function(){e=!0})||e})?Ip:_p,Gp=jo,Kp=TypeError,Jp=qo,Yp=Ko("species"),qp=(r=Function.prototype).apply,$p=r.call,Cl="object"==typeof Reflect&&Reflect.apply||(g?$p.bind(qp):function(){return $p.apply(qp,arguments)}),I=e([].slice),Xp=TypeError,N=/(?:ipad|iphone|ipod).*applewebkit/i.test(k),Wp=h,Zp=Cl,E=vc,Qp=Do,ef=_,S=m,tf=R,rf=I,nf=Yo,M=N,C=Ol,r=Wp.setImmediate,g=Wp.clearImmediate,of=Wp.process,sf=Wp.Dispatch,af=Wp.Function,R=Wp.MessageChannel,uf=Wp.String,cf=0,lf={};try{Hp=Wp.location}catch(De){}function pf(e){return function(){hf(e)}}function ff(e){hf(e.data)}function df(e){Wp.postMessage(uf(e),Hp.protocol+"//"+Hp.host)}var hf=function(e){var t;ef(lf,e)&&(t=lf[e],delete lf[e],t())};function yf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function vf(){this.head=null,this.tail=null}function mf(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=Ff(r),this.reject=Ff(n)}r&&g||(r=function(e){var t=arguments.length,r=1;if(t<r)throw Xp("Not enough arguments");var n=Qp(e)?e:af(e),i=rf(arguments,1);return lf[++cf]=function(){Zp(n,void 0,i)},zp(cf),cf},g=function(e){delete lf[e]},C?zp=function(e){of.nextTick(pf(e))}:sf&&sf.now?zp=function(e){sf.now(pf(e))}:R&&!M?(M=(C=new R).port2,C.port1.onmessage=ff,zp=E(M.postMessage,M)):Wp.addEventListener&&Qp(Wp.postMessage)&&!Wp.importScripts&&Hp&&"file:"!==Hp.protocol&&!S(df)?(zp=df,Wp.addEventListener("message",ff,!1)):zp="onreadystatechange"in nf("script")?function(e){tf.appendChild(nf("script")).onreadystatechange=function(){tf.removeChild(this),hf(e)}}:function(e){setTimeout(pf(e),0)});var gf,Ef,wf,bf,Tf,_f,If,R={set:r,clear:g},C=h,E=/ipad|iphone|ipod/i.test(k)&&void 0!==C.Pebble,M=/web0s(?!.*chrome)/i.test(k),S=h,r=vc,g=y.f,Af=R.set,C=N,y=E,N=M,Of=Ol,E=S.MutationObserver||S.WebKitMutationObserver,M=S.document,Nf=S.process,Rf=S.Promise,N=((g=(g=g(S,"queueMicrotask"))&&g.value)||(gf=function(){var e,t;for(Of&&(e=Nf.domain)&&e.exit();Ef;){t=Ef.fn,Ef=Ef.next;try{t()}catch(e){throw Ef?bf():wf=void 0,e}}wf=void 0,e&&e.enter()},bf=C||Of||N||!E||!M?!y&&Rf&&Rf.resolve?((C=Rf.resolve(void 0)).constructor=Rf,If=r(C.then,C),function(){If(gf)}):Of?function(){Nf.nextTick(gf)}:(Af=r(Af,S),function(){Af(gf)}):(Tf=!0,_f=M.createTextNode(""),new E(gf).observe(_f,{characterData:!0}),function(){_f.data=Tf=!Tf})),g||function(e){e={fn:e,next:void 0};wf&&(wf.next=e),Ef||(Ef=e,bf()),wf=e}),Sf=h,y=(vf.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}},vf),Rf=h.Promise,r=!(C="object"==typeof Deno&&Deno&&"object"==typeof Deno.version)&&!Ol&&"object"==typeof window&&"object"==typeof document,S=h,Cf=Rf,M=Do,E=qa,xf=T,g=Ko,Mf=r,kf=C,Uf=ls,Pf=(Cf&&Cf.prototype,g("species")),Df=!1,Lf=M(S.PromiseRejectionEvent),T={CONSTRUCTOR:E("Promise",function(){var e=xf(Cf),t=e!==String(Cf);if(!t&&66===Uf)return!0;if(!Uf||Uf<51||!/native code/.test(e)){var e=new Cf(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Pf]=r,!(Df=e.then(function(){})instanceof r))return!0}return!t&&(Mf||kf)&&!Lf}),REJECTION_EVENT:Lf,SUBCLASSING:Df},Ff=Vo;function jf(e,t){var r,n,i,o,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&&(o=t,Kf(Wf,Gf,function(){var e=o.facade;Bf?ld.emit("rejectionHandled",e):vd("rejectionhandled",e,o.value)})),t.rejection=1),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(ud("Promise-chain cycle")):(n=hd(r))?Kf(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Vf,Hf,zf,C=O,Bf=Ol,Gf=h,Kf=t,g=Aa,M=sc,S=Gl,E=wp,Jf=Vo,Yf=Do,qf=Lo,$f=bp,Xf=Vp,Wf=R.set,Zf=N,Qf=yf,ed=y,R=cs,N=Rf,y=r={f:function(e){return new mf(e)}},td=T.CONSTRUCTOR,rd=T.REJECTION_EVENT,nd=T.SUBCLASSING,id=R.getterFor("Promise"),od=R.set,R=N&&N.prototype,sd=N,ad=R,ud=Gf.TypeError,cd=Gf.document,ld=Gf.process,pd=y.f,fd=pd,dd=!!(cd&&cd.createEvent&&Gf.dispatchEvent),hd=function(e){var t;return!(!qf(e)||!Yf(t=e.then))&&t},yd=function(r,i){r.notified||(r.notified=!0,Zf(function(){for(var e,n,t=r.reactions;e=t.get();)jf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Kf(Wf,Gf,function(){var e,t=n.facade,r=n.value;if(md(n)&&(e=Qf(function(){Bf?ld.emit("unhandledRejection",r,t):vd("unhandledrejection",t,r)}),n.rejection=Bf||md(n)?2:1,e.error))throw e.value}))}))},vd=function(e,t,r){var n;dd?((n=cd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Gf.dispatchEvent(n)):n={promise:t,reason:r},!rd&&(t=Gf["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Sf.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},md=function(e){return 1!==e.rejection&&!e.parent},gd=function(t,r,n){return function(e){t(r,e,n)}},Ed=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,yd(e,!0))},wd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw ud("Promise can't be resolved itself");var n=hd(e);n?Zf(function(){var t={done:!1};try{Kf(n,e,gd(wd,t,r),gd(Ed,t,r))}catch(e){Ed(t,e,r)}}):(r.value=e,r.state=1,yd(r,!1))}catch(e){Ed({done:!1},e,r)}}};if(td&&(ad=(sd=function(e){$f(this,ad),Jf(e),Kf(Vf,this);var t=id(this);try{e(gd(wd,t),gd(Ed,t))}catch(e){Ed(t,e)}}).prototype,(Vf=function(e){od(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ed,rejection:!1,state:0,value:void 0})}).prototype=g(ad,"then",function(e,t){var r=id(this),n=pd(Xf(this,sd));return r.parent=!0,n.ok=!Yf(e)||e,n.fail=Yf(t)&&t,n.domain=Bf?ld.domain:void 0,0==r.state?r.reactions.add(n):Zf(function(){jf(n,r)}),n.promise}),Hf=function(){var e=new Vf,t=id(e);this.promise=e,this.resolve=gd(wd,t),this.reject=gd(Ed,t)},y.f=pd=function(e){return e===sd||void 0===e?new Hf:fd(e)},Yf(N)&&R!==Object.prototype)){zf=R.then,nd||g(R,"then",function(e,t){var r=this;return new sd(function(e,t){Kf(zf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete R.constructor}catch(De){}M&&M(R,ad)}C({global:!0,constructor:!0,wrap:!0,forced:td},{Promise:sd}),S(sd,"Promise",!1),E("Promise");var bd=Ko("iterator"),Td=!1;try{var _d=0,Id={next:function(){return{done:!!_d++}},return:function(){Td=!0}};Id[bd]=function(){return this},Array.from(Id,function(){throw 2})}catch(De){}function Ad(e,t){if(!t&&!Td)return!1;var r=!1;try{var n={};n[bd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function Od(e,t){return Bd(e),Gd(t)&&t.constructor===e?t:((0,(e=Kd.f(e)).resolve)(t),e.promise)}function Nd(i){return function(e,t){var r,e=lh(ph(e)),t=ch(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=dh(e,t))<55296||56319<r||t+1===n||(n=dh(e,t+1))<56320||57343<n?i?fh(e,t):r:i?hh(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Rd(e,t){if(e){if(e[_h]!==Ah)try{Th(e,_h,Ah)}catch(t){e[_h]=Ah}if(e[Ih]||Th(e,Ih,t),wh[t])for(var r in bh)if(e[r]!==bh[r])try{Th(e,r,bh[r])}catch(t){e[r]=bh[r]}}}var Sd,Cd=Rf,y=T.CONSTRUCTOR||!Ad(function(e){Cd.all(e).then(void 0,function(){})}),xd=t,Md=Vo,kd=r,Ud=yf,Pd=Tc,N=(O({target:"Promise",stat:!0,forced:y},{all:function(e){var a=this,t=kd.f(a),u=t.resolve,c=t.reject,r=Ud(function(){var n=Md(a.resolve),i=[],o=0,s=1;Pd(e,function(e){var t=o++,r=!1;s++,xd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),O),g=Fo,M=Do,R=Aa,C=(nd=Rf)&&nd.prototype,Dd=(N({target:"Promise",proto:!0,forced:T.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),M(nd)&&(td=g("Promise").prototype.catch,C.catch!==td&&R(C,"catch",td,{unsafe:!0})),t),Ld=Vo,Fd=r,jd=yf,Vd=Tc,Hd=(O({target:"Promise",stat:!0,forced:y},{race:function(e){var r=this,n=Fd.f(r),i=n.reject,t=jd(function(){var t=Ld(r.resolve);Vd(e,function(e){Dd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}}),t),zd=r,Bd=(O({target:"Promise",stat:!0,forced:T.CONSTRUCTOR},{reject:function(e){var t=zd.f(this);return Hd(t.reject,void 0,e),t.promise}}),qo),Gd=Lo,Kd=r,S=O,E=T.CONSTRUCTOR,Jd=Od,Yd=(Fo("Promise"),S({target:"Promise",stat:!0,forced:E},{resolve:function(e){return Jd(this,e)}}),t),qd=Vo,$d=r,Xd=yf,Wd=Tc,Zd=(O({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=$d.f(a),u=t.resolve,r=t.reject,n=Xd(function(){var n=qd(a.resolve),i=[],o=0,s=1;Wd(e,function(e){var t=o++,r=!1;s++,Yd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}}),t),Qd=Vo,eh=Fo,th=r,rh=yf,nh=Tc,Id=(O({target:"Promise",stat:!0},{any:function(e){var u=this,c=eh("AggregateError"),t=th.f(u),l=t.resolve,p=t.reject,r=rh(function(){var n=Qd(u.resolve),i=[],o=0,s=1,a=!1;nh(e,function(e){var t=o++,r=!1;s++,Zd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,"No one promise resolved")))})}),--s||p(new c(i,"No one promise resolved"))});return r.error&&p(r.value),t.promise}}),O),M=m,ih=Fo,oh=Do,sh=Vp,ah=Od,nd=Aa,uh=(N=Rf)&&N.prototype;Id({target:"Promise",proto:!0,real:!0,forced:!!N&&M(function(){uh.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=sh(this,ih("Promise")),e=oh(t);return this.then(e?function(e){return ah(r,t()).then(function(){return e})}:t,e?function(e){return ah(r,t()).then(function(){throw e})}:t)}}),oh(N)&&(g=ih("Promise").prototype.finally,uh.finally!==g&&nd(uh,"finally",g,{unsafe:!0}));var ch=Oa,lh=_c,ph=Uo,fh=(R=e)("".charAt),dh=R("".charCodeAt),hh=R("".slice),yh=(Nd(!1),Nd(!0)),vh=_c,td=Jl,mh=(C=cs).set,gh=C.getterFor("String Iterator");td(String,"String",function(e){mh(this,{type:"String Iterator",string:vh(e),index:0})},function(){var e=gh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=yh(t,r),e.index+=t.length,{value:t,done:!1})});(y=h).Promise;var T=Yo("span").classList,E=(S=T&&T.constructor&&T.constructor.prototype)===Object.prototype?void 0:S,Eh=h,wh={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},Rf=E,bh=Yl,Th=js,_h=(Id=Ko)("iterator"),Ih=Id("toStringTag"),Ah=bh.values;for(Sd in wh)Rd(Eh[Sd]&&Eh[Sd].prototype,Sd);function Oh(e,t,r){(t=Wh(t))in e?Zh.f(e,t,Qh(0,r)):e[t]=r}function Nh(e){if(9007199254740991<e)throw my("Maximum allowed index exceeded");return e}function Rh(e,t){return gy(e=e)&&(r=e.constructor,(Ey(r)&&(r===Ty||gy(r.prototype))||wy(r)&&null===(r=r[by]))&&(r=void 0)),new(void 0===r?Ty:r)(0===t?0:t);var r}function Sh(t){return 51<=Iy||!_y(function(){var e=[];return(e.constructor={})[Ay]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Ch(e,t){if(!delete e[t])throw Py("Cannot delete property "+Uy(t)+" of "+Uy(e))}function xh(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 i,o,s=By(e),a=zy(s),u=Hy(t,r),c=Gy(a),l=0,t=n||Ky,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(d)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:Jy(p,i)}else switch(f){case 4:return!1;case 7:Jy(p,i)}return m?-1:y||v?v:p}}function Mh(e,t){var r=[][e];return!!r&&Yy(function(){r.call(null,t||function(){return 1},1)})}function kh(u){var c=1==u;return function(e,t,r){for(var n,i=ov(e),o=iv(i),s=nv(t,r),a=sv(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function Uh(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&fv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&cv(u)?(c=lv(u),l=Uh(e,t,u,c,l,o-1)-1):(pv(l+1),e[l]=u),l++),p++;return l}function Ph(c){return function(e,t,r,n){Hv(t);var i=zv(e),o=Bv(i),s=Gv(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw Kv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function Dh(e,t,r){for(var n=cm(e),i=um(t,n),o=um(void 0===r?n:r,n),s=pm(fm(o-i,0)),a=0;i<o;i++,a++)lm(s,a,e[i]);return s.length=a,s}function Lh(e,t){var r=e.length,n=hm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Lh(dm(e,0,n),t),f=Lh(dm(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 Fh(e){rg(e,ug,{value:{objectID:"O"+cg++,weakData:{}}})}function jh(e,t,r){for(var n in t)Eg(e,n,t[n],r);return e}Rd(Rf,"DOMTokenList");var Vh,Hh,zh,Bh,Gh,Kh,Jh,Yh=r,qh=yf,$h=(O({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Yh.f(this),e=qh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),qo),Xh=wc,Wh=Jo,Zh=Ls,Qh=Mo,ey=vc,ty=t,ry=Bo,ny=mc,iy=x,oy=A,sy=Oh,ay=Ec,uy=gc,cy=Array,ly=(O({target:"Array",stat:!0,forced:!Ad(function(e){Array.from(e)})},{from:function(e){var t=ry(e),e=iy(this),r=arguments.length,n=1<r?arguments[1]:void 0,i=void 0!==n;i&&(n=ey(n,2<r?arguments[2]:void 0));var o,s,a,u,c,l,r=uy(t),p=0;if(!r||this===cy&&ny(r))for(o=oy(t),s=e?new this(o):cy(o);p<o;p++)l=i?n(t[p],p):t[p],sy(s,p,l);else for(c=(u=ay(t,r)).next,s=e?new this:[];!(a=ty(c,u)).done;p++)l=i?function(e,t,r,n){try{return n?t($h(r)[0],r[1]):t(r)}catch(t){Xh(e,"throw",t)}}(u,n,[a.value,p],!0):a.value,sy(s,p,l);return s.length=p,s}}),ko),M=Array.isArray||function(e){return"Array"==ly(e)},py=(O({target:"Array",stat:!0},{isArray:M}),x),fy=Oh,dy=Array,hy=(O({target:"Array",stat:!0,forced:m(function(){function e(){}return!(dy.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(py(this)?this:dy)(t);e<t;)fy(r,e,arguments[e++]);return r.length=t,r}}),Bo),yy=A,vy=Oa,N=Hl,my=(O({target:"Array",proto:!0},{at:function(e){var t=hy(this),r=yy(t),e=vy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),N("at"),TypeError),gy=M,Ey=x,wy=Lo,by=Ko("species"),Ty=Array,_y=m,Iy=ls,Ay=Ko("species"),nd=O,g=m,Oy=M,Ny=Lo,Ry=Bo,Sy=A,Cy=Nh,xy=Oh,My=Rh,R=Sh,C=ls,ky=Ko("isConcatSpreadable"),td=51<=C||!g(function(){var e=[];return e[ky]=!1,e.concat()[0]!==e}),T=R("concat"),Uy=(nd({target:"Array",proto:!0,arity:1,forced:!td||!T},{concat:function(e){for(var t,r,n,i=Ry(this),o=My(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Ny(e))return!1;var t=e[ky];return void 0!==t?!!t:Oy(e)}(n=-1===a?i:arguments[a]))for(r=Sy(n),Cy(s+r),t=0;t<r;t++,s++)t in n&&xy(o,s,n[t]);else Cy(s+1),xy(o,s++,n);return o.length=s,o}}),jo),Py=TypeError,Dy=Bo,Ly=Na,Fy=A,jy=Ch,Vy=Math.min,S=Hl,Hy=(O({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Dy(this),n=Fy(r),i=Ly(e,n),o=Ly(t,n),e=2<arguments.length?arguments[2]:void 0,s=Vy((void 0===e?n:Ly(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:jy(r,i),i+=a,o+=a;return r}}),S("copyWithin"),vc),zy=$o,By=Bo,Gy=A,Ky=Rh,Jy=e([].push),E={forEach:xh(0),map:xh(1),filter:xh(2),some:xh(3),every:xh(4),find:xh(5),findIndex:xh(6),filterReject:xh(7)},Yy=m,qy=E.every,$y=(O({target:"Array",proto:!0,forced:!Mh("every")},{every:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Bo),Xy=Na,Wy=A,Yl=Hl,Zy=(O({target:"Array",proto:!0},{fill:function(e){for(var t=$y(this),r=Wy(t),n=arguments.length,i=Xy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Xy(n,r);i<o;)t[i++]=e;return t}}),Yl("fill"),E.filter),js=(O({target:"Array",proto:!0,forced:!Sh("filter")},{filter:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Qy=E.find,Id=Hl,ev=!0,Rf=("find"in[]&&Array(1).find(function(){ev=!1}),js({target:"Array",proto:!0,forced:ev},{find:function(e){return Qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Id("find"),O),tv=E.findIndex,r=Hl,rv=!0,nv=("findIndex"in[]&&Array(1).findIndex(function(){rv=!1}),Rf({target:"Array",proto:!0,forced:rv},{findIndex:function(e){return tv(this,e,1<arguments.length?arguments[1]:void 0)}}),r("findIndex"),vc),iv=$o,ov=Bo,sv=A,av=(N={findLast:kh(0),findLastIndex:kh(1)}).findLast,C=Hl,uv=(O({target:"Array",proto:!0},{findLast:function(e){return av(this,e,1<arguments.length?arguments[1]:void 0)}}),C("findLast"),N.findLastIndex),g=Hl,cv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return uv(this,e,1<arguments.length?arguments[1]:void 0)}}),g("findLastIndex"),M),lv=A,pv=Nh,fv=vc,dv=R=Uh,hv=Bo,yv=A,vv=Oa,mv=Rh,gv=(O({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=hv(this),r=yv(t),n=mv(t,0);return n.length=dv(n,t,t,r,0,void 0===e?1:vv(e)),n}}),R),Ev=Vo,wv=Bo,bv=A,Tv=Rh,_v=(O({target:"Array",proto:!0},{flatMap:function(e){var t,r=wv(this),n=bv(r);return Ev(e),(t=Tv(r,0)).length=gv(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),E.forEach),nd=Mh("forEach")?[].forEach:function(e){return _v(this,e,1<arguments.length?arguments[1]:void 0)},Iv=(O({target:"Array",proto:!0,forced:[].forEach!=nd},{forEach:nd}),Ja.includes),td=Hl,T=(O({target:"Array",proto:!0,forced:m(function(){return!Array(1).includes()})},{includes:function(e){return Iv(this,e,1<arguments.length?arguments[1]:void 0)}}),td("includes"),O),Av=Ja.indexOf,S=Mh,Ov=e([].indexOf),Nv=!!Ov&&1/Ov([1],1,-0)<0,Yl=S("indexOf"),js=(T({target:"Array",proto:!0,forced:Nv||!Yl},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Nv?Ov(this,e,t)||0:Av(this,e,t)}}),O),Id=$o,Rv=Po,Rf=Mh,Sv=e([].join),r=Id!=Object,C=Rf("join",","),Cv=(js({target:"Array",proto:!0,forced:r||!C},{join:function(e){return Sv(Rv(this),void 0===e?",":e)}}),Cl),xv=Po,Mv=Oa,kv=A,N=Mh,Uv=Math.min,Pv=[].lastIndexOf,Dv=!!Pv&&1/[1].lastIndexOf(1,-0)<0,g=N("lastIndexOf"),Lv=(O({target:"Array",proto:!0,forced:(R=Dv||!g?function(e){if(Dv)return Cv(Pv,this,arguments)||0;var t=xv(this),r=kv(t),n=r-1;for((n=1<arguments.length?Uv(n,Mv(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pv)!==[].lastIndexOf},{lastIndexOf:R}),E.map),nd=(O({target:"Array",proto:!0,forced:!Sh("map")},{map:function(e){return Lv(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Fv=Bo,jv=A,Vv=Nh,td=m(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Ja=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Hv=(nd({target:"Array",proto:!0,arity:1,forced:td||Ja},{push:function(e){var t=Fv(this),r=jv(t),n=arguments.length;Vv(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Vo),zv=Bo,Bv=$o,Gv=A,Kv=TypeError,Jv=(S={left:Ph(!1),right:Ph(!0)}).left,T=ls,Yl=Ol,Yv=(O({target:"Array",proto:!0,forced:!Mh("reduce")||!Yl&&79<T&&T<83},{reduce:function(e){var t=arguments.length;return Jv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),Id=ls,Rf=Ol,js=(O({target:"Array",proto:!0,forced:!Mh("reduceRight")||!Rf&&79<Id&&Id<83},{reduceRight:function(e){return Yv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),O),qv=M,$v=e([].reverse),r=[1,2],C=(js({target:"Array",proto:!0,forced:String(r)===String(r.reverse())},{reverse:function(){return qv(this)&&(this.length=this.length),$v(this)}}),O),Xv=M,Wv=x,Zv=Lo,Qv=Na,em=A,tm=Po,rm=Oh,Cl=Ko,nm=I,N=Sh("slice"),im=Cl("species"),om=Array,sm=Math.max,am=(C({target:"Array",proto:!0,forced:!N},{slice:function(e,t){var r,n,i,o=tm(this),s=em(o),a=Qv(e,s),u=Qv(void 0===t?s:t,s);if(Xv(o)&&(r=o.constructor,(r=Wv(r)&&(r===om||Xv(r.prototype))||Zv(r)&&null===(r=r[im])?void 0:r)===om||void 0===r))return nm(o,a,u);for(n=new(void 0===r?om:r)(sm(u-a,0)),i=0;a<u;a++,i++)a in o&&rm(n,i,o[a]);return n.length=i,n}}),E.some),um=(O({target:"Array",proto:!0,forced:!Mh("some")},{some:function(e){return am(this,e,1<arguments.length?arguments[1]:void 0)}}),Na),cm=A,lm=Oh,pm=Array,fm=Math.max,dm=Dh,hm=Math.floor,g=Lh,nd=!!(R=k.match(/firefox\/(\d+)/i))&&+R[1],td=/MSIE|Trident/.test(k),Yl=!!(Ja=k.match(/AppleWebKit\/(\d+)\./))&&+Ja[1],T=O,ym=Vo,vm=Bo,mm=A,gm=Ch,Em=_c,Ol=m,wm=g,Rf=Mh,bm=nd,Tm=td,_m=ls,Im=Yl,Am=[],Om=(S=e)(Am.sort),Nm=S(Am.push),Id=Ol(function(){Am.sort(void 0)}),js=Ol(function(){Am.sort(null)}),r=Rf("sort"),Rm=!Ol(function(){if(_m)return _m<70;if(!(bm&&3<bm)){if(Tm)return!0;if(Im)return Im<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){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++)Am.push({k:e+r,v:t})}for(Am.sort(function(e,t){return t.v-e.v}),r=0;r<Am.length;r++)e=Am[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),I=(T({target:"Array",proto:!0,forced:Id||!js||!r||!Rm},{sort:function(e){void 0!==e&&ym(e);var t=vm(this);if(Rm)return void 0===e?Om(t):Om(t,e);for(var r,n,i=[],o=mm(t),s=0;s<o;s++)s in t&&Nm(i,t[s]);for(wm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Em(e)>Em(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)gm(t,s++);return t}}),wp("Array"),O),Sm=Bo,Cm=Na,xm=Oa,Mm=A,km=Nh,Um=Rh,Pm=Oh,Dm=Ch,Cl=Sh("splice"),Lm=Math.max,Fm=Math.min,C=(I({target:"Array",proto:!0,forced:!Cl},{splice:function(e,t){var r,n,i,o,s,a,u=Sm(this),c=Mm(u),l=Cm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Fm(Lm(xm(t),0),c-l)),km(c+r-n),i=Um(u,n),o=0;o<n;o++)(s=l+o)in u&&Pm(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:Dm(u,a);for(o=c;c-n+r<o;o--)Dm(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:Dm(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Hl("flat"),Hl("flatMap"),O),jm=Bo,Vm=A,Hm=Ch,zm=Nh,N=1!==[].unshift(0),R=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),k=(C({target:"Array",proto:!0,arity:1,forced:N||R},{unshift:function(e){var t=jm(this),r=Vm(t),n=arguments.length;if(n){zm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Hm(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),y.Array,{exports:{}}),Ja={},Bm=ko,Gm=Po,Km=b.f,Jm=Dh,Ym="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=(Ja.f=function(e){if(!Ym||"Window"!=Bm(e))return Km(Gm(e));var t=e;try{return Km(t)}catch(t){return Jm(Ym)}},m(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),nd=m,qm=Lo,$m=ko,Xm=g,Wm=Object.isExtensible,td=nd(function(){Wm(1)})||Xm?function(e){return!!qm(e)&&(!Xm||"ArrayBuffer"!=$m(e))&&(!Wm||Wm(e))}:Wm,ls=!m(function(){return Object.isExtensible(Object.preventExtensions({}))}),Zm=O,Qm=e,Yl=Va,eg=Lo,tg=_,rg=Ls.f,ng=b,ig=Ja,og=td,sg=ls,ag=!1,ug=Go("meta"),cg=0,lg=k.exports={enable:function(){lg.enable=function(){},ag=!0;var i=ng.f,o=Qm([].splice),e={};e[ug]=1,i(e).length&&(ng.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===ug){o(t,r,1);break}return t},Zm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ig.f}))},fastKey:function(e,t){if(!eg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!tg(e,ug)){if(!og(e))return"F";if(!t)return"E";Fh(e)}return e[ug].objectID},getWeakData:function(e,t){if(!tg(e,ug)){if(!og(e))return!0;if(!t)return!1;Fh(e)}return e[ug].weakData},onFreeze:function(e){return sg&&ag&&og(e)&&!tg(e,ug)&&Fh(e),e}},pg=(Yl[ug]=!0,Do),fg=Lo,dg=sc,S=O,Rf=h,hg=e,Ol=qa,yg=Aa,T=k.exports,vg=Tc,mg=bp,Id=Do,gg=Lo,js=m,r=Ad,I=Gl,Eg=Aa,wg=Ls.f,bg=ac,Tg=jh,_g=vc,Ig=bp,Ag=Tc,Og=Jl,Ng=wp,Rg=So,Sg=k.exports.fastKey,Cg=cs.set,xg=cs.getterFor;function Mg(e){var r=hg(Kh[e]);yg(Kh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return zh&&!gg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}function kg(e,t){for(var r=0,n=Lg(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Ug(e,t,r,n){for(var i,o,s,a=Vg(e),u=jg(a),c=Fg(t,r),l=Bg(null),p=zg(u),f=0;f<p;f++)s=u[f],(o=Hg(c(s,f,a)))in l?Jg(l[o],s):l[o]=[s];if(n&&(i=n(a))!==Kg)for(o in l)l[o]=Gg(i,l[o]);return l}function Pg(e){for(var t,r,n=Wg(this),i=Xg(n),o=$g(e,1<arguments.length?arguments[1]:void 0),s=new Qg,a=Zg(i),u=0;u<a;u++)t=o(r=i[u],u,n),t0(s,t)?n0(e0(s,t),r):r0(s,t,[r]);return s}function Dg(e){return a0[e].prototype}Cl=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},C={getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=Sg(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),Rg?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=Sg(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){Ig(e,a),Cg(e,{type:r,index:bg(null),first:void 0,last:void 0,size:0}),Rg||(e.size=0),null!=t&&Ag(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=xg(r);return Tg(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,Rg?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),Rg?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=_g(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)}}),Tg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),Rg&&wg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=xg(t),o=xg(n);Og(e,t,function(e,t){Cg(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(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),Ng(t)}},Hh=-1!==(N="Map").indexOf("Map"),zh=-1!==N.indexOf("Weak"),Bh=Hh?"set":"add",Gh=Rf.Map,Kh=Gh&&Gh.prototype,R={},Ol(N,!Id(Jh=Gh)||!(zh||Kh.forEach&&!js(function(){(new Gh).entries().next()})))?(Jh=C.getConstructor(Cl,N,Hh,Bh),T.enable()):Ol(N,!0)&&(y=(Vh=new Jh)[Bh](zh?{}:-0,1)!=Vh,g=js(function(){Vh.has(1)}),nd=r(function(e){new Gh(e)}),Va=!zh&&js(function(){for(var e=new Gh,t=5;t--;)e[Bh](t,t);return!e.has(-0)}),nd||(((Jh=Cl(function(e,t){mg(e,Kh);r=new Gh,e=e,n=Jh,dg&&pg(e=e.constructor)&&e!==n&&fg(e=e.prototype)&&e!==n.prototype&&dg(r,e);var r,n=r;return null!=t&&vg(t,n[Bh],{that:n,AS_ENTRIES:Hh}),n})).prototype=Kh).constructor=Jh),(g||Va)&&(Mg("delete"),Mg("has"),Hh&&Mg("get")),(Va||y)&&Mg(Bh),zh&&Kh.clear&&delete Kh.clear),R.Map=Jh,S({global:!0,constructor:!0,forced:Jh!=Gh},R),I(Jh,N),zh||C.setStrong(Jh,N,Hh);var Lg=A,Fg=vc,jg=$o,Vg=Bo,Hg=Jo,zg=A,Bg=ac,Gg=kg,Kg=Array,Jg=e([].push),Yg=Ug,_=Hl,qg=(O({target:"Array",proto:!0},{group:function(e){return Yg(this,e,1<arguments.length?arguments[1]:void 0)}}),_("group"),Ug),b=Hl,$g=(O({target:"Array",proto:!0,forced:!Mh("groupBy")},{groupBy:function(e){return qg(this,e,1<arguments.length?arguments[1]:void 0)}}),b("groupBy"),vc),Ja=e,Xg=$o,Wg=Bo,Zg=A,Qg=Fo("Map"),td=Qg.prototype,e0=Ja(td.get),t0=Ja(td.has),r0=Ja(td.set),n0=Ja([].push),ls=Hl,Yl=Pg,sc=(O({target:"Array",proto:!0,name:"groupToMap",forced:!Mh("groupByToMap")},{groupByToMap:Yl}),ls("groupByToMap"),Hl),i0=(O({target:"Array",proto:!0},{groupToMap:Pg}),sc("groupToMap"),A),o0=Po,qa=Hl,s0=Array,a0=(O({target:"Array",proto:!0},{toReversed:function(){for(var e=o0(this),t=s0,r=i0(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n}}),qa("toReversed"),h),k=O,u0=Vo,c0=Po,l0=kg,Rf=Hl,p0=Array,f0=e(Dg("Array").sort),Ol=(k({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&u0(e);var t=c0(this),t=l0(p0,t);return f0(t,e)}}),Rf("toSorted"),O),r=Hl,d0=Nh,h0=A,y0=Na,v0=Po,m0=Oa,g0=Array,E0=Math.max,w0=Math.min,b0=(Ol({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=v0(this),a=h0(s),u=y0(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,w0(E0(m0(t),0),a-u)),i=d0(a+r-n),o=g0(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),r("toSpliced"),A),T0=Oa,_0=RangeError,I0=Po,A0=Array;if(O({target:"Array",proto:!0},{with:function(e,t){var r=I0(this),n=A0,i=t,o=b0(r),s=(e=T0(e))<0?o+e:e;if(o<=s||s<0)throw _0("Incorrect index");for(var a=new n(o),u=0;u<o;u++)a[u]=u===s?i:r[u];return a}}),js=h,nd=Rs,Cl=Do,g=Ta,Va=Aa,y=Ko("asyncIterator"),S=js.AsyncIterator,R=nd.AsyncIteratorPrototype)gw=R;else if(Cl(S))gw=S.prototype;else if(nd.USE_FUNCTION_CONSTRUCTOR||js.USE_FUNCTION_CONSTRUCTOR)try{pw=g(g(g(Function("return async function*(){}()")()))),g(pw)===Object.prototype&&(gw=pw)}catch(De){}function O0(e,t,r){var n=e.done;P0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function N0(e){D0(this,{type:"AsyncFromSyncIterator",iterator:k0(e),next:e.next})}function R0(e,t,r,n){try{var i=q0(e,"return");if(i)return Y0("Promise").resolve(J0(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function S0(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:G0(K0(e).next)},u=Q0("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||X0(s),new u(function(r,n){var i=function(e){R0(c,n,e,n)},o=function(){try{if(f&&p)try{Z0(l)}catch(e){i(e)}u.resolve(W0($0(t,c))).then(function(e){try{if(W0(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)o();else if(h)e?o():R0(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?R0(c,r,y||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function C0(e,t){if(!hE||!dE(e)||!hE(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function x0(e,t,r){r.get&&yE(r.get,t,{getter:!0}),r.set&&yE(r.set,t,{setter:!0}),vE.f(e,t,r)}Cl((gw=gw||{})[y])||Va(gw,y,function(){return this});var M0=t,k0=qo,I=ac,U0=Ho,C=jh,N=cs,_=gw,P0=Fo("Promise"),D0=N.set,L0=N.getterFor("AsyncFromSyncIterator");N0.prototype=C(I(_),{next:function(){var n=L0(this);return new P0(function(e,t){var r=k0(M0(n.next,n.iterator));O0(r,e,t)})},return:function(){var n=L0(this).iterator;return new P0(function(e,t){var r=U0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=k0(M0(r,n));O0(r,e,t)})}});var F0=t,j0=b=N0,V0=qo,H0=Ec,z0=Ho,B0=Ko("asyncIterator"),G0=Vo,K0=qo,J0=t,Y0=Fo,q0=Ho,$0=t,X0=Vo,W0=qo,Z0=Nh,Q0=Fo,$o={toArray:S0(0),forEach:S0(1),every:S0(2),some:S0(3),find:S0(4)},eE=vc,tE=Bo,rE=x,nE=Ec,iE=gc,oE=Ho,td=Dg,sE=Fo,aE=b,uE=$o.toArray,cE=Ko("asyncIterator"),lE=td("Array").values,pE=(O({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(sE("Promise"))(function(e){var t=tE(o),r=(void 0!==a&&(a=eE(a,u)),oE(t,cE)),n=r?void 0:iE(t)||lE,i=rE(s)?new s:[],r=r?function(e,t){t=arguments.length<2?z0(e,B0):t;return t?V0(F0(t,e)):new j0(H0(e))}(t,r):new aE(nE(t,n));e(uE(r,a,i))})}}),E.filterReject),Ja=Hl,fE=(O({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return pE(this,e,1<arguments.length?arguments[1]:void 0)}}),Ja("filterOut"),E.filterReject),Yl=Hl,ls=(O({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return fE(this,e,1<arguments.length?arguments[1]:void 0)}}),Yl("filterReject"),O),dE=M,hE=Object.isFrozen,yE=(ls({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!C0(e,!0))return!1;var t=e.raw;return t.length===e.length&&C0(t,!1)}}),vs.exports),vE=Ls,sc=Hl,mE=Bo,gE=A,qa=(So&&(x0(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=mE(this),t=gE(e);return 0==t?void 0:e[t-1]},set:function(e){var t=mE(this),r=gE(t);return t[0==r?0:r-1]=e}}),sc("lastItem")),Hl),EE=Bo,wE=A,k=(So&&(x0(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=EE(this),e=wE(e);return 0==e?0:e-1}}),qa("lastIndex")),e),bE=Vo,TE=A,_E=Bo,IE=Rh,AE=Fo("Map"),Rf=AE.prototype,OE=k(Rf.forEach),NE=k(Rf.has),RE=k(Rf.set),SE=k([].push),Ol=Hl;O({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=_E(this),i=TE(n),o=IE(n,0),s=new AE,a=null!=e?bE(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),NE(s,r)||RE(s,r,t);return OE(s,function(e){SE(o,e)}),o}}),Ol("uniqueBy"),$T.exposure=function(e,t,r,n){return new VE(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},$T.track=function(e,t,r,n){return new HE(n,r,e,t)},$T.remoteConfig=function(e,t,r,n){return new zE(n,e,t.parameter,t.valueId,t.reason,r)},$T.isExposureEvent=function(e){return void 0!==e.experiment},$T.isTrackEvent=function(e){return void 0!==e.eventType},$T.isRemoteConfigEvent=function(e){return void 0!==e.parameter},$T.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},$T.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},$T.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},$T.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[_t.ID],identifiers:this.user.identifiers,userProperties:Xe.sanitize(this.user.properties),hackleProperties:Xe.sanitize(this.user.hackleProperties)}};var CE,xE,ME,kE,UE,PE,DE,LE,FE,jE=$T,VE=(Ke(qT,FE=jE),qT.prototype.copyWithUser=function(e){return new qT(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},qT.prototype.toDto=function(){return c(c({},FE.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})},qT),HE=(Ke(YT,LE=jE),YT.prototype.copyWithUser=function(e){return new YT(this.timestamp,e,this.eventType,this.event,this.insertId)},YT.prototype.toDto=function(){return c(c({},LE.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Xe.sanitize(this.event.properties)})},YT),zE=(Ke(JT,DE=jE),JT.prototype.copyWithUser=function(e){return new JT(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},JT.prototype.toDto=function(){return c(c({},DE.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)})},JT),BE=(KT.isSessionEvent=function(e){return!!jE.isTrackEvent(e)&&(e.event.key===KT.SESSION_START_EVENT_NAME||e.event.key===KT.SESSION_END_EVENT_NAME)},KT.prototype.onSessionStarted=function(e,t,r){this.track(KT.SESSION_START_EVENT_NAME,e,t,r)},KT.prototype.onSessionEnded=function(e,t,r){this.track(KT.SESSION_END_EVENT_NAME,e,t,r)},KT.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)},KT.prototype.decorateSession=function(e,t){t=(new It).add(_t.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},KT.SESSION_START_EVENT_NAME="$session_start",KT.SESSION_END_EVENT_NAME="$session_end",KT),GE=(GT.prototype.process=function(e){var t;BE.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[_t.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[_t.SESSION]=t.sessionId,e))})),this.delegate.process(t))},GT.prototype.flush=function(e){this.delegate.flush(e)},GT.prototype.close=function(){this.delegate.close()},GT),KE=(BT.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!jE.isExposureEvent(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)},BT),JE=(zT.toEvent=function(e){var t;return{key:zT.EVENT_KEY,properties:{level:zT.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:zT._stacktrace(e)}}},zT._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,zT.STACK_TRACK_LIMIT).join("\n")},zT.EVENT_KEY="$trace",zT.LEVEL_ERROR="error",zT.STACK_TRACK_LIMIT=30,zT),r=(HT.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)}},HT),YE=(VT.prototype.with=function(e){return new VT(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},VT.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new VT(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},VT.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new VT(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},VT.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},VT),qE=(Ke(jT,PE=r),jT.prototype.supports=function(e){return void 0!==e.experiment},jT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},jT),$E=(FT.of=function(e,t,r,n,i,o){return o.returnValue=Xe.truncateStringValue(n),new FT(i,t.targetEvaluations,e.parameter,r,n,o)},FT.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},FT),XE=(Ke(LT,UE=r),LT.prototype.supports=function(e){return void 0!==e.parameter},LT.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 $E.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)},LT.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?$E.ofDefault(e,t,f.TYPE_MISMATCH,i):$E.of(e,t,r.id,r.rawValue,n,i)},LT),WE=(DT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},DT),ZE=(PT.create=function(){return new PT},Object.defineProperty(PT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(PT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),PT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},PT.prototype.addRequest=function(e){this._stack.push(e)},PT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},PT.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof YE&&e.experiment.id===t.id})},PT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},PT),QE=(UT.of=function(e,t,r,n){return new UT(e,t,r,n)},UT.by=function(e,t){return new UT(e.workspace,e.user,t,"A")},UT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},UT),ew=(kT.of=function(e,t,r,n,i){return new kT(e,t,r,n,i)},kT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},kT),tw=(MT.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},MT.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},MT.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},MT),rw=(xT.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}},xT),nw=(CT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},CT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return tw.asNumber(e)},CT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=tw.asNumber(t),e=tw.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},CT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},CT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},CT.prototype.clear=function(){this.listStorage.clear()},CT),iw=(ST.prototype.add=function(e){this.evaluators.push(e)},ST.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)},ST),ow=(RT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},RT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},RT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},RT),sw=(NT.prototype.decorate=function(e){return e},NT),aw=(OT.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e},OT),uw=(AT.prototype.matches=function(e,t,r){void 0===r&&(r=new sw);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},AT.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},AT.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},AT.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},AT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},AT),cw=(IT.tryParse=function(e){try{return new URL(e)}catch(e){return}},IT.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:IT.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},IT),h=(_T.prototype.booleanMatches=function(e,t){return e===t},_T.prototype.numberMatches=function(e,t){return e===t},_T.prototype.stringMatches=function(e,t){return e===t},_T.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},_T.prototype.urlMatches=function(e,t){return decodeURI(cw.removePathnameTrailingSlash(e))===decodeURI(cw.removePathnameTrailingSlash(t))},_T),Rs=(TT.prototype.booleanMatches=function(e,t){return!1},TT.prototype.numberMatches=function(e,t){return!1},TT.prototype.stringMatches=function(e,t){return e.includes(t)},TT.prototype.versionMatches=function(e,t){return!1},TT.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)},TT),Ta=(bT.prototype.booleanMatches=function(e,t){return!1},bT.prototype.numberMatches=function(e,t){return!1},bT.prototype.stringMatches=function(e,t){return e.startsWith(t)},bT.prototype.versionMatches=function(e,t){return!1},bT.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)},bT),R=(wT.prototype.booleanMatches=function(e,t){return!1},wT.prototype.numberMatches=function(e,t){return!1},wT.prototype.stringMatches=function(e,t){return e.endsWith(t)},wT.prototype.versionMatches=function(e,t){return!1},wT.prototype.urlMatches=function(e,t){return!1},wT),S=(ET.prototype.booleanMatches=function(e,t){return!1},ET.prototype.numberMatches=function(e,t){return t<e},ET.prototype.stringMatches=function(e,t){return t<e},ET.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},ET.prototype.urlMatches=function(e,t){return!1},ET),nd=(gT.prototype.booleanMatches=function(e,t){return!1},gT.prototype.numberMatches=function(e,t){return t<=e},gT.prototype.stringMatches=function(e,t){return t<=e},gT.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},gT.prototype.urlMatches=function(e,t){return!1},gT),js=(mT.prototype.booleanMatches=function(e,t){return!1},mT.prototype.numberMatches=function(e,t){return e<t},mT.prototype.stringMatches=function(e,t){return e<t},mT.prototype.versionMatches=function(e,t){return e.isLessThan(t)},mT.prototype.urlMatches=function(e,t){return!1},mT),g=(vT.prototype.booleanMatches=function(e,t){return!1},vT.prototype.numberMatches=function(e,t){return e<=t},vT.prototype.stringMatches=function(e,t){return e<=t},vT.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},vT.prototype.urlMatches=function(e,t){return!1},vT),lw=(yT.prototype.getMatcher=function(e){switch(e){case"IN":return yT.IN_MATCHER;case"CONTAINS":return yT.CONTAINS_MATCHER;case"STARTS_WITH":return yT.STARTS_WITH_MATCHER;case"ENDS_WITH":return yT.ENDS_WITH_MATCHER;case"GT":return yT.GT_MATCHER;case"GTE":return yT.GTE_MATCHER;case"LT":return yT.LT_MATCHER;case"LTE":return yT.LTE_MATCHER}},yT.IN_MATCHER=new h,yT.CONTAINS_MATCHER=new Rs,yT.STARTS_WITH_MATCHER=new Ta,yT.ENDS_WITH_MATCHER=new R,yT.GT_MATCHER=new S,yT.GTE_MATCHER=new nd,yT.LT_MATCHER=new js,yT.LTE_MATCHER=new g,yT),pw=(hT.prototype.matches=function(e,t,r){t=tw.asString(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},hT),Cl=(dT.prototype.matches=function(e,t,r){t=tw.asNumber(t),r=tw.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},dT),Va=(fT.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},fT),y=(pT.prototype.matches=function(e,t,r){t=ur.tryParse(t),r=ur.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},pT),ac=(lT.prototype.matches=function(e,t,r){t=cw.tryParse(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)},lT),cs=(cT.prototype.matches=function(e,t,r){return!1},cT),fw=(uT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return uT.STRING_MATCHER;case"NUMBER":return uT.NUMBER_MATCHER;case"BOOLEAN":return uT.BOOLEAN_MATCHER;case"VERSION":return uT.VERSION_MATCHER;case"URL":return uT.URL_MATCHER;case"NULL":case"UNKNOWN":return uT.NULL_MATCHER}},uT.STRING_MATCHER=new pw,uT.NUMBER_MATCHER=new Cl,uT.BOOLEAN_MATCHER=new Va,uT.VERSION_MATCHER=new y,uT.URL_MATCHER=new ac,uT.NULL_MATCHER=new cs,uT),dw=(aT.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},aT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?aw:sw)},aT),hw=(sT.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,"]"))}},sT),yw=(oT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},oT.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,"]"))},oT),vw=(iT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},iT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},iT),mw=(nT.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,"]"))}},nT),gw=(rT.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(tw.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 i=null!=(i=t.get(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},rT.prototype.evaluate=function(e,t,r){r=QE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},rT),Ew=(Ke(tT,kE=gw),tT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},tT.prototype.resolve=function(e,t){return e instanceof QE&&t.reason===f.TRAFFIC_ALLOCATED?t.with(f.TRAFFIC_ALLOCATED_BY_TARGETING):t},tT.prototype.evaluationMatches=function(e,t){return!!tT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},tT.AB_TEST_MATCHED_REASONS=[f.OVERRIDDEN,f.TRAFFIC_ALLOCATED,f.EXPERIMENT_COMPLETED,f.TRAFFIC_ALLOCATED_BY_TARGETING],tT),ww=(Ke(eT,ME=gw),eT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},eT.prototype.resolve=function(e,t){return t},eT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},eT),bw=(Qb.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)},Qb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},Qb),Tw=(Zb.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,"]"))}},Zb.prototype.properties=function(e){return jE.isTrackEvent(e)?e.event.properties:jE.isExposureEvent(e)||jE.isRemoteConfigEvent(e)?e.properties:void 0},Zb),_w=(Wb.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)})},Wb),Iw=(Xb.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}},Xb),Aw=($b.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},$b.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},$b.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)}},$b),Ow={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s=5*((524287&(s^=i=this.mul32(i,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s^=i=this.mul32(i,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}},Nw=(qb.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},qb.prototype.calculateSlotNumber=function(e,t,r){r=Ow.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},qb),Rw=(Yb.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},Yb.end=function(){return new Yb(void 0,void 0)},Yb.decision=function(e,t){return new Yb(e,t)},Yb.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r},Yb),Sw=(Jb.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 YE.of(e,t,n,f.OVERRIDDEN);case"FEATURE_FLAG":return YE.of(e,t,n,f.INDIVIDUAL_TARGET_MATCH)}},Jb),Cw=(Kb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?YE.ofDefault(e,t,f.EXPERIMENT_DRAFT):r.evaluate(e,t)},Kb),xw=(Gb.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return YE.ofDefault(e,t,f.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return YE.ofDefault(e,t,f.FEATURE_FLAG_INACTIVE)}},Gb),Mw=(Bb.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return YE.of(e,t,r,f.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},Bb),kw=(zb.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):YE.ofDefault(e,t,f.NOT_IN_EXPERIMENT_TARGET)},zb),Uw=(Hb.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?YE.ofDefault(e,t,f.VARIATION_DROPPED):YE.of(e,t,n,f.TRAFFIC_ALLOCATED):YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},Hb),Pw=(Vb.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 YE.of(e,t,r,f.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},Vb),Dw=(jb.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 YE.ofDefault(e,t,f.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return YE.of(e,t,n,f.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},jb),Lw=(Fb.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):YE.ofDefault(e,t,f.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},Fb),Fw=(Lb.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):YE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND)},Lb),jw=(Db.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)})},Db),Vw=(Pb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},Pb),Hw=(Ub.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},Ub.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},Ub.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)}},Ub.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)},Ub),zw=(kb.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)},kb),Bw=(Mb.of=function(e,t,r,n){return new Mb(r,t.targetEvaluations,e.inAppMessage,n)},Mb),Gw=(xb.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):Bw.of(e,t,f.UNSUPPORTED_PLATFORM)},xb),Kw=(Cb.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.OVERRIDDEN,n)):r.evaluate(e,t)},Cb),Jw=(Sb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},Sb),Yw=(Rb.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},Rb),qw=(Nb.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_PERIOD)},Nb),$w=(Ob.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?Bw.of(e,t,f.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},Ob),Xw=(Ab.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.IN_APP_MESSAGE_TARGET,n)):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},Ab),Ww=(Ib.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},Ib),Zw=(_b.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},_b.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},_b),Qw=(Tb.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)})},Tb),eb=(bb.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},bb),tb=(wb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},wb.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))},wb),rb=(Eb.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Eb.getOrNull=function(e){return Eb.instances.get(e)},Eb.register=function(e,t){return Eb.instances.set(e,t),t},Eb.instances=new Map,Eb),nb=(gb.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},gb.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},gb),ib=(mb.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[mb.ROOT_TYPE]=r.key.type,t[mb.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);o.push(e)}),o},mb.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof YE)return n[mb.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[mb.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[mb.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,jE.exposure(e.user,t,n,r);if(t instanceof $E)return jE.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},mb.ROOT_TYPE="$targetingRootType",mb.ROOT_ID="$targetingRootId",mb.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",mb.EXPERIMENT_VERSION_KEY="$experiment_version",mb.EXECUTION_VERSION_KEY="$execution_version",mb),ob=(Ke(vb,xE=r),vb.prototype.supports=function(e){return void 0!==e.inAppMessage},vb.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},vb),sb=(yb.of=function(e,t,r,n){return new yb(e,t,r,n)},yb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},yb),ab=i.log,ub=(hb.create=function(e,t,r,n){var i=new iw,r=new rw(r),r=new nb(i,r,n),n=new qE(r),o=new XE(r.remoteConfigParameterTargetRuleDeterminer),r=new ob(r);return i.add(n),i.add(o),new hb(n,o,r,e,new ib(Qe.instance),t,new cb,Qe.instance)},hb.prototype.experiment=function(e,t,r){var n=this;if(!e)return ab.error("experimentKey must not be empty"),ht.of(r,f.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return ab.warn("SDK not ready."),ht.of(r,f.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return ab.warn("Experiment does not exist."),ht.of(r,f.EXPERIMENT_NOT_FOUND);i=QE.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},hb.prototype.experiments=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,ht.of(e.variationKey,e.reason,t)]},hb.prototype.featureFlag=function(e,t){var r=this;if(!e)return ab.error("featureKey must not be empty"),yt.off(f.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return ab.warn("SDK not ready."),yt.off(f.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return ab.warn("FeatureFlag does not exist."),yt.off(f.FEATURE_FLAG_NOT_FOUND);n=QE.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},hb.prototype.featureFlags=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,"A"===e.variationKey?yt.off(e.reason,t):yt.on(e.reason,t)]},hb.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return ab.warn("SDK not ready."),dt.of(f.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return ab.warn("In app message does not exist."),dt.of(f.IN_APP_MESSAGE_NOT_FOUND);r=sb.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,ZE.create());return dt.of(t.reason,t.inAppMessage,t.message)},hb.prototype.tryInAppMessage=function(e,t){var r,n=gn.start();try{r=this.inAppMessage(e,t)}catch(t){ab.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=dt.of(f.EXCEPTION)}return si.inAppMessage(n,e,r),r},hb.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 Tt(0,e.key),this.eventProcessor.process(jE.track(n,e,t,r))):ab.warn("Event key must be not null. or event key must be string type."):ab.warn("Event must be event type."):ab.warn("event must not be null.")},hb.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=JE.toEvent(e),this.flush(),this.track(e,t),this.flush())},hb.prototype.flush=function(){this.eventProcessor.flush(!1)},hb.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return ab.warn("SDK not ready."),ft.of(n,f.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return ab.warn("Remote config parameter does not exist."),ft.of(n,f.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=ew.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,ZE.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),ft.of(t.value,t.reason)},hb.prototype.close=function(){this.eventProcessor.close()},hb),cb=(db.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},db.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},db),lb=(fb.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},fb.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},fb),pb=null;function fb(){this._installed=[],this._installations={onerror:XT,onunhandledrejection:WT}}function db(){}function hb(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}function yb(e,t,r,n){this.key=new WE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function vb(e){var t=xE.call(this)||this;return t.evaluationFlowFactory=e,t}function mb(e){this.clock=e}function gb(e,t,r){var n=new Nw,e=rb.register("targetMatcher",new ow(new Iw(e))),i=new Aw(n),t=new Hw(t,e,i),o=new zw(n),o=(this.abTestFlow=Rw.of(new Sw(t),new Fw,new Lw(o),new kw(new jw(e)),new Cw,new xw,new Mw,new Uw(i)),this.featureFlagFlow=Rw.of(new Cw,new xw,new Mw,new Sw(t),new Fw,new Pw(new Vw(e),i),new Dw(i)),new Ww);this.inAppMessageFlow=Rw.of(new Gw,new Kw(new Zw,o),new Jw,new Yw,new qw,new $w(new eb(r)),new Xw(new Qw(e),o)),this.remoteConfigParameterTargetRuleDeterminer=new tb(e,n)}function Eb(){}function wb(e,t){this.targetMatcher=e,this.bucketer=t}function bb(e){this.storage=e}function Tb(e){this.targetMatcher=e}function _b(){}function Ib(){}function Ab(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function Ob(e){this.hiddenMatcher=e}function Nb(){}function Rb(){}function Sb(){}function Cb(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function xb(){}function Mb(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function kb(e){this.bucketer=e}function Ub(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function Pb(e){this.targetMatcher=e}function Db(e){this.targetMatcher=e}function Lb(){}function Fb(e){this.containerResolver=e}function jb(e){this.actionResolver=e}function Vb(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function Hb(e){this.actionResolver=e}function zb(e){this.experimentTargetDeterminer=e}function Bb(){}function Gb(){}function Kb(){}function Jb(e){this.overrideResolver=e}function Yb(e,t){this.flowEvaluator=e,this.nextFlow=t}function qb(){}function $b(e){this.bucketer=e}function Xb(e){var t=new uw(new fw,new lw);this.userConditionMatcher=new dw(new hw,t),this.eventConditionMatcher=new bw(new Tw,t),this.segmentConditionMatcher=new yw(new vw(this.userConditionMatcher)),this.experimentConditionMatcher=new mw(new Ew(e,t),new ww(e,t)),this.cohortConditionMatcher=new _w(t)}function Wb(e){this.valueOperatorMatcher=e}function Zb(){}function Qb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function eT(e,t){return ME.call(this,e,t)||this}function tT(e,t){return kE.call(this,e,t)||this}function rT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function nT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function iT(e){this.userConditionMatcher=e}function oT(e){this.segmentMatcher=e}function sT(){}function aT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}function uT(){}function cT(){}function lT(){}function pT(){}function fT(){}function dT(){}function hT(){}function yT(){}function vT(){}function mT(){}function gT(){}function ET(){}function wT(){}function bT(){}function TT(){}function _T(){}function IT(){}function AT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function OT(){}function NT(){}function RT(e){this.conditionMatcherFactory=e}function ST(){this.evaluators=new Array}function CT(e){this.listStorage=e}function xT(e){this.storages=e}function MT(){}function kT(e,t,r,n,i){this.key=new WE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}function UT(e,t,r,n){this.key=new WE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function PT(){this._stack=[],this._targetEvaluations=[]}function DT(e,t){this.type=e,this.id=t}function LT(e){var t=UE.call(this)||this;return t.targetRuleDeterminer=e,t}function FT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}function jT(e){var t=PE.call(this)||this;return t.evaluationFlowFactory=e,t}function VT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}function HT(){}function zT(){}function BT(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function GT(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}function KT(e,t){this.userManager=e,this.core=t}function JT(e,t,r,n,i,o,s){e=DE.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}function YT(e,t,r,n,i){e=LE.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}function qT(e,t,r,n,i,o,s,a){e=FE.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}function $T(e,t,r){void 0===r&&(r=De.v4()),this.timestamp=e,this.user=t,this.insertId=r}function XT(o,s){pb=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),pb&&pb.apply(this,arguments)}}function WT(r,n){CE=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()),CE&&CE.apply(this,arguments)}}function ZT(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function QT(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function e_(t,r){return Object.keys(Q_).every(function(e){return t[e]===r[e]})}HI.prototype.read=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},HI.prototype.save=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},HI.prototype.add=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},HI.prototype.delete=function(n){return o(this,void 0,void 0,function(){var t,r=this;return s(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},HI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},HI.prototype.clear=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var t_=HI,r_=(VI.builder=function(){return new n_},VI.empty=function(){return VI.builder().build()},VI.from=function(e){return new VI(e)},VI.fromDto=function(e){for(var t=VI.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new ar(e)})})}return t.build()},Object.defineProperty(VI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),VI.prototype.get=function(e){return this.cohorts.get(e)},VI.prototype.filterBy=function(e){var r=lt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return VI.from(e)},VI.prototype.asArray=function(){return this.cohorts.values()},VI.prototype.asComparable=function(){return this.cohorts},VI.prototype.toBuilder=function(){return new n_(this)},VI),n_=(jI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},jI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},jI.prototype.build=function(){return new r_(this.cohorts)},jI),N="model",C="name",I="type",_="vendor",t="version",x="mobile",b="tablet",i_=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.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,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[C,t],[/(opios)[\/\s]+([\w\.]+)/i],[[C,"Opera Mini"],t],[/\s(opr)\/([\w\.]+)/i],[[C,"Opera"],t],[/(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],[C,t],[/(konqueror)\/([\w\.]+)/i],[[C,"Konqueror"],t],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[C,"IE"],t],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[C,"Edge"],t],[/(yabrowser)\/([\w\.]+)/i],[[C,"Yandex"],t],[/(Avast)\/([\w\.]+)/i],[[C,"Avast Secure Browser"],t],[/(AVG)\/([\w\.]+)/i],[[C,"AVG Secure Browser"],t],[/(puffin)\/([\w\.]+)/i],[[C,"Puffin"],t],[/(focus)\/([\w\.]+)/i],[[C,"Firefox Focus"],t],[/(opt)\/([\w\.]+)/i],[[C,"Opera Touch"],t],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[C,"UCBrowser"],t],[/(comodo_dragon)\/([\w\.]+)/i],[[C,/_/g," "],t],[/(windowswechat qbcore)\/([\w\.]+)/i],[[C,"WeChat(Win) Desktop"],t],[/(micromessenger)\/([\w\.]+)/i],[[C,"WeChat"],t],[/(brave)\/([\w\.]+)/i],[[C,"Brave"],t],[/(whale)\/([\w\.]+)/i],[[C,"Whale"],t],[/(qqbrowserlite)\/([\w\.]+)/i],[C,t],[/(QQ)\/([\d\.]+)/i],[C,t],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[C,t],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[C,t],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[C,t],[/(MetaSr)[\/\s]?([\w\.]+)/i],[C],[/(LBBROWSER)/i],[C],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[t,[C,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[t,[C,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[C,t],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[t,[C,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[C,/(.+)/,"$1 WebView"],t],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[C,/(.+(?:g|us))(.+)/,"$1 $2"],t],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[C,"Chrome Mobile"],t],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[t,[C,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[C,"Sailfish Browser"],t],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[C,t],[/(dolfin)\/([\w\.]+)/i],[[C,"Dolphin"],t],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[C,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[C,"Opera Coast"],t],[/fxios\/([\w\.-]+)/i],[t,[C,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[t,[C,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[t,C],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[C,"GSA"],t],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[C,[t,(U.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=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(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.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],[C,t],[/(navigator|netscape)\/([\w\.-]+)/i],[[C,"Netscape"],t],[/(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],[C,t]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",U.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",U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[N,_,[I,b]],[/applecoremedia\/[\w\.]+ \((ipad)/],[N,[_,"Apple"],[I,b]],[/(apple\s{0,1}tv)/i],[[N,"Apple TV"],[_,"Apple"],[I,"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],[_,N,[I,b]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[N,[_,"Amazon"],[I,b]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[N,U.mapper.str,U.maps.device.amazon.model],[_,"Amazon"],[I,x]],[/android.+aft([bms])\sbuild/i],[N,[_,"Amazon"],[I,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[N,_,[I,x]],[/\((ip[honed|\s\w*]+);/i],[N,[_,"Apple"],[I,x]],[/(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],[_,N,[I,x]],[/\(bb10;\s(\w+)/i],[N,[_,"BlackBerry"],[I,x]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[N,[_,"Asus"],[I,b]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[_,"Sony"],[N,"Xperia Tablet"],[I,b]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[N,[_,"Sony"],[I,x]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[_,N,[I,"console"]],[/android.+;\s(shield)\sbuild/i],[N,[_,"Nvidia"],[I,"console"]],[/(playstation\s[34portablevi]+)/i],[N,[_,"Sony"],[I,"console"]],[/(sprint\s(\w+))/i],[[_,U.mapper.str,U.maps.device.sprint.vendor],[N,U.mapper.str,U.maps.device.sprint.model],[I,x]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[_,[N,/_/g," "],[I,x]],[/(nexus\s9)/i],[N,[_,"HTC"],[I,b]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[N,[_,"Huawei"],[I,x]],[/android.+(bah2?-a?[lw]\d{2})/i],[N,[_,"Huawei"],[I,b]],[/(microsoft);\s(lumia[\s\w]+)/i],[_,N,[I,x]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[N,[_,"Microsoft"],[I,"console"]],[/(kin\.[onetw]{3})/i],[[N,/\./g," "],[_,"Microsoft"],[I,x]],[/\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],[N,[_,"Motorola"],[I,x]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[N,[_,"Motorola"],[I,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[_,U.util.trim],[N,U.util.trim],[I,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[N,/^/,"SmartTV"],[_,"Samsung"],[I,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[N,[_,"Sharp"],[I,"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],[[_,"Samsung"],N,[I,b]],[/smart-tv.+(samsung)/i],[_,[I,"smarttv"],N],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[_,"Samsung"],N,[I,x]],[/sie-(\w*)/i],[N,[_,"Siemens"],[I,x]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[_,"Nokia"],N,[I,x]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[N,[_,"Acer"],[I,b]],[/android.+([vl]k\-?\d{3})\s+build/i],[N,[_,"LG"],[I,b]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[_,"LG"],N,[I,b]],[/(lg) netcast\.tv/i],[_,N,[I,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[N,[_,"LG"],[I,x]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[_,N,[I,b]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[N,[_,"Lenovo"],[I,b]],[/(lenovo)[_\s-]?([\w-]+)/i],[_,N,[I,x]],[/linux;.+((jolla));/i],[_,N,[I,x]],[/((pebble))app\/[\d\.]+\s/i],[_,N,[I,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[_,N,[I,x]],[/crkey/i],[[N,"Chromecast"],[_,"Google"],[I,"smarttv"]],[/android.+;\s(glass)\s\d/i],[N,[_,"Google"],[I,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[N,[_,"Google"],[I,b]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[N,[_,"Google"],[I,x]],[/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],[[N,/_/g," "],[_,"Xiaomi"],[I,x]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[N,/_/g," "],[_,"Xiaomi"],[I,b]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[N,[_,"Meizu"],[I,x]],[/(mz)-([\w-]{2,})/i],[[_,"Meizu"],N,[I,x]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[N,[_,"OnePlus"],[I,x]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[N,[_,"RCA"],[I,b]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[N,[_,"Dell"],[I,b]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[N,[_,"Verizon"],[I,b]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[_,"Barnes & Noble"],N,[I,b]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[N,[_,"NuVision"],[I,b]],[/android.+;\s(k88)\sbuild/i],[N,[_,"ZTE"],[I,b]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[N,[_,"Swiss"],[I,x]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[N,[_,"Swiss"],[I,b]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[N,[_,"Zeki"],[I,b]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[_,"Dragon Touch"],N,[I,b]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[N,[_,"Insignia"],[I,b]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[N,[_,"NextBook"],[I,b]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[_,"Voice"],N,[I,x]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[_,"LvTel"],N,[I,x]],[/android.+;\s(PH-1)\s/i],[N,[_,"Essential"],[I,x]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[N,[_,"Envizen"],[I,b]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[N,[_,"MachSpeed"],[I,b]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[N,[_,"Rotor"],[I,b]],[/android.+(KS(.+))\s+build/i],[N,[_,"Amazon"],[I,b]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[_,N,[I,b]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[I,U.util.lowerize],_,N],[/[\s\/\(](smart-?tv)[;\)]/i],[[I,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[N,[_,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[t,[C,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[C,"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],[C,t],[/rv\:([\w\.]{1,9}).+(gecko)/i],[t,C]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[C,t],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[C,U.mapper.str,U.maps.os.windows],[t,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[C,"Windows"],[t,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[C,"BlackBerry"],t],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[C,t],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[C,"Symbian"],t],[/\((series40);/i],[C],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[C,"Firefox OS"],t],[/(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],[[C,"Linux"],t],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[C,"Chromium OS"],t],[/(sunos)\s?([\w\.\d]*)/i],[[C,"Solaris"],t],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[C,"Linux"],t],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPhone"],[t,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPad"],[t,/_/g,"."]],[/(haiku)\s(\w+)/i],[C,t],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[t,/_/g,"."],[C,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[C,"Mac"],[t,/_/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],[C,t]]},U),o_=(FI.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,s=i_.parse(o.navigator.userAgent),a=s.browser,u=s.os,s=s.device,c=(o.location.protocol||"").replace(":",""),l=o.screen,p=(null==(p=o.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!=(i=null==(n=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",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:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:c,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:l.width||"",screenHeight:l.height||"",timeZone:v}},FI),s_=(LI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return u_.of(c_(e,this.hackleDeviceId),r_.empty())},LI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(LI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),LI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},LI.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},LI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},LI.prototype.hackleUser=function(e){var t=(new It).addIdentifiers(e.user.identifiers||{}).add(_t.ID,e.user.id||this.hackleDeviceId).add(_t.DEVICE,e.user.deviceId||this.hackleDeviceId).add(_t.HACKLE_DEVICE,this.hackleDeviceId);return a.isNotNullOrUndefined(e.user.userId)&&t.add(_t.USER,e.user.userId),{identifiers:t.build(),properties:e.user.properties||{},hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},LI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?o_.generate(window):e)||{}},LI.prototype.setUser=function(e){return this.updateUser(e).user},LI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},LI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},LI.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},LI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},LI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},LI.prototype.saveUser=function(e){this.storage.saveUser(e)},LI.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,ZT(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},LI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=c_(r,n.hackleDeviceId),ZT(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},LI.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)})})},LI.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},LI.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},LI),a_=(DI.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},DI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(DI.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(DI.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),DI.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},DI.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},DI.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},DI),u_=(PI.of=function(e,t){return new PI(e,t.filterBy(e))},PI.prototype.with=function(e){return PI.of(e,this.cohorts.filterBy(e))},PI.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return PI.of(this.user,e)},PI),c_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},l_=(Object.defineProperty(UI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:UI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),UI.prototype.addListener=function(e){this.sessionListeners.push(e)},UI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},UI.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)},UI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},UI.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)})},UI.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},UI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},UI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},UI.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},UI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},UI.EMPTY_SESSION_ID="0.ffffffff",UI),p_=(kI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},kI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},kI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},kI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},kI),f_=(MI.postfix=function(e,t){return new MI(e,function(e){return"".concat(e).concat(t)})},MI.prefix=function(e,t){return new MI(e,function(e){return"".concat(t).concat(e)})},MI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},MI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},MI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},MI),d_=(xI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},xI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},xI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},xI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},xI.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[]}},xI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},xI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},xI.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]},xI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(t){}},xI.prototype.clear=function(){this.delegate.removeItem(this.listKey)},xI),h_=(CI.prototype.currentUser=function(){return this.userManager.resolve()},CI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},CI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},CI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},CI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},CI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},CI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},CI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},CI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},CI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},CI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},CI.prototype.increment=function(e,t){Zn.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},CI),y_=(SI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},SI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},SI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},SI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},SI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},SI.monitoring=function(e){return"".concat(e,"/metrics")},SI),v_=(RI.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)},RI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},RI.prototype.key=function(e){return"".concat(e.key)},RI),m_=(NI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},NI),g_=(OI.prototype.handle=function(e,t){e.close()},OI.prototype.supports=function(e){return"CLOSE"===e.type},OI),E_=(AI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},AI.prototype.supports=function(e){return"WEB_LINK"===e.type},AI),w_=(II.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},II),b_=(_I.prototype.handle=function(e,t){var r=this.clock.currentMillis()+_I.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},_I.prototype.supports=function(e){return"HIDDEN"===e.type},_I.HIDE_EXPIRATION=864e5,_I),T_=(TI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},TI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},TI),__=(bI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},bI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},bI),I_=(wI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},wI),A_=(EI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},EI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},EI),O_=(gI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},gI.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}}}},gI),N_=(mI.prototype.present=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},mI),R_=(vI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},vI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},vI),S_=(yI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},yI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new QT(e.inAppMessage,e.message,t.user,Xe.sanitize({decision_reason:e.reason}))},yI),C_=(hI.prototype.open=function(){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(hI.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(hI.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(hI.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]}})})},hI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(hI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},hI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(hI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},hI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},hI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},hI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},hI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",hI.CONTAINER_CLASS_NAME="hackle-iam",hI),x_=(dI.prototype.create=function(e,t){return new C_(this.scriptLoader,e,t)},dI),M_=(fI.prototype.load=function(){return o(this,void 0,void 0,function(){var t;return s(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()]}})})},fI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},fI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})},fI),k_=(pI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},pI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=U_.of(e,t,r);return this.targetMatcher.anyMatches(e,ZE.create(),n.targets)},pI),U_=(lI.of=function(e,t,r){return new lI(new WE("IN_APP_MESSAGE",r.key),e,t.user,t)},lI),P_=(cI.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 i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},cI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new D_(new L_(i)))}return e.durationCap&&t.push(new D_(new F_(e.durationCap))),t},cI),D_=(uI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},uI),L_=(Object.defineProperty(aI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),aI.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},aI),F_=(Object.defineProperty(sI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),sI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},sI),j_=(oI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},oI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},oI),V_=(iI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},iI),H_=(nI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},nI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>nI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-nI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},nI.prototype.supports=function(e){return"IMPRESSION"===e.type},nI.IMPRESSION_MAX_SIZE=100,nI),z_=(rI.prototype.process=function(e,t,r){},rI.prototype.supports=function(e){return"CLOSE"===e.type},rI),B_=(tI.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},tI.prototype.supports=function(e){return"ACTION"===e.type},tI),G_=(eI.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)},eI),K_=(Q1.prototype.matches=function(e,t,r){return!!jE.isTrackEvent(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},Q1),J_=(Z1.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},Z1),Y_=(W1.prototype.handle=function(e,t){e.close()},W1.prototype.supports=function(e){return"CLOSE"===e.type},W1),q_=(X1.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))},X1.prototype.supports=function(e){return"ACTION"===e.type},X1),$_=($1.prototype.open=function(e){window.location.href=e.href},$1),X_=(q1.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},q1),W_=(Y1.prototype.open=function(e){window.open(e.href)},Y1),Z_=(J1.prototype.open=function(e){window.location.replace(e)},J1),Q_={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},e1={current:void 0,referrer:void 0},t1=(K1.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},Q_),t),n=new Gi,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],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)},K1.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),i=this.parser.parse(),o=this.parser.parseDomain();r=i,o=o,null!==(n=n)&&(e_(r,Q_)&&o.current===o.referrer||e_(n,r))||(this.storage.set(i),this.startNewCampaign(e,i,t))},K1.prototype.onSessionEnded=function(e,t,r){},K1.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},K1),r1=(G1.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},G1.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},G1),n1=(B1.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},B1.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(t[o]=decodeURIComponent(i))}return t},B1.getQueryParams=function(){return"undefined"==typeof window?{}:new B1(window.location.search).getQueryParams()},B1),i1=(z1.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},z1.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z1.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,z1),o1=(H1.prototype.parse=function(){var e=n1.getQueryParams();return{utm_campaign:e[s1],utm_content:e[a1],utm_id:e[u1],utm_medium:e[c1],utm_source:e[l1],utm_term:e[p1],gclid:e[f1],fbclid:e[d1]}},H1.prototype.parseDomain=function(){return"undefined"==typeof window?e1:{current:i1.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,i1.extractDomain(e)}()}},H1),s1="utm_campaign",a1="utm_content",u1="utm_id",c1="utm_medium",l1="utm_source",p1="utm_term",f1="gclid",d1="fbclid",h1=(V1.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},V1.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){i.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},V1),y1=(j1.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!(t&&t.getAttributes().integration_ga_experiment&&jE.isExposureEvent(e))||"RUNNING"!==e.experiment.status||e.decisionReason!==f.TRAFFIC_ALLOCATED?null:e},j1),v1={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.25.2",IAM_RENDERER_VERSION_HEADER:"0.0.3"},m1=(F1.config=function(e){return c(c({},v1),e)},F1.logging=function(e){i.initCounter(function(e){return Zn.counter("log",{level:e})}),i.setLogLevel(Fe.INFO),e.log_disabled?i.setLogLevel(Fe.DISABLE):e.debug&&i.setLogLevel(Fe.DEBUG)},F1.sdk=function(e,t){return i.log.debug("SDK key: ".concat(e)),e||i.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}},F1.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&i.log.debug("support sendBeacon API"),e},F1.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},F1.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(i.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},F1),g1=(L1.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},L1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t=this;return s(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]}})})},L1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},L1.prototype.close=function(){return o(this,void 0,void 0,function(){var t=this;return s(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]}})})},L1.prototype.safe=function(r){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},L1),E1=(D1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.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()}))},D1.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},D1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},D1),w1=(P1.prototype.schedule=function(e,t){e=new b1(e,t);return e.start(),e},P1.prototype.schedulePeriodically=function(e,t,r){e=new T1(e,t,r);return e.start(),e},P1),b1=(U1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},U1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},U1),T1=(k1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},k1.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},k1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},k1),_1=(M1.prototype.getExperiments=function(){return Array.from(this.experiments.values())},M1.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},M1.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},M1.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},M1.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},M1.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},M1.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},M1.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},M1.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},M1.prototype.getContainerOrNull=function(e){return this.containers.get(e)},M1.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},M1.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},M1.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},M1.prototype.getAttributes=function(){return this.attributes},M1.from=function(e){return new M1(p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return gt.fromJson("FEATURE_FLAG",e)}),e.buckets.map(wt.fromJson),e.events.map(Tt.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(Mt.fromJson),e.parameterConfigurations.map(mt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ut.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,Or.fromJson),e.workspace.attributes)},M1),I1=(x1.prototype.fetchIfModified=function(){return o(this,void 0,void 0,function(){var t;return s(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)]}})})},x1.prototype.createRequest=function(){var e=ei.builder().url(this.url).method("GET");return null!==this.lastModified&&e.addHeader(ni.IF_MODIFIED_SINCE,this.lastModified),e.build()},x1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.workspace",t,null),r;case 4:return[2]}})})},x1.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(ni.LAST_MODIFIED);e=JSON.parse(e.body);return _1.from(e)},x1),A1=(C1.prototype.fetch=function(r){return o(this,void 0,void 0,function(){var t;return s(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)]}})})},C1.prototype.createRequest=function(e){e={identifiers:lt(e)},e=Le.Base64.encodeURL(JSON.stringify(e));return ei.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},C1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.cohorts",t,null),r;case 4:return[2]}})})},C1.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 r_.fromDto(e)},C1),O1=(S1.prototype.get=function(){return this.workspace},S1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to fetch workspace: ".concat(t)),[3,3];case 3:return[2]}})})},S1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},S1),N1=(R1.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},R1.prototype.shutdownDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},R1.prototype.normalDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},R1);function R1(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}function S1(e){this.httpWorkspaceFetcher=e,this.workspace=null}function C1(e,t){this.url=e,this.transport=t}function x1(e,t){this.url=e,this.transport=t,this.lastModified=null}function M1(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}function k1(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}function U1(e,t){this.delayMillis=e,this.task=t,this.timeout=null}function P1(){}function D1(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}function L1(){this.synchronizations=[]}function F1(){}function j1(e){this.workspaceFetcher=e}function V1(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 H1(){}function z1(){}function B1(e){this.search=e}function G1(e){this.storage=e}function K1(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}function J1(){}function Y1(){}function q1(){}function $1(){}function X1(e){this.eventHandler=e}function W1(){}function Z1(e){this.handlers=e}function Q1(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function eI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function tI(e){this.actionHandlerFactory=e}function rI(){}function nI(e){this.impressionStorage=e}function iI(e){this.processors=e}function oI(e){this.storage=e}function sI(e){this.durationCap=e}function aI(e){this.identifierCap=e}function uI(e){this.matchCount=0,this.predicate=e}function cI(e){this.storage=e}function lI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function pI(e){this.targetMatcher=e}function fI(e){this.scriptUrl=e}function dI(e){this.scriptLoader=e}function hI(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===hI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function yI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function vI(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 mI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function gI(e){this.core=e}function EI(e){this.urlHandler=e}function wI(e){this.urlHandler=e}function bI(e){this.urlHandler=e}function TI(e){this.urlHandler=e}function _I(e,t){this.storage=e,this.clock=t}function II(e){this.urlHandler=e}function AI(e){this.urlHandler=e}function OI(){}function NI(e){this.handlers=e}function RI(e){this.storage=e}function SI(){}function CI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}function xI(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 MI(e,t){this.delegate=e,this.transform=t}function kI(){this.storage=window.localStorage}function UI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function PI(e,t){this.user=e,this.cohorts=t}function DI(e){this.storage=e}function LI(e,t,r,n,i,o){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(i,o),this.storage.saveUser(this.context.user)}function FI(){}function U(){}function jI(e){this.cohorts=new xn(qe.isEqual),e&&this.putAll(e)}function VI(e){this.cohorts=e}function HI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}nA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},nA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof jE?jE.isExposureEvent(e)?t.push(e.toDto()):jE.isTrackEvent(e)?r.push(e.toDto()):jE.isRemoteConfigEvent(e)&&n.push(e.toDto()):jE.isExposureEventDto(e)?t.push(e):jE.isTrackEventDto(e)?r.push(e):jE.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return ei.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},nA.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),ai.record("post.events",t,null),r;case 4:return[2]}})})};var zI,BI,GI=nA,KI=(rA.prototype.add=function(e){return this.repository.add(e)},rA.prototype.delete=function(e){return this.repository.delete(e)},rA.prototype.flush=function(){return o(this,void 0,void 0,function(){var t,r;return s(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]}})})},rA),JI=(tA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},tA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},tA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},Ke(eA,BI=tA),Ke(QI,zI=eA),QI.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},QI.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},QI.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},QI.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 i.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},QI.prototype.close=function(){this.flush(!0)},QI),YI=(ZI.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)},ZI),qI=(WI.intercept=function(e,t){return t instanceof YI?t:new YI(e,Qe.instance,t)},WI),$I=(XI.create=function(){return new XI},XI.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(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 ri(n.status,n.responseText,function(e){var t=ni.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)):r(new Error("Request Error")))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})},XI);function XI(){}function WI(){}function ZI(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}function QI(e,t,r,n){var i=zI.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}function eA(){return null!==BI&&BI.apply(this,arguments)||this}function tA(){this.listeners={}}function rA(e,t){this.repository=e,this.transport=t}function nA(e,t){this.url=e,this.transport=t}lA.create=function(){return new lA},lA.prototype.send=function(n){var i=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=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(ri.ok())})},lA.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 iA,oA=lA,sA=(cA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)},cA),aA=(uA.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)},uA);function uA(e){this.invocationResponseResolver=e}function cA(e){this.invocationResponseResolver=e}function lA(){}function pA(e,t,r){this.workspace=e,this.experiment=t,this.decision=r}($o=iA=iA||{}).prompt="prompt",$o.function="function",SA.prototype.getInvocator=function(e,t){return e===iA.prompt?new sA(t):e===iA.function?new aA(t):null};var fA=SA,dA=(RA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},RA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},RA),hA=(NA.prototype.determineOrNull=function(e){if(!jE.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new pA(t,o,i)}return null},NA),yA=(OA.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=vA.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.excludeTargets))&&0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.includeTargets)},OA),vA=(AA.of=function(e,t){return new AA(new WE("SPLIT_URL",t.insertId),t.user,e)},AA),mA=(IA.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))},IA),gA=(_A.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(_A.SPLIT_URL_CONFIG_KEY,"")),r=yn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl):null}catch(e){return null}},_A.prototype.resolveByRedirectType=function(e,t){return t&&e===n.SplitUrlRedirectType.MANUAL?this.resolveManualRedirectUrl(t):null},_A.prototype.resolveManualRedirectUrl=function(e){return null!=(e=cw.tryParse(e))?e:null},_A.SPLIT_URL_CONFIG_KEY="redirectUrl",_A),EA=(TA.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return!a.isNullOrUndefined(e)&&Boolean(JSON.parse(e))}catch(e){return!1}},TA.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},TA.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)},TA),wA=i.log,bA=null;function TA(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}function _A(){}function IA(e,t,r){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r}function AA(e,t,r){this.key=e,this.user=t,this.workspace=r}function OA(e){this.targetMatcher=e}function NA(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}function RA(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.redirector.redirect(e)},this.initialize()}function SA(){}function CA(e,t){var i=m1.config(t);m1.logging(i);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()){o=window._hackleApp.getInvocationType();var r=null===(s=(new fA).getInvocator(o,new Wi))?(Ao.error("Failed to get invocator with invocationType:".concat(o)),null):new Ro(new Io(s));if(r)return r}}catch(e){wA.error("Unexpected exception while check WebApp client: ".concat(e))}t=m1.sdk(e,i);if(bA)return wA.debug("use already exists hackleClient"),bA;Qi.initialize();var n=new p_,o=Zi.getInstance({days:3650,isCrossSubdomain:!0,sameSite:i.sameSiteCookie,isSecure:i.secureCookie}),s=m1.isBeaconSupported(),r=qI.intercept(t,$I.create()),a=qI.intercept(t,oA.create()),u=r,c=(s&&(u=a),new g1),l=new E1(c,new w1,m1.pollingIntervalMillis(i)),p=new I1(y_.clientFetch(i.sdkUrl,t.key),r),p=new O1(p),f=(c.add("workspace",p),new A1(y_.userCohorts(i.sdkUrl),r)),d=new a_(f_.postfix(o,"_".concat(e))),h=d.getUser(),y=i.user||null,v=new s_(wo(),d,f,Qe.instance,h,y),m=(c.add("cohort",v),new l_(i.sessionTimeoutMillis,f_.postfix(o,"_".concat(e.slice(8))))),d=(v.addListener(m),new t_(n,"".concat("hackle-repository-storage","_").concat(e),100)),f=new GI(y_.clientDispatch(i.eventUrl),r),y=f,g=(s&&(y=new GI(y_.beaconDispatch(i.eventUrl,t.key),a)),new KI(d,f)),c=new N1(f,y,g),s=new KE(m1.dedupIntervalMillis(i)),t=new JI(c,100,new w1,500),a=new GE(t,s,m,v),d=new nw(new d_(o,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),f=new nw(new d_(o,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),y=new v_(f_.prefix(n,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),c=new j_(f_.prefix(n,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),E=ub.create(p,a,[d,f],y),s=new t1(new r1(f_.postfix(o,"_".concat(e.slice(0,8)))),new o1,E,v),n=new BE(v,E),a=(m.addListener(s),m.addListener(n),new O_(E)),n=new m_([new g_,new E_(new $_),new w_(new $_),new b_(y,Qe.instance),new T_(new X_),new __(new X_),new I_(new W_),new A_(new W_)]),y=new V_([new H_(c),new B_(n),new z_]),n=new G_(Qe.instance,a,y),a=new J_([new Y_,new q_(n)]),y=new M_(y_.inAppMessageRenderer(i.cdnUrl,i.IAM_RENDERER_VERSION_HEADER)),y=new N_(new x_(y),n,a),n=new K_(new k_(rb.get("targetMatcher")),new P_(c)),a=new S_(p,n,E),c=(new R_(t,a,y),new y1(p)),n=(new h1(t,c),new yA(rb.get("targetMatcher"))),a=new EA(o,"hackle-split-url-redirected",{days:.0006944444444444445}),y=new hA(p,n,a,E),c=new mA(new gA,new Z_,a),o=(new dA(t,y,c),new h_(E,v,d,f)),a=(null==(p=i.devTool)?void 0:p.userExplorer)&&"function"==typeof(null==(n=i.devTool)?void 0:n.userExplorer),t=i.devTool&&a?{manager:i.devTool,userExplorer:o}:void 0,y=new oi(y_.monitoring(i.monitoringUrl),r,u,new w1,6e4),w=(Zn.addRegistry(y),l.start(),new qi(E,l,m,v,t));bA=w;function b(){g.flush().catch(function(e){return wA.warn("Failed to flush retry events: ".concat(e))})}return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){To(),m.updateLastEventTime((new Date).getTime()),w.close(),Zn.globalRegistry.close()}),window.addEventListener("pageshow",b),document.addEventListener("visibilitychange",function(){document.hidden||b()}),i.autoOpenDevTool&&(i.devTool?w.showUserExplorer():wA.error("DevTool is not provided")),c=Date.now(),d=v.currentUser,f=m.currentSessionId,(ZT(h,d)?m.startNewSessionIfNeeded(d,c):m.startNewSession(h,d,c))===f&&s.startNewCampaignIfNeeded(d,c),w.onReady(function(){(new lb).install(E,v);var t,r,e=w;if(i.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)wA.error(e);else try{wA.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)wA.error(e);else try{wA.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)wA.error(e);else try{wA.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)wA.error(e);else try{wA.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)wA.error(e);else try{wA.error(e)}catch(e){}}}function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t,r,n),i}}),w}td={createInstance:CA,getUserId:wo,setUserId:bo,removeUserId:To,Logger:i},n.Bucket=wt,n.Cohort=ar,n.Container=Mt,n.ContainerGroup=kt,n.CoreVersion=cr,n.Decision=ht,n.DecisionReason=f,n.EmptyHackleRemoteConfig=vt,n.EmptyParameterConfig=et,n.EventType=Tt,n.Experiment=gt,n.FeatureFlagDecision=yt,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Ar,n.IAM_BEHAVIOR=Ir,n.IAM_DISPLAY_TYPE=br,n.IAM_LAYOUT_TYPE=Tr,n.IAM_ORIENTATION=_r,n.IAM_PLATFORM_TYPE=Er,n.IAM_STATUS=gr,n.IAM_TIMEUNIT=wr,n.IdentifierType=_t,n.IdentifiersBuilder=It,n.InAppMessage=Or,n.InAppMessageAction=Jr,n.InAppMessageBackground=Kr,n.InAppMessageButton=Br,n.InAppMessageButtonStyle=Gr,n.InAppMessageContext=Dr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Lr,n.InAppMessageDecision=dt,n.InAppMessageDurationCap=kr,n.InAppMessageEventFrequencyCap=xr,n.InAppMessageEventTrigger=Sr,n.InAppMessageEventTriggerRule=Cr,n.InAppMessageIdentifierCap=Mr,n.InAppMessageImage=jr,n.InAppMessagePeriodAlways=Nr,n.InAppMessagePeriodCustom=Rr,n.InAppMessageTargetContext=Ur,n.InAppMessageText=Vr,n.InAppMessageTextAttribute=Hr,n.InAppMessageTextStyle=zr,n.InAppMessageUserOverride=Pr,n.Logger=i,n.MATCH_OPERATORS=dr,n.MATCH_TYPES=pr,n.MATCH_VALUE_TYPES=fr,n.MetaVersion=lr,n.ParameterConfiguration=mt,n.PropertyOperations=Ki,n.PropertyOperationsBuilder=Gi,n.RemoteConfigDecision=ft,n.RemoteConfigParameter=Ut,n.RemoteConfigParameterValue=Dt,n.RemoteConfigTargetRule=Pt,n.SEGMENT_TYPES=vr,n.Segment=xt,n.Slot=bt,n.SplitUrlConfig=yn,n.SplitUrlTargets=vn,n.TARGET_ACTION_TYPES=hr,n.TARGET_KEY_TYPES=yr,n.Target=At,n.TargetAction=St,n.TargetCondition=Ot,n.TargetKey=Nt,n.TargetMatch=Rt,n.TargetRule=Ct,n.TargetingType=mr,n.Variation=Et,n.Version=ur,n.createInstance=CA,n.default=td,n.getUserId=wo,n.removeUserId=To,n.resolveIdentifiers=lt,n.sanitizeUser=pt,n.setUserId=bo;var xA=function(e,t){return(xA=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 MA=function(){return(MA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function kA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}UA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},UA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},UA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ja=UA;function UA(){this.listeners={}}DA.arePropertiesEqual=function(e,t){var r=DA.coerceUnknownToProperties(e),n=DA.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]})},DA.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var PA=DA;function DA(){}FA.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)&&PA.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&PA.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var LA=FA;function FA(){}var jA=function(n){var e=i,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 i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=l.createInstance(e,MA(MA({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.25.2"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return xA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(MA(MA({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){LA.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i}(Ja);var P={exports:{}},E={},VA=Object.getOwnPropertySymbols,HA=Object.prototype.hasOwnProperty,zA=Object.prototype.propertyIsEnumerable;var Yl=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),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))HA.call(r,o)&&(n[o]=r[o]);if(VA)for(var s=VA(r),a=0;a<s.length;a++)zA.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},BA=Yl,M="function"==typeof Symbol&&Symbol.for,GA=M?Symbol.for("react.element"):60103,KA=M?Symbol.for("react.portal"):60106,ls=M?Symbol.for("react.fragment"):60107,vs=M?Symbol.for("react.strict_mode"):60108,Ls=M?Symbol.for("react.profiler"):60114,JA=M?Symbol.for("react.provider"):60109,YA=M?Symbol.for("react.context"):60110,qA=M?Symbol.for("react.forward_ref"):60112,sc=M?Symbol.for("react.suspense"):60113,$A=M?Symbol.for("react.memo"):60115,XA=M?Symbol.for("react.lazy"):60116,WA="function"==typeof Symbol&&Symbol.iterator;function ZA(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 QA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},eO={};function tO(e,t,r){this.props=e,this.context=t,this.refs=eO,this.updater=r||QA}function rO(){}function nO(e,t,r){this.props=e,this.context=t,this.refs=eO,this.updater=r||QA}tO.prototype.isReactComponent={},tO.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(ZA(85));this.updater.enqueueSetState(this,e,t,"setState")},tO.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},rO.prototype=tO.prototype;var So=nO.prototype=new rO,iO=(So.constructor=nO,BA(So,tO.prototype),So.isPureReactComponent=!0,{current:null}),oO=Object.prototype.hasOwnProperty,sO={key:!0,ref:!0,__self:!0,__source:!0};function aO(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)oO.call(t,n)&&!sO.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:GA,type:e,key:o,ref:s,props:i,_owner:iO.current}}function uO(e){return"object"==typeof e&&null!==e&&e.$$typeof===GA}var cO=/\/+/g,lO=[];function pO(e,t,r,n){var i;return lO.length?((i=lO.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function fO(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,lO.length<10&&lO.push(e)}function dO(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case GA:case KA:o=!0}}if(o)return n(i,t,""===r?"."+hO(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+hO(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=WA&&t[WA]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+hO(a,s++),n,i);else if("object"===a)throw n=""+t,Error(ZA(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function hO(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 yO(e,t){e.func.call(e.context,t,e.count++)}function vO(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?mO(e,n,r,function(e){return e}):null!=e&&(uO(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(cO,"$&/")+"/")+r,e={$$typeof:GA,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function mO(e,t,r,n,i){var o="";dO(e,vO,t=pO(t,o=null!=r?(""+r).replace(cO,"$&/")+"/":o,n,i)),fO(t)}var gO={current:null};function EO(){var e=gO.current;if(null===e)throw Error(ZA(321));return e}var wO,bO,TO,qa={ReactCurrentDispatcher:gO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:iO,IsSomeRendererActing:{current:!1},assign:BA},e=(E.Children={map:function(e,t,r){if(null==e)return e;var n=[];return mO(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;dO(e,yO,t=pO(null,null,t,r)),fO(t)},count:function(e){return dO(e,function(){return null},null)},toArray:function(e){var t=[];return mO(e,t,null,function(e){return e}),t},only:function(e){if(uO(e))return e;throw Error(ZA(143))}},E.Component=tO,E.Fragment=ls,E.Profiler=Ls,E.PureComponent=nO,E.StrictMode=vs,E.Suspense=sc,E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qa,E.cloneElement=function(e,t,r){if(null==e)throw Error(ZA(267,e));var n=BA({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=iO.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)oO.call(t,a)&&!sO.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:GA,type:e.type,key:i,ref:o,props:n,_owner:s}},E.createContext=function(e,t){return(e={$$typeof:YA,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:JA,_context:e},e.Consumer=e},E.createElement=aO,E.createFactory=function(e){var t=aO.bind(null,e);return t.type=e,t},E.createRef=function(){return{current:null}},E.forwardRef=function(e){return{$$typeof:qA,render:e}},E.isValidElement=uO,E.lazy=function(e){return{$$typeof:XA,_ctor:e,_status:-1,_result:null}},E.memo=function(e,t){return{$$typeof:$A,type:e,compare:void 0===t?null:t}},E.useCallback=function(e,t){return EO().useCallback(e,t)},E.useContext=function(e,t){return EO().useContext(e,t)},E.useDebugValue=function(){},E.useEffect=function(e,t){return EO().useEffect(e,t)},E.useImperativeHandle=function(e,t,r){return EO().useImperativeHandle(e,t,r)},E.useLayoutEffect=function(e,t){return EO().useLayoutEffect(e,t)},E.useMemo=function(e,t){return EO().useMemo(e,t)},E.useReducer=function(e,t,r){return EO().useReducer(e,t,r)},E.useRef=function(e){return EO().useRef(e)},E.useState=function(e){return EO().useState(e)},E.version="16.14.0",{}),Rf=Function.call.bind(Object.prototype.hasOwnProperty),_O=function(){};function IO(e,t,r,n,i){if("production"!==production)for(var o in e)if(TO(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,wO)}catch(e){s=e}!s||s instanceof Error||_O((n||"React class")+": type specification of "+r+" `"+o+"` 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 bO)&&(bO[s.message]=!0,o=i?i():"",_O("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(wO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bO={},TO=Rf,_O=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),IO.resetWarningCache=function(){"production"!==production&&(bO={})},"production"!==production){var AO=Yl,OO=IO,k="function"==typeof Symbol&&Symbol.for,NO=k?Symbol.for("react.element"):60103,RO=k?Symbol.for("react.portal"):60106,SO=k?Symbol.for("react.fragment"):60107,CO=k?Symbol.for("react.strict_mode"):60108,xO=k?Symbol.for("react.profiler"):60114,MO=k?Symbol.for("react.provider"):60109,kO=k?Symbol.for("react.context"):60110,UO=k?Symbol.for("react.concurrent_mode"):60111,PO=k?Symbol.for("react.forward_ref"):60112,DO=k?Symbol.for("react.suspense"):60113,LO=k?Symbol.for("react.suspense_list"):60120,FO=k?Symbol.for("react.memo"):60115,jO=k?Symbol.for("react.lazy"):60116,VO=k?Symbol.for("react.block"):60121,HO=k?Symbol.for("react.fundamental"):60117,zO=k?Symbol.for("react.responder"):60118,BO=k?Symbol.for("react.scope"):60119,GO="function"==typeof Symbol&&Symbol.iterator,KO="@@iterator";function JO(e){if(null===e||"object"!=typeof e)return null;e=GO&&e[GO]||e[KO];return"function"==typeof e?e:null}var YO={current:null},qO={current:null},$O=/^(.*)[\\\/]/,XO=1;function WO(e){if(null==e)return null;if("number"==typeof e.tag&&nN("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 SO:return"Fragment";case RO:return"Portal";case xO:return"Profiler";case CO:return"StrictMode";case DO:return"Suspense";case LO:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case kO:return"Context.Consumer";case MO:return"Context.Provider";case PO:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case FO:return WO(e.type);case VO:return WO(e.render);case jO:r=(t=e)._status===XO?t._result:null;if(r)return WO(r)}var t,r;return null}var ZO={},QO=null;function eN(e){QO=e}ZO.getCurrentStack=null,ZO.getStackAddendum=function(){var e,t,r,n,i,o="",s=(QO&&(e=WO(QO.type),r=QO._owner,o+=(e=e,t=QO._source,r=r&&WO(r.type),i="",t?(n=(s=t.fileName).replace($O,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match($O))&&(s=s[1])?s.replace($O,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),ZO.getCurrentStack);return s&&(o+=s()||""),o};var tN={ReactCurrentDispatcher:YO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:qO,IsSomeRendererActing:{current:!1},assign:AO};function rN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];iN("warn",e,r)}function nN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];iN("error",e,r)}function iN(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=tN.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 i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}AO(tN,{ReactDebugCurrentFrame:ZO,ReactComponentTreeHook:{}});var oN={};function sN(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;oN[r]||(nN("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),oN[r]=!0)}var aN={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){sN(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){sN(e,"replaceState")},enqueueSetState:function(e,t,r,n){sN(e,"setState")}},uN={};function cN(e,t,r){this.props=e,this.context=t,this.refs=uN,this.updater=r||aN}Object.freeze(uN),cN.prototype.isReactComponent={},cN.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")},cN.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var lN,pN={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(lN in pN)pN.hasOwnProperty(lN)&&!function(e,t){Object.defineProperty(cN.prototype,e,{get:function(){rN("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(lN,pN[lN]);function fN(){}function dN(e,t,r){this.props=e,this.context=t,this.refs=uN,this.updater=r||aN}fN.prototype=cN.prototype,(k=dN.prototype=new fN).constructor=dN,AO(k,cN.prototype),k.isPureReactComponent=!0;var hN,yN,vN=Object.prototype.hasOwnProperty,mN={key:!0,ref:!0,__self:!0,__source:!0};function gN(e){if(vN.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function EN(e){if(vN.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var wN={},bN=function(e,t,r,n,i,o,s){e={$$typeof:NO,type:e,key:t,ref:r,props:s,_owner:o,_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:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function TN(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in gN(t)&&(s=t.ref,"string"==typeof(c=t).ref&&qO.current&&c.__self&&qO.current.stateNode!==c.__self&&(p=WO(qO.current.type),wN[p]||(nN('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',WO(qO.current.type),c.ref),wN[p]=!0))),EN(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)vN.call(t,n)&&!mN.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)i.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),i.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===i[n]&&(i[n]=v[n])}function m(){yN||(yN=!0,nN("%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(){hN||(hN=!0,nN("%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(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),bN(e,o,s,a,u,qO.current,i)}function _N(e){return"object"==typeof e&&null!==e&&e.$$typeof===NO}var IN=".",AN=":",ON=!1,NN=/\/+/g;function RN(e){return(""+e).replace(NN,"$&/")}var SN=10,CN=[];function xN(e,t,r,n){var i;return CN.length?((i=CN.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function MN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,CN.length<SN&&CN.push(e)}function kN(e,t,r){return null==e?0:function e(t,r,n,i){var o,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 NO:case RO:a=!0}}if(a)return n(i,t,""===r?IN+UN(t,0):r),1;var u=0,c=""===r?IN:r+AN;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+UN(o,l),n,i);else if("function"==typeof(r=JO(t))){r===t.entries&&(ON||rN("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."),ON=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(o=p.value,c+UN(o,d++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+ZO.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 UN(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 PN(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function DN(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?LN(o,n,r,function(e){return e}):null!=o&&(_N(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":RN(o.key)+"/")+r,o=bN(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function LN(e,t,r,n,i){var o="",t=xN(t,o=null!=r?RN(r)+"/":o,n,i);kN(e,DN,t),MN(t)}function FN(e){return"string"==typeof e||"function"==typeof e||e===SO||e===UO||e===xO||e===CO||e===DO||e===LO||"object"==typeof e&&null!==e&&(e.$$typeof===jO||e.$$typeof===FO||e.$$typeof===MO||e.$$typeof===kO||e.$$typeof===PO||e.$$typeof===HO||e.$$typeof===zO||e.$$typeof===BO||e.$$typeof===VO)}function jN(){var e=YO.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 VN(){if(qO.current){var e=WO(qO.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var HN=!1,zN={};function BN(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=VN())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),zN[t=r]||(zN[t]=!0,r="",e&&e._owner&&e._owner!==qO.current&&(r=" It was passed a child from "+WO(e._owner.type)+"."),eN(e),nN('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),eN(null)))}function GN(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];_N(n)&&BN(n,t)}else if(_N(e))e._store&&(e._store.validated=!0);else if(e){var i=JO(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)_N(o.value)&&BN(o.value,t)}}function KN(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=WO(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==PO&&t.$$typeof!==FO)return;r=t.propTypes}r?(eN(e),OO(r,e.props,"prop",n,ZO.getStackAddendum),eN(null)):void 0===t.PropTypes||HN||(HN=!0,nN("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||nN("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function JN(e,t,r){var n,i=FN(e),t=(i||(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+".":"")||VN(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===NO?(s="<"+(WO(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,nN("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)),TN.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)GN(arguments[o],e);if(e===SO){var s=t;eN(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){nN("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&nN("Invalid attribute `ref` supplied to `React.Fragment`."),eN(null)}else KN(t);return t}var YN=!1;try{var qN=Object.freeze({}),$N=new Map([[qN,null]]),XN=new Set([qN]);$N.set(0,0),XN.add(0)}catch(e){}function WN(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,i,o=AO({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in gN(t)&&(a=t.ref,l=qO.current),EN(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)vN.call(t,n)&&!mN.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];o.children=f}return bN(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)GN(arguments[i],n.type);return KN(n),n}function ZN(e){var t=JN.bind(null,e);return t.type=e,YN||(YN=!0,rN("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 rN("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}k=JN,e.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=xN(null,null,t,r),kN(e,PN,t),MN(t)},count:function(e){return kN(e,function(){return null},null)},toArray:function(e){var t=[];return LN(e,t,null,function(e){return e}),t},only:function(e){if(_N(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},e.Component=cN,e.Fragment=SO,e.Profiler=xO,e.PureComponent=dN,e.StrictMode=CO,e.Suspense=DO,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tN,e.cloneElement=WN,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&nN("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:kO,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:MO,_context:r}),i=!1,t={$$typeof:kO,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,nN("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,nN("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},e.createElement=k,e.createFactory=ZN,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){return null!=e&&e.$$typeof===FO?nN("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?nN("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&nN("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||nN("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:PO,render:e}},e.isValidElement=_N,e.lazy=function(e){var t,r,n={$$typeof:jO,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){nN("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){nN("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},e.memo=function(e,t){return FN(e)||nN("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:FO,type:e,compare:void 0===t?null:t}},e.useCallback=function(e,t){return jN().useCallback(e,t)},e.useContext=function(e,t){var r,n=jN();return void 0!==t&&nN("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?nN("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&&nN("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},e.useDebugValue=function(e,t){return jN().useDebugValue(e,t)},e.useEffect=function(e,t){return jN().useEffect(e,t)},e.useImperativeHandle=function(e,t,r){return jN().useImperativeHandle(e,t,r)},e.useLayoutEffect=function(e,t){return jN().useLayoutEffect(e,t)},e.useMemo=function(e,t){return jN().useMemo(e,t)},e.useReducer=function(e,t,r){return jN().useReducer(e,t,r)},e.useRef=function(e){return jN().useRef(e)},e.useState=function(e){return jN().useState(e)},e.version="16.14.0"}"production"===production?P.exports=E:P.exports=e;var QN=P.exports,eR=P.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Ol=eR.Consumer,tR=eR.Provider;var rR=l.Logger.log;function nR(e,t){e=iR(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function iR(e,t){void 0===t&&(t="A");var r=P.exports.useContext(eR),n=r.hackle,i=r.userVersion,o=r.initialized,s=P.exports.useCallback(function(){return o?(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,o]),r=kA(P.exports.useState(function(){return n?s():(rR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=kA(P.exports.useState(i),2),c=u[0],u=u[1];return aR(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function oR(e){e=sR(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function sR(e){var t=P.exports.useContext(eR),r=t.hackle,n=t.userVersion,i=t.initialized,o=P.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION):l.FeatureFlagDecision.off(l.DecisionReason.SDK_NOT_READY)},[e,r,i]),t=kA(P.exports.useState(function(){return r?o():(rR.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=kA(P.exports.useState(n),2),u=a[0],a=a[1];return aR(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function aR(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function uR(e){var t,r=e.experimentKey,e=e.children,n=(r=nR(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(P.exports.Children.forEach(e,function(e){P.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?P.exports.cloneElement(t,{variation:i}):null)}function cR(e){return e.variation,e=e.children,P.exports.createElement(P.exports.Fragment,null,e)}function lR(e){var t=(r=oR(e.featureKey)).isLoading,r=r.isOn;return t?null:QN.createElement(QN.Fragment,null,e.children(r))}D.HackleContext=eR,D.HackleContextConsumer=Ol,D.HackleContextProvider=tR,D.HackleExperiment=uR,D.HackleFeature=lR,D.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=kA(P.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return P.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),P.exports.useEffect(function(){function e(){a(function(e){return MA(MA({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),P.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return MA(MA({},e),{initialized:!0})})},function(){a(function(e){return MA(MA({},e),{initialized:!0})})}).catch(function(){a(function(e){return MA(MA({},e),{initialized:!0})})})},[t]),i||s.initialized?QN.createElement(tR,{value:s},e):null},D.HackleVariation=cR,D.createInstance=function(e,t){return new jA(e,t)},D.useFeature=function(e){var t=(n=P.exports.useContext(eR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=kA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&rR.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=kA(P.exports.useState(r),2))[0],n=n[1];return aR(a,r)||(n(r),s(i())),o},D.useFeatureFlagDetail=function(e){var t=(n=P.exports.useContext(eR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION)},[e,t,n]),o=(s=kA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&rR.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=kA(P.exports.useState(r),2))[0],n=n[1];return aR(a,r)||(n(r),s(i())),o},D.useLoadableFeature=oR,D.useLoadableFeatureDetail=sR,D.useLoadableRemoteConfig=function(){var e=(o=P.exports.useContext(eR)).hackle,t=o.userVersion,r=o.initialized,n=P.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=kA(P.exports.useState(function(){return e||rR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=kA(P.exports.useState(t),2))[0],a=a[1];return aR(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},D.useLoadableVariation=nR,D.useLoadableVariationDetail=iR,D.useRemoteConfig=function(){var e=(r=P.exports.useContext(eR)).hackle,t=r.userVersion,r=r.initialized,n=P.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=kA(P.exports.useState(function(){return e||rR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=kA(P.exports.useState(t),2))[0],r=r[1];return aR(s,t)||(r(t),o(n())),i},D.useTrack=function(){var t=P.exports.useContext(eR).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(rR.error("HackleClient is not existed"),function(){})},D.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=P.exports.useContext(eR)).hackle,n=a.userVersion,i=a.initialized,o=P.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=kA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&rR.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=kA(P.exports.useState(n),2))[0],c=c[1];return aR(u,n)||(c(n),a(o())),s},D.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=P.exports.useContext(eR)).hackle,n=i.userVersion,i=i.initialized,o=P.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION)},[t,e,r,i]),s=(a=kA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&rR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=kA(P.exports.useState(n),2))[0],i=i[1];return aR(u,n)||(i(n),a(o())),s},Object.defineProperty(D,"__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(D){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(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 F,l={},j=new Uint8Array(16);function V(){if(F=F||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return F(j);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var H=/^(?:[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 z(e){return"string"==typeof e&&H.test(e)}for(var B,G,K=[],J=0;J<256;++J)K.push((J+256).toString(16).substr(1));function Y(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase();if(z(e))return e;throw TypeError("Stringified UUID is invalid")}var q=0,$=0;function X(e){if(!z(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 W(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?X(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=a(i))[6]=15&i[6]|s,i[8]=63&i[8]|128,r){n=n||0;for(var o=0;o<16;++o)r[n+o]=i[o];return r}return Y(i)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function Z(e){return 14+(e+64>>>9<<4)+1}function Q(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ee(e,t,r,n,i,o){return Q((t=Q(Q(t,e),Q(n,o)))<<i|t>>>32-i,r)}function te(e,t,r,n,i,o,s){return ee(t&r|~t&n,e,t,i,o,s)}function re(e,t,r,n,i,o,s){return ee(t&n|r&~n,e,t,i,o,s)}function ne(e,t,r,n,i,o,s){return ee(t^r^n,e,t,i,o,s)}function ie(e,t,r,n,i,o,s){return ee(r^(t|~n),e,t,i,o,s)}var t=W("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[Z(t)-1]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=i,l=o;r=te(r,n,i,o,e[s],7,-680876936),o=te(o,r,n,i,e[s+1],12,-389564586),i=te(i,o,r,n,e[s+2],17,606105819),n=te(n,i,o,r,e[s+3],22,-1044525330),r=te(r,n,i,o,e[s+4],7,-176418897),o=te(o,r,n,i,e[s+5],12,1200080426),i=te(i,o,r,n,e[s+6],17,-1473231341),n=te(n,i,o,r,e[s+7],22,-45705983),r=te(r,n,i,o,e[s+8],7,1770035416),o=te(o,r,n,i,e[s+9],12,-1958414417),i=te(i,o,r,n,e[s+10],17,-42063),n=te(n,i,o,r,e[s+11],22,-1990404162),r=te(r,n,i,o,e[s+12],7,1804603682),o=te(o,r,n,i,e[s+13],12,-40341101),i=te(i,o,r,n,e[s+14],17,-1502002290),n=te(n,i,o,r,e[s+15],22,1236535329),r=re(r,n,i,o,e[s+1],5,-165796510),o=re(o,r,n,i,e[s+6],9,-1069501632),i=re(i,o,r,n,e[s+11],14,643717713),n=re(n,i,o,r,e[s],20,-373897302),r=re(r,n,i,o,e[s+5],5,-701558691),o=re(o,r,n,i,e[s+10],9,38016083),i=re(i,o,r,n,e[s+15],14,-660478335),n=re(n,i,o,r,e[s+4],20,-405537848),r=re(r,n,i,o,e[s+9],5,568446438),o=re(o,r,n,i,e[s+14],9,-1019803690),i=re(i,o,r,n,e[s+3],14,-187363961),n=re(n,i,o,r,e[s+8],20,1163531501),r=re(r,n,i,o,e[s+13],5,-1444681467),o=re(o,r,n,i,e[s+2],9,-51403784),i=re(i,o,r,n,e[s+7],14,1735328473),n=re(n,i,o,r,e[s+12],20,-1926607734),r=ne(r,n,i,o,e[s+5],4,-378558),o=ne(o,r,n,i,e[s+8],11,-2022574463),i=ne(i,o,r,n,e[s+11],16,1839030562),n=ne(n,i,o,r,e[s+14],23,-35309556),r=ne(r,n,i,o,e[s+1],4,-1530992060),o=ne(o,r,n,i,e[s+4],11,1272893353),i=ne(i,o,r,n,e[s+7],16,-155497632),n=ne(n,i,o,r,e[s+10],23,-1094730640),r=ne(r,n,i,o,e[s+13],4,681279174),o=ne(o,r,n,i,e[s],11,-358537222),i=ne(i,o,r,n,e[s+3],16,-722521979),n=ne(n,i,o,r,e[s+6],23,76029189),r=ne(r,n,i,o,e[s+9],4,-640364487),o=ne(o,r,n,i,e[s+12],11,-421815835),i=ne(i,o,r,n,e[s+15],16,530742520),n=ne(n,i,o,r,e[s+2],23,-995338651),r=ie(r,n,i,o,e[s],6,-198630844),o=ie(o,r,n,i,e[s+7],10,1126891415),i=ie(i,o,r,n,e[s+14],15,-1416354905),n=ie(n,i,o,r,e[s+5],21,-57434055),r=ie(r,n,i,o,e[s+12],6,1700485571),o=ie(o,r,n,i,e[s+3],10,-1894986606),i=ie(i,o,r,n,e[s+10],15,-1051523),n=ie(n,i,o,r,e[s+1],21,-2054922799),r=ie(r,n,i,o,e[s+8],6,1873313359),o=ie(o,r,n,i,e[s+15],10,-30611744),i=ie(i,o,r,n,e[s+6],15,-1560198380),n=ie(n,i,o,r,e[s+13],21,1309151649),r=ie(r,n,i,o,e[s+4],6,-145523070),o=ie(o,r,n,i,e[s+11],10,-1120210379),i=ie(i,o,r,n,e[s+2],15,718787259),n=ie(n,i,o,r,e[s+9],21,-343485551),r=Q(r,a),n=Q(n,u),i=Q(i,c),o=Q(o,l)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(Z(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),i=[],o=32*n.length,s="0123456789abcdef",a=0;a<o;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);i.push(u)}return i});function oe(e,t){return e<<t|e>>>32-t}var r=W("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 i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/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 b=Math.floor(w/20),b=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}}(b,v,m,g)+E+t[b]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=b;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 se,ae,ue,ce,le,pe,fe,de,he,ye,ve,me,ge,Ee,we,be,Te,_e,Ie,Ae,Oe,Ne,Re,Se,Ce,xe,ke,Me,Ue,Pe,t=L(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,i=t||new Array(16),o=(e=e||{}).node||B,r=void 0!==e.clockseq?e.clockseq:G,s=(null!=o&&null!=r||(s=e.random||(e.rng||V)(),null==o&&(o=B=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=G=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:$+1,u=s-q+(a-$)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||q<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");q=s,G=r,u=(1e4*(268435455&(s+=122192928e5))+($=a))%4294967296,i[n++]=u>>>24&255,i[n++]=u>>>16&255,i[n++]=u>>>8&255,i[n++]=255&u,e=s/4294967296*1e4&268435455,i[n++]=e>>>8&255,i[n++]=255&e,i[n++]=e>>>24&15|16,i[n++]=e>>>16&255,i[n++]=r>>>8|128,i[n++]=255&r;for(var c=0;c<6;++c)i[n+c]=o[c];return t||Y(i)},v3:t,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||V)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Y(n)},v5:r,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(z(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:z,stringify:Y,parse:X})),r={exports:{}},n=(r.exports=(0,g="function"==typeof atob,y="function"==typeof btoa,h="function"==typeof Buffer,se="function"==typeof TextDecoder?new TextDecoder:void 0,ae="function"==typeof TextEncoder?new TextEncoder:void 0,ue=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ce=function(){var r={};return ue.forEach(function(e,t){return r[e]=t}),r}(),le=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pe=String.fromCharCode.bind(String),fe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},de=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},he=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},So=function(e){for(var t,r,n,i="",o=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");i+=ue[(t=t<<16|r<<8|n)>>18&63]+ue[t>>12&63]+ue[t>>6&63]+ue[63&t]}return o?i.slice(0,o-3)+"===".substring(o):i},ve=h?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],r=0,n=e.length;r<n;r+=4096)t.push(pe.apply(null,e.subarray(r,r+4096)));return ye(t.join(""))},ge=function(e){var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?pe(192|t>>>6)+pe(128|63&t):pe(224|t>>>12&15)+pe(128|t>>>6&63)+pe(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),pe(240|t>>>18&7)+pe(128|t>>>12&63)+pe(128|t>>>6&63)+pe(128|63&t))},Ee=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,be=h?function(e){return Buffer.from(e,"utf8").toString("base64")}:ae?function(e){return ve(ae.encode(e))}:function(e){return ye(we(e))},_e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ie=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 pe(55296+(t>>>10))+pe(56320+(1023&t));case 3:return pe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return pe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},vt=function(e){if(e=e.replace(/\s+/g,""),!le.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,r,n,i="",o=0;o<e.length;)t=ce[e.charAt(o++)]<<18|ce[e.charAt(o++)]<<12|(r=ce[e.charAt(o++)])<<6|(n=ce[e.charAt(o++)]),i+=64===r?pe(t>>16&255):64===n?pe(t>>16&255,t>>8&255):pe(t>>16&255,t>>8&255,255&t);return i},Ne=h?function(e){return fe(Buffer.from(e,"base64"))}:function(e){return fe(Oe(e).split("").map(function(e){return e.charCodeAt(0)}))},Se=h?function(e){return Buffer.from(e,"base64").toString("utf8")}:se?function(e){return se.decode(Ne(e))}:function(e){return Ae(Oe(e))},Ce=function(e){return he(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},ke=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Pe={version:"3.7.5",VERSION:"3.7.5",atob:Oe=g?function(e){return atob(he(e))}:h?function(e){return Buffer.from(e,"base64").toString("binary")}:vt,atobPolyfill:vt,btoa:ye=y?function(e){return btoa(e)}:h?function(e){return Buffer.from(e,"binary").toString("base64")}:So,btoaPolyfill:So,fromBase64:xe=function(e){return Se(Ce(e))},toBase64:Te=function(e,t){return(t=void 0===t?!1:t)?de(be(e)):be(e)},encode:Te,encodeURI:g=function(e){return Te(e,!0)},encodeURL:g,utob:we=function(e){return e.replace(Ee,ge)},btou:Ae=function(e){return e.replace(_e,Ie)},decode:xe,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:me=function(e,t){return(t=void 0===t?!1:t)?de(ve(e)):ve(e)},toUint8Array:Re=function(e){return Ne(Ce(e))},extendString:Me=function(){function e(e,t){Object.defineProperty(String.prototype,e,ke(t))}e("fromBase64",function(){return xe(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 Re(this)})},extendUint8Array:Ue=function(){function e(e,t){Object.defineProperty(Uint8Array.prototype,e,ke(t))}e("toBase64",function(e){return me(this,e)}),e("toBase64URI",function(){return me(this,!0)}),e("toBase64URL",function(){return me(this,!0)})},extendBuiltins:function(){Me(),Ue()},Base64:{}},Object.keys(Pe).forEach(function(e){return Pe.Base64[e]=Pe[e]}),Pe),l),De=(Object.defineProperty(n,"__esModule",{value:!0}),t),Le=r.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=(Be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},Be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},Be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},Be.associate=function(e,t){return this.associateTo(e,new Map,t)},Be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},Be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},Be),Fe={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},i=(ze.setLogLevel=function(e){this.logLevel=e=void 0===e?Fe.INFO:e},ze.initCounter=function(t){this.counters=p.associate(Object.keys(Fe),function(e){return[e,t(e)]})},ze._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){}},ze.increment=function(e){var t;null!=(t=null==(t=ze.counters)?void 0:t.get(e))&&t.increment()},ze.logLevel=Fe.INFO,ze.log={error:function(e){Fe.ERROR<=ze.logLevel&&(ze._log("ERROR",e),ze.increment("ERROR"))},warn:function(e){Fe.WARN<=ze.logLevel&&(ze._log("WARN",e),ze.increment("WARN"))},info:function(e){Fe.INFO<=ze.logLevel&&(ze._log("INFO",e),ze.increment("INFO"))},debug:function(e){Fe.DEBUG<=ze.logLevel&&(ze._log("DEBUG",e),ze.increment("DEBUG"))}},ze),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 ze(){}function Be(){}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 i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function s(n,i){var o,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(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=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=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=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,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Ye=i.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 i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Ye.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Ye.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}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=i.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 i,o=n[r],s=o[0],o=o[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(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?$e.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):$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=(u.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C0);case"seconds":return e/(u.C3/u.C0);case"minutes":return e/(u.C4/u.C0);case"hours":return e/(u.C5/u.C0);case"days":return e/(u.C6/u.C0)}},u.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C1);case"microseconds":return e;case"seconds":return e/(u.C3/u.C1);case"minutes":return e/(u.C4/u.C1);case"hours":return e/(u.C5/u.C1);case"days":return e/(u.C6/u.C1)}},u.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C2/u.C0);case"microseconds":return e*(u.C2/u.C1);case"milliseconds":return e;case"seconds":return e/(u.C3/u.C2);case"minutes":return e/(u.C4/u.C2);case"hours":return e/(u.C5/u.C2);case"days":return e/(u.C6/u.C2)}},u.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C3/u.C0);case"microseconds":return e*(u.C3/u.C1);case"milliseconds":return e*(u.C3/u.C2);case"seconds":return e;case"minutes":return e/(u.C4/u.C3);case"hours":return e/(u.C5/u.C3);case"days":return e/(u.C6/u.C3)}},u.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C4/u.C0);case"microseconds":return e*(u.C4/u.C1);case"milliseconds":return e*(u.C4/u.C2);case"seconds":return e*(u.C4/u.C3);case"minutes":return e;case"hours":return e/(u.C5/u.C4);case"days":return e/(u.C6/u.C4)}},u.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C5/u.C0);case"microseconds":return e*(u.C5/u.C1);case"milliseconds":return e*(u.C5/u.C2);case"seconds":return e*(u.C5/u.C3);case"minutes":return e*(u.C5/u.C4);case"hours":return e;case"days":return e/(u.C6/u.C5)}},u.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C6/u.C0);case"microseconds":return e*(u.C6/u.C1);case"milliseconds":return e*(u.C6/u.C2);case"seconds":return e*(u.C6/u.C3);case"minutes":return e*(u.C6/u.C4);case"hours":return e*(u.C6/u.C5);case"days":return e}},u.C6=24*(u.C5=60*(u.C4=60*(u.C3=1e3*(u.C2=1e3*(u.C1=1e3*(u.C0=1)))))),u.converter={nanoseconds:u.nanosToUnit,microseconds:u.microsToUnit,milliseconds:u.millisToUnit,seconds:u.secondsToUnit,minutes:u.minutesToUnit,hours:u.hoursToUnit,days:u.daysToUnit},u),Qe=(ot.prototype.tick=function(){return 1e3*Date.now()},ot.prototype.currentMillis=function(){return Date.now()},ot.instance=new ot,ot),et=(it.prototype.get=function(e,t){return t},it),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=i.log;function nt(e){this.parameters=e}function it(){}function ot(){}function u(){}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,i=t;n<i.length;n++){var o=ut(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}function lt(e){var t=new It;return t.addIdentifiers(e.identifiers||{}),t.add(_t.ID,e.id),t.add(_t.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(_t.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=(or.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},or.of=function(e,t,r){return new or(t,r,e)},or),ht=(ir.of=function(e,t,r){return new ir(e,t,r=void 0===r?new et:r)},ir.prototype.get=function(e,t){return this.config.get(e,t)},ir),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)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return Ct.fromJson(e,mr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return At.fromJson(e,mr.PROPERTY)}),a=vn.fromJson(t.execution.targetUrls),u=er.experimentImplementationTypeOrNull(t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return Ct.fromJson(e,mr.PROPERTY)}),l=St.fromJson(t.execution.defaultRule);return r&&u&&l&&new er(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,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.experimentImplementationTypeOrNull=function(e){switch(e){case"DEFAULT":return"DEFAULT";case"SPLIT_URL":return"SPLIT_URL";default:return void rt.debug("Unsupported implementationType [".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 bt(t,r,e)}))},Qt),bt=(Zt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},Zt),Tt=(Wt.fromJson=function(e){return new Wt(e.id,e.key)},Wt),_t=(Xt.ID="$id",Xt.USER="$userId",Xt.DEVICE="$deviceId",Xt.SESSION="$sessionId",Xt.HACKLE_DEVICE="$hackleDeviceId",Xt),It=($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),At=(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),St=(Gt.fromJson=function(e){var t=ut(hr,e.type);return t&&new Gt(t,e.variationId,e.bucketId)},Gt),Ct=(Bt.fromJson=function(e,t){t=At.fromJson(e.target,t),e=St.fromJson(e.action);return t&&e&&new Bt(t,e)},Bt),xt=(zt.fromJson=function(e){var t=ut(vr,e.type);return t&&new zt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.SEGMENT)}))},zt),kt=(Ht.fromJson=function(e){return new Ht(e.id,e.bucketId,e.groups.map(function(e){return Mt.fromJson(e)}))},Ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},Ht),Mt=(Vt.fromJson=function(e){return new Vt(e.id,e.experiments)},Vt),Ut=(jt.fromJson=function(e){var t=ut(fr,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Pt.fromJson(e,mr.PROPERTY)}),n=Dt.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)},jt),Pt=(Ft.fromJson=function(e,t){t=At.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,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}function jt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}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 zt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function Bt(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,i,o,s,a,u,c,l,p,f,d,h,y,v){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=d,this.containerId=h,this.implementationType=y,this.winnerVariationId=v}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 ir(e,t,r){this.variation=e,this.reason=t,this.config=r}function or(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}hn.tryParse=function(e){var t,r,n,i,e=hn.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,i=e[4],e=e[5],new hn(new cr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),lr.parse(i),lr.parse(e))},hn.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},hn.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},hn.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},hn.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},hn.prototype.isLessThan=function(e){return this.compareTo(e)<0},hn.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},hn.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=hn,cr=(dn.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},dn),lr=(fn.parse=function(e){return e?new fn(e.split(".")):fn.EMPTY},fn.prototype.isEmpty=function(){return 0===this.identifiers.length},fn.prototype.isNotEmpty=function(){return!this.isEmpty()},fn.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},fn.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=fn.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},fn.compareIdentifiers=function(e,t){return fn.numericIdentifierRegExp.test(e)&&fn.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},fn.EMPTY=new fn([]),fn.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,fn),pr=["MATCH","NOT_MATCH"],fr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","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=(pn.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},pn.IDENTIFIER=new pn("SEGMENT"),pn.PROPERTY=new pn("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),pn.SEGMENT=new pn("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),pn),gr=["ACTIVE","DRAFT","PAUSE"],Er=["WEB","ANDROID","IOS"],wr=["IMMEDIATE","CUSTOM"],br=["MODAL"],Tr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],_r=["VERTICAL","HORIZONTAL"],Ir=["CLICK"],Ar=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Or=(ln.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,i,o=Dr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Cr.fromJson),i=xr.fromJson(e.eventFrequencyCap),new ln(e.id,e.key,r,t,new Sr(n,i),Ur.fromJson(e.targetContext),o)}},ln.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},ln),Nr=(cn.prototype.within=function(e){return!0},cn),Rr=(un.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},un),Sr=function(e,t){this.rules=e,this.frequencyCap=t},Cr=(an.fromJson=function(e){return new an(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},an),xr=(sn.fromJson=function(e){return e?new sn(e.identifiers.map(kr.fromJson),Mr.fromJson(e.duration)):null},sn),kr=(on.fromJson=function(e){return new on(e.identifierType,e.countPerIdentifier)},on),Mr=(nn.fromJson=function(e){if(!e)return null;var t=ut(We,e.durationUnit.timeUnit);return t?new nn(Ze.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},nn),Ur=(rn.fromJson=function(e){return new rn(e.overrides.map(Pr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},rn),Pr=(tn.fromJson=function(e){return new tn(e.identifierType,e.identifiers)},tn),Dr=(en.fromJson=function(e){var t=ct(Er,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=ct(_r,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,Lr.fromJson);if(!a.isNullOrUndefined(n))return new en(e.defaultLang,t,r,n)}}},en),Lr=(Qr.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,Br.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=Br.fromJson2(e.closeButton),!a.isNullOrUndefined(i)))return new Qr(e.lang,t,r,e.text?Vr.fromJson(e.text):void 0,n,i,new Kr(e.background.color))}}}},Qr.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}}},Qr),Fr=(Zr.fromJson=function(e){var t=ut(Tr,e.layoutType),e=ut(br,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Zr(e,t)},Zr),jr=(Wr.fromJson=function(e){var t=ut(_r,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 Wr(t,e.imagePath,r)}},Wr.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}},Wr),Vr=(Xr.fromJson=function(e){return new Xr(Hr.fromJson(e.title),Hr.fromJson(e.body))},Xr.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}}}},Xr),Hr=($r.fromJson=function(e){return new $r(e.text,new zr(e.style.textColor))},$r),zr=function(e){this.color=e},Br=(qr.fromJson=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr(e.text,new Gr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},qr.fromJson2=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr("✕",new Gr(e.style.color,"#FFFFFF","#FFFFFF"),t)},qr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},qr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},qr),Gr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Kr=function(e){this.color=e},Jr=(Yr.fromJson=function(e){var t=ut(Ir,e.behavior);if(!a.isNullOrUndefined(t)){var r=ut(Ar,e.type);if(!a.isNullOrUndefined(r))return new Yr(t,r,null!=(t=e.value)?t:void 0)}},Yr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Yr);function Yr(e,t,r){this.behavior=e,this.type=t,this.value=r}function qr(e,t,r){this.text=e,this.style=t,this.action=r}function $r(e,t){this.text=e,this.style=t}function Xr(e,t){this.title=e,this.body=t}function Wr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function Zr(e,t){this.displayType=e,this.layoutType=t}function Qr(e,t,r,n,i,o,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=i,this.closeButton=o,this.background=s}function en(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function tn(e,t){this.identifierType=e,this.identifiers=t}function rn(e,t){this.overrides=e,this.targets=t}function nn(e,t){this.durationMillis=e,this.count=t}function on(e,t){this.identifierType=e,this.count=t}function sn(e,t){this.identifierCaps=e,this.durationCap=t}function an(e,t){this.eventKey=e,this.targets=t}function un(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function cn(){this.type="IMMEDIATE"}function ln(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function fn(e){this.identifiers=e}function dn(e,t,r){this.major=e,this.minor=t,this.patch=r}function hn(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Tn.fromDto=function(e){var t;return new Tn(e.needRedirect,(t=e.properties.type,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null),e.properties.value)};var yn=Tn,vn=(bn.fromJson=function(e){if(null!==e)return new bn(p.mapNotNullOrUndefined(e.match,function(e){return At.fromJson(e,mr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return At.fromJson(e,mr.PROPERTY)}))},bn),mn=(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.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},wn),gn=(En.start=function(e){return new En(e=void 0===e?En.defaultClock:e)},En.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},En.defaultClock=new Qe,En);function En(e){this._clock=e,this.startTime=this._clock.tick()}function wn(e){this.name=e,this._tags={},this.name=e}function bn(e,t){this.includeTargets=e,this.excludeTargets=t}function Tn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}In.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},In.prototype.tag=function(e,t){return this._tags[e]=t,this},In.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var _n=In;function In(e){this.name=e,this._tags={}}Object.defineProperty(On.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var An=On;function On(e,t){this.valueSupplier=t,this.field=e}function Nn(e,t){return e.name===t.name&&qe.isEquals(e.tags,t.tags)}Dn.prototype.count=function(){return this.counterValue},Dn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Dn.prototype.measure=function(){return[new An("count",this.count.bind(this))]};var Rn,Sn=Dn,Cn=(Pn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Sn(this.id),e},Pn.prototype.count=function(){return this.currentCounter.count()},Pn.prototype.increment=function(e){this.currentCounter.increment(e)},Pn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Pn),xn=(Un.prototype.values=function(){return Array.from(this.data.values())},Un.prototype.keys=function(){return Array.from(this.data.keys())},Un.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},Un.prototype.has=function(e){return void 0!==this.get(e)},Un.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Un.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Un.prototype.forEach=function(e){this.data.forEach(e)},Un.prototype.filter=function(e){for(var t=new Un(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},Un.prototype.entries=function(){return Array.from(this.data.entries())},Un);Object.defineProperty(Mn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Mn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Mn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Mn.prototype.counter=function(e,t){return void 0===t&&(t={}),new _n(e).tags(t).register(this)},Mn.prototype.timer=function(e,t){return void 0===t&&(t={}),new mn(e).tags(t).register(this)},Mn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Mn.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},Mn.prototype.close=function(){};Ke(kn,Rn=y=Mn),kn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),i.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},kn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),i.log.debug("PushMetricRegistry stopped.")},kn.prototype.close=function(){this.stop()};var h=kn;function kn(e,t){var r=Rn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}function Mn(){this.id=De.v4(),this.name="MetricRegistry",this._metrics=new xn(Nn)}function Un(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function Pn(e){this.id=e,this.currentCounter=new Sn(e)}function Dn(e){this.counterValue=0,this.id=e}Jn.prototype.count=function(){return this._count},Jn.prototype.totalTime=function(e){return Ze.nanosToUnit(this._total,e)},Jn.prototype.max=function(e){return Ze.nanosToUnit(this._max,e)},Jn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Jn.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))},Jn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]};var Ln,Fn=Jn,jn=(Kn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Fn(this.id),e},Kn.prototype.count=function(){return this.currentTimer.count()},Kn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Kn.prototype.max=function(e){return this.currentTimer.max(e)},Kn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Kn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Kn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Kn),h=(Ke(Gn,Ln=h),Gn.prototype.createCounter=function(e){return new Cn(e)},Gn.prototype.createTimer=function(e){return new jn(e)},Gn.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)},Gn.prototype.close=function(){Ln.prototype.close.call(this)},Gn),Vn=(Bn.prototype.count=function(){return 0},Bn.prototype.increment=function(e){},Bn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Bn),Hn=(Object.defineProperty(zn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),zn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},zn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},zn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},zn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},zn);function zn(e){this._counters=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Vn(e)}function Bn(e){this.id=e}function Gn(e,t){return Ln.call(this,e,t)||this}function Kn(e){this.id=e,this.currentTimer=new Fn(e)}function Jn(e){this._count=0,this._total=0,this._max=0,this.id=e}Ni.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Ni.prototype.count=function(){return 0},Ni.prototype.totalTime=function(e){return 0},Ni.prototype.max=function(e){return 0},Ni.prototype.mean=function(e){return 0},Ni.prototype.record=function(e,t){};var Yn,qn,$n,Xn=Ni,Wn=(Object.defineProperty(Oi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Oi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Oi.prototype.max=function(e){return this.firstTimer.max(e)},Oi.prototype.mean=function(e){return this.firstTimer.mean(e)},Oi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Oi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Oi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Oi.prototype.count=function(){return this.firstTimer.count()},Oi.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Oi),y=(Ke(Ai,$n=y),Ai.prototype.createCounter=function(e){e=new Hn(e);return this.addRegistry(e),e},Ai.prototype.createTimer=function(e){e=new Wn(e);return this.addRegistry(e),e},Ai.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Ai.prototype.add=function(t){t instanceof Ai||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},Ai.prototype.close=function(){this.registries.forEach(function(e){e.close()})},Ai),Zn=(Ii.counter=function(e,t){return Ii.globalRegistry.counter(e,t)},Ii.timer=function(e,t){return Ii.globalRegistry.timer(e,t)},Ii.addRegistry=function(e){Ii.globalRegistry.add(e),i.log.debug("MetricRegistry added ".concat(e.name))},Ii.globalRegistry=new y,Ii),Qn=(_i.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},_i),ei=(Ti.builder=function(){return new ti},Ti.get=function(e){return Ti.builder().url(e).build()},Ti.prototype.toBuilder=function(){return new ti(this)},Ti),ti=(bi.prototype.url=function(e){return this._url=e,this},bi.prototype.method=function(e){return this._method=e,this},bi.prototype.body=function(e){return this._body=e,this},bi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},bi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},bi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new ei(this._url,this._method,this._body,this._headers.build(),e)},bi),ri=(wi.ok=function(e,t){return wi.of(200,e,t)},wi.of=function(e,t,r){return new wi(e,null!=t?t:null,null!=r?r:ni.empty())},wi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},wi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},wi.prototype.isNotModified=function(){return 304===this.statusCode},wi),ni=(Ei.empty=function(){return new Ei(new Map)},Ei.builder=function(){return new ii(new Map)},Ei.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(Qn.equalsIgnoreCase(i,e))return n}return null},Ei.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ei.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},{})},Ei.prototype.toBuilder=function(){return new ii(this.headers)},Ei.IF_MODIFIED_SINCE="If-Modified-Since",Ei.LAST_MODIFIED="Last-Modified",Ei),ii=(gi.prototype.add=function(e,t){return this.headers.set(e,t),this},gi.prototype.build=function(){return new ni(this.headers)},gi),oi=(Ke(mi,qn=h),mi.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){r.dispatch(e,t)})},mi.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},mi.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return i.log.debug("Failed to flushing metrics: ".concat(e))})},mi.prototype.createRequest=function(e){return ei.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},mi.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},mi.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]}))}})}},mi.prototype.createCounter=function(e){return new Cn(e)},mi.prototype.createTimer=function(e){return new jn(e)},mi.prototype.close=function(){qn.prototype.close.call(this)},mi),si=(vi.experiment=function(e,t,r){t=Zn.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},vi.featureFlag=function(e,t,r){t=Zn.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},vi.remoteConfig=function(e,t,r){t=Zn.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},vi.inAppMessage=function(e,t,r){t=Zn.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},vi),ai=(yi.record=function(e,t,r){e=Zn.timer("api.call",{operation:e,success:yi.success(r)});t.stop(e)},yi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},yi),ui=(hi.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)}},hi.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?ft.of(n,f.INVALID_INPUT):e.remoteConfig(t,i,r,n)},hi),ci=i.log,li=(di.prototype.get=function(e,t){var r,n=gn.start();try{r=this.decide(e,t)}catch(n){ci.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=ft.of(t,f.EXCEPTION)}return si.remoteConfig(n,e,r),r.value},di.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return ui.decide(this.core,e,t,r)},di),pi=(fi.prototype.contains=function(e){return this._properties.has(e)},fi.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},fi.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)},fi.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},fi.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},fi.prototype.build=function(){return this._properties},fi);function fi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function di(e,t,r){this.core=e,this.userManager=t,this.user=r}function hi(){}function yi(){}function vi(){}function mi(e,t,r,n,i){n=qn.call(this,n,i)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}function gi(e){this.headers=e}function Ei(e){this.headers=e}function wi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}function bi(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:ni.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}function Ti(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}function _i(){}function Ii(){}function Ai(){var e=null!==$n&&$n.apply(this,arguments)||this;return e.registries=new xn(function(e,t){return e.id===t.id}),e}function Oi(e){this._timers=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Xn(e)}function Ni(e){this.id=e}(y=Yn=Yn||{}).SET="$set",y.SET_ONCE="$setOnce",y.UNSET="$unset",y.INCREMENT="$increment",y.APPEND="$append",y.APPEND_ONCE="$appendOnce",y.PREPEND="$prepend",y.PREPEND_ONCE="$prependOnce",y.REMOVE="$remove",y.CLEAR_ALL="$clearAll",Eo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t).build()};var Ri,Si,Ci,xi,ki,Mi=Eo,Ui=(go.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t,!0).build()},go),Pi=(mo.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new pi).addProperties(e).remove(t).build()},mo),Di=(vo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},vo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},vo);yo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},yo.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},yo.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},yo.prototype.contains=function(e,t){return e.includes(t)},yo.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Je([e],t,!0)},yo.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Je(Je([],e,!0),[t],!1)};Ke(ho,ki=h=yo),ho.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Li=ho,Fi=(Ke(fo,xi=h),fo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},fo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},fo),ji=(Ke(po,Ci=h),po.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},po),Vi=(Ke(lo,Si=h),lo.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)},lo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},lo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},lo),Hi=(Ke(co,Ri=h),co.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},co.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},co),zi=(uo.prototype.operate=function(e,t){return new Map},uo),Bi=(ao.get=function(e){switch(e){case Yn.SET:return new Mi;case Yn.SET_ONCE:return new Ui;case Yn.UNSET:return new Pi;case Yn.INCREMENT:return new Di;case Yn.APPEND:return new Li;case Yn.APPEND_ONCE:return new Fi;case Yn.PREPEND:return new ji;case Yn.PREPEND_ONCE:return new Vi;case Yn.CLEAR_ALL:return new zi;case Yn.REMOVE:return new Hi}},ao),Gi=(so.prototype.set=function(e,t){return this.add(Yn.SET,e,t)},so.prototype.setOnce=function(e,t){return this.add(Yn.SET_ONCE,e,t)},so.prototype.unset=function(e){return this.add(Yn.UNSET,e,"-")},so.prototype.increment=function(e,t){return this.add(Yn.INCREMENT,e,t)},so.prototype.append=function(e,t){return this.add(Yn.APPEND,e,t)},so.prototype.appendOnce=function(e,t){return this.add(Yn.APPEND_ONCE,e,t)},so.prototype.prepend=function(e,t){return this.add(Yn.PREPEND,e,t)},so.prototype.prependOnce=function(e,t){return this.add(Yn.PREPEND_ONCE,e,t)},so.prototype.remove=function(e,t){return this.add(Yn.REMOVE,e,t)},so.prototype.clearAll=function(){return this.add(Yn.CLEAR_ALL,"clearAll","-")},so.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Ki(new Map(e))},so.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},so.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new pi);e=this.operations.get(e);return null!=e&&e.add(t,r),this},so),Ki=(oo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Bi.get(t).operate(r,e)}),r},oo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),Xe.sanitize(a.fromMap(e))),r))}),i},oo.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},oo),Ji=(io.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)})},io),Yi=i.log,qi=(v.prototype.initialize=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Yi.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Yi.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Yi.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},v.prototype.getSessionId=function(){return this.sessionManager.sessionId},v.prototype.getUser=function(){return this.userManager.currentUser},v.prototype.setUser=function(e){try{var t=pt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(Yi.warn("invalid user"),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},v.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=qe.sanitizeValue(e);if(!t)return Yi.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return Yi.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},v.prototype.setDeviceId=function(e){try{var t=qe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(Yi.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},v.prototype.setUserProperty=function(e,t){e=(new Gi).set(e,t).build();return this.updateUserProperties(e)},v.prototype.setUserProperties=function(e){try{var t=Xe.sanitize(e),r=new Gi;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 Yi.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},v.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return Yi.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},v.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new Gi).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return Yi.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},v.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},v.prototype.variationDetail=function(r,n,e){var i=e||"A",e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Yi.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),ht.of(i,f.EXCEPTION)}}(this);return si.experiment(e,r,t),t},v.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},v.prototype.featureFlagDetail=function(r,n){var e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Yi.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),yt.off(f.EXCEPTION)}}(this);return si.featureFlag(e,r,t),t},v.prototype.track=function(e,t){try{Yi.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Yi.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){Yi.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},v.prototype.remoteConfig=function(e){return new li(this.core,this.userManager,e)},v.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},v.prototype.onInitialized=function(r){var n;return o(this,void 0,void 0,function(){var t;return s(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,Ji.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(),Yi.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},v.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},v.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Yi.debug("UserExplorer opened."),Zn.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Yi.error("UserExplorer is not provided")},v.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Yi.warn("There is no active HackleDevtools.")},v.prototype.close=function(){Yi.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},v),$i=i.log,Xi=(no.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(r){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(r){return $i.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},no),Wi=(ro.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},ro.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")},ro),Zi=(to.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]:""},to.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},to.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},to.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=to.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},to.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},to.prototype.getOptions=function(){return this.options},to.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),to.storage=to.storage?to.storage:new to(e)},to),Qi=(eo.initialize=function(){Zi.getInstance().getItem("_hackle_hid")||_o()},eo);function eo(){}function to(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function ro(){}function no(e,t){this.invocationProcessor=e,this.user=t}function v(e,t,r,n,i){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=i,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}function io(){}function oo(e){this.operations=null!=e?e:new Map}function so(){this.operations=new Map}function ao(){}function uo(){}function co(){return null!==Ri&&Ri.apply(this,arguments)||this}function lo(){return null!==Si&&Si.apply(this,arguments)||this}function po(){return null!==Ci&&Ci.apply(this,arguments)||this}function fo(){return null!==xi&&xi.apply(this,arguments)||this}function ho(){return null!==ki&&ki.apply(this,arguments)||this}function yo(){}function vo(){}function mo(){}function go(){}function Eo(){}function wo(){var e=Zi.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||_o()}function bo(e){Zi.getInstance().setItem("_hackle_id",e)}function To(){Zi.getInstance().removeItem("_hackle_id")}function _o(){var e=De.v4();return Zi.getInstance().setItem("_hackle_hid",e),e}Oo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},Oo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Io=Oo,Ao=i.log;function Oo(e){this.invocator=e}function No(e){return e&&e.Math==Math&&e}function m(e){try{return!!e()}catch(e){return!0}}w.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:wo()}catch(e){return Ao.error("Unexpected exception while get sessionId: ".concat(e)),wo()}},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 Ao.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},w.prototype.setUser=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=pt(n)))return Ao.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set user: ".concat(e))}return[2]})})},w.prototype.setUserId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},w.prototype.setDeviceId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},w.prototype.setUserProperty=function(r,n){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},w.prototype.setUserProperties=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{t=Xe.sanitize(n),r=new Gi,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Ao.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},w.prototype.updateUserProperties=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},w.prototype.resetUser=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Ao.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)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(t){return Ao.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 i={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return ht.of(o.variation,o.reason,new tt(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(t){return Ao.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 Ao.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)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new yt(i.isOn,i.reason,new tt(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))))}catch(t){return Ao.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){Ao.error("Unexpected exception while tracking event: ".concat(e))}},w.prototype.trackPageView=function(e){Ao.info("Web to app integration feature is not support 'trackPageView' method")},w.prototype.remoteConfig=function(e){return new Xi(this.invocationProcessor,this.convertUser(e))},w.prototype.onReady=function(e,t){e()},w.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Ao.error("Unexpected exception while show userExplorer: ".concat(e))}},w.prototype.hideUserExplorer=function(){Ao.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(){Ao.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:wo()}};var Ro=w,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},h=No("object"==typeof globalThis&&globalThis)||No("object"==typeof window&&window)||No("object"==typeof self&&self)||No("object"==typeof y&&y)||function(){return this}()||Function("return this")(),y={},So=!m(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),g=!m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Co=Function.prototype.call,t=g?Co.bind(Co):function(){return Co.apply(Co,arguments)},r={},e={}.propertyIsEnumerable,xo=Object.getOwnPropertyDescriptor,E=xo&&!e.call({1:2},1);function w(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this)}function ko(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Mo(e){return Qo(Zo(e),8,-1)}function Uo(e){if(null==e)throw ns("Can't call method on "+e);return e}function Po(e){return is(os(e))}function Do(e){return"function"==typeof e}function Lo(e){return"object"==typeof e?null!==e:ss(e)}function Fo(e,t){return arguments.length<2?(r=as[e],us(r)?r:void 0):as[e]&&as[e][t];var r}function jo(e){try{return ms(e)}catch(e){return"Object"}}function Vo(e){if(gs(e))return e;throw ws(Es(e)+" is not a function")}function Ho(e,t){return null==(e=e[t])?void 0:bs(e)}function zo(t,r){try{Ns(Os,t,{value:r,configurable:!0,writable:!0})}catch(e){Os[t]=r}return r}function Bo(e){return xs(Cs(e))}function Go(e){return"Symbol("+(void 0===e?"":e)+")_"+Ds(++Us+Ps,36)}function Ko(e){var t;return Fs(zs,e)&&(Vs||"string"==typeof zs[e])||(t="Symbol."+e,Vs&&Fs(Bs,e)?zs[e]=Bs[e]:zs[e]=(Hs&&Gs?Gs:Ks)(t)),zs[e]}function Jo(e){return e=function(e,t){if(!Ys(e)||qs(e))return e;var r=$s(e,Zs);if(r){if(r=Js(r,e,t=void 0===t?"default":t),!Ys(r)||qs(r))return r;throw Ws("Can't convert object to primitive value")}return Xs(e,t=void 0===t?"number":t)}(e,"string"),Qs(e)?e:e+""}function Yo(e){return ta?ea.createElement(e):{}}function qo(e){if(pa(e))return e;throw da(fa(e)+" is not an object")}r.f=E?function(e){e=xo(this,e);return!!e&&e.enumerable}:e;var E=g,$o=(e=Function.prototype).bind,Xo=e.call,Wo=E&&$o.bind(Xo,Xo),Zo=($o=e=E?function(e){return e&&Wo(e)}:function(e){return e&&function(){return Xo.apply(e,arguments)}})({}.toString),Qo=$o("".slice),E=m,es=Mo,ts=Object,rs=e("".split),$o=E(function(){return!ts("z").propertyIsEnumerable(0)})?function(e){return"String"==es(e)?rs(e,""):ts(e)}:ts,ns=TypeError,is=$o,os=Uo,ss=Do,as=h,us=Do,E=e({}.isPrototypeOf),cs=M=Fo("navigator","userAgent")||"",ls=h.process,b=h.Deno,b=(ls=ls&&ls.versions||b&&b.version)&&ls.v8,ps=ls=vs=!(vs=b?0<(T=b.split("."))[0]&&T[0]<4?1:+(T[0]+T[1]):vs)&&cs&&(!(T=cs.match(/Edge\/(\d+)/))||74<=T[1])&&(T=cs.match(/Chrome\/(\d+)/))?+T[1]:vs,b=m,T=(cs=!!Object.getOwnPropertySymbols&&!b(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ps&&ps<41}))&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fs=Fo,ds=Do,hs=E,ys=Object,vs=T?function(e){return"symbol"==typeof e}:function(e){var t=fs("Symbol");return ds(t)&&hs(t.prototype,ys(e))},ms=String,gs=Do,Es=jo,ws=TypeError,bs=Vo,Ts=t,_s=Do,Is=Lo,As=TypeError,b={exports:{}},Os=h,Ns=Object.defineProperty,Rs=zo,Ss=Rs=h["__core-js_shared__"]||Rs("__core-js_shared__",{}),Cs=((b.exports=function(e,t){return Ss[e]||(Ss[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"}),Uo),xs=Object,ks=Bo,Ms=e({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return Ms(ks(e),t)},I=e,Us=0,Ps=Math.random(),Ds=I(1..toString),I=h,Ls=b.exports,Fs=_,js=Go,Vs=cs,Hs=T,zs=Ls("wks"),Bs=I.Symbol,Gs=Bs&&Bs.for,Ks=Hs?Bs:Bs&&Bs.withoutSetter||js,Js=t,Ys=Lo,qs=vs,$s=Ho,Xs=function(e,t){var r,n;if("string"===t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;if(_s(r=e.valueOf)&&!Is(n=Ts(r,e)))return n;if("string"!==t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;throw As("Can't convert object to primitive value")},Ws=TypeError,Zs=Ko("toPrimitive"),Qs=vs,cs=Lo,ea=h.document,ta=cs(ea)&&cs(ea.createElement),ra=Yo,T=!So&&!m(function(){return 7!=Object.defineProperty(ra("div"),"a",{get:function(){return 7}}).a}),na=t,ia=r,oa=ko,sa=Po,aa=Jo,ua=_,ca=T,la=Object.getOwnPropertyDescriptor,Ls=(y.f=So?la:function(e,t){if(e=sa(e),t=aa(t),ca)try{return la(e,t)}catch(e){}if(ua(e,t))return oa(!na(ia.f,e,t),e[t])},{}),I=So&&m(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),pa=Lo,fa=String,da=TypeError,ha=T,ya=qo,va=Jo,ma=TypeError,ga=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,wa=(Ls.f=So?I?function(e,t,r){var n;return ya(e),t=va(t),ya(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=Ea(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}),ga(e,t,r)}:ga:function(e,t,r){if(ya(e),t=va(t),ya(r),ha)try{return ga(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ma("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ls),ba=ko,js=So?function(e,t,r){return wa.f(e,t,ba(1,r))}:function(e,t,r){return e[t]=r,e},vs={exports:{}},cs=So,r=_,T=Function.prototype,Ta=cs&&Object.getOwnPropertyDescriptor,r={EXISTS:r=r(T,"name"),PROPER:r&&"something"===function(){}.name,CONFIGURABLE:r&&(!cs||Ta(T,"name").configurable)},cs=Do,Ta=Rs,_a=e(Function.toString);function Ia(e){return za[e]||(za[e]=Ha(e))}function Aa(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(ou(r)&&au(r,o,n),n.global)i?e[t]=r:uu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:su.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Oa(e){return(e=+e)!=e||0==e?0:pu(e)}function Na(e,t){return(e=fu(e))<0?du(e+t,0):hu(e,t)}function A(e){return 0<(e=e.length)?vu(yu(e),9007199254740991):0}function Ra(a){return function(e,t,r){var n,i=mu(e),o=Eu(i),s=gu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function Sa(e,t){var r,n=bu(e),i=0,o=[];for(r in n)!wu(_u,r)&&wu(n,r)&&Iu(o,r);for(;t.length>i;)!wu(n,r=t[i++])||~Tu(o,r)||Iu(o,r);return o}function Ca(e,t,r){for(var n=ku(t),i=Uu.f,o=Mu.f,s=0;s<n.length;s++){var a=n[s];xu(e,a)||r&&xu(r,a)||i(e,a,o(t,a))}}function xa(e,t){return(e=ju[Fu(e)])==Hu||e!=Vu&&(Du(t)?Pu(t):!!t)}function O(e,t){var r,n,i,o,s=e.target,a=e.global,u=e.stat;if(r=a?zu:u?zu[s]||Ju(s,{}):(zu[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(o=Bu(r,n))&&o.value:r[n],!qu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yu(i,o)}(e.sham||o&&o.sham)&&Gu(i,"sham",!0),Ku(r,n,i,e)}}cs(Ta.inspectSource)||(Ta.inspectSource=function(e){return _a(e)});var ka,Ma,Ua,Pa,Da,La,Fa,ja,T=Ta.inspectSource,cs=Do,Ta=T,Va=h.WeakMap,cs=cs(Va)&&/native code/.test(Ta(Va)),Ta=b.exports,Ha=Go,za=Ta("keys"),b=e,Ba=Lo,Ga=js,Ka=_,Ta=Rs,N=Ia,Ja=Va={},Ya=h.TypeError,qa=h.WeakMap,cs=(Fa=cs||Ta.state?(ka=Ta.state||(Ta.state=new qa),Ma=b(ka.get),Ua=b(ka.has),Pa=b(ka.set),Da=function(e,t){if(Ua(ka,e))throw new Ya("Object already initialized");return t.facade=e,Pa(ka,e,t),t},La=function(e){return Ma(ka,e)||{}},function(e){return Ua(ka,e)}):(Ja[ja=N("state")]=!0,Da=function(e,t){if(Ka(e,ja))throw new Ya("Object already initialized");return t.facade=e,Ga(e,ja,t),t},La=function(e){return Ka(e,ja)?e[ja]:{}},function(e){return Ka(e,ja)}),{set:Da,get:La,has:Fa,enforce:function(e){return Fa(e)?La(e):Da(e,{})},getterFor:function(t){return function(e){if(Ba(e)&&(e=La(e)).type===t)return e;throw Ya("Incompatible receiver, "+t+" required")}}}),Ta=m,$a=Do,Xa=_,Wa=So,Za=r.CONFIGURABLE,Qa=T,eu=cs.enforce,tu=cs.get,ru=Object.defineProperty,nu=Wa&&!Ta(function(){return 8!==ru(function(){},"length",{value:8}).length}),iu=String(String).split("String"),qa=vs.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),(!Xa(e,"name")||Za&&e.name!==t)&&(Wa?ru(e,"name",{value:t,configurable:!0}):e.name=t),nu&&r&&Xa(r,"arity")&&e.length!==r.arity&&ru(e,"length",{value:r.arity});try{r&&Xa(r,"constructor")&&r.constructor?Wa&&ru(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=eu(e);return Xa(r,"source")||(r.source=iu.join("string"==typeof t?t:"")),e},ou=(Function.prototype.toString=qa(function(){return $a(this)&&tu(this).source||Qa(this)},"toString"),Do),su=Ls,au=vs.exports,uu=zo,b={},cu=Math.ceil,lu=Math.floor,pu=Math.trunc||function(e){e=+e;return(0<e?lu:cu)(e)},fu=Oa,du=Math.max,hu=Math.min,yu=Oa,vu=Math.min,mu=Po,gu=Na,Eu=A,Ja={includes:Ra(!0),indexOf:Ra(!1)},wu=_,bu=Po,Tu=Ja.indexOf,_u=Va,Iu=e([].push),Au=Sa,Ou=(N=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]).concat("length","prototype");b.f=Object.getOwnPropertyNames||function(e){return Au(e,Ou)};(Ta={}).f=Object.getOwnPropertySymbols;var qa=Fo,Nu=b,Ru=Ta,Su=qo,Cu=e([].concat),Ta=qa("Reflect","ownKeys")||function(e){var t=Nu.f(Su(e)),r=Ru.f;return r?Cu(t,r(e)):t},xu=_,ku=Ta,Mu=y,Uu=Ls,Pu=m,Du=Do,Lu=/#|\.prototype\./,Fu=xa.normalize=function(e){return String(e).replace(Lu,".").toLowerCase()},ju=xa.data={},Vu=xa.NATIVE="N",Hu=xa.POLYFILL="P",qa=xa,zu=h,Bu=y.f,Gu=js,Ku=Aa,Ju=zo,Yu=Ca,qu=qa,Ta=!m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$u=_,Xu=Do,Wu=Bo,Zu=Ia("IE_PROTO"),Qu=Object,ec=Qu.prototype,Ta=Ta?Qu.getPrototypeOf:function(e){e=Wu(e);if($u(e,Zu))return e[Zu];var t=e.constructor;return Xu(t)&&e instanceof t?t.prototype:e instanceof Qu?ec:null},tc=Do,rc=String,nc=TypeError,ic=e,oc=qo,sc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=ic(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return oc(e),function(e){if("object"==typeof e||tc(e))return;throw nc("Can't set "+rc(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),ac={},uc=Sa,cc=N,R=Object.keys||function(e){return uc(e,cc)},lc=Ls,pc=qo,fc=Po,dc=R;function hc(){}function yc(e){e.write(kc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function vc(e,t){return Vc(e),void 0===t?e:Hc?zc(e,t):function(){return e.apply(t,arguments)}}function mc(e){return void 0!==e&&(Bc.Array===e||Kc[Gc]===e)}function gc(e){if(null!=e)return Zc(e,el)||Zc(e,"@@iterator")||Qc[Wc(e)]}function Ec(e,t){if(t=arguments.length<2?ol(e):t,rl(t))return nl(tl(t,e));throw sl(il(e)+" is not iterable")}function wc(e,t,r){var n,i;ul(e);try{if(!(n=cl(e,"return"))){if("throw"===t)throw r;return r}n=al(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return ul(n),r}function bc(e,t){this.stopped=e,this.result=t}function Tc(e,t,r){function n(e){return o&&El(o,"normal",e),new bc(!0,e)}function i(e){return f?(fl(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var o,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=ll(t,p);if(d)o=e.iterator;else if(h)o=e;else{if(!(r=gl(e)))throw wl(dl(e)+" is not iterable");if(hl(r)){for(s=0,a=yl(e);s<a;s++)if((u=i(e[s]))&&vl(bl,u))return u;return new bc(!1)}o=ml(e,r)}for(c=(d?e:o).next;!(l=pl(c,o)).done;){try{u=i(l.value)}catch(e){El(o,"throw",e)}if("object"==typeof u&&u&&vl(bl,u))return u}return new bc(!1)}function _c(e){if("Symbol"===Tl(e))throw TypeError("Cannot convert a Symbol value to a string");return _l(e)}function Ic(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Nl(Fl,this);return Sl?r=Sl(new Dl,i?Rl(this):Fl):(r=i?this:xl(Fl),kl(r,Pl,"Error")),void 0!==t&&kl(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Il(e)}(t)),Ul&&kl(r,"stack",function(e,t){if(Lc&&"string"==typeof e&&!Uc.prepareStackTrace)for(;t--;)e=Pc(e,Dc,"");return e}(r.stack,1)),i=r,Fc(t=n)&&"cause"in t&&jc(i,"cause",t.cause),Ml(e,Ll,{that:n=[]}),kl(r,"errors",n),r}ac.f=So&&!I?Object.defineProperties:function(e,t){pc(e);for(var r,n=fc(t),i=dc(t),o=i.length,s=0;s<o;)lc.f(e,r=i[s++],n[r]);return e};var Ac,R=Fo("document","documentElement"),Oc=qo,Nc=ac,Rc=N,I=Va,Sc=R,Cc=Yo,xc=Ia("IE_PROTO"),kc=function(e){return"<script>"+e+"<\/script>"},Mc=function(){try{Ac=new ActiveXObject("htmlfile")}catch(e){}var e,t;Mc="undefined"==typeof document||document.domain&&Ac?yc(Ac):((t=Cc("iframe")).style.display="none",Sc.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(kc("document.F=Object")),e.close(),e.F);for(var r=Rc.length;r--;)delete Mc.prototype[Rc[r]];return Mc()},ac=(I[xc]=!0,Object.create||function(e,t){var r;return null!==e?(hc.prototype=Oc(e),r=new hc,hc.prototype=null,r[xc]=e):r=Mc(),void 0===t?r:Nc.f(r,t)}),Uc=Error,Pc=e("".replace),N=String(Uc("zxcasd").stack),Dc=/\n\s*at [^:]*:[^\n]*/,Lc=Dc.test(N),Fc=Lo,jc=js,Vc=Vo,Hc=g,zc=e(e.bind),Bc=I={},Gc=Ko("iterator"),Kc=Array.prototype;(N={})[Ko("toStringTag")]="z";var S=N="[object z]"===String(N),Jc=Do,Yc=Mo,qc=Ko("toStringTag"),$c=Object,Xc="Arguments"==Yc(function(){return arguments}()),Wc=S=S?Yc: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=$c(e),qc))?t:Xc?Yc(e):"Object"==(t=Yc(e))&&Jc(e.callee)?"Arguments":t},Zc=Ho,Qc=I,el=Ko("iterator"),tl=t,rl=Vo,nl=qo,il=jo,ol=gc,sl=TypeError,al=t,ul=qo,cl=Ho,ll=vc,pl=t,fl=qo,dl=jo,hl=mc,yl=A,vl=E,ml=Ec,gl=gc,El=wc,wl=TypeError,bl=bc.prototype,Tl=S,_l=String,Il=_c,Al=ko,C=!m(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Al(1,7)),7!==e.stack)}),Ol=O,Nl=E,Rl=Ta,Sl=sc,Cl=Ca,xl=ac,kl=js,x=ko,Ml=Tc,Ul=C,Pl=Ko("toStringTag"),Dl=Error,Ll=[].push,Fl=(Sl?Sl(Ic,Dl):Cl(Ic,Dl,{name:!0}),Ic.prototype=xl(Dl.prototype,{constructor:x(1,Ic),message:x(1,""),name:x(1,"AggregateError")})),C=(Ol({global:!0,constructor:!0,arity:2},{AggregateError:Ic}),Ko),Cl=ac,x=Ls.f,jl=C("unscopables"),Vl=Array.prototype;function Hl(e){Vl[jl][e]=!0}null==Vl[jl]&&x(Vl,jl,{configurable:!0,value:Cl(null)});var zl,Ol=m,C=Do,x=Ta,Cl=Aa,Bl=Ko("iterator"),k=!1;function Gl(e,t,r){(e=e&&!r?e.prototype:e)&&!$l(e,Xl)&&ql(e,Xl,{configurable:!0,value:t})}function Kl(){return this}function Jl(e,t,r,n,i,o,s){var a=r,u=t,c=void 0;function l(e){if(e===i&&v)return v;if(!yp&&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=Zl(Wl,{next:Ql(+!c,n)}),ep(a,u,!1),tp[u]=rp;var p,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[vp]||h["@@iterator"]||i&&h[i],v=!yp&&y||l(i);if((n="Array"==t&&h.entries||y)&&(a=sp(n.call(new e)))!==Object.prototype&&a.next&&(sp(a)!==hp&&(ap?ap(a,hp):op(a[vp])||lp(a,vp,Kl)),up(a,c,!0)),fp&&"values"==i&&y&&"values"!==y.name&&(dp?cp(h,"name","values"):(d=!0,v=function(){return ip(y,this)})),i)if(p={values:l("values"),keys:o?v:l("keys"),entries:l("entries")},s)for(f in p)!yp&&!d&&f in h||lp(h,f,p[f]);else np({target:t,proto:!0,forced:yp||d},p);return h[vp]!==v&&lp(h,vp,v,{name:i}),pp[t]=v,p}[].keys&&("next"in(Yl=[].keys())?(x=x(x(Yl)))!==Object.prototype&&(zl=x):k=!0),C((zl=null==zl||Ol(function(){var e={};return zl[Bl].call(e)!==e})?{}:zl)[Bl])||Cl(zl,Bl,function(){return this});var Yl={IteratorPrototype:zl,BUGGY_SAFARI_ITERATORS:k},ql=Ls.f,$l=_,Xl=Ko("toStringTag"),Wl=Yl.IteratorPrototype,Zl=ac,Ql=ko,ep=Gl,tp=I,rp=function(){return this},np=O,ip=t,op=Do,sp=Ta,ap=sc,up=Gl,cp=js,lp=Aa,pp=I,fp=r.PROPER,dp=r.CONFIGURABLE,hp=Yl.IteratorPrototype,yp=Yl.BUGGY_SAFARI_ITERATORS,vp=Ko("iterator"),mp=Po,x=Hl,C=I,Ol=cs,Cl=Ls.f,k=Jl,r=So,gp=Ol.set,Ep=Ol.getterFor("Array Iterator"),Yl=k(Array,"Array",function(e,t){gp(this,{type:"Array Iterator",target:mp(e),index:0,kind:t})},function(){var e=Ep(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"),I=C.Arguments=C.Array;if(x("keys"),x("values"),x("entries"),r&&"values"!==I.name)try{Cl(I,"name",{value:"values"})}catch(De){}function wp(e){var e=Op(e),t=Np.f;Rp&&e&&!e[Sp]&&t(e,Sp,{configurable:!0,get:function(){return this}})}function bp(e,t){if(Cp(t,e))return e;throw xp("Incorrect invocation")}function Tp(){}function _p(e){if(!kp(e))return!1;try{return Dp(Tp,Pp,e),!0}catch(e){return!1}}function Ip(e){if(!kp(e))return!1;switch(Mp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return jp||!!Fp(Lp,Up(e))}catch(e){return!0}}var Ap=S,Ol=(N||Aa(Object.prototype,"toString",N?{}.toString:function(){return"[object "+Ap(this)+"]"},{unsafe:!0}),"process"==Mo(h.process)),Op=Fo,Np=Ls,Rp=So,Sp=Ko("species"),Cp=E,xp=TypeError,k=e,C=m,kp=Do,Mp=S,Up=T,Pp=[],Dp=Fo("Reflect","construct"),Lp=/^\s*(?:class|function)\b/,Fp=k(Lp.exec),jp=!Lp.exec(Tp);function Vp(e,t){var r,e=Jp(e).constructor;if(void 0===e||null==(r=Jp(e)[Yp]))return t;if(Bp(e=r))return e;throw Kp(Gp(e)+" is not a constructor")}Ip.sham=!0;var Hp,zp,Bp=x=!Dp||C(function(){var e;return _p(_p.call)||!_p(Object)||!_p(function(){e=!0})||e})?Ip:_p,Gp=jo,Kp=TypeError,Jp=qo,Yp=Ko("species"),qp=(r=Function.prototype).apply,$p=r.call,Cl="object"==typeof Reflect&&Reflect.apply||(g?$p.bind(qp):function(){return $p.apply(qp,arguments)}),I=e([].slice),Xp=TypeError,N=/(?:ipad|iphone|ipod).*applewebkit/i.test(M),Wp=h,Zp=Cl,E=vc,Qp=Do,ef=_,S=m,tf=R,rf=I,nf=Yo,k=N,C=Ol,r=Wp.setImmediate,g=Wp.clearImmediate,of=Wp.process,sf=Wp.Dispatch,af=Wp.Function,R=Wp.MessageChannel,uf=Wp.String,cf=0,lf={};try{Hp=Wp.location}catch(De){}function pf(e){return function(){hf(e)}}function ff(e){hf(e.data)}function df(e){Wp.postMessage(uf(e),Hp.protocol+"//"+Hp.host)}var hf=function(e){var t;ef(lf,e)&&(t=lf[e],delete lf[e],t())};function yf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function vf(){this.head=null,this.tail=null}function mf(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=Ff(r),this.reject=Ff(n)}r&&g||(r=function(e){var t=arguments.length,r=1;if(t<r)throw Xp("Not enough arguments");var n=Qp(e)?e:af(e),i=rf(arguments,1);return lf[++cf]=function(){Zp(n,void 0,i)},zp(cf),cf},g=function(e){delete lf[e]},C?zp=function(e){of.nextTick(pf(e))}:sf&&sf.now?zp=function(e){sf.now(pf(e))}:R&&!k?(k=(C=new R).port2,C.port1.onmessage=ff,zp=E(k.postMessage,k)):Wp.addEventListener&&Qp(Wp.postMessage)&&!Wp.importScripts&&Hp&&"file:"!==Hp.protocol&&!S(df)?(zp=df,Wp.addEventListener("message",ff,!1)):zp="onreadystatechange"in nf("script")?function(e){tf.appendChild(nf("script")).onreadystatechange=function(){tf.removeChild(this),hf(e)}}:function(e){setTimeout(pf(e),0)});var gf,Ef,wf,bf,Tf,_f,If,R={set:r,clear:g},C=h,E=/ipad|iphone|ipod/i.test(M)&&void 0!==C.Pebble,k=/web0s(?!.*chrome)/i.test(M),S=h,r=vc,g=y.f,Af=R.set,C=N,y=E,N=k,Of=Ol,E=S.MutationObserver||S.WebKitMutationObserver,k=S.document,Nf=S.process,Rf=S.Promise,N=((g=(g=g(S,"queueMicrotask"))&&g.value)||(gf=function(){var e,t;for(Of&&(e=Nf.domain)&&e.exit();Ef;){t=Ef.fn,Ef=Ef.next;try{t()}catch(e){throw Ef?bf():wf=void 0,e}}wf=void 0,e&&e.enter()},bf=C||Of||N||!E||!k?!y&&Rf&&Rf.resolve?((C=Rf.resolve(void 0)).constructor=Rf,If=r(C.then,C),function(){If(gf)}):Of?function(){Nf.nextTick(gf)}:(Af=r(Af,S),function(){Af(gf)}):(Tf=!0,_f=k.createTextNode(""),new E(gf).observe(_f,{characterData:!0}),function(){_f.data=Tf=!Tf})),g||function(e){e={fn:e,next:void 0};wf&&(wf.next=e),Ef||(Ef=e,bf()),wf=e}),Sf=h,y=(vf.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}},vf),Rf=h.Promise,r=!(C="object"==typeof Deno&&Deno&&"object"==typeof Deno.version)&&!Ol&&"object"==typeof window&&"object"==typeof document,S=h,Cf=Rf,k=Do,E=qa,xf=T,g=Ko,kf=r,Mf=C,Uf=ls,Pf=(Cf&&Cf.prototype,g("species")),Df=!1,Lf=k(S.PromiseRejectionEvent),T={CONSTRUCTOR:E("Promise",function(){var e=xf(Cf),t=e!==String(Cf);if(!t&&66===Uf)return!0;if(!Uf||Uf<51||!/native code/.test(e)){var e=new Cf(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Pf]=r,!(Df=e.then(function(){})instanceof r))return!0}return!t&&(kf||Mf)&&!Lf}),REJECTION_EVENT:Lf,SUBCLASSING:Df},Ff=Vo;function jf(e,t){var r,n,i,o,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&&(o=t,Kf(Wf,Gf,function(){var e=o.facade;Bf?ld.emit("rejectionHandled",e):vd("rejectionhandled",e,o.value)})),t.rejection=1),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(ud("Promise-chain cycle")):(n=hd(r))?Kf(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Vf,Hf,zf,C=O,Bf=Ol,Gf=h,Kf=t,g=Aa,k=sc,S=Gl,E=wp,Jf=Vo,Yf=Do,qf=Lo,$f=bp,Xf=Vp,Wf=R.set,Zf=N,Qf=yf,ed=y,R=cs,N=Rf,y=r={f:function(e){return new mf(e)}},td=T.CONSTRUCTOR,rd=T.REJECTION_EVENT,nd=T.SUBCLASSING,id=R.getterFor("Promise"),od=R.set,R=N&&N.prototype,sd=N,ad=R,ud=Gf.TypeError,cd=Gf.document,ld=Gf.process,pd=y.f,fd=pd,dd=!!(cd&&cd.createEvent&&Gf.dispatchEvent),hd=function(e){var t;return!(!qf(e)||!Yf(t=e.then))&&t},yd=function(r,i){r.notified||(r.notified=!0,Zf(function(){for(var e,n,t=r.reactions;e=t.get();)jf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Kf(Wf,Gf,function(){var e,t=n.facade,r=n.value;if(md(n)&&(e=Qf(function(){Bf?ld.emit("unhandledRejection",r,t):vd("unhandledrejection",t,r)}),n.rejection=Bf||md(n)?2:1,e.error))throw e.value}))}))},vd=function(e,t,r){var n;dd?((n=cd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Gf.dispatchEvent(n)):n={promise:t,reason:r},!rd&&(t=Gf["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Sf.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},md=function(e){return 1!==e.rejection&&!e.parent},gd=function(t,r,n){return function(e){t(r,e,n)}},Ed=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,yd(e,!0))},wd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw ud("Promise can't be resolved itself");var n=hd(e);n?Zf(function(){var t={done:!1};try{Kf(n,e,gd(wd,t,r),gd(Ed,t,r))}catch(e){Ed(t,e,r)}}):(r.value=e,r.state=1,yd(r,!1))}catch(e){Ed({done:!1},e,r)}}};if(td&&(ad=(sd=function(e){$f(this,ad),Jf(e),Kf(Vf,this);var t=id(this);try{e(gd(wd,t),gd(Ed,t))}catch(e){Ed(t,e)}}).prototype,(Vf=function(e){od(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ed,rejection:!1,state:0,value:void 0})}).prototype=g(ad,"then",function(e,t){var r=id(this),n=pd(Xf(this,sd));return r.parent=!0,n.ok=!Yf(e)||e,n.fail=Yf(t)&&t,n.domain=Bf?ld.domain:void 0,0==r.state?r.reactions.add(n):Zf(function(){jf(n,r)}),n.promise}),Hf=function(){var e=new Vf,t=id(e);this.promise=e,this.resolve=gd(wd,t),this.reject=gd(Ed,t)},y.f=pd=function(e){return e===sd||void 0===e?new Hf:fd(e)},Yf(N)&&R!==Object.prototype)){zf=R.then,nd||g(R,"then",function(e,t){var r=this;return new sd(function(e,t){Kf(zf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete R.constructor}catch(De){}k&&k(R,ad)}C({global:!0,constructor:!0,wrap:!0,forced:td},{Promise:sd}),S(sd,"Promise",!1),E("Promise");var bd=Ko("iterator"),Td=!1;try{var _d=0,Id={next:function(){return{done:!!_d++}},return:function(){Td=!0}};Id[bd]=function(){return this},Array.from(Id,function(){throw 2})}catch(De){}function Ad(e,t){if(!t&&!Td)return!1;var r=!1;try{var n={};n[bd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function Od(e,t){return Bd(e),Gd(t)&&t.constructor===e?t:((0,(e=Kd.f(e)).resolve)(t),e.promise)}function Nd(i){return function(e,t){var r,e=lh(ph(e)),t=ch(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=dh(e,t))<55296||56319<r||t+1===n||(n=dh(e,t+1))<56320||57343<n?i?fh(e,t):r:i?hh(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Rd(e,t){if(e){if(e[_h]!==Ah)try{Th(e,_h,Ah)}catch(t){e[_h]=Ah}if(e[Ih]||Th(e,Ih,t),wh[t])for(var r in bh)if(e[r]!==bh[r])try{Th(e,r,bh[r])}catch(t){e[r]=bh[r]}}}var Sd,Cd=Rf,y=T.CONSTRUCTOR||!Ad(function(e){Cd.all(e).then(void 0,function(){})}),xd=t,kd=Vo,Md=r,Ud=yf,Pd=Tc,N=(O({target:"Promise",stat:!0,forced:y},{all:function(e){var a=this,t=Md.f(a),u=t.resolve,c=t.reject,r=Ud(function(){var n=kd(a.resolve),i=[],o=0,s=1;Pd(e,function(e){var t=o++,r=!1;s++,xd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),O),g=Fo,k=Do,R=Aa,C=(nd=Rf)&&nd.prototype,Dd=(N({target:"Promise",proto:!0,forced:T.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),k(nd)&&(td=g("Promise").prototype.catch,C.catch!==td&&R(C,"catch",td,{unsafe:!0})),t),Ld=Vo,Fd=r,jd=yf,Vd=Tc,Hd=(O({target:"Promise",stat:!0,forced:y},{race:function(e){var r=this,n=Fd.f(r),i=n.reject,t=jd(function(){var t=Ld(r.resolve);Vd(e,function(e){Dd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}}),t),zd=r,Bd=(O({target:"Promise",stat:!0,forced:T.CONSTRUCTOR},{reject:function(e){var t=zd.f(this);return Hd(t.reject,void 0,e),t.promise}}),qo),Gd=Lo,Kd=r,S=O,E=T.CONSTRUCTOR,Jd=Od,Yd=(Fo("Promise"),S({target:"Promise",stat:!0,forced:E},{resolve:function(e){return Jd(this,e)}}),t),qd=Vo,$d=r,Xd=yf,Wd=Tc,Zd=(O({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=$d.f(a),u=t.resolve,r=t.reject,n=Xd(function(){var n=qd(a.resolve),i=[],o=0,s=1;Wd(e,function(e){var t=o++,r=!1;s++,Yd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}}),t),Qd=Vo,eh=Fo,th=r,rh=yf,nh=Tc,Id=(O({target:"Promise",stat:!0},{any:function(e){var u=this,c=eh("AggregateError"),t=th.f(u),l=t.resolve,p=t.reject,r=rh(function(){var n=Qd(u.resolve),i=[],o=0,s=1,a=!1;nh(e,function(e){var t=o++,r=!1;s++,Zd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,"No one promise resolved")))})}),--s||p(new c(i,"No one promise resolved"))});return r.error&&p(r.value),t.promise}}),O),k=m,ih=Fo,oh=Do,sh=Vp,ah=Od,nd=Aa,uh=(N=Rf)&&N.prototype;Id({target:"Promise",proto:!0,real:!0,forced:!!N&&k(function(){uh.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=sh(this,ih("Promise")),e=oh(t);return this.then(e?function(e){return ah(r,t()).then(function(){return e})}:t,e?function(e){return ah(r,t()).then(function(){throw e})}:t)}}),oh(N)&&(g=ih("Promise").prototype.finally,uh.finally!==g&&nd(uh,"finally",g,{unsafe:!0}));var ch=Oa,lh=_c,ph=Uo,fh=(R=e)("".charAt),dh=R("".charCodeAt),hh=R("".slice),yh=(Nd(!1),Nd(!0)),vh=_c,td=Jl,mh=(C=cs).set,gh=C.getterFor("String Iterator");td(String,"String",function(e){mh(this,{type:"String Iterator",string:vh(e),index:0})},function(){var e=gh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=yh(t,r),e.index+=t.length,{value:t,done:!1})});(y=h).Promise;var T=Yo("span").classList,E=(S=T&&T.constructor&&T.constructor.prototype)===Object.prototype?void 0:S,Eh=h,wh={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},Rf=E,bh=Yl,Th=js,_h=(Id=Ko)("iterator"),Ih=Id("toStringTag"),Ah=bh.values;for(Sd in wh)Rd(Eh[Sd]&&Eh[Sd].prototype,Sd);function Oh(e,t,r){(t=Wh(t))in e?Zh.f(e,t,Qh(0,r)):e[t]=r}function Nh(e){if(9007199254740991<e)throw my("Maximum allowed index exceeded");return e}function Rh(e,t){return gy(e=e)&&(r=e.constructor,(Ey(r)&&(r===Ty||gy(r.prototype))||wy(r)&&null===(r=r[by]))&&(r=void 0)),new(void 0===r?Ty:r)(0===t?0:t);var r}function Sh(t){return 51<=Iy||!_y(function(){var e=[];return(e.constructor={})[Ay]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Ch(e,t){if(!delete e[t])throw Py("Cannot delete property "+Uy(t)+" of "+Uy(e))}function xh(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 i,o,s=By(e),a=zy(s),u=Hy(t,r),c=Gy(a),l=0,t=n||Ky,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(d)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:Jy(p,i)}else switch(f){case 4:return!1;case 7:Jy(p,i)}return m?-1:y||v?v:p}}function kh(e,t){var r=[][e];return!!r&&Yy(function(){r.call(null,t||function(){return 1},1)})}function Mh(u){var c=1==u;return function(e,t,r){for(var n,i=ov(e),o=iv(i),s=nv(t,r),a=sv(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function Uh(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&fv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&cv(u)?(c=lv(u),l=Uh(e,t,u,c,l,o-1)-1):(pv(l+1),e[l]=u),l++),p++;return l}function Ph(c){return function(e,t,r,n){Hv(t);var i=zv(e),o=Bv(i),s=Gv(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw Kv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function Dh(e,t,r){for(var n=cm(e),i=um(t,n),o=um(void 0===r?n:r,n),s=pm(fm(o-i,0)),a=0;i<o;i++,a++)lm(s,a,e[i]);return s.length=a,s}function Lh(e,t){var r=e.length,n=hm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Lh(dm(e,0,n),t),f=Lh(dm(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 Fh(e){rg(e,ug,{value:{objectID:"O"+cg++,weakData:{}}})}function jh(e,t,r){for(var n in t)Eg(e,n,t[n],r);return e}Rd(Rf,"DOMTokenList");var Vh,Hh,zh,Bh,Gh,Kh,Jh,Yh=r,qh=yf,$h=(O({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Yh.f(this),e=qh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),qo),Xh=wc,Wh=Jo,Zh=Ls,Qh=ko,ey=vc,ty=t,ry=Bo,ny=mc,iy=x,oy=A,sy=Oh,ay=Ec,uy=gc,cy=Array,ly=(O({target:"Array",stat:!0,forced:!Ad(function(e){Array.from(e)})},{from:function(e){var t=ry(e),e=iy(this),r=arguments.length,n=1<r?arguments[1]:void 0,i=void 0!==n;i&&(n=ey(n,2<r?arguments[2]:void 0));var o,s,a,u,c,l,r=uy(t),p=0;if(!r||this===cy&&ny(r))for(o=oy(t),s=e?new this(o):cy(o);p<o;p++)l=i?n(t[p],p):t[p],sy(s,p,l);else for(c=(u=ay(t,r)).next,s=e?new this:[];!(a=ty(c,u)).done;p++)l=i?function(e,t,r,n){try{return n?t($h(r)[0],r[1]):t(r)}catch(t){Xh(e,"throw",t)}}(u,n,[a.value,p],!0):a.value,sy(s,p,l);return s.length=p,s}}),Mo),k=Array.isArray||function(e){return"Array"==ly(e)},py=(O({target:"Array",stat:!0},{isArray:k}),x),fy=Oh,dy=Array,hy=(O({target:"Array",stat:!0,forced:m(function(){function e(){}return!(dy.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(py(this)?this:dy)(t);e<t;)fy(r,e,arguments[e++]);return r.length=t,r}}),Bo),yy=A,vy=Oa,N=Hl,my=(O({target:"Array",proto:!0},{at:function(e){var t=hy(this),r=yy(t),e=vy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),N("at"),TypeError),gy=k,Ey=x,wy=Lo,by=Ko("species"),Ty=Array,_y=m,Iy=ls,Ay=Ko("species"),nd=O,g=m,Oy=k,Ny=Lo,Ry=Bo,Sy=A,Cy=Nh,xy=Oh,ky=Rh,R=Sh,C=ls,My=Ko("isConcatSpreadable"),td=51<=C||!g(function(){var e=[];return e[My]=!1,e.concat()[0]!==e}),T=R("concat"),Uy=(nd({target:"Array",proto:!0,arity:1,forced:!td||!T},{concat:function(e){for(var t,r,n,i=Ry(this),o=ky(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Ny(e))return!1;var t=e[My];return void 0!==t?!!t:Oy(e)}(n=-1===a?i:arguments[a]))for(r=Sy(n),Cy(s+r),t=0;t<r;t++,s++)t in n&&xy(o,s,n[t]);else Cy(s+1),xy(o,s++,n);return o.length=s,o}}),jo),Py=TypeError,Dy=Bo,Ly=Na,Fy=A,jy=Ch,Vy=Math.min,S=Hl,Hy=(O({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Dy(this),n=Fy(r),i=Ly(e,n),o=Ly(t,n),e=2<arguments.length?arguments[2]:void 0,s=Vy((void 0===e?n:Ly(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:jy(r,i),i+=a,o+=a;return r}}),S("copyWithin"),vc),zy=$o,By=Bo,Gy=A,Ky=Rh,Jy=e([].push),E={forEach:xh(0),map:xh(1),filter:xh(2),some:xh(3),every:xh(4),find:xh(5),findIndex:xh(6),filterReject:xh(7)},Yy=m,qy=E.every,$y=(O({target:"Array",proto:!0,forced:!kh("every")},{every:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Bo),Xy=Na,Wy=A,Yl=Hl,Zy=(O({target:"Array",proto:!0},{fill:function(e){for(var t=$y(this),r=Wy(t),n=arguments.length,i=Xy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Xy(n,r);i<o;)t[i++]=e;return t}}),Yl("fill"),E.filter),js=(O({target:"Array",proto:!0,forced:!Sh("filter")},{filter:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Qy=E.find,Id=Hl,ev=!0,Rf=("find"in[]&&Array(1).find(function(){ev=!1}),js({target:"Array",proto:!0,forced:ev},{find:function(e){return Qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Id("find"),O),tv=E.findIndex,r=Hl,rv=!0,nv=("findIndex"in[]&&Array(1).findIndex(function(){rv=!1}),Rf({target:"Array",proto:!0,forced:rv},{findIndex:function(e){return tv(this,e,1<arguments.length?arguments[1]:void 0)}}),r("findIndex"),vc),iv=$o,ov=Bo,sv=A,av=(N={findLast:Mh(0),findLastIndex:Mh(1)}).findLast,C=Hl,uv=(O({target:"Array",proto:!0},{findLast:function(e){return av(this,e,1<arguments.length?arguments[1]:void 0)}}),C("findLast"),N.findLastIndex),g=Hl,cv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return uv(this,e,1<arguments.length?arguments[1]:void 0)}}),g("findLastIndex"),k),lv=A,pv=Nh,fv=vc,dv=R=Uh,hv=Bo,yv=A,vv=Oa,mv=Rh,gv=(O({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=hv(this),r=yv(t),n=mv(t,0);return n.length=dv(n,t,t,r,0,void 0===e?1:vv(e)),n}}),R),Ev=Vo,wv=Bo,bv=A,Tv=Rh,_v=(O({target:"Array",proto:!0},{flatMap:function(e){var t,r=wv(this),n=bv(r);return Ev(e),(t=Tv(r,0)).length=gv(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),E.forEach),nd=kh("forEach")?[].forEach:function(e){return _v(this,e,1<arguments.length?arguments[1]:void 0)},Iv=(O({target:"Array",proto:!0,forced:[].forEach!=nd},{forEach:nd}),Ja.includes),td=Hl,T=(O({target:"Array",proto:!0,forced:m(function(){return!Array(1).includes()})},{includes:function(e){return Iv(this,e,1<arguments.length?arguments[1]:void 0)}}),td("includes"),O),Av=Ja.indexOf,S=kh,Ov=e([].indexOf),Nv=!!Ov&&1/Ov([1],1,-0)<0,Yl=S("indexOf"),js=(T({target:"Array",proto:!0,forced:Nv||!Yl},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Nv?Ov(this,e,t)||0:Av(this,e,t)}}),O),Id=$o,Rv=Po,Rf=kh,Sv=e([].join),r=Id!=Object,C=Rf("join",","),Cv=(js({target:"Array",proto:!0,forced:r||!C},{join:function(e){return Sv(Rv(this),void 0===e?",":e)}}),Cl),xv=Po,kv=Oa,Mv=A,N=kh,Uv=Math.min,Pv=[].lastIndexOf,Dv=!!Pv&&1/[1].lastIndexOf(1,-0)<0,g=N("lastIndexOf"),Lv=(O({target:"Array",proto:!0,forced:(R=Dv||!g?function(e){if(Dv)return Cv(Pv,this,arguments)||0;var t=xv(this),r=Mv(t),n=r-1;for((n=1<arguments.length?Uv(n,kv(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pv)!==[].lastIndexOf},{lastIndexOf:R}),E.map),nd=(O({target:"Array",proto:!0,forced:!Sh("map")},{map:function(e){return Lv(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Fv=Bo,jv=A,Vv=Nh,td=m(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Ja=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Hv=(nd({target:"Array",proto:!0,arity:1,forced:td||Ja},{push:function(e){var t=Fv(this),r=jv(t),n=arguments.length;Vv(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Vo),zv=Bo,Bv=$o,Gv=A,Kv=TypeError,Jv=(S={left:Ph(!1),right:Ph(!0)}).left,T=ls,Yl=Ol,Yv=(O({target:"Array",proto:!0,forced:!kh("reduce")||!Yl&&79<T&&T<83},{reduce:function(e){var t=arguments.length;return Jv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),Id=ls,Rf=Ol,js=(O({target:"Array",proto:!0,forced:!kh("reduceRight")||!Rf&&79<Id&&Id<83},{reduceRight:function(e){return Yv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),O),qv=k,$v=e([].reverse),r=[1,2],C=(js({target:"Array",proto:!0,forced:String(r)===String(r.reverse())},{reverse:function(){return qv(this)&&(this.length=this.length),$v(this)}}),O),Xv=k,Wv=x,Zv=Lo,Qv=Na,em=A,tm=Po,rm=Oh,Cl=Ko,nm=I,N=Sh("slice"),im=Cl("species"),om=Array,sm=Math.max,am=(C({target:"Array",proto:!0,forced:!N},{slice:function(e,t){var r,n,i,o=tm(this),s=em(o),a=Qv(e,s),u=Qv(void 0===t?s:t,s);if(Xv(o)&&(r=o.constructor,(r=Wv(r)&&(r===om||Xv(r.prototype))||Zv(r)&&null===(r=r[im])?void 0:r)===om||void 0===r))return nm(o,a,u);for(n=new(void 0===r?om:r)(sm(u-a,0)),i=0;a<u;a++,i++)a in o&&rm(n,i,o[a]);return n.length=i,n}}),E.some),um=(O({target:"Array",proto:!0,forced:!kh("some")},{some:function(e){return am(this,e,1<arguments.length?arguments[1]:void 0)}}),Na),cm=A,lm=Oh,pm=Array,fm=Math.max,dm=Dh,hm=Math.floor,g=Lh,nd=!!(R=M.match(/firefox\/(\d+)/i))&&+R[1],td=/MSIE|Trident/.test(M),Yl=!!(Ja=M.match(/AppleWebKit\/(\d+)\./))&&+Ja[1],T=O,ym=Vo,vm=Bo,mm=A,gm=Ch,Em=_c,Ol=m,wm=g,Rf=kh,bm=nd,Tm=td,_m=ls,Im=Yl,Am=[],Om=(S=e)(Am.sort),Nm=S(Am.push),Id=Ol(function(){Am.sort(void 0)}),js=Ol(function(){Am.sort(null)}),r=Rf("sort"),Rm=!Ol(function(){if(_m)return _m<70;if(!(bm&&3<bm)){if(Tm)return!0;if(Im)return Im<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){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++)Am.push({k:e+r,v:t})}for(Am.sort(function(e,t){return t.v-e.v}),r=0;r<Am.length;r++)e=Am[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),I=(T({target:"Array",proto:!0,forced:Id||!js||!r||!Rm},{sort:function(e){void 0!==e&&ym(e);var t=vm(this);if(Rm)return void 0===e?Om(t):Om(t,e);for(var r,n,i=[],o=mm(t),s=0;s<o;s++)s in t&&Nm(i,t[s]);for(wm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Em(e)>Em(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)gm(t,s++);return t}}),wp("Array"),O),Sm=Bo,Cm=Na,xm=Oa,km=A,Mm=Nh,Um=Rh,Pm=Oh,Dm=Ch,Cl=Sh("splice"),Lm=Math.max,Fm=Math.min,C=(I({target:"Array",proto:!0,forced:!Cl},{splice:function(e,t){var r,n,i,o,s,a,u=Sm(this),c=km(u),l=Cm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Fm(Lm(xm(t),0),c-l)),Mm(c+r-n),i=Um(u,n),o=0;o<n;o++)(s=l+o)in u&&Pm(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:Dm(u,a);for(o=c;c-n+r<o;o--)Dm(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:Dm(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Hl("flat"),Hl("flatMap"),O),jm=Bo,Vm=A,Hm=Ch,zm=Nh,N=1!==[].unshift(0),R=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),M=(C({target:"Array",proto:!0,arity:1,forced:N||R},{unshift:function(e){var t=jm(this),r=Vm(t),n=arguments.length;if(n){zm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Hm(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),y.Array,{exports:{}}),Ja={},Bm=Mo,Gm=Po,Km=b.f,Jm=Dh,Ym="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=(Ja.f=function(e){if(!Ym||"Window"!=Bm(e))return Km(Gm(e));var t=e;try{return Km(t)}catch(t){return Jm(Ym)}},m(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),nd=m,qm=Lo,$m=Mo,Xm=g,Wm=Object.isExtensible,td=nd(function(){Wm(1)})||Xm?function(e){return!!qm(e)&&(!Xm||"ArrayBuffer"!=$m(e))&&(!Wm||Wm(e))}:Wm,ls=!m(function(){return Object.isExtensible(Object.preventExtensions({}))}),Zm=O,Qm=e,Yl=Va,eg=Lo,tg=_,rg=Ls.f,ng=b,ig=Ja,og=td,sg=ls,ag=!1,ug=Go("meta"),cg=0,lg=M.exports={enable:function(){lg.enable=function(){},ag=!0;var i=ng.f,o=Qm([].splice),e={};e[ug]=1,i(e).length&&(ng.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===ug){o(t,r,1);break}return t},Zm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ig.f}))},fastKey:function(e,t){if(!eg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!tg(e,ug)){if(!og(e))return"F";if(!t)return"E";Fh(e)}return e[ug].objectID},getWeakData:function(e,t){if(!tg(e,ug)){if(!og(e))return!0;if(!t)return!1;Fh(e)}return e[ug].weakData},onFreeze:function(e){return sg&&ag&&og(e)&&!tg(e,ug)&&Fh(e),e}},pg=(Yl[ug]=!0,Do),fg=Lo,dg=sc,S=O,Rf=h,hg=e,Ol=qa,yg=Aa,T=M.exports,vg=Tc,mg=bp,Id=Do,gg=Lo,js=m,r=Ad,I=Gl,Eg=Aa,wg=Ls.f,bg=ac,Tg=jh,_g=vc,Ig=bp,Ag=Tc,Og=Jl,Ng=wp,Rg=So,Sg=M.exports.fastKey,Cg=cs.set,xg=cs.getterFor;function kg(e){var r=hg(Kh[e]);yg(Kh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return zh&&!gg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}function Mg(e,t){for(var r=0,n=Lg(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Ug(e,t,r,n){for(var i,o,s,a=Vg(e),u=jg(a),c=Fg(t,r),l=Bg(null),p=zg(u),f=0;f<p;f++)s=u[f],(o=Hg(c(s,f,a)))in l?Jg(l[o],s):l[o]=[s];if(n&&(i=n(a))!==Kg)for(o in l)l[o]=Gg(i,l[o]);return l}function Pg(e){for(var t,r,n=Wg(this),i=Xg(n),o=$g(e,1<arguments.length?arguments[1]:void 0),s=new Qg,a=Zg(i),u=0;u<a;u++)t=o(r=i[u],u,n),t0(s,t)?n0(e0(s,t),r):r0(s,t,[r]);return s}function Dg(e){return a0[e].prototype}Cl=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},C={getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=Sg(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),Rg?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=Sg(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){Ig(e,a),Cg(e,{type:r,index:bg(null),first:void 0,last:void 0,size:0}),Rg||(e.size=0),null!=t&&Ag(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=xg(r);return Tg(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,Rg?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),Rg?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=_g(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)}}),Tg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),Rg&&wg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=xg(t),o=xg(n);Og(e,t,function(e,t){Cg(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(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),Ng(t)}},Hh=-1!==(N="Map").indexOf("Map"),zh=-1!==N.indexOf("Weak"),Bh=Hh?"set":"add",Gh=Rf.Map,Kh=Gh&&Gh.prototype,R={},Ol(N,!Id(Jh=Gh)||!(zh||Kh.forEach&&!js(function(){(new Gh).entries().next()})))?(Jh=C.getConstructor(Cl,N,Hh,Bh),T.enable()):Ol(N,!0)&&(y=(Vh=new Jh)[Bh](zh?{}:-0,1)!=Vh,g=js(function(){Vh.has(1)}),nd=r(function(e){new Gh(e)}),Va=!zh&&js(function(){for(var e=new Gh,t=5;t--;)e[Bh](t,t);return!e.has(-0)}),nd||(((Jh=Cl(function(e,t){mg(e,Kh);r=new Gh,e=e,n=Jh,dg&&pg(e=e.constructor)&&e!==n&&fg(e=e.prototype)&&e!==n.prototype&&dg(r,e);var r,n=r;return null!=t&&vg(t,n[Bh],{that:n,AS_ENTRIES:Hh}),n})).prototype=Kh).constructor=Jh),(g||Va)&&(kg("delete"),kg("has"),Hh&&kg("get")),(Va||y)&&kg(Bh),zh&&Kh.clear&&delete Kh.clear),R.Map=Jh,S({global:!0,constructor:!0,forced:Jh!=Gh},R),I(Jh,N),zh||C.setStrong(Jh,N,Hh);var Lg=A,Fg=vc,jg=$o,Vg=Bo,Hg=Jo,zg=A,Bg=ac,Gg=Mg,Kg=Array,Jg=e([].push),Yg=Ug,_=Hl,qg=(O({target:"Array",proto:!0},{group:function(e){return Yg(this,e,1<arguments.length?arguments[1]:void 0)}}),_("group"),Ug),b=Hl,$g=(O({target:"Array",proto:!0,forced:!kh("groupBy")},{groupBy:function(e){return qg(this,e,1<arguments.length?arguments[1]:void 0)}}),b("groupBy"),vc),Ja=e,Xg=$o,Wg=Bo,Zg=A,Qg=Fo("Map"),td=Qg.prototype,e0=Ja(td.get),t0=Ja(td.has),r0=Ja(td.set),n0=Ja([].push),ls=Hl,Yl=Pg,sc=(O({target:"Array",proto:!0,name:"groupToMap",forced:!kh("groupByToMap")},{groupByToMap:Yl}),ls("groupByToMap"),Hl),i0=(O({target:"Array",proto:!0},{groupToMap:Pg}),sc("groupToMap"),A),o0=Po,qa=Hl,s0=Array,a0=(O({target:"Array",proto:!0},{toReversed:function(){for(var e=o0(this),t=s0,r=i0(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n}}),qa("toReversed"),h),M=O,u0=Vo,c0=Po,l0=Mg,Rf=Hl,p0=Array,f0=e(Dg("Array").sort),Ol=(M({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&u0(e);var t=c0(this),t=l0(p0,t);return f0(t,e)}}),Rf("toSorted"),O),r=Hl,d0=Nh,h0=A,y0=Na,v0=Po,m0=Oa,g0=Array,E0=Math.max,w0=Math.min,b0=(Ol({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=v0(this),a=h0(s),u=y0(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,w0(E0(m0(t),0),a-u)),i=d0(a+r-n),o=g0(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),r("toSpliced"),A),T0=Oa,_0=RangeError,I0=Po,A0=Array;if(O({target:"Array",proto:!0},{with:function(e,t){var r=I0(this),n=A0,i=t,o=b0(r),s=(e=T0(e))<0?o+e:e;if(o<=s||s<0)throw _0("Incorrect index");for(var a=new n(o),u=0;u<o;u++)a[u]=u===s?i:r[u];return a}}),js=h,nd=Rs,Cl=Do,g=Ta,Va=Aa,y=Ko("asyncIterator"),S=js.AsyncIterator,R=nd.AsyncIteratorPrototype)gw=R;else if(Cl(S))gw=S.prototype;else if(nd.USE_FUNCTION_CONSTRUCTOR||js.USE_FUNCTION_CONSTRUCTOR)try{pw=g(g(g(Function("return async function*(){}()")()))),g(pw)===Object.prototype&&(gw=pw)}catch(De){}function O0(e,t,r){var n=e.done;P0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function N0(e){D0(this,{type:"AsyncFromSyncIterator",iterator:M0(e),next:e.next})}function R0(e,t,r,n){try{var i=q0(e,"return");if(i)return Y0("Promise").resolve(J0(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function S0(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:G0(K0(e).next)},u=Q0("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||X0(s),new u(function(r,n){var i=function(e){R0(c,n,e,n)},o=function(){try{if(f&&p)try{Z0(l)}catch(e){i(e)}u.resolve(W0($0(t,c))).then(function(e){try{if(W0(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)o();else if(h)e?o():R0(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?R0(c,r,y||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function C0(e,t){if(!hE||!dE(e)||!hE(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function x0(e,t,r){r.get&&yE(r.get,t,{getter:!0}),r.set&&yE(r.set,t,{setter:!0}),vE.f(e,t,r)}Cl((gw=gw||{})[y])||Va(gw,y,function(){return this});var k0=t,M0=qo,I=ac,U0=Ho,C=jh,N=cs,_=gw,P0=Fo("Promise"),D0=N.set,L0=N.getterFor("AsyncFromSyncIterator");N0.prototype=C(I(_),{next:function(){var n=L0(this);return new P0(function(e,t){var r=M0(k0(n.next,n.iterator));O0(r,e,t)})},return:function(){var n=L0(this).iterator;return new P0(function(e,t){var r=U0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=M0(k0(r,n));O0(r,e,t)})}});var F0=t,j0=b=N0,V0=qo,H0=Ec,z0=Ho,B0=Ko("asyncIterator"),G0=Vo,K0=qo,J0=t,Y0=Fo,q0=Ho,$0=t,X0=Vo,W0=qo,Z0=Nh,Q0=Fo,$o={toArray:S0(0),forEach:S0(1),every:S0(2),some:S0(3),find:S0(4)},eE=vc,tE=Bo,rE=x,nE=Ec,iE=gc,oE=Ho,td=Dg,sE=Fo,aE=b,uE=$o.toArray,cE=Ko("asyncIterator"),lE=td("Array").values,pE=(O({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(sE("Promise"))(function(e){var t=tE(o),r=(void 0!==a&&(a=eE(a,u)),oE(t,cE)),n=r?void 0:iE(t)||lE,i=rE(s)?new s:[],r=r?function(e,t){t=arguments.length<2?z0(e,B0):t;return t?V0(F0(t,e)):new j0(H0(e))}(t,r):new aE(nE(t,n));e(uE(r,a,i))})}}),E.filterReject),Ja=Hl,fE=(O({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return pE(this,e,1<arguments.length?arguments[1]:void 0)}}),Ja("filterOut"),E.filterReject),Yl=Hl,ls=(O({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return fE(this,e,1<arguments.length?arguments[1]:void 0)}}),Yl("filterReject"),O),dE=k,hE=Object.isFrozen,yE=(ls({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!C0(e,!0))return!1;var t=e.raw;return t.length===e.length&&C0(t,!1)}}),vs.exports),vE=Ls,sc=Hl,mE=Bo,gE=A,qa=(So&&(x0(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=mE(this),t=gE(e);return 0==t?void 0:e[t-1]},set:function(e){var t=mE(this),r=gE(t);return t[0==r?0:r-1]=e}}),sc("lastItem")),Hl),EE=Bo,wE=A,M=(So&&(x0(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=EE(this),e=wE(e);return 0==e?0:e-1}}),qa("lastIndex")),e),bE=Vo,TE=A,_E=Bo,IE=Rh,AE=Fo("Map"),Rf=AE.prototype,OE=M(Rf.forEach),NE=M(Rf.has),RE=M(Rf.set),SE=M([].push),Ol=Hl;O({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=_E(this),i=TE(n),o=IE(n,0),s=new AE,a=null!=e?bE(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),NE(s,r)||RE(s,r,t);return OE(s,function(e){SE(o,e)}),o}}),Ol("uniqueBy"),$T.exposure=function(e,t,r,n){return new VE(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},$T.track=function(e,t,r,n){return new HE(n,r,e,t)},$T.remoteConfig=function(e,t,r,n){return new zE(n,e,t.parameter,t.valueId,t.reason,r)},$T.isExposureEvent=function(e){return void 0!==e.experiment},$T.isTrackEvent=function(e){return void 0!==e.eventType},$T.isRemoteConfigEvent=function(e){return void 0!==e.parameter},$T.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},$T.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},$T.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},$T.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[_t.ID],identifiers:this.user.identifiers,userProperties:Xe.sanitize(this.user.properties),hackleProperties:Xe.sanitize(this.user.hackleProperties)}};var CE,xE,kE,ME,UE,PE,DE,LE,FE,jE=$T,VE=(Ke(qT,FE=jE),qT.prototype.copyWithUser=function(e){return new qT(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},qT.prototype.toDto=function(){return c(c({},FE.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})},qT),HE=(Ke(YT,LE=jE),YT.prototype.copyWithUser=function(e){return new YT(this.timestamp,e,this.eventType,this.event,this.insertId)},YT.prototype.toDto=function(){return c(c({},LE.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Xe.sanitize(this.event.properties)})},YT),zE=(Ke(JT,DE=jE),JT.prototype.copyWithUser=function(e){return new JT(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},JT.prototype.toDto=function(){return c(c({},DE.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)})},JT),BE=(KT.isSessionEvent=function(e){return!!jE.isTrackEvent(e)&&(e.event.key===KT.SESSION_START_EVENT_NAME||e.event.key===KT.SESSION_END_EVENT_NAME)},KT.prototype.onSessionStarted=function(e,t,r){this.track(KT.SESSION_START_EVENT_NAME,e,t,r)},KT.prototype.onSessionEnded=function(e,t,r){this.track(KT.SESSION_END_EVENT_NAME,e,t,r)},KT.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)},KT.prototype.decorateSession=function(e,t){t=(new It).add(_t.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},KT.SESSION_START_EVENT_NAME="$session_start",KT.SESSION_END_EVENT_NAME="$session_end",KT),GE=(GT.prototype.process=function(e){var t;BE.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[_t.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[_t.SESSION]=t.sessionId,e))})),this.delegate.process(t))},GT.prototype.flush=function(e){this.delegate.flush(e)},GT.prototype.close=function(){this.delegate.close()},GT),KE=(BT.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!jE.isExposureEvent(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)},BT),JE=(zT.toEvent=function(e){var t;return{key:zT.EVENT_KEY,properties:{level:zT.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:zT._stacktrace(e)}}},zT._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,zT.STACK_TRACK_LIMIT).join("\n")},zT.EVENT_KEY="$trace",zT.LEVEL_ERROR="error",zT.STACK_TRACK_LIMIT=30,zT),r=(HT.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)}},HT),YE=(VT.prototype.with=function(e){return new VT(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},VT.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new VT(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},VT.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new VT(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},VT.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},VT),qE=(Ke(jT,PE=r),jT.prototype.supports=function(e){return void 0!==e.experiment},jT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},jT),$E=(FT.of=function(e,t,r,n,i,o){return o.returnValue=Xe.truncateStringValue(n),new FT(i,t.targetEvaluations,e.parameter,r,n,o)},FT.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},FT),XE=(Ke(LT,UE=r),LT.prototype.supports=function(e){return void 0!==e.parameter},LT.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 $E.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)},LT.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?$E.ofDefault(e,t,f.TYPE_MISMATCH,i):$E.of(e,t,r.id,r.rawValue,n,i)},LT),WE=(DT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},DT),ZE=(PT.create=function(){return new PT},Object.defineProperty(PT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(PT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),PT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},PT.prototype.addRequest=function(e){this._stack.push(e)},PT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},PT.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof YE&&e.experiment.id===t.id})},PT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},PT),QE=(UT.of=function(e,t,r,n){return new UT(e,t,r,n)},UT.by=function(e,t){return new UT(e.workspace,e.user,t,"A")},UT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},UT),ew=(MT.of=function(e,t,r,n,i){return new MT(e,t,r,n,i)},MT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},MT),tw=(kT.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},kT.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},kT.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},kT),rw=(xT.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}},xT),nw=(CT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},CT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return tw.asNumber(e)},CT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=tw.asNumber(t),e=tw.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},CT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},CT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},CT.prototype.clear=function(){this.listStorage.clear()},CT),iw=(ST.prototype.add=function(e){this.evaluators.push(e)},ST.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)},ST),ow=(RT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},RT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},RT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},RT),sw=(NT.prototype.decorate=function(e){return e},NT),aw=(OT.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e},OT),uw=(AT.prototype.matches=function(e,t,r){void 0===r&&(r=new sw);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},AT.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},AT.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},AT.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},AT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},AT),cw=(IT.tryParse=function(e){try{return new URL(e)}catch(e){return}},IT.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:IT.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},IT),h=(_T.prototype.booleanMatches=function(e,t){return e===t},_T.prototype.numberMatches=function(e,t){return e===t},_T.prototype.stringMatches=function(e,t){return e===t},_T.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},_T.prototype.urlMatches=function(e,t){return decodeURI(cw.removePathnameTrailingSlash(e))===decodeURI(cw.removePathnameTrailingSlash(t))},_T),Rs=(TT.prototype.booleanMatches=function(e,t){return!1},TT.prototype.numberMatches=function(e,t){return!1},TT.prototype.stringMatches=function(e,t){return e.includes(t)},TT.prototype.versionMatches=function(e,t){return!1},TT.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)},TT),Ta=(bT.prototype.booleanMatches=function(e,t){return!1},bT.prototype.numberMatches=function(e,t){return!1},bT.prototype.stringMatches=function(e,t){return e.startsWith(t)},bT.prototype.versionMatches=function(e,t){return!1},bT.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)},bT),R=(wT.prototype.booleanMatches=function(e,t){return!1},wT.prototype.numberMatches=function(e,t){return!1},wT.prototype.stringMatches=function(e,t){return e.endsWith(t)},wT.prototype.versionMatches=function(e,t){return!1},wT.prototype.urlMatches=function(e,t){return!1},wT),S=(ET.prototype.booleanMatches=function(e,t){return!1},ET.prototype.numberMatches=function(e,t){return t<e},ET.prototype.stringMatches=function(e,t){return t<e},ET.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},ET.prototype.urlMatches=function(e,t){return!1},ET),nd=(gT.prototype.booleanMatches=function(e,t){return!1},gT.prototype.numberMatches=function(e,t){return t<=e},gT.prototype.stringMatches=function(e,t){return t<=e},gT.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},gT.prototype.urlMatches=function(e,t){return!1},gT),js=(mT.prototype.booleanMatches=function(e,t){return!1},mT.prototype.numberMatches=function(e,t){return e<t},mT.prototype.stringMatches=function(e,t){return e<t},mT.prototype.versionMatches=function(e,t){return e.isLessThan(t)},mT.prototype.urlMatches=function(e,t){return!1},mT),g=(vT.prototype.booleanMatches=function(e,t){return!1},vT.prototype.numberMatches=function(e,t){return e<=t},vT.prototype.stringMatches=function(e,t){return e<=t},vT.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},vT.prototype.urlMatches=function(e,t){return!1},vT),lw=(yT.prototype.getMatcher=function(e){switch(e){case"IN":return yT.IN_MATCHER;case"CONTAINS":return yT.CONTAINS_MATCHER;case"STARTS_WITH":return yT.STARTS_WITH_MATCHER;case"ENDS_WITH":return yT.ENDS_WITH_MATCHER;case"GT":return yT.GT_MATCHER;case"GTE":return yT.GTE_MATCHER;case"LT":return yT.LT_MATCHER;case"LTE":return yT.LTE_MATCHER}},yT.IN_MATCHER=new h,yT.CONTAINS_MATCHER=new Rs,yT.STARTS_WITH_MATCHER=new Ta,yT.ENDS_WITH_MATCHER=new R,yT.GT_MATCHER=new S,yT.GTE_MATCHER=new nd,yT.LT_MATCHER=new js,yT.LTE_MATCHER=new g,yT),pw=(hT.prototype.matches=function(e,t,r){t=tw.asString(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},hT),Cl=(dT.prototype.matches=function(e,t,r){t=tw.asNumber(t),r=tw.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},dT),Va=(fT.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},fT),y=(pT.prototype.matches=function(e,t,r){t=ur.tryParse(t),r=ur.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},pT),ac=(lT.prototype.matches=function(e,t,r){t=cw.tryParse(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)},lT),cs=(cT.prototype.matches=function(e,t,r){return!1},cT),fw=(uT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return uT.STRING_MATCHER;case"NUMBER":return uT.NUMBER_MATCHER;case"BOOLEAN":return uT.BOOLEAN_MATCHER;case"VERSION":return uT.VERSION_MATCHER;case"URL":return uT.URL_MATCHER;case"NULL":case"UNKNOWN":return uT.NULL_MATCHER}},uT.STRING_MATCHER=new pw,uT.NUMBER_MATCHER=new Cl,uT.BOOLEAN_MATCHER=new Va,uT.VERSION_MATCHER=new y,uT.URL_MATCHER=new ac,uT.NULL_MATCHER=new cs,uT),dw=(aT.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},aT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?aw:sw)},aT),hw=(sT.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,"]"))}},sT),yw=(oT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},oT.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,"]"))},oT),vw=(iT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},iT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},iT),mw=(nT.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,"]"))}},nT),gw=(rT.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(tw.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 i=null!=(i=t.get(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},rT.prototype.evaluate=function(e,t,r){r=QE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},rT),Ew=(Ke(tT,ME=gw),tT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},tT.prototype.resolve=function(e,t){return e instanceof QE&&t.reason===f.TRAFFIC_ALLOCATED?t.with(f.TRAFFIC_ALLOCATED_BY_TARGETING):t},tT.prototype.evaluationMatches=function(e,t){return!!tT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},tT.AB_TEST_MATCHED_REASONS=[f.OVERRIDDEN,f.TRAFFIC_ALLOCATED,f.EXPERIMENT_COMPLETED,f.TRAFFIC_ALLOCATED_BY_TARGETING],tT),ww=(Ke(eT,kE=gw),eT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},eT.prototype.resolve=function(e,t){return t},eT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},eT),bw=(Qb.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)},Qb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},Qb),Tw=(Zb.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,"]"))}},Zb.prototype.properties=function(e){return jE.isTrackEvent(e)?e.event.properties:jE.isExposureEvent(e)||jE.isRemoteConfigEvent(e)?e.properties:void 0},Zb),_w=(Wb.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)})},Wb),Iw=(Xb.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}},Xb),Aw=($b.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},$b.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},$b.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)}},$b),Ow={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s=5*((524287&(s^=i=this.mul32(i,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s^=i=this.mul32(i,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}},Nw=(qb.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},qb.prototype.calculateSlotNumber=function(e,t,r){r=Ow.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},qb),Rw=(Yb.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},Yb.end=function(){return new Yb(void 0,void 0)},Yb.decision=function(e,t){return new Yb(e,t)},Yb.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r},Yb),Sw=(Jb.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 YE.of(e,t,n,f.OVERRIDDEN);case"FEATURE_FLAG":return YE.of(e,t,n,f.INDIVIDUAL_TARGET_MATCH)}},Jb),Cw=(Kb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?YE.ofDefault(e,t,f.EXPERIMENT_DRAFT):r.evaluate(e,t)},Kb),xw=(Gb.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return YE.ofDefault(e,t,f.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return YE.ofDefault(e,t,f.FEATURE_FLAG_INACTIVE)}},Gb),kw=(Bb.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return YE.of(e,t,r,f.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},Bb),Mw=(zb.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):YE.ofDefault(e,t,f.NOT_IN_EXPERIMENT_TARGET)},zb),Uw=(Hb.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?YE.ofDefault(e,t,f.VARIATION_DROPPED):YE.of(e,t,n,f.TRAFFIC_ALLOCATED):YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},Hb),Pw=(Vb.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 YE.of(e,t,r,f.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},Vb),Dw=(jb.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 YE.ofDefault(e,t,f.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return YE.of(e,t,n,f.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},jb),Lw=(Fb.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):YE.ofDefault(e,t,f.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},Fb),Fw=(Lb.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):YE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND)},Lb),jw=(Db.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)})},Db),Vw=(Pb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},Pb),Hw=(Ub.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},Ub.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},Ub.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)}},Ub.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)},Ub),zw=(Mb.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)},Mb),Bw=(kb.of=function(e,t,r,n){return new kb(r,t.targetEvaluations,e.inAppMessage,n)},kb),Gw=(xb.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):Bw.of(e,t,f.UNSUPPORTED_PLATFORM)},xb),Kw=(Cb.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.OVERRIDDEN,n)):r.evaluate(e,t)},Cb),Jw=(Sb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},Sb),Yw=(Rb.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},Rb),qw=(Nb.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_PERIOD)},Nb),$w=(Ob.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?Bw.of(e,t,f.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},Ob),Xw=(Ab.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.IN_APP_MESSAGE_TARGET,n)):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},Ab),Ww=(Ib.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},Ib),Zw=(_b.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},_b.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},_b),Qw=(Tb.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)})},Tb),eb=(bb.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},bb),tb=(wb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},wb.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))},wb),rb=(Eb.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Eb.getOrNull=function(e){return Eb.instances.get(e)},Eb.register=function(e,t){return Eb.instances.set(e,t),t},Eb.instances=new Map,Eb),nb=(gb.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},gb.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},gb),ib=(mb.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[mb.ROOT_TYPE]=r.key.type,t[mb.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);o.push(e)}),o},mb.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof YE)return n[mb.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[mb.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[mb.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,jE.exposure(e.user,t,n,r);if(t instanceof $E)return jE.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},mb.ROOT_TYPE="$targetingRootType",mb.ROOT_ID="$targetingRootId",mb.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",mb.EXPERIMENT_VERSION_KEY="$experiment_version",mb.EXECUTION_VERSION_KEY="$execution_version",mb),ob=(Ke(vb,xE=r),vb.prototype.supports=function(e){return void 0!==e.inAppMessage},vb.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},vb),sb=(yb.of=function(e,t,r,n){return new yb(e,t,r,n)},yb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},yb),ab=i.log,ub=(hb.create=function(e,t,r,n){var i=new iw,r=new rw(r),r=new nb(i,r,n),n=new qE(r),o=new XE(r.remoteConfigParameterTargetRuleDeterminer),r=new ob(r);return i.add(n),i.add(o),new hb(n,o,r,e,new ib(Qe.instance),t,new cb,Qe.instance)},hb.prototype.experiment=function(e,t,r){var n=this;if(!e)return ab.error("experimentKey must not be empty"),ht.of(r,f.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return ab.warn("SDK not ready."),ht.of(r,f.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return ab.warn("Experiment does not exist."),ht.of(r,f.EXPERIMENT_NOT_FOUND);i=QE.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},hb.prototype.experiments=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,ht.of(e.variationKey,e.reason,t)]},hb.prototype.featureFlag=function(e,t){var r=this;if(!e)return ab.error("featureKey must not be empty"),yt.off(f.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return ab.warn("SDK not ready."),yt.off(f.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return ab.warn("FeatureFlag does not exist."),yt.off(f.FEATURE_FLAG_NOT_FOUND);n=QE.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},hb.prototype.featureFlags=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,"A"===e.variationKey?yt.off(e.reason,t):yt.on(e.reason,t)]},hb.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return ab.warn("SDK not ready."),dt.of(f.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return ab.warn("In app message does not exist."),dt.of(f.IN_APP_MESSAGE_NOT_FOUND);r=sb.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,ZE.create());return dt.of(t.reason,t.inAppMessage,t.message)},hb.prototype.tryInAppMessage=function(e,t){var r,n=gn.start();try{r=this.inAppMessage(e,t)}catch(t){ab.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=dt.of(f.EXCEPTION)}return si.inAppMessage(n,e,r),r},hb.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 Tt(0,e.key),this.eventProcessor.process(jE.track(n,e,t,r))):ab.warn("Event key must be not null. or event key must be string type."):ab.warn("Event must be event type."):ab.warn("event must not be null.")},hb.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=JE.toEvent(e),this.flush(),this.track(e,t),this.flush())},hb.prototype.flush=function(){this.eventProcessor.flush(!1)},hb.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return ab.warn("SDK not ready."),ft.of(n,f.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return ab.warn("Remote config parameter does not exist."),ft.of(n,f.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=ew.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,ZE.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),ft.of(t.value,t.reason)},hb.prototype.close=function(){this.eventProcessor.close()},hb),cb=(db.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},db.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},db),lb=(fb.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},fb.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},fb),pb=null;function fb(){this._installed=[],this._installations={onerror:XT,onunhandledrejection:WT}}function db(){}function hb(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}function yb(e,t,r,n){this.key=new WE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function vb(e){var t=xE.call(this)||this;return t.evaluationFlowFactory=e,t}function mb(e){this.clock=e}function gb(e,t,r){var n=new Nw,e=rb.register("targetMatcher",new ow(new Iw(e))),i=new Aw(n),t=new Hw(t,e,i),o=new zw(n),o=(this.abTestFlow=Rw.of(new Sw(t),new Fw,new Lw(o),new Mw(new jw(e)),new Cw,new xw,new kw,new Uw(i)),this.featureFlagFlow=Rw.of(new Cw,new xw,new kw,new Sw(t),new Fw,new Pw(new Vw(e),i),new Dw(i)),new Ww);this.inAppMessageFlow=Rw.of(new Gw,new Kw(new Zw,o),new Jw,new Yw,new qw,new $w(new eb(r)),new Xw(new Qw(e),o)),this.remoteConfigParameterTargetRuleDeterminer=new tb(e,n)}function Eb(){}function wb(e,t){this.targetMatcher=e,this.bucketer=t}function bb(e){this.storage=e}function Tb(e){this.targetMatcher=e}function _b(){}function Ib(){}function Ab(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function Ob(e){this.hiddenMatcher=e}function Nb(){}function Rb(){}function Sb(){}function Cb(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function xb(){}function kb(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function Mb(e){this.bucketer=e}function Ub(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function Pb(e){this.targetMatcher=e}function Db(e){this.targetMatcher=e}function Lb(){}function Fb(e){this.containerResolver=e}function jb(e){this.actionResolver=e}function Vb(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function Hb(e){this.actionResolver=e}function zb(e){this.experimentTargetDeterminer=e}function Bb(){}function Gb(){}function Kb(){}function Jb(e){this.overrideResolver=e}function Yb(e,t){this.flowEvaluator=e,this.nextFlow=t}function qb(){}function $b(e){this.bucketer=e}function Xb(e){var t=new uw(new fw,new lw);this.userConditionMatcher=new dw(new hw,t),this.eventConditionMatcher=new bw(new Tw,t),this.segmentConditionMatcher=new yw(new vw(this.userConditionMatcher)),this.experimentConditionMatcher=new mw(new Ew(e,t),new ww(e,t)),this.cohortConditionMatcher=new _w(t)}function Wb(e){this.valueOperatorMatcher=e}function Zb(){}function Qb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function eT(e,t){return kE.call(this,e,t)||this}function tT(e,t){return ME.call(this,e,t)||this}function rT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function nT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function iT(e){this.userConditionMatcher=e}function oT(e){this.segmentMatcher=e}function sT(){}function aT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}function uT(){}function cT(){}function lT(){}function pT(){}function fT(){}function dT(){}function hT(){}function yT(){}function vT(){}function mT(){}function gT(){}function ET(){}function wT(){}function bT(){}function TT(){}function _T(){}function IT(){}function AT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function OT(){}function NT(){}function RT(e){this.conditionMatcherFactory=e}function ST(){this.evaluators=new Array}function CT(e){this.listStorage=e}function xT(e){this.storages=e}function kT(){}function MT(e,t,r,n,i){this.key=new WE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}function UT(e,t,r,n){this.key=new WE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function PT(){this._stack=[],this._targetEvaluations=[]}function DT(e,t){this.type=e,this.id=t}function LT(e){var t=UE.call(this)||this;return t.targetRuleDeterminer=e,t}function FT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}function jT(e){var t=PE.call(this)||this;return t.evaluationFlowFactory=e,t}function VT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}function HT(){}function zT(){}function BT(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function GT(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}function KT(e,t){this.userManager=e,this.core=t}function JT(e,t,r,n,i,o,s){e=DE.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}function YT(e,t,r,n,i){e=LE.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}function qT(e,t,r,n,i,o,s,a){e=FE.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}function $T(e,t,r){void 0===r&&(r=De.v4()),this.timestamp=e,this.user=t,this.insertId=r}function XT(o,s){pb=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),pb&&pb.apply(this,arguments)}}function WT(r,n){CE=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()),CE&&CE.apply(this,arguments)}}function ZT(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function QT(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function e_(t,r){return Object.keys(Q_).every(function(e){return t[e]===r[e]})}HI.prototype.read=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},HI.prototype.save=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},HI.prototype.add=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},HI.prototype.delete=function(n){return o(this,void 0,void 0,function(){var t,r=this;return s(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},HI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},HI.prototype.clear=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var t_=HI,r_=(VI.builder=function(){return new n_},VI.empty=function(){return VI.builder().build()},VI.from=function(e){return new VI(e)},VI.fromDto=function(e){for(var t=VI.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new ar(e)})})}return t.build()},Object.defineProperty(VI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),VI.prototype.get=function(e){return this.cohorts.get(e)},VI.prototype.filterBy=function(e){var r=lt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return VI.from(e)},VI.prototype.asArray=function(){return this.cohorts.values()},VI.prototype.asComparable=function(){return this.cohorts},VI.prototype.toBuilder=function(){return new n_(this)},VI),n_=(jI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},jI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},jI.prototype.build=function(){return new r_(this.cohorts)},jI),N="model",C="name",I="type",_="vendor",t="version",x="mobile",b="tablet",i_=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.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,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[C,t],[/(opios)[\/\s]+([\w\.]+)/i],[[C,"Opera Mini"],t],[/\s(opr)\/([\w\.]+)/i],[[C,"Opera"],t],[/(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],[C,t],[/(konqueror)\/([\w\.]+)/i],[[C,"Konqueror"],t],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[C,"IE"],t],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[C,"Edge"],t],[/(yabrowser)\/([\w\.]+)/i],[[C,"Yandex"],t],[/(Avast)\/([\w\.]+)/i],[[C,"Avast Secure Browser"],t],[/(AVG)\/([\w\.]+)/i],[[C,"AVG Secure Browser"],t],[/(puffin)\/([\w\.]+)/i],[[C,"Puffin"],t],[/(focus)\/([\w\.]+)/i],[[C,"Firefox Focus"],t],[/(opt)\/([\w\.]+)/i],[[C,"Opera Touch"],t],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[C,"UCBrowser"],t],[/(comodo_dragon)\/([\w\.]+)/i],[[C,/_/g," "],t],[/(windowswechat qbcore)\/([\w\.]+)/i],[[C,"WeChat(Win) Desktop"],t],[/(micromessenger)\/([\w\.]+)/i],[[C,"WeChat"],t],[/(brave)\/([\w\.]+)/i],[[C,"Brave"],t],[/(whale)\/([\w\.]+)/i],[[C,"Whale"],t],[/(qqbrowserlite)\/([\w\.]+)/i],[C,t],[/(QQ)\/([\d\.]+)/i],[C,t],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[C,t],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[C,t],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[C,t],[/(MetaSr)[\/\s]?([\w\.]+)/i],[C],[/(LBBROWSER)/i],[C],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[t,[C,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[t,[C,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[C,t],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[t,[C,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[C,/(.+)/,"$1 WebView"],t],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[C,/(.+(?:g|us))(.+)/,"$1 $2"],t],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[C,"Chrome Mobile"],t],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[t,[C,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[C,"Sailfish Browser"],t],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[C,t],[/(dolfin)\/([\w\.]+)/i],[[C,"Dolphin"],t],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[C,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[C,"Opera Coast"],t],[/fxios\/([\w\.-]+)/i],[t,[C,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[t,[C,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[t,C],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[C,"GSA"],t],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[C,[t,(U.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=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(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.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],[C,t],[/(navigator|netscape)\/([\w\.-]+)/i],[[C,"Netscape"],t],[/(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],[C,t]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",U.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",U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[N,_,[I,b]],[/applecoremedia\/[\w\.]+ \((ipad)/],[N,[_,"Apple"],[I,b]],[/(apple\s{0,1}tv)/i],[[N,"Apple TV"],[_,"Apple"],[I,"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],[_,N,[I,b]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[N,[_,"Amazon"],[I,b]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[N,U.mapper.str,U.maps.device.amazon.model],[_,"Amazon"],[I,x]],[/android.+aft([bms])\sbuild/i],[N,[_,"Amazon"],[I,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[N,_,[I,x]],[/\((ip[honed|\s\w*]+);/i],[N,[_,"Apple"],[I,x]],[/(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],[_,N,[I,x]],[/\(bb10;\s(\w+)/i],[N,[_,"BlackBerry"],[I,x]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[N,[_,"Asus"],[I,b]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[_,"Sony"],[N,"Xperia Tablet"],[I,b]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[N,[_,"Sony"],[I,x]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[_,N,[I,"console"]],[/android.+;\s(shield)\sbuild/i],[N,[_,"Nvidia"],[I,"console"]],[/(playstation\s[34portablevi]+)/i],[N,[_,"Sony"],[I,"console"]],[/(sprint\s(\w+))/i],[[_,U.mapper.str,U.maps.device.sprint.vendor],[N,U.mapper.str,U.maps.device.sprint.model],[I,x]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[_,[N,/_/g," "],[I,x]],[/(nexus\s9)/i],[N,[_,"HTC"],[I,b]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[N,[_,"Huawei"],[I,x]],[/android.+(bah2?-a?[lw]\d{2})/i],[N,[_,"Huawei"],[I,b]],[/(microsoft);\s(lumia[\s\w]+)/i],[_,N,[I,x]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[N,[_,"Microsoft"],[I,"console"]],[/(kin\.[onetw]{3})/i],[[N,/\./g," "],[_,"Microsoft"],[I,x]],[/\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],[N,[_,"Motorola"],[I,x]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[N,[_,"Motorola"],[I,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[_,U.util.trim],[N,U.util.trim],[I,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[N,/^/,"SmartTV"],[_,"Samsung"],[I,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[N,[_,"Sharp"],[I,"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],[[_,"Samsung"],N,[I,b]],[/smart-tv.+(samsung)/i],[_,[I,"smarttv"],N],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[_,"Samsung"],N,[I,x]],[/sie-(\w*)/i],[N,[_,"Siemens"],[I,x]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[_,"Nokia"],N,[I,x]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[N,[_,"Acer"],[I,b]],[/android.+([vl]k\-?\d{3})\s+build/i],[N,[_,"LG"],[I,b]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[_,"LG"],N,[I,b]],[/(lg) netcast\.tv/i],[_,N,[I,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[N,[_,"LG"],[I,x]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[_,N,[I,b]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[N,[_,"Lenovo"],[I,b]],[/(lenovo)[_\s-]?([\w-]+)/i],[_,N,[I,x]],[/linux;.+((jolla));/i],[_,N,[I,x]],[/((pebble))app\/[\d\.]+\s/i],[_,N,[I,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[_,N,[I,x]],[/crkey/i],[[N,"Chromecast"],[_,"Google"],[I,"smarttv"]],[/android.+;\s(glass)\s\d/i],[N,[_,"Google"],[I,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[N,[_,"Google"],[I,b]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[N,[_,"Google"],[I,x]],[/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],[[N,/_/g," "],[_,"Xiaomi"],[I,x]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[N,/_/g," "],[_,"Xiaomi"],[I,b]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[N,[_,"Meizu"],[I,x]],[/(mz)-([\w-]{2,})/i],[[_,"Meizu"],N,[I,x]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[N,[_,"OnePlus"],[I,x]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[N,[_,"RCA"],[I,b]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[N,[_,"Dell"],[I,b]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[N,[_,"Verizon"],[I,b]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[_,"Barnes & Noble"],N,[I,b]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[N,[_,"NuVision"],[I,b]],[/android.+;\s(k88)\sbuild/i],[N,[_,"ZTE"],[I,b]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[N,[_,"Swiss"],[I,x]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[N,[_,"Swiss"],[I,b]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[N,[_,"Zeki"],[I,b]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[_,"Dragon Touch"],N,[I,b]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[N,[_,"Insignia"],[I,b]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[N,[_,"NextBook"],[I,b]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[_,"Voice"],N,[I,x]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[_,"LvTel"],N,[I,x]],[/android.+;\s(PH-1)\s/i],[N,[_,"Essential"],[I,x]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[N,[_,"Envizen"],[I,b]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[N,[_,"MachSpeed"],[I,b]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[N,[_,"Rotor"],[I,b]],[/android.+(KS(.+))\s+build/i],[N,[_,"Amazon"],[I,b]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[_,N,[I,b]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[I,U.util.lowerize],_,N],[/[\s\/\(](smart-?tv)[;\)]/i],[[I,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[N,[_,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[t,[C,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[C,"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],[C,t],[/rv\:([\w\.]{1,9}).+(gecko)/i],[t,C]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[C,t],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[C,U.mapper.str,U.maps.os.windows],[t,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[C,"Windows"],[t,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[C,"BlackBerry"],t],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[C,t],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[C,"Symbian"],t],[/\((series40);/i],[C],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[C,"Firefox OS"],t],[/(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],[[C,"Linux"],t],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[C,"Chromium OS"],t],[/(sunos)\s?([\w\.\d]*)/i],[[C,"Solaris"],t],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[C,"Linux"],t],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPhone"],[t,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPad"],[t,/_/g,"."]],[/(haiku)\s(\w+)/i],[C,t],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[t,/_/g,"."],[C,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[C,"Mac"],[t,/_/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],[C,t]]},U),o_=(FI.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,s=i_.parse(o.navigator.userAgent),a=s.browser,u=s.os,s=s.device,c=(o.location.protocol||"").replace(":",""),l=o.screen,p=(null==(p=o.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!=(i=null==(n=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",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:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:c,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:l.width||"",screenHeight:l.height||"",timeZone:v}},FI),s_=(LI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return u_.of(c_(e,this.hackleDeviceId),r_.empty())},LI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(LI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),LI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},LI.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},LI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},LI.prototype.hackleUser=function(e){var t=(new It).addIdentifiers(e.user.identifiers||{}).add(_t.ID,e.user.id||this.hackleDeviceId).add(_t.DEVICE,e.user.deviceId||this.hackleDeviceId).add(_t.HACKLE_DEVICE,this.hackleDeviceId);return a.isNotNullOrUndefined(e.user.userId)&&t.add(_t.USER,e.user.userId),{identifiers:t.build(),properties:e.user.properties||{},hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},LI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?o_.generate(window):e)||{}},LI.prototype.setUser=function(e){return this.updateUser(e).user},LI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},LI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},LI.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},LI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},LI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},LI.prototype.saveUser=function(e){this.storage.saveUser(e)},LI.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,ZT(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},LI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=c_(r,n.hackleDeviceId),ZT(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},LI.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)})})},LI.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},LI.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},LI),a_=(DI.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},DI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(DI.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(DI.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),DI.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},DI.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},DI.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},DI),u_=(PI.of=function(e,t){return new PI(e,t.filterBy(e))},PI.prototype.with=function(e){return PI.of(e,this.cohorts.filterBy(e))},PI.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return PI.of(this.user,e)},PI),c_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},l_=(Object.defineProperty(UI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:UI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),UI.prototype.addListener=function(e){this.sessionListeners.push(e)},UI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},UI.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)},UI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},UI.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)})},UI.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},UI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},UI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},UI.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},UI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},UI.EMPTY_SESSION_ID="0.ffffffff",UI),p_=(MI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},MI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},MI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},MI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},MI),f_=(kI.postfix=function(e,t){return new kI(e,function(e){return"".concat(e).concat(t)})},kI.prefix=function(e,t){return new kI(e,function(e){return"".concat(t).concat(e)})},kI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},kI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},kI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},kI),d_=(xI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},xI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},xI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},xI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},xI.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[]}},xI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},xI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},xI.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]},xI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(t){}},xI.prototype.clear=function(){this.delegate.removeItem(this.listKey)},xI),h_=(CI.prototype.currentUser=function(){return this.userManager.resolve()},CI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},CI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},CI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},CI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},CI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},CI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},CI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},CI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},CI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},CI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},CI.prototype.increment=function(e,t){Zn.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},CI),y_=(SI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},SI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},SI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},SI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},SI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},SI.monitoring=function(e){return"".concat(e,"/metrics")},SI),v_=(RI.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)},RI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},RI.prototype.key=function(e){return"".concat(e.key)},RI),m_=(NI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},NI),g_=(OI.prototype.handle=function(e,t){e.close()},OI.prototype.supports=function(e){return"CLOSE"===e.type},OI),E_=(AI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},AI.prototype.supports=function(e){return"WEB_LINK"===e.type},AI),w_=(II.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},II),b_=(_I.prototype.handle=function(e,t){var r=this.clock.currentMillis()+_I.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},_I.prototype.supports=function(e){return"HIDDEN"===e.type},_I.HIDE_EXPIRATION=864e5,_I),T_=(TI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},TI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},TI),__=(bI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},bI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},bI),I_=(wI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},wI),A_=(EI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},EI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},EI),O_=(gI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},gI.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}}}},gI),N_=(mI.prototype.present=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},mI),R_=(vI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},vI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},vI),S_=(yI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},yI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new QT(e.inAppMessage,e.message,t.user,Xe.sanitize({decision_reason:e.reason}))},yI),C_=(hI.prototype.open=function(){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(hI.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(hI.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(hI.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]}})})},hI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(hI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},hI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(hI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},hI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},hI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},hI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},hI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",hI.CONTAINER_CLASS_NAME="hackle-iam",hI),x_=(dI.prototype.create=function(e,t){return new C_(this.scriptLoader,e,t)},dI),k_=(fI.prototype.load=function(){return o(this,void 0,void 0,function(){var t;return s(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()]}})})},fI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},fI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})},fI),M_=(pI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},pI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=U_.of(e,t,r);return this.targetMatcher.anyMatches(e,ZE.create(),n.targets)},pI),U_=(lI.of=function(e,t,r){return new lI(new WE("IN_APP_MESSAGE",r.key),e,t.user,t)},lI),P_=(cI.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 i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},cI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new D_(new L_(i)))}return e.durationCap&&t.push(new D_(new F_(e.durationCap))),t},cI),D_=(uI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},uI),L_=(Object.defineProperty(aI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),aI.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},aI),F_=(Object.defineProperty(sI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),sI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},sI),j_=(oI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},oI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},oI),V_=(iI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},iI),H_=(nI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},nI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>nI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-nI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},nI.prototype.supports=function(e){return"IMPRESSION"===e.type},nI.IMPRESSION_MAX_SIZE=100,nI),z_=(rI.prototype.process=function(e,t,r){},rI.prototype.supports=function(e){return"CLOSE"===e.type},rI),B_=(tI.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},tI.prototype.supports=function(e){return"ACTION"===e.type},tI),G_=(eI.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)},eI),K_=(Q1.prototype.matches=function(e,t,r){return!!jE.isTrackEvent(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},Q1),J_=(Z1.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},Z1),Y_=(W1.prototype.handle=function(e,t){e.close()},W1.prototype.supports=function(e){return"CLOSE"===e.type},W1),q_=(X1.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))},X1.prototype.supports=function(e){return"ACTION"===e.type},X1),$_=($1.prototype.open=function(e){window.location.href=e.href},$1),X_=(q1.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},q1),W_=(Y1.prototype.open=function(e){window.open(e.href)},Y1),Z_=(J1.prototype.open=function(e){window.location.replace(e)},J1),Q_={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},e1={current:void 0,referrer:void 0},t1=(K1.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},Q_),t),n=new Gi,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],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)},K1.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),i=this.parser.parse(),o=this.parser.parseDomain();r=i,o=o,null!==(n=n)&&(e_(r,Q_)&&o.current===o.referrer||e_(n,r))||(this.storage.set(i),this.startNewCampaign(e,i,t))},K1.prototype.onSessionEnded=function(e,t,r){},K1.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},K1),r1=(G1.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},G1.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},G1),n1=(B1.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},B1.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(t[o]=decodeURIComponent(i))}return t},B1.getQueryParams=function(){return"undefined"==typeof window?{}:new B1(window.location.search).getQueryParams()},B1),i1=(z1.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},z1.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z1.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,z1),o1=(H1.prototype.parse=function(){var e=n1.getQueryParams();return{utm_campaign:e[s1],utm_content:e[a1],utm_id:e[u1],utm_medium:e[c1],utm_source:e[l1],utm_term:e[p1],gclid:e[f1],fbclid:e[d1]}},H1.prototype.parseDomain=function(){return"undefined"==typeof window?e1:{current:i1.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,i1.extractDomain(e)}()}},H1),s1="utm_campaign",a1="utm_content",u1="utm_id",c1="utm_medium",l1="utm_source",p1="utm_term",f1="gclid",d1="fbclid",h1=(V1.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},V1.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){i.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},V1),y1=(j1.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!(t&&t.getAttributes().integration_ga_experiment&&jE.isExposureEvent(e))||"RUNNING"!==e.experiment.status||e.decisionReason!==f.TRAFFIC_ALLOCATED?null:e},j1),v1={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.26.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"},m1=(F1.config=function(e){return c(c({},v1),e)},F1.logging=function(e){i.initCounter(function(e){return Zn.counter("log",{level:e})}),i.setLogLevel(Fe.INFO),e.log_disabled?i.setLogLevel(Fe.DISABLE):e.debug&&i.setLogLevel(Fe.DEBUG)},F1.sdk=function(e,t){return i.log.debug("SDK key: ".concat(e)),e||i.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}},F1.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&i.log.debug("support sendBeacon API"),e},F1.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},F1.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(i.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},F1),g1=(L1.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},L1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t=this;return s(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]}})})},L1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},L1.prototype.close=function(){return o(this,void 0,void 0,function(){var t=this;return s(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]}})})},L1.prototype.safe=function(r){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},L1),E1=(D1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.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()}))},D1.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},D1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},D1),w1=(P1.prototype.schedule=function(e,t){e=new b1(e,t);return e.start(),e},P1.prototype.schedulePeriodically=function(e,t,r){e=new T1(e,t,r);return e.start(),e},P1),b1=(U1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},U1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},U1),T1=(M1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},M1.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},M1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},M1),_1=(k1.prototype.getExperiments=function(){return Array.from(this.experiments.values())},k1.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},k1.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},k1.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},k1.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},k1.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},k1.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},k1.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},k1.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},k1.prototype.getContainerOrNull=function(e){return this.containers.get(e)},k1.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},k1.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},k1.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},k1.prototype.getAttributes=function(){return this.attributes},k1.from=function(e){return new k1(p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return gt.fromJson("FEATURE_FLAG",e)}),e.buckets.map(wt.fromJson),e.events.map(Tt.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(kt.fromJson),e.parameterConfigurations.map(mt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ut.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,Or.fromJson),e.workspace.attributes)},k1),I1=(x1.prototype.fetchIfModified=function(){return o(this,void 0,void 0,function(){var t;return s(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)]}})})},x1.prototype.createRequest=function(){var e=ei.builder().url(this.url).method("GET");return null!==this.lastModified&&e.addHeader(ni.IF_MODIFIED_SINCE,this.lastModified),e.build()},x1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.workspace",t,null),r;case 4:return[2]}})})},x1.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(ni.LAST_MODIFIED);e=JSON.parse(e.body);return _1.from(e)},x1),A1=(C1.prototype.fetch=function(r){return o(this,void 0,void 0,function(){var t;return s(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)]}})})},C1.prototype.createRequest=function(e){e={identifiers:lt(e)},e=Le.Base64.encodeURL(JSON.stringify(e));return ei.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},C1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.cohorts",t,null),r;case 4:return[2]}})})},C1.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 r_.fromDto(e)},C1),O1=(S1.prototype.get=function(){return this.workspace},S1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(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(),i.log.error("Failed to fetch workspace: ".concat(t)),[3,3];case 3:return[2]}})})},S1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},S1),N1=(R1.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},R1.prototype.shutdownDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},R1.prototype.normalDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(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]}})})},R1);function R1(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}function S1(e){this.httpWorkspaceFetcher=e,this.workspace=null}function C1(e,t){this.url=e,this.transport=t}function x1(e,t){this.url=e,this.transport=t,this.lastModified=null}function k1(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}function M1(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}function U1(e,t){this.delayMillis=e,this.task=t,this.timeout=null}function P1(){}function D1(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}function L1(){this.synchronizations=[]}function F1(){}function j1(e){this.workspaceFetcher=e}function V1(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 H1(){}function z1(){}function B1(e){this.search=e}function G1(e){this.storage=e}function K1(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}function J1(){}function Y1(){}function q1(){}function $1(){}function X1(e){this.eventHandler=e}function W1(){}function Z1(e){this.handlers=e}function Q1(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function eI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function tI(e){this.actionHandlerFactory=e}function rI(){}function nI(e){this.impressionStorage=e}function iI(e){this.processors=e}function oI(e){this.storage=e}function sI(e){this.durationCap=e}function aI(e){this.identifierCap=e}function uI(e){this.matchCount=0,this.predicate=e}function cI(e){this.storage=e}function lI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function pI(e){this.targetMatcher=e}function fI(e){this.scriptUrl=e}function dI(e){this.scriptLoader=e}function hI(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===hI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function yI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function vI(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 mI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function gI(e){this.core=e}function EI(e){this.urlHandler=e}function wI(e){this.urlHandler=e}function bI(e){this.urlHandler=e}function TI(e){this.urlHandler=e}function _I(e,t){this.storage=e,this.clock=t}function II(e){this.urlHandler=e}function AI(e){this.urlHandler=e}function OI(){}function NI(e){this.handlers=e}function RI(e){this.storage=e}function SI(){}function CI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}function xI(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 kI(e,t){this.delegate=e,this.transform=t}function MI(){this.storage=window.localStorage}function UI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function PI(e,t){this.user=e,this.cohorts=t}function DI(e){this.storage=e}function LI(e,t,r,n,i,o){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(i,o),this.storage.saveUser(this.context.user)}function FI(){}function U(){}function jI(e){this.cohorts=new xn(qe.isEqual),e&&this.putAll(e)}function VI(e){this.cohorts=e}function HI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}nA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},nA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof jE?jE.isExposureEvent(e)?t.push(e.toDto()):jE.isTrackEvent(e)?r.push(e.toDto()):jE.isRemoteConfigEvent(e)&&n.push(e.toDto()):jE.isExposureEventDto(e)?t.push(e):jE.isTrackEventDto(e)?r.push(e):jE.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return ei.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},nA.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),ai.record("post.events",t,null),r;case 4:return[2]}})})};var zI,BI,GI=nA,KI=(rA.prototype.add=function(e){return this.repository.add(e)},rA.prototype.delete=function(e){return this.repository.delete(e)},rA.prototype.flush=function(){return o(this,void 0,void 0,function(){var t,r;return s(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]}})})},rA),JI=(tA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},tA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},tA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},Ke(eA,BI=tA),Ke(QI,zI=eA),QI.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},QI.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},QI.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},QI.prototype.isPageViewEvent=function(e){return jE.isTrackEvent(e)&&"$page_view"===e.event.key},QI.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},QI.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 i.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},QI.prototype.close=function(){this.flush(!0)},QI),YI=(ZI.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)},ZI),qI=(WI.intercept=function(e,t){return t instanceof YI?t:new YI(e,Qe.instance,t)},WI),$I=(XI.create=function(){return new XI},XI.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(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 ri(n.status,n.responseText,function(e){var t=ni.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)):r(new Error("Request Error")))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})},XI);function XI(){}function WI(){}function ZI(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}function QI(e,t,r,n,i){var o=zI.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}function eA(){return null!==BI&&BI.apply(this,arguments)||this}function tA(){this.listeners={}}function rA(e,t){this.repository=e,this.transport=t}function nA(e,t){this.url=e,this.transport=t}lA.create=function(){return new lA},lA.prototype.send=function(n){var i=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=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(ri.ok())})},lA.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 iA,oA=lA,sA=(cA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)},cA),aA=(uA.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)},uA);function uA(e){this.invocationResponseResolver=e}function cA(e){this.invocationResponseResolver=e}function lA(){}function pA(e,t,r){this.workspace=e,this.experiment=t,this.decision=r}($o=iA=iA||{}).prompt="prompt",$o.function="function",xA.prototype.getInvocator=function(e,t){return e===iA.prompt?new sA(t):e===iA.function?new aA(t):null};var fA=xA,dA=(CA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},CA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},CA),hA=(SA.prototype.determineOrNull=function(e){if(!jE.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new pA(t,o,i)}return null},SA),yA=(RA.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=vA.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.excludeTargets))&&0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.includeTargets)},RA),vA=(NA.of=function(e,t){return new NA(new WE("SPLIT_URL",t.insertId),t.user,e)},NA),mA=(OA.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))},OA),gA=(AA.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(AA.SPLIT_URL_CONFIG_KEY,"")),r=yn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl):null}catch(e){return null}},AA.prototype.resolveByRedirectType=function(e,t){return t&&e===n.SplitUrlRedirectType.MANUAL?this.resolveManualRedirectUrl(t):null},AA.prototype.resolveManualRedirectUrl=function(e){return null!=(e=cw.tryParse(e))?e:null},AA.SPLIT_URL_CONFIG_KEY="redirectUrl",AA),EA=(IA.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return!a.isNullOrUndefined(e)&&Boolean(JSON.parse(e))}catch(e){return!1}},IA.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},IA.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)},IA),wA=(_A.prototype.setNeedDispatch=function(e){this.needDispatch=e},_A.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(_A.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},_A.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done",_A),bA=i.log,TA=null;function _A(){this.needDispatch=!0}function IA(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}function AA(){}function OA(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}function NA(e,t,r){this.key=e,this.user=t,this.workspace=r}function RA(e){this.targetMatcher=e}function SA(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}function CA(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.redirector.redirect(e)},this.initialize()}function xA(){}function kA(e,t){t=m1.config(t);m1.logging(t);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===(o=(new fA).getInvocator(i,new Wi))?(Ao.error("Failed to get invocator with invocationType:".concat(i)),null):new Ro(new Io(o));if(r)return r}}catch(e){bA.error("Unexpected exception while check WebApp client: ".concat(e))}var n=m1.sdk(e,t);if(TA)return bA.debug("use already exists hackleClient"),TA;Qi.initialize();var i=new p_,o=Zi.getInstance({days:3650,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),r=m1.isBeaconSupported(),s=qI.intercept(n,$I.create()),a=qI.intercept(n,oA.create()),u=s,c=(r&&(u=a),new g1),l=new E1(c,new w1,m1.pollingIntervalMillis(t)),p=new I1(y_.clientFetch(t.sdkUrl,n.key),s),p=new O1(p),f=(c.add("workspace",p),new A1(y_.userCohorts(t.sdkUrl),s)),d=new a_(f_.postfix(o,"_".concat(e))),h=d.getUser(),y=t.user||null,v=new s_(wo(),d,f,Qe.instance,h,y),m=(c.add("cohort",v),new l_(t.sessionTimeoutMillis,f_.postfix(o,"_".concat(e.slice(8))))),d=(v.addListener(m),new t_(i,"".concat("hackle-repository-storage","_").concat(e),100)),f=new GI(y_.clientDispatch(t.eventUrl),s),y=f,g=(r&&(y=new GI(y_.beaconDispatch(t.eventUrl,n.key),a)),new KI(d,f)),c=new N1(f,y,g),r=new KE(m1.dedupIntervalMillis(t)),n=new JI(c,100,new w1,500,t.auto_track_page_view),a=new GE(n,r,m,v),E=new wA,d=new nw(new d_(o,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),f=new nw(new d_(o,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),y=new v_(f_.prefix(i,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),c=new j_(f_.prefix(i,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),w=ub.create(p,a,[d,f],y),r=new t1(new r1(f_.postfix(o,"_".concat(e.slice(0,8)))),new o1,w,v),i=new BE(v,w),a=(m.addListener(r),m.addListener(i),new O_(w)),i=new m_([new g_,new E_(new $_),new w_(new $_),new b_(y,Qe.instance),new T_(new X_),new __(new X_),new I_(new W_),new A_(new W_)]),y=new V_([new H_(c),new B_(i),new z_]),i=new G_(Qe.instance,a,y),a=new J_([new Y_,new q_(i)]),y=new k_(y_.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),y=new N_(new x_(y),i,a),i=new K_(new M_(rb.get("targetMatcher")),new P_(c)),a=new S_(p,i,w),c=(new R_(n,a,y),new y1(p)),i=(new h1(n,c),new yA(rb.get("targetMatcher"))),a=new EA(o,"hackle-split-url-redirected",{days:3472222222222222e-20}),y=new hA(p,i,a,w),c=new mA(new gA,new Z_,a,E),o=(new dA(n,y,c),new h_(w,v,d,f)),a=(null==(p=t.devTool)?void 0:p.userExplorer)&&"function"==typeof(null==(i=t.devTool)?void 0:i.userExplorer),n=t.devTool&&a?{manager:t.devTool,userExplorer:o}:void 0,y=new oi(y_.monitoring(t.monitoringUrl),s,u,new w1,6e4),b=(Zn.addRegistry(y),l.start(),new qi(w,l,m,v,n));TA=b;function T(){g.flush().catch(function(e){return bA.warn("Failed to flush retry events: ".concat(e))})}return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){To(),m.updateLastEventTime((new Date).getTime()),b.close(),Zn.globalRegistry.close()}),window.addEventListener("pageshow",T),document.addEventListener("visibilitychange",function(){document.hidden||T()}),t.autoOpenDevTool&&(t.devTool?b.showUserExplorer():bA.error("DevTool is not provided")),c=Date.now(),d=v.currentUser,f=m.currentSessionId,(ZT(h,d)?m.startNewSessionIfNeeded(d,c):m.startNewSession(h,d,c))===f&&r.startNewCampaignIfNeeded(d,c),b.onReady(function(){(new lb).install(w,v);var t,r,e=b;function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t,r,n),i}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)bA.error(e);else try{bA.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)bA.error(e);else try{bA.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)bA.error(e);else try{bA.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)bA.error(e);else try{bA.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)bA.error(e);else try{bA.error(e)}catch(e){}}b.trackPageView(),E.dispatchDoneEventIfNeeded()}),b}td={createInstance:kA,getUserId:wo,setUserId:bo,removeUserId:To,Logger:i},n.Bucket=wt,n.Cohort=ar,n.Container=kt,n.ContainerGroup=Mt,n.CoreVersion=cr,n.Decision=ht,n.DecisionReason=f,n.EmptyHackleRemoteConfig=vt,n.EmptyParameterConfig=et,n.EventType=Tt,n.Experiment=gt,n.FeatureFlagDecision=yt,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Ar,n.IAM_BEHAVIOR=Ir,n.IAM_DISPLAY_TYPE=br,n.IAM_LAYOUT_TYPE=Tr,n.IAM_ORIENTATION=_r,n.IAM_PLATFORM_TYPE=Er,n.IAM_STATUS=gr,n.IAM_TIMEUNIT=wr,n.IdentifierType=_t,n.IdentifiersBuilder=It,n.InAppMessage=Or,n.InAppMessageAction=Jr,n.InAppMessageBackground=Kr,n.InAppMessageButton=Br,n.InAppMessageButtonStyle=Gr,n.InAppMessageContext=Dr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Lr,n.InAppMessageDecision=dt,n.InAppMessageDurationCap=Mr,n.InAppMessageEventFrequencyCap=xr,n.InAppMessageEventTrigger=Sr,n.InAppMessageEventTriggerRule=Cr,n.InAppMessageIdentifierCap=kr,n.InAppMessageImage=jr,n.InAppMessagePeriodAlways=Nr,n.InAppMessagePeriodCustom=Rr,n.InAppMessageTargetContext=Ur,n.InAppMessageText=Vr,n.InAppMessageTextAttribute=Hr,n.InAppMessageTextStyle=zr,n.InAppMessageUserOverride=Pr,n.Logger=i,n.MATCH_OPERATORS=dr,n.MATCH_TYPES=pr,n.MATCH_VALUE_TYPES=fr,n.MetaVersion=lr,n.ParameterConfiguration=mt,n.PropertyOperations=Ki,n.PropertyOperationsBuilder=Gi,n.RemoteConfigDecision=ft,n.RemoteConfigParameter=Ut,n.RemoteConfigParameterValue=Dt,n.RemoteConfigTargetRule=Pt,n.SEGMENT_TYPES=vr,n.Segment=xt,n.Slot=bt,n.SplitUrlConfig=yn,n.SplitUrlTargets=vn,n.TARGET_ACTION_TYPES=hr,n.TARGET_KEY_TYPES=yr,n.Target=At,n.TargetAction=St,n.TargetCondition=Ot,n.TargetKey=Nt,n.TargetMatch=Rt,n.TargetRule=Ct,n.TargetingType=mr,n.Variation=Et,n.Version=ur,n.createInstance=kA,n.default=td,n.getUserId=wo,n.removeUserId=To,n.resolveIdentifiers=lt,n.sanitizeUser=pt,n.setUserId=bo;var MA=function(e,t){return(MA=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 UA=function(){return(UA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function PA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}DA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},DA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},DA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ja=DA;function DA(){this.listeners={}}FA.arePropertiesEqual=function(e,t){var r=FA.coerceUnknownToProperties(e),n=FA.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]})},FA.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var LA=FA;function FA(){}VA.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)&&LA.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&LA.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var jA=VA;function VA(){}var HA=function(n){var e=i,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 i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=l.createInstance(e,UA(UA({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.26.0"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return MA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(UA(UA({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){jA.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i}(Ja);var P={exports:{}},E={},zA=Object.getOwnPropertySymbols,BA=Object.prototype.hasOwnProperty,GA=Object.prototype.propertyIsEnumerable;var Yl=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),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))BA.call(r,o)&&(n[o]=r[o]);if(zA)for(var s=zA(r),a=0;a<s.length;a++)GA.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},KA=Yl,k="function"==typeof Symbol&&Symbol.for,JA=k?Symbol.for("react.element"):60103,YA=k?Symbol.for("react.portal"):60106,ls=k?Symbol.for("react.fragment"):60107,vs=k?Symbol.for("react.strict_mode"):60108,Ls=k?Symbol.for("react.profiler"):60114,qA=k?Symbol.for("react.provider"):60109,$A=k?Symbol.for("react.context"):60110,XA=k?Symbol.for("react.forward_ref"):60112,sc=k?Symbol.for("react.suspense"):60113,WA=k?Symbol.for("react.memo"):60115,ZA=k?Symbol.for("react.lazy"):60116,QA="function"==typeof Symbol&&Symbol.iterator;function eO(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 tO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rO={};function nO(e,t,r){this.props=e,this.context=t,this.refs=rO,this.updater=r||tO}function iO(){}function oO(e,t,r){this.props=e,this.context=t,this.refs=rO,this.updater=r||tO}nO.prototype.isReactComponent={},nO.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(eO(85));this.updater.enqueueSetState(this,e,t,"setState")},nO.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},iO.prototype=nO.prototype;var So=oO.prototype=new iO,sO=(So.constructor=oO,KA(So,nO.prototype),So.isPureReactComponent=!0,{current:null}),aO=Object.prototype.hasOwnProperty,uO={key:!0,ref:!0,__self:!0,__source:!0};function cO(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)aO.call(t,n)&&!uO.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:JA,type:e,key:o,ref:s,props:i,_owner:sO.current}}function lO(e){return"object"==typeof e&&null!==e&&e.$$typeof===JA}var pO=/\/+/g,fO=[];function dO(e,t,r,n){var i;return fO.length?((i=fO.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function hO(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,fO.length<10&&fO.push(e)}function yO(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case JA:case YA:o=!0}}if(o)return n(i,t,""===r?"."+vO(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+vO(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=QA&&t[QA]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+vO(a,s++),n,i);else if("object"===a)throw n=""+t,Error(eO(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function vO(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 mO(e,t){e.func.call(e.context,t,e.count++)}function gO(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?EO(e,n,r,function(e){return e}):null!=e&&(lO(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(pO,"$&/")+"/")+r,e={$$typeof:JA,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function EO(e,t,r,n,i){var o="";yO(e,gO,t=dO(t,o=null!=r?(""+r).replace(pO,"$&/")+"/":o,n,i)),hO(t)}var wO={current:null};function bO(){var e=wO.current;if(null===e)throw Error(eO(321));return e}var TO,_O,IO,qa={ReactCurrentDispatcher:wO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:sO,IsSomeRendererActing:{current:!1},assign:KA},e=(E.Children={map:function(e,t,r){if(null==e)return e;var n=[];return EO(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;yO(e,mO,t=dO(null,null,t,r)),hO(t)},count:function(e){return yO(e,function(){return null},null)},toArray:function(e){var t=[];return EO(e,t,null,function(e){return e}),t},only:function(e){if(lO(e))return e;throw Error(eO(143))}},E.Component=nO,E.Fragment=ls,E.Profiler=Ls,E.PureComponent=oO,E.StrictMode=vs,E.Suspense=sc,E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qa,E.cloneElement=function(e,t,r){if(null==e)throw Error(eO(267,e));var n=KA({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=sO.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)aO.call(t,a)&&!uO.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:JA,type:e.type,key:i,ref:o,props:n,_owner:s}},E.createContext=function(e,t){return(e={$$typeof:$A,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:qA,_context:e},e.Consumer=e},E.createElement=cO,E.createFactory=function(e){var t=cO.bind(null,e);return t.type=e,t},E.createRef=function(){return{current:null}},E.forwardRef=function(e){return{$$typeof:XA,render:e}},E.isValidElement=lO,E.lazy=function(e){return{$$typeof:ZA,_ctor:e,_status:-1,_result:null}},E.memo=function(e,t){return{$$typeof:WA,type:e,compare:void 0===t?null:t}},E.useCallback=function(e,t){return bO().useCallback(e,t)},E.useContext=function(e,t){return bO().useContext(e,t)},E.useDebugValue=function(){},E.useEffect=function(e,t){return bO().useEffect(e,t)},E.useImperativeHandle=function(e,t,r){return bO().useImperativeHandle(e,t,r)},E.useLayoutEffect=function(e,t){return bO().useLayoutEffect(e,t)},E.useMemo=function(e,t){return bO().useMemo(e,t)},E.useReducer=function(e,t,r){return bO().useReducer(e,t,r)},E.useRef=function(e){return bO().useRef(e)},E.useState=function(e){return bO().useState(e)},E.version="16.14.0",{}),Rf=Function.call.bind(Object.prototype.hasOwnProperty),AO=function(){};function OO(e,t,r,n,i){if("production"!==production)for(var o in e)if(IO(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,TO)}catch(e){s=e}!s||s instanceof Error||AO((n||"React class")+": type specification of "+r+" `"+o+"` 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 _O)&&(_O[s.message]=!0,o=i?i():"",AO("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(TO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_O={},IO=Rf,AO=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),OO.resetWarningCache=function(){"production"!==production&&(_O={})},"production"!==production){var NO=Yl,RO=OO,M="function"==typeof Symbol&&Symbol.for,SO=M?Symbol.for("react.element"):60103,CO=M?Symbol.for("react.portal"):60106,xO=M?Symbol.for("react.fragment"):60107,kO=M?Symbol.for("react.strict_mode"):60108,MO=M?Symbol.for("react.profiler"):60114,UO=M?Symbol.for("react.provider"):60109,PO=M?Symbol.for("react.context"):60110,DO=M?Symbol.for("react.concurrent_mode"):60111,LO=M?Symbol.for("react.forward_ref"):60112,FO=M?Symbol.for("react.suspense"):60113,jO=M?Symbol.for("react.suspense_list"):60120,VO=M?Symbol.for("react.memo"):60115,HO=M?Symbol.for("react.lazy"):60116,zO=M?Symbol.for("react.block"):60121,BO=M?Symbol.for("react.fundamental"):60117,GO=M?Symbol.for("react.responder"):60118,KO=M?Symbol.for("react.scope"):60119,JO="function"==typeof Symbol&&Symbol.iterator,YO="@@iterator";function qO(e){if(null===e||"object"!=typeof e)return null;e=JO&&e[JO]||e[YO];return"function"==typeof e?e:null}var $O={current:null},XO={current:null},WO=/^(.*)[\\\/]/,ZO=1;function QO(e){if(null==e)return null;if("number"==typeof e.tag&&oN("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 xO:return"Fragment";case CO:return"Portal";case MO:return"Profiler";case kO:return"StrictMode";case FO:return"Suspense";case jO:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case PO:return"Context.Consumer";case UO:return"Context.Provider";case LO:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case VO:return QO(e.type);case zO:return QO(e.render);case HO:r=(t=e)._status===ZO?t._result:null;if(r)return QO(r)}var t,r;return null}var eN={},tN=null;function rN(e){tN=e}eN.getCurrentStack=null,eN.getStackAddendum=function(){var e,t,r,n,i,o="",s=(tN&&(e=QO(tN.type),r=tN._owner,o+=(e=e,t=tN._source,r=r&&QO(r.type),i="",t?(n=(s=t.fileName).replace(WO,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(WO))&&(s=s[1])?s.replace(WO,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),eN.getCurrentStack);return s&&(o+=s()||""),o};var nN={ReactCurrentDispatcher:$O,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:XO,IsSomeRendererActing:{current:!1},assign:NO};function iN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];sN("warn",e,r)}function oN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];sN("error",e,r)}function sN(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=nN.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 i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}NO(nN,{ReactDebugCurrentFrame:eN,ReactComponentTreeHook:{}});var aN={};function uN(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;aN[r]||(oN("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),aN[r]=!0)}var cN={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){uN(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){uN(e,"replaceState")},enqueueSetState:function(e,t,r,n){uN(e,"setState")}},lN={};function pN(e,t,r){this.props=e,this.context=t,this.refs=lN,this.updater=r||cN}Object.freeze(lN),pN.prototype.isReactComponent={},pN.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")},pN.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var fN,dN={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(fN in dN)dN.hasOwnProperty(fN)&&!function(e,t){Object.defineProperty(pN.prototype,e,{get:function(){iN("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(fN,dN[fN]);function hN(){}function yN(e,t,r){this.props=e,this.context=t,this.refs=lN,this.updater=r||cN}hN.prototype=pN.prototype,(M=yN.prototype=new hN).constructor=yN,NO(M,pN.prototype),M.isPureReactComponent=!0;var vN,mN,gN=Object.prototype.hasOwnProperty,EN={key:!0,ref:!0,__self:!0,__source:!0};function wN(e){if(gN.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function bN(e){if(gN.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var TN={},_N=function(e,t,r,n,i,o,s){e={$$typeof:SO,type:e,key:t,ref:r,props:s,_owner:o,_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:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function IN(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in wN(t)&&(s=t.ref,"string"==typeof(c=t).ref&&XO.current&&c.__self&&XO.current.stateNode!==c.__self&&(p=QO(XO.current.type),TN[p]||(oN('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',QO(XO.current.type),c.ref),TN[p]=!0))),bN(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)gN.call(t,n)&&!EN.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)i.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),i.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===i[n]&&(i[n]=v[n])}function m(){mN||(mN=!0,oN("%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(){vN||(vN=!0,oN("%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(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),_N(e,o,s,a,u,XO.current,i)}function AN(e){return"object"==typeof e&&null!==e&&e.$$typeof===SO}var ON=".",NN=":",RN=!1,SN=/\/+/g;function CN(e){return(""+e).replace(SN,"$&/")}var xN=10,kN=[];function MN(e,t,r,n){var i;return kN.length?((i=kN.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function UN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,kN.length<xN&&kN.push(e)}function PN(e,t,r){return null==e?0:function e(t,r,n,i){var o,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 SO:case CO:a=!0}}if(a)return n(i,t,""===r?ON+DN(t,0):r),1;var u=0,c=""===r?ON:r+NN;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+DN(o,l),n,i);else if("function"==typeof(r=qO(t))){r===t.entries&&(RN||iN("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."),RN=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(o=p.value,c+DN(o,d++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+eN.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 DN(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 LN(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function FN(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?jN(o,n,r,function(e){return e}):null!=o&&(AN(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":CN(o.key)+"/")+r,o=_N(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function jN(e,t,r,n,i){var o="",t=MN(t,o=null!=r?CN(r)+"/":o,n,i);PN(e,FN,t),UN(t)}function VN(e){return"string"==typeof e||"function"==typeof e||e===xO||e===DO||e===MO||e===kO||e===FO||e===jO||"object"==typeof e&&null!==e&&(e.$$typeof===HO||e.$$typeof===VO||e.$$typeof===UO||e.$$typeof===PO||e.$$typeof===LO||e.$$typeof===BO||e.$$typeof===GO||e.$$typeof===KO||e.$$typeof===zO)}function HN(){var e=$O.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 zN(){if(XO.current){var e=QO(XO.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var BN=!1,GN={};function KN(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=zN())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),GN[t=r]||(GN[t]=!0,r="",e&&e._owner&&e._owner!==XO.current&&(r=" It was passed a child from "+QO(e._owner.type)+"."),rN(e),oN('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),rN(null)))}function JN(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];AN(n)&&KN(n,t)}else if(AN(e))e._store&&(e._store.validated=!0);else if(e){var i=qO(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)AN(o.value)&&KN(o.value,t)}}function YN(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=QO(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==LO&&t.$$typeof!==VO)return;r=t.propTypes}r?(rN(e),RO(r,e.props,"prop",n,eN.getStackAddendum),rN(null)):void 0===t.PropTypes||BN||(BN=!0,oN("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||oN("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qN(e,t,r){var n,i=VN(e),t=(i||(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+".":"")||zN(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===SO?(s="<"+(QO(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,oN("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)),IN.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)JN(arguments[o],e);if(e===xO){var s=t;rN(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){oN("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&oN("Invalid attribute `ref` supplied to `React.Fragment`."),rN(null)}else YN(t);return t}var $N=!1;try{var XN=Object.freeze({}),WN=new Map([[XN,null]]),ZN=new Set([XN]);WN.set(0,0),ZN.add(0)}catch(e){}function QN(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,i,o=NO({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in wN(t)&&(a=t.ref,l=XO.current),bN(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)gN.call(t,n)&&!EN.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];o.children=f}return _N(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)JN(arguments[i],n.type);return YN(n),n}function eR(e){var t=qN.bind(null,e);return t.type=e,$N||($N=!0,iN("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 iN("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}M=qN,e.Children={map:function(e,t,r){if(null==e)return e;var n=[];return jN(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=MN(null,null,t,r),PN(e,LN,t),UN(t)},count:function(e){return PN(e,function(){return null},null)},toArray:function(e){var t=[];return jN(e,t,null,function(e){return e}),t},only:function(e){if(AN(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},e.Component=pN,e.Fragment=xO,e.Profiler=MO,e.PureComponent=yN,e.StrictMode=kO,e.Suspense=FO,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nN,e.cloneElement=QN,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&oN("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:PO,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:UO,_context:r}),i=!1,t={$$typeof:PO,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,oN("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,oN("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},e.createElement=M,e.createFactory=eR,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){return null!=e&&e.$$typeof===VO?oN("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?oN("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&oN("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||oN("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:LO,render:e}},e.isValidElement=AN,e.lazy=function(e){var t,r,n={$$typeof:HO,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){oN("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){oN("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},e.memo=function(e,t){return VN(e)||oN("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:VO,type:e,compare:void 0===t?null:t}},e.useCallback=function(e,t){return HN().useCallback(e,t)},e.useContext=function(e,t){var r,n=HN();return void 0!==t&&oN("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?oN("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&&oN("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},e.useDebugValue=function(e,t){return HN().useDebugValue(e,t)},e.useEffect=function(e,t){return HN().useEffect(e,t)},e.useImperativeHandle=function(e,t,r){return HN().useImperativeHandle(e,t,r)},e.useLayoutEffect=function(e,t){return HN().useLayoutEffect(e,t)},e.useMemo=function(e,t){return HN().useMemo(e,t)},e.useReducer=function(e,t,r){return HN().useReducer(e,t,r)},e.useRef=function(e){return HN().useRef(e)},e.useState=function(e){return HN().useState(e)},e.version="16.14.0"}"production"===production?P.exports=E:P.exports=e;var tR=P.exports,rR=P.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Ol=rR.Consumer,nR=rR.Provider;var iR=l.Logger.log;function oR(e,t){e=sR(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function sR(e,t){void 0===t&&(t="A");var r=P.exports.useContext(rR),n=r.hackle,i=r.userVersion,o=r.initialized,s=P.exports.useCallback(function(){return o?(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,o]),r=PA(P.exports.useState(function(){return n?s():(iR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=PA(P.exports.useState(i),2),c=u[0],u=u[1];return cR(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function aR(e){e=uR(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function uR(e){var t=P.exports.useContext(rR),r=t.hackle,n=t.userVersion,i=t.initialized,o=P.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION):l.FeatureFlagDecision.off(l.DecisionReason.SDK_NOT_READY)},[e,r,i]),t=PA(P.exports.useState(function(){return r?o():(iR.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=PA(P.exports.useState(n),2),u=a[0],a=a[1];return cR(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function cR(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function lR(e){var t,r=e.experimentKey,e=e.children,n=(r=oR(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(P.exports.Children.forEach(e,function(e){P.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?P.exports.cloneElement(t,{variation:i}):null)}function pR(e){return e.variation,e=e.children,P.exports.createElement(P.exports.Fragment,null,e)}function fR(e){var t=(r=aR(e.featureKey)).isLoading,r=r.isOn;return t?null:tR.createElement(tR.Fragment,null,e.children(r))}D.HackleContext=rR,D.HackleContextConsumer=Ol,D.HackleContextProvider=nR,D.HackleExperiment=lR,D.HackleFeature=fR,D.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=PA(P.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return P.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),P.exports.useEffect(function(){function e(){a(function(e){return UA(UA({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),P.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return UA(UA({},e),{initialized:!0})})},function(){a(function(e){return UA(UA({},e),{initialized:!0})})}).catch(function(){a(function(e){return UA(UA({},e),{initialized:!0})})})},[t]),i||s.initialized?tR.createElement(nR,{value:s},e):null},D.HackleVariation=pR,D.createInstance=function(e,t){return new HA(e,t)},D.useFeature=function(e){var t=(n=P.exports.useContext(rR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=PA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&iR.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=PA(P.exports.useState(r),2))[0],n=n[1];return cR(a,r)||(n(r),s(i())),o},D.useFeatureFlagDetail=function(e){var t=(n=P.exports.useContext(rR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION)},[e,t,n]),o=(s=PA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&iR.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=PA(P.exports.useState(r),2))[0],n=n[1];return cR(a,r)||(n(r),s(i())),o},D.useLoadableFeature=aR,D.useLoadableFeatureDetail=uR,D.useLoadableRemoteConfig=function(){var e=(o=P.exports.useContext(rR)).hackle,t=o.userVersion,r=o.initialized,n=P.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=PA(P.exports.useState(function(){return e||iR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=PA(P.exports.useState(t),2))[0],a=a[1];return cR(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},D.useLoadableVariation=oR,D.useLoadableVariationDetail=sR,D.useRemoteConfig=function(){var e=(r=P.exports.useContext(rR)).hackle,t=r.userVersion,r=r.initialized,n=P.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=PA(P.exports.useState(function(){return e||iR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=PA(P.exports.useState(t),2))[0],r=r[1];return cR(s,t)||(r(t),o(n())),i},D.useTrack=function(){var t=P.exports.useContext(rR).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(iR.error("HackleClient is not existed"),function(){})},D.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=P.exports.useContext(rR)).hackle,n=a.userVersion,i=a.initialized,o=P.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=PA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&iR.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=PA(P.exports.useState(n),2))[0],c=c[1];return cR(u,n)||(c(n),a(o())),s},D.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=P.exports.useContext(rR)).hackle,n=i.userVersion,i=i.initialized,o=P.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION)},[t,e,r,i]),s=(a=PA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&iR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=PA(P.exports.useState(n),2))[0],i=i[1];return cR(u,n)||(i(n),a(o())),s},Object.defineProperty(D,"__esModule",{value:!0})});
|