@hackler/react-sdk 11.19.0 → 11.21.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.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(p){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(r){if(r.__esModule)return r;var n=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),n}var L,t={},F=new Uint8Array(16);function j(){if(L=L||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return L(F);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function H(e){return"string"==typeof e&&V.test(e)}for(var G,K,B=[],z=0;z<256;++z)B.push((z+256).toString(16).substr(1));function q(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase();if(H(e))return e;throw TypeError("Stringified UUID is invalid")}var Y=0,J=0;function $(e){if(!H(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function X(e,s,a){function t(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),16!==(t="string"==typeof t?$(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(t),o.set(e,t.length),(o=a(o))[6]=15&o[6]|s,o[8]=63&o[8]|128,r){n=n||0;for(var i=0;i<16;++i)r[n+i]=o[i];return r}return q(o)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function W(e){return 14+(e+64>>>9<<4)+1}function Z(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function Q(e,t,r,n,o,i){return Z((t=Z(Z(t,e),Z(n,i)))<<o|t>>>32-o,r)}function ee(e,t,r,n,o,i,s){return Q(t&r|~t&n,e,t,o,i,s)}function te(e,t,r,n,o,i,s){return Q(t&n|r&~n,e,t,o,i,s)}function re(e,t,r,n,o,i,s){return Q(t^r^n,e,t,o,i,s)}function ne(e,t,r,n,o,i,s){return Q(r^(t|~n),e,t,o,i,s)}var r=X("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}for(var n=function(e,t){e[t>>5]|=128<<t%32,e[W(t)-1]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=o,p=i;r=ee(r,n,o,i,e[s],7,-680876936),i=ee(i,r,n,o,e[s+1],12,-389564586),o=ee(o,i,r,n,e[s+2],17,606105819),n=ee(n,o,i,r,e[s+3],22,-1044525330),r=ee(r,n,o,i,e[s+4],7,-176418897),i=ee(i,r,n,o,e[s+5],12,1200080426),o=ee(o,i,r,n,e[s+6],17,-1473231341),n=ee(n,o,i,r,e[s+7],22,-45705983),r=ee(r,n,o,i,e[s+8],7,1770035416),i=ee(i,r,n,o,e[s+9],12,-1958414417),o=ee(o,i,r,n,e[s+10],17,-42063),n=ee(n,o,i,r,e[s+11],22,-1990404162),r=ee(r,n,o,i,e[s+12],7,1804603682),i=ee(i,r,n,o,e[s+13],12,-40341101),o=ee(o,i,r,n,e[s+14],17,-1502002290),n=ee(n,o,i,r,e[s+15],22,1236535329),r=te(r,n,o,i,e[s+1],5,-165796510),i=te(i,r,n,o,e[s+6],9,-1069501632),o=te(o,i,r,n,e[s+11],14,643717713),n=te(n,o,i,r,e[s],20,-373897302),r=te(r,n,o,i,e[s+5],5,-701558691),i=te(i,r,n,o,e[s+10],9,38016083),o=te(o,i,r,n,e[s+15],14,-660478335),n=te(n,o,i,r,e[s+4],20,-405537848),r=te(r,n,o,i,e[s+9],5,568446438),i=te(i,r,n,o,e[s+14],9,-1019803690),o=te(o,i,r,n,e[s+3],14,-187363961),n=te(n,o,i,r,e[s+8],20,1163531501),r=te(r,n,o,i,e[s+13],5,-1444681467),i=te(i,r,n,o,e[s+2],9,-51403784),o=te(o,i,r,n,e[s+7],14,1735328473),n=te(n,o,i,r,e[s+12],20,-1926607734),r=re(r,n,o,i,e[s+5],4,-378558),i=re(i,r,n,o,e[s+8],11,-2022574463),o=re(o,i,r,n,e[s+11],16,1839030562),n=re(n,o,i,r,e[s+14],23,-35309556),r=re(r,n,o,i,e[s+1],4,-1530992060),i=re(i,r,n,o,e[s+4],11,1272893353),o=re(o,i,r,n,e[s+7],16,-155497632),n=re(n,o,i,r,e[s+10],23,-1094730640),r=re(r,n,o,i,e[s+13],4,681279174),i=re(i,r,n,o,e[s],11,-358537222),o=re(o,i,r,n,e[s+3],16,-722521979),n=re(n,o,i,r,e[s+6],23,76029189),r=re(r,n,o,i,e[s+9],4,-640364487),i=re(i,r,n,o,e[s+12],11,-421815835),o=re(o,i,r,n,e[s+15],16,530742520),n=re(n,o,i,r,e[s+2],23,-995338651),r=ne(r,n,o,i,e[s],6,-198630844),i=ne(i,r,n,o,e[s+7],10,1126891415),o=ne(o,i,r,n,e[s+14],15,-1416354905),n=ne(n,o,i,r,e[s+5],21,-57434055),r=ne(r,n,o,i,e[s+12],6,1700485571),i=ne(i,r,n,o,e[s+3],10,-1894986606),o=ne(o,i,r,n,e[s+10],15,-1051523),n=ne(n,o,i,r,e[s+1],21,-2054922799),r=ne(r,n,o,i,e[s+8],6,1873313359),i=ne(i,r,n,o,e[s+15],10,-30611744),o=ne(o,i,r,n,e[s+6],15,-1560198380),n=ne(n,o,i,r,e[s+13],21,1309151649),r=ne(r,n,o,i,e[s+4],6,-145523070),i=ne(i,r,n,o,e[s+11],10,-1120210379),o=ne(o,i,r,n,e[s+2],15,718787259),n=ne(n,o,i,r,e[s+9],21,-343485551),r=Z(r,a),n=Z(n,u),o=Z(o,c),i=Z(i,p)}return[r,n,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(W(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),o=[],i=32*n.length,s="0123456789abcdef",a=0;a<i;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);o.push(u)}return o});function oe(e,t){return e<<t|e>>>32-t}var ie=X("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var o=0;o<n.length;++o)e.push(n.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),p=0;p<16;++p)c[p]=e[64*u+4*p]<<24|e[64*u+4*p+1]<<16|e[64*u+4*p+2]<<8|e[64*u+4*p+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 l=0;l<s;++l){for(var f=new Uint32Array(80),d=0;d<16;++d)f[d]=a[l][d];for(var h=16;h<80;++h)f[h]=oe(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var y=r[0],v=r[1],m=r[2],g=r[3],E=r[4],w=0;w<80;++w)var T=Math.floor(w/20),T=oe(y,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(T,v,m,g)+E+t[T]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=T;r[0]=r[0]+y>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});var se,r=D(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||G,r=void 0!==e.clockseq?e.clockseq:K,s=(null!=i&&null!=r||(s=e.random||(e.rng||j)(),null==i&&(i=G=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=K=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:J+1,u=s-Y+(a-J)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||Y<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Y=s,K=r,u=(1e4*(268435455&(s+=122192928e5))+(J=a))%4294967296,o[n++]=u>>>24&255,o[n++]=u>>>16&255,o[n++]=u>>>8&255,o[n++]=255&u,e=s/4294967296*1e4&268435455,o[n++]=e>>>8&255,o[n++]=255&e,o[n++]=e>>>24&15|16,o[n++]=e>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var c=0;c<6;++c)o[n+c]=i[c];return t||q(o)},v3:r,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||j)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return q(n)},v5:ie,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(H(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:H,stringify:q,parse:$})),ae=(p.setUserId=void 0,p.sanitizeUser=void 0,p.removeUserId=void 0,p.getUserId=void 0,p.Version=void 0,p.Variation=void 0,p.TargetingType=void 0,p.TargetRule=void 0,p.TargetMatch=void 0,p.TargetKey=void 0,p.TargetCondition=void 0,p.TargetAction=void 0,p.Target=void 0,p.TARGET_KEY_TYPES=void 0,p.TARGET_ACTION_TYPES=void 0,p.Slot=void 0,p.Segment=void 0,p.SEGMENT_TYPES=void 0,p.RemoteConfigTargetRule=void 0,p.RemoteConfigParameterValue=void 0,p.RemoteConfigParameter=void 0,p.RemoteConfigDecision=void 0,p.PropertyOperationsBuilder=void 0,p.PropertyOperations=void 0,p.ParameterConfiguration=void 0,p.MetaVersion=void 0,p.MATCH_VALUE_TYPES=void 0,p.MATCH_TYPES=void 0,p.MATCH_OPERATORS=void 0,p.Logger=void 0,p.InAppMessageUserOverride=void 0,p.InAppMessageTextStyle=void 0,p.InAppMessageTextAttribute=void 0,p.InAppMessageText=void 0,p.InAppMessageTargetContext=void 0,p.InAppMessagePeriodCustom=void 0,p.InAppMessagePeriodAlways=void 0,p.InAppMessageImage=void 0,p.InAppMessageIdentifierCap=void 0,p.InAppMessageEventTriggerRule=void 0,p.InAppMessageEventTrigger=void 0,p.InAppMessageEventFrequencyCap=void 0,p.InAppMessageDurationCap=void 0,p.InAppMessageDecision=void 0,p.InAppMessageContextMessage=void 0,p.InAppMessageContextLayout=void 0,p.InAppMessageContext=void 0,p.InAppMessageButtonStyle=void 0,p.InAppMessageButton=void 0,p.InAppMessageBackground=void 0,p.InAppMessageAction=void 0,p.InAppMessage=void 0,p.IdentifiersBuilder=void 0,p.IdentifierType=void 0,p.IAM_TIMEUNIT=void 0,p.IAM_STATUS=void 0,p.IAM_PLATFORM_TYPE=void 0,p.IAM_ORIENTATION=void 0,p.IAM_LAYOUT_TYPE=void 0,p.IAM_DISPLAY_TYPE=void 0,p.IAM_BEHAVIOR=void 0,p.IAM_ACTION_TYPE=void 0,p.IAM_ACTION_AREA=void 0,p.FeatureFlagDecision=void 0,p.Experiment=void 0,p.EventType=void 0,p.EmptyParameterConfig=void 0,p.EmptyHackleRemoteConfig=void 0,p.DecisionReason=void 0,p.Decision=void 0,p.CoreVersion=void 0,p.ContainerGroup=void 0,p.Container=void 0,p.Bucket=void 0,Object.defineProperty(t,"__esModule",{value:!0}),r),ue=function(e,t){return(ue=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 ce(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}ue(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var E=function(){return(E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function pe(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((u=u.apply(e,s||[])).next())})}function le(n,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((a=0<(a=u.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],s=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function fe(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Te.isNotNullOrUndefined=function(e){return null!=e},Te.isNullOrUndefined=function(e){return null==e},Te.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},Te.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=Te,c=(we.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);a.isNotNullOrUndefined(i)&&r.push(i)}return r},we.mapOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r},we.associateTo=function(e,t,r){for(var n=0,o=e;n<o.length;n++){var i=r(o[n]);t.set(i[0],i[1])}return t},we.associate=function(e,t){return this.associateTo(e,new Map,t)},we.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},we.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},we),de={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},w=(Ee.setLogLevel=function(e){this.logLevel=e=void 0===e?de.INFO:e},Ee.initCounter=function(t){this.counters=c.associate(Object.keys(de),function(e){return[e,t(e)]})},Ee._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)he.log(e,r,t.message,t);else try{he.log(e,r,t)}catch(e){}},Ee.increment=function(e){var t;null!=(t=null==(t=Ee.counters)?void 0:t.get(e))&&t.increment()},Ee.logLevel=de.INFO,Ee.log={error:function(e){de.ERROR<=Ee.logLevel&&(Ee._log("ERROR",e),Ee.increment("ERROR"))},warn:function(e){de.WARN<=Ee.logLevel&&(Ee._log("WARN",e),Ee.increment("WARN"))},info:function(e){de.INFO<=Ee.logLevel&&(Ee._log("INFO",e),Ee.increment("INFO"))},debug:function(e){de.DEBUG<=Ee.logLevel&&(Ee._log("DEBUG",e),Ee.increment("DEBUG"))}},Ee),he=(ge.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},ge),ye="X-HACKLE-SDK-NAME",ve=[0,8,16,32,64,128,256,512],me=w.log;function ge(){}function Ee(){}function we(){}function Te(){}function _e(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])}var Ie={getRequest:function(n,o){return{abort:function(){},responsePromise:new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",n),r.onreadystatechange=function(){r.readyState===r.DONE&&(0===r.status?t(new Error("Request error")):e({statusCode:r.status,body:r.responseText}))},r.onerror=function(){t()},r.setRequestHeader("content-type","application/json"),_e(r,o),r.send()})}},postRequest:function(e,t,r,n,o){var t=JSON.stringify(t),i=new XMLHttpRequest;i.open("POST",e),i.onreadystatechange=function(){i.readyState===i.DONE&&(200<=i.status&&i.status<400?n({statusCode:i.status}):o&&o({statusCode:i.status}))},i.setRequestHeader("content-type","application/json"),_e(i,r),i.send(t)},sendBeacon:function(e,t,r,n,o){var i=!1;if(i="undefined"!=typeof window?window&&window.navigator&&window.navigator.sendBeacon&&!0:i){i=JSON.stringify(t),t=new URLSearchParams;if(t.append("sdkName",r[ye]),t.append("sdkVersion",r["X-HACKLE-SDK-VERSION"]),t.append("sdkKey",r["X-HACKLE-SDK-KEY"]),t.append("data",i),!window.navigator.sendBeacon(e,t))return me.error("sendBeacon failed to queue request."),void o();n()}else me.error("Does not support sendBeacon"),o()}},Ae=w.log,be=(ke.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]})},ke.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],i=o[0],o=o[1];this.isValidType(i)?(o=this.sanitizeValue(o),a.isNullOrUndefined(o)?Ae.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(i,"]")):t[i]=o):Ae.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(i,"]"))}return t},ke.isValidType=function(e){return!a.isNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},ke.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},ke.MAX_IDENTIFIER_TYPE_LENGTH=128,ke.MAX_IDENTIFIER_VALUE_LENGTH=512,ke),Oe=w.log,Ne=(Pe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o,i=n[r],s=i[0],i=i[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Oe.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(i,"]"));break}this.isValidKey(s)?(o=this.sanitizeValue(s,i),a.isNullOrUndefined(o)?Oe.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(i,"]")):t[s]=o):Oe.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Pe.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Pe.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Pe.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},Pe.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))},Pe.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Pe.SYSTEM_PROPERTY_KEY_PREFIX="$",Pe.MAX_PROPERTIES_COUNT=128,Pe.MAX_PROPERTY_KEY_LENGTH=128,Pe.MAX_PROPERTY_VALUE_LENGTH=1024,Pe),Re=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Ce=(n.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(n.C1/n.C0);case"milliseconds":return e/(n.C2/n.C0);case"seconds":return e/(n.C3/n.C0);case"minutes":return e/(n.C4/n.C0);case"hours":return e/(n.C5/n.C0);case"days":return e/(n.C6/n.C0)}},n.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C1/n.C0);case"milliseconds":return e/(n.C2/n.C1);case"microseconds":return e;case"seconds":return e/(n.C3/n.C1);case"minutes":return e/(n.C4/n.C1);case"hours":return e/(n.C5/n.C1);case"days":return e/(n.C6/n.C1)}},n.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C2/n.C0);case"microseconds":return e*(n.C2/n.C1);case"milliseconds":return e;case"seconds":return e/(n.C3/n.C2);case"minutes":return e/(n.C4/n.C2);case"hours":return e/(n.C5/n.C2);case"days":return e/(n.C6/n.C2)}},n.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C3/n.C0);case"microseconds":return e*(n.C3/n.C1);case"milliseconds":return e*(n.C3/n.C2);case"seconds":return e;case"minutes":return e/(n.C4/n.C3);case"hours":return e/(n.C5/n.C3);case"days":return e/(n.C6/n.C3)}},n.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C4/n.C0);case"microseconds":return e*(n.C4/n.C1);case"milliseconds":return e*(n.C4/n.C2);case"seconds":return e*(n.C4/n.C3);case"minutes":return e;case"hours":return e/(n.C5/n.C4);case"days":return e/(n.C6/n.C4)}},n.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C5/n.C0);case"microseconds":return e*(n.C5/n.C1);case"milliseconds":return e*(n.C5/n.C2);case"seconds":return e*(n.C5/n.C3);case"minutes":return e*(n.C5/n.C4);case"hours":return e;case"days":return e/(n.C6/n.C5)}},n.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C6/n.C0);case"microseconds":return e*(n.C6/n.C1);case"milliseconds":return e*(n.C6/n.C2);case"seconds":return e*(n.C6/n.C3);case"minutes":return e*(n.C6/n.C4);case"hours":return e*(n.C6/n.C5);case"days":return e}},n.C6=24*(n.C5=60*(n.C4=60*(n.C3=1e3*(n.C2=1e3*(n.C1=1e3*(n.C0=1)))))),n.converter={nanoseconds:n.nanosToUnit,microseconds:n.microsToUnit,milliseconds:n.millisToUnit,seconds:n.secondsToUnit,minutes:n.minutesToUnit,hours:n.hoursToUnit,days:n.daysToUnit},n),Se=(xe.prototype.tick=function(){return 1e3*Date.now()},xe.prototype.currentMillis=function(){return Date.now()},xe.instance=new xe,xe),Me=w.log;function xe(){}function n(){}function Pe(){}function ke(){}function Ue(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Me.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function De(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,o=t;n<o.length;n++){var i=Ue(e,o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r}}function Le(e){var t,r={};return r.id=null!=(t=be.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=be.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=be.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ne.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=be.sanitize(e.identifiers)),Boolean(r.id||r.userId||r.deviceId||r.identifiers&&0<Object.keys(r.identifiers).length)?r:null}Pt.of=function(e,t){return new Pt(e,t)};var Fe=Pt,je=(xt.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},xt.of=function(e,t,r){return new xt(t,r,e)},xt),Ve=(Mt.of=function(e,t,r){return new Mt(e,t,r=void 0===r?new Ge:r)},Mt.prototype.get=function(e,t){return this.config.get(e,t)},Mt),He=(St.on=function(e,t){return new St(!0,e,t=void 0===t?new Ge:t)},St.off=function(e,t){return new St(!1,e,t=void 0===t?new Ge:t)},St.prototype.get=function(e,t){return this.config.get(e,t)},St),ie=(Ct.prototype.get=function(e,t){return t},Ct),Ge=(Rt.prototype.get=function(e,t){return t},Rt),s=(o.SDK_NOT_READY="SDK_NOT_READY",o.EXCEPTION="EXCEPTION",o.INVALID_INPUT="INVALID_INPUT",o.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",o.TYPE_MISMATCH="TYPE_MISMATCH",o.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",o.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",o.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",o.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",o.OVERRIDDEN="OVERRIDDEN",o.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",o.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",o.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",o.VARIATION_DROPPED="VARIATION_DROPPED",o.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",o.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",o.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",o.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",o.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",o.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",o.TARGET_RULE_MATCH="TARGET_RULE_MATCH",o.DEFAULT_RULE="DEFAULT_RULE",o.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",o.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",o.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",o.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",o.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",o.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",o.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",o.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",o),Ke=(Nt.fromJson=function(e,t){var r=Nt.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new Be(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),o=c.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),i=c.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return tt.fromJson(e,Kt.IDENTIFIER)}),s=c.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Xe.fromJson(e,Kt.PROPERTY)}),a=c.mapNotNullOrUndefined(t.execution.targetRules,function(e){return tt.fromJson(e,Kt.PROPERTY)}),u=et.fromJson(t.execution.defaultRule);return r&&u&&new Nt(t.id,t.key,e,t.identifierType,r,t.version,n,o,i,s,a,u,t.containerId,t.winnerVariationId)},Nt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Me.debug("Unsupported status [".concat(e,"]"))}},Nt.prototype._winnerVariationOrNull=function(){if(this._winnerVariationId)return this._getVariationByIdOrNull(this._winnerVariationId)},Nt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Nt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Nt),Be=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ze=(Ot.fromJson=function(e){return new Ot(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new qe(t,r,e)}))},Ot),qe=(bt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},bt),Ye=(At.fromJson=function(e){return new At(e.id,e.key)},At),Je=(It.ID="$id",It.USER="$userId",It.DEVICE="$deviceId",It.SESSION="$sessionId",It.HACKLE_DEVICE="$hackleDeviceId",It),$e=(_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=be.sanitizeValue(t);return be.isValidType(e)&&r?this.identifiers[e]=t:Me.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},_t.prototype.build=function(){return this.identifiers},_t),Xe=(Tt.fromJson=function(e,t){return new Tt(c.mapNotNullOrUndefined(e.conditions,function(e){return We.fromJson(e,t)}))},Tt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},Tt),We=(wt.fromJson=function(e,t){var r=Ze.fromJson(e.key);if(r&&t.supports(r.type))return(t=Qe.fromJson(e.match))&&new wt(r,t)},wt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},wt),Ze=(Et.fromJson=function(e){var t=Ue(Ht,e.type);return t&&new Et(t,e.name)},Et.prototype.toJson=function(){return{type:this.type,name:this.name}},Et),Qe=(gt.fromJson=function(e){var t=Ue(Lt,e.type),r=Ue(jt,e.operator),n=Ue(Ft,e.valueType);return t&&r&&n&&new gt(t,r,n,e.values)},gt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},gt),et=(mt.fromJson=function(e){var t=Ue(Vt,e.type);return t&&new mt(t,e.variationId,e.bucketId)},mt),tt=(vt.fromJson=function(e,t){t=Xe.fromJson(e.target,t),e=et.fromJson(e.action);return t&&e&&new vt(t,e)},vt),rt=(yt.fromJson=function(e){var t=Ue(Gt,e.type);return t&&new yt(e.id,e.key,t,c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Kt.SEGMENT)}))},yt),nt=(ht.fromJson=function(e){return new ht(e.id,e.bucketId,e.groups.map(function(e){return ot.fromJson(e)}))},ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},ht),ot=(dt.fromJson=function(e){return new dt(e.id,e.experiments)},dt),it=(ft.fromJson=function(e){return new ft(e.id,c.associate(e.parameters,function(e){return[e.key,e.value]}))},ft.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t},ft),st=(lt.fromJson=function(e){var t=Ue(Ft,e.type),r=c.mapNotNullOrUndefined(e.targetRules,function(e){return at.fromJson(e,Kt.PROPERTY)}),n=ut.fromJson(e.defaultValue);return t&&new lt(e.id,e.key,t,e.identifierType,r,n)},lt),at=(pt.fromJson=function(e,t){t=Xe.fromJson(e.target,t);return t&&new pt(e.key,e.name,t,e.bucketId,ut.fromJson(e.value))},pt),ut=(ct.fromJson=function(e){return new ct(e.id,e.value)},ct);function ct(e,t){this.id=e,this.rawValue=t}function pt(e,t,r,n,o){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=o}function lt(e,t,r,n,o,i){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=o,this.defaultValue=i}function ft(e,t){this.id=e,this.parameters=t}function dt(e,t){this.id=e,this.experiments=t}function ht(e,t,r){this.id=e,this.bucketId=t,this.groups=r}function yt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function vt(e,t){this.target=e,this.action=t}function mt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}function gt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}function Et(e,t){this.type=e,this.name=t}function wt(e,t){this.key=e,this.match=t}function Tt(e){this.conditions=e}function _t(){this.identifiers={}}function It(){}function At(e,t){this.id=e,this.key=t}function bt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}function Ot(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}function Nt(e,t,r,n,o,i,s,a,u,c,p,l,f,d){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=o,this.version=i,this.variations=s,this.userOverrides=a,this.segmentOverrides=u,this.targetAudiences=c,this.targetRules=p,this.defaultRule=l,this.containerId=f,this._winnerVariationId=d}function o(){}function Rt(){}function Ct(){}function St(e,t,r){this.isOn=e,this.reason=t,this.config=r}function Mt(e,t,r){this.variation=e,this.reason=t,this.config=r}function xt(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}function Pt(e,t){this.value=e,this.reason=t}Kr.tryParse=function(e){var t,r,n,o,e=Kr.regExp.exec(e);if(e)return e[0],t=e[1],r=void 0===(r=e[2])?"0":r,n=void 0===(n=e[3])?"0":n,o=e[4],e=e[5],new Kr(new Ut(parseInt(t,10),parseInt(r,10),parseInt(n,10)),Dt.parse(o),Dt.parse(e))},Kr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kr.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kr.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 kt=Kr,Ut=(Gr.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},Gr),Dt=(Hr.parse=function(e){return e?new Hr(e.split(".")):Hr.EMPTY},Hr.prototype.isEmpty=function(){return 0===this.identifiers.length},Hr.prototype.isNotEmpty=function(){return!this.isEmpty()},Hr.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},Hr.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=Hr.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},Hr.compareIdentifiers=function(e,t){return Hr.numericIdentifierRegExp.test(e)&&Hr.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},Hr.EMPTY=new Hr([]),Hr.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,Hr),Lt=["MATCH","NOT_MATCH"],Ft=["STRING","NUMBER","BOOLEAN","VERSION","JSON","NULL","UNKNOWN"],jt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Vt=["VARIATION","BUCKET"],Ht=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY"],Gt=["USER_ID","USER_PROPERTY"],Kt=(Vr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Vr.IDENTIFIER=new Vr("SEGMENT"),Vr.PROPERTY=new Vr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY"),Vr.SEGMENT=new Vr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY"),Vr),Bt=["ACTIVE","DRAFT","PAUSE"],zt=["WEB","ANDROID","IOS"],qt=["IMMEDIATE","CUSTOM"],Yt=["MODAL"],Jt=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],$t=["VERTICAL","HORIZONTAL"],Xt=["CLICK"],Wt=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Zt=(jr.fromJson=function(e){var t,r=Ue(Bt,e.status);if(!a.isNullOrUndefined(r)){switch(Ue(qt,e.timeUnit)){case"IMMEDIATE":t=new Qt;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new er(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,o,i=ur.fromJson(e.messageContext);if(!a.isNullOrUndefined(i))return n=e.eventTriggerRules.map(rr.fromJson),o=nr.fromJson(e.eventFrequencyCap),new jr(e.id,e.key,r,t,new tr(n,o),sr.fromJson(e.targetContext),i)}},jr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},jr),Qt=(Fr.prototype.within=function(e){return!0},Fr),er=(Lr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},Lr),tr=function(e,t){this.rules=e,this.frequencyCap=t},rr=(Dr.fromJson=function(e){return new Dr(e.eventKey,c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Kt.PROPERTY)}))},Dr),nr=(Ur.fromJson=function(e){return e?new Ur(e.identifiers.map(or.fromJson),ir.fromJson(e.duration)):null},Ur),or=(kr.fromJson=function(e){return new kr(e.identifierType,e.countPerIdentifier)},kr),ir=(Pr.fromJson=function(e){if(!e)return null;var t=Ue(Re,e.durationUnit.timeUnit);return t?new Pr(Ce.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},Pr),sr=(xr.fromJson=function(e){return new xr(e.overrides.map(ar.fromJson),c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Kt.PROPERTY)}))},xr),ar=(Mr.fromJson=function(e){return new Mr(e.identifierType,e.identifiers)},Mr),ur=(Sr.fromJson=function(e){var t=De(zt,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=De($t,e.orientations);if(!a.isNullOrUndefined(r)){var n=c.mapOrUndefined(e.messages,cr.fromJson);if(!a.isNullOrUndefined(n))return new Sr(e.defaultLang,t,r,n)}}},Sr),cr=(Cr.fromJson=function(e){var t=pr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=c.mapOrUndefined(e.images,lr.fromJson);if(!a.isNullOrUndefined(r)){var n=c.mapOrUndefined(e.buttons,yr.fromJson);if(!a.isNullOrUndefined(n)){var o=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(o=yr.fromJson2(e.closeButton),!a.isNullOrUndefined(o)))return new Cr(e.lang,t,r,e.text?fr.fromJson(e.text):void 0,n,o,new mr(e.background.color))}}}},Cr.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}}},Cr),pr=(Rr.fromJson=function(e){var t=Ue(Jt,e.layoutType),e=Ue(Yt,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Rr(e,t)},Rr),lr=(Nr.fromJson=function(e){var t=Ue($t,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=gr.fromJson(e.action),!a.isNullOrUndefined(r)))return new Nr(t,e.imagePath,r)}},Nr.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}},Nr),fr=(Or.fromJson=function(e){return new Or(dr.fromJson(e.title),dr.fromJson(e.body))},Or.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}}}},Or),dr=(br.fromJson=function(e){return new br(e.text,new hr(e.style.textColor))},br),hr=function(e){this.color=e},yr=(Ar.fromJson=function(e){var t=gr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Ar(e.text,new vr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Ar.fromJson2=function(e){var t=gr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Ar("✕",new vr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Ar.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},Ar.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Ar),vr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},mr=function(e){this.color=e},gr=(Ir.fromJson=function(e){var t=Ue(Xt,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ue(Wt,e.type);if(!a.isNullOrUndefined(r))return new Ir(t,r,null!=(t=e.value)?t:void 0)}},Ir.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Ir),Er=(_r.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},_r.prototype.tag=function(e,t){return this._tags[e]=t,this},_r.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},_r),wr=(Tr.start=function(e){return new Tr(e=void 0===e?Tr.defaultClock:e)},Tr.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Tr.defaultClock=new Se,Tr);function Tr(e){this._clock=e,this.startTime=this._clock.tick()}function _r(e){this.name=e,this._tags={},this.name=e}function Ir(e,t,r){this.behavior=e,this.type=t,this.value=r}function Ar(e,t,r){this.text=e,this.style=t,this.action=r}function br(e,t){this.text=e,this.style=t}function Or(e,t){this.title=e,this.body=t}function Nr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function Rr(e,t){this.displayType=e,this.layoutType=t}function Cr(e,t,r,n,o,i,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=o,this.closeButton=i,this.background=s}function Sr(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function Mr(e,t){this.identifierType=e,this.identifiers=t}function xr(e,t){this.overrides=e,this.targets=t}function Pr(e,t){this.durationMillis=e,this.count=t}function kr(e,t){this.identifierType=e,this.count=t}function Ur(e,t){this.identifierCaps=e,this.durationCap=t}function Dr(e,t){this.eventKey=e,this.targets=t}function Lr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function Fr(){this.type="IMMEDIATE"}function jr(e,t,r,n,o,i,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=o,this.targetContext=i,this.messageContext=s}function Vr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function Hr(e){this.identifiers=e}function Gr(e,t,r){this.major=e,this.minor=t,this.patch=r}function Kr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}zr.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},zr.prototype.tag=function(e,t){return this._tags[e]=t,this},zr.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Br=zr;function zr(e){this.name=e,this._tags={}}Object.defineProperty(Yr.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var qr=Yr;function Yr(e,t){this.valueSupplier=t,this.field=e}function Jr(e,t){return e.name===t.name&&be.isEquals(e.tags,t.tags)}nn.prototype.count=function(){return this.counterValue},nn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},nn.prototype.measure=function(){return[new qr("count",this.count.bind(this))]};var $r,Xr=nn,Wr=(rn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Xr(this.id),e},rn.prototype.count=function(){return this.currentCounter.count()},rn.prototype.increment=function(e){this.currentCounter.increment(e)},rn.prototype.measure=function(){return[new qr("count",this.count.bind(this))]},rn),Zr=(tn.prototype.values=function(){return Array.from(this.data.values())},tn.prototype.keys=function(){return Array.from(this.data.keys())},tn.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},tn.prototype.has=function(e){return void 0!==this.get(e)},tn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},tn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},tn.prototype.forEach=function(e){this.data.forEach(e)},tn.prototype.entries=function(){return Array.from(this.data.entries())},tn),r=(Object.defineProperty(en.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),en.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},en.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},en.prototype.counter=function(e,t){return void 0===t&&(t={}),new Br(e).tags(t).register(this)},en.prototype.timer=function(e,t){return void 0===t&&(t={}),new Er(e).tags(t).register(this)},en.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},en.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},en.prototype.close=function(){},en),i=(ce(Qr,$r=r),Qr.prototype.start=function(){var e=this;void 0===this.currentIntervalId&&(this.currentIntervalId=setInterval(function(){e.publish()},this.pushIntervalMillis),w.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Qr.prototype.stop=function(){void 0!==this.currentIntervalId&&(clearInterval(this.currentIntervalId),this.currentIntervalId=void 0,this.publish(),w.log.debug("PushMetricRegistry stopped."))},Qr.prototype.close=function(){this.stop()},Qr);function Qr(e){var t=$r.call(this)||this;return t.pushIntervalMillis=e,t.currentIntervalId=void 0,t.pushIntervalMillis=e,t}function en(){this.id=ae.v4(),this.name="MetricRegistry",this._metrics=new Zr(Jr)}function tn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function rn(e){this.id=e,this.currentCounter=new Xr(e)}function nn(e){this.counterValue=0,this.id=e}hn.prototype.count=function(){return this._count},hn.prototype.totalTime=function(e){return Ce.nanosToUnit(this._total,e)},hn.prototype.max=function(e){return Ce.nanosToUnit(this._max,e)},hn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},hn.prototype.record=function(e,t){e<0||(t=Ce.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},hn.prototype.measure=function(){var e=this;return[new qr("count",this.count.bind(this)),new qr("total",function(){return e.totalTime("milliseconds")}),new qr("max",function(){return e.max("milliseconds")}),new qr("mean",function(){return e.mean("milliseconds")})]};var on,sn=hn,an=(dn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new sn(this.id),e},dn.prototype.count=function(){return this.currentTimer.count()},dn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},dn.prototype.max=function(e){return this.currentTimer.max(e)},dn.prototype.record=function(e,t){this.currentTimer.record(e,t)},dn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},dn.prototype.measure=function(){var e=this;return[new qr("count",this.count.bind(this)),new qr("total",function(){return e.totalTime("milliseconds")}),new qr("max",function(){return e.max("milliseconds")}),new qr("mean",function(){return e.mean("milliseconds")})]},dn),i=(ce(fn,on=i),fn.prototype.createCounter=function(e){return new Wr(e)},fn.prototype.createTimer=function(e){return new an(e)},fn.prototype.publish=function(){var e=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(e)},fn.prototype.close=function(){on.prototype.close.call(this)},fn),un=(ln.prototype.count=function(){return 0},ln.prototype.increment=function(e){},ln.prototype.measure=function(){return[new qr("count",this.count.bind(this))]},ln),cn=(Object.defineProperty(pn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),pn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},pn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},pn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},pn.prototype.measure=function(){return[new qr("count",this.count.bind(this))]},pn);function pn(e){this._counters=new Zr(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new un(e)}function ln(e){this.id=e}function fn(e){return on.call(this,e)||this}function dn(e){this.id=e,this.currentTimer=new sn(e)}function hn(e){this._count=0,this._total=0,this._max=0,this.id=e}Dn.prototype.measure=function(){var e=this;return[new qr("count",this.count.bind(this)),new qr("total",function(){return e.totalTime("milliseconds")}),new qr("max",function(){return e.max("milliseconds")}),new qr("mean",function(){return e.mean("milliseconds")})]},Dn.prototype.count=function(){return 0},Dn.prototype.totalTime=function(e){return 0},Dn.prototype.max=function(e){return 0},Dn.prototype.mean=function(e){return 0},Dn.prototype.record=function(e,t){};var u,yn,vn,mn=Dn,gn=(Object.defineProperty(Un.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Un.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Un.prototype.max=function(e){return this.firstTimer.max(e)},Un.prototype.mean=function(e){return this.firstTimer.mean(e)},Un.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Un.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Un.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Un.prototype.count=function(){return this.firstTimer.count()},Un.prototype.measure=function(){var e=this;return[new qr("count",this.count.bind(this)),new qr("total",function(){return e.totalTime("milliseconds")}),new qr("max",function(){return e.max("milliseconds")}),new qr("mean",function(){return e.mean("milliseconds")})]},Un),r=(ce(kn,vn=r),kn.prototype.createCounter=function(e){e=new cn(e);return this.addRegistry(e),e},kn.prototype.createTimer=function(e){e=new gn(e);return this.addRegistry(e),e},kn.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},kn.prototype.add=function(t){t instanceof kn||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},kn.prototype.close=function(){this.registries.forEach(function(e){e.close()})},kn),En=(Pn.counter=function(e,t){return Pn.globalRegistry.counter(e,t)},Pn.timer=function(e,t){return Pn.globalRegistry.timer(e,t)},Pn.addRegistry=function(e){Pn.globalRegistry.add(e),w.log.debug("MetricRegistry added ".concat(e.name))},Pn.globalRegistry=new r,Pn),wn=(ce(xn,yn=i),xn.prototype.flushMetrics=function(e){var t=this;c.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){t.dispatch(e)})},xn.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},xn.prototype.dispatch=function(e){this.useBeacon&&this.shouldUseBeacon?this.httpClient.sendBeacon(this.monitoringEndPoint,this.batch(e),this.httpHeader,function(){w.log.debug("Beacon called.")}):this.httpClient.postRequest(this.monitoringEndPoint,this.batch(e),this.httpHeader,function(){},function(){w.log.debug("Failed to flushing metrics.")})},xn.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(c.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},xn.prototype.createCounter=function(e){return new Wr(e)},xn.prototype.createTimer=function(e){return new an(e)},xn.prototype.close=function(){this.shouldUseBeacon=!0,yn.prototype.close.call(this)},xn),Tn=(Mn.experiment=function(e,t,r){t=En.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Mn.featureFlag=function(e,t,r){t=En.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Mn.remoteConfig=function(e,t,r){t=En.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Mn.inAppMessage=function(e,t,r){t=En.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},Mn),_n=(Sn.record=function(e,t,r){e=En.timer("api.call",{operation:e,success:String(r)});t.stop(e)},Sn),In=(Cn.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)}},Cn.decision=function(e,t,r,n,o){return a.isNullOrUndefined(t)?Fe.of(n,s.INVALID_INPUT):e.remoteConfig(t,o,r,n)},Cn),An=w.log,bn=(Rn.prototype.get=function(e,t){var r,n=wr.start();try{r=this.decide(e,t)}catch(n){An.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=Fe.of(t,s.EXCEPTION)}return Tn.remoteConfig(n,e,r),r.value},Rn.prototype.decide=function(e,t){var r=this.userManager.resolveCurrentOrNull(this.user);if(!r)return An.warn("invalid user"),Fe.of(t,s.INVALID_INPUT);r=this.hackleUserResolver.resolve(r);return In.decide(this.core,e,t,r)},Rn),On=(Nn.prototype.contains=function(e){return this._properties.has(e)},Nn.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},Nn.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)},Nn.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=Ne.sanitizeValue(e,t);return r&&this._properties.set(e,r),this},Nn.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},Nn.prototype.build=function(){return this._properties},Nn);function Nn(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function Rn(e,t,r,n){this.core=e,this.userManager=t,this.hackleUserResolver=r,this.user=n}function Cn(){}function Sn(){}function Mn(){}function xn(e,t,r,n,o){t=yn.call(this,t)||this;return t.monitoringBaseUrl=e,t.httpClient=r,t.httpHeader=n,t.useBeacon=o,t.monitoringEndPoint="".concat(t.monitoringBaseUrl,"/metrics"),t.shouldUseBeacon=!1,t.start(),t.monitoringBaseUrl=e,t}function Pn(){}function kn(){var e=null!==vn&&vn.apply(this,arguments)||this;return e.registries=new Zr(function(e,t){return e.id===t.id}),e}function Un(e){this._timers=new Zr(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new mn(e)}function Dn(e){this.id=e}(r=u=u||{}).SET="$set",r.SET_ONCE="$setOnce",r.UNSET="$unset",r.INCREMENT="$increment",r.APPEND="$append",r.APPEND_ONCE="$appendOnce",r.PREPEND="$prepend",r.PREPEND_ONCE="$prependOnce",r.REMOVE="$remove",r.CLEAR_ALL="$clearAll";Ro.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new On).addProperties(e).addProperties(t).build()};var Ln,Fn,jn,Vn,Hn,Gn,Kn,Bn,zn=Ro,qn=(No.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new On).addProperties(e).addProperties(t,!0).build()},No),Yn=(Oo.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new On).addProperties(e).remove(t).build()},Oo),Jn=(bo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new On;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},bo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},bo),i=(Ao.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new On;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Ao.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Ao.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Ao.prototype.contains=function(e,t){return e.includes(t)},Ao.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:fe([e],t,!0)},Ao.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:fe(fe([],e,!0),[t],!1)},Ao),$n=(ce(Io,Bn=i),Io.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)},Io),Xn=(ce(_o,Kn=i),_o.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},_o.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},_o),Wn=(ce(To,Gn=i),To.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},To),Zn=(ce(wo,Hn=i),wo.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)},wo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},wo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},wo),Qn=(ce(Eo,Vn=i),Eo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},Eo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},Eo),eo=(go.prototype.operate=function(e,t){return new Map},go),to=(mo.get=function(e){switch(e){case u.SET:return new zn;case u.SET_ONCE:return new qn;case u.UNSET:return new Yn;case u.INCREMENT:return new Jn;case u.APPEND:return new $n;case u.APPEND_ONCE:return new Xn;case u.PREPEND:return new Wn;case u.PREPEND_ONCE:return new Zn;case u.CLEAR_ALL:return new eo;case u.REMOVE:return new Qn}},mo),ro=(vo.prototype.set=function(e,t){return this.add(u.SET,e,t)},vo.prototype.setOnce=function(e,t){return this.add(u.SET_ONCE,e,t)},vo.prototype.unset=function(e){return this.add(u.UNSET,e,"-")},vo.prototype.increment=function(e,t){return this.add(u.INCREMENT,e,t)},vo.prototype.append=function(e,t){return this.add(u.APPEND,e,t)},vo.prototype.appendOnce=function(e,t){return this.add(u.APPEND_ONCE,e,t)},vo.prototype.prepend=function(e,t){return this.add(u.PREPEND,e,t)},vo.prototype.prependOnce=function(e,t){return this.add(u.PREPEND_ONCE,e,t)},vo.prototype.remove=function(e,t){return this.add(u.REMOVE,e,t)},vo.prototype.clearAll=function(){return this.add(u.CLEAR_ALL,"clearAll","-")},vo.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new no(new Map(e))},vo.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},vo.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new On);e=this.operations.get(e);return null!=e&&e.add(t,r),this},vo),no=(yo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=to.get(t).operate(r,e)}),r},yo.prototype.toEvent=function(){var o={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;o.properties=E(E({},o.properties),((r={})[t]=E(E({},null==(n=o.properties)?void 0:n[t]),Ne.sanitize(a.fromMap(e))),r))}),o},yo),oo=w.log,io=(l.prototype.getSessionId=function(){return this.sessionManager.sessionId},l.prototype.getUser=function(){return this.userManager.currentUser},l.prototype.setUser=function(e){try{var t=Le(e);if(!t)return void oo.warn("invalid user");this.userManager.setUser(t)}catch(e){oo.error("Unexpected exception while set user: ".concat(e))}},l.prototype.setUserId=function(e){try{void 0===e&&this.userManager.setUserId(void 0);var t=be.sanitizeValue(e);if(!t)return void oo.warn("Invalid userId. [userId=".concat(e,"]"));this.userManager.setUserId(t)}catch(e){oo.error("Unexpected exception while set userId: ".concat(e))}},l.prototype.setDeviceId=function(e){try{if(!be.sanitizeValue(e))return void oo.warn("Invalid deviceId. [deviceId=".concat(e,"]"));this.userManager.setDeviceId(e)}catch(e){oo.error("Unexpected exception while set deviceId: ".concat(e))}},l.prototype.setUserProperty=function(e,t){e=(new ro).set(e,t).build();this.updateUserProperties(e)},l.prototype.setUserProperties=function(e){try{var t=Ne.sanitize(e),r=new ro;Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){oo.error("Unexpected exception while set userProperties: ".concat(e))}},l.prototype.updateUserProperties=function(e){try{var t=e.toEvent();this.track(t),this.userManager.updateUserProperties(e)}catch(e){oo.error("Unexpected exception while update userProperties: ".concat(e))}},l.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new ro).clearAll().build();this.track(e.toEvent())}catch(e){oo.error("Unexpected exception while reset user: ".concat(e))}},l.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},l.prototype.variationDetail=function(n,o,e){var i=e||"A",e=wr.start(),t=function(e){try{var t=e.userManager.resolveCurrentOrNull(o);if(!t)return oo.warn("invalid user"),Ve.of(i,s.INVALID_INPUT);var r=e.hackleUserResolver.resolve(t);return e.core.experiment(n,r,i)}catch(e){return oo.error("Unexpected exception while deciding variation for experiment[".concat(n,"]. Returning default variation[").concat(i,"] : ").concat(e)),Ve.of(i,s.EXCEPTION)}}(this);return Tn.experiment(e,n,t),t},l.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},l.prototype.featureFlagDetail=function(n,o){var e=wr.start(),t=function(e){try{var t=e.userManager.resolveCurrentOrNull(o);if(!t)return oo.warn("invalid user"),He.off(s.INVALID_INPUT);var r=e.hackleUserResolver.resolve(t);return e.core.featureFlag(n,r)}catch(e){return oo.error("Unexpected exception while deciding feature flag[".concat(n,"]. Returning default value[false] : ").concat(e)),He.off(s.EXCEPTION)}}(this);return Tn.featureFlag(e,n,t),t},l.prototype.track=function(e,t){try{oo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolveCurrentOrNull(t);if(!n)return void oo.warn("invalid user");var o=this.hackleUserResolver.resolve(n);this.core.track(r,o)}catch(e){oo.error("Unexpected exception while tracking event: ".concat(e))}},l.prototype.trackPageView=function(e){oo.debug("tracking page view");var t=this.hackleUserResolver.resolve(this.userManager.currentUser);this.core.track({key:"$page_view"},t)},l.prototype.remoteConfig=function(e){return new bn(this.core,this.userManager,this.hackleUserResolver,e)},l.prototype.onReady=function(e,t){this.core.onReady(e,t=void 0===t?3e3:t)},l.prototype.onInitialized=function(e){return this.core.onInitialized({timeout:null==e?void 0:e.timeout})},l.prototype.close=function(){oo.debug("Hackle Client is closing"),this.core.close()},l.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},l.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(oo.debug("UserExplorer opened."),En.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):oo.error("UserExplorer is not provided")},l.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():oo.warn("There is no active HackleDevtools.")},l),so=(ho.exposure=function(e,t,r,n){return new ao(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},ho.track=function(e,t,r,n){return new uo(n,r,e,t)},ho.remoteConfig=function(e,t,r,n){return new co(n,e,t.parameter,t.valueId,t.reason,r)},ho.isExposure=function(e){return void 0!==e.experiment},ho.isTrack=function(e){return void 0!==e.eventType},ho.isRemoteConfig=function(e){return void 0!==e.parameter},ho.isExposureDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},ho.isTrackDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},ho.isRemoteConfigDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},ho.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[Je.ID],identifiers:this.user.identifiers,userProperties:Ne.sanitize(this.user.properties),hackleProperties:Ne.sanitize(this.user.hackleProperties)}},ho),ao=(ce(fo,jn=so),fo.prototype.copyWithUser=function(e){return new fo(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},fo.prototype.toDto=function(){return E(E({},jn.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})},fo),uo=(ce(lo,Fn=so),lo.prototype.copyWithUser=function(e){return new lo(this.timestamp,e,this.eventType,this.event,this.insertId)},lo.prototype.toDto=function(){return E(E({},Fn.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ne.sanitize(this.event.properties)})},lo),co=(ce(po,Ln=so),po.prototype.copyWithUser=function(e){return new po(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},po.prototype.toDto=function(){return E(E({},Ln.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Ne.sanitize(this.properties)})},po);function po(e,t,r,n,o,i,s){e=Ln.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=o,e.properties=i,e}function lo(e,t,r,n,o){e=Fn.call(this,e,t,o)||this;return e.eventType=r,e.event=n,e}function fo(e,t,r,n,o,i,s,a){e=jn.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=o,e.decisionReason=i,e.properties=s,e}function ho(e,t,r){void 0===r&&(r=ae.v4()),this.timestamp=e,this.user=t,this.insertId=r}function l(e,t,r,n,o){this.core=e,this.hackleUserResolver=t,this.sessionManager=r,this.userManager=n,this.devTools=o}function yo(e){this.operations=null!=e?e:new Map}function vo(){this.operations=new Map}function mo(){}function go(){}function Eo(){return null!==Vn&&Vn.apply(this,arguments)||this}function wo(){return null!==Hn&&Hn.apply(this,arguments)||this}function To(){return null!==Gn&&Gn.apply(this,arguments)||this}function _o(){return null!==Kn&&Kn.apply(this,arguments)||this}function Io(){return null!==Bn&&Bn.apply(this,arguments)||this}function Ao(){}function bo(){}function Oo(){}function No(){}function Ro(){}function Co(e){var t=new Array,r=new Array,n=new Array;return e.forEach(function(e){e instanceof so?so.isExposure(e)?t.push(e.toDto()):so.isTrack(e)?r.push(e.toDto()):so.isRemoteConfig(e)&&n.push(e.toDto()):so.isExposureDto(e)?t.push(e):so.isTrackDto(e)?r.push(e):so.isRemoteConfigDto(e)&&n.push(e)}),{exposureEvents:t,trackEvents:r,remoteConfigEvents:n}}qo.prototype.dispatch=function(e,t,r){var n={},e=(n["X-HACKLE-SDK-KEY"]=this.sdkKey,n[ye]=this.headers[ye],n["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],n["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),Co(e)),o=wr.start();this.httpRequest.postRequest(this.dispatchUrl,e,n,function(e){t(e),_n.record("post.events",o,!0)},function(e){null!=r&&r(e),_n.record("post.events",o,!1)})},qo.prototype.dispatchXhrOrBeacon=function(e,t,r){var n,o,i;this.useBeacon?((n={})["X-HACKLE-SDK-KEY"]=this.sdkKey,n[ye]=this.headers[ye],n["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],n["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),o=Co(e),i=wr.start(),this.httpRequest.sendBeacon(this.beaconDispatchUrl,o,n,function(e){t(e),_n.record("post.events",i,!0)},function(e){null!=r&&r(e),_n.record("post.events",i,!1)})):this.dispatch(e,t,r)};var So=qo,Mo=(zo.prototype.getExperiments=function(){return Array.from(this.experiments.values())},zo.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},zo.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},zo.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},zo.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},zo.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},zo.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},zo.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},zo.prototype.getContainerOrNull=function(e){return this.containers.get(e)},zo.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},zo.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},zo.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},zo.from=function(e){return new zo(c.mapNotNullOrUndefined(e.experiments,function(e){return Ke.fromJson("AB_TEST",e)}),c.mapNotNullOrUndefined(e.featureFlags,function(e){return Ke.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ze.fromJson),e.events.map(Ye.fromJson),c.mapNotNullOrUndefined(e.segments,rt.fromJson),e.containers.map(nt.fromJson),e.parameterConfigurations.map(it.fromJson),c.mapNotNullOrUndefined(e.remoteConfigParameters,st.fromJson),c.mapNotNullOrUndefined(e.inAppMessages,Zt.fromJson))},zo),xo=(Bo.prototype.onReady=function(){return this.readyPromise},Bo.prototype.start=function(){this.isStarted||(this.isStarted=!0,this.errorRetryController.reset(),this.fetch())},Bo.prototype.stop=function(){return this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},Bo.prototype.get=function(){return this.workspace},Bo.prototype.scheduleNextUpdate=function(){var e=this,t=this.errorRetryController.getDelay(),t=Math.max(t,this.updateInterval);this.currentTimeout=setTimeout(function(){e.currentRequest?e.syncOnCurrentRequestComplete=!0:e.fetch()},t)},Bo.prototype.fetch=function(){function t(e){e=e.isSuccess,_n.record("get.workspace",o,e)}function e(){n.onRequestComplete()}var r,n=this,o=((r={})["X-HACKLE-SDK-KEY"]=this.sdkKey,r["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),r[ye]=this.headers[ye],r["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],wr.start());this.currentRequest=this.httpRequest.getRequest(this.fetchUrl,r);null!=(r=this.currentRequest)&&r.responsePromise.then(function(e){n.onRequestResolved(e,t)},function(e){n.onRequestRejected(e,t)}).then(e,e),0<this.updateInterval&&this.scheduleNextUpdate()},Bo.prototype.onRequestComplete=function(){this.isStarted&&(this.currentRequest=null,this.syncOnCurrentRequestComplete&&this.fetch(),this.syncOnCurrentRequestComplete=!1)},Bo.prototype.onRequestResolved=function(e,t){if(this.isStarted){if(void 0!==e.statusCode&&200<=e.statusCode&&e.statusCode<400)this.errorRetryController.reset(),t({isSuccess:!0});else{if(t({isSuccess:!1}),401===e.statusCode||403===e.statusCode)return void this.readyPromiseRejecter(new Error("Invalid key provided."));this.errorRetryController.countError()}e.body&&(t=JSON.parse(e.body),this.workspace=Mo.from(t),this.readyPromiseResolver())}},Bo.prototype.onRequestRejected=function(e,t){this.isStarted&&(t({isSuccess:!1}),this.errorRetryController.countError(),console.error("Error fetching data",e))},Bo.prototype.close=function(){this.stop()},Bo),Po=(Ko.prototype.getDelay=function(){return 0===this.errorCount?0:1e3*ve[Math.min(ve.length-1,this.errorCount)]+Math.round(1e3*Math.random())},Ko.prototype.countError=function(){this.errorCount<ve.length-1&&this.errorCount++},Ko.prototype.reset=function(){this.errorCount=0},Ko),r="model",i="name",f="type",d="vendor",h="version",y="mobile",v="tablet",ko=(m.parse=function(e){return{browser:m.getBrowser(e),cpu:m.getCPU(e),device:m.getDevice(e),engine:m.getEngine(e),os:m.getOS(e)}},m.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return m.mapper.rgx.call(t,e,m.regexes.browser),t.major=m.util.major(t.version),t},m.getCPU=function(e){var t={architecture:void 0};return m.mapper.rgx.call(t,e,m.regexes.cpu),t},m.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return m.mapper.rgx.call(t,e,m.regexes.device),t},m.getEngine=function(e){var t={name:void 0,version:void 0};return m.mapper.rgx.call(t,e,m.regexes.os),t},m.getOS=function(e){var t={name:void 0,version:void 0};return m.mapper.rgx.call(t,e,m.regexes.os),t},m.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,"")}},m.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[i,h],[/(opios)[\/\s]+([\w\.]+)/i],[[i,"Opera Mini"],h],[/\s(opr)\/([\w\.]+)/i],[[i,"Opera"],h],[/(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],[i,h],[/(konqueror)\/([\w\.]+)/i],[[i,"Konqueror"],h],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[i,"IE"],h],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[i,"Edge"],h],[/(yabrowser)\/([\w\.]+)/i],[[i,"Yandex"],h],[/(Avast)\/([\w\.]+)/i],[[i,"Avast Secure Browser"],h],[/(AVG)\/([\w\.]+)/i],[[i,"AVG Secure Browser"],h],[/(puffin)\/([\w\.]+)/i],[[i,"Puffin"],h],[/(focus)\/([\w\.]+)/i],[[i,"Firefox Focus"],h],[/(opt)\/([\w\.]+)/i],[[i,"Opera Touch"],h],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[i,"UCBrowser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[i,/_/g," "],h],[/(windowswechat qbcore)\/([\w\.]+)/i],[[i,"WeChat(Win) Desktop"],h],[/(micromessenger)\/([\w\.]+)/i],[[i,"WeChat"],h],[/(brave)\/([\w\.]+)/i],[[i,"Brave"],h],[/(whale)\/([\w\.]+)/i],[[i,"Whale"],h],[/(qqbrowserlite)\/([\w\.]+)/i],[i,h],[/(QQ)\/([\d\.]+)/i],[i,h],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[i,h],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[i,h],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[i,h],[/(MetaSr)[\/\s]?([\w\.]+)/i],[i],[/(LBBROWSER)/i],[i],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[h,[i,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[h,[i,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[i,h],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[h,[i,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[i,/(.+)/,"$1 WebView"],h],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[i,/(.+(?:g|us))(.+)/,"$1 $2"],h],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[i,"Chrome Mobile"],h],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[h,[i,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[i,"Sailfish Browser"],h],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[i,h],[/(dolfin)\/([\w\.]+)/i],[[i,"Dolphin"],h],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[i,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[i,"Opera Coast"],h],[/fxios\/([\w\.-]+)/i],[h,[i,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[h,[i,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[h,i],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[i,"GSA"],h],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[i,[h,(m.mapper={rgx:function(e,t){for(var r,n,o,i,s,a=0;a<t.length&&!i;){for(var u=t[a],c=t[a+1],p=r=0;p<u.length&&!i;)if(i=u[p++].exec(e))for(n=0;n<c.length;n++)s=i[++r],"object"==typeof(o=c[n])&&0<o.length?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(m.util.has(t[r][n],e))return"?"===r?void 0:r}else if(m.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(m.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],[i,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[i,"Netscape"],h],[/(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],[i,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",m.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",m.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[r,d,[f,v]],[/applecoremedia\/[\w\.]+ \((ipad)/],[r,[d,"Apple"],[f,v]],[/(apple\s{0,1}tv)/i],[[r,"Apple TV"],[d,"Apple"],[f,"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],[d,r,[f,v]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[r,[d,"Amazon"],[f,v]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[r,m.mapper.str,m.maps.device.amazon.model],[d,"Amazon"],[f,y]],[/android.+aft([bms])\sbuild/i],[r,[d,"Amazon"],[f,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[r,d,[f,y]],[/\((ip[honed|\s\w*]+);/i],[r,[d,"Apple"],[f,y]],[/(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],[d,r,[f,y]],[/\(bb10;\s(\w+)/i],[r,[d,"BlackBerry"],[f,y]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[r,[d,"Asus"],[f,v]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[r,"Xperia Tablet"],[f,v]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[r,[d,"Sony"],[f,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,r,[f,"console"]],[/android.+;\s(shield)\sbuild/i],[r,[d,"Nvidia"],[f,"console"]],[/(playstation\s[34portablevi]+)/i],[r,[d,"Sony"],[f,"console"]],[/(sprint\s(\w+))/i],[[d,m.mapper.str,m.maps.device.sprint.vendor],[r,m.mapper.str,m.maps.device.sprint.model],[f,y]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[r,/_/g," "],[f,y]],[/(nexus\s9)/i],[r,[d,"HTC"],[f,v]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[r,[d,"Huawei"],[f,y]],[/android.+(bah2?-a?[lw]\d{2})/i],[r,[d,"Huawei"],[f,v]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,r,[f,y]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[r,[d,"Microsoft"],[f,"console"]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[d,"Microsoft"],[f,y]],[/\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],[r,[d,"Motorola"],[f,y]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[r,[d,"Motorola"],[f,v]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,m.util.trim],[r,m.util.trim],[f,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[d,"Samsung"],[f,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[r,[d,"Sharp"],[f,"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],[[d,"Samsung"],r,[f,v]],[/smart-tv.+(samsung)/i],[d,[f,"smarttv"],r],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],r,[f,y]],[/sie-(\w*)/i],[r,[d,"Siemens"],[f,y]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],r,[f,y]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[r,[d,"Acer"],[f,v]],[/android.+([vl]k\-?\d{3})\s+build/i],[r,[d,"LG"],[f,v]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],r,[f,v]],[/(lg) netcast\.tv/i],[d,r,[f,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[r,[d,"LG"],[f,y]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,r,[f,v]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[r,[d,"Lenovo"],[f,v]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,r,[f,y]],[/linux;.+((jolla));/i],[d,r,[f,y]],[/((pebble))app\/[\d\.]+\s/i],[d,r,[f,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,r,[f,y]],[/crkey/i],[[r,"Chromecast"],[d,"Google"],[f,"smarttv"]],[/android.+;\s(glass)\s\d/i],[r,[d,"Google"],[f,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[r,[d,"Google"],[f,v]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[r,[d,"Google"],[f,y]],[/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],[[r,/_/g," "],[d,"Xiaomi"],[f,y]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[r,/_/g," "],[d,"Xiaomi"],[f,v]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[r,[d,"Meizu"],[f,y]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],r,[f,y]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[r,[d,"OnePlus"],[f,y]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[r,[d,"RCA"],[f,v]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[r,[d,"Dell"],[f,v]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[r,[d,"Verizon"],[f,v]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],r,[f,v]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[r,[d,"NuVision"],[f,v]],[/android.+;\s(k88)\sbuild/i],[r,[d,"ZTE"],[f,v]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[r,[d,"Swiss"],[f,y]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[r,[d,"Swiss"],[f,v]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[r,[d,"Zeki"],[f,v]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],r,[f,v]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[r,[d,"Insignia"],[f,v]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[r,[d,"NextBook"],[f,v]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],r,[f,y]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],r,[f,y]],[/android.+;\s(PH-1)\s/i],[r,[d,"Essential"],[f,y]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[r,[d,"Envizen"],[f,v]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,r,[f,v]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[r,[d,"MachSpeed"],[f,v]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,r,[f,v]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[r,[d,"Rotor"],[f,v]],[/android.+(KS(.+))\s+build/i],[r,[d,"Amazon"],[f,v]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,r,[f,v]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[f,m.util.lowerize],d,r],[/[\s\/\(](smart-?tv)[;\)]/i],[[f,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[r,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[i,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[i,"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],[i,h],[/rv\:([\w\.]{1,9}).+(gecko)/i],[h,i]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[i,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[i,m.mapper.str,m.maps.os.windows],[h,m.mapper.str,m.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[i,"Windows"],[h,m.mapper.str,m.maps.os.windows.version]],[/\((bb)(10);/i],[[i,"BlackBerry"],h],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[i,h],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[i,"Symbian"],h],[/\((series40);/i],[i],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[i,"Firefox OS"],h],[/(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],[[i,"Linux"],h],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[i,"Chromium OS"],h],[/(sunos)\s?([\w\.\d]*)/i],[[i,"Solaris"],h],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[i,"Linux"],h],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[i,"iPhone"],[h,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[i,"iPad"],[h,/_/g,"."]],[/(haiku)\s(\w+)/i],[i,h],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[h,/_/g,"."],[i,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[i,"Mac"],[h,/_/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],[i,h]]},m),Uo=(Go.generate=function(e){t=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:t={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:t,screen:{width:"",height:""}}:e;var t,r=ko.parse(t.navigator.userAgent),n=r.browser,o=r.os,r=r.device,i=r.type?"mobile"===r.type?"Mobile":"ETC":"Web",s=(t.location.protocol||"").replace(":",""),a=t.screen,u="";try{u=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return{platform:i||"",browserName:n.name||"",browserMajorVersion:n.major||"",browserVersion:n.version||"",osName:o.name||"",osVersion:o.version||"",deviceModel:r.model||"",deviceType:r.type||"",deviceVendor:r.vendor||"",language:(null==(i=t.navigator.languages)?void 0:i[0])||"",userAgent:t.navigator.userAgent||"",pagePath:t.location.pathname||"",pageTitle:t.document.title||"",host:t.location.host||"",protocol:s,referrer:t.document.referrer||"",queryParameter:t.location.search||"",screenWidth:a.width||"",screenHeight:a.height||"",timeZone:u||""}},Go),Do=(Ho.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]:""},Ho.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},Ho.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},Ho.prototype.setItem=function(e,t,r){var r=E(E({},this.options),r),n=r.isSecure,o="",i="",s="",a=(r.isCrossSubdomain&&(o=(a=Ho.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.isCrossSite&&(n=!0,s="; SameSite=None"),n&&(s+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+o+s);return document.cookie=a},Ho.prototype.removeItem=function(e,t){this.setItem(e,"",E(E({},t),{days:-1}))},new Ho({days:3650,isCrossSubdomain:!0})),Lo=(Vo.prototype.resolve=function(e){var t=Yo(),t=(new $e).addIdentifiers(e.identifiers||{}).add(Je.ID,e.id||t).add(Je.DEVICE,e.deviceId||t).add(Je.HACKLE_DEVICE,t);return a.isNotNullOrUndefined(e.userId)&&t.add(Je.USER,e.userId),{identifiers:t.build(),properties:e.properties||{},hackleProperties:this._getHackleProperties()}},Vo.prototype.resolveCurrentUser=function(){return this.resolve(this.userManager.currentUser)},Vo.prototype._getHackleProperties=function(){var e;return(e="undefined"!=typeof window?Uo.generate(window):e)||{}},Vo),Fo=(jo.initialize=function(){Do.getItem("_hackle_hid")||Xo()},jo.reInitialize=function(){Xo()},jo);function jo(){}function Vo(e){this.userManager=e,Fo.initialize()}function Ho(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1,isCrossSite:!1}:e}function Go(){}function m(){}function Ko(){this.errorCount=0}function Bo(e,t,r){var n=this;this.workspace=null,this.sdkKey=e,this.httpRequest=t,this.isStarted=!1,this.updateInterval=r.updateInterval,this.fetchUrl=r.fetchUrl,this.headers=r.headers,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise(function(e,t){n.readyPromiseResolver=e,n.readyPromiseRejecter=t}),this.currentTimeout=null,this.errorRetryController=new Po,this.currentRequest=null,this.syncOnCurrentRequestComplete=!1,this.isReadyPromiseSettled=!1}function zo(e,t,r,n,o,i,s,a,u){this.experiments=c.associateBy(e,function(e){return e.key}),this.featureFlags=c.associateBy(t,function(e){return e.key}),this.buckets=c.associateBy(r,function(e){return e.id}),this.eventTypes=c.associateBy(n,function(e){return e.key}),this.segments=c.associateBy(o,function(e){return e.key}),this.containers=c.associateBy(i,function(e){return e.id}),this.parameterConfigurations=c.associateBy(s,function(e){return e.id}),this.remoteConfigParameters=c.associateBy(a,function(e){return e.key}),this.inAppMessages=c.associateBy(u,function(e){return e.key})}function qo(e,t,r){this.sdkKey=e,this.httpRequest=t,this.headers=r.headers,this.dispatchUrl=r.dispatchUrl,this.beaconDispatchUrl=r.beaconDispatchUrl||"",this.useBeacon=r.useBeacon||!1}function Yo(){var e=Do.getItem("_hackle_id");return e||Do.getItem("_hackle_hid")||Xo()}function Jo(e){Do.setItem("_hackle_id",e)}function $o(){Do.removeItem("_hackle_id")}function Xo(){var e=ae.v4();return Do.setItem("_hackle_hid",e),e}function Wo(e){return e&&e.Math==Math&&e}function g(e){try{return!!e()}catch(e){return!0}}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},v=Wo("object"==typeof globalThis&&globalThis)||Wo("object"==typeof window&&window)||Wo("object"==typeof self&&self)||Wo("object"==typeof y&&y)||function(){return this}()||Function("return this")(),f={},r=!g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),d=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,i=d?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},h={},e={}.propertyIsEnumerable,Qo=Object.getOwnPropertyDescriptor,y=Qo&&!e.call({1:2},1);h.f=y?function(e){e=Qo(this,e);return!!e&&e.enumerable}:e;function ei(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function ti(e){return gi(mi(e),8,-1)}function ri(e){if(null==e)throw _i("Can't call method on "+e);return e}function ni(e){return Ii(Ai(e))}function T(e){return"function"==typeof e}function oi(e){return"object"==typeof e?null!==e:bi(e)}function ii(e,t){return arguments.length<2?(r=Oi[e],Ni(r)?r:void 0):Oi[e]&&Oi[e][t];var r}function si(e){try{return Fi(e)}catch(e){return"Object"}}function ai(e){if(ji(e))return e;throw Hi(Vi(e)+" is not a function")}function ui(e,t){return null==(e=e[t])?void 0:Gi(e)}function ci(t,r){try{Ji(Yi,t,{value:r,configurable:!0,writable:!0})}catch(e){Yi[t]=r}return r}function _(e){return Zi(Wi(e))}function pi(e){return"Symbol("+(void 0===e?"":e)+")_"+os(++rs+ns,36)}function I(e){var t;return ss(ps,e)&&(us||"string"==typeof ps[e])||(t="Symbol."+e,us&&ss(ls,e)?ps[e]=ls[e]:ps[e]=(cs&&fs?fs:ds)(t)),ps[e]}function li(e){return e=function(e,t){if(!ys(e)||vs(e))return e;var r=ms(e,ws);if(r){if(r=hs(r,e,t=void 0===t?"default":t),!ys(r)||vs(r))return r;throw Es("Can't convert object to primitive value")}return gs(e,t=void 0===t?"number":t)}(e,"string"),Ts(e)?e:e+""}function fi(e){return Is?_s.createElement(e):{}}function di(e){if(Ps(e))return e;throw Us(ks(e)+" is not an object")}var y=d,e=Function.prototype,hi=e.bind,yi=e.call,vi=y&&hi.bind(yi,yi),e=y?function(e){return e&&vi(e)}:function(e){return e&&function(){return yi.apply(e,arguments)}},hi=e,mi=hi({}.toString),gi=hi("".slice),y=g,Ei=ti,wi=Object,Ti=e("".split),hi=y(function(){return!wi("z").propertyIsEnumerable(0)})?function(e){return"String"==Ei(e)?Ti(e,""):wi(e)}:wi,_i=TypeError,Ii=hi,Ai=ri,bi=T,Oi=v,Ni=T,y=e({}.isPrototypeOf),Ri=ii("navigator","userAgent")||"",Ci=Ri,Si=v.process,Mi=v.Deno,Si=Si&&Si.versions||Mi&&Mi.version,Mi=Si&&Si.v8,Si=Li=!(Li=Mi?0<(A=Mi.split("."))[0]&&A[0]<4?1:+(A[0]+A[1]):Li)&&Ci&&(!(A=Ci.match(/Edge\/(\d+)/))||74<=A[1])&&(A=Ci.match(/Chrome\/(\d+)/))?+A[1]:Li,xi=Si,Mi=g,Ci=!!Object.getOwnPropertySymbols&&!Mi(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xi&&xi<41}),A=Ci&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pi=ii,ki=T,Ui=y,Di=Object,Li=A?function(e){return"symbol"==typeof e}:function(e){var t=Pi("Symbol");return ki(t)&&Ui(t.prototype,Di(e))},Fi=String,ji=T,Vi=si,Hi=TypeError,Gi=ai,Ki=i,Bi=T,zi=oi,qi=TypeError,Mi={exports:{}},Yi=v,Ji=Object.defineProperty,$i=ci,$i=v["__core-js_shared__"]||$i("__core-js_shared__",{}),Xi=$i,Wi=((Mi.exports=function(e,t){return Xi[e]||(Xi[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"}),ri),Zi=Object,Qi=_,es=e({}.hasOwnProperty),ts=Object.hasOwn||function(e,t){return es(Qi(e),t)},b=e,rs=0,ns=Math.random(),os=b(1..toString),b=v,is=Mi.exports,ss=ts,as=pi,us=Ci,cs=A,ps=is("wks"),ls=b.Symbol,fs=ls&&ls.for,ds=cs?ls:ls&&ls.withoutSetter||as,hs=i,ys=oi,vs=Li,ms=ui,gs=function(e,t){var r,n;if("string"===t&&Bi(r=e.toString)&&!zi(n=Ki(r,e)))return n;if(Bi(r=e.valueOf)&&!zi(n=Ki(r,e)))return n;if("string"!==t&&Bi(r=e.toString)&&!zi(n=Ki(r,e)))return n;throw qi("Can't convert object to primitive value")},Es=TypeError,ws=I("toPrimitive"),Ts=Li,Ci=oi,_s=v.document,Is=Ci(_s)&&Ci(_s.createElement),As=fi,A=!r&&!g(function(){return 7!=Object.defineProperty(As("div"),"a",{get:function(){return 7}}).a}),bs=i,Os=h,Ns=ei,Rs=ni,Cs=li,Ss=ts,Ms=A,xs=Object.getOwnPropertyDescriptor,is=(f.f=r?xs:function(e,t){if(e=Rs(e),t=Cs(t),Ms)try{return xs(e,t)}catch(e){}if(Ss(e,t))return Ns(!bs(Os.f,e,t),e[t])},{}),b=r&&g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ps=oi,ks=String,Us=TypeError,Ds=A,Ls=di,Fs=li,js=TypeError,Vs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(is.f=r?b?function(e,t,r){var n;return Ls(e),t=Fs(t),Ls(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=Hs(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}),Vs(e,t,r)}:Vs:function(e,t,r){if(Ls(e),t=Fs(t),Ls(r),Ds)try{return Vs(e,t,r)}catch(e){}if("get"in r||"set"in r)throw js("Accessors not supported");return"value"in r&&(e[t]=r.value),e},is),Ks=ei,as=r?function(e,t,r){return Gs.f(e,t,Ks(1,r))}:function(e,t,r){return e[t]=r,e},Li={exports:{}},Ci=r,h=ts,A=Function.prototype,Bs=Ci&&Object.getOwnPropertyDescriptor,h=h(A,"name"),h={EXISTS:h,PROPER:h&&"something"===function(){}.name,CONFIGURABLE:h&&(!Ci||Bs(A,"name").configurable)},Ci=T,Bs=$i,zs=e(Function.toString);Ci(Bs.inspectSource)||(Bs.inspectSource=function(e){return zs(e)});function qs(e){return pa[e]||(pa[e]=ca(e))}function Ys(e,t,r,n){var o=(n=n||{}).enumerable,i=void 0!==n.name?n.name:t;if(Na(r)&&Ca(r,i,n),n.global)o?e[t]=r:Sa(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Ra.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Js(e){return(e=+e)!=e||0==e?0:Pa(e)}function $s(e,t){return(e=ka(e))<0?Ua(e+t,0):Da(e,t)}function O(e){return 0<(e=e.length)?Fa(La(e),9007199254740991):0}function Xs(a){return function(e,t,r){var n,o=ja(e),i=Ha(o),s=Va(r,i);if(a&&t!=t){for(;s<i;)if((n=o[s++])!=n)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===t)return a||s||0;return!a&&-1}}function Ws(e,t){var r,n=Ka(e),o=0,i=[];for(r in n)!Ga(za,r)&&Ga(n,r)&&qa(i,r);for(;t.length>o;)!Ga(n,r=t[o++])||~Ba(i,r)||qa(i,r);return i}function Zs(e,t,r){for(var n=eu(t),o=ru.f,i=tu.f,s=0;s<n.length;s++){var a=n[s];Qa(e,a)||r&&Qa(r,a)||o(e,a,i(t,a))}}function Qs(e,t){return(e=au[su(e)])==cu||e!=uu&&(ou(t)?nu(t):!!t)}function N(e,t){var r,n,o,i,s=e.target,a=e.global,u=e.stat;if(r=a?pu:u?pu[s]||hu(s,{}):(pu[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(i=lu(r,n))&&i.value:r[n],!vu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;yu(o,i)}(e.sham||i&&i.sham)&&fu(o,"sham",!0),du(r,n,o,e)}}var ea,ta,ra,na,oa,ia,sa,aa,A=Bs.inspectSource,Ci=T,Bs=A,ua=v.WeakMap,Ci=Ci(ua)&&/native code/.test(Bs(ua)),Bs=Mi.exports,ca=pi,pa=Bs("keys"),ua={},Mi=e,la=oi,fa=as,da=ts,Bs=$i,R=qs,ha=ua,ya=v.TypeError,va=v.WeakMap,Ci=(sa=Ci||Bs.state?(ea=Bs.state||(Bs.state=new va),ta=Mi(ea.get),ra=Mi(ea.has),na=Mi(ea.set),oa=function(e,t){if(ra(ea,e))throw new ya("Object already initialized");return t.facade=e,na(ea,e,t),t},ia=function(e){return ta(ea,e)||{}},function(e){return ra(ea,e)}):(ha[aa=R("state")]=!0,oa=function(e,t){if(da(e,aa))throw new ya("Object already initialized");return t.facade=e,fa(e,aa,t),t},ia=function(e){return da(e,aa)?e[aa]:{}},function(e){return da(e,aa)}),{set:oa,get:ia,has:sa,enforce:function(e){return sa(e)?ia(e):oa(e,{})},getterFor:function(t){return function(e){if(la(e)&&(e=ia(e)).type===t)return e;throw ya("Incompatible receiver, "+t+" required")}}}),Bs=g,ma=T,ga=ts,Ea=r,wa=h.CONFIGURABLE,Ta=A,_a=Ci.enforce,Ia=Ci.get,Aa=Object.defineProperty,ba=Ea&&!Bs(function(){return 8!==Aa(function(){},"length",{value:8}).length}),Oa=String(String).split("String"),va=Li.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),(!ga(e,"name")||wa&&e.name!==t)&&(Ea?Aa(e,"name",{value:t,configurable:!0}):e.name=t),ba&&r&&ga(r,"arity")&&e.length!==r.arity&&Aa(e,"length",{value:r.arity});try{r&&ga(r,"constructor")&&r.constructor?Ea&&Aa(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=_a(e);return ga(r,"source")||(r.source=Oa.join("string"==typeof t?t:"")),e},Na=(Function.prototype.toString=va(function(){return ma(this)&&Ia(this).source||Ta(this)},"toString"),T),Ra=is,Ca=Li.exports,Sa=ci,Mi={},Ma=Math.ceil,xa=Math.floor,Pa=Math.trunc||function(e){e=+e;return(0<e?xa:Ma)(e)},ka=Js,Ua=Math.max,Da=Math.min,La=Js,Fa=Math.min,ja=ni,Va=$s,Ha=O,ha={includes:Xs(!0),indexOf:Xs(!1)},Ga=ts,Ka=ni,Ba=ha.indexOf,za=ua,qa=e([].push),R=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ya=Ws,Ja=R.concat("length","prototype"),Bs=(Mi.f=Object.getOwnPropertyNames||function(e){return Ya(e,Ja)},{}),va=(Bs.f=Object.getOwnPropertySymbols,ii),$a=Mi,Xa=Bs,Wa=di,Za=e([].concat),Bs=va("Reflect","ownKeys")||function(e){var t=$a.f(Wa(e)),r=Xa.f;return r?Za(t,r(e)):t},Qa=ts,eu=Bs,tu=f,ru=is,nu=g,ou=T,iu=/#|\.prototype\./,su=Qs.normalize=function(e){return String(e).replace(iu,".").toLowerCase()},au=Qs.data={},uu=Qs.NATIVE="N",cu=Qs.POLYFILL="P",va=Qs,pu=v,lu=f.f,fu=as,du=Ys,hu=ci,yu=Zs,vu=va,Bs=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),mu=ts,gu=T,Eu=_,wu=qs("IE_PROTO"),Tu=Object,_u=Tu.prototype,Bs=Bs?Tu.getPrototypeOf:function(e){e=Eu(e);if(mu(e,wu))return e[wu];var t=e.constructor;return gu(t)&&e instanceof t?t.prototype:e instanceof Tu?_u:null},Iu=T,Au=String,bu=TypeError,Ou=e,Nu=di,Ru=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Ou(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return Nu(e),function(e){if("object"==typeof e||Iu(e))return;throw bu("Can't set "+Au(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),Cu={},Su=Ws,Mu=R,C=Object.keys||function(e){return Su(e,Mu)},xu=is,Pu=di,ku=ni,Uu=C;Cu.f=r&&!b?Object.defineProperties:function(e,t){Pu(e);for(var r,n=ku(t),o=Uu(t),i=o.length,s=0;s<i;)xu.f(e,r=o[s++],n[r]);return e};function Du(){}function Lu(e){e.write(ec("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Fu(e,t){return uc(e),void 0===t?e:cc?pc(e,t):function(){return e.apply(t,arguments)}}function ju(e){return void 0!==e&&(lc.Array===e||dc[fc]===e)}function Vu(e){if(null!=e)return wc(e,_c)||wc(e,"@@iterator")||Tc[Ec(e)]}function Hu(e,t){if(t=arguments.length<2?Nc(e):t,Ac(t))return bc(Ic(t,e));throw Rc(Oc(e)+" is not iterable")}function Gu(e,t,r){var n,o;Sc(e);try{if(!(n=Mc(e,"return"))){if("throw"===t)throw r;return r}n=Cc(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Sc(n),r}function Ku(e,t){this.stopped=e,this.result=t}function Bu(e,t,r){function n(e){return i&&Hc(i,"normal",e),new Ku(!0,e)}function o(e){return f?(kc(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var i,s,a,u,c,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=xc(t,l);if(d)i=e.iterator;else if(h)i=e;else{if(!(r=Vc(e)))throw Gc(Uc(e)+" is not iterable");if(Dc(r)){for(s=0,a=Lc(e);s<a;s++)if((u=o(e[s]))&&Fc(Kc,u))return u;return new Ku(!1)}i=jc(e,r)}for(c=(d?e:i).next;!(p=Pc(c,i)).done;){try{u=o(p.value)}catch(e){Hc(i,"throw",e)}if("object"==typeof u&&u&&Fc(Kc,u))return u}return new Ku(!1)}function zu(e){if("Symbol"===Bc(e))throw TypeError("Cannot convert a Symbol value to a string");return zc(e)}function qu(e,t){var r,n=2<arguments.length?arguments[2]:void 0,o=$c(ap,this);return Wc?r=Wc(new ip,o?Xc(this):ap):(r=o?this:Qc(ap),ep(r,op,"Error")),void 0!==t&&ep(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:qc(e)}(t)),np&&ep(r,"stack",function(e,t){if(ic&&"string"==typeof e&&!rc.prepareStackTrace)for(;t--;)e=nc(e,oc,"");return e}(r.stack,1)),o=r,sc(t=n)&&"cause"in t&&ac(o,"cause",t.cause),rp(e,sp,{that:n=[]}),ep(r,"errors",n),r}var Yu,C=ii("document","documentElement"),Ju=di,$u=Cu,Xu=R,b=ua,Wu=C,Zu=fi,Qu=qs("IE_PROTO"),ec=function(e){return"<script>"+e+"<\/script>"},tc=function(){try{Yu=new ActiveXObject("htmlfile")}catch(e){}var e,t;tc="undefined"==typeof document||document.domain&&Yu?Lu(Yu):((t=Zu("iframe")).style.display="none",Wu.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ec("document.F=Object")),e.close(),e.F);for(var r=Xu.length;r--;)delete tc.prototype[Xu[r]];return tc()},Cu=(b[Qu]=!0,Object.create||function(e,t){var r;return null!==e?(Du.prototype=Ju(e),r=new Du,Du.prototype=null,r[Qu]=e):r=tc(),void 0===t?r:$u.f(r,t)}),rc=Error,nc=e("".replace),R=String(rc("zxcasd").stack),oc=/\n\s*at [^:]*:[^\n]*/,ic=oc.test(R),sc=oi,ac=as,uc=ai,cc=d,pc=e(e.bind),b={},lc=b,fc=I("iterator"),dc=Array.prototype,R={},R=(R[I("toStringTag")]="z","[object z]"===String(R)),S=R,hc=T,yc=ti,vc=I("toStringTag"),mc=Object,gc="Arguments"==yc(function(){return arguments}()),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=mc(e),vc))?t:gc?yc(e):"Object"==(t=yc(e))&&hc(e.callee)?"Arguments":t},Ec=S,wc=ui,Tc=b,_c=I("iterator"),Ic=i,Ac=ai,bc=di,Oc=si,Nc=Vu,Rc=TypeError,Cc=i,Sc=di,Mc=ui,xc=Fu,Pc=i,kc=di,Uc=si,Dc=ju,Lc=O,Fc=y,jc=Hu,Vc=Vu,Hc=Gu,Gc=TypeError,Kc=Ku.prototype,Bc=S,zc=String,qc=zu,Yc=ei,M=!g(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Yc(1,7)),7!==e.stack)}),Jc=N,$c=y,Xc=Bs,Wc=Ru,Zc=Zs,Qc=Cu,ep=as,tp=ei,rp=Bu,np=M,op=I("toStringTag"),ip=Error,sp=[].push,ap=(Wc?Wc(qu,ip):Zc(qu,ip,{name:!0}),qu.prototype=Qc(ip.prototype,{constructor:tp(1,qu),message:tp(1,""),name:tp(1,"AggregateError")})),M=(Jc({global:!0,constructor:!0,arity:2},{AggregateError:qu}),I),Zc=Cu,tp=is.f,up=M("unscopables"),cp=Array.prototype;null==cp[up]&&tp(cp,up,{configurable:!0,value:Zc(null)});function x(e){cp[up][e]=!0}var pp,Jc=g,M=T,tp=Bs,Zc=Ys,lp=I("iterator"),P=!1;[].keys&&("next"in(yp=[].keys())?(tp=tp(tp(yp)))!==Object.prototype&&(pp=tp):P=!0);function fp(e,t,r){(e=e&&!r?e.prototype:e)&&!mp(e,gp)&&vp(e,gp,{configurable:!0,value:t})}function dp(){return this}function hp(e,t,r,n,o,i,s){var a=r,u=t,c=void 0;function p(e){if(e===o&&v)return v;if(!Lp&&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=wp(Ep,{next:Tp(+!c,n)}),_p(a,u,!1),Ip[u]=Ap;var l,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[Fp]||h["@@iterator"]||o&&h[o],v=!Lp&&y||p(o);if((n="Array"==t&&h.entries||y)&&(a=Rp(n.call(new e)))!==Object.prototype&&a.next&&(Rp(a)!==Dp&&(Cp?Cp(a,Dp):Np(a[Fp])||xp(a,Fp,dp)),Sp(a,c,!0)),kp&&"values"==o&&y&&"values"!==y.name&&(Up?Mp(h,"name","values"):(d=!0,v=function(){return Op(y,this)})),o)if(l={values:p("values"),keys:i?v:p("keys"),entries:p("entries")},s)for(f in l)!Lp&&!d&&f in h||xp(h,f,l[f]);else bp({target:t,proto:!0,forced:Lp||d},l);return h[Fp]!==v&&xp(h,Fp,v,{name:o}),Pp[t]=v,l}M((pp=null==pp||Jc(function(){var e={};return pp[lp].call(e)!==e})?{}:pp)[lp])||Zc(pp,lp,function(){return this});var yp={IteratorPrototype:pp,BUGGY_SAFARI_ITERATORS:P},vp=is.f,mp=ts,gp=I("toStringTag"),Ep=yp.IteratorPrototype,wp=Cu,Tp=ei,_p=fp,Ip=b,Ap=function(){return this},bp=N,Op=i,Np=T,Rp=Bs,Cp=Ru,Sp=fp,Mp=as,xp=Ys,Pp=b,kp=h.PROPER,Up=h.CONFIGURABLE,Dp=yp.IteratorPrototype,Lp=yp.BUGGY_SAFARI_ITERATORS,Fp=I("iterator"),jp=ni,tp=x,M=b,Jc=Ci,Zc=is.f,P=hp,h=r,Vp=Jc.set,Hp=Jc.getterFor("Array Iterator"),yp=P(Array,"Array",function(e,t){Vp(this,{type:"Array Iterator",target:jp(e),index:0,kind:t})},function(){var e=Hp(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"),b=M.Arguments=M.Array;if(tp("keys"),tp("values"),tp("entries"),h&&"values"!==b.name)try{Zc(b,"name",{value:"values"})}catch(kA){}function Gp(e){var e=Jp(e),t=$p.f;Xp&&e&&!e[Wp]&&t(e,Wp,{configurable:!0,get:function(){return this}})}function Kp(e,t){if(Zp(t,e))return e;throw Qp("Incorrect invocation")}function Bp(){}function zp(e){if(!el(e))return!1;try{return ol(Bp,nl,e),!0}catch(e){return!1}}function qp(e){if(!el(e))return!1;switch(tl(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return al||!!sl(il,rl(e))}catch(e){return!0}}var Yp=S,Jc=(R||Ys(Object.prototype,"toString",R?{}.toString:function(){return"[object "+Yp(this)+"]"},{unsafe:!0}),"process"==ti(v.process)),Jp=ii,$p=is,Xp=r,Wp=I("species"),Zp=y,Qp=TypeError,P=e,M=g,el=T,tl=S,rl=A,nl=[],ol=ii("Reflect","construct"),il=/^\s*(?:class|function)\b/,sl=P(il.exec),al=!il.exec(Bp);qp.sham=!0;function ul(e,t){var r,e=hl(e).constructor;if(void 0===e||null==(r=hl(e)[yl]))return t;if(ll(e=r))return e;throw dl(fl(e)+" is not a constructor")}var cl,pl,tp=!ol||M(function(){var e;return zp(zp.call)||!zp(Object)||!zp(function(){e=!0})||e})?qp:zp,ll=tp,fl=si,dl=TypeError,hl=di,yl=I("species"),h=Function.prototype,vl=h.apply,ml=h.call,Zc="object"==typeof Reflect&&Reflect.apply||(d?ml.bind(vl):function(){return ml.apply(vl,arguments)}),b=e([].slice),gl=TypeError,R=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ri),El=v,wl=Zc,y=Fu,Tl=T,_l=ts,S=g,Il=C,Al=b,bl=fi,P=R,M=Jc,h=El.setImmediate,d=El.clearImmediate,Ol=El.process,Nl=El.Dispatch,Rl=El.Function,C=El.MessageChannel,Cl=El.String,Sl=0,Ml={};try{cl=El.location}catch(kA){}function xl(e){return function(){Ul(e)}}function Pl(e){Ul(e.data)}function kl(e){El.postMessage(Cl(e),cl.protocol+"//"+cl.host)}var Ul=function(e){var t;_l(Ml,e)&&(t=Ml[e],delete Ml[e],t())};h&&d||(h=function(e){var t=arguments.length,r=1;if(t<r)throw gl("Not enough arguments");var n=Tl(e)?e:Rl(e),o=Al(arguments,1);return Ml[++Sl]=function(){wl(n,void 0,o)},pl(Sl),Sl},d=function(e){delete Ml[e]},M?pl=function(e){Ol.nextTick(xl(e))}:Nl&&Nl.now?pl=function(e){Nl.now(xl(e))}:C&&!P?(P=(M=new C).port2,M.port1.onmessage=Pl,pl=y(P.postMessage,P)):El.addEventListener&&Tl(El.postMessage)&&!El.importScripts&&cl&&"file:"!==cl.protocol&&!S(kl)?(pl=kl,El.addEventListener("message",Pl,!1)):pl="onreadystatechange"in bl("script")?function(e){Il.appendChild(bl("script")).onreadystatechange=function(){Il.removeChild(this),Ul(e)}}:function(e){setTimeout(xl(e),0)});function Dl(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function Ll(){this.head=null,this.tail=null}function Fl(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=sf(r),this.reject=sf(n)}var jl,Vl,Hl,Gl,Kl,Bl,zl,C={set:h,clear:d},M=v,y=/ipad|iphone|ipod/i.test(Ri)&&void 0!==M.Pebble,P=/web0s(?!.*chrome)/i.test(Ri),S=v,h=Fu,d=f.f,ql=C.set,M=R,f=y,R=P,Yl=Jc,y=S.MutationObserver||S.WebKitMutationObserver,P=S.document,Jl=S.process,$l=S.Promise,d=d(S,"queueMicrotask"),d=d&&d.value,R=(d||(jl=function(){var e,t;for(Yl&&(e=Jl.domain)&&e.exit();Vl;){t=Vl.fn,Vl=Vl.next;try{t()}catch(e){throw Vl?Gl():Hl=void 0,e}}Hl=void 0,e&&e.enter()},Gl=M||Yl||R||!y||!P?!f&&$l&&$l.resolve?((M=$l.resolve(void 0)).constructor=$l,zl=h(M.then,M),function(){zl(jl)}):Yl?function(){Jl.nextTick(jl)}:(ql=h(ql,S),function(){ql(jl)}):(Kl=!0,Bl=P.createTextNode(""),new y(jl).observe(Bl,{characterData:!0}),function(){Bl.data=Kl=!Kl})),d||function(e){e={fn:e,next:void 0};Hl&&(Hl.next=e),Vl||(Vl=e,Gl()),Hl=e}),Xl=v,f=(Ll.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}},Ll),$l=v.Promise,M="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,h=!M&&!Jc&&"object"==typeof window&&"object"==typeof document,S=v,Wl=$l,P=T,y=va,Zl=A,d=I,Ql=h,ef=M,tf=Si,rf=(Wl&&Wl.prototype,d("species")),nf=!1,of=P(S.PromiseRejectionEvent),A={CONSTRUCTOR:y("Promise",function(){var e=Zl(Wl),t=e!==String(Wl);if(!t&&66===tf)return!0;if(!tf||tf<51||!/native code/.test(e)){var e=new Wl(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[rf]=r,!(nf=e.then(function(){})instanceof r))return!0}return!t&&(Ql||ef)&&!of}),REJECTION_EVENT:of,SUBCLASSING:nf},h={},sf=ai;h.f=function(e){return new Fl(e)};function af(e,t){var r,n,o,i,s=t.value,a=1==t.state,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&(i=t,df(Ef,ff,function(){var e=i.facade;lf?xf.emit("rejectionHandled",e):Ff("rejectionhandled",e,i.value)})),t.rejection=1),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),o=!0)),r===e.promise?p(Sf("Promise-chain cycle")):(n=Df(r))?df(n,r,c,p):c(r)):p(s)}catch(e){l&&!o&&l.exit(),p(e)}}var uf,cf,pf,M=N,lf=Jc,ff=v,df=i,d=Ys,P=Ru,S=fp,y=Gp,hf=ai,yf=T,vf=oi,mf=Kp,gf=ul,Ef=C.set,wf=R,Tf=Dl,_f=f,C=Ci,R=$l,f=h,If=A.CONSTRUCTOR,Af=A.REJECTION_EVENT,bf=A.SUBCLASSING,Of=C.getterFor("Promise"),Nf=C.set,C=R&&R.prototype,Rf=R,Cf=C,Sf=ff.TypeError,Mf=ff.document,xf=ff.process,Pf=f.f,kf=Pf,Uf=!!(Mf&&Mf.createEvent&&ff.dispatchEvent),Df=function(e){var t;return!(!vf(e)||!yf(t=e.then))&&t},Lf=function(r,o){r.notified||(r.notified=!0,wf(function(){for(var e,n,t=r.reactions;e=t.get();)af(e,r);r.notified=!1,o&&!r.rejection&&(n=r,df(Ef,ff,function(){var e,t=n.facade,r=n.value;if(jf(n)&&(e=Tf(function(){lf?xf.emit("unhandledRejection",r,t):Ff("unhandledrejection",t,r)}),n.rejection=lf||jf(n)?2:1,e.error))throw e.value}))}))},Ff=function(e,t,r){var n;Uf?((n=Mf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),ff.dispatchEvent(n)):n={promise:t,reason:r},!Af&&(t=ff["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Xl.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},jf=function(e){return 1!==e.rejection&&!e.parent},Vf=function(t,r,n){return function(e){t(r,e,n)}},Hf=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,Lf(e,!0))},Gf=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Sf("Promise can't be resolved itself");var n=Df(e);n?wf(function(){var t={done:!1};try{df(n,e,Vf(Gf,t,r),Vf(Hf,t,r))}catch(e){Hf(t,e,r)}}):(r.value=e,r.state=1,Lf(r,!1))}catch(e){Hf({done:!1},e,r)}}};if(If&&(Cf=(Rf=function(e){mf(this,Cf),hf(e),df(uf,this);var t=Of(this);try{e(Vf(Gf,t),Vf(Hf,t))}catch(e){Hf(t,e)}}).prototype,(uf=function(e){Nf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new _f,rejection:!1,state:0,value:void 0})}).prototype=d(Cf,"then",function(e,t){var r=Of(this),n=Pf(gf(this,Rf));return r.parent=!0,n.ok=!yf(e)||e,n.fail=yf(t)&&t,n.domain=lf?xf.domain:void 0,0==r.state?r.reactions.add(n):wf(function(){af(n,r)}),n.promise}),cf=function(){var e=new uf,t=Of(e);this.promise=e,this.resolve=Vf(Gf,t),this.reject=Vf(Hf,t)},f.f=Pf=function(e){return e===Rf||void 0===e?new cf:kf(e)},yf(R)&&C!==Object.prototype)){pf=C.then,bf||d(C,"then",function(e,t){var r=this;return new Rf(function(e,t){df(pf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete C.constructor}catch(kA){}P&&P(C,Cf)}M({global:!0,constructor:!0,wrap:!0,forced:If},{Promise:Rf}),S(Rf,"Promise",!1),y("Promise");var Kf=I("iterator"),Bf=!1;try{var zf=0,qf={next:function(){return{done:!!zf++}},return:function(){Bf=!0}};qf[Kf]=function(){return this},Array.from(qf,function(){throw 2})}catch(kA){}function Yf(e,t){if(!t&&!Bf)return!1;var r=!1;try{var n={};n[Kf]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function Jf(e,t){return ld(e),fd(t)&&t.constructor===e?t:((0,(e=dd.f(e)).resolve)(t),e.promise)}function $f(o){return function(e,t){var r,e=xd(Pd(e)),t=Md(t),n=e.length;return t<0||n<=t?o?"":void 0:(r=Ud(e,t))<55296||56319<r||t+1===n||(n=Ud(e,t+1))<56320||57343<n?o?kd(e,t):r:o?Dd(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Xf(e,t){if(e){if(e[zd]!==Yd)try{Bd(e,zd,Yd)}catch(t){e[zd]=Yd}if(e[qd]||Bd(e,qd,t),Gd[t])for(var r in Kd)if(e[r]!==Kd[r])try{Bd(e,r,Kd[r])}catch(t){e[r]=Kd[r]}}}var Wf,Zf=$l,f=A.CONSTRUCTOR||!Yf(function(e){Zf.all(e).then(void 0,function(){})}),Qf=i,ed=ai,td=h,rd=Dl,nd=Bu,R=(N({target:"Promise",stat:!0,forced:f},{all:function(e){var a=this,t=td.f(a),u=t.resolve,c=t.reject,r=rd(function(){var n=ed(a.resolve),o=[],i=0,s=1;nd(e,function(e){var t=i++,r=!1;s++,Qf(n,a,e).then(function(e){r||(r=!0,o[t]=e,--s||u(o))},c)}),--s||u(o)});return r.error&&c(r.value),t.promise}}),N),bf=$l,d=ii,P=T,C=Ys,M=bf&&bf.prototype,od=(R({target:"Promise",proto:!0,forced:A.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),P(bf)&&(If=d("Promise").prototype.catch,M.catch!==If&&C(M,"catch",If,{unsafe:!0})),i),id=ai,sd=h,ad=Dl,ud=Bu,cd=(N({target:"Promise",stat:!0,forced:f},{race:function(e){var r=this,n=sd.f(r),o=n.reject,t=ad(function(){var t=id(r.resolve);ud(e,function(e){od(t,r,e).then(n.resolve,o)})});return t.error&&o(t.value),n.promise}}),i),pd=h,ld=(N({target:"Promise",stat:!0,forced:A.CONSTRUCTOR},{reject:function(e){var t=pd.f(this);return cd(t.reject,void 0,e),t.promise}}),di),fd=oi,dd=h,S=N,y=A.CONSTRUCTOR,hd=Jf,yd=(ii("Promise"),S({target:"Promise",stat:!0,forced:y},{resolve:function(e){return hd(this,e)}}),i),vd=ai,md=h,gd=Dl,Ed=Bu,wd=(N({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=md.f(a),u=t.resolve,r=t.reject,n=gd(function(){var n=vd(a.resolve),o=[],i=0,s=1;Ed(e,function(e){var t=i++,r=!1;s++,yd(n,a,e).then(function(e){r||(r=!0,o[t]={status:"fulfilled",value:e},--s||u(o))},function(e){r||(r=!0,o[t]={status:"rejected",reason:e},--s||u(o))})}),--s||u(o)});return n.error&&r(n.value),t.promise}}),i),Td=ai,_d=ii,Id=h,Ad=Dl,bd=Bu,qf=(N({target:"Promise",stat:!0},{any:function(e){var u=this,c=_d("AggregateError"),t=Id.f(u),p=t.resolve,l=t.reject,r=Ad(function(){var n=Td(u.resolve),o=[],i=0,s=1,a=!1;bd(e,function(e){var t=i++,r=!1;s++,wd(n,u,e).then(function(e){r||a||(a=!0,p(e))},function(e){r||a||(r=!0,o[t]=e,--s||l(new c(o,"No one promise resolved")))})}),--s||l(new c(o,"No one promise resolved"))});return r.error&&l(r.value),t.promise}}),N),R=$l,P=g,Od=ii,Nd=T,Rd=ul,Cd=Jf,bf=Ys,Sd=R&&R.prototype,C=(qf({target:"Promise",proto:!0,real:!0,forced:!!R&&P(function(){Sd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Rd(this,Od("Promise")),e=Nd(t);return this.then(e?function(e){return Cd(r,t()).then(function(){return e})}:t,e?function(e){return Cd(r,t()).then(function(){throw e})}:t)}}),Nd(R)&&(d=Od("Promise").prototype.finally,Sd.finally!==d&&bf(Sd,"finally",d,{unsafe:!0})),e),Md=Js,xd=zu,Pd=ri,kd=C("".charAt),Ud=C("".charCodeAt),Dd=C("".slice),Ld=($f(!1),$f(!0)),Fd=zu,M=Ci,If=hp,jd=M.set,Vd=M.getterFor("String Iterator"),f=(If(String,"String",function(e){jd(this,{type:"String Iterator",string:Fd(e),index:0})},function(){var e=Vd(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Ld(t,r),e.index+=t.length,{value:t,done:!1})}),v),A=(f.Promise,fi("span").classList),S=A&&A.constructor&&A.constructor.prototype,y=S===Object.prototype?void 0:S,Hd=v,Gd={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},$l=y,Kd=yp,Bd=as,qf=I,zd=qf("iterator"),qd=qf("toStringTag"),Yd=Kd.values;for(Wf in Gd)Xf(Hd[Wf]&&Hd[Wf].prototype,Wf);Xf($l,"DOMTokenList");function Jd(e,t,r){(t=Eh(t))in e?wh.f(e,t,Th(0,r)):e[t]=r}function $d(e){if(9007199254740991<e)throw jh("Maximum allowed index exceeded");return e}function Xd(e,t){return Vh(e=e)&&(r=e.constructor,(Hh(r)&&(r===Bh||Vh(r.prototype))||Gh(r)&&null===(r=r[Kh]))&&(r=void 0)),new(void 0===r?Bh:r)(0===t?0:t);var r}function Wd(t){return 51<=qh||!zh(function(){var e=[];return(e.constructor={})[Yh]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Zd(e,t){if(!delete e[t])throw ny("Cannot delete property "+ry(t)+" of "+ry(e))}function Qd(f){var d=1==f,h=2==f,y=3==f,v=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var o,i,s=ly(e),a=py(s),u=cy(t,r),c=fy(a),p=0,t=n||dy,l=d?t(e,c):h||g?t(e,0):void 0;p<c;p++)if((E||p in a)&&(i=u(o=a[p],p,s),f))if(d)l[p]=i;else if(i)switch(f){case 3:return!0;case 5:return o;case 6:return p;case 2:hy(l,o)}else switch(f){case 4:return!1;case 7:hy(l,o)}return m?-1:y||v?v:l}}function eh(e,t){var r=[][e];return!!r&&yy(function(){r.call(null,t||function(){return 1},1)})}function th(u){var c=1==u;return function(e,t,r){for(var n,o=Ny(e),i=Oy(o),s=by(t,r),a=Ry(i);0<a--;)if(s(n=i[a],a,o))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function rh(e,t,r,n,o,i,s,a){for(var u,c,p=o,l=0,f=!!s&&ky(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<i&&My(u)?(c=xy(u),p=rh(e,t,u,c,p,i-1)-1):(Py(p+1),e[p]=u),p++),l++;return p}function nh(c){return function(e,t,r,n){cv(t);var o=pv(e),i=lv(o),s=fv(o),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in i){n=i[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw dv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in i&&(n=t(n,i[a],a,o));return n}}function oh(e,t,r){for(var n=Mv(e),o=Sv(t,n),i=Sv(void 0===r?n:r,n),s=Pv(kv(i-o,0)),a=0;o<i;o++,a++)xv(s,a,e[o]);return s.length=a,s}function ih(e,t){var r=e.length,n=Dv(r/2);if(r<8){for(var o,i,s=e,a=t,u=s.length,c=1;c<u;){for(o=s[i=c];i&&0<a(s[i-1],o);)s[i]=s[--i];i!==c++&&(s[i]=o)}return s}for(var p=e,l=ih(Uv(e,0,n),t),f=ih(Uv(e,n),t),d=t,h=l.length,y=f.length,v=0,m=0;v<h||m<y;)p[v+m]=v<h&&m<y?d(l[v],f[m])<=0?l[v++]:f[m++]:v<h?l[v++]:f[m++];return p}function sh(e){Am(e,Sm,{value:{objectID:"O"+Mm++,weakData:{}}})}function ah(e,t,r){for(var n in t)Hm(e,n,t[n],r);return e}var uh,ch,ph,lh,fh,dh,hh,yh=h,vh=Dl,mh=(N({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=yh.f(this),e=vh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),di),gh=Gu,Eh=li,wh=is,Th=ei,_h=Fu,Ih=i,Ah=_,bh=ju,Oh=tp,Nh=O,Rh=Jd,Ch=Hu,Sh=Vu,Mh=Array,xh=(N({target:"Array",stat:!0,forced:!Yf(function(e){Array.from(e)})},{from:function(e){var t=Ah(e),e=Oh(this),r=arguments.length,n=1<r?arguments[1]:void 0,o=void 0!==n;o&&(n=_h(n,2<r?arguments[2]:void 0));var i,s,a,u,c,p,r=Sh(t),l=0;if(!r||this===Mh&&bh(r))for(i=Nh(t),s=e?new this(i):Mh(i);l<i;l++)p=o?n(t[l],l):t[l],Rh(s,l,p);else for(c=(u=Ch(t,r)).next,s=e?new this:[];!(a=Ih(c,u)).done;l++)p=o?function(e,t,r,n){try{return n?t(mh(r)[0],r[1]):t(r)}catch(t){gh(e,"throw",t)}}(u,n,[a.value,l],!0):a.value,Rh(s,l,p);return s.length=l,s}}),ti),P=Array.isArray||function(e){return"Array"==xh(e)},Ph=(N({target:"Array",stat:!0},{isArray:P}),tp),kh=Jd,Uh=Array,Dh=(N({target:"Array",stat:!0,forced:g(function(){function e(){}return!(Uh.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(Ph(this)?this:Uh)(t);e<t;)kh(r,e,arguments[e++]);return r.length=t,r}}),_),Lh=O,Fh=Js,R=x,jh=(N({target:"Array",proto:!0},{at:function(e){var t=Dh(this),r=Lh(t),e=Fh(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),R("at"),TypeError),Vh=P,Hh=tp,Gh=oi,Kh=I("species"),Bh=Array,zh=g,qh=Si,Yh=I("species"),bf=N,d=g,Jh=P,$h=oi,Xh=_,Wh=O,Zh=$d,Qh=Jd,ey=Xd,C=Wd,M=Si,ty=I("isConcatSpreadable"),If=51<=M||!d(function(){var e=[];return e[ty]=!1,e.concat()[0]!==e}),A=C("concat"),ry=(bf({target:"Array",proto:!0,arity:1,forced:!If||!A},{concat:function(e){for(var t,r,n,o=Xh(this),i=ey(o,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!$h(e))return!1;var t=e[ty];return void 0!==t?!!t:Jh(e)}(n=-1===a?o:arguments[a]))for(r=Wh(n),Zh(s+r),t=0;t<r;t++,s++)t in n&&Qh(i,s,n[t]);else Zh(s+1),Qh(i,s++,n);return i.length=s,i}}),si),ny=TypeError,oy=_,iy=$s,sy=O,ay=Zd,uy=Math.min,S=x,cy=(N({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=oy(this),n=sy(r),o=iy(e,n),i=iy(t,n),e=2<arguments.length?arguments[2]:void 0,s=uy((void 0===e?n:iy(e,n))-i,n-o),a=1;for(i<o&&o<i+s&&(a=-1,i+=s-1,o+=s-1);0<s--;)i in r?r[o]=r[i]:ay(r,o),o+=a,i+=a;return r}}),S("copyWithin"),Fu),py=hi,ly=_,fy=O,dy=Xd,hy=e([].push),y={forEach:Qd(0),map:Qd(1),filter:Qd(2),some:Qd(3),every:Qd(4),find:Qd(5),findIndex:Qd(6),filterReject:Qd(7)},yy=g,vy=y.every,my=(N({target:"Array",proto:!0,forced:!eh("every")},{every:function(e){return vy(this,e,1<arguments.length?arguments[1]:void 0)}}),_),gy=$s,Ey=O,yp=x,wy=(N({target:"Array",proto:!0},{fill:function(e){for(var t=my(this),r=Ey(t),n=arguments.length,o=gy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,i=void 0===n?r:gy(n,r);o<i;)t[o++]=e;return t}}),yp("fill"),y.filter),as=(N({target:"Array",proto:!0,forced:!Wd("filter")},{filter:function(e){return wy(this,e,1<arguments.length?arguments[1]:void 0)}}),N),Ty=y.find,qf=x,_y=!0,$l=("find"in[]&&Array(1).find(function(){_y=!1}),as({target:"Array",proto:!0,forced:_y},{find:function(e){return Ty(this,e,1<arguments.length?arguments[1]:void 0)}}),qf("find"),N),Iy=y.findIndex,h=x,Ay=!0,by=("findIndex"in[]&&Array(1).findIndex(function(){Ay=!1}),$l({target:"Array",proto:!0,forced:Ay},{findIndex:function(e){return Iy(this,e,1<arguments.length?arguments[1]:void 0)}}),h("findIndex"),Fu),Oy=hi,Ny=_,Ry=O,R={findLast:th(0),findLastIndex:th(1)},Cy=R.findLast,M=x,Sy=(N({target:"Array",proto:!0},{findLast:function(e){return Cy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),R.findLastIndex),d=x,My=(N({target:"Array",proto:!0},{findLastIndex:function(e){return Sy(this,e,1<arguments.length?arguments[1]:void 0)}}),d("findLastIndex"),P),xy=O,Py=$d,ky=Fu,C=rh,Uy=C,Dy=_,Ly=O,Fy=Js,jy=Xd,Vy=(N({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Dy(this),r=Ly(t),n=jy(t,0);return n.length=Uy(n,t,t,r,0,void 0===e?1:Fy(e)),n}}),C),Hy=ai,Gy=_,Ky=O,By=Xd,zy=(N({target:"Array",proto:!0},{flatMap:function(e){var t,r=Gy(this),n=Ky(r);return Hy(e),(t=By(r,0)).length=Vy(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),y.forEach),bf=eh("forEach")?[].forEach:function(e){return zy(this,e,1<arguments.length?arguments[1]:void 0)},qy=(N({target:"Array",proto:!0,forced:[].forEach!=bf},{forEach:bf}),ha.includes),If=x,A=(N({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)}}),If("includes"),N),Yy=ha.indexOf,S=eh,Jy=e([].indexOf),$y=!!Jy&&1/Jy([1],1,-0)<0,yp=S("indexOf"),as=(A({target:"Array",proto:!0,forced:$y||!yp},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return $y?Jy(this,e,t)||0:Yy(this,e,t)}}),N),qf=hi,Xy=ni,$l=eh,Wy=e([].join),h=qf!=Object,M=$l("join",","),Zy=(as({target:"Array",proto:!0,forced:h||!M},{join:function(e){return Wy(Xy(this),void 0===e?",":e)}}),Zc),Qy=ni,ev=Js,tv=O,R=eh,rv=Math.min,nv=[].lastIndexOf,ov=!!nv&&1/[1].lastIndexOf(1,-0)<0,d=R("lastIndexOf"),C=ov||!d?function(e){if(ov)return Zy(nv,this,arguments)||0;var t=Qy(this),r=tv(t),n=r-1;for((n=1<arguments.length?rv(n,ev(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:nv,iv=(N({target:"Array",proto:!0,forced:C!==[].lastIndexOf},{lastIndexOf:C}),y.map),bf=(N({target:"Array",proto:!0,forced:!Wd("map")},{map:function(e){return iv(this,e,1<arguments.length?arguments[1]:void 0)}}),N),sv=_,av=O,uv=$d,If=g(function(){return 4294967297!==[].push.call({length:4294967296},1)}),ha=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),cv=(bf({target:"Array",proto:!0,arity:1,forced:If||ha},{push:function(e){var t=sv(this),r=av(t),n=arguments.length;uv(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return t.length=r}}),ai),pv=_,lv=hi,fv=O,dv=TypeError,S={left:nh(!1),right:nh(!0)},hv=S.left,A=Si,yp=Jc,yv=(N({target:"Array",proto:!0,forced:!eh("reduce")||!yp&&79<A&&A<83},{reduce:function(e){var t=arguments.length;return hv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),qf=Si,$l=Jc,as=(N({target:"Array",proto:!0,forced:!eh("reduceRight")||!$l&&79<qf&&qf<83},{reduceRight:function(e){return yv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),N),vv=P,mv=e([].reverse),h=[1,2],M=(as({target:"Array",proto:!0,forced:String(h)===String(h.reverse())},{reverse:function(){return vv(this)&&(this.length=this.length),mv(this)}}),N),gv=P,Ev=tp,wv=oi,Tv=$s,_v=O,Iv=ni,Av=Jd,Zc=I,bv=b,R=Wd("slice"),Ov=Zc("species"),Nv=Array,Rv=Math.max,Cv=(M({target:"Array",proto:!0,forced:!R},{slice:function(e,t){var r,n,o,i=Iv(this),s=_v(i),a=Tv(e,s),u=Tv(void 0===t?s:t,s);if(gv(i)&&(r=i.constructor,(r=Ev(r)&&(r===Nv||gv(r.prototype))||wv(r)&&null===(r=r[Ov])?void 0:r)===Nv||void 0===r))return bv(i,a,u);for(n=new(void 0===r?Nv:r)(Rv(u-a,0)),o=0;a<u;a++,o++)a in i&&Av(n,o,i[a]);return n.length=o,n}}),y.some),Sv=(N({target:"Array",proto:!0,forced:!eh("some")},{some:function(e){return Cv(this,e,1<arguments.length?arguments[1]:void 0)}}),$s),Mv=O,xv=Jd,Pv=Array,kv=Math.max,Uv=oh,Dv=Math.floor,d=ih,C=Ri.match(/firefox\/(\d+)/i),bf=!!C&&+C[1],If=/MSIE|Trident/.test(Ri),ha=Ri.match(/AppleWebKit\/(\d+)\./),yp=!!ha&&+ha[1],A=N,S=e,Lv=ai,Fv=_,jv=O,Vv=Zd,Hv=zu,Jc=g,Gv=d,$l=eh,Kv=bf,Bv=If,zv=Si,qv=yp,Yv=[],Jv=S(Yv.sort),$v=S(Yv.push),qf=Jc(function(){Yv.sort(void 0)}),as=Jc(function(){Yv.sort(null)}),h=$l("sort"),Xv=!Jc(function(){if(zv)return zv<70;if(!(Kv&&3<Kv)){if(Bv)return!0;if(qv)return qv<603;for(var e,t,r,n="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Yv.push({k:e+r,v:t})}for(Yv.sort(function(e,t){return t.v-e.v}),r=0;r<Yv.length;r++)e=Yv[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),b=(A({target:"Array",proto:!0,forced:qf||!as||!h||!Xv},{sort:function(e){void 0!==e&&Lv(e);var t=Fv(this);if(Xv)return void 0===e?Jv(t):Jv(t,e);for(var r,n,o=[],i=jv(t),s=0;s<i;s++)s in t&&$v(o,t[s]);for(Gv(o,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Hv(e)>Hv(t)?1:-1})),r=o.length,s=0;s<r;)t[s]=o[s++];for(;s<i;)Vv(t,s++);return t}}),Gp("Array"),N),Wv=_,Zv=$s,Qv=Js,em=O,tm=$d,rm=Xd,nm=Jd,om=Zd,Zc=Wd("splice"),im=Math.max,sm=Math.min,M=(b({target:"Array",proto:!0,forced:!Zc},{splice:function(e,t){var r,n,o,i,s,a,u=Wv(this),c=em(u),p=Zv(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,sm(im(Qv(t),0),c-p)),tm(c+r-n),o=rm(u,n),i=0;i<n;i++)(s=p+i)in u&&nm(o,i,u[s]);if(r<(o.length=n)){for(i=p;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:om(u,a);for(i=c;c-n+r<i;i--)om(u,i-1)}else if(n<r)for(i=c-n;p<i;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:om(u,a);for(i=0;i<r;i++)u[i+p]=arguments[i+2];return u.length=c-n+r,o}}),x("flat"),x("flatMap"),N),am=_,um=O,cm=Zd,pm=$d,R=1!==[].unshift(0),C=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),Ri=(M({target:"Array",proto:!0,arity:1,forced:R||C},{unshift:function(e){var t=am(this),r=um(t),n=arguments.length;if(n){pm(r+n);for(var o=r;o--;){var i=o+n;o in t?t[i]=t[o]:cm(t,i)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),f.Array,{exports:{}}),ha={},lm=ti,fm=ni,dm=Mi.f,hm=oh,ym="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=(ha.f=function(e){if(!ym||"Window"!=lm(e))return dm(fm(e));var t=e;try{return dm(t)}catch(t){return hm(ym)}},g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),bf=g,vm=oi,mm=ti,gm=d,Em=Object.isExtensible,If=bf(function(){Em(1)})||gm?function(e){return!!vm(e)&&(!gm||"ArrayBuffer"!=mm(e))&&(!Em||Em(e))}:Em,Si=!g(function(){return Object.isExtensible(Object.preventExtensions({}))}),wm=N,Tm=e,yp=ua,_m=oi,Im=ts,Am=is.f,bm=Mi,Om=ha,Nm=If,Rm=Si,Cm=!1,Sm=pi("meta"),Mm=0,xm=Ri.exports={enable:function(){xm.enable=function(){},Cm=!0;var o=bm.f,i=Tm([].splice),e={};e[Sm]=1,o(e).length&&(bm.f=function(e){for(var t=o(e),r=0,n=t.length;r<n;r++)if(t[r]===Sm){i(t,r,1);break}return t},wm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Om.f}))},fastKey:function(e,t){if(!_m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Im(e,Sm)){if(!Nm(e))return"F";if(!t)return"E";sh(e)}return e[Sm].objectID},getWeakData:function(e,t){if(!Im(e,Sm)){if(!Nm(e))return!0;if(!t)return!1;sh(e)}return e[Sm].weakData},onFreeze:function(e){return Rm&&Cm&&Nm(e)&&!Im(e,Sm)&&sh(e),e}},Pm=(yp[Sm]=!0,T),km=oi,Um=Ru,S=N,$l=v,Dm=e,Jc=va,Lm=Ys,A=Ri.exports,Fm=Bu,jm=Kp,qf=T,Vm=oi,as=g,h=Yf,b=fp,Hm=Ys,Gm=is.f,Km=Cu,Bm=ah,zm=Fu,qm=Kp,Ym=Bu,Jm=hp,$m=Gp,Xm=r,Wm=Ri.exports.fastKey,Zm=Ci.set,Qm=Ci.getterFor;function eg(e){var r=Dm(dh[e]);Lm(dh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(ph&&!Vm(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return ph&&!Vm(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(ph&&!Vm(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}Zc=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},M={getConstructor:function(e,r,n,o){function i(e,t,r){var n,o=u(e),i=s(e,t);return i?i.value=r:(o.last=i={index:n=Wm(t,!0),key:t,value:r,previous:t=o.last,next:void 0,removed:!1},o.first||(o.first=i),t&&(t.next=i),Xm?o.size++:e.size++,"F"!==n&&(o.index[n]=i)),e}function s(e,t){var r,e=u(e),n=Wm(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){qm(e,a),Zm(e,{type:r,index:Km(null),first:void 0,last:void 0,size:0}),Xm||(e.size=0),null!=t&&Ym(t,e[o],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=Qm(r);return Bm(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,Xm?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),Xm?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=zm(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)}}),Bm(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return i(this,0===e?0:e,t)}}:{add:function(e){return i(this,e=0===e?0:e,e)}}),Xm&&Gm(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",o=Qm(t),i=Qm(n);Jm(e,t,function(e,t){Zm(this,{type:n,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),$m(t)}},ch=-1!==(R="Map").indexOf("Map"),ph=-1!==R.indexOf("Weak"),lh=ch?"set":"add",fh=$l.Map,dh=fh&&fh.prototype,C={},Jc(R,!qf(hh=fh)||!(ph||dh.forEach&&!as(function(){(new fh).entries().next()})))?(hh=M.getConstructor(Zc,R,ch,lh),A.enable()):Jc(R,!0)&&(f=(uh=new hh)[lh](ph?{}:-0,1)!=uh,d=as(function(){uh.has(1)}),bf=h(function(e){new fh(e)}),ua=!ph&&as(function(){for(var e=new fh,t=5;t--;)e[lh](t,t);return!e.has(-0)}),bf||(((hh=Zc(function(e,t){jm(e,dh);r=new fh,e=e,n=hh,Um&&Pm(e=e.constructor)&&e!==n&&km(e=e.prototype)&&e!==n.prototype&&Um(r,e);var r,n=r;return null!=t&&Fm(t,n[lh],{that:n,AS_ENTRIES:ch}),n})).prototype=dh).constructor=hh),(d||ua)&&(eg("delete"),eg("has"),ch&&eg("get")),(ua||f)&&eg(lh),ph&&dh.clear&&delete dh.clear),C.Map=hh,S({global:!0,constructor:!0,forced:hh!=fh},C),b(hh,R),ph||M.setStrong(hh,R,ch);function tg(e,t){for(var r=0,n=ig(t),o=new e(n);r<n;)o[r]=t[r++];return o}function rg(e,t,r,n){for(var o,i,s,a=ug(e),u=ag(a),c=sg(t,r),p=lg(null),l=pg(u),f=0;f<l;f++)s=u[f],(i=cg(c(s,f,a)))in p?hg(p[i],s):p[i]=[s];if(n&&(o=n(a))!==dg)for(i in p)p[i]=fg(o,p[i]);return p}function ng(e){for(var t,r,n=Eg(this),o=gg(n),i=mg(e,1<arguments.length?arguments[1]:void 0),s=new Tg,a=wg(o),u=0;u<a;u++)t=i(r=o[u],u,n),Ig(s,t)?bg(_g(s,t),r):Ag(s,t,[r]);return s}function og(e){return Cg[e].prototype}var ig=O,sg=Fu,ag=hi,ug=_,cg=li,pg=O,lg=Cu,fg=tg,dg=Array,hg=e([].push),yg=rg,ts=x,vg=(N({target:"Array",proto:!0},{group:function(e){return yg(this,e,1<arguments.length?arguments[1]:void 0)}}),ts("group"),rg),Mi=x,mg=(N({target:"Array",proto:!0,forced:!eh("groupBy")},{groupBy:function(e){return vg(this,e,1<arguments.length?arguments[1]:void 0)}}),Mi("groupBy"),Fu),ha=e,gg=hi,Eg=_,wg=O,Tg=ii("Map"),If=Tg.prototype,_g=ha(If.get),Ig=ha(If.has),Ag=ha(If.set),bg=ha([].push),Si=x,yp=ng,Ru=(N({target:"Array",proto:!0,name:"groupToMap",forced:!eh("groupByToMap")},{groupByToMap:yp}),Si("groupByToMap"),x),Og=(N({target:"Array",proto:!0},{groupToMap:ng}),Ru("groupToMap"),O),Ng=ni,va=x,Rg=Array,Cg=(N({target:"Array",proto:!0},{toReversed:function(){for(var e=Ng(this),t=Rg,r=Og(e),n=new t(r),o=0;o<r;o++)n[o]=e[r-o-1];return n}}),va("toReversed"),v),Ri=N,Sg=ai,Mg=ni,xg=tg,$l=x,Pg=Array,kg=e(og("Array").sort),Jc=(Ri({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&Sg(e);var t=Mg(this),t=xg(Pg,t);return kg(t,e)}}),$l("toSorted"),N),h=x,Ug=$d,Dg=O,Lg=$s,Fg=ni,jg=Js,Vg=Array,Hg=Math.max,Gg=Math.min,Kg=(Jc({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,o,i,s=Fg(this),a=Dg(s),u=Lg(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,Gg(Hg(jg(t),0),a-u)),o=Ug(a+r-n),i=Vg(o);c<u;c++)i[c]=s[c];for(;c<u+r;c++)i[c]=arguments[c-u+2];for(;c<o;c++)i[c]=s[c+n-r];return i}}),h("toSpliced"),O),Bg=Js,zg=RangeError,qg=ni,Yg=Array;N({target:"Array",proto:!0},{with:function(e,t){var r=qg(this),n=Yg,o=t,i=Kg(r),s=(e=Bg(e))<0?i+e:e;if(i<=s||s<0)throw zg("Incorrect index");for(var a=new n(i),u=0;u<i;u++)a[u]=u===s?o:r[u];return a}});as=v,bf=$i,Zc=T,d=Bs,ua=Ys,f=I("asyncIterator"),S=as.AsyncIterator,C=bf.AsyncIteratorPrototype;if(C)UE=C;else if(Zc(S))UE=S.prototype;else if(bf.USE_FUNCTION_CONSTRUCTOR||as.USE_FUNCTION_CONSTRUCTOR)try{NE=d(d(d(Function("return async function*(){}()")()))),d(NE)===Object.prototype&&(UE=NE)}catch(kA){}Zc((UE=UE||{})[f])||ua(UE,f,function(){return this});function Jg(e,t,r){var n=e.done;n0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function $g(e){o0(this,{type:"AsyncFromSyncIterator",iterator:t0(e),next:e.next})}function Xg(e,t,r,n){try{var o=v0(e,"return");if(o)return y0("Promise").resolve(h0(o,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function Wg(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:f0(d0(e).next)},u=T0("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||g0(s),new u(function(r,n){var o=function(e){Xg(c,n,e,n)},i=function(){try{if(f&&l)try{w0(p)}catch(e){o(e)}u.resolve(E0(m0(t,c))).then(function(e){try{if(E0(e).done)f?(a.length=p,r(a)):r(!y&&(h||void 0));else{var t=e.value;try{l?u.resolve(f?s(t,p):s(t)).then(function(e){if(d)i();else if(h)e?i():Xg(c,r,!1,n);else if(f)try{a[p++]=e,i()}catch(e){o(e)}else e?Xg(c,r,y||t,n):i()},o):(a[p++]=t,i())}catch(e){o(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};i()})}}function Zg(e,t){if(!D0||!U0(e)||!D0(e))return!1;for(var r,n=0,o=e.length;n<o;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==o}function Qg(e,t,r){r.get&&L0(r.get,t,{getter:!0}),r.set&&L0(r.set,t,{setter:!0}),F0.f(e,t,r)}var e0=i,t0=di,b=Cu,r0=ui,M=ah,R=Ci,ts=UE,n0=ii("Promise"),o0=R.set,i0=R.getterFor("AsyncFromSyncIterator"),Mi=($g.prototype=M(b(ts),{next:function(){var n=i0(this);return new n0(function(e,t){var r=t0(e0(n.next,n.iterator));Jg(r,e,t)})},return:function(){var n=i0(this).iterator;return new n0(function(e,t){var r=r0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=t0(e0(r,n));Jg(r,e,t)})}}),$g),s0=i,a0=Mi,u0=di,c0=Hu,p0=ui,l0=I("asyncIterator"),f0=ai,d0=di,h0=i,y0=ii,v0=ui,m0=i,g0=ai,E0=di,w0=$d,T0=ii,hi={toArray:Wg(0),forEach:Wg(1),every:Wg(2),some:Wg(3),find:Wg(4)},_0=Fu,I0=_,A0=tp,b0=Hu,O0=Vu,N0=ui,If=og,R0=ii,C0=Mi,S0=hi.toArray,M0=I("asyncIterator"),x0=If("Array").values,P0=(N({target:"Array",stat:!0,forced:!0},{fromAsync:function(i){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(R0("Promise"))(function(e){var t=I0(i),r=(void 0!==a&&(a=_0(a,u)),N0(t,M0)),n=r?void 0:O0(t)||x0,o=A0(s)?new s:[],r=r?function(e,t){t=arguments.length<2?p0(e,l0):t;return t?u0(s0(t,e)):new a0(c0(e))}(t,r):new C0(b0(t,n));e(S0(r,a,o))})}}),y.filterReject),ha=x,k0=(N({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return P0(this,e,1<arguments.length?arguments[1]:void 0)}}),ha("filterOut"),y.filterReject),yp=x,Si=(N({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return k0(this,e,1<arguments.length?arguments[1]:void 0)}}),yp("filterReject"),N),U0=P,D0=Object.isFrozen,L0=(Si({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Zg(e,!0))return!1;var t=e.raw;return t.length===e.length&&Zg(t,!1)}}),Li.exports),F0=is,Ru=x,j0=_,V0=O,va=(r&&(Qg(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=j0(this),t=V0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=j0(this),r=V0(t);return t[0==r?0:r-1]=e}}),Ru("lastItem")),x),H0=_,G0=O,Ri=(r&&(Qg(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=H0(this),e=G0(e);return 0==e?0:e-1}}),va("lastIndex")),e),K0=ai,B0=O,z0=_,q0=Xd,Y0=ii("Map"),$l=Y0.prototype,J0=Ri($l.forEach),$0=Ri($l.has),X0=Ri($l.set),W0=Ri([].push),Jc=x;N({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=z0(this),o=B0(n),i=q0(n,0),s=new Y0,a=null!=e?K0(e):function(e){return e},u=0;u<o;u++)r=a(t=n[u]),$0(s,r)||X0(s,r,t);return J0(s,function(e){W0(i,e)}),i}}),Jc("uniqueBy");a_.prototype.start=function(){this.timeoutId=setTimeout(this.callback,this.timeout)},a_.prototype.refresh=function(){this.stop(),this.start()},a_.prototype.stop=function(){this.timeoutId&&clearTimeout(this.timeoutId)};var Z0,Q0,eE,tE,rE,nE,oE,iE,sE,aE=a_,uE=(s_.prototype.start=function(){this.started=!0},s_.prototype.stop=function(){this.started=!1;var e=this.sink(this.buffer,!0);return this.buffer=[],this.timer.stop(),e},s_.prototype.enqueue=function(e){this.started&&(0===this.buffer.length&&this.timer.refresh(),this.buffer.push(e),this.buffer.length>=this.maxQueueSize&&this.flush())},s_.prototype.flush=function(){this.sink(this.buffer),this.buffer=[],this.timer.stop()},s_.prototype.close=function(){this.stop()},s_),h=(i_.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},i_.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},i_.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},ce(o_,sE=i_),ce(n_,iE=o_),n_.prototype.isClientError=function(e){return!!(e&&400<=e.statusCode&&e.statusCode<500)},n_.prototype.drainRepository=function(i){var e=this;return new Promise(function(o){return pe(e,void 0,void 0,function(){var t,r,n=this;return le(this,function(e){switch(e.label){case 0:return[4,null==(r=this.repository)?void 0:r.read()];case 1:return(t=e.sent())&&0!==t.length?i?this.eventDispatcher.dispatchXhrOrBeacon(t,function(){var e;o(null==(e=n.repository)?void 0:e.delete(t))},function(e){n.isClientError(e)?o(null==(e=n.repository)?void 0:e.delete(t)):o()}):this.eventDispatcher.dispatch(t,function(){var e;o(null==(e=n.repository)?void 0:e.delete(t))},function(e){n.isClientError(e)?o(null==(e=n.repository)?void 0:e.delete(t)):o()}):o(),[2]}})})})},n_.prototype.drainQueue=function(o,i){var e=this,s=o.map(function(e){return e.toDto()});return new Promise(function(n){return pe(e,void 0,void 0,function(){var t,r=this;return le(this,function(e){return 0===o.length?n():i?(null!=(t=this.repository)&&t.add(s),this.eventDispatcher.dispatchXhrOrBeacon(o,function(){var e;n(null==(e=r.repository)?void 0:e.delete(s))},function(e){r.isClientError(e)?n(null==(e=r.repository)?void 0:e.delete(s)):n()})):this.eventDispatcher.dispatch(o,function(){n()},function(e){r.isClientError(e)?n():n(null==(e=r.repository)?void 0:e.add(s))}),[2]})})})},n_.prototype.process=function(e){this.queue.enqueue(e),this.emit("event",e)},n_.prototype.start=function(){return pe(this,void 0,void 0,function(){return le(this,function(e){return this.queue.start(),[2]})})},n_.prototype.stop=function(){try{this.queue.close()}catch(e){}return Promise.resolve()},n_.prototype.flush=function(){this.queue.flush()},n_.prototype.close=function(){this.stop()},n_),cE=(r_.isSessionEvent=function(e){return!!so.isTrack(e)&&(e.event.key===r_.SESSION_START_EVENT_NAME||e.event.key===r_.SESSION_END_EVENT_NAME)},r_.prototype.onSessionStarted=function(e,t,r){this.track(r_.SESSION_START_EVENT_NAME,e,t,r)},r_.prototype.onSessionEnded=function(e,t,r){this.track(r_.SESSION_END_EVENT_NAME,e,t,r)},r_.prototype.track=function(e,t,r,n){e={key:e,properties:{sessionId:t}},r=this.hackleUserResolver.resolve(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},r_.prototype.decorateSession=function(e,t){t=(new $e).add(Je.SESSION,t).addIdentifiers(e.identifiers).build();return E(E({},e),{identifiers:t})},r_.SESSION_START_EVENT_NAME="$session_start",r_.SESSION_END_EVENT_NAME="$session_end",r_),pE=(ce(t_,oE=h),t_.prototype.process=function(e){var t;cE.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[Je.SESSION]?e:e.copyWithUser(E(E({},e.user),{identifiers:E(E({},e.user.identifiers),((e={})[Je.SESSION]=t.sessionId,e))})),oE.prototype.process.call(this,t))},t_),lE=(e_.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!so.isExposure(e))return!1;be.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)},e_),fE=(QT.toEvent=function(e){var t;return{key:QT.EVENT_KEY,properties:{level:QT.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:QT._stacktrace(e)}}},QT._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,QT.STACK_TRACK_LIMIT).join("\n")},QT.EVENT_KEY="$trace",QT.LEVEL_ERROR="error",QT.STACK_TRACK_LIMIT=30,QT),v=(ZT.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)}},ZT),dE=(WT.prototype.with=function(e){return new WT(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},WT.of=function(e,t,r,n){var o=this.config(e.workspace,r);return new WT(n,t.targetEvaluations,e.experiment,r.id,r.key,o)},WT.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new WT(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},WT.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},WT),hE=(ce(XT,nE=v),XT.prototype.supports=function(e){return void 0!==e.experiment},XT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:dE.ofDefault(e,t,s.TRAFFIC_NOT_ALLOCATED)},XT),yE=($T.of=function(e,t,r,n,o,i){return i.returnValue=n,new $T(o,t.targetEvaluations,e.parameter,r,n,i)},$T.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},$T),vE=(ce(JT,rE=v),JT.prototype.supports=function(e){return void 0!==e.parameter},JT.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=e.defaultValue,a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return yE.ofDefault(e,t,s.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,s.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,s.DEFAULT_RULE,r)},JT.prototype.evaluation=function(e,t,r,n,o){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?yE.ofDefault(e,t,s.TYPE_MISMATCH,o):yE.of(e,t,r.id,r.rawValue,n,o)},JT),mE=(YT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},YT),gE=(qT.create=function(){return new qT},Object.defineProperty(qT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(qT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),qT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},qT.prototype.addRequest=function(e){this._stack.push(e)},qT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},qT.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof dE&&e.experiment.id===t.id})},qT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},qT),EE=(zT.of=function(e,t,r,n){return new zT(e,t,r,n)},zT.by=function(e,t){return new zT(e.workspace,e.user,t,"A")},zT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},zT),wE=(BT.of=function(e,t,r,n,o){return new BT(e,t,r,n,o)},BT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},BT),TE=(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),_E=(GT.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var o=n[r].getVariation(e,t);if(void 0!==o)return o}},GT),IE=(HT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},HT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return TE.asNumber(e)},HT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=TE.asNumber(t),e=TE.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},HT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},HT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},HT.prototype.clear=function(){this.listStorage.clear()},HT),AE=(VT.prototype.add=function(e){this.evaluators.push(e)},VT.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)},VT),bE=(jT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},jT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},jT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},jT),OE=(FT.prototype.matches=function(e,t){var r=this.valueMatcherFactory.getMatcher(t.valueType),n=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,r,n);return this.typeMatches(t.type,e)},FT.prototype.userValueMatches=function(e,t,r,n){return Array.isArray(e)?this.arrayMatches(e,t,r,n):this.singleMatches(e,t,r,n)},FT.prototype.singleMatches=function(t,e,r,n){return e.values.some(function(e){return r.matches(n,t,e)})},FT.prototype.arrayMatches=function(e,t,r,n){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n)})},FT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},FT),$i=(LT.prototype.booleanMatches=function(e,t){return e===t},LT.prototype.numberMatches=function(e,t){return e===t},LT.prototype.stringMatches=function(e,t){return e===t},LT.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},LT),Bs=(DT.prototype.booleanMatches=function(e,t){return!1},DT.prototype.numberMatches=function(e,t){return!1},DT.prototype.stringMatches=function(e,t){return e.includes(t)},DT.prototype.versionMatches=function(e,t){return!1},DT),C=(UT.prototype.booleanMatches=function(e,t){return!1},UT.prototype.numberMatches=function(e,t){return!1},UT.prototype.stringMatches=function(e,t){return e.startsWith(t)},UT.prototype.versionMatches=function(e,t){return!1},UT),S=(kT.prototype.booleanMatches=function(e,t){return!1},kT.prototype.numberMatches=function(e,t){return!1},kT.prototype.stringMatches=function(e,t){return e.endsWith(t)},kT.prototype.versionMatches=function(e,t){return!1},kT),bf=(PT.prototype.booleanMatches=function(e,t){return!1},PT.prototype.numberMatches=function(e,t){return t<e},PT.prototype.stringMatches=function(e,t){return t<e},PT.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},PT),as=(xT.prototype.booleanMatches=function(e,t){return!1},xT.prototype.numberMatches=function(e,t){return t<=e},xT.prototype.stringMatches=function(e,t){return t<=e},xT.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},xT),d=(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),NE=(ST.prototype.booleanMatches=function(e,t){return!1},ST.prototype.numberMatches=function(e,t){return e<=t},ST.prototype.stringMatches=function(e,t){return e<=t},ST.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},ST),RE=(CT.prototype.getMatcher=function(e){switch(e){case"IN":return CT.IN_MATCHER;case"CONTAINS":return CT.CONTAINS_MATCHER;case"STARTS_WITH":return CT.STARTS_WITH_MATCHER;case"ENDS_WITH":return CT.ENDS_WITH_MATCHER;case"GT":return CT.GT_MATCHER;case"GTE":return CT.GTE_MATCHER;case"LT":return CT.LT_MATCHER;case"LTE":return CT.LTE_MATCHER}},CT.IN_MATCHER=new $i,CT.CONTAINS_MATCHER=new Bs,CT.STARTS_WITH_MATCHER=new C,CT.ENDS_WITH_MATCHER=new S,CT.GT_MATCHER=new bf,CT.GTE_MATCHER=new as,CT.LT_MATCHER=new d,CT.LTE_MATCHER=new NE,CT),Zc=(RT.prototype.matches=function(e,t,r){t=TE.asString(t),r=TE.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},RT),ua=(NT.prototype.matches=function(e,t,r){t=TE.asNumber(t),r=TE.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},NT),f=(OT.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},OT),Cu=(bT.prototype.matches=function(e,t,r){t=kt.tryParse(t),r=kt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},bT),Ci=(AT.prototype.matches=function(e,t,r){return!1},AT),CE=(IT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return IT.STRING_MATCHER;case"NUMBER":return IT.NUMBER_MATCHER;case"BOOLEAN":return IT.BOOLEAN_MATCHER;case"VERSION":return IT.VERSION_MATCHER;case"NULL":case"UNKNOWN":return IT.NULL_MATCHER}},IT.STRING_MATCHER=new Zc,IT.NUMBER_MATCHER=new ua,IT.BOOLEAN_MATCHER=new f,IT.VERSION_MATCHER=new Cu,IT.NULL_MATCHER=new Ci,IT),SE=(_T.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},_T),ME=(TT.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":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},TT),xE=(wT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var o=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return o;case"NOT_MATCH":return!o}},wT.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,"]"))},wT),PE=(ET.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},ET.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},ET),kE=(gT.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":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},gT),UE=(mT.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(TE.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var o=null!=(o=t.get(n))?o:this.evaluate(e,t,n);return this.evaluationMatches(o,r)},mT.prototype.evaluate=function(e,t,r){r=EE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},mT),DE=(ce(vT,tE=UE),vT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},vT.prototype.resolve=function(e,t){return e instanceof EE&&t.reason===s.TRAFFIC_ALLOCATED?t.with(s.TRAFFIC_ALLOCATED_BY_TARGETING):t},vT.prototype.evaluationMatches=function(e,t){return!!vT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},vT.AB_TEST_MATCHED_REASONS=[s.OVERRIDDEN,s.TRAFFIC_ALLOCATED,s.EXPERIMENT_COMPLETED,s.TRAFFIC_ALLOCATED_BY_TARGETING],vT),LE=(ce(yT,eE=UE),yT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},yT.prototype.resolve=function(e,t){return t},yT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},yT),FE=(hT.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)},hT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},hT),jE=(dT.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":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},dT.prototype.properties=function(e){return so.isTrack(e)?e.event.properties:so.isExposure(e)||so.isRemoteConfig(e)?e.properties:void 0},dT),VE=(fT.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}},fT),HE=(lT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},lT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},lT.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)}},lT),GE={murmurhash3_x86_32:function(e,t,r,n){for(var o,i=-4&(n=void 0===n?e.length:n),s=t,a=0;a<i;a+=4)o=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s=5*((524287&(s^=o=this.mul32(o,461845907)))<<13|s>>>19)+3864292196|0;switch(o=0,n%4){case 3:o=(255&e.charCodeAt(2+i))<<16;case 2:o|=(255&e.charCodeAt(1+i))<<8;case 1:o|=255&e.charCodeAt(i),o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s^=o=this.mul32(o,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),(s=this.mul32(s^=s>>>13,3266489909))^s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},KE=(pT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},pT.prototype.calculateSlotNumber=function(e,t,r){r=GE.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},pT),BE=(cT.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},cT.end=function(){return new cT(void 0,void 0)},cT.decision=function(e,t){return new cT(e,t)},cT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,o=e.reverse();n<o.length;n++)var i=o[n],r=this.decision(i,r);return r},cT),zE=(uT.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 dE.of(e,t,n,s.OVERRIDDEN);case"FEATURE_FLAG":return dE.of(e,t,n,s.INDIVIDUAL_TARGET_MATCH)}},uT),qE=(aT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?dE.ofDefault(e,t,s.EXPERIMENT_DRAFT):r.evaluate(e,t)},aT),YE=(sT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return dE.ofDefault(e,t,s.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return dE.ofDefault(e,t,s.FEATURE_FLAG_INACTIVE)}},sT),JE=(iT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return dE.of(e,t,r,s.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},iT),$E=(oT.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):dE.ofDefault(e,t,s.NOT_IN_EXPERIMENT_TARGET)},oT),XE=(nT.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?dE.ofDefault(e,t,s.VARIATION_DROPPED):dE.of(e,t,n,s.TRAFFIC_ALLOCATED):dE.ofDefault(e,t,s.TRAFFIC_NOT_ALLOCATED)},nT),WE=(rT.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 dE.of(e,t,r,s.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},rT),ZE=(tT.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 dE.ofDefault(e,t,s.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return dE.of(e,t,n,s.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},tT),QE=(eT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var o=e.workspace.getContainerOrNull(n);if(o)return this.containerResolver.isUserInContainerGroup(e,t,o)?r.evaluate(e,t):dE.ofDefault(e,t,s.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},eT),ew=(Qw.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):dE.ofDefault(e,t,s.IDENTIFIER_NOT_FOUND)},Qw),tw=(Zw.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)})},Zw),rw=(Ww.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},Ww),nw=(Xw.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},Xw.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},Xw.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)}},Xw.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)},Xw),ow=($w.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var o=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(o))throw new Error("Bucket[".concat(r.bucketId,"]"));o=this.bucketer.bucketing(o,n);if(a.isNullOrUndefined(o))return!1;n=r.getGroupOrNull(o.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(o.variationId,"]"));return n.experiments.includes(e.experiment.id)},$w),iw=(Jw.of=function(e,t,r,n){return new Jw(r,t.targetEvaluations,e.inAppMessage,n)},Jw),sw=(Yw.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):iw.of(e,t,s.UNSUPPORTED_PLATFORM)},Yw),aw=(qw.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),iw.of(e,t,s.OVERRIDDEN,n)):r.evaluate(e,t)},qw),uw=(zw.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?iw.of(e,t,s.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},zw),cw=(Bw.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?iw.of(e,t,s.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},Bw),pw=(Kw.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_PERIOD)},Kw),lw=(Gw.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?iw.of(e,t,s.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},Gw),fw=(Hw.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),iw.of(e,t,s.IN_APP_MESSAGE_TARGET,n)):iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_TARGET)},Hw),dw=(Vw.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},Vw),hw=(jw.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},jw.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},jw),yw=(Fw.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)})},Fw),vw=(Lw.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},Lw),mw=(Dw.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},Dw.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))},Dw),gw=(Uw.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Uw.getOrNull=function(e){return Uw.instances.get(e)},Uw.register=function(e,t){return Uw.instances.set(e,t),t},Uw.instances=new Map,Uw),Ew=(kw.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},kw.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},kw),ww=(Pw.prototype.create=function(r,e){var n=this,o=this.clock.currentMillis(),i=new Array,t=this.createEvent(r,e,o,{});return i.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[Pw.ROOT_TYPE]=r.key.type,t[Pw.ROOT_ID]=r.key.id;e=n.createEvent(r,e,o,t);i.push(e)}),i},Pw.prototype.createEvent=function(e,t,r,n){var o;if(t instanceof dE)return n[Pw.CONFIG_ID_PROPERTY_KEY]=null==(o=t.config)?void 0:o.id,so.exposure(e.user,t,n,r);if(t instanceof yE)return so.remoteConfig(e.user,t,E(E({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},Pw.ROOT_TYPE="$targetingRootType",Pw.ROOT_ID="$targetingRootId",Pw.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",Pw),Tw=(ce(xw,Q0=v),xw.prototype.supports=function(e){return void 0!==e.inAppMessage},xw.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_TARGET)},xw),_w=(Mw.of=function(e,t,r,n){return new Mw(e,t,r,n)},Mw.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},Mw),Iw=w.log,Aw=(Sw.create=function(e,t,r,n){var o=new AE,r=new _E(r),r=new Ew(o,r,n),n=new hE(r),i=new vE(r.remoteConfigParameterTargetRuleDeterminer),r=new Tw(r);return o.add(n),o.add(i),new Sw(n,i,r,e,new ww(Se.instance),t,new bw,Se.instance)},Sw.prototype.experiment=function(e,t,r){var n=this;if(!e)return Iw.error("experimentKey must not be empty"),Ve.of(r,s.INVALID_INPUT);var o=this.workspaceFetcher.get();if(!o)return Iw.warn("SDK not ready."),Ve.of(r,s.SDK_NOT_READY);e=o.getExperimentOrNull(e);if(!e)return Iw.warn("Experiment does not exist."),Ve.of(r,s.EXPERIMENT_NOT_FOUND);o=EE.of(o,t,e,r),t=this.experimentInternal(o),e=t[0],r=t[1];return this.eventFactory.create(o,e).forEach(function(e){return n.eventProcessor.process(e)}),r},Sw.prototype.experiments=function(r){var n=this,o=new Zr(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getExperiments().forEach(function(e){var t=EE.of(i,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},Sw.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,gE.create()),t=null!=(t=e.config)?t:new Ge;return[e,Ve.of(e.variationKey,e.reason,t)]},Sw.prototype.featureFlag=function(e,t){var r=this;if(!e)return Iw.error("featureKey must not be empty"),He.off(s.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return Iw.warn("SDK not ready."),He.off(s.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return Iw.warn("FeatureFlag does not exist."),He.off(s.FEATURE_FLAG_NOT_FOUND);n=EE.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},Sw.prototype.featureFlags=function(r){var n=this,o=new Zr(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getFeatureFlags().forEach(function(e){var t=EE.of(i,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},Sw.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,gE.create()),t=null!=(t=e.config)?t:new Ge;return[e,"A"===e.variationKey?He.off(e.reason,t):He.on(e.reason,t)]},Sw.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return Iw.warn("SDK not ready."),je.of(s.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return Iw.warn("In app message does not exist."),je.of(s.IN_APP_MESSAGE_NOT_FOUND);r=_w.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,gE.create());return je.of(t.reason,t.inAppMessage,t.message)},Sw.prototype.tryInAppMessage=function(e,t){var r,n=wr.start();try{r=this.inAppMessage(e,t)}catch(t){Iw.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=je.of(s.EXCEPTION)}return Tn.inAppMessage(n,e,r),r},Sw.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 Ye(0,e.key),this.eventProcessor.process(so.track(n,e,t,r))):Iw.warn("Event key must be not null. or event key must be string type."):Iw.warn("Event must be event type."):Iw.warn("event must not be null.")},Sw.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=fE.toEvent(e),this.flush(),this.track(e,t),this.flush())},Sw.prototype.flush=function(){this.eventProcessor.flush()},Sw.prototype.remoteConfig=function(e,t,r,n){var o=this,i=this.workspaceFetcher.get();if(a.isNullOrUndefined(i))return Iw.warn("SDK not ready."),Fe.of(n,s.SDK_NOT_READY);e=i.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return Iw.warn("Remote config parameter does not exist."),Fe.of(n,s.REMOTE_CONFIG_PARAMETER_NOT_FOUND);i=wE.of(i,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(i,gE.create());return this.eventFactory.create(i,t).forEach(function(e){return o.eventProcessor.process(e)}),Fe.of(t.value,t.reason)},Sw.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).then(function(){return e()})},Sw.prototype.onInitialized=function(e){var t,e=e.timeout,e=void 0===e?3e3:e,r=(Iw.debug("Start HackleClient initializing"),new Promise(function(e){t=e})),n=setTimeout(function(){t({success:!1})},e);return this.readyPromise.then(function(){clearTimeout(n),t({success:!0})},function(e){clearTimeout(n),t({success:!1,error:e})}),Promise.race([this.readyPromise,r]).then(function(e){return e.success?Iw.debug("HackleClient onInitialized Success"):e.error instanceof Error?Iw.error("HackleClient onInitialized Failed. ".concat(e.error.message)):Iw.error("HackleClient onInitialized Failed. ".concat(e.error)),Promise.resolve({success:e.success})})},Sw.prototype.close=function(){this.workspaceFetcher.close(),this.eventProcessor.close()},Sw),bw=(Cw.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},Cw.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},Cw),Ow=(Rw.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},Rw.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},Rw),Nw=null;function Rw(){this._installed=[],this._installations={onerror:u_,onunhandledrejection:c_}}function Cw(){}function Sw(e,t,r,n,o,i,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=o,this.eventProcessor=i,this.errorDedupDeterminer=s,this.clock=a,this.workspaceFetcher.start(),this.eventProcessor.start(),this.readyPromise=this.workspaceFetcher.onReady().then(function(){return{success:!0}},function(e){return{success:!1,error:e}})}function Mw(e,t,r,n){this.key=new mE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function xw(e){var t=Q0.call(this)||this;return t.evaluationFlowFactory=e,t}function Pw(e){this.clock=e}function kw(e,t,r){var n=new KE,e=gw.register("targetMatcher",new bE(new VE(e))),o=new HE(n),t=new nw(t,e,o),i=new ow(n),i=(this.abTestFlow=BE.of(new zE(t),new ew,new QE(i),new $E(new tw(e)),new qE,new YE,new JE,new XE(o)),this.featureFlagFlow=BE.of(new qE,new YE,new JE,new zE(t),new ew,new WE(new rw(e),o),new ZE(o)),new dw);this.inAppMessageFlow=BE.of(new sw,new aw(new hw,i),new uw,new cw,new pw,new lw(new vw(r)),new fw(new yw(e),i)),this.remoteConfigParameterTargetRuleDeterminer=new mw(e,n)}function Uw(){}function Dw(e,t){this.targetMatcher=e,this.bucketer=t}function Lw(e){this.storage=e}function Fw(e){this.targetMatcher=e}function jw(){}function Vw(){}function Hw(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function Gw(e){this.hiddenMatcher=e}function Kw(){}function Bw(){}function zw(){}function qw(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function Yw(){}function Jw(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function $w(e){this.bucketer=e}function Xw(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function Ww(e){this.targetMatcher=e}function Zw(e){this.targetMatcher=e}function Qw(){}function eT(e){this.containerResolver=e}function tT(e){this.actionResolver=e}function rT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function nT(e){this.actionResolver=e}function oT(e){this.experimentTargetDeterminer=e}function iT(){}function sT(){}function aT(){}function uT(e){this.overrideResolver=e}function cT(e,t){this.flowEvaluator=e,this.nextFlow=t}function pT(){}function lT(e){this.bucketer=e}function fT(e){var t=new OE(new CE,new RE);this.userConditionMatcher=new SE(new ME,t),this.eventConditionMatcher=new FE(new jE,t),this.segmentConditionMatcher=new xE(new PE(this.userConditionMatcher)),this.experimentConditionMatcher=new kE(new DE(e,t),new LE(e,t))}function dT(){}function hT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function yT(e,t){return eE.call(this,e,t)||this}function vT(e,t){return tE.call(this,e,t)||this}function mT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function gT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function ET(e){this.userConditionMatcher=e}function wT(e){this.segmentMatcher=e}function TT(){}function _T(e,t){this.userValueResolver=e,this.valueOperatorMatcher=t}function IT(){}function AT(){}function bT(){}function OT(){}function NT(){}function RT(){}function CT(){}function ST(){}function MT(){}function xT(){}function PT(){}function kT(){}function UT(){}function DT(){}function LT(){}function FT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function jT(e){this.conditionMatcherFactory=e}function VT(){this.evaluators=new Array}function HT(e){this.listStorage=e}function GT(e){this.storages=e}function KT(){}function BT(e,t,r,n,o){this.key=new mE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=o}function zT(e,t,r,n){this.key=new mE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function qT(){this._stack=[],this._targetEvaluations=[]}function YT(e,t){this.type=e,this.id=t}function JT(e){var t=rE.call(this)||this;return t.targetRuleDeterminer=e,t}function $T(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=o,this.properties=i}function XT(e){var t=nE.call(this)||this;return t.evaluationFlowFactory=e,t}function WT(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=o,this.config=i}function ZT(){}function QT(){}function e_(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function t_(e,t,r,n,o,i,s){e=oE.call(this,e,t,r,n=void 0===n?null:n)||this;return e.exposureEventDedupDeterminer=o,e.sessionManager=i,e.userManager=s,e}function r_(e,t){this.hackleUserResolver=e,this.core=t}function n_(e,t,r,n){void 0===n&&(n=null);var o=iE.call(this)||this;return o.eventDispatcher=e,o.flushInterval=r,o.queue=new uE(o.drainQueue.bind(o),t,r),o.repository=n,o}function o_(){return null!==sE&&sE.apply(this,arguments)||this}function i_(){this.listeners={}}function s_(e,t,r){this.buffer=[],this.sink=e,this.maxQueueSize=t,this.timer=new aE({callback:this.flush.bind(this),timeout:r}),this.started=!1}function a_(e){var t=e.timeout,e=e.callback;this.timeout=Math.max(t,0),this.callback=e}function u_(i,s){Nw=window.onerror,window.onerror=function(e,t,r,n,o){a.isNotNullOrUndefined(o)&&i.trackException(o,s.resolveCurrentUser()),Nw&&Nw.apply(this,arguments)}}function c_(r,n){Z0=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.resolveCurrentUser()),Z0&&Z0.apply(this,arguments)}}function p_(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function l_(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function f_(t,r){return Object.keys(oI).every(function(e){return t[e]===r[e]})}mA.prototype.read=function(){var r=this;return new Promise(function(e){var t=r.storage.getItem(r.storageKey);t&&e(JSON.parse(t)),e([])})},mA.prototype.save=function(r){var n=this;return 0===r.length?this.clear():new Promise(function(e){var t=JSON.stringify(r.slice(-n.maxSize));n.storage.setItem(n.storageKey,t),e()})},mA.prototype.add=function(t){var r=this;return this.read().then(function(e){return r.save(e.concat(t).slice(-r.maxSize))})},mA.prototype.delete=function(r){var t=this;return this.read().then(function(e){e=e.filter(function(t){return r.findIndex(function(e){return e.insertId===t.insertId})<0});return t.save(e)})},mA.prototype.clear=function(){var t=this;return new Promise(function(e){t.storage.removeItem(t.storageKey),e()})};var d_=mA,h_=(vA.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(vA.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),vA.prototype.resolveCurrentOrNull=function(e){if(void 0===e)return this.currentUser;if("string"==typeof e)return this.setUser({id:e});e=Le(e);return e?this.setUser(e):null},vA.prototype.setUser=function(e){return this.updateUser(e)},vA.prototype.setUserId=function(e){e=E(E({},this._currentUser),{userId:e});return this.setUser(e)},vA.prototype.setDeviceId=function(e){e=E(E({},this._currentUser),{deviceId:e});return this.setUser(e)},vA.prototype.updateUserProperties=function(e){return this.operateProperties(e)},vA.prototype.resetUser=function(){return this.setUser(this.defaultUser)},vA.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},vA.prototype.saveUser=function(e){this.storage.saveUser(e)},vA.prototype.update=function(e){var t=this._currentUser,e=e(t);return this._currentUser=e,p_(t,e)||(this.changeUser(t,e,(new Date).getTime()),this.saveUser(e)),e},vA.prototype.updateUser=function(r){return this.update(function(e){return p_(e=e,t=r)?E(E({},t),{properties:E(E({},e.properties),t.properties)}):t;var t})},vA.prototype.operateProperties=function(r){return this.update(function(e){var t=null!=(t=null==e?void 0:e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return E(E({},e),{properties:a.fromMap(t)})})},vA),y_=(yA.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},yA.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(yA.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),yA.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},yA.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},yA.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},yA),v_=(Object.defineProperty(hA.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(hA.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:hA.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(hA.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),hA.prototype.addListener=function(e){this.sessionListeners.push(e)},hA.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},hA.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)},hA.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},hA.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)})},hA.prototype.newSession=function(t,r){var n="".concat(r,".").concat(ae.v4().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},hA.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},hA.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},hA.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},hA.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},hA.EMPTY_SESSION_ID="0.ffffffff",hA),m_=(dA.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},dA.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},dA.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},dA.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},dA),g_=(fA.postfix=function(e,t){return new fA(e,function(e){return"".concat(e).concat(t)})},fA.prefix=function(e,t){return new fA(e,function(e){return"".concat(t).concat(e)})},fA.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},fA.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},fA.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},fA),E_=(lA.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},lA.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},lA.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},lA.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),o=0;return n.findIndex(function(e){return(o+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},lA.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[]}},lA.prototype.entries=function(){return this.getList().flatMap(Object.entries)},lA.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),o=((r={})[e]=t,r);if(!this.isAddableItem(o)){var i=this.getVictimIndex(o);if(i<0)return;n=n.slice(i+1)}var s=JSON.stringify(n.concat(o));this.delegate.setItem(this.listKey,s)}catch(e){}},lA.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]},lA.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),o=JSON.stringify(n);this.delegate.setItem(this.listKey,o)}catch(t){}},lA.prototype.clear=function(){this.delegate.removeItem(this.listKey)},lA),w_=(pA.prototype.currentUser=function(){var e=this.userManager.currentUser;return this.userResolver.resolve(e)},pA.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},pA.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},pA.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},pA.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},pA.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},pA.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},pA.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},pA.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},pA.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},pA.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},pA.prototype.increment=function(e,t){En.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},pA),T_=(cA.serverFetch=function(e){return"".concat(e,"/api/v2/workspaces")},cA.clientFetch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/w")},cA.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},cA.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},cA.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},cA.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},cA),__=(uA.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)},uA.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},uA.prototype.key=function(e){return"".concat(e.key)},uA),I_=(aA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},aA),A_=(sA.prototype.handle=function(e,t){e.close()},sA.prototype.supports=function(e){return"CLOSE"===e.type},sA),b_=(iA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},iA.prototype.supports=function(e){return"WEB_LINK"===e.type},iA),O_=(oA.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},oA.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},oA),N_=(nA.prototype.handle=function(e,t){var r=this.clock.currentMillis()+nA.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},nA.prototype.supports=function(e){return"HIDDEN"===e.type},nA.HIDE_EXPIRATION=864e5,nA),R_=(rA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},rA.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},rA),C_=(tA.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},tA.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},tA),S_=(eA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},eA.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},eA),M_=(QI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},QI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},QI),x_=(ZI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},ZI.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:E({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}}}},ZI),P_=(WI.prototype.present=function(r){return pe(this,void 0,void 0,function(){var t;return le(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]}})})},WI),k_=(XI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},XI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},XI),U_=($I.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var o=n[r];if(this.eventMatcher.matches(t,o,e)){o=this.context(o,e);if(o)return o}}},$I.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new l_(e.inAppMessage,e.message,t.user,Ne.sanitize({decision_reason:e.reason}))},$I),D_=(JI.prototype.open=function(){return pe(this,void 0,void 0,function(){var t,r;return le(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(JI.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(JI.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(JI.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]}})})},JI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(JI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},JI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(JI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},JI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},JI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},JI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},JI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",JI.CONTAINER_CLASS_NAME="hackle-iam",JI),L_=(YI.prototype.create=function(e,t){return new D_(this.scriptLoader,e,t)},YI),F_=(qI.prototype.load=function(){return pe(this,void 0,void 0,function(){var t;return le(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()]}})})},qI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},qI.prototype.waitForLoad=function(i){return new Promise(function(e,t){function r(){i.removeEventListener("error",o),i.removeEventListener("load",n)}var n=function(){r(),e(i)},o=function(e){r(),t(e.message)};i.addEventListener("load",n),i.addEventListener("error",o)})},qI),j_=(zI.prototype.isTriggerTarget=function(t,r,n){var o=this;return r.eventTrigger.rules.some(function(e){return o.ruleMatches(t,n,r,e)})},zI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=V_.of(e,t,r);return this.targetMatcher.anyMatches(e,gE.create(),n.targets)},zI),V_=(BI.of=function(e,t,r){return new BI(new mE("IN_APP_MESSAGE",r.key),e,t.user,t)},BI),H_=(KI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var o=0,i=this.storage.get(t);o<i.length;o++)for(var s=i[o],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},KI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var o=n[r];t.push(new G_(new K_(o)))}return e.durationCap&&t.push(new G_(new B_(e.durationCap))),t},KI),G_=(GI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},GI),K_=(Object.defineProperty(HI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),HI.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},HI),B_=(Object.defineProperty(VI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),VI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},VI),z_=(jI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},jI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},jI),q_=(FI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},FI),Y_=(LI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},LI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>LI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-LI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},LI.prototype.supports=function(e){return"IMPRESSION"===e.type},LI.IMPRESSION_MAX_SIZE=100,LI),J_=(DI.prototype.process=function(e,t,r){},DI.prototype.supports=function(e){return"CLOSE"===e.type},DI),$_=(UI.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},UI.prototype.supports=function(e){return"ACTION"===e.type},UI),X_=(kI.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)},kI),W_=(PI.prototype.matches=function(e,t,r){return!!so.isTrack(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},PI),Z_=(xI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},xI),Q_=(MI.prototype.handle=function(e,t){e.close()},MI.prototype.supports=function(e){return"CLOSE"===e.type},MI),eI=(SI.prototype.handle=function(e,t){var r=gr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},SI.prototype.supports=function(e){return"ACTION"===e.type},SI),tI=(CI.prototype.open=function(e){window.location.href=e.href},CI),rI=(RI.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},RI),nI=(NI.prototype.open=function(e){window.open(e.href)},NI),oI={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},iI={current:void 0,referrer:void 0},sI=(OI.prototype.startNewCampaign=function(e,t,r){for(var t=E(E({},oI),t),n=new ro,o=0,i=Object.entries(t);o<i.length;o++){var s=i[o],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userResolver.resolve(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},OI.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),o=this.parser.parse(),i=this.parser.parseDomain();r=o,i=i,null!==(n=n)&&(f_(r,oI)&&i.current===i.referrer||f_(n,r))||(this.storage.set(o),this.startNewCampaign(e,o,t))},OI.prototype.onSessionEnded=function(e,t,r){},OI.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},OI),aI=(bI.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},bI.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},bI),uI=(AI.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},AI.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var o=n[r].split("="),i=o[0],o=o[1];e&&!e(i,o)||(t[i]=decodeURIComponent(o))}return t},AI.getQueryParams=function(){return"undefined"==typeof window?{}:new AI(window.location.search).getQueryParams()},AI),cI=(II.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},II.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,II.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,II),pI=(_I.prototype.parse=function(){var e=uI.getQueryParams();return{utm_campaign:e[lI],utm_content:e[fI],utm_id:e[dI],utm_medium:e[hI],utm_source:e[yI],utm_term:e[vI],gclid:e[mI],fbclid:e[gI]}},_I.prototype.parseDomain=function(){return"undefined"==typeof window?iI:{current:cI.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,cI.extractDomain(e)}()}},_I),lI="utm_campaign",fI="utm_content",dI="utm_id",hI="utm_medium",yI="utm_source",vI="utm_term",mI="gclid",gI="fbclid",EI=w.log,wI=null,TI={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:-1,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",SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.19.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"};function _I(){}function II(){}function AI(e){this.search=e}function bI(e){this.storage=e}function OI(e,t,r,n,o){this.storage=e,this.parser=t,this.core=r,this.userManager=n,this.userResolver=o}function NI(){}function RI(){}function CI(){}function SI(e){this.eventHandler=e}function MI(){}function xI(e){this.handlers=e}function PI(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function kI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function UI(e){this.actionHandlerFactory=e}function DI(){}function LI(e){this.impressionStorage=e}function FI(e){this.processors=e}function jI(e){this.storage=e}function VI(e){this.durationCap=e}function HI(e){this.identifierCap=e}function GI(e){this.matchCount=0,this.predicate=e}function KI(e){this.storage=e}function BI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function zI(e){this.targetMatcher=e}function qI(e){this.scriptUrl=e}function YI(e){this.scriptLoader=e}function JI(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===JI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function $I(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function XI(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 WI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function ZI(e){this.core=e}function QI(e){this.urlHandler=e}function eA(e){this.urlHandler=e}function tA(e){this.urlHandler=e}function rA(e){this.urlHandler=e}function nA(e,t){this.storage=e,this.clock=t}function oA(e){this.urlHandler=e}function iA(e){this.urlHandler=e}function sA(){}function aA(e){this.handlers=e}function uA(e){this.storage=e}function cA(){}function pA(e,t,r,n,o){this.core=e,this.userManager=t,this.userResolver=r,this.abOverrideStorage=n,this.ffOverrideStorage=o}function lA(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 fA(e,t){this.delegate=e,this.transform=t}function dA(){this.storage=window.localStorage}function hA(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function yA(e){this.storage=e}function vA(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),this.storage=e,this.hackleDeviceId=t,this.userListeners=[],this.defaultUser={deviceId:this.hackleDeviceId},this._currentUser=null!=(e=null!=n?n:r)?e:this.defaultUser,this.storage.saveUser(this._currentUser)}function mA(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}function gA(e,t){var o=E(E({},TI),t),t=new m_;if(w.initCounter(function(e){return En.counter("log",{level:e})}),o.log_disabled?w.setLogLevel(de.DISABLE):o.debug&&w.setLogLevel(de.DEBUG),EI.debug("sdkKey : "+e),e||EI.error("SDK Key must not be null"),wI)return EI.debug("use already exists hackleClient"),wI;function r(){f.drainRepository()}var n=!1,i=("undefined"!=typeof window&&(n=window&&window.navigator&&window.navigator.sendBeacon&&!0)&&EI.debug("support sendBeacon API"),-1),i=(void 0!==o.pollingIntervalMillis&&"number"==typeof o.pollingIntervalMillis&&0<o.pollingIntervalMillis&&(i=Math.max(o.pollingIntervalMillis,3e4)),new xo(e,Ie,{fetchUrl:T_.clientFetch(o.sdkUrl,e),updateInterval:i,headers:((i={})[ye]=o.SDK_NAME_HEADER,i["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,i)})),s=new y_(g_.postfix(Do,"_".concat(e))),a=s.getUser(),u=o.user||null,s=new h_(s,Yo(),a,u),c=new v_(o.sessionTimeoutMillis,g_.postfix(Do,"_".concat(e.slice(8)))),u=(s.addListener(c),new d_(t,"".concat("hackle-repository-storage","_").concat(e),100)),p=new So(e,Ie,{dispatchUrl:T_.clientDispatch(o.eventUrl),beaconDispatchUrl:T_.beaconDispatch(o.eventUrl,e),useBeacon:n,headers:((p={})[ye]=o.SDK_NAME_HEADER,p["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,p)}),l=-1,l=(void 0!==o.exposureEventDedupIntervalMillis&&"number"==typeof o.exposureEventDedupIntervalMillis&&-1!==o.exposureEventDedupIntervalMillis&&(l=o.exposureEventDedupIntervalMillis<1e3||36e5<o.exposureEventDedupIntervalMillis?(EI.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[no dedup]."),-1):o.exposureEventDedupIntervalMillis),new lE(l)),f=new pE(p,100,500,u,l,c,s),p=new IE(new E_(Do,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),u=new IE(new E_(Do,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),l=new __(g_.prefix(t,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),t=new z_(g_.prefix(t,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),d=Aw.create(i,f,[p,u],l),h=new Lo(s),y=new sI(new aI(g_.postfix(Do,"_".concat(e.slice(0,8)))),new pI,d,s,h),v=new cE(h,d),v=(c.addListener(y),c.addListener(v),new x_(d)),l=new I_([new A_,new b_(new tI),new O_(new tI),new N_(l,Se.instance),new R_(new rI),new C_(new rI),new S_(new nI),new M_(new nI)]),l=new q_([new Y_(t),new $_(l),new J_]),v=new X_(Se.instance,v,l),l=new Z_([new Q_,new eI(v)]),m=new F_(T_.inAppMessageRenderer(o.cdnUrl,o.IAM_RENDERER_VERSION_HEADER)),m=new P_(new L_(m),v,l),v=new W_(new j_(gw.get("targetMatcher")),new H_(t)),l=new U_(i,v,d),t=(new k_(f,l,m),new w_(d,s,h,p,u)),l=(null==(i=o.devTool)?void 0:i.userExplorer)&&"function"==typeof(null==(v=o.devTool)?void 0:v.userExplorer),m=o.devTool&&l?{manager:o.devTool,userExplorer:t}:void 0,g=new io(d,h,c,s,m),u=(wI=g,o.autoOpenDevTool&&(o.devTool?g.showUserExplorer():EI.error("DevTool is not provided")),new wn(o.monitoringUrl,6e4,Ie,((p={})[ye]=o.SDK_NAME_HEADER,p["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,p["X-HACKLE-SDK-KEY"]=e,p),n));return document.addEventListener("visibilitychange",function(){document.hidden||r()}),window.addEventListener("pageshow",r),window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){$o(),c.updateLastEventTime((new Date).getTime()),g.close(),En.globalRegistry.close()}),En.addRegistry(u),i=Date.now(),v=s.currentUser,l=c.currentSessionId,(p_(a,v)?c.startNewSessionIfNeeded(v,i):c.startNewSession(a,v,i))===l&&y.startNewCampaignIfNeeded(v,i),g.onReady(function(){(new Ow).install(d,h);var t,r,e=g;if(o.auto_track_page_view){e.trackPageView();try{history.pushState=(r=history.pushState,function(){try{var e=r.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)EI.error(e);else try{EI.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)EI.error(e);else try{EI.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}}function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t,r,n),o}}),g}var R={createInstance:gA,getUserId:Yo,setUserId:Jo,removeUserId:$o,Logger:w},EA=(p.Bucket=t.Bucket=ze,p.Container=t.Container=nt,p.ContainerGroup=t.ContainerGroup=ot,p.CoreVersion=t.CoreVersion=Ut,p.Decision=t.Decision=Ve,p.DecisionReason=t.DecisionReason=s,p.EmptyHackleRemoteConfig=t.EmptyHackleRemoteConfig=ie,p.EmptyParameterConfig=t.EmptyParameterConfig=Ge,p.EventType=t.EventType=Ye,p.Experiment=t.Experiment=Ke,p.FeatureFlagDecision=t.FeatureFlagDecision=He,p.IAM_ACTION_AREA=t.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],p.IAM_ACTION_TYPE=t.IAM_ACTION_TYPE=Wt,p.IAM_BEHAVIOR=t.IAM_BEHAVIOR=Xt,p.IAM_DISPLAY_TYPE=t.IAM_DISPLAY_TYPE=Yt,p.IAM_LAYOUT_TYPE=t.IAM_LAYOUT_TYPE=Jt,p.IAM_ORIENTATION=t.IAM_ORIENTATION=$t,p.IAM_PLATFORM_TYPE=t.IAM_PLATFORM_TYPE=zt,p.IAM_STATUS=t.IAM_STATUS=Bt,p.IAM_TIMEUNIT=t.IAM_TIMEUNIT=qt,p.IdentifierType=t.IdentifierType=Je,p.IdentifiersBuilder=t.IdentifiersBuilder=$e,p.InAppMessage=t.InAppMessage=Zt,p.InAppMessageAction=t.InAppMessageAction=gr,p.InAppMessageBackground=t.InAppMessageBackground=mr,p.InAppMessageButton=t.InAppMessageButton=yr,p.InAppMessageButtonStyle=t.InAppMessageButtonStyle=vr,p.InAppMessageContext=t.InAppMessageContext=ur,p.InAppMessageContextLayout=t.InAppMessageContextLayout=pr,p.InAppMessageContextMessage=t.InAppMessageContextMessage=cr,p.InAppMessageDecision=t.InAppMessageDecision=je,p.InAppMessageDurationCap=t.InAppMessageDurationCap=ir,p.InAppMessageEventFrequencyCap=t.InAppMessageEventFrequencyCap=nr,p.InAppMessageEventTrigger=t.InAppMessageEventTrigger=tr,p.InAppMessageEventTriggerRule=t.InAppMessageEventTriggerRule=rr,p.InAppMessageIdentifierCap=t.InAppMessageIdentifierCap=or,p.InAppMessageImage=t.InAppMessageImage=lr,p.InAppMessagePeriodAlways=t.InAppMessagePeriodAlways=Qt,p.InAppMessagePeriodCustom=t.InAppMessagePeriodCustom=er,p.InAppMessageTargetContext=t.InAppMessageTargetContext=sr,p.InAppMessageText=t.InAppMessageText=fr,p.InAppMessageTextAttribute=t.InAppMessageTextAttribute=dr,p.InAppMessageTextStyle=t.InAppMessageTextStyle=hr,p.InAppMessageUserOverride=t.InAppMessageUserOverride=ar,p.Logger=t.Logger=w,p.MATCH_OPERATORS=t.MATCH_OPERATORS=jt,p.MATCH_TYPES=t.MATCH_TYPES=Lt,p.MATCH_VALUE_TYPES=t.MATCH_VALUE_TYPES=Ft,p.MetaVersion=t.MetaVersion=Dt,p.ParameterConfiguration=t.ParameterConfiguration=it,p.PropertyOperations=t.PropertyOperations=no,p.PropertyOperationsBuilder=t.PropertyOperationsBuilder=ro,p.RemoteConfigDecision=t.RemoteConfigDecision=Fe,p.RemoteConfigParameter=t.RemoteConfigParameter=st,p.RemoteConfigParameterValue=t.RemoteConfigParameterValue=ut,p.RemoteConfigTargetRule=t.RemoteConfigTargetRule=at,p.SEGMENT_TYPES=t.SEGMENT_TYPES=Gt,p.Segment=t.Segment=rt,p.Slot=t.Slot=qe,p.TARGET_ACTION_TYPES=t.TARGET_ACTION_TYPES=Vt,p.TARGET_KEY_TYPES=t.TARGET_KEY_TYPES=Ht,p.Target=t.Target=Xe,p.TargetAction=t.TargetAction=et,p.TargetCondition=t.TargetCondition=We,p.TargetKey=t.TargetKey=Ze,p.TargetMatch=t.TargetMatch=Qe,p.TargetRule=t.TargetRule=tt,p.TargetingType=t.TargetingType=Kt,p.Variation=t.Variation=Be,p.Version=t.Version=kt,se=t.createInstance=gA,t.default=R,p.getUserId=t.getUserId=Yo,p.removeUserId=t.removeUserId=$o,p.sanitizeUser=t.sanitizeUser=Le,p.setUserId=t.setUserId=Jo,function(e,t){return(EA=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 wA=function(){return(wA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function TA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}_A.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},_A.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},_A.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};M=_A;function _A(){this.listeners={}}AA.arePropertiesEqual=function(e,t){var r=AA.coerceUnknownToProperties(e),n=AA.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]})},AA.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var IA=AA;function AA(){}OA.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)&&IA.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&IA.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var bA=OA;function OA(){}var NA=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function o(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=se(e,wA(wA({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.19.0"})),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return EA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),o.prototype.getUser=function(){return this.client.getUser()},o.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},o.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},o.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},o.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},o.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},o.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},o.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},o.prototype.track=function(e,t){this.client.track(e,t||void 0)},o.prototype.trackPageView=function(e){this.client.trackPageView(wA(wA({},e),{user:(null==e?void 0:e.user)||void 0}))},o.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},o.prototype.onReady=function(e,t){this.client.onReady(e,t)},o.prototype.onInitialized=function(e){return this.client.onInitialized(e)},o.prototype.emitUpdatedUser=function(e){bA.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},o.prototype.showUserExplorer=function(){this.client.showUserExplorer()},o.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},o}(M);var k={exports:{}},b={},RA=Object.getOwnPropertySymbols,CA=Object.prototype.hasOwnProperty,SA=Object.prototype.propertyIsEnumerable;var ts=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))CA.call(r,i)&&(n[i]=r[i]);if(RA)for(var s=RA(r),a=0;a<s.length;a++)SA.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},MA=ts,i="function"==typeof Symbol&&Symbol.for,xA=i?Symbol.for("react.element"):60103,PA=i?Symbol.for("react.portal"):60106,tp=i?Symbol.for("react.fragment"):60107,kA=i?Symbol.for("react.strict_mode"):60108,Mi=i?Symbol.for("react.profiler"):60114,UA=i?Symbol.for("react.provider"):60109,DA=i?Symbol.for("react.context"):60110,LA=i?Symbol.for("react.forward_ref"):60112,hi=i?Symbol.for("react.suspense"):60113,FA=i?Symbol.for("react.memo"):60115,jA=i?Symbol.for("react.lazy"):60116,VA="function"==typeof Symbol&&Symbol.iterator;function HA(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 GA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KA={};function BA(e,t,r){this.props=e,this.context=t,this.refs=KA,this.updater=r||GA}function zA(){}function qA(e,t,r){this.props=e,this.context=t,this.refs=KA,this.updater=r||GA}BA.prototype.isReactComponent={},BA.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(HA(85));this.updater.enqueueSetState(this,e,t,"setState")},BA.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},zA.prototype=BA.prototype;var If=qA.prototype=new zA,YA=(If.constructor=qA,MA(If,BA.prototype),If.isPureReactComponent=!0,{current:null}),JA=Object.prototype.hasOwnProperty,$A={key:!0,ref:!0,__self:!0,__source:!0};function XA(e,t,r){var n,o={},i=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)JA.call(t,n)&&!$A.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(1===a)o.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===o[n]&&(o[n]=a[n]);return{$$typeof:xA,type:e,key:i,ref:s,props:o,_owner:YA.current}}function WA(e){return"object"==typeof e&&null!==e&&e.$$typeof===xA}var ZA=/\/+/g,QA=[];function eb(e,t,r,n){var o;return QA.length?((o=QA.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function tb(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,QA.length<10&&QA.push(e)}function rb(e,t,r){return null==e?0:function e(t,r,n,o){var i=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case xA:case PA:i=!0}}if(i)return n(o,t,""===r?"."+nb(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+nb(a=t[s],s);i+=e(a,u,n,o)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=VA&&t[VA]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)i+=e(a=a.value,u=r+nb(a,s++),n,o);else if("object"===a)throw n=""+t,Error(HA(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return i}(e,"",t,r)}function nb(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 ob(e,t){e.func.call(e.context,t,e.count++)}function ib(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?sb(e,n,r,function(e){return e}):null!=e&&(WA(e)&&(t=o+(!(o=e).key||t&&t.key===e.key?"":(""+e.key).replace(ZA,"$&/")+"/")+r,e={$$typeof:xA,type:o.type,key:t,ref:o.ref,props:o.props,_owner:o._owner}),n.push(e))}function sb(e,t,r,n,o){var i="";rb(e,ib,t=eb(t,i=null!=r?(""+r).replace(ZA,"$&/")+"/":i,n,o)),tb(t)}var ab={current:null};function ub(){var e=ab.current;if(null===e)throw Error(HA(321));return e}var cb,pb,lb,ha={ReactCurrentDispatcher:ab,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:YA,IsSomeRendererActing:{current:!1},assign:MA},y=(b.Children={map:function(e,t,r){if(null==e)return e;var n=[];return sb(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;rb(e,ob,t=eb(null,null,t,r)),tb(t)},count:function(e){return rb(e,function(){return null},null)},toArray:function(e){var t=[];return sb(e,t,null,function(e){return e}),t},only:function(e){if(WA(e))return e;throw Error(HA(143))}},b.Component=BA,b.Fragment=tp,b.Profiler=Mi,b.PureComponent=qA,b.StrictMode=kA,b.Suspense=hi,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ha,b.cloneElement=function(e,t,r){if(null==e)throw Error(HA(267,e));var n=MA({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref,s=YA.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)JA.call(t,a)&&!$A.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:xA,type:e.type,key:o,ref:i,props:n,_owner:s}},b.createContext=function(e,t){return(e={$$typeof:DA,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:UA,_context:e},e.Consumer=e},b.createElement=XA,b.createFactory=function(e){var t=XA.bind(null,e);return t.type=e,t},b.createRef=function(){return{current:null}},b.forwardRef=function(e){return{$$typeof:LA,render:e}},b.isValidElement=WA,b.lazy=function(e){return{$$typeof:jA,_ctor:e,_status:-1,_result:null}},b.memo=function(e,t){return{$$typeof:FA,type:e,compare:void 0===t?null:t}},b.useCallback=function(e,t){return ub().useCallback(e,t)},b.useContext=function(e,t){return ub().useContext(e,t)},b.useDebugValue=function(){},b.useEffect=function(e,t){return ub().useEffect(e,t)},b.useImperativeHandle=function(e,t,r){return ub().useImperativeHandle(e,t,r)},b.useLayoutEffect=function(e,t){return ub().useLayoutEffect(e,t)},b.useMemo=function(e,t){return ub().useMemo(e,t)},b.useReducer=function(e,t,r){return ub().useReducer(e,t,r)},b.useRef=function(e){return ub().useRef(e)},b.useState=function(e){return ub().useState(e)},b.version="16.14.0",{}),yp=Function.call.bind(Object.prototype.hasOwnProperty),fb=function(){};function db(e,t,r,n,o){if("production"!==production)for(var i in e)if(lb(e,i)){var s,a;try{if("function"!=typeof e[i])throw(a=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[i](t,i,n,r,null,cb)}catch(e){s=e}!s||s instanceof Error||fb((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in pb)&&(pb[s.message]=!0,i=o?o():"",fb("Failed "+r+" type: "+s.message+(null!=i?i:"")))}}if("production"!==production&&(cb="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pb={},lb=yp,fb=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),db.resetWarningCache=function(){"production"!==production&&(pb={})},"production"!==production){var hb=ts,yb=db,P="function"==typeof Symbol&&Symbol.for,vb=P?Symbol.for("react.element"):60103,mb=P?Symbol.for("react.portal"):60106,gb=P?Symbol.for("react.fragment"):60107,Eb=P?Symbol.for("react.strict_mode"):60108,wb=P?Symbol.for("react.profiler"):60114,Tb=P?Symbol.for("react.provider"):60109,_b=P?Symbol.for("react.context"):60110,Ib=P?Symbol.for("react.concurrent_mode"):60111,Ab=P?Symbol.for("react.forward_ref"):60112,bb=P?Symbol.for("react.suspense"):60113,Ob=P?Symbol.for("react.suspense_list"):60120,Nb=P?Symbol.for("react.memo"):60115,Rb=P?Symbol.for("react.lazy"):60116,Cb=P?Symbol.for("react.block"):60121,Sb=P?Symbol.for("react.fundamental"):60117,Mb=P?Symbol.for("react.responder"):60118,xb=P?Symbol.for("react.scope"):60119,Pb="function"==typeof Symbol&&Symbol.iterator,kb="@@iterator";function Ub(e){if(null===e||"object"!=typeof e)return null;e=Pb&&e[Pb]||e[kb];return"function"==typeof e?e:null}var Db={current:null},Lb={current:null},Fb=/^(.*)[\\\/]/,jb=1;function Vb(e){if(null==e)return null;if("number"==typeof e.tag&&U("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 gb:return"Fragment";case mb:return"Portal";case wb:return"Profiler";case Eb:return"StrictMode";case bb:return"Suspense";case Ob:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case _b:return"Context.Consumer";case Tb:return"Context.Provider";case Ab:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case Nb:return Vb(e.type);case Cb:return Vb(e.render);case Rb:r=(t=e)._status===jb?t._result:null;if(r)return Vb(r)}var t,r;return null}var Hb={},Gb=null;function Kb(e){Gb=e}Hb.getCurrentStack=null,Hb.getStackAddendum=function(){var e,t,r,n,o,i="",s=(Gb&&(e=Vb(Gb.type),r=Gb._owner,i+=(e=e,t=Gb._source,r=r&&Vb(r.type),o="",t?(n=(s=t.fileName).replace(Fb,""),o=" (at "+(n=/^index\./.test(n)&&(s=s.match(Fb))&&(s=s[1])?s.replace(Fb,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(o=" (created by "+r+")"),"\n in "+(e||"Unknown")+o)),Hb.getCurrentStack);return s&&(i+=s()||""),i};var Bb={ReactCurrentDispatcher:Db,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:Lb,IsSomeRendererActing:{current:!1},assign:hb};function zb(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];qb("warn",e,r)}function U(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];qb("error",e,r)}function qb(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=Bb.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});throw new Error(i)}catch(e){}}hb(Bb,{ReactDebugCurrentFrame:Hb,ReactComponentTreeHook:{}});var Yb={};function Jb(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;Yb[r]||(U("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),Yb[r]=!0)}var $b={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){Jb(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){Jb(e,"replaceState")},enqueueSetState:function(e,t,r,n){Jb(e,"setState")}},Xb={};function Wb(e,t,r){this.props=e,this.context=t,this.refs=Xb,this.updater=r||$b}Object.freeze(Xb),Wb.prototype.isReactComponent={},Wb.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")},Wb.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var Zb,Qb={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(Zb in Qb)Qb.hasOwnProperty(Zb)&&!function(e,t){Object.defineProperty(Wb.prototype,e,{get:function(){zb("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(Zb,Qb[Zb]);function e1(){}function t1(e,t,r){this.props=e,this.context=t,this.refs=Xb,this.updater=r||$b}e1.prototype=Wb.prototype,(P=t1.prototype=new e1).constructor=t1,hb(P,Wb.prototype),P.isPureReactComponent=!0;var r1,n1,o1=Object.prototype.hasOwnProperty,i1={key:!0,ref:!0,__self:!0,__source:!0};function s1(e){if(o1.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function a1(e){if(o1.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var u1={},c1=function(e,t,r,n,o,i,s){e={$$typeof:vb,type:e,key:t,ref:r,props:s,_owner:i,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function p1(e,t,r){var n,o={},i=null,s=null,a=null,u=null;if(null!=t)for(n in s1(t)&&(s=t.ref,"string"==typeof(c=t).ref&&Lb.current&&c.__self&&Lb.current.stateNode!==c.__self&&(l=Vb(Lb.current.type),u1[l]||(U('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',Vb(Lb.current.type),c.ref),u1[l]=!0))),a1(t)&&(i=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)o1.call(t,n)&&!i1.hasOwnProperty(n)&&(o[n]=t[n]);var c,p,l,f,d=arguments.length-2;if(1==d)o.children=r;else if(1<d){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];Object.freeze&&Object.freeze(h),o.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===o[n]&&(o[n]=v[n])}function m(){n1||(n1=!0,U("%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)",p))}function g(){r1||(r1=!0,U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(i||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,i&&(l=o,f=c,g.isReactWarning=!0,Object.defineProperty(l,"key",{get:g,configurable:!0})),s&&(r=o,p=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),c1(e,i,s,a,u,Lb.current,o)}function l1(e){return"object"==typeof e&&null!==e&&e.$$typeof===vb}var f1=".",d1=":",h1=!1,y1=/\/+/g;function v1(e){return(""+e).replace(y1,"$&/")}var m1=10,g1=[];function E1(e,t,r,n){var o;return g1.length?((o=g1.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function w1(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,g1.length<m1&&g1.push(e)}function T1(e,t,r){return null==e?0:function e(t,r,n,o){var i,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case vb:case mb:a=!0}}if(a)return n(o,t,""===r?f1+_1(t,0):r),1;var u=0,c=""===r?f1:r+d1;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(i=t[p],c+_1(i,p),n,o);else if("function"==typeof(r=Ub(t))){r===t.entries&&(h1||zb("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."),h1=!0);for(var l,f=r.call(t),d=0;!(l=f.next()).done;)u+=e(i=l.value,c+_1(i,d++),n,o)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+Hb.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 _1(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 I1(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function A1(e,t,r){var n=e.result,o=e.keyPrefix,i=e.func,s=e.context,i=i.call(s,t,e.count++);Array.isArray(i)?b1(i,n,r,function(e){return e}):null!=i&&(l1(i)&&(e=o+(!(s=i).key||t&&t.key===i.key?"":v1(i.key)+"/")+r,i=c1(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(i))}function b1(e,t,r,n,o){var i="",t=E1(t,i=null!=r?v1(r)+"/":i,n,o);T1(e,A1,t),w1(t)}function O1(e){return"string"==typeof e||"function"==typeof e||e===gb||e===Ib||e===wb||e===Eb||e===bb||e===Ob||"object"==typeof e&&null!==e&&(e.$$typeof===Rb||e.$$typeof===Nb||e.$$typeof===Tb||e.$$typeof===_b||e.$$typeof===Ab||e.$$typeof===Sb||e.$$typeof===Mb||e.$$typeof===xb||e.$$typeof===Cb)}function N1(){var e=Db.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 R1(){if(Lb.current){var e=Vb(Lb.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var C1=!1,S1={};function M1(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=R1())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),S1[t=r]||(S1[t]=!0,r="",e&&e._owner&&e._owner!==Lb.current&&(r=" It was passed a child from "+Vb(e._owner.type)+"."),Kb(e),U('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),Kb(null)))}function x1(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];l1(n)&&M1(n,t)}else if(l1(e))e._store&&(e._store.validated=!0);else if(e){var o=Ub(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)l1(i.value)&&M1(i.value,t)}}function P1(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=Vb(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==Ab&&t.$$typeof!==Nb)return;r=t.propTypes}r?(Kb(e),yb(r,e.props,"prop",n,Hb.getStackAddendum),Kb(null)):void 0===t.PropTypes||C1||(C1=!0,U("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||U("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function k1(e,t,r){var n,o=O1(e),t=(o||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||R1(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===vb?(s="<"+(Vb(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,U("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)),p1.apply(this,arguments));if(null==t)return t;if(o)for(var i=2;i<arguments.length;i++)x1(arguments[i],e);if(e===gb){var s=t;Kb(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){U("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&U("Invalid attribute `ref` supplied to `React.Fragment`."),Kb(null)}else P1(t);return t}var U1=!1;try{var D1=Object.freeze({}),L1=new Map([[D1,null]]),F1=new Set([D1]);L1.set(0,0),F1.add(0)}catch(e){}function j1(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,i=hb({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in s1(t)&&(a=t.ref,p=Lb.current),a1(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)o1.call(t,n)&&!i1.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?i[n]=o[n]:i[n]=t[n]);var l=arguments.length-2;if(1==l)i.children=r;else if(1<l){for(var f=Array(l),d=0;d<l;d++)f[d]=arguments[d+2];i.children=f}return c1(e.type,s,a,u,c,p,i)}.apply(this,arguments),o=2;o<arguments.length;o++)x1(arguments[o],n.type);return P1(n),n}function V1(e){var t=k1.bind(null,e);return t.type=e,U1||(U1=!0,zb("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 zb("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}P=k1,y.Children={map:function(e,t,r){if(null==e)return e;var n=[];return b1(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=E1(null,null,t,r),T1(e,I1,t),w1(t)},count:function(e){return T1(e,function(){return null},null)},toArray:function(e){var t=[];return b1(e,t,null,function(e){return e}),t},only:function(e){if(l1(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},y.Component=Wb,y.Fragment=gb,y.Profiler=wb,y.PureComponent=t1,y.StrictMode=Eb,y.Suspense=bb,y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bb,y.cloneElement=j1,y.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&U("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:_b,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:Tb,_context:r}),o=!1,t={$$typeof:_b,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return o||(o=!0,U("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,U("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},y.createElement=P,y.createFactory=V1,y.createRef=function(){var e={current:null};return Object.seal(e),e},y.forwardRef=function(e){return null!=e&&e.$$typeof===Nb?U("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?U("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&U("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||U("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:Ab,render:e}},y.isValidElement=l1,y.lazy=function(e){var t,r,n={$$typeof:Rb,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){U("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){U("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},y.memo=function(e,t){return O1(e)||U("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:Nb,type:e,compare:void 0===t?null:t}},y.useCallback=function(e,t){return N1().useCallback(e,t)},y.useContext=function(e,t){var r,n=N1();return void 0!==t&&U("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?U("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&&U("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},y.useDebugValue=function(e,t){return N1().useDebugValue(e,t)},y.useEffect=function(e,t){return N1().useEffect(e,t)},y.useImperativeHandle=function(e,t,r){return N1().useImperativeHandle(e,t,r)},y.useLayoutEffect=function(e,t){return N1().useLayoutEffect(e,t)},y.useMemo=function(e,t){return N1().useMemo(e,t)},y.useReducer=function(e,t,r){return N1().useReducer(e,t,r)},y.useRef=function(e){return N1().useRef(e)},y.useState=function(e){return N1().useState(e)},y.version="16.14.0"}"production"===production?k.exports=b:k.exports=y;var H1=k.exports,G1=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Si=G1.Consumer,K1=G1.Provider;var B1=p.Logger.log;function z1(e,t){e=q1(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function q1(e,t){void 0===t&&(t="A");var r=k.exports.useContext(G1),n=r.hackle,o=r.userVersion,i=r.initialized,s=k.exports.useCallback(function(){return i?(null==n?void 0:n.variationDetail(e))||p.Decision.of(t,p.DecisionReason.EXCEPTION):p.Decision.of(t,p.DecisionReason.SDK_NOT_READY)},[t,e,n,i]),r=TA(k.exports.useState(function(){return n?s():(B1.error("HackleClient is not existed"),p.Decision.of(t,p.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],o={key:e,userVersion:o,initialized:i},u=TA(k.exports.useState(o),2),c=u[0],u=u[1];return $1(c,o)||(u(o),r(s())),{isLoading:!i,decision:a}}function Y1(e){e=J1(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function J1(e){var t=k.exports.useContext(G1),r=t.hackle,n=t.userVersion,o=t.initialized,i=k.exports.useCallback(function(){return o?(null==r?void 0:r.featureFlagDetail(e))||p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION):p.FeatureFlagDecision.off(p.DecisionReason.SDK_NOT_READY)},[e,r,o]),t=TA(k.exports.useState(function(){return r?i():(B1.error("HackleClient is not existed"),p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:o},a=TA(k.exports.useState(n),2),u=a[0],a=a[1];return $1(u,n)||(a(n),t(i())),{isLoading:!o,decision:s}}function $1(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function X1(e){var t,r=e.experimentKey,e=e.children,n=(r=z1(r)).isLoading,o=r.variation;return n?null:e&&"function"==typeof e?e(o):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?o===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:o}):null)}function W1(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function Z1(e){var t=(r=Y1(e.featureKey)).isLoading,r=r.isOn;return t?null:H1.createElement(H1.Fragment,null,e.children(r))}p.HackleContext=G1,p.HackleContextConsumer=Si,p.HackleContextProvider=K1,p.HackleExperiment=X1,p.HackleFeature=Z1,p.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(o=e.timeout)?3e3:o,o=void 0!==(o=e.supportSSR)&&o,e=e.children,i=TA(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=i[0],a=i[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return wA(wA({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return wA(wA({},e),{initialized:!0})})},function(){a(function(e){return wA(wA({},e),{initialized:!0})})}).catch(function(){a(function(e){return wA(wA({},e),{initialized:!0})})})},[t]),o||s.initialized?H1.createElement(K1,{value:s},e):null},p.HackleVariation=W1,p.createInstance=function(e,t){return new NA(e,t)},p.useFeature=function(e){var t=(n=k.exports.useContext(G1)).hackle,r=n.userVersion,n=n.initialized,o=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),i=(s=TA(k.exports.useState(function(){return t?o():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=TA(k.exports.useState(r),2))[0],n=n[1];return $1(a,r)||(n(r),s(o())),i},p.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(G1)).hackle,r=n.userVersion,n=n.initialized,o=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION)},[e,t,n]),i=(s=TA(k.exports.useState(function(){return t?o():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=TA(k.exports.useState(r),2))[0],n=n[1];return $1(a,r)||(n(r),s(o())),i},p.useLoadableFeature=Y1,p.useLoadableFeatureDetail=J1,p.useLoadableRemoteConfig=function(){var e=(i=k.exports.useContext(G1)).hackle,t=i.userVersion,r=i.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new p.EmptyHackleRemoteConfig},[e,r]),o=(i=TA(k.exports.useState(function(){return e||B1.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(a=TA(k.exports.useState(t),2))[0],a=a[1];return $1(s,t)||(a(t),i(n())),{isLoading:!r,remoteConfig:o}},p.useLoadableVariation=z1,p.useLoadableVariationDetail=q1,p.useRemoteConfig=function(){var e=(r=k.exports.useContext(G1)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new p.EmptyHackleRemoteConfig},[e,r]),o=(i=TA(k.exports.useState(function(){return e||B1.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(r=TA(k.exports.useState(t),2))[0],r=r[1];return $1(s,t)||(r(t),i(n())),o},p.useTrack=function(){var t=k.exports.useContext(G1).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(B1.error("HackleClient is not existed"),function(){})},p.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(G1)).hackle,n=a.userVersion,o=a.initialized,i=k.exports.useCallback(function(){return o&&(null==r?void 0:r.variation(e))||t},[t,e,r,o]),s=(a=TA(k.exports.useState(function(){return r?i():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(c=TA(k.exports.useState(n),2))[0],c=c[1];return $1(u,n)||(c(n),a(i())),s},p.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(o=k.exports.useContext(G1)).hackle,n=o.userVersion,o=o.initialized,i=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||p.Decision.of(t,p.DecisionReason.EXCEPTION)},[t,e,r,o]),s=(a=TA(k.exports.useState(function(){return r?i():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),p.Decision.of(t,p.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(o=TA(k.exports.useState(n),2))[0],o=o[1];return $1(u,n)||(o(n),a(i())),s},Object.defineProperty(p,"__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(p){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(r){if(r.__esModule)return r;var n=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),n}var L,t={},F=new Uint8Array(16);function j(){if(L=L||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return L(F);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function H(e){return"string"==typeof e&&V.test(e)}for(var K,G,B=[],z=0;z<256;++z)B.push((z+256).toString(16).substr(1));function Y(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase();if(H(e))return e;throw TypeError("Stringified UUID is invalid")}var q=0,J=0;function $(e){if(!H(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function X(e,s,a){function t(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),16!==(t="string"==typeof t?$(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(t),o.set(e,t.length),(o=a(o))[6]=15&o[6]|s,o[8]=63&o[8]|128,r){n=n||0;for(var i=0;i<16;++i)r[n+i]=o[i];return r}return Y(o)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function W(e){return 14+(e+64>>>9<<4)+1}function Z(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function Q(e,t,r,n,o,i){return Z((t=Z(Z(t,e),Z(n,i)))<<o|t>>>32-o,r)}function ee(e,t,r,n,o,i,s){return Q(t&r|~t&n,e,t,o,i,s)}function te(e,t,r,n,o,i,s){return Q(t&n|r&~n,e,t,o,i,s)}function re(e,t,r,n,o,i,s){return Q(t^r^n,e,t,o,i,s)}function ne(e,t,r,n,o,i,s){return Q(r^(t|~n),e,t,o,i,s)}var r=X("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}for(var n=function(e,t){e[t>>5]|=128<<t%32,e[W(t)-1]=t;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=o,p=i;r=ee(r,n,o,i,e[s],7,-680876936),i=ee(i,r,n,o,e[s+1],12,-389564586),o=ee(o,i,r,n,e[s+2],17,606105819),n=ee(n,o,i,r,e[s+3],22,-1044525330),r=ee(r,n,o,i,e[s+4],7,-176418897),i=ee(i,r,n,o,e[s+5],12,1200080426),o=ee(o,i,r,n,e[s+6],17,-1473231341),n=ee(n,o,i,r,e[s+7],22,-45705983),r=ee(r,n,o,i,e[s+8],7,1770035416),i=ee(i,r,n,o,e[s+9],12,-1958414417),o=ee(o,i,r,n,e[s+10],17,-42063),n=ee(n,o,i,r,e[s+11],22,-1990404162),r=ee(r,n,o,i,e[s+12],7,1804603682),i=ee(i,r,n,o,e[s+13],12,-40341101),o=ee(o,i,r,n,e[s+14],17,-1502002290),n=ee(n,o,i,r,e[s+15],22,1236535329),r=te(r,n,o,i,e[s+1],5,-165796510),i=te(i,r,n,o,e[s+6],9,-1069501632),o=te(o,i,r,n,e[s+11],14,643717713),n=te(n,o,i,r,e[s],20,-373897302),r=te(r,n,o,i,e[s+5],5,-701558691),i=te(i,r,n,o,e[s+10],9,38016083),o=te(o,i,r,n,e[s+15],14,-660478335),n=te(n,o,i,r,e[s+4],20,-405537848),r=te(r,n,o,i,e[s+9],5,568446438),i=te(i,r,n,o,e[s+14],9,-1019803690),o=te(o,i,r,n,e[s+3],14,-187363961),n=te(n,o,i,r,e[s+8],20,1163531501),r=te(r,n,o,i,e[s+13],5,-1444681467),i=te(i,r,n,o,e[s+2],9,-51403784),o=te(o,i,r,n,e[s+7],14,1735328473),n=te(n,o,i,r,e[s+12],20,-1926607734),r=re(r,n,o,i,e[s+5],4,-378558),i=re(i,r,n,o,e[s+8],11,-2022574463),o=re(o,i,r,n,e[s+11],16,1839030562),n=re(n,o,i,r,e[s+14],23,-35309556),r=re(r,n,o,i,e[s+1],4,-1530992060),i=re(i,r,n,o,e[s+4],11,1272893353),o=re(o,i,r,n,e[s+7],16,-155497632),n=re(n,o,i,r,e[s+10],23,-1094730640),r=re(r,n,o,i,e[s+13],4,681279174),i=re(i,r,n,o,e[s],11,-358537222),o=re(o,i,r,n,e[s+3],16,-722521979),n=re(n,o,i,r,e[s+6],23,76029189),r=re(r,n,o,i,e[s+9],4,-640364487),i=re(i,r,n,o,e[s+12],11,-421815835),o=re(o,i,r,n,e[s+15],16,530742520),n=re(n,o,i,r,e[s+2],23,-995338651),r=ne(r,n,o,i,e[s],6,-198630844),i=ne(i,r,n,o,e[s+7],10,1126891415),o=ne(o,i,r,n,e[s+14],15,-1416354905),n=ne(n,o,i,r,e[s+5],21,-57434055),r=ne(r,n,o,i,e[s+12],6,1700485571),i=ne(i,r,n,o,e[s+3],10,-1894986606),o=ne(o,i,r,n,e[s+10],15,-1051523),n=ne(n,o,i,r,e[s+1],21,-2054922799),r=ne(r,n,o,i,e[s+8],6,1873313359),i=ne(i,r,n,o,e[s+15],10,-30611744),o=ne(o,i,r,n,e[s+6],15,-1560198380),n=ne(n,o,i,r,e[s+13],21,1309151649),r=ne(r,n,o,i,e[s+4],6,-145523070),i=ne(i,r,n,o,e[s+11],10,-1120210379),o=ne(o,i,r,n,e[s+2],15,718787259),n=ne(n,o,i,r,e[s+9],21,-343485551),r=Z(r,a),n=Z(n,u),o=Z(o,c),i=Z(i,p)}return[r,n,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(W(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),o=[],i=32*n.length,s="0123456789abcdef",a=0;a<i;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);o.push(u)}return o});function oe(e,t){return e<<t|e>>>32-t}var ie=X("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var o=0;o<n.length;++o)e.push(n.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),p=0;p<16;++p)c[p]=e[64*u+4*p]<<24|e[64*u+4*p+1]<<16|e[64*u+4*p+2]<<8|e[64*u+4*p+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 l=0;l<s;++l){for(var f=new Uint32Array(80),d=0;d<16;++d)f[d]=a[l][d];for(var h=16;h<80;++h)f[h]=oe(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var y=r[0],v=r[1],m=r[2],g=r[3],E=r[4],w=0;w<80;++w)var T=Math.floor(w/20),T=oe(y,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(T,v,m,g)+E+t[T]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=T;r[0]=r[0]+y>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});var se,r=D(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||K,r=void 0!==e.clockseq?e.clockseq:G,s=(null!=i&&null!=r||(s=e.random||(e.rng||j)(),null==i&&(i=K=[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:J+1,u=s-q+(a-J)/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))+(J=a))%4294967296,o[n++]=u>>>24&255,o[n++]=u>>>16&255,o[n++]=u>>>8&255,o[n++]=255&u,e=s/4294967296*1e4&268435455,o[n++]=e>>>8&255,o[n++]=255&e,o[n++]=e>>>24&15|16,o[n++]=e>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var c=0;c<6;++c)o[n+c]=i[c];return t||Y(o)},v3:r,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||j)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return Y(n)},v5:ie,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(H(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:H,stringify:Y,parse:$})),ae=(p.setUserId=void 0,p.sanitizeUser=void 0,p.removeUserId=void 0,p.getUserId=void 0,p.Version=void 0,p.Variation=void 0,p.TargetingType=void 0,p.TargetRule=void 0,p.TargetMatch=void 0,p.TargetKey=void 0,p.TargetCondition=void 0,p.TargetAction=void 0,p.Target=void 0,p.TARGET_KEY_TYPES=void 0,p.TARGET_ACTION_TYPES=void 0,p.Slot=void 0,p.Segment=void 0,p.SEGMENT_TYPES=void 0,p.RemoteConfigTargetRule=void 0,p.RemoteConfigParameterValue=void 0,p.RemoteConfigParameter=void 0,p.RemoteConfigDecision=void 0,p.PropertyOperationsBuilder=void 0,p.PropertyOperations=void 0,p.ParameterConfiguration=void 0,p.MetaVersion=void 0,p.MATCH_VALUE_TYPES=void 0,p.MATCH_TYPES=void 0,p.MATCH_OPERATORS=void 0,p.Logger=void 0,p.InAppMessageUserOverride=void 0,p.InAppMessageTextStyle=void 0,p.InAppMessageTextAttribute=void 0,p.InAppMessageText=void 0,p.InAppMessageTargetContext=void 0,p.InAppMessagePeriodCustom=void 0,p.InAppMessagePeriodAlways=void 0,p.InAppMessageImage=void 0,p.InAppMessageIdentifierCap=void 0,p.InAppMessageEventTriggerRule=void 0,p.InAppMessageEventTrigger=void 0,p.InAppMessageEventFrequencyCap=void 0,p.InAppMessageDurationCap=void 0,p.InAppMessageDecision=void 0,p.InAppMessageContextMessage=void 0,p.InAppMessageContextLayout=void 0,p.InAppMessageContext=void 0,p.InAppMessageButtonStyle=void 0,p.InAppMessageButton=void 0,p.InAppMessageBackground=void 0,p.InAppMessageAction=void 0,p.InAppMessage=void 0,p.IdentifiersBuilder=void 0,p.IdentifierType=void 0,p.IAM_TIMEUNIT=void 0,p.IAM_STATUS=void 0,p.IAM_PLATFORM_TYPE=void 0,p.IAM_ORIENTATION=void 0,p.IAM_LAYOUT_TYPE=void 0,p.IAM_DISPLAY_TYPE=void 0,p.IAM_BEHAVIOR=void 0,p.IAM_ACTION_TYPE=void 0,p.IAM_ACTION_AREA=void 0,p.FeatureFlagDecision=void 0,p.Experiment=void 0,p.EventType=void 0,p.EmptyParameterConfig=void 0,p.EmptyHackleRemoteConfig=void 0,p.DecisionReason=void 0,p.Decision=void 0,p.CoreVersion=void 0,p.ContainerGroup=void 0,p.Container=void 0,p.Bucket=void 0,Object.defineProperty(t,"__esModule",{value:!0}),r),ue=function(e,t){return(ue=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 ce(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}ue(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var E=function(){return(E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function pe(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((u=u.apply(e,s||[])).next())})}function le(n,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((a=0<(a=u.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],s=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function fe(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Te.isNotNullOrUndefined=function(e){return null!=e},Te.isNullOrUndefined=function(e){return null==e},Te.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},Te.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=Te,c=(we.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);a.isNotNullOrUndefined(i)&&r.push(i)}return r},we.mapOrUndefined=function(e,t){for(var r=Array(),n=0,o=e;n<o.length;n++){var i=t(o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r},we.associateTo=function(e,t,r){for(var n=0,o=e;n<o.length;n++){var i=r(o[n]);t.set(i[0],i[1])}return t},we.associate=function(e,t){return this.associateTo(e,new Map,t)},we.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},we.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},we),de={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},w=(Ee.setLogLevel=function(e){this.logLevel=e=void 0===e?de.INFO:e},Ee.initCounter=function(t){this.counters=c.associate(Object.keys(de),function(e){return[e,t(e)]})},Ee._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)he.log(e,r,t.message,t);else try{he.log(e,r,t)}catch(e){}},Ee.increment=function(e){var t;null!=(t=null==(t=Ee.counters)?void 0:t.get(e))&&t.increment()},Ee.logLevel=de.INFO,Ee.log={error:function(e){de.ERROR<=Ee.logLevel&&(Ee._log("ERROR",e),Ee.increment("ERROR"))},warn:function(e){de.WARN<=Ee.logLevel&&(Ee._log("WARN",e),Ee.increment("WARN"))},info:function(e){de.INFO<=Ee.logLevel&&(Ee._log("INFO",e),Ee.increment("INFO"))},debug:function(e){de.DEBUG<=Ee.logLevel&&(Ee._log("DEBUG",e),Ee.increment("DEBUG"))}},Ee),he=(ge.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},ge),ye="X-HACKLE-SDK-NAME",ve=[0,8,16,32,64,128,256,512],me=w.log;function ge(){}function Ee(){}function we(){}function Te(){}function _e(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])}var Ie={getRequest:function(n,o){return{abort:function(){},responsePromise:new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",n),r.onreadystatechange=function(){r.readyState===r.DONE&&(0===r.status?t(new Error("Request error")):e({statusCode:r.status,body:r.responseText}))},r.onerror=function(){t()},r.setRequestHeader("content-type","application/json"),_e(r,o),r.send()})}},postRequest:function(e,t,r,n,o){var t=JSON.stringify(t),i=new XMLHttpRequest;i.open("POST",e),i.onreadystatechange=function(){i.readyState===i.DONE&&(200<=i.status&&i.status<400?n({statusCode:i.status}):o&&o({statusCode:i.status}))},i.setRequestHeader("content-type","application/json"),_e(i,r),i.send(t)},sendBeacon:function(e,t,r,n,o){var i=!1;if(i="undefined"!=typeof window?window&&window.navigator&&window.navigator.sendBeacon&&!0:i){i=JSON.stringify(t),t=new URLSearchParams;if(t.append("sdkName",r[ye]),t.append("sdkVersion",r["X-HACKLE-SDK-VERSION"]),t.append("sdkKey",r["X-HACKLE-SDK-KEY"]),t.append("data",i),!window.navigator.sendBeacon(e,t))return me.error("sendBeacon failed to queue request."),void o();n()}else me.error("Does not support sendBeacon"),o()}},Ae=w.log,be=(ke.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]})},ke.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],i=o[0],o=o[1];this.isValidType(i)?(o=this.sanitizeValue(o),a.isNullOrUndefined(o)?Ae.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(i,"]")):t[i]=o):Ae.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(i,"]"))}return t},ke.isValidType=function(e){return!a.isNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},ke.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},ke.MAX_IDENTIFIER_TYPE_LENGTH=128,ke.MAX_IDENTIFIER_VALUE_LENGTH=512,ke),Oe=w.log,Ne=(Pe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var o,i=n[r],s=i[0],i=i[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Oe.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(i,"]"));break}this.isValidKey(s)?(o=this.sanitizeValue(s,i),a.isNullOrUndefined(o)?Oe.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(i,"]")):t[s]=o):Oe.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Pe.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Pe.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Pe.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},Pe.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))},Pe.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Pe.SYSTEM_PROPERTY_KEY_PREFIX="$",Pe.MAX_PROPERTIES_COUNT=128,Pe.MAX_PROPERTY_KEY_LENGTH=128,Pe.MAX_PROPERTY_VALUE_LENGTH=1024,Pe),Re=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Se=(n.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(n.C1/n.C0);case"milliseconds":return e/(n.C2/n.C0);case"seconds":return e/(n.C3/n.C0);case"minutes":return e/(n.C4/n.C0);case"hours":return e/(n.C5/n.C0);case"days":return e/(n.C6/n.C0)}},n.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C1/n.C0);case"milliseconds":return e/(n.C2/n.C1);case"microseconds":return e;case"seconds":return e/(n.C3/n.C1);case"minutes":return e/(n.C4/n.C1);case"hours":return e/(n.C5/n.C1);case"days":return e/(n.C6/n.C1)}},n.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C2/n.C0);case"microseconds":return e*(n.C2/n.C1);case"milliseconds":return e;case"seconds":return e/(n.C3/n.C2);case"minutes":return e/(n.C4/n.C2);case"hours":return e/(n.C5/n.C2);case"days":return e/(n.C6/n.C2)}},n.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C3/n.C0);case"microseconds":return e*(n.C3/n.C1);case"milliseconds":return e*(n.C3/n.C2);case"seconds":return e;case"minutes":return e/(n.C4/n.C3);case"hours":return e/(n.C5/n.C3);case"days":return e/(n.C6/n.C3)}},n.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C4/n.C0);case"microseconds":return e*(n.C4/n.C1);case"milliseconds":return e*(n.C4/n.C2);case"seconds":return e*(n.C4/n.C3);case"minutes":return e;case"hours":return e/(n.C5/n.C4);case"days":return e/(n.C6/n.C4)}},n.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C5/n.C0);case"microseconds":return e*(n.C5/n.C1);case"milliseconds":return e*(n.C5/n.C2);case"seconds":return e*(n.C5/n.C3);case"minutes":return e*(n.C5/n.C4);case"hours":return e;case"days":return e/(n.C6/n.C5)}},n.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(n.C6/n.C0);case"microseconds":return e*(n.C6/n.C1);case"milliseconds":return e*(n.C6/n.C2);case"seconds":return e*(n.C6/n.C3);case"minutes":return e*(n.C6/n.C4);case"hours":return e*(n.C6/n.C5);case"days":return e}},n.C6=24*(n.C5=60*(n.C4=60*(n.C3=1e3*(n.C2=1e3*(n.C1=1e3*(n.C0=1)))))),n.converter={nanoseconds:n.nanosToUnit,microseconds:n.microsToUnit,milliseconds:n.millisToUnit,seconds:n.secondsToUnit,minutes:n.minutesToUnit,hours:n.hoursToUnit,days:n.daysToUnit},n),Ce=(xe.prototype.tick=function(){return 1e3*Date.now()},xe.prototype.currentMillis=function(){return Date.now()},xe.instance=new xe,xe),Me=w.log;function xe(){}function n(){}function Pe(){}function ke(){}function Ue(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Me.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function De(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,o=t;n<o.length;n++){var i=Ue(e,o[n]);if(a.isNullOrUndefined(i))return;r.push(i)}return r}}function Le(e){var t,r={};return r.id=null!=(t=be.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=be.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=be.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ne.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=be.sanitize(e.identifiers)),Boolean(r.id||r.userId||r.deviceId||r.identifiers&&0<Object.keys(r.identifiers).length)?r:null}Pt.of=function(e,t){return new Pt(e,t)};var Fe=Pt,je=(xt.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},xt.of=function(e,t,r){return new xt(t,r,e)},xt),Ve=(Mt.of=function(e,t,r){return new Mt(e,t,r=void 0===r?new Ke:r)},Mt.prototype.get=function(e,t){return this.config.get(e,t)},Mt),He=(Ct.on=function(e,t){return new Ct(!0,e,t=void 0===t?new Ke:t)},Ct.off=function(e,t){return new Ct(!1,e,t=void 0===t?new Ke:t)},Ct.prototype.get=function(e,t){return this.config.get(e,t)},Ct),ie=(St.prototype.get=function(e,t){return t},St),Ke=(Rt.prototype.get=function(e,t){return t},Rt),s=(o.SDK_NOT_READY="SDK_NOT_READY",o.EXCEPTION="EXCEPTION",o.INVALID_INPUT="INVALID_INPUT",o.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",o.TYPE_MISMATCH="TYPE_MISMATCH",o.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",o.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",o.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",o.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",o.OVERRIDDEN="OVERRIDDEN",o.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",o.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",o.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",o.VARIATION_DROPPED="VARIATION_DROPPED",o.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",o.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",o.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",o.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",o.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",o.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",o.TARGET_RULE_MATCH="TARGET_RULE_MATCH",o.DEFAULT_RULE="DEFAULT_RULE",o.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",o.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",o.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",o.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",o.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",o.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",o.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",o.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",o),Ge=(Nt.fromJson=function(e,t){var r=Nt.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new Be(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),o=c.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),i=c.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return tt.fromJson(e,Gt.IDENTIFIER)}),s=c.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Xe.fromJson(e,Gt.PROPERTY)}),a=c.mapNotNullOrUndefined(t.execution.targetRules,function(e){return tt.fromJson(e,Gt.PROPERTY)}),u=et.fromJson(t.execution.defaultRule);return r&&u&&new Nt(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,o,i,s,a,u,t.containerId,t.winnerVariationId)},Nt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Me.debug("Unsupported status [".concat(e,"]"))}},Nt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},Nt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Nt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Nt),Be=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ze=(Ot.fromJson=function(e){return new Ot(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Ye(t,r,e)}))},Ot),Ye=(bt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},bt),qe=(At.fromJson=function(e){return new At(e.id,e.key)},At),Je=(It.ID="$id",It.USER="$userId",It.DEVICE="$deviceId",It.SESSION="$sessionId",It.HACKLE_DEVICE="$hackleDeviceId",It),$e=(_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=be.sanitizeValue(t);return be.isValidType(e)&&r?this.identifiers[e]=t:Me.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},_t.prototype.build=function(){return this.identifiers},_t),Xe=(Tt.fromJson=function(e,t){return new Tt(c.mapNotNullOrUndefined(e.conditions,function(e){return We.fromJson(e,t)}))},Tt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},Tt),We=(wt.fromJson=function(e,t){var r=Ze.fromJson(e.key);if(r&&t.supports(r.type))return(t=Qe.fromJson(e.match))&&new wt(r,t)},wt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},wt),Ze=(Et.fromJson=function(e){var t=Ue(Ht,e.type);return t&&new Et(t,e.name)},Et.prototype.toJson=function(){return{type:this.type,name:this.name}},Et),Qe=(gt.fromJson=function(e){var t=Ue(Lt,e.type),r=Ue(jt,e.operator),n=Ue(Ft,e.valueType);return t&&r&&n&&new gt(t,r,n,e.values)},gt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},gt),et=(mt.fromJson=function(e){var t=Ue(Vt,e.type);return t&&new mt(t,e.variationId,e.bucketId)},mt),tt=(vt.fromJson=function(e,t){t=Xe.fromJson(e.target,t),e=et.fromJson(e.action);return t&&e&&new vt(t,e)},vt),rt=(yt.fromJson=function(e){var t=Ue(Kt,e.type);return t&&new yt(e.id,e.key,t,c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Gt.SEGMENT)}))},yt),nt=(ht.fromJson=function(e){return new ht(e.id,e.bucketId,e.groups.map(function(e){return ot.fromJson(e)}))},ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},ht),ot=(dt.fromJson=function(e){return new dt(e.id,e.experiments)},dt),it=(ft.fromJson=function(e){return new ft(e.id,c.associate(e.parameters,function(e){return[e.key,e.value]}))},ft.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t},ft),st=(lt.fromJson=function(e){var t=Ue(Ft,e.type),r=c.mapNotNullOrUndefined(e.targetRules,function(e){return at.fromJson(e,Gt.PROPERTY)}),n=ut.fromJson(e.defaultValue);return t&&new lt(e.id,e.key,t,e.identifierType,r,n)},lt),at=(pt.fromJson=function(e,t){t=Xe.fromJson(e.target,t);return t&&new pt(e.key,e.name,t,e.bucketId,ut.fromJson(e.value))},pt),ut=(ct.fromJson=function(e){return new ct(e.id,e.value)},ct);function ct(e,t){this.id=e,this.rawValue=t}function pt(e,t,r,n,o){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=o}function lt(e,t,r,n,o,i){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=o,this.defaultValue=i}function ft(e,t){this.id=e,this.parameters=t}function dt(e,t){this.id=e,this.experiments=t}function ht(e,t,r){this.id=e,this.bucketId=t,this.groups=r}function yt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function vt(e,t){this.target=e,this.action=t}function mt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}function gt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}function Et(e,t){this.type=e,this.name=t}function wt(e,t){this.key=e,this.match=t}function Tt(e){this.conditions=e}function _t(){this.identifiers={}}function It(){}function At(e,t){this.id=e,this.key=t}function bt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}function Ot(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}function Nt(e,t,r,n,o,i,s,a,u,c,p,l,f,d,h){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=o,this.version=i,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=p,this.targetRules=l,this.defaultRule=f,this.containerId=d,this.winnerVariationId=h}function o(){}function Rt(){}function St(){}function Ct(e,t,r){this.isOn=e,this.reason=t,this.config=r}function Mt(e,t,r){this.variation=e,this.reason=t,this.config=r}function xt(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}function Pt(e,t){this.value=e,this.reason=t}Gr.tryParse=function(e){var t,r,n,o,e=Gr.regExp.exec(e);if(e)return e[0],t=e[1],r=void 0===(r=e[2])?"0":r,n=void 0===(n=e[3])?"0":n,o=e[4],e=e[5],new Gr(new Ut(parseInt(t,10),parseInt(r,10),parseInt(n,10)),Dt.parse(o),Dt.parse(e))},Gr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Gr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Gr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Gr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Gr.prototype.isLessThan=function(e){return this.compareTo(e)<0},Gr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Gr.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 kt=Gr,Ut=(Kr.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},Kr),Dt=(Hr.parse=function(e){return e?new Hr(e.split(".")):Hr.EMPTY},Hr.prototype.isEmpty=function(){return 0===this.identifiers.length},Hr.prototype.isNotEmpty=function(){return!this.isEmpty()},Hr.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},Hr.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=Hr.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},Hr.compareIdentifiers=function(e,t){return Hr.numericIdentifierRegExp.test(e)&&Hr.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},Hr.EMPTY=new Hr([]),Hr.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,Hr),Lt=["MATCH","NOT_MATCH"],Ft=["STRING","NUMBER","BOOLEAN","VERSION","JSON","NULL","UNKNOWN"],jt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Vt=["VARIATION","BUCKET"],Ht=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY"],Kt=["USER_ID","USER_PROPERTY"],Gt=(Vr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Vr.IDENTIFIER=new Vr("SEGMENT"),Vr.PROPERTY=new Vr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY"),Vr.SEGMENT=new Vr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY"),Vr),Bt=["ACTIVE","DRAFT","PAUSE"],zt=["WEB","ANDROID","IOS"],Yt=["IMMEDIATE","CUSTOM"],qt=["MODAL"],Jt=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],$t=["VERTICAL","HORIZONTAL"],Xt=["CLICK"],Wt=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Zt=(jr.fromJson=function(e){var t,r=Ue(Bt,e.status);if(!a.isNullOrUndefined(r)){switch(Ue(Yt,e.timeUnit)){case"IMMEDIATE":t=new Qt;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new er(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,o,i=ur.fromJson(e.messageContext);if(!a.isNullOrUndefined(i))return n=e.eventTriggerRules.map(rr.fromJson),o=nr.fromJson(e.eventFrequencyCap),new jr(e.id,e.key,r,t,new tr(n,o),sr.fromJson(e.targetContext),i)}},jr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},jr),Qt=(Fr.prototype.within=function(e){return!0},Fr),er=(Lr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},Lr),tr=function(e,t){this.rules=e,this.frequencyCap=t},rr=(Dr.fromJson=function(e){return new Dr(e.eventKey,c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Gt.PROPERTY)}))},Dr),nr=(Ur.fromJson=function(e){return e?new Ur(e.identifiers.map(or.fromJson),ir.fromJson(e.duration)):null},Ur),or=(kr.fromJson=function(e){return new kr(e.identifierType,e.countPerIdentifier)},kr),ir=(Pr.fromJson=function(e){if(!e)return null;var t=Ue(Re,e.durationUnit.timeUnit);return t?new Pr(Se.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},Pr),sr=(xr.fromJson=function(e){return new xr(e.overrides.map(ar.fromJson),c.mapNotNullOrUndefined(e.targets,function(e){return Xe.fromJson(e,Gt.PROPERTY)}))},xr),ar=(Mr.fromJson=function(e){return new Mr(e.identifierType,e.identifiers)},Mr),ur=(Cr.fromJson=function(e){var t=De(zt,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=De($t,e.orientations);if(!a.isNullOrUndefined(r)){var n=c.mapOrUndefined(e.messages,cr.fromJson);if(!a.isNullOrUndefined(n))return new Cr(e.defaultLang,t,r,n)}}},Cr),cr=(Sr.fromJson=function(e){var t=pr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=c.mapOrUndefined(e.images,lr.fromJson);if(!a.isNullOrUndefined(r)){var n=c.mapOrUndefined(e.buttons,yr.fromJson);if(!a.isNullOrUndefined(n)){var o=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(o=yr.fromJson2(e.closeButton),!a.isNullOrUndefined(o)))return new Sr(e.lang,t,r,e.text?fr.fromJson(e.text):void 0,n,o,new mr(e.background.color))}}}},Sr.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}}},Sr),pr=(Rr.fromJson=function(e){var t=Ue(Jt,e.layoutType),e=Ue(qt,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Rr(e,t)},Rr),lr=(Nr.fromJson=function(e){var t=Ue($t,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=gr.fromJson(e.action),!a.isNullOrUndefined(r)))return new Nr(t,e.imagePath,r)}},Nr.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}},Nr),fr=(Or.fromJson=function(e){return new Or(dr.fromJson(e.title),dr.fromJson(e.body))},Or.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}}}},Or),dr=(br.fromJson=function(e){return new br(e.text,new hr(e.style.textColor))},br),hr=function(e){this.color=e},yr=(Ar.fromJson=function(e){var t=gr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Ar(e.text,new vr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Ar.fromJson2=function(e){var t=gr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Ar("✕",new vr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Ar.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},Ar.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Ar),vr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},mr=function(e){this.color=e},gr=(Ir.fromJson=function(e){var t=Ue(Xt,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ue(Wt,e.type);if(!a.isNullOrUndefined(r))return new Ir(t,r,null!=(t=e.value)?t:void 0)}},Ir.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Ir),Er=(_r.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},_r.prototype.tag=function(e,t){return this._tags[e]=t,this},_r.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},_r),wr=(Tr.start=function(e){return new Tr(e=void 0===e?Tr.defaultClock:e)},Tr.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Tr.defaultClock=new Ce,Tr);function Tr(e){this._clock=e,this.startTime=this._clock.tick()}function _r(e){this.name=e,this._tags={},this.name=e}function Ir(e,t,r){this.behavior=e,this.type=t,this.value=r}function Ar(e,t,r){this.text=e,this.style=t,this.action=r}function br(e,t){this.text=e,this.style=t}function Or(e,t){this.title=e,this.body=t}function Nr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function Rr(e,t){this.displayType=e,this.layoutType=t}function Sr(e,t,r,n,o,i,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=o,this.closeButton=i,this.background=s}function Cr(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function Mr(e,t){this.identifierType=e,this.identifiers=t}function xr(e,t){this.overrides=e,this.targets=t}function Pr(e,t){this.durationMillis=e,this.count=t}function kr(e,t){this.identifierType=e,this.count=t}function Ur(e,t){this.identifierCaps=e,this.durationCap=t}function Dr(e,t){this.eventKey=e,this.targets=t}function Lr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function Fr(){this.type="IMMEDIATE"}function jr(e,t,r,n,o,i,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=o,this.targetContext=i,this.messageContext=s}function Vr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function Hr(e){this.identifiers=e}function Kr(e,t,r){this.major=e,this.minor=t,this.patch=r}function Gr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}zr.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},zr.prototype.tag=function(e,t){return this._tags[e]=t,this},zr.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Br=zr;function zr(e){this.name=e,this._tags={}}Object.defineProperty(qr.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Yr=qr;function qr(e,t){this.valueSupplier=t,this.field=e}function Jr(e,t){return e.name===t.name&&be.isEquals(e.tags,t.tags)}nn.prototype.count=function(){return this.counterValue},nn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},nn.prototype.measure=function(){return[new Yr("count",this.count.bind(this))]};var $r,Xr=nn,Wr=(rn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Xr(this.id),e},rn.prototype.count=function(){return this.currentCounter.count()},rn.prototype.increment=function(e){this.currentCounter.increment(e)},rn.prototype.measure=function(){return[new Yr("count",this.count.bind(this))]},rn),Zr=(tn.prototype.values=function(){return Array.from(this.data.values())},tn.prototype.keys=function(){return Array.from(this.data.keys())},tn.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},tn.prototype.has=function(e){return void 0!==this.get(e)},tn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},tn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},tn.prototype.forEach=function(e){this.data.forEach(e)},tn.prototype.entries=function(){return Array.from(this.data.entries())},tn),r=(Object.defineProperty(en.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),en.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},en.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},en.prototype.counter=function(e,t){return void 0===t&&(t={}),new Br(e).tags(t).register(this)},en.prototype.timer=function(e,t){return void 0===t&&(t={}),new Er(e).tags(t).register(this)},en.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},en.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},en.prototype.close=function(){},en),i=(ce(Qr,$r=r),Qr.prototype.start=function(){var e=this;void 0===this.currentIntervalId&&(this.currentIntervalId=setInterval(function(){e.publish()},this.pushIntervalMillis),w.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Qr.prototype.stop=function(){void 0!==this.currentIntervalId&&(clearInterval(this.currentIntervalId),this.currentIntervalId=void 0,this.publish(),w.log.debug("PushMetricRegistry stopped."))},Qr.prototype.close=function(){this.stop()},Qr);function Qr(e){var t=$r.call(this)||this;return t.pushIntervalMillis=e,t.currentIntervalId=void 0,t.pushIntervalMillis=e,t}function en(){this.id=ae.v4(),this.name="MetricRegistry",this._metrics=new Zr(Jr)}function tn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function rn(e){this.id=e,this.currentCounter=new Xr(e)}function nn(e){this.counterValue=0,this.id=e}hn.prototype.count=function(){return this._count},hn.prototype.totalTime=function(e){return Se.nanosToUnit(this._total,e)},hn.prototype.max=function(e){return Se.nanosToUnit(this._max,e)},hn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},hn.prototype.record=function(e,t){e<0||(t=Se.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},hn.prototype.measure=function(){var e=this;return[new Yr("count",this.count.bind(this)),new Yr("total",function(){return e.totalTime("milliseconds")}),new Yr("max",function(){return e.max("milliseconds")}),new Yr("mean",function(){return e.mean("milliseconds")})]};var on,sn=hn,an=(dn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new sn(this.id),e},dn.prototype.count=function(){return this.currentTimer.count()},dn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},dn.prototype.max=function(e){return this.currentTimer.max(e)},dn.prototype.record=function(e,t){this.currentTimer.record(e,t)},dn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},dn.prototype.measure=function(){var e=this;return[new Yr("count",this.count.bind(this)),new Yr("total",function(){return e.totalTime("milliseconds")}),new Yr("max",function(){return e.max("milliseconds")}),new Yr("mean",function(){return e.mean("milliseconds")})]},dn),i=(ce(fn,on=i),fn.prototype.createCounter=function(e){return new Wr(e)},fn.prototype.createTimer=function(e){return new an(e)},fn.prototype.publish=function(){var e=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(e)},fn.prototype.close=function(){on.prototype.close.call(this)},fn),un=(ln.prototype.count=function(){return 0},ln.prototype.increment=function(e){},ln.prototype.measure=function(){return[new Yr("count",this.count.bind(this))]},ln),cn=(Object.defineProperty(pn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),pn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},pn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},pn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},pn.prototype.measure=function(){return[new Yr("count",this.count.bind(this))]},pn);function pn(e){this._counters=new Zr(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new un(e)}function ln(e){this.id=e}function fn(e){return on.call(this,e)||this}function dn(e){this.id=e,this.currentTimer=new sn(e)}function hn(e){this._count=0,this._total=0,this._max=0,this.id=e}Dn.prototype.measure=function(){var e=this;return[new Yr("count",this.count.bind(this)),new Yr("total",function(){return e.totalTime("milliseconds")}),new Yr("max",function(){return e.max("milliseconds")}),new Yr("mean",function(){return e.mean("milliseconds")})]},Dn.prototype.count=function(){return 0},Dn.prototype.totalTime=function(e){return 0},Dn.prototype.max=function(e){return 0},Dn.prototype.mean=function(e){return 0},Dn.prototype.record=function(e,t){};var u,yn,vn,mn=Dn,gn=(Object.defineProperty(Un.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Un.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Un.prototype.max=function(e){return this.firstTimer.max(e)},Un.prototype.mean=function(e){return this.firstTimer.mean(e)},Un.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Un.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Un.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Un.prototype.count=function(){return this.firstTimer.count()},Un.prototype.measure=function(){var e=this;return[new Yr("count",this.count.bind(this)),new Yr("total",function(){return e.totalTime("milliseconds")}),new Yr("max",function(){return e.max("milliseconds")}),new Yr("mean",function(){return e.mean("milliseconds")})]},Un),r=(ce(kn,vn=r),kn.prototype.createCounter=function(e){e=new cn(e);return this.addRegistry(e),e},kn.prototype.createTimer=function(e){e=new gn(e);return this.addRegistry(e),e},kn.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},kn.prototype.add=function(t){t instanceof kn||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},kn.prototype.close=function(){this.registries.forEach(function(e){e.close()})},kn),En=(Pn.counter=function(e,t){return Pn.globalRegistry.counter(e,t)},Pn.timer=function(e,t){return Pn.globalRegistry.timer(e,t)},Pn.addRegistry=function(e){Pn.globalRegistry.add(e),w.log.debug("MetricRegistry added ".concat(e.name))},Pn.globalRegistry=new r,Pn),wn=(ce(xn,yn=i),xn.prototype.flushMetrics=function(e){var t=this;c.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){t.dispatch(e)})},xn.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},xn.prototype.dispatch=function(e){this.useBeacon&&this.shouldUseBeacon?this.httpClient.sendBeacon(this.monitoringEndPoint,this.batch(e),this.httpHeader,function(){w.log.debug("Beacon called.")}):this.httpClient.postRequest(this.monitoringEndPoint,this.batch(e),this.httpHeader,function(){},function(){w.log.debug("Failed to flushing metrics.")})},xn.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(c.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},xn.prototype.createCounter=function(e){return new Wr(e)},xn.prototype.createTimer=function(e){return new an(e)},xn.prototype.close=function(){this.shouldUseBeacon=!0,yn.prototype.close.call(this)},xn),Tn=(Mn.experiment=function(e,t,r){t=En.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Mn.featureFlag=function(e,t,r){t=En.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Mn.remoteConfig=function(e,t,r){t=En.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Mn.inAppMessage=function(e,t,r){t=En.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},Mn),_n=(Cn.record=function(e,t,r){e=En.timer("api.call",{operation:e,success:String(r)});t.stop(e)},Cn),In=(Sn.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)}},Sn.decision=function(e,t,r,n,o){return a.isNullOrUndefined(t)?Fe.of(n,s.INVALID_INPUT):e.remoteConfig(t,o,r,n)},Sn),An=w.log,bn=(Rn.prototype.get=function(e,t){var r,n=wr.start();try{r=this.decide(e,t)}catch(n){An.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=Fe.of(t,s.EXCEPTION)}return Tn.remoteConfig(n,e,r),r.value},Rn.prototype.decide=function(e,t){var r=this.userManager.resolveCurrentOrNull(this.user);if(!r)return An.warn("invalid user"),Fe.of(t,s.INVALID_INPUT);r=this.hackleUserResolver.resolve(r);return In.decide(this.core,e,t,r)},Rn),On=(Nn.prototype.contains=function(e){return this._properties.has(e)},Nn.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},Nn.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)},Nn.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=Ne.sanitizeValue(e,t);return r&&this._properties.set(e,r),this},Nn.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},Nn.prototype.build=function(){return this._properties},Nn);function Nn(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function Rn(e,t,r,n){this.core=e,this.userManager=t,this.hackleUserResolver=r,this.user=n}function Sn(){}function Cn(){}function Mn(){}function xn(e,t,r,n,o){t=yn.call(this,t)||this;return t.monitoringBaseUrl=e,t.httpClient=r,t.httpHeader=n,t.useBeacon=o,t.monitoringEndPoint="".concat(t.monitoringBaseUrl,"/metrics"),t.shouldUseBeacon=!1,t.start(),t.monitoringBaseUrl=e,t}function Pn(){}function kn(){var e=null!==vn&&vn.apply(this,arguments)||this;return e.registries=new Zr(function(e,t){return e.id===t.id}),e}function Un(e){this._timers=new Zr(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new mn(e)}function Dn(e){this.id=e}(r=u=u||{}).SET="$set",r.SET_ONCE="$setOnce",r.UNSET="$unset",r.INCREMENT="$increment",r.APPEND="$append",r.APPEND_ONCE="$appendOnce",r.PREPEND="$prepend",r.PREPEND_ONCE="$prependOnce",r.REMOVE="$remove",r.CLEAR_ALL="$clearAll";Ro.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new On).addProperties(e).addProperties(t).build()};var Ln,Fn,jn,Vn,Hn,Kn,Gn,Bn,zn=Ro,Yn=(No.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new On).addProperties(e).addProperties(t,!0).build()},No),qn=(Oo.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new On).addProperties(e).remove(t).build()},Oo),Jn=(bo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new On;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},bo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},bo),i=(Ao.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new On;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Ao.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Ao.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Ao.prototype.contains=function(e,t){return e.includes(t)},Ao.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:fe([e],t,!0)},Ao.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:fe(fe([],e,!0),[t],!1)},Ao),$n=(ce(Io,Bn=i),Io.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)},Io),Xn=(ce(_o,Gn=i),_o.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},_o.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},_o),Wn=(ce(To,Kn=i),To.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},To),Zn=(ce(wo,Hn=i),wo.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)},wo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},wo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},wo),Qn=(ce(Eo,Vn=i),Eo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},Eo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},Eo),eo=(go.prototype.operate=function(e,t){return new Map},go),to=(mo.get=function(e){switch(e){case u.SET:return new zn;case u.SET_ONCE:return new Yn;case u.UNSET:return new qn;case u.INCREMENT:return new Jn;case u.APPEND:return new $n;case u.APPEND_ONCE:return new Xn;case u.PREPEND:return new Wn;case u.PREPEND_ONCE:return new Zn;case u.CLEAR_ALL:return new eo;case u.REMOVE:return new Qn}},mo),ro=(vo.prototype.set=function(e,t){return this.add(u.SET,e,t)},vo.prototype.setOnce=function(e,t){return this.add(u.SET_ONCE,e,t)},vo.prototype.unset=function(e){return this.add(u.UNSET,e,"-")},vo.prototype.increment=function(e,t){return this.add(u.INCREMENT,e,t)},vo.prototype.append=function(e,t){return this.add(u.APPEND,e,t)},vo.prototype.appendOnce=function(e,t){return this.add(u.APPEND_ONCE,e,t)},vo.prototype.prepend=function(e,t){return this.add(u.PREPEND,e,t)},vo.prototype.prependOnce=function(e,t){return this.add(u.PREPEND_ONCE,e,t)},vo.prototype.remove=function(e,t){return this.add(u.REMOVE,e,t)},vo.prototype.clearAll=function(){return this.add(u.CLEAR_ALL,"clearAll","-")},vo.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new no(new Map(e))},vo.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},vo.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new On);e=this.operations.get(e);return null!=e&&e.add(t,r),this},vo),no=(yo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=to.get(t).operate(r,e)}),r},yo.prototype.toEvent=function(){var o={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;o.properties=E(E({},o.properties),((r={})[t]=E(E({},null==(n=o.properties)?void 0:n[t]),Ne.sanitize(a.fromMap(e))),r))}),o},yo),oo=w.log,io=(l.prototype.getSessionId=function(){return this.sessionManager.sessionId},l.prototype.getUser=function(){return this.userManager.currentUser},l.prototype.setUser=function(e){try{var t=Le(e);if(!t)return void oo.warn("invalid user");this.userManager.setUser(t)}catch(e){oo.error("Unexpected exception while set user: ".concat(e))}},l.prototype.setUserId=function(e){try{void 0===e&&this.userManager.setUserId(void 0);var t=be.sanitizeValue(e);if(!t)return void oo.warn("Invalid userId. [userId=".concat(e,"]"));this.userManager.setUserId(t)}catch(e){oo.error("Unexpected exception while set userId: ".concat(e))}},l.prototype.setDeviceId=function(e){try{if(!be.sanitizeValue(e))return void oo.warn("Invalid deviceId. [deviceId=".concat(e,"]"));this.userManager.setDeviceId(e)}catch(e){oo.error("Unexpected exception while set deviceId: ".concat(e))}},l.prototype.setUserProperty=function(e,t){e=(new ro).set(e,t).build();this.updateUserProperties(e)},l.prototype.setUserProperties=function(e){try{var t=Ne.sanitize(e),r=new ro;Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){oo.error("Unexpected exception while set userProperties: ".concat(e))}},l.prototype.updateUserProperties=function(e){try{var t=e.toEvent();this.track(t),this.userManager.updateUserProperties(e)}catch(e){oo.error("Unexpected exception while update userProperties: ".concat(e))}},l.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new ro).clearAll().build();this.track(e.toEvent())}catch(e){oo.error("Unexpected exception while reset user: ".concat(e))}},l.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},l.prototype.variationDetail=function(n,o,e){var i=e||"A",e=wr.start(),t=function(e){try{var t=e.userManager.resolveCurrentOrNull(o);if(!t)return oo.warn("invalid user"),Ve.of(i,s.INVALID_INPUT);var r=e.hackleUserResolver.resolve(t);return e.core.experiment(n,r,i)}catch(e){return oo.error("Unexpected exception while deciding variation for experiment[".concat(n,"]. Returning default variation[").concat(i,"] : ").concat(e)),Ve.of(i,s.EXCEPTION)}}(this);return Tn.experiment(e,n,t),t},l.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},l.prototype.featureFlagDetail=function(n,o){var e=wr.start(),t=function(e){try{var t=e.userManager.resolveCurrentOrNull(o);if(!t)return oo.warn("invalid user"),He.off(s.INVALID_INPUT);var r=e.hackleUserResolver.resolve(t);return e.core.featureFlag(n,r)}catch(e){return oo.error("Unexpected exception while deciding feature flag[".concat(n,"]. Returning default value[false] : ").concat(e)),He.off(s.EXCEPTION)}}(this);return Tn.featureFlag(e,n,t),t},l.prototype.track=function(e,t){try{oo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolveCurrentOrNull(t);if(!n)return void oo.warn("invalid user");var o=this.hackleUserResolver.resolve(n);this.core.track(r,o)}catch(e){oo.error("Unexpected exception while tracking event: ".concat(e))}},l.prototype.trackPageView=function(e){oo.debug("tracking page view");var t=this.hackleUserResolver.resolve(this.userManager.currentUser);this.core.track({key:"$page_view"},t)},l.prototype.remoteConfig=function(e){return new bn(this.core,this.userManager,this.hackleUserResolver,e)},l.prototype.onReady=function(e,t){this.core.onReady(e,t=void 0===t?3e3:t)},l.prototype.onInitialized=function(e){return this.core.onInitialized({timeout:null==e?void 0:e.timeout})},l.prototype.close=function(){oo.debug("Hackle Client is closing"),this.core.close()},l.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},l.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(oo.debug("UserExplorer opened."),En.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):oo.error("UserExplorer is not provided")},l.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():oo.warn("There is no active HackleDevtools.")},l),so=(ho.exposure=function(e,t,r,n){return new ao(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},ho.track=function(e,t,r,n){return new uo(n,r,e,t)},ho.remoteConfig=function(e,t,r,n){return new co(n,e,t.parameter,t.valueId,t.reason,r)},ho.isExposure=function(e){return void 0!==e.experiment},ho.isTrack=function(e){return void 0!==e.eventType},ho.isRemoteConfig=function(e){return void 0!==e.parameter},ho.isExposureDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},ho.isTrackDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},ho.isRemoteConfigDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},ho.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[Je.ID],identifiers:this.user.identifiers,userProperties:Ne.sanitize(this.user.properties),hackleProperties:Ne.sanitize(this.user.hackleProperties)}},ho),ao=(ce(fo,jn=so),fo.prototype.copyWithUser=function(e){return new fo(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},fo.prototype.toDto=function(){return E(E({},jn.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})},fo),uo=(ce(lo,Fn=so),lo.prototype.copyWithUser=function(e){return new lo(this.timestamp,e,this.eventType,this.event,this.insertId)},lo.prototype.toDto=function(){return E(E({},Fn.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ne.sanitize(this.event.properties)})},lo),co=(ce(po,Ln=so),po.prototype.copyWithUser=function(e){return new po(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},po.prototype.toDto=function(){return E(E({},Ln.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Ne.sanitize(this.properties)})},po);function po(e,t,r,n,o,i,s){e=Ln.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=o,e.properties=i,e}function lo(e,t,r,n,o){e=Fn.call(this,e,t,o)||this;return e.eventType=r,e.event=n,e}function fo(e,t,r,n,o,i,s,a){e=jn.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=o,e.decisionReason=i,e.properties=s,e}function ho(e,t,r){void 0===r&&(r=ae.v4()),this.timestamp=e,this.user=t,this.insertId=r}function l(e,t,r,n,o){this.core=e,this.hackleUserResolver=t,this.sessionManager=r,this.userManager=n,this.devTools=o}function yo(e){this.operations=null!=e?e:new Map}function vo(){this.operations=new Map}function mo(){}function go(){}function Eo(){return null!==Vn&&Vn.apply(this,arguments)||this}function wo(){return null!==Hn&&Hn.apply(this,arguments)||this}function To(){return null!==Kn&&Kn.apply(this,arguments)||this}function _o(){return null!==Gn&&Gn.apply(this,arguments)||this}function Io(){return null!==Bn&&Bn.apply(this,arguments)||this}function Ao(){}function bo(){}function Oo(){}function No(){}function Ro(){}function So(e){var t=new Array,r=new Array,n=new Array;return e.forEach(function(e){e instanceof so?so.isExposure(e)?t.push(e.toDto()):so.isTrack(e)?r.push(e.toDto()):so.isRemoteConfig(e)&&n.push(e.toDto()):so.isExposureDto(e)?t.push(e):so.isTrackDto(e)?r.push(e):so.isRemoteConfigDto(e)&&n.push(e)}),{exposureEvents:t,trackEvents:r,remoteConfigEvents:n}}Yo.prototype.dispatch=function(e,t,r){var n={},e=(n["X-HACKLE-SDK-KEY"]=this.sdkKey,n[ye]=this.headers[ye],n["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],n["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),So(e)),o=wr.start();this.httpRequest.postRequest(this.dispatchUrl,e,n,function(e){t(e),_n.record("post.events",o,!0)},function(e){null!=r&&r(e),_n.record("post.events",o,!1)})},Yo.prototype.dispatchXhrOrBeacon=function(e,t,r){var n,o,i;this.useBeacon?((n={})["X-HACKLE-SDK-KEY"]=this.sdkKey,n[ye]=this.headers[ye],n["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],n["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),o=So(e),i=wr.start(),this.httpRequest.sendBeacon(this.beaconDispatchUrl,o,n,function(e){t(e),_n.record("post.events",i,!0)},function(e){null!=r&&r(e),_n.record("post.events",i,!1)})):this.dispatch(e,t,r)};var Co=Yo,Mo=(zo.prototype.getExperiments=function(){return Array.from(this.experiments.values())},zo.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},zo.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},zo.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},zo.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},zo.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},zo.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},zo.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},zo.prototype.getContainerOrNull=function(e){return this.containers.get(e)},zo.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},zo.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},zo.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},zo.from=function(e){return new zo(c.mapNotNullOrUndefined(e.experiments,function(e){return Ge.fromJson("AB_TEST",e)}),c.mapNotNullOrUndefined(e.featureFlags,function(e){return Ge.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ze.fromJson),e.events.map(qe.fromJson),c.mapNotNullOrUndefined(e.segments,rt.fromJson),e.containers.map(nt.fromJson),e.parameterConfigurations.map(it.fromJson),c.mapNotNullOrUndefined(e.remoteConfigParameters,st.fromJson),c.mapNotNullOrUndefined(e.inAppMessages,Zt.fromJson))},zo),xo=(Bo.prototype.onReady=function(){return this.readyPromise},Bo.prototype.start=function(){this.isStarted||(this.isStarted=!0,this.errorRetryController.reset(),this.fetch())},Bo.prototype.stop=function(){return this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},Bo.prototype.get=function(){return this.workspace},Bo.prototype.scheduleNextUpdate=function(){var e=this,t=this.errorRetryController.getDelay(),t=Math.max(t,this.updateInterval);this.currentTimeout=setTimeout(function(){e.currentRequest?e.syncOnCurrentRequestComplete=!0:e.fetch()},t)},Bo.prototype.fetch=function(){function t(e){e=e.isSuccess,_n.record("get.workspace",o,e)}function e(){n.onRequestComplete()}var r,n=this,o=((r={})["X-HACKLE-SDK-KEY"]=this.sdkKey,r["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),r[ye]=this.headers[ye],r["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],wr.start());this.currentRequest=this.httpRequest.getRequest(this.fetchUrl,r);null!=(r=this.currentRequest)&&r.responsePromise.then(function(e){n.onRequestResolved(e,t)},function(e){n.onRequestRejected(e,t)}).then(e,e),0<this.updateInterval&&this.scheduleNextUpdate()},Bo.prototype.onRequestComplete=function(){this.isStarted&&(this.currentRequest=null,this.syncOnCurrentRequestComplete&&this.fetch(),this.syncOnCurrentRequestComplete=!1)},Bo.prototype.onRequestResolved=function(e,t){if(this.isStarted){if(void 0!==e.statusCode&&200<=e.statusCode&&e.statusCode<400)this.errorRetryController.reset(),t({isSuccess:!0});else{if(t({isSuccess:!1}),401===e.statusCode||403===e.statusCode)return void this.readyPromiseRejecter(new Error("Invalid key provided."));this.errorRetryController.countError()}e.body&&(t=JSON.parse(e.body),this.workspace=Mo.from(t),this.readyPromiseResolver())}},Bo.prototype.onRequestRejected=function(e,t){this.isStarted&&(t({isSuccess:!1}),this.errorRetryController.countError(),console.error("Error fetching data",e))},Bo.prototype.close=function(){this.stop()},Bo),Po=(Go.prototype.getDelay=function(){return 0===this.errorCount?0:1e3*ve[Math.min(ve.length-1,this.errorCount)]+Math.round(1e3*Math.random())},Go.prototype.countError=function(){this.errorCount<ve.length-1&&this.errorCount++},Go.prototype.reset=function(){this.errorCount=0},Go),r="model",i="name",f="type",d="vendor",h="version",y="mobile",v="tablet",ko=(m.parse=function(e){return{browser:m.getBrowser(e),cpu:m.getCPU(e),device:m.getDevice(e),engine:m.getEngine(e),os:m.getOS(e)}},m.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return m.mapper.rgx.call(t,e,m.regexes.browser),t.major=m.util.major(t.version),t},m.getCPU=function(e){var t={architecture:void 0};return m.mapper.rgx.call(t,e,m.regexes.cpu),t},m.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return m.mapper.rgx.call(t,e,m.regexes.device),t},m.getEngine=function(e){var t={name:void 0,version:void 0};return m.mapper.rgx.call(t,e,m.regexes.os),t},m.getOS=function(e){var t={name:void 0,version:void 0};return m.mapper.rgx.call(t,e,m.regexes.os),t},m.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,"")}},m.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[i,h],[/(opios)[\/\s]+([\w\.]+)/i],[[i,"Opera Mini"],h],[/\s(opr)\/([\w\.]+)/i],[[i,"Opera"],h],[/(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],[i,h],[/(konqueror)\/([\w\.]+)/i],[[i,"Konqueror"],h],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[i,"IE"],h],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[i,"Edge"],h],[/(yabrowser)\/([\w\.]+)/i],[[i,"Yandex"],h],[/(Avast)\/([\w\.]+)/i],[[i,"Avast Secure Browser"],h],[/(AVG)\/([\w\.]+)/i],[[i,"AVG Secure Browser"],h],[/(puffin)\/([\w\.]+)/i],[[i,"Puffin"],h],[/(focus)\/([\w\.]+)/i],[[i,"Firefox Focus"],h],[/(opt)\/([\w\.]+)/i],[[i,"Opera Touch"],h],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[i,"UCBrowser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[i,/_/g," "],h],[/(windowswechat qbcore)\/([\w\.]+)/i],[[i,"WeChat(Win) Desktop"],h],[/(micromessenger)\/([\w\.]+)/i],[[i,"WeChat"],h],[/(brave)\/([\w\.]+)/i],[[i,"Brave"],h],[/(whale)\/([\w\.]+)/i],[[i,"Whale"],h],[/(qqbrowserlite)\/([\w\.]+)/i],[i,h],[/(QQ)\/([\d\.]+)/i],[i,h],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[i,h],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[i,h],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[i,h],[/(MetaSr)[\/\s]?([\w\.]+)/i],[i],[/(LBBROWSER)/i],[i],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[h,[i,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[h,[i,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[i,h],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[h,[i,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[i,/(.+)/,"$1 WebView"],h],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[i,/(.+(?:g|us))(.+)/,"$1 $2"],h],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[i,"Chrome Mobile"],h],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[h,[i,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[i,"Sailfish Browser"],h],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[i,h],[/(dolfin)\/([\w\.]+)/i],[[i,"Dolphin"],h],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[i,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[i,"Opera Coast"],h],[/fxios\/([\w\.-]+)/i],[h,[i,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[h,[i,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[h,i],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[i,"GSA"],h],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[i,[h,(m.mapper={rgx:function(e,t){for(var r,n,o,i,s,a=0;a<t.length&&!i;){for(var u=t[a],c=t[a+1],p=r=0;p<u.length&&!i;)if(i=u[p++].exec(e))for(n=0;n<c.length;n++)s=i[++r],"object"==typeof(o=c[n])&&0<o.length?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(m.util.has(t[r][n],e))return"?"===r?void 0:r}else if(m.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(m.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],[i,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[i,"Netscape"],h],[/(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],[i,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",m.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",m.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[r,d,[f,v]],[/applecoremedia\/[\w\.]+ \((ipad)/],[r,[d,"Apple"],[f,v]],[/(apple\s{0,1}tv)/i],[[r,"Apple TV"],[d,"Apple"],[f,"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],[d,r,[f,v]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[r,[d,"Amazon"],[f,v]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[r,m.mapper.str,m.maps.device.amazon.model],[d,"Amazon"],[f,y]],[/android.+aft([bms])\sbuild/i],[r,[d,"Amazon"],[f,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[r,d,[f,y]],[/\((ip[honed|\s\w*]+);/i],[r,[d,"Apple"],[f,y]],[/(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],[d,r,[f,y]],[/\(bb10;\s(\w+)/i],[r,[d,"BlackBerry"],[f,y]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[r,[d,"Asus"],[f,v]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[r,"Xperia Tablet"],[f,v]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[r,[d,"Sony"],[f,y]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,r,[f,"console"]],[/android.+;\s(shield)\sbuild/i],[r,[d,"Nvidia"],[f,"console"]],[/(playstation\s[34portablevi]+)/i],[r,[d,"Sony"],[f,"console"]],[/(sprint\s(\w+))/i],[[d,m.mapper.str,m.maps.device.sprint.vendor],[r,m.mapper.str,m.maps.device.sprint.model],[f,y]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[r,/_/g," "],[f,y]],[/(nexus\s9)/i],[r,[d,"HTC"],[f,v]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[r,[d,"Huawei"],[f,y]],[/android.+(bah2?-a?[lw]\d{2})/i],[r,[d,"Huawei"],[f,v]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,r,[f,y]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[r,[d,"Microsoft"],[f,"console"]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[d,"Microsoft"],[f,y]],[/\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],[r,[d,"Motorola"],[f,y]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[r,[d,"Motorola"],[f,v]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,m.util.trim],[r,m.util.trim],[f,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[d,"Samsung"],[f,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[r,[d,"Sharp"],[f,"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],[[d,"Samsung"],r,[f,v]],[/smart-tv.+(samsung)/i],[d,[f,"smarttv"],r],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],r,[f,y]],[/sie-(\w*)/i],[r,[d,"Siemens"],[f,y]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],r,[f,y]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[r,[d,"Acer"],[f,v]],[/android.+([vl]k\-?\d{3})\s+build/i],[r,[d,"LG"],[f,v]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],r,[f,v]],[/(lg) netcast\.tv/i],[d,r,[f,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[r,[d,"LG"],[f,y]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,r,[f,v]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[r,[d,"Lenovo"],[f,v]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,r,[f,y]],[/linux;.+((jolla));/i],[d,r,[f,y]],[/((pebble))app\/[\d\.]+\s/i],[d,r,[f,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,r,[f,y]],[/crkey/i],[[r,"Chromecast"],[d,"Google"],[f,"smarttv"]],[/android.+;\s(glass)\s\d/i],[r,[d,"Google"],[f,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[r,[d,"Google"],[f,v]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[r,[d,"Google"],[f,y]],[/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],[[r,/_/g," "],[d,"Xiaomi"],[f,y]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[r,/_/g," "],[d,"Xiaomi"],[f,v]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[r,[d,"Meizu"],[f,y]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],r,[f,y]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[r,[d,"OnePlus"],[f,y]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[r,[d,"RCA"],[f,v]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[r,[d,"Dell"],[f,v]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[r,[d,"Verizon"],[f,v]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],r,[f,v]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[r,[d,"NuVision"],[f,v]],[/android.+;\s(k88)\sbuild/i],[r,[d,"ZTE"],[f,v]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[r,[d,"Swiss"],[f,y]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[r,[d,"Swiss"],[f,v]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[r,[d,"Zeki"],[f,v]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],r,[f,v]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[r,[d,"Insignia"],[f,v]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[r,[d,"NextBook"],[f,v]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],r,[f,y]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],r,[f,y]],[/android.+;\s(PH-1)\s/i],[r,[d,"Essential"],[f,y]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[r,[d,"Envizen"],[f,v]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,r,[f,v]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[r,[d,"MachSpeed"],[f,v]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,r,[f,v]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[r,[d,"Rotor"],[f,v]],[/android.+(KS(.+))\s+build/i],[r,[d,"Amazon"],[f,v]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,r,[f,v]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[f,m.util.lowerize],d,r],[/[\s\/\(](smart-?tv)[;\)]/i],[[f,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[r,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[i,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[i,"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],[i,h],[/rv\:([\w\.]{1,9}).+(gecko)/i],[h,i]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[i,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[i,m.mapper.str,m.maps.os.windows],[h,m.mapper.str,m.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[i,"Windows"],[h,m.mapper.str,m.maps.os.windows.version]],[/\((bb)(10);/i],[[i,"BlackBerry"],h],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[i,h],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[i,"Symbian"],h],[/\((series40);/i],[i],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[i,"Firefox OS"],h],[/(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],[[i,"Linux"],h],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[i,"Chromium OS"],h],[/(sunos)\s?([\w\.\d]*)/i],[[i,"Solaris"],h],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[i,"Linux"],h],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[i,"iPhone"],[h,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[i,"iPad"],[h,/_/g,"."]],[/(haiku)\s(\w+)/i],[i,h],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[h,/_/g,"."],[i,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[i,"Mac"],[h,/_/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],[i,h]]},m),Uo=(Ko.generate=function(e){t=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:t={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:t,screen:{width:"",height:""}}:e;var t,r=ko.parse(t.navigator.userAgent),n=r.browser,o=r.os,r=r.device,i=r.type?"mobile"===r.type?"Mobile":"ETC":"Web",s=(t.location.protocol||"").replace(":",""),a=t.screen,u="";try{u=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return{platform:i||"",browserName:n.name||"",browserMajorVersion:n.major||"",browserVersion:n.version||"",osName:o.name||"",osVersion:o.version||"",deviceModel:r.model||"",deviceType:r.type||"",deviceVendor:r.vendor||"",language:(null==(i=t.navigator.languages)?void 0:i[0])||"",userAgent:t.navigator.userAgent||"",pagePath:t.location.pathname||"",pageTitle:t.document.title||"",host:t.location.host||"",protocol:s,referrer:t.document.referrer||"",queryParameter:t.location.search||"",screenWidth:a.width||"",screenHeight:a.height||"",timeZone:u||""}},Ko),Do=(Ho.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]:""},Ho.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},Ho.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},Ho.prototype.setItem=function(e,t,r){var r=E(E({},this.options),r),n="",o="",i="",s="",a=(r.isCrossSubdomain&&(n=(a=Ho.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),o="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(i+="; secure"),e+"="+encodeURIComponent(t)+o+"; path=/"+n+s+i);return document.cookie=a},Ho.prototype.removeItem=function(e,t){this.setItem(e,"",E(E({},t),{days:-1}))},Ho.prototype.getOptions=function(){return this.options},Ho.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),Ho.storage=Ho.storage?Ho.storage:new Ho(e)},Ho),Lo=(Vo.prototype.resolve=function(e){var t=qo(),t=(new $e).addIdentifiers(e.identifiers||{}).add(Je.ID,e.id||t).add(Je.DEVICE,e.deviceId||t).add(Je.HACKLE_DEVICE,t);return a.isNotNullOrUndefined(e.userId)&&t.add(Je.USER,e.userId),{identifiers:t.build(),properties:e.properties||{},hackleProperties:this._getHackleProperties()}},Vo.prototype.resolveCurrentUser=function(){return this.resolve(this.userManager.currentUser)},Vo.prototype._getHackleProperties=function(){var e;return(e="undefined"!=typeof window?Uo.generate(window):e)||{}},Vo),Fo=(jo.initialize=function(){Do.getInstance().getItem("_hackle_hid")||Xo()},jo.reInitialize=function(){Xo()},jo);function jo(){}function Vo(e){this.userManager=e,Fo.initialize()}function Ho(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function Ko(){}function m(){}function Go(){this.errorCount=0}function Bo(e,t,r){var n=this;this.workspace=null,this.sdkKey=e,this.httpRequest=t,this.isStarted=!1,this.updateInterval=r.updateInterval,this.fetchUrl=r.fetchUrl,this.headers=r.headers,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise(function(e,t){n.readyPromiseResolver=e,n.readyPromiseRejecter=t}),this.currentTimeout=null,this.errorRetryController=new Po,this.currentRequest=null,this.syncOnCurrentRequestComplete=!1,this.isReadyPromiseSettled=!1}function zo(e,t,r,n,o,i,s,a,u){this.experiments=c.associateBy(e,function(e){return e.key}),this.featureFlags=c.associateBy(t,function(e){return e.key}),this.buckets=c.associateBy(r,function(e){return e.id}),this.eventTypes=c.associateBy(n,function(e){return e.key}),this.segments=c.associateBy(o,function(e){return e.key}),this.containers=c.associateBy(i,function(e){return e.id}),this.parameterConfigurations=c.associateBy(s,function(e){return e.id}),this.remoteConfigParameters=c.associateBy(a,function(e){return e.key}),this.inAppMessages=c.associateBy(u,function(e){return e.key})}function Yo(e,t,r){this.sdkKey=e,this.httpRequest=t,this.headers=r.headers,this.dispatchUrl=r.dispatchUrl,this.beaconDispatchUrl=r.beaconDispatchUrl||"",this.useBeacon=r.useBeacon||!1}function qo(){var e=Do.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||Xo()}function Jo(e){Do.getInstance().setItem("_hackle_id",e)}function $o(){Do.getInstance().removeItem("_hackle_id")}function Xo(){var e=ae.v4();return Do.getInstance().setItem("_hackle_hid",e),e}function Wo(e){return e&&e.Math==Math&&e}function g(e){try{return!!e()}catch(e){return!0}}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},v=Wo("object"==typeof globalThis&&globalThis)||Wo("object"==typeof window&&window)||Wo("object"==typeof self&&self)||Wo("object"==typeof y&&y)||function(){return this}()||Function("return this")(),f={},r=!g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),d=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,i=d?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},h={},e={}.propertyIsEnumerable,Qo=Object.getOwnPropertyDescriptor,y=Qo&&!e.call({1:2},1);h.f=y?function(e){e=Qo(this,e);return!!e&&e.enumerable}:e;function ei(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function ti(e){return gi(mi(e),8,-1)}function ri(e){if(null==e)throw _i("Can't call method on "+e);return e}function ni(e){return Ii(Ai(e))}function T(e){return"function"==typeof e}function oi(e){return"object"==typeof e?null!==e:bi(e)}function ii(e,t){return arguments.length<2?(r=Oi[e],Ni(r)?r:void 0):Oi[e]&&Oi[e][t];var r}function si(e){try{return Fi(e)}catch(e){return"Object"}}function ai(e){if(ji(e))return e;throw Hi(Vi(e)+" is not a function")}function ui(e,t){return null==(e=e[t])?void 0:Ki(e)}function ci(t,r){try{Ji(qi,t,{value:r,configurable:!0,writable:!0})}catch(e){qi[t]=r}return r}function _(e){return Zi(Wi(e))}function pi(e){return"Symbol("+(void 0===e?"":e)+")_"+os(++rs+ns,36)}function I(e){var t;return ss(ps,e)&&(us||"string"==typeof ps[e])||(t="Symbol."+e,us&&ss(ls,e)?ps[e]=ls[e]:ps[e]=(cs&&fs?fs:ds)(t)),ps[e]}function li(e){return e=function(e,t){if(!ys(e)||vs(e))return e;var r=ms(e,ws);if(r){if(r=hs(r,e,t=void 0===t?"default":t),!ys(r)||vs(r))return r;throw Es("Can't convert object to primitive value")}return gs(e,t=void 0===t?"number":t)}(e,"string"),Ts(e)?e:e+""}function fi(e){return Is?_s.createElement(e):{}}function di(e){if(Ps(e))return e;throw Us(ks(e)+" is not an object")}var y=d,e=Function.prototype,hi=e.bind,yi=e.call,vi=y&&hi.bind(yi,yi),e=y?function(e){return e&&vi(e)}:function(e){return e&&function(){return yi.apply(e,arguments)}},hi=e,mi=hi({}.toString),gi=hi("".slice),y=g,Ei=ti,wi=Object,Ti=e("".split),hi=y(function(){return!wi("z").propertyIsEnumerable(0)})?function(e){return"String"==Ei(e)?Ti(e,""):wi(e)}:wi,_i=TypeError,Ii=hi,Ai=ri,bi=T,Oi=v,Ni=T,y=e({}.isPrototypeOf),Ri=ii("navigator","userAgent")||"",Si=Ri,Ci=v.process,Mi=v.Deno,Ci=Ci&&Ci.versions||Mi&&Mi.version,Mi=Ci&&Ci.v8,Ci=Li=!(Li=Mi?0<(A=Mi.split("."))[0]&&A[0]<4?1:+(A[0]+A[1]):Li)&&Si&&(!(A=Si.match(/Edge\/(\d+)/))||74<=A[1])&&(A=Si.match(/Chrome\/(\d+)/))?+A[1]:Li,xi=Ci,Mi=g,Si=!!Object.getOwnPropertySymbols&&!Mi(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xi&&xi<41}),A=Si&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pi=ii,ki=T,Ui=y,Di=Object,Li=A?function(e){return"symbol"==typeof e}:function(e){var t=Pi("Symbol");return ki(t)&&Ui(t.prototype,Di(e))},Fi=String,ji=T,Vi=si,Hi=TypeError,Ki=ai,Gi=i,Bi=T,zi=oi,Yi=TypeError,Mi={exports:{}},qi=v,Ji=Object.defineProperty,$i=ci,$i=v["__core-js_shared__"]||$i("__core-js_shared__",{}),Xi=$i,Wi=((Mi.exports=function(e,t){return Xi[e]||(Xi[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"}),ri),Zi=Object,Qi=_,es=e({}.hasOwnProperty),ts=Object.hasOwn||function(e,t){return es(Qi(e),t)},b=e,rs=0,ns=Math.random(),os=b(1..toString),b=v,is=Mi.exports,ss=ts,as=pi,us=Si,cs=A,ps=is("wks"),ls=b.Symbol,fs=ls&&ls.for,ds=cs?ls:ls&&ls.withoutSetter||as,hs=i,ys=oi,vs=Li,ms=ui,gs=function(e,t){var r,n;if("string"===t&&Bi(r=e.toString)&&!zi(n=Gi(r,e)))return n;if(Bi(r=e.valueOf)&&!zi(n=Gi(r,e)))return n;if("string"!==t&&Bi(r=e.toString)&&!zi(n=Gi(r,e)))return n;throw Yi("Can't convert object to primitive value")},Es=TypeError,ws=I("toPrimitive"),Ts=Li,Si=oi,_s=v.document,Is=Si(_s)&&Si(_s.createElement),As=fi,A=!r&&!g(function(){return 7!=Object.defineProperty(As("div"),"a",{get:function(){return 7}}).a}),bs=i,Os=h,Ns=ei,Rs=ni,Ss=li,Cs=ts,Ms=A,xs=Object.getOwnPropertyDescriptor,is=(f.f=r?xs:function(e,t){if(e=Rs(e),t=Ss(t),Ms)try{return xs(e,t)}catch(e){}if(Cs(e,t))return Ns(!bs(Os.f,e,t),e[t])},{}),b=r&&g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ps=oi,ks=String,Us=TypeError,Ds=A,Ls=di,Fs=li,js=TypeError,Vs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Ks=(is.f=r?b?function(e,t,r){var n;return Ls(e),t=Fs(t),Ls(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=Hs(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}),Vs(e,t,r)}:Vs:function(e,t,r){if(Ls(e),t=Fs(t),Ls(r),Ds)try{return Vs(e,t,r)}catch(e){}if("get"in r||"set"in r)throw js("Accessors not supported");return"value"in r&&(e[t]=r.value),e},is),Gs=ei,as=r?function(e,t,r){return Ks.f(e,t,Gs(1,r))}:function(e,t,r){return e[t]=r,e},Li={exports:{}},Si=r,h=ts,A=Function.prototype,Bs=Si&&Object.getOwnPropertyDescriptor,h=h(A,"name"),h={EXISTS:h,PROPER:h&&"something"===function(){}.name,CONFIGURABLE:h&&(!Si||Bs(A,"name").configurable)},Si=T,Bs=$i,zs=e(Function.toString);Si(Bs.inspectSource)||(Bs.inspectSource=function(e){return zs(e)});function Ys(e){return pa[e]||(pa[e]=ca(e))}function qs(e,t,r,n){var o=(n=n||{}).enumerable,i=void 0!==n.name?n.name:t;if(Na(r)&&Sa(r,i,n),n.global)o?e[t]=r:Ca(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Ra.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Js(e){return(e=+e)!=e||0==e?0:Pa(e)}function $s(e,t){return(e=ka(e))<0?Ua(e+t,0):Da(e,t)}function O(e){return 0<(e=e.length)?Fa(La(e),9007199254740991):0}function Xs(a){return function(e,t,r){var n,o=ja(e),i=Ha(o),s=Va(r,i);if(a&&t!=t){for(;s<i;)if((n=o[s++])!=n)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===t)return a||s||0;return!a&&-1}}function Ws(e,t){var r,n=Ga(e),o=0,i=[];for(r in n)!Ka(za,r)&&Ka(n,r)&&Ya(i,r);for(;t.length>o;)!Ka(n,r=t[o++])||~Ba(i,r)||Ya(i,r);return i}function Zs(e,t,r){for(var n=eu(t),o=ru.f,i=tu.f,s=0;s<n.length;s++){var a=n[s];Qa(e,a)||r&&Qa(r,a)||o(e,a,i(t,a))}}function Qs(e,t){return(e=au[su(e)])==cu||e!=uu&&(ou(t)?nu(t):!!t)}function N(e,t){var r,n,o,i,s=e.target,a=e.global,u=e.stat;if(r=a?pu:u?pu[s]||hu(s,{}):(pu[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(i=lu(r,n))&&i.value:r[n],!vu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;yu(o,i)}(e.sham||i&&i.sham)&&fu(o,"sham",!0),du(r,n,o,e)}}var ea,ta,ra,na,oa,ia,sa,aa,A=Bs.inspectSource,Si=T,Bs=A,ua=v.WeakMap,Si=Si(ua)&&/native code/.test(Bs(ua)),Bs=Mi.exports,ca=pi,pa=Bs("keys"),ua={},Mi=e,la=oi,fa=as,da=ts,Bs=$i,R=Ys,ha=ua,ya=v.TypeError,va=v.WeakMap,Si=(sa=Si||Bs.state?(ea=Bs.state||(Bs.state=new va),ta=Mi(ea.get),ra=Mi(ea.has),na=Mi(ea.set),oa=function(e,t){if(ra(ea,e))throw new ya("Object already initialized");return t.facade=e,na(ea,e,t),t},ia=function(e){return ta(ea,e)||{}},function(e){return ra(ea,e)}):(ha[aa=R("state")]=!0,oa=function(e,t){if(da(e,aa))throw new ya("Object already initialized");return t.facade=e,fa(e,aa,t),t},ia=function(e){return da(e,aa)?e[aa]:{}},function(e){return da(e,aa)}),{set:oa,get:ia,has:sa,enforce:function(e){return sa(e)?ia(e):oa(e,{})},getterFor:function(t){return function(e){if(la(e)&&(e=ia(e)).type===t)return e;throw ya("Incompatible receiver, "+t+" required")}}}),Bs=g,ma=T,ga=ts,Ea=r,wa=h.CONFIGURABLE,Ta=A,_a=Si.enforce,Ia=Si.get,Aa=Object.defineProperty,ba=Ea&&!Bs(function(){return 8!==Aa(function(){},"length",{value:8}).length}),Oa=String(String).split("String"),va=Li.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),(!ga(e,"name")||wa&&e.name!==t)&&(Ea?Aa(e,"name",{value:t,configurable:!0}):e.name=t),ba&&r&&ga(r,"arity")&&e.length!==r.arity&&Aa(e,"length",{value:r.arity});try{r&&ga(r,"constructor")&&r.constructor?Ea&&Aa(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=_a(e);return ga(r,"source")||(r.source=Oa.join("string"==typeof t?t:"")),e},Na=(Function.prototype.toString=va(function(){return ma(this)&&Ia(this).source||Ta(this)},"toString"),T),Ra=is,Sa=Li.exports,Ca=ci,Mi={},Ma=Math.ceil,xa=Math.floor,Pa=Math.trunc||function(e){e=+e;return(0<e?xa:Ma)(e)},ka=Js,Ua=Math.max,Da=Math.min,La=Js,Fa=Math.min,ja=ni,Va=$s,Ha=O,ha={includes:Xs(!0),indexOf:Xs(!1)},Ka=ts,Ga=ni,Ba=ha.indexOf,za=ua,Ya=e([].push),R=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qa=Ws,Ja=R.concat("length","prototype"),Bs=(Mi.f=Object.getOwnPropertyNames||function(e){return qa(e,Ja)},{}),va=(Bs.f=Object.getOwnPropertySymbols,ii),$a=Mi,Xa=Bs,Wa=di,Za=e([].concat),Bs=va("Reflect","ownKeys")||function(e){var t=$a.f(Wa(e)),r=Xa.f;return r?Za(t,r(e)):t},Qa=ts,eu=Bs,tu=f,ru=is,nu=g,ou=T,iu=/#|\.prototype\./,su=Qs.normalize=function(e){return String(e).replace(iu,".").toLowerCase()},au=Qs.data={},uu=Qs.NATIVE="N",cu=Qs.POLYFILL="P",va=Qs,pu=v,lu=f.f,fu=as,du=qs,hu=ci,yu=Zs,vu=va,Bs=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),mu=ts,gu=T,Eu=_,wu=Ys("IE_PROTO"),Tu=Object,_u=Tu.prototype,Bs=Bs?Tu.getPrototypeOf:function(e){e=Eu(e);if(mu(e,wu))return e[wu];var t=e.constructor;return gu(t)&&e instanceof t?t.prototype:e instanceof Tu?_u:null},Iu=T,Au=String,bu=TypeError,Ou=e,Nu=di,Ru=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Ou(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return Nu(e),function(e){if("object"==typeof e||Iu(e))return;throw bu("Can't set "+Au(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),Su={},Cu=Ws,Mu=R,S=Object.keys||function(e){return Cu(e,Mu)},xu=is,Pu=di,ku=ni,Uu=S;Su.f=r&&!b?Object.defineProperties:function(e,t){Pu(e);for(var r,n=ku(t),o=Uu(t),i=o.length,s=0;s<i;)xu.f(e,r=o[s++],n[r]);return e};function Du(){}function Lu(e){e.write(ec("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Fu(e,t){return uc(e),void 0===t?e:cc?pc(e,t):function(){return e.apply(t,arguments)}}function ju(e){return void 0!==e&&(lc.Array===e||dc[fc]===e)}function Vu(e){if(null!=e)return wc(e,_c)||wc(e,"@@iterator")||Tc[Ec(e)]}function Hu(e,t){if(t=arguments.length<2?Nc(e):t,Ac(t))return bc(Ic(t,e));throw Rc(Oc(e)+" is not iterable")}function Ku(e,t,r){var n,o;Cc(e);try{if(!(n=Mc(e,"return"))){if("throw"===t)throw r;return r}n=Sc(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Cc(n),r}function Gu(e,t){this.stopped=e,this.result=t}function Bu(e,t,r){function n(e){return i&&Hc(i,"normal",e),new Gu(!0,e)}function o(e){return f?(kc(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var i,s,a,u,c,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=xc(t,l);if(d)i=e.iterator;else if(h)i=e;else{if(!(r=Vc(e)))throw Kc(Uc(e)+" is not iterable");if(Dc(r)){for(s=0,a=Lc(e);s<a;s++)if((u=o(e[s]))&&Fc(Gc,u))return u;return new Gu(!1)}i=jc(e,r)}for(c=(d?e:i).next;!(p=Pc(c,i)).done;){try{u=o(p.value)}catch(e){Hc(i,"throw",e)}if("object"==typeof u&&u&&Fc(Gc,u))return u}return new Gu(!1)}function zu(e){if("Symbol"===Bc(e))throw TypeError("Cannot convert a Symbol value to a string");return zc(e)}function Yu(e,t){var r,n=2<arguments.length?arguments[2]:void 0,o=$c(ap,this);return Wc?r=Wc(new ip,o?Xc(this):ap):(r=o?this:Qc(ap),ep(r,op,"Error")),void 0!==t&&ep(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Yc(e)}(t)),np&&ep(r,"stack",function(e,t){if(ic&&"string"==typeof e&&!rc.prepareStackTrace)for(;t--;)e=nc(e,oc,"");return e}(r.stack,1)),o=r,sc(t=n)&&"cause"in t&&ac(o,"cause",t.cause),rp(e,sp,{that:n=[]}),ep(r,"errors",n),r}var qu,S=ii("document","documentElement"),Ju=di,$u=Su,Xu=R,b=ua,Wu=S,Zu=fi,Qu=Ys("IE_PROTO"),ec=function(e){return"<script>"+e+"<\/script>"},tc=function(){try{qu=new ActiveXObject("htmlfile")}catch(e){}var e,t;tc="undefined"==typeof document||document.domain&&qu?Lu(qu):((t=Zu("iframe")).style.display="none",Wu.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ec("document.F=Object")),e.close(),e.F);for(var r=Xu.length;r--;)delete tc.prototype[Xu[r]];return tc()},Su=(b[Qu]=!0,Object.create||function(e,t){var r;return null!==e?(Du.prototype=Ju(e),r=new Du,Du.prototype=null,r[Qu]=e):r=tc(),void 0===t?r:$u.f(r,t)}),rc=Error,nc=e("".replace),R=String(rc("zxcasd").stack),oc=/\n\s*at [^:]*:[^\n]*/,ic=oc.test(R),sc=oi,ac=as,uc=ai,cc=d,pc=e(e.bind),b={},lc=b,fc=I("iterator"),dc=Array.prototype,R={},R=(R[I("toStringTag")]="z","[object z]"===String(R)),C=R,hc=T,yc=ti,vc=I("toStringTag"),mc=Object,gc="Arguments"==yc(function(){return arguments}()),C=C?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=mc(e),vc))?t:gc?yc(e):"Object"==(t=yc(e))&&hc(e.callee)?"Arguments":t},Ec=C,wc=ui,Tc=b,_c=I("iterator"),Ic=i,Ac=ai,bc=di,Oc=si,Nc=Vu,Rc=TypeError,Sc=i,Cc=di,Mc=ui,xc=Fu,Pc=i,kc=di,Uc=si,Dc=ju,Lc=O,Fc=y,jc=Hu,Vc=Vu,Hc=Ku,Kc=TypeError,Gc=Gu.prototype,Bc=C,zc=String,Yc=zu,qc=ei,M=!g(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",qc(1,7)),7!==e.stack)}),Jc=N,$c=y,Xc=Bs,Wc=Ru,Zc=Zs,Qc=Su,ep=as,tp=ei,rp=Bu,np=M,op=I("toStringTag"),ip=Error,sp=[].push,ap=(Wc?Wc(Yu,ip):Zc(Yu,ip,{name:!0}),Yu.prototype=Qc(ip.prototype,{constructor:tp(1,Yu),message:tp(1,""),name:tp(1,"AggregateError")})),M=(Jc({global:!0,constructor:!0,arity:2},{AggregateError:Yu}),I),Zc=Su,tp=is.f,up=M("unscopables"),cp=Array.prototype;null==cp[up]&&tp(cp,up,{configurable:!0,value:Zc(null)});function x(e){cp[up][e]=!0}var pp,Jc=g,M=T,tp=Bs,Zc=qs,lp=I("iterator"),P=!1;[].keys&&("next"in(yp=[].keys())?(tp=tp(tp(yp)))!==Object.prototype&&(pp=tp):P=!0);function fp(e,t,r){(e=e&&!r?e.prototype:e)&&!mp(e,gp)&&vp(e,gp,{configurable:!0,value:t})}function dp(){return this}function hp(e,t,r,n,o,i,s){var a=r,u=t,c=void 0;function p(e){if(e===o&&v)return v;if(!Lp&&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=wp(Ep,{next:Tp(+!c,n)}),_p(a,u,!1),Ip[u]=Ap;var l,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[Fp]||h["@@iterator"]||o&&h[o],v=!Lp&&y||p(o);if((n="Array"==t&&h.entries||y)&&(a=Rp(n.call(new e)))!==Object.prototype&&a.next&&(Rp(a)!==Dp&&(Sp?Sp(a,Dp):Np(a[Fp])||xp(a,Fp,dp)),Cp(a,c,!0)),kp&&"values"==o&&y&&"values"!==y.name&&(Up?Mp(h,"name","values"):(d=!0,v=function(){return Op(y,this)})),o)if(l={values:p("values"),keys:i?v:p("keys"),entries:p("entries")},s)for(f in l)!Lp&&!d&&f in h||xp(h,f,l[f]);else bp({target:t,proto:!0,forced:Lp||d},l);return h[Fp]!==v&&xp(h,Fp,v,{name:o}),Pp[t]=v,l}M((pp=null==pp||Jc(function(){var e={};return pp[lp].call(e)!==e})?{}:pp)[lp])||Zc(pp,lp,function(){return this});var yp={IteratorPrototype:pp,BUGGY_SAFARI_ITERATORS:P},vp=is.f,mp=ts,gp=I("toStringTag"),Ep=yp.IteratorPrototype,wp=Su,Tp=ei,_p=fp,Ip=b,Ap=function(){return this},bp=N,Op=i,Np=T,Rp=Bs,Sp=Ru,Cp=fp,Mp=as,xp=qs,Pp=b,kp=h.PROPER,Up=h.CONFIGURABLE,Dp=yp.IteratorPrototype,Lp=yp.BUGGY_SAFARI_ITERATORS,Fp=I("iterator"),jp=ni,tp=x,M=b,Jc=Si,Zc=is.f,P=hp,h=r,Vp=Jc.set,Hp=Jc.getterFor("Array Iterator"),yp=P(Array,"Array",function(e,t){Vp(this,{type:"Array Iterator",target:jp(e),index:0,kind:t})},function(){var e=Hp(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"),b=M.Arguments=M.Array;if(tp("keys"),tp("values"),tp("entries"),h&&"values"!==b.name)try{Zc(b,"name",{value:"values"})}catch(kA){}function Kp(e){var e=Jp(e),t=$p.f;Xp&&e&&!e[Wp]&&t(e,Wp,{configurable:!0,get:function(){return this}})}function Gp(e,t){if(Zp(t,e))return e;throw Qp("Incorrect invocation")}function Bp(){}function zp(e){if(!el(e))return!1;try{return ol(Bp,nl,e),!0}catch(e){return!1}}function Yp(e){if(!el(e))return!1;switch(tl(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return al||!!sl(il,rl(e))}catch(e){return!0}}var qp=C,Jc=(R||qs(Object.prototype,"toString",R?{}.toString:function(){return"[object "+qp(this)+"]"},{unsafe:!0}),"process"==ti(v.process)),Jp=ii,$p=is,Xp=r,Wp=I("species"),Zp=y,Qp=TypeError,P=e,M=g,el=T,tl=C,rl=A,nl=[],ol=ii("Reflect","construct"),il=/^\s*(?:class|function)\b/,sl=P(il.exec),al=!il.exec(Bp);Yp.sham=!0;function ul(e,t){var r,e=hl(e).constructor;if(void 0===e||null==(r=hl(e)[yl]))return t;if(ll(e=r))return e;throw dl(fl(e)+" is not a constructor")}var cl,pl,tp=!ol||M(function(){var e;return zp(zp.call)||!zp(Object)||!zp(function(){e=!0})||e})?Yp:zp,ll=tp,fl=si,dl=TypeError,hl=di,yl=I("species"),h=Function.prototype,vl=h.apply,ml=h.call,Zc="object"==typeof Reflect&&Reflect.apply||(d?ml.bind(vl):function(){return ml.apply(vl,arguments)}),b=e([].slice),gl=TypeError,R=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ri),El=v,wl=Zc,y=Fu,Tl=T,_l=ts,C=g,Il=S,Al=b,bl=fi,P=R,M=Jc,h=El.setImmediate,d=El.clearImmediate,Ol=El.process,Nl=El.Dispatch,Rl=El.Function,S=El.MessageChannel,Sl=El.String,Cl=0,Ml={};try{cl=El.location}catch(kA){}function xl(e){return function(){Ul(e)}}function Pl(e){Ul(e.data)}function kl(e){El.postMessage(Sl(e),cl.protocol+"//"+cl.host)}var Ul=function(e){var t;_l(Ml,e)&&(t=Ml[e],delete Ml[e],t())};h&&d||(h=function(e){var t=arguments.length,r=1;if(t<r)throw gl("Not enough arguments");var n=Tl(e)?e:Rl(e),o=Al(arguments,1);return Ml[++Cl]=function(){wl(n,void 0,o)},pl(Cl),Cl},d=function(e){delete Ml[e]},M?pl=function(e){Ol.nextTick(xl(e))}:Nl&&Nl.now?pl=function(e){Nl.now(xl(e))}:S&&!P?(P=(M=new S).port2,M.port1.onmessage=Pl,pl=y(P.postMessage,P)):El.addEventListener&&Tl(El.postMessage)&&!El.importScripts&&cl&&"file:"!==cl.protocol&&!C(kl)?(pl=kl,El.addEventListener("message",Pl,!1)):pl="onreadystatechange"in bl("script")?function(e){Il.appendChild(bl("script")).onreadystatechange=function(){Il.removeChild(this),Ul(e)}}:function(e){setTimeout(xl(e),0)});function Dl(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function Ll(){this.head=null,this.tail=null}function Fl(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=sf(r),this.reject=sf(n)}var jl,Vl,Hl,Kl,Gl,Bl,zl,S={set:h,clear:d},M=v,y=/ipad|iphone|ipod/i.test(Ri)&&void 0!==M.Pebble,P=/web0s(?!.*chrome)/i.test(Ri),C=v,h=Fu,d=f.f,Yl=S.set,M=R,f=y,R=P,ql=Jc,y=C.MutationObserver||C.WebKitMutationObserver,P=C.document,Jl=C.process,$l=C.Promise,d=d(C,"queueMicrotask"),d=d&&d.value,R=(d||(jl=function(){var e,t;for(ql&&(e=Jl.domain)&&e.exit();Vl;){t=Vl.fn,Vl=Vl.next;try{t()}catch(e){throw Vl?Kl():Hl=void 0,e}}Hl=void 0,e&&e.enter()},Kl=M||ql||R||!y||!P?!f&&$l&&$l.resolve?((M=$l.resolve(void 0)).constructor=$l,zl=h(M.then,M),function(){zl(jl)}):ql?function(){Jl.nextTick(jl)}:(Yl=h(Yl,C),function(){Yl(jl)}):(Gl=!0,Bl=P.createTextNode(""),new y(jl).observe(Bl,{characterData:!0}),function(){Bl.data=Gl=!Gl})),d||function(e){e={fn:e,next:void 0};Hl&&(Hl.next=e),Vl||(Vl=e,Kl()),Hl=e}),Xl=v,f=(Ll.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}},Ll),$l=v.Promise,M="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,h=!M&&!Jc&&"object"==typeof window&&"object"==typeof document,C=v,Wl=$l,P=T,y=va,Zl=A,d=I,Ql=h,ef=M,tf=Ci,rf=(Wl&&Wl.prototype,d("species")),nf=!1,of=P(C.PromiseRejectionEvent),A={CONSTRUCTOR:y("Promise",function(){var e=Zl(Wl),t=e!==String(Wl);if(!t&&66===tf)return!0;if(!tf||tf<51||!/native code/.test(e)){var e=new Wl(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[rf]=r,!(nf=e.then(function(){})instanceof r))return!0}return!t&&(Ql||ef)&&!of}),REJECTION_EVENT:of,SUBCLASSING:nf},h={},sf=ai;h.f=function(e){return new Fl(e)};function af(e,t){var r,n,o,i,s=t.value,a=1==t.state,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&(i=t,df(Ef,ff,function(){var e=i.facade;lf?xf.emit("rejectionHandled",e):Ff("rejectionhandled",e,i.value)})),t.rejection=1),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),o=!0)),r===e.promise?p(Cf("Promise-chain cycle")):(n=Df(r))?df(n,r,c,p):c(r)):p(s)}catch(e){l&&!o&&l.exit(),p(e)}}var uf,cf,pf,M=N,lf=Jc,ff=v,df=i,d=qs,P=Ru,C=fp,y=Kp,hf=ai,yf=T,vf=oi,mf=Gp,gf=ul,Ef=S.set,wf=R,Tf=Dl,_f=f,S=Si,R=$l,f=h,If=A.CONSTRUCTOR,Af=A.REJECTION_EVENT,bf=A.SUBCLASSING,Of=S.getterFor("Promise"),Nf=S.set,S=R&&R.prototype,Rf=R,Sf=S,Cf=ff.TypeError,Mf=ff.document,xf=ff.process,Pf=f.f,kf=Pf,Uf=!!(Mf&&Mf.createEvent&&ff.dispatchEvent),Df=function(e){var t;return!(!vf(e)||!yf(t=e.then))&&t},Lf=function(r,o){r.notified||(r.notified=!0,wf(function(){for(var e,n,t=r.reactions;e=t.get();)af(e,r);r.notified=!1,o&&!r.rejection&&(n=r,df(Ef,ff,function(){var e,t=n.facade,r=n.value;if(jf(n)&&(e=Tf(function(){lf?xf.emit("unhandledRejection",r,t):Ff("unhandledrejection",t,r)}),n.rejection=lf||jf(n)?2:1,e.error))throw e.value}))}))},Ff=function(e,t,r){var n;Uf?((n=Mf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),ff.dispatchEvent(n)):n={promise:t,reason:r},!Af&&(t=ff["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Xl.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},jf=function(e){return 1!==e.rejection&&!e.parent},Vf=function(t,r,n){return function(e){t(r,e,n)}},Hf=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,Lf(e,!0))},Kf=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Cf("Promise can't be resolved itself");var n=Df(e);n?wf(function(){var t={done:!1};try{df(n,e,Vf(Kf,t,r),Vf(Hf,t,r))}catch(e){Hf(t,e,r)}}):(r.value=e,r.state=1,Lf(r,!1))}catch(e){Hf({done:!1},e,r)}}};if(If&&(Sf=(Rf=function(e){mf(this,Sf),hf(e),df(uf,this);var t=Of(this);try{e(Vf(Kf,t),Vf(Hf,t))}catch(e){Hf(t,e)}}).prototype,(uf=function(e){Nf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new _f,rejection:!1,state:0,value:void 0})}).prototype=d(Sf,"then",function(e,t){var r=Of(this),n=Pf(gf(this,Rf));return r.parent=!0,n.ok=!yf(e)||e,n.fail=yf(t)&&t,n.domain=lf?xf.domain:void 0,0==r.state?r.reactions.add(n):wf(function(){af(n,r)}),n.promise}),cf=function(){var e=new uf,t=Of(e);this.promise=e,this.resolve=Vf(Kf,t),this.reject=Vf(Hf,t)},f.f=Pf=function(e){return e===Rf||void 0===e?new cf:kf(e)},yf(R)&&S!==Object.prototype)){pf=S.then,bf||d(S,"then",function(e,t){var r=this;return new Rf(function(e,t){df(pf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete S.constructor}catch(kA){}P&&P(S,Sf)}M({global:!0,constructor:!0,wrap:!0,forced:If},{Promise:Rf}),C(Rf,"Promise",!1),y("Promise");var Gf=I("iterator"),Bf=!1;try{var zf=0,Yf={next:function(){return{done:!!zf++}},return:function(){Bf=!0}};Yf[Gf]=function(){return this},Array.from(Yf,function(){throw 2})}catch(kA){}function qf(e,t){if(!t&&!Bf)return!1;var r=!1;try{var n={};n[Gf]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function Jf(e,t){return ld(e),fd(t)&&t.constructor===e?t:((0,(e=dd.f(e)).resolve)(t),e.promise)}function $f(o){return function(e,t){var r,e=xd(Pd(e)),t=Md(t),n=e.length;return t<0||n<=t?o?"":void 0:(r=Ud(e,t))<55296||56319<r||t+1===n||(n=Ud(e,t+1))<56320||57343<n?o?kd(e,t):r:o?Dd(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Xf(e,t){if(e){if(e[zd]!==qd)try{Bd(e,zd,qd)}catch(t){e[zd]=qd}if(e[Yd]||Bd(e,Yd,t),Kd[t])for(var r in Gd)if(e[r]!==Gd[r])try{Bd(e,r,Gd[r])}catch(t){e[r]=Gd[r]}}}var Wf,Zf=$l,f=A.CONSTRUCTOR||!qf(function(e){Zf.all(e).then(void 0,function(){})}),Qf=i,ed=ai,td=h,rd=Dl,nd=Bu,R=(N({target:"Promise",stat:!0,forced:f},{all:function(e){var a=this,t=td.f(a),u=t.resolve,c=t.reject,r=rd(function(){var n=ed(a.resolve),o=[],i=0,s=1;nd(e,function(e){var t=i++,r=!1;s++,Qf(n,a,e).then(function(e){r||(r=!0,o[t]=e,--s||u(o))},c)}),--s||u(o)});return r.error&&c(r.value),t.promise}}),N),bf=$l,d=ii,P=T,S=qs,M=bf&&bf.prototype,od=(R({target:"Promise",proto:!0,forced:A.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),P(bf)&&(If=d("Promise").prototype.catch,M.catch!==If&&S(M,"catch",If,{unsafe:!0})),i),id=ai,sd=h,ad=Dl,ud=Bu,cd=(N({target:"Promise",stat:!0,forced:f},{race:function(e){var r=this,n=sd.f(r),o=n.reject,t=ad(function(){var t=id(r.resolve);ud(e,function(e){od(t,r,e).then(n.resolve,o)})});return t.error&&o(t.value),n.promise}}),i),pd=h,ld=(N({target:"Promise",stat:!0,forced:A.CONSTRUCTOR},{reject:function(e){var t=pd.f(this);return cd(t.reject,void 0,e),t.promise}}),di),fd=oi,dd=h,C=N,y=A.CONSTRUCTOR,hd=Jf,yd=(ii("Promise"),C({target:"Promise",stat:!0,forced:y},{resolve:function(e){return hd(this,e)}}),i),vd=ai,md=h,gd=Dl,Ed=Bu,wd=(N({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=md.f(a),u=t.resolve,r=t.reject,n=gd(function(){var n=vd(a.resolve),o=[],i=0,s=1;Ed(e,function(e){var t=i++,r=!1;s++,yd(n,a,e).then(function(e){r||(r=!0,o[t]={status:"fulfilled",value:e},--s||u(o))},function(e){r||(r=!0,o[t]={status:"rejected",reason:e},--s||u(o))})}),--s||u(o)});return n.error&&r(n.value),t.promise}}),i),Td=ai,_d=ii,Id=h,Ad=Dl,bd=Bu,Yf=(N({target:"Promise",stat:!0},{any:function(e){var u=this,c=_d("AggregateError"),t=Id.f(u),p=t.resolve,l=t.reject,r=Ad(function(){var n=Td(u.resolve),o=[],i=0,s=1,a=!1;bd(e,function(e){var t=i++,r=!1;s++,wd(n,u,e).then(function(e){r||a||(a=!0,p(e))},function(e){r||a||(r=!0,o[t]=e,--s||l(new c(o,"No one promise resolved")))})}),--s||l(new c(o,"No one promise resolved"))});return r.error&&l(r.value),t.promise}}),N),R=$l,P=g,Od=ii,Nd=T,Rd=ul,Sd=Jf,bf=qs,Cd=R&&R.prototype,S=(Yf({target:"Promise",proto:!0,real:!0,forced:!!R&&P(function(){Cd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Rd(this,Od("Promise")),e=Nd(t);return this.then(e?function(e){return Sd(r,t()).then(function(){return e})}:t,e?function(e){return Sd(r,t()).then(function(){throw e})}:t)}}),Nd(R)&&(d=Od("Promise").prototype.finally,Cd.finally!==d&&bf(Cd,"finally",d,{unsafe:!0})),e),Md=Js,xd=zu,Pd=ri,kd=S("".charAt),Ud=S("".charCodeAt),Dd=S("".slice),Ld=($f(!1),$f(!0)),Fd=zu,M=Si,If=hp,jd=M.set,Vd=M.getterFor("String Iterator"),f=(If(String,"String",function(e){jd(this,{type:"String Iterator",string:Fd(e),index:0})},function(){var e=Vd(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Ld(t,r),e.index+=t.length,{value:t,done:!1})}),v),A=(f.Promise,fi("span").classList),C=A&&A.constructor&&A.constructor.prototype,y=C===Object.prototype?void 0:C,Hd=v,Kd={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},$l=y,Gd=yp,Bd=as,Yf=I,zd=Yf("iterator"),Yd=Yf("toStringTag"),qd=Gd.values;for(Wf in Kd)Xf(Hd[Wf]&&Hd[Wf].prototype,Wf);Xf($l,"DOMTokenList");function Jd(e,t,r){(t=Eh(t))in e?wh.f(e,t,Th(0,r)):e[t]=r}function $d(e){if(9007199254740991<e)throw jh("Maximum allowed index exceeded");return e}function Xd(e,t){return Vh(e=e)&&(r=e.constructor,(Hh(r)&&(r===Bh||Vh(r.prototype))||Kh(r)&&null===(r=r[Gh]))&&(r=void 0)),new(void 0===r?Bh:r)(0===t?0:t);var r}function Wd(t){return 51<=Yh||!zh(function(){var e=[];return(e.constructor={})[qh]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Zd(e,t){if(!delete e[t])throw ny("Cannot delete property "+ry(t)+" of "+ry(e))}function Qd(f){var d=1==f,h=2==f,y=3==f,v=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var o,i,s=ly(e),a=py(s),u=cy(t,r),c=fy(a),p=0,t=n||dy,l=d?t(e,c):h||g?t(e,0):void 0;p<c;p++)if((E||p in a)&&(i=u(o=a[p],p,s),f))if(d)l[p]=i;else if(i)switch(f){case 3:return!0;case 5:return o;case 6:return p;case 2:hy(l,o)}else switch(f){case 4:return!1;case 7:hy(l,o)}return m?-1:y||v?v:l}}function eh(e,t){var r=[][e];return!!r&&yy(function(){r.call(null,t||function(){return 1},1)})}function th(u){var c=1==u;return function(e,t,r){for(var n,o=Ny(e),i=Oy(o),s=by(t,r),a=Ry(i);0<a--;)if(s(n=i[a],a,o))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function rh(e,t,r,n,o,i,s,a){for(var u,c,p=o,l=0,f=!!s&&ky(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<i&&My(u)?(c=xy(u),p=rh(e,t,u,c,p,i-1)-1):(Py(p+1),e[p]=u),p++),l++;return p}function nh(c){return function(e,t,r,n){cv(t);var o=pv(e),i=lv(o),s=fv(o),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in i){n=i[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw dv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in i&&(n=t(n,i[a],a,o));return n}}function oh(e,t,r){for(var n=Mv(e),o=Cv(t,n),i=Cv(void 0===r?n:r,n),s=Pv(kv(i-o,0)),a=0;o<i;o++,a++)xv(s,a,e[o]);return s.length=a,s}function ih(e,t){var r=e.length,n=Dv(r/2);if(r<8){for(var o,i,s=e,a=t,u=s.length,c=1;c<u;){for(o=s[i=c];i&&0<a(s[i-1],o);)s[i]=s[--i];i!==c++&&(s[i]=o)}return s}for(var p=e,l=ih(Uv(e,0,n),t),f=ih(Uv(e,n),t),d=t,h=l.length,y=f.length,v=0,m=0;v<h||m<y;)p[v+m]=v<h&&m<y?d(l[v],f[m])<=0?l[v++]:f[m++]:v<h?l[v++]:f[m++];return p}function sh(e){Am(e,Cm,{value:{objectID:"O"+Mm++,weakData:{}}})}function ah(e,t,r){for(var n in t)Hm(e,n,t[n],r);return e}var uh,ch,ph,lh,fh,dh,hh,yh=h,vh=Dl,mh=(N({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=yh.f(this),e=vh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),di),gh=Ku,Eh=li,wh=is,Th=ei,_h=Fu,Ih=i,Ah=_,bh=ju,Oh=tp,Nh=O,Rh=Jd,Sh=Hu,Ch=Vu,Mh=Array,xh=(N({target:"Array",stat:!0,forced:!qf(function(e){Array.from(e)})},{from:function(e){var t=Ah(e),e=Oh(this),r=arguments.length,n=1<r?arguments[1]:void 0,o=void 0!==n;o&&(n=_h(n,2<r?arguments[2]:void 0));var i,s,a,u,c,p,r=Ch(t),l=0;if(!r||this===Mh&&bh(r))for(i=Nh(t),s=e?new this(i):Mh(i);l<i;l++)p=o?n(t[l],l):t[l],Rh(s,l,p);else for(c=(u=Sh(t,r)).next,s=e?new this:[];!(a=Ih(c,u)).done;l++)p=o?function(e,t,r,n){try{return n?t(mh(r)[0],r[1]):t(r)}catch(t){gh(e,"throw",t)}}(u,n,[a.value,l],!0):a.value,Rh(s,l,p);return s.length=l,s}}),ti),P=Array.isArray||function(e){return"Array"==xh(e)},Ph=(N({target:"Array",stat:!0},{isArray:P}),tp),kh=Jd,Uh=Array,Dh=(N({target:"Array",stat:!0,forced:g(function(){function e(){}return!(Uh.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(Ph(this)?this:Uh)(t);e<t;)kh(r,e,arguments[e++]);return r.length=t,r}}),_),Lh=O,Fh=Js,R=x,jh=(N({target:"Array",proto:!0},{at:function(e){var t=Dh(this),r=Lh(t),e=Fh(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),R("at"),TypeError),Vh=P,Hh=tp,Kh=oi,Gh=I("species"),Bh=Array,zh=g,Yh=Ci,qh=I("species"),bf=N,d=g,Jh=P,$h=oi,Xh=_,Wh=O,Zh=$d,Qh=Jd,ey=Xd,S=Wd,M=Ci,ty=I("isConcatSpreadable"),If=51<=M||!d(function(){var e=[];return e[ty]=!1,e.concat()[0]!==e}),A=S("concat"),ry=(bf({target:"Array",proto:!0,arity:1,forced:!If||!A},{concat:function(e){for(var t,r,n,o=Xh(this),i=ey(o,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!$h(e))return!1;var t=e[ty];return void 0!==t?!!t:Jh(e)}(n=-1===a?o:arguments[a]))for(r=Wh(n),Zh(s+r),t=0;t<r;t++,s++)t in n&&Qh(i,s,n[t]);else Zh(s+1),Qh(i,s++,n);return i.length=s,i}}),si),ny=TypeError,oy=_,iy=$s,sy=O,ay=Zd,uy=Math.min,C=x,cy=(N({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=oy(this),n=sy(r),o=iy(e,n),i=iy(t,n),e=2<arguments.length?arguments[2]:void 0,s=uy((void 0===e?n:iy(e,n))-i,n-o),a=1;for(i<o&&o<i+s&&(a=-1,i+=s-1,o+=s-1);0<s--;)i in r?r[o]=r[i]:ay(r,o),o+=a,i+=a;return r}}),C("copyWithin"),Fu),py=hi,ly=_,fy=O,dy=Xd,hy=e([].push),y={forEach:Qd(0),map:Qd(1),filter:Qd(2),some:Qd(3),every:Qd(4),find:Qd(5),findIndex:Qd(6),filterReject:Qd(7)},yy=g,vy=y.every,my=(N({target:"Array",proto:!0,forced:!eh("every")},{every:function(e){return vy(this,e,1<arguments.length?arguments[1]:void 0)}}),_),gy=$s,Ey=O,yp=x,wy=(N({target:"Array",proto:!0},{fill:function(e){for(var t=my(this),r=Ey(t),n=arguments.length,o=gy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,i=void 0===n?r:gy(n,r);o<i;)t[o++]=e;return t}}),yp("fill"),y.filter),as=(N({target:"Array",proto:!0,forced:!Wd("filter")},{filter:function(e){return wy(this,e,1<arguments.length?arguments[1]:void 0)}}),N),Ty=y.find,Yf=x,_y=!0,$l=("find"in[]&&Array(1).find(function(){_y=!1}),as({target:"Array",proto:!0,forced:_y},{find:function(e){return Ty(this,e,1<arguments.length?arguments[1]:void 0)}}),Yf("find"),N),Iy=y.findIndex,h=x,Ay=!0,by=("findIndex"in[]&&Array(1).findIndex(function(){Ay=!1}),$l({target:"Array",proto:!0,forced:Ay},{findIndex:function(e){return Iy(this,e,1<arguments.length?arguments[1]:void 0)}}),h("findIndex"),Fu),Oy=hi,Ny=_,Ry=O,R={findLast:th(0),findLastIndex:th(1)},Sy=R.findLast,M=x,Cy=(N({target:"Array",proto:!0},{findLast:function(e){return Sy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),R.findLastIndex),d=x,My=(N({target:"Array",proto:!0},{findLastIndex:function(e){return Cy(this,e,1<arguments.length?arguments[1]:void 0)}}),d("findLastIndex"),P),xy=O,Py=$d,ky=Fu,S=rh,Uy=S,Dy=_,Ly=O,Fy=Js,jy=Xd,Vy=(N({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Dy(this),r=Ly(t),n=jy(t,0);return n.length=Uy(n,t,t,r,0,void 0===e?1:Fy(e)),n}}),S),Hy=ai,Ky=_,Gy=O,By=Xd,zy=(N({target:"Array",proto:!0},{flatMap:function(e){var t,r=Ky(this),n=Gy(r);return Hy(e),(t=By(r,0)).length=Vy(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),y.forEach),bf=eh("forEach")?[].forEach:function(e){return zy(this,e,1<arguments.length?arguments[1]:void 0)},Yy=(N({target:"Array",proto:!0,forced:[].forEach!=bf},{forEach:bf}),ha.includes),If=x,A=(N({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(e){return Yy(this,e,1<arguments.length?arguments[1]:void 0)}}),If("includes"),N),qy=ha.indexOf,C=eh,Jy=e([].indexOf),$y=!!Jy&&1/Jy([1],1,-0)<0,yp=C("indexOf"),as=(A({target:"Array",proto:!0,forced:$y||!yp},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return $y?Jy(this,e,t)||0:qy(this,e,t)}}),N),Yf=hi,Xy=ni,$l=eh,Wy=e([].join),h=Yf!=Object,M=$l("join",","),Zy=(as({target:"Array",proto:!0,forced:h||!M},{join:function(e){return Wy(Xy(this),void 0===e?",":e)}}),Zc),Qy=ni,ev=Js,tv=O,R=eh,rv=Math.min,nv=[].lastIndexOf,ov=!!nv&&1/[1].lastIndexOf(1,-0)<0,d=R("lastIndexOf"),S=ov||!d?function(e){if(ov)return Zy(nv,this,arguments)||0;var t=Qy(this),r=tv(t),n=r-1;for((n=1<arguments.length?rv(n,ev(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:nv,iv=(N({target:"Array",proto:!0,forced:S!==[].lastIndexOf},{lastIndexOf:S}),y.map),bf=(N({target:"Array",proto:!0,forced:!Wd("map")},{map:function(e){return iv(this,e,1<arguments.length?arguments[1]:void 0)}}),N),sv=_,av=O,uv=$d,If=g(function(){return 4294967297!==[].push.call({length:4294967296},1)}),ha=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),cv=(bf({target:"Array",proto:!0,arity:1,forced:If||ha},{push:function(e){var t=sv(this),r=av(t),n=arguments.length;uv(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return t.length=r}}),ai),pv=_,lv=hi,fv=O,dv=TypeError,C={left:nh(!1),right:nh(!0)},hv=C.left,A=Ci,yp=Jc,yv=(N({target:"Array",proto:!0,forced:!eh("reduce")||!yp&&79<A&&A<83},{reduce:function(e){var t=arguments.length;return hv(this,e,t,1<t?arguments[1]:void 0)}}),C.right),Yf=Ci,$l=Jc,as=(N({target:"Array",proto:!0,forced:!eh("reduceRight")||!$l&&79<Yf&&Yf<83},{reduceRight:function(e){return yv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),N),vv=P,mv=e([].reverse),h=[1,2],M=(as({target:"Array",proto:!0,forced:String(h)===String(h.reverse())},{reverse:function(){return vv(this)&&(this.length=this.length),mv(this)}}),N),gv=P,Ev=tp,wv=oi,Tv=$s,_v=O,Iv=ni,Av=Jd,Zc=I,bv=b,R=Wd("slice"),Ov=Zc("species"),Nv=Array,Rv=Math.max,Sv=(M({target:"Array",proto:!0,forced:!R},{slice:function(e,t){var r,n,o,i=Iv(this),s=_v(i),a=Tv(e,s),u=Tv(void 0===t?s:t,s);if(gv(i)&&(r=i.constructor,(r=Ev(r)&&(r===Nv||gv(r.prototype))||wv(r)&&null===(r=r[Ov])?void 0:r)===Nv||void 0===r))return bv(i,a,u);for(n=new(void 0===r?Nv:r)(Rv(u-a,0)),o=0;a<u;a++,o++)a in i&&Av(n,o,i[a]);return n.length=o,n}}),y.some),Cv=(N({target:"Array",proto:!0,forced:!eh("some")},{some:function(e){return Sv(this,e,1<arguments.length?arguments[1]:void 0)}}),$s),Mv=O,xv=Jd,Pv=Array,kv=Math.max,Uv=oh,Dv=Math.floor,d=ih,S=Ri.match(/firefox\/(\d+)/i),bf=!!S&&+S[1],If=/MSIE|Trident/.test(Ri),ha=Ri.match(/AppleWebKit\/(\d+)\./),yp=!!ha&&+ha[1],A=N,C=e,Lv=ai,Fv=_,jv=O,Vv=Zd,Hv=zu,Jc=g,Kv=d,$l=eh,Gv=bf,Bv=If,zv=Ci,Yv=yp,qv=[],Jv=C(qv.sort),$v=C(qv.push),Yf=Jc(function(){qv.sort(void 0)}),as=Jc(function(){qv.sort(null)}),h=$l("sort"),Xv=!Jc(function(){if(zv)return zv<70;if(!(Gv&&3<Gv)){if(Bv)return!0;if(Yv)return Yv<603;for(var e,t,r,n="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)qv.push({k:e+r,v:t})}for(qv.sort(function(e,t){return t.v-e.v}),r=0;r<qv.length;r++)e=qv[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),b=(A({target:"Array",proto:!0,forced:Yf||!as||!h||!Xv},{sort:function(e){void 0!==e&&Lv(e);var t=Fv(this);if(Xv)return void 0===e?Jv(t):Jv(t,e);for(var r,n,o=[],i=jv(t),s=0;s<i;s++)s in t&&$v(o,t[s]);for(Kv(o,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Hv(e)>Hv(t)?1:-1})),r=o.length,s=0;s<r;)t[s]=o[s++];for(;s<i;)Vv(t,s++);return t}}),Kp("Array"),N),Wv=_,Zv=$s,Qv=Js,em=O,tm=$d,rm=Xd,nm=Jd,om=Zd,Zc=Wd("splice"),im=Math.max,sm=Math.min,M=(b({target:"Array",proto:!0,forced:!Zc},{splice:function(e,t){var r,n,o,i,s,a,u=Wv(this),c=em(u),p=Zv(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,sm(im(Qv(t),0),c-p)),tm(c+r-n),o=rm(u,n),i=0;i<n;i++)(s=p+i)in u&&nm(o,i,u[s]);if(r<(o.length=n)){for(i=p;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:om(u,a);for(i=c;c-n+r<i;i--)om(u,i-1)}else if(n<r)for(i=c-n;p<i;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:om(u,a);for(i=0;i<r;i++)u[i+p]=arguments[i+2];return u.length=c-n+r,o}}),x("flat"),x("flatMap"),N),am=_,um=O,cm=Zd,pm=$d,R=1!==[].unshift(0),S=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),Ri=(M({target:"Array",proto:!0,arity:1,forced:R||S},{unshift:function(e){var t=am(this),r=um(t),n=arguments.length;if(n){pm(r+n);for(var o=r;o--;){var i=o+n;o in t?t[i]=t[o]:cm(t,i)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),f.Array,{exports:{}}),ha={},lm=ti,fm=ni,dm=Mi.f,hm=oh,ym="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=(ha.f=function(e){if(!ym||"Window"!=lm(e))return dm(fm(e));var t=e;try{return dm(t)}catch(t){return hm(ym)}},g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),bf=g,vm=oi,mm=ti,gm=d,Em=Object.isExtensible,If=bf(function(){Em(1)})||gm?function(e){return!!vm(e)&&(!gm||"ArrayBuffer"!=mm(e))&&(!Em||Em(e))}:Em,Ci=!g(function(){return Object.isExtensible(Object.preventExtensions({}))}),wm=N,Tm=e,yp=ua,_m=oi,Im=ts,Am=is.f,bm=Mi,Om=ha,Nm=If,Rm=Ci,Sm=!1,Cm=pi("meta"),Mm=0,xm=Ri.exports={enable:function(){xm.enable=function(){},Sm=!0;var o=bm.f,i=Tm([].splice),e={};e[Cm]=1,o(e).length&&(bm.f=function(e){for(var t=o(e),r=0,n=t.length;r<n;r++)if(t[r]===Cm){i(t,r,1);break}return t},wm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Om.f}))},fastKey:function(e,t){if(!_m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Im(e,Cm)){if(!Nm(e))return"F";if(!t)return"E";sh(e)}return e[Cm].objectID},getWeakData:function(e,t){if(!Im(e,Cm)){if(!Nm(e))return!0;if(!t)return!1;sh(e)}return e[Cm].weakData},onFreeze:function(e){return Rm&&Sm&&Nm(e)&&!Im(e,Cm)&&sh(e),e}},Pm=(yp[Cm]=!0,T),km=oi,Um=Ru,C=N,$l=v,Dm=e,Jc=va,Lm=qs,A=Ri.exports,Fm=Bu,jm=Gp,Yf=T,Vm=oi,as=g,h=qf,b=fp,Hm=qs,Km=is.f,Gm=Su,Bm=ah,zm=Fu,Ym=Gp,qm=Bu,Jm=hp,$m=Kp,Xm=r,Wm=Ri.exports.fastKey,Zm=Si.set,Qm=Si.getterFor;function eg(e){var r=Dm(dh[e]);Lm(dh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(ph&&!Vm(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return ph&&!Vm(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(ph&&!Vm(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}Zc=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},M={getConstructor:function(e,r,n,o){function i(e,t,r){var n,o=u(e),i=s(e,t);return i?i.value=r:(o.last=i={index:n=Wm(t,!0),key:t,value:r,previous:t=o.last,next:void 0,removed:!1},o.first||(o.first=i),t&&(t.next=i),Xm?o.size++:e.size++,"F"!==n&&(o.index[n]=i)),e}function s(e,t){var r,e=u(e),n=Wm(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){Ym(e,a),Zm(e,{type:r,index:Gm(null),first:void 0,last:void 0,size:0}),Xm||(e.size=0),null!=t&&qm(t,e[o],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=Qm(r);return Bm(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,Xm?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),Xm?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=zm(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)}}),Bm(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return i(this,0===e?0:e,t)}}:{add:function(e){return i(this,e=0===e?0:e,e)}}),Xm&&Km(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",o=Qm(t),i=Qm(n);Jm(e,t,function(e,t){Zm(this,{type:n,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),$m(t)}},ch=-1!==(R="Map").indexOf("Map"),ph=-1!==R.indexOf("Weak"),lh=ch?"set":"add",fh=$l.Map,dh=fh&&fh.prototype,S={},Jc(R,!Yf(hh=fh)||!(ph||dh.forEach&&!as(function(){(new fh).entries().next()})))?(hh=M.getConstructor(Zc,R,ch,lh),A.enable()):Jc(R,!0)&&(f=(uh=new hh)[lh](ph?{}:-0,1)!=uh,d=as(function(){uh.has(1)}),bf=h(function(e){new fh(e)}),ua=!ph&&as(function(){for(var e=new fh,t=5;t--;)e[lh](t,t);return!e.has(-0)}),bf||(((hh=Zc(function(e,t){jm(e,dh);r=new fh,e=e,n=hh,Um&&Pm(e=e.constructor)&&e!==n&&km(e=e.prototype)&&e!==n.prototype&&Um(r,e);var r,n=r;return null!=t&&Fm(t,n[lh],{that:n,AS_ENTRIES:ch}),n})).prototype=dh).constructor=hh),(d||ua)&&(eg("delete"),eg("has"),ch&&eg("get")),(ua||f)&&eg(lh),ph&&dh.clear&&delete dh.clear),S.Map=hh,C({global:!0,constructor:!0,forced:hh!=fh},S),b(hh,R),ph||M.setStrong(hh,R,ch);function tg(e,t){for(var r=0,n=ig(t),o=new e(n);r<n;)o[r]=t[r++];return o}function rg(e,t,r,n){for(var o,i,s,a=ug(e),u=ag(a),c=sg(t,r),p=lg(null),l=pg(u),f=0;f<l;f++)s=u[f],(i=cg(c(s,f,a)))in p?hg(p[i],s):p[i]=[s];if(n&&(o=n(a))!==dg)for(i in p)p[i]=fg(o,p[i]);return p}function ng(e){for(var t,r,n=Eg(this),o=gg(n),i=mg(e,1<arguments.length?arguments[1]:void 0),s=new Tg,a=wg(o),u=0;u<a;u++)t=i(r=o[u],u,n),Ig(s,t)?bg(_g(s,t),r):Ag(s,t,[r]);return s}function og(e){return Sg[e].prototype}var ig=O,sg=Fu,ag=hi,ug=_,cg=li,pg=O,lg=Su,fg=tg,dg=Array,hg=e([].push),yg=rg,ts=x,vg=(N({target:"Array",proto:!0},{group:function(e){return yg(this,e,1<arguments.length?arguments[1]:void 0)}}),ts("group"),rg),Mi=x,mg=(N({target:"Array",proto:!0,forced:!eh("groupBy")},{groupBy:function(e){return vg(this,e,1<arguments.length?arguments[1]:void 0)}}),Mi("groupBy"),Fu),ha=e,gg=hi,Eg=_,wg=O,Tg=ii("Map"),If=Tg.prototype,_g=ha(If.get),Ig=ha(If.has),Ag=ha(If.set),bg=ha([].push),Ci=x,yp=ng,Ru=(N({target:"Array",proto:!0,name:"groupToMap",forced:!eh("groupByToMap")},{groupByToMap:yp}),Ci("groupByToMap"),x),Og=(N({target:"Array",proto:!0},{groupToMap:ng}),Ru("groupToMap"),O),Ng=ni,va=x,Rg=Array,Sg=(N({target:"Array",proto:!0},{toReversed:function(){for(var e=Ng(this),t=Rg,r=Og(e),n=new t(r),o=0;o<r;o++)n[o]=e[r-o-1];return n}}),va("toReversed"),v),Ri=N,Cg=ai,Mg=ni,xg=tg,$l=x,Pg=Array,kg=e(og("Array").sort),Jc=(Ri({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&Cg(e);var t=Mg(this),t=xg(Pg,t);return kg(t,e)}}),$l("toSorted"),N),h=x,Ug=$d,Dg=O,Lg=$s,Fg=ni,jg=Js,Vg=Array,Hg=Math.max,Kg=Math.min,Gg=(Jc({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,o,i,s=Fg(this),a=Dg(s),u=Lg(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,Kg(Hg(jg(t),0),a-u)),o=Ug(a+r-n),i=Vg(o);c<u;c++)i[c]=s[c];for(;c<u+r;c++)i[c]=arguments[c-u+2];for(;c<o;c++)i[c]=s[c+n-r];return i}}),h("toSpliced"),O),Bg=Js,zg=RangeError,Yg=ni,qg=Array;N({target:"Array",proto:!0},{with:function(e,t){var r=Yg(this),n=qg,o=t,i=Gg(r),s=(e=Bg(e))<0?i+e:e;if(i<=s||s<0)throw zg("Incorrect index");for(var a=new n(i),u=0;u<i;u++)a[u]=u===s?o:r[u];return a}});as=v,bf=$i,Zc=T,d=Bs,ua=qs,f=I("asyncIterator"),C=as.AsyncIterator,S=bf.AsyncIteratorPrototype;if(S)UE=S;else if(Zc(C))UE=C.prototype;else if(bf.USE_FUNCTION_CONSTRUCTOR||as.USE_FUNCTION_CONSTRUCTOR)try{NE=d(d(d(Function("return async function*(){}()")()))),d(NE)===Object.prototype&&(UE=NE)}catch(kA){}Zc((UE=UE||{})[f])||ua(UE,f,function(){return this});function Jg(e,t,r){var n=e.done;n0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function $g(e){o0(this,{type:"AsyncFromSyncIterator",iterator:t0(e),next:e.next})}function Xg(e,t,r,n){try{var o=v0(e,"return");if(o)return y0("Promise").resolve(h0(o,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function Wg(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:f0(d0(e).next)},u=T0("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||g0(s),new u(function(r,n){var o=function(e){Xg(c,n,e,n)},i=function(){try{if(f&&l)try{w0(p)}catch(e){o(e)}u.resolve(E0(m0(t,c))).then(function(e){try{if(E0(e).done)f?(a.length=p,r(a)):r(!y&&(h||void 0));else{var t=e.value;try{l?u.resolve(f?s(t,p):s(t)).then(function(e){if(d)i();else if(h)e?i():Xg(c,r,!1,n);else if(f)try{a[p++]=e,i()}catch(e){o(e)}else e?Xg(c,r,y||t,n):i()},o):(a[p++]=t,i())}catch(e){o(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};i()})}}function Zg(e,t){if(!D0||!U0(e)||!D0(e))return!1;for(var r,n=0,o=e.length;n<o;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==o}function Qg(e,t,r){r.get&&L0(r.get,t,{getter:!0}),r.set&&L0(r.set,t,{setter:!0}),F0.f(e,t,r)}var e0=i,t0=di,b=Su,r0=ui,M=ah,R=Si,ts=UE,n0=ii("Promise"),o0=R.set,i0=R.getterFor("AsyncFromSyncIterator"),Mi=($g.prototype=M(b(ts),{next:function(){var n=i0(this);return new n0(function(e,t){var r=t0(e0(n.next,n.iterator));Jg(r,e,t)})},return:function(){var n=i0(this).iterator;return new n0(function(e,t){var r=r0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=t0(e0(r,n));Jg(r,e,t)})}}),$g),s0=i,a0=Mi,u0=di,c0=Hu,p0=ui,l0=I("asyncIterator"),f0=ai,d0=di,h0=i,y0=ii,v0=ui,m0=i,g0=ai,E0=di,w0=$d,T0=ii,hi={toArray:Wg(0),forEach:Wg(1),every:Wg(2),some:Wg(3),find:Wg(4)},_0=Fu,I0=_,A0=tp,b0=Hu,O0=Vu,N0=ui,If=og,R0=ii,S0=Mi,C0=hi.toArray,M0=I("asyncIterator"),x0=If("Array").values,P0=(N({target:"Array",stat:!0,forced:!0},{fromAsync:function(i){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(R0("Promise"))(function(e){var t=I0(i),r=(void 0!==a&&(a=_0(a,u)),N0(t,M0)),n=r?void 0:O0(t)||x0,o=A0(s)?new s:[],r=r?function(e,t){t=arguments.length<2?p0(e,l0):t;return t?u0(s0(t,e)):new a0(c0(e))}(t,r):new S0(b0(t,n));e(C0(r,a,o))})}}),y.filterReject),ha=x,k0=(N({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return P0(this,e,1<arguments.length?arguments[1]:void 0)}}),ha("filterOut"),y.filterReject),yp=x,Ci=(N({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return k0(this,e,1<arguments.length?arguments[1]:void 0)}}),yp("filterReject"),N),U0=P,D0=Object.isFrozen,L0=(Ci({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Zg(e,!0))return!1;var t=e.raw;return t.length===e.length&&Zg(t,!1)}}),Li.exports),F0=is,Ru=x,j0=_,V0=O,va=(r&&(Qg(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=j0(this),t=V0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=j0(this),r=V0(t);return t[0==r?0:r-1]=e}}),Ru("lastItem")),x),H0=_,K0=O,Ri=(r&&(Qg(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=H0(this),e=K0(e);return 0==e?0:e-1}}),va("lastIndex")),e),G0=ai,B0=O,z0=_,Y0=Xd,q0=ii("Map"),$l=q0.prototype,J0=Ri($l.forEach),$0=Ri($l.has),X0=Ri($l.set),W0=Ri([].push),Jc=x;N({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=z0(this),o=B0(n),i=Y0(n,0),s=new q0,a=null!=e?G0(e):function(e){return e},u=0;u<o;u++)r=a(t=n[u]),$0(s,r)||X0(s,r,t);return J0(s,function(e){W0(i,e)}),i}}),Jc("uniqueBy");a_.prototype.start=function(){this.timeoutId=setTimeout(this.callback,this.timeout)},a_.prototype.refresh=function(){this.stop(),this.start()},a_.prototype.stop=function(){this.timeoutId&&clearTimeout(this.timeoutId)};var Z0,Q0,eE,tE,rE,nE,oE,iE,sE,aE=a_,uE=(s_.prototype.start=function(){this.started=!0},s_.prototype.stop=function(){this.started=!1;var e=this.sink(this.buffer,!0);return this.buffer=[],this.timer.stop(),e},s_.prototype.enqueue=function(e){this.started&&(0===this.buffer.length&&this.timer.refresh(),this.buffer.push(e),this.buffer.length>=this.maxQueueSize&&this.flush())},s_.prototype.flush=function(){this.sink(this.buffer),this.buffer=[],this.timer.stop()},s_.prototype.close=function(){this.stop()},s_),h=(i_.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},i_.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},i_.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},ce(o_,sE=i_),ce(n_,iE=o_),n_.prototype.isClientError=function(e){return!!(e&&400<=e.statusCode&&e.statusCode<500)},n_.prototype.drainRepository=function(i){var e=this;return new Promise(function(o){return pe(e,void 0,void 0,function(){var t,r,n=this;return le(this,function(e){switch(e.label){case 0:return[4,null==(r=this.repository)?void 0:r.read()];case 1:return(t=e.sent())&&0!==t.length?i?this.eventDispatcher.dispatchXhrOrBeacon(t,function(){var e;o(null==(e=n.repository)?void 0:e.delete(t))},function(e){n.isClientError(e)?o(null==(e=n.repository)?void 0:e.delete(t)):o()}):this.eventDispatcher.dispatch(t,function(){var e;o(null==(e=n.repository)?void 0:e.delete(t))},function(e){n.isClientError(e)?o(null==(e=n.repository)?void 0:e.delete(t)):o()}):o(),[2]}})})})},n_.prototype.drainQueue=function(o,i){var e=this,s=o.map(function(e){return e.toDto()});return new Promise(function(n){return pe(e,void 0,void 0,function(){var t,r=this;return le(this,function(e){return 0===o.length?n():i?(null!=(t=this.repository)&&t.add(s),this.eventDispatcher.dispatchXhrOrBeacon(o,function(){var e;n(null==(e=r.repository)?void 0:e.delete(s))},function(e){r.isClientError(e)?n(null==(e=r.repository)?void 0:e.delete(s)):n()})):this.eventDispatcher.dispatch(o,function(){n()},function(e){r.isClientError(e)?n():n(null==(e=r.repository)?void 0:e.add(s))}),[2]})})})},n_.prototype.process=function(e){this.queue.enqueue(e),this.emit("event",e)},n_.prototype.start=function(){return pe(this,void 0,void 0,function(){return le(this,function(e){return this.queue.start(),[2]})})},n_.prototype.stop=function(){try{this.queue.close()}catch(e){}return Promise.resolve()},n_.prototype.flush=function(){this.queue.flush()},n_.prototype.close=function(){this.stop()},n_),cE=(r_.isSessionEvent=function(e){return!!so.isTrack(e)&&(e.event.key===r_.SESSION_START_EVENT_NAME||e.event.key===r_.SESSION_END_EVENT_NAME)},r_.prototype.onSessionStarted=function(e,t,r){this.track(r_.SESSION_START_EVENT_NAME,e,t,r)},r_.prototype.onSessionEnded=function(e,t,r){this.track(r_.SESSION_END_EVENT_NAME,e,t,r)},r_.prototype.track=function(e,t,r,n){e={key:e,properties:{sessionId:t}},r=this.hackleUserResolver.resolve(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},r_.prototype.decorateSession=function(e,t){t=(new $e).add(Je.SESSION,t).addIdentifiers(e.identifiers).build();return E(E({},e),{identifiers:t})},r_.SESSION_START_EVENT_NAME="$session_start",r_.SESSION_END_EVENT_NAME="$session_end",r_),pE=(ce(t_,oE=h),t_.prototype.process=function(e){var t;cE.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[Je.SESSION]?e:e.copyWithUser(E(E({},e.user),{identifiers:E(E({},e.user.identifiers),((e={})[Je.SESSION]=t.sessionId,e))})),oE.prototype.process.call(this,t))},t_),lE=(e_.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!so.isExposure(e))return!1;be.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)},e_),fE=(QT.toEvent=function(e){var t;return{key:QT.EVENT_KEY,properties:{level:QT.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:QT._stacktrace(e)}}},QT._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,QT.STACK_TRACK_LIMIT).join("\n")},QT.EVENT_KEY="$trace",QT.LEVEL_ERROR="error",QT.STACK_TRACK_LIMIT=30,QT),v=(ZT.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)}},ZT),dE=(WT.prototype.with=function(e){return new WT(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},WT.of=function(e,t,r,n){var o=this.config(e.workspace,r);return new WT(n,t.targetEvaluations,e.experiment,r.id,r.key,o)},WT.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new WT(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},WT.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},WT),hE=(ce(XT,nE=v),XT.prototype.supports=function(e){return void 0!==e.experiment},XT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:dE.ofDefault(e,t,s.TRAFFIC_NOT_ALLOCATED)},XT),yE=($T.of=function(e,t,r,n,o,i){return i.returnValue=n,new $T(o,t.targetEvaluations,e.parameter,r,n,i)},$T.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},$T),vE=(ce(JT,rE=v),JT.prototype.supports=function(e){return void 0!==e.parameter},JT.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=e.defaultValue,a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return yE.ofDefault(e,t,s.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,s.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,s.DEFAULT_RULE,r)},JT.prototype.evaluation=function(e,t,r,n,o){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?yE.ofDefault(e,t,s.TYPE_MISMATCH,o):yE.of(e,t,r.id,r.rawValue,n,o)},JT),mE=(qT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},qT),gE=(YT.create=function(){return new YT},Object.defineProperty(YT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(YT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),YT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},YT.prototype.addRequest=function(e){this._stack.push(e)},YT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},YT.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof dE&&e.experiment.id===t.id})},YT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},YT),EE=(zT.of=function(e,t,r,n){return new zT(e,t,r,n)},zT.by=function(e,t){return new zT(e.workspace,e.user,t,"A")},zT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},zT),wE=(BT.of=function(e,t,r,n,o){return new BT(e,t,r,n,o)},BT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},BT),TE=(GT.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},GT.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},GT.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},GT),_E=(KT.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var o=n[r].getVariation(e,t);if(void 0!==o)return o}},KT),IE=(HT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},HT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return TE.asNumber(e)},HT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=TE.asNumber(t),e=TE.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},HT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},HT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},HT.prototype.clear=function(){this.listStorage.clear()},HT),AE=(VT.prototype.add=function(e){this.evaluators.push(e)},VT.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)},VT),bE=(jT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},jT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},jT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},jT),OE=(FT.prototype.matches=function(e,t){var r=this.valueMatcherFactory.getMatcher(t.valueType),n=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,r,n);return this.typeMatches(t.type,e)},FT.prototype.userValueMatches=function(e,t,r,n){return Array.isArray(e)?this.arrayMatches(e,t,r,n):this.singleMatches(e,t,r,n)},FT.prototype.singleMatches=function(t,e,r,n){return e.values.some(function(e){return r.matches(n,t,e)})},FT.prototype.arrayMatches=function(e,t,r,n){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n)})},FT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},FT),$i=(LT.prototype.booleanMatches=function(e,t){return e===t},LT.prototype.numberMatches=function(e,t){return e===t},LT.prototype.stringMatches=function(e,t){return e===t},LT.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},LT),Bs=(DT.prototype.booleanMatches=function(e,t){return!1},DT.prototype.numberMatches=function(e,t){return!1},DT.prototype.stringMatches=function(e,t){return e.includes(t)},DT.prototype.versionMatches=function(e,t){return!1},DT),S=(UT.prototype.booleanMatches=function(e,t){return!1},UT.prototype.numberMatches=function(e,t){return!1},UT.prototype.stringMatches=function(e,t){return e.startsWith(t)},UT.prototype.versionMatches=function(e,t){return!1},UT),C=(kT.prototype.booleanMatches=function(e,t){return!1},kT.prototype.numberMatches=function(e,t){return!1},kT.prototype.stringMatches=function(e,t){return e.endsWith(t)},kT.prototype.versionMatches=function(e,t){return!1},kT),bf=(PT.prototype.booleanMatches=function(e,t){return!1},PT.prototype.numberMatches=function(e,t){return t<e},PT.prototype.stringMatches=function(e,t){return t<e},PT.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},PT),as=(xT.prototype.booleanMatches=function(e,t){return!1},xT.prototype.numberMatches=function(e,t){return t<=e},xT.prototype.stringMatches=function(e,t){return t<=e},xT.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},xT),d=(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),NE=(CT.prototype.booleanMatches=function(e,t){return!1},CT.prototype.numberMatches=function(e,t){return e<=t},CT.prototype.stringMatches=function(e,t){return e<=t},CT.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},CT),RE=(ST.prototype.getMatcher=function(e){switch(e){case"IN":return ST.IN_MATCHER;case"CONTAINS":return ST.CONTAINS_MATCHER;case"STARTS_WITH":return ST.STARTS_WITH_MATCHER;case"ENDS_WITH":return ST.ENDS_WITH_MATCHER;case"GT":return ST.GT_MATCHER;case"GTE":return ST.GTE_MATCHER;case"LT":return ST.LT_MATCHER;case"LTE":return ST.LTE_MATCHER}},ST.IN_MATCHER=new $i,ST.CONTAINS_MATCHER=new Bs,ST.STARTS_WITH_MATCHER=new S,ST.ENDS_WITH_MATCHER=new C,ST.GT_MATCHER=new bf,ST.GTE_MATCHER=new as,ST.LT_MATCHER=new d,ST.LTE_MATCHER=new NE,ST),Zc=(RT.prototype.matches=function(e,t,r){t=TE.asString(t),r=TE.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},RT),ua=(NT.prototype.matches=function(e,t,r){t=TE.asNumber(t),r=TE.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},NT),f=(OT.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},OT),Su=(bT.prototype.matches=function(e,t,r){t=kt.tryParse(t),r=kt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},bT),Si=(AT.prototype.matches=function(e,t,r){return!1},AT),SE=(IT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return IT.STRING_MATCHER;case"NUMBER":return IT.NUMBER_MATCHER;case"BOOLEAN":return IT.BOOLEAN_MATCHER;case"VERSION":return IT.VERSION_MATCHER;case"NULL":case"UNKNOWN":return IT.NULL_MATCHER}},IT.STRING_MATCHER=new Zc,IT.NUMBER_MATCHER=new ua,IT.BOOLEAN_MATCHER=new f,IT.VERSION_MATCHER=new Su,IT.NULL_MATCHER=new Si,IT),CE=(_T.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},_T),ME=(TT.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":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},TT),xE=(wT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var o=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return o;case"NOT_MATCH":return!o}},wT.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,"]"))},wT),PE=(ET.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},ET.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},ET),kE=(gT.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":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},gT),UE=(mT.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(TE.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var o=null!=(o=t.get(n))?o:this.evaluate(e,t,n);return this.evaluationMatches(o,r)},mT.prototype.evaluate=function(e,t,r){r=EE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},mT),DE=(ce(vT,tE=UE),vT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},vT.prototype.resolve=function(e,t){return e instanceof EE&&t.reason===s.TRAFFIC_ALLOCATED?t.with(s.TRAFFIC_ALLOCATED_BY_TARGETING):t},vT.prototype.evaluationMatches=function(e,t){return!!vT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},vT.AB_TEST_MATCHED_REASONS=[s.OVERRIDDEN,s.TRAFFIC_ALLOCATED,s.EXPERIMENT_COMPLETED,s.TRAFFIC_ALLOCATED_BY_TARGETING],vT),LE=(ce(yT,eE=UE),yT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},yT.prototype.resolve=function(e,t){return t},yT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},yT),FE=(hT.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)},hT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},hT),jE=(dT.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":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},dT.prototype.properties=function(e){return so.isTrack(e)?e.event.properties:so.isExposure(e)||so.isRemoteConfig(e)?e.properties:void 0},dT),VE=(fT.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}},fT),HE=(lT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},lT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},lT.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)}},lT),KE={murmurhash3_x86_32:function(e,t,r,n){for(var o,i=-4&(n=void 0===n?e.length:n),s=t,a=0;a<i;a+=4)o=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s=5*((524287&(s^=o=this.mul32(o,461845907)))<<13|s>>>19)+3864292196|0;switch(o=0,n%4){case 3:o=(255&e.charCodeAt(2+i))<<16;case 2:o|=(255&e.charCodeAt(1+i))<<8;case 1:o|=255&e.charCodeAt(i),o=(131071&(o=this.mul32(o,3432918353)))<<15|o>>>17,s^=o=this.mul32(o,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),(s=this.mul32(s^=s>>>13,3266489909))^s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},GE=(pT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},pT.prototype.calculateSlotNumber=function(e,t,r){r=KE.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},pT),BE=(cT.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},cT.end=function(){return new cT(void 0,void 0)},cT.decision=function(e,t){return new cT(e,t)},cT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,o=e.reverse();n<o.length;n++)var i=o[n],r=this.decision(i,r);return r},cT),zE=(uT.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 dE.of(e,t,n,s.OVERRIDDEN);case"FEATURE_FLAG":return dE.of(e,t,n,s.INDIVIDUAL_TARGET_MATCH)}},uT),YE=(aT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?dE.ofDefault(e,t,s.EXPERIMENT_DRAFT):r.evaluate(e,t)},aT),qE=(sT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return dE.ofDefault(e,t,s.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return dE.ofDefault(e,t,s.FEATURE_FLAG_INACTIVE)}},sT),JE=(iT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return dE.of(e,t,r,s.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},iT),$E=(oT.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):dE.ofDefault(e,t,s.NOT_IN_EXPERIMENT_TARGET)},oT),XE=(nT.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?dE.ofDefault(e,t,s.VARIATION_DROPPED):dE.of(e,t,n,s.TRAFFIC_ALLOCATED):dE.ofDefault(e,t,s.TRAFFIC_NOT_ALLOCATED)},nT),WE=(rT.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 dE.of(e,t,r,s.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},rT),ZE=(tT.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 dE.ofDefault(e,t,s.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return dE.of(e,t,n,s.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},tT),QE=(eT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var o=e.workspace.getContainerOrNull(n);if(o)return this.containerResolver.isUserInContainerGroup(e,t,o)?r.evaluate(e,t):dE.ofDefault(e,t,s.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},eT),ew=(Qw.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):dE.ofDefault(e,t,s.IDENTIFIER_NOT_FOUND)},Qw),tw=(Zw.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)})},Zw),rw=(Ww.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},Ww),nw=(Xw.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},Xw.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},Xw.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)}},Xw.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)},Xw),ow=($w.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var o=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(o))throw new Error("Bucket[".concat(r.bucketId,"]"));o=this.bucketer.bucketing(o,n);if(a.isNullOrUndefined(o))return!1;n=r.getGroupOrNull(o.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(o.variationId,"]"));return n.experiments.includes(e.experiment.id)},$w),iw=(Jw.of=function(e,t,r,n){return new Jw(r,t.targetEvaluations,e.inAppMessage,n)},Jw),sw=(qw.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):iw.of(e,t,s.UNSUPPORTED_PLATFORM)},qw),aw=(Yw.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),iw.of(e,t,s.OVERRIDDEN,n)):r.evaluate(e,t)},Yw),uw=(zw.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?iw.of(e,t,s.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},zw),cw=(Bw.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?iw.of(e,t,s.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},Bw),pw=(Gw.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_PERIOD)},Gw),lw=(Kw.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?iw.of(e,t,s.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},Kw),fw=(Hw.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),iw.of(e,t,s.IN_APP_MESSAGE_TARGET,n)):iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_TARGET)},Hw),dw=(Vw.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},Vw),hw=(jw.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},jw.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},jw),yw=(Fw.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)})},Fw),vw=(Lw.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},Lw),mw=(Dw.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},Dw.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))},Dw),gw=(Uw.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Uw.getOrNull=function(e){return Uw.instances.get(e)},Uw.register=function(e,t){return Uw.instances.set(e,t),t},Uw.instances=new Map,Uw),Ew=(kw.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},kw.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},kw),ww=(Pw.prototype.create=function(r,e){var n=this,o=this.clock.currentMillis(),i=new Array,t=this.createEvent(r,e,o,{});return i.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[Pw.ROOT_TYPE]=r.key.type,t[Pw.ROOT_ID]=r.key.id;e=n.createEvent(r,e,o,t);i.push(e)}),i},Pw.prototype.createEvent=function(e,t,r,n){var o;if(t instanceof dE)return n[Pw.CONFIG_ID_PROPERTY_KEY]=null==(o=t.config)?void 0:o.id,n[Pw.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[Pw.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,so.exposure(e.user,t,n,r);if(t instanceof yE)return so.remoteConfig(e.user,t,E(E({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},Pw.ROOT_TYPE="$targetingRootType",Pw.ROOT_ID="$targetingRootId",Pw.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",Pw.EXPERIMENT_VERSION_KEY="$experiment_version",Pw.EXECUTION_VERSION_KEY="$execution_version",Pw),Tw=(ce(xw,Q0=v),xw.prototype.supports=function(e){return void 0!==e.inAppMessage},xw.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:iw.of(e,t,s.NOT_IN_IN_APP_MESSAGE_TARGET)},xw),_w=(Mw.of=function(e,t,r,n){return new Mw(e,t,r,n)},Mw.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},Mw),Iw=w.log,Aw=(Cw.create=function(e,t,r,n){var o=new AE,r=new _E(r),r=new Ew(o,r,n),n=new hE(r),i=new vE(r.remoteConfigParameterTargetRuleDeterminer),r=new Tw(r);return o.add(n),o.add(i),new Cw(n,i,r,e,new ww(Ce.instance),t,new bw,Ce.instance)},Cw.prototype.experiment=function(e,t,r){var n=this;if(!e)return Iw.error("experimentKey must not be empty"),Ve.of(r,s.INVALID_INPUT);var o=this.workspaceFetcher.get();if(!o)return Iw.warn("SDK not ready."),Ve.of(r,s.SDK_NOT_READY);e=o.getExperimentOrNull(e);if(!e)return Iw.warn("Experiment does not exist."),Ve.of(r,s.EXPERIMENT_NOT_FOUND);o=EE.of(o,t,e,r),t=this.experimentInternal(o),e=t[0],r=t[1];return this.eventFactory.create(o,e).forEach(function(e){return n.eventProcessor.process(e)}),r},Cw.prototype.experiments=function(r){var n=this,o=new Zr(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getExperiments().forEach(function(e){var t=EE.of(i,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},Cw.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,gE.create()),t=null!=(t=e.config)?t:new Ke;return[e,Ve.of(e.variationKey,e.reason,t)]},Cw.prototype.featureFlag=function(e,t){var r=this;if(!e)return Iw.error("featureKey must not be empty"),He.off(s.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return Iw.warn("SDK not ready."),He.off(s.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return Iw.warn("FeatureFlag does not exist."),He.off(s.FEATURE_FLAG_NOT_FOUND);n=EE.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},Cw.prototype.featureFlags=function(r){var n=this,o=new Zr(function(e,t){return e.id===t.id}),i=this.workspaceFetcher.get();return i&&i.getFeatureFlags().forEach(function(e){var t=EE.of(i,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);o.add(e,t)}),o},Cw.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,gE.create()),t=null!=(t=e.config)?t:new Ke;return[e,"A"===e.variationKey?He.off(e.reason,t):He.on(e.reason,t)]},Cw.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return Iw.warn("SDK not ready."),je.of(s.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return Iw.warn("In app message does not exist."),je.of(s.IN_APP_MESSAGE_NOT_FOUND);r=_w.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,gE.create());return je.of(t.reason,t.inAppMessage,t.message)},Cw.prototype.tryInAppMessage=function(e,t){var r,n=wr.start();try{r=this.inAppMessage(e,t)}catch(t){Iw.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=je.of(s.EXCEPTION)}return Tn.inAppMessage(n,e,r),r},Cw.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 qe(0,e.key),this.eventProcessor.process(so.track(n,e,t,r))):Iw.warn("Event key must be not null. or event key must be string type."):Iw.warn("Event must be event type."):Iw.warn("event must not be null.")},Cw.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=fE.toEvent(e),this.flush(),this.track(e,t),this.flush())},Cw.prototype.flush=function(){this.eventProcessor.flush()},Cw.prototype.remoteConfig=function(e,t,r,n){var o=this,i=this.workspaceFetcher.get();if(a.isNullOrUndefined(i))return Iw.warn("SDK not ready."),Fe.of(n,s.SDK_NOT_READY);e=i.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return Iw.warn("Remote config parameter does not exist."),Fe.of(n,s.REMOTE_CONFIG_PARAMETER_NOT_FOUND);i=wE.of(i,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(i,gE.create());return this.eventFactory.create(i,t).forEach(function(e){return o.eventProcessor.process(e)}),Fe.of(t.value,t.reason)},Cw.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).then(function(){return e()})},Cw.prototype.onInitialized=function(e){var t,e=e.timeout,e=void 0===e?3e3:e,r=(Iw.debug("Start HackleClient initializing"),new Promise(function(e){t=e})),n=setTimeout(function(){t({success:!1})},e);return this.readyPromise.then(function(){clearTimeout(n),t({success:!0})},function(e){clearTimeout(n),t({success:!1,error:e})}),Promise.race([this.readyPromise,r]).then(function(e){return e.success?Iw.debug("HackleClient onInitialized Success"):e.error instanceof Error?Iw.error("HackleClient onInitialized Failed. ".concat(e.error.message)):Iw.error("HackleClient onInitialized Failed. ".concat(e.error)),Promise.resolve({success:e.success})})},Cw.prototype.close=function(){this.workspaceFetcher.close(),this.eventProcessor.close()},Cw),bw=(Sw.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},Sw.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},Sw),Ow=(Rw.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},Rw.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},Rw),Nw=null;function Rw(){this._installed=[],this._installations={onerror:u_,onunhandledrejection:c_}}function Sw(){}function Cw(e,t,r,n,o,i,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=o,this.eventProcessor=i,this.errorDedupDeterminer=s,this.clock=a,this.workspaceFetcher.start(),this.eventProcessor.start(),this.readyPromise=this.workspaceFetcher.onReady().then(function(){return{success:!0}},function(e){return{success:!1,error:e}})}function Mw(e,t,r,n){this.key=new mE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function xw(e){var t=Q0.call(this)||this;return t.evaluationFlowFactory=e,t}function Pw(e){this.clock=e}function kw(e,t,r){var n=new GE,e=gw.register("targetMatcher",new bE(new VE(e))),o=new HE(n),t=new nw(t,e,o),i=new ow(n),i=(this.abTestFlow=BE.of(new zE(t),new ew,new QE(i),new $E(new tw(e)),new YE,new qE,new JE,new XE(o)),this.featureFlagFlow=BE.of(new YE,new qE,new JE,new zE(t),new ew,new WE(new rw(e),o),new ZE(o)),new dw);this.inAppMessageFlow=BE.of(new sw,new aw(new hw,i),new uw,new cw,new pw,new lw(new vw(r)),new fw(new yw(e),i)),this.remoteConfigParameterTargetRuleDeterminer=new mw(e,n)}function Uw(){}function Dw(e,t){this.targetMatcher=e,this.bucketer=t}function Lw(e){this.storage=e}function Fw(e){this.targetMatcher=e}function jw(){}function Vw(){}function Hw(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function Kw(e){this.hiddenMatcher=e}function Gw(){}function Bw(){}function zw(){}function Yw(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function qw(){}function Jw(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function $w(e){this.bucketer=e}function Xw(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function Ww(e){this.targetMatcher=e}function Zw(e){this.targetMatcher=e}function Qw(){}function eT(e){this.containerResolver=e}function tT(e){this.actionResolver=e}function rT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function nT(e){this.actionResolver=e}function oT(e){this.experimentTargetDeterminer=e}function iT(){}function sT(){}function aT(){}function uT(e){this.overrideResolver=e}function cT(e,t){this.flowEvaluator=e,this.nextFlow=t}function pT(){}function lT(e){this.bucketer=e}function fT(e){var t=new OE(new SE,new RE);this.userConditionMatcher=new CE(new ME,t),this.eventConditionMatcher=new FE(new jE,t),this.segmentConditionMatcher=new xE(new PE(this.userConditionMatcher)),this.experimentConditionMatcher=new kE(new DE(e,t),new LE(e,t))}function dT(){}function hT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function yT(e,t){return eE.call(this,e,t)||this}function vT(e,t){return tE.call(this,e,t)||this}function mT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function gT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function ET(e){this.userConditionMatcher=e}function wT(e){this.segmentMatcher=e}function TT(){}function _T(e,t){this.userValueResolver=e,this.valueOperatorMatcher=t}function IT(){}function AT(){}function bT(){}function OT(){}function NT(){}function RT(){}function ST(){}function CT(){}function MT(){}function xT(){}function PT(){}function kT(){}function UT(){}function DT(){}function LT(){}function FT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function jT(e){this.conditionMatcherFactory=e}function VT(){this.evaluators=new Array}function HT(e){this.listStorage=e}function KT(e){this.storages=e}function GT(){}function BT(e,t,r,n,o){this.key=new mE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=o}function zT(e,t,r,n){this.key=new mE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function YT(){this._stack=[],this._targetEvaluations=[]}function qT(e,t){this.type=e,this.id=t}function JT(e){var t=rE.call(this)||this;return t.targetRuleDeterminer=e,t}function $T(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=o,this.properties=i}function XT(e){var t=nE.call(this)||this;return t.evaluationFlowFactory=e,t}function WT(e,t,r,n,o,i){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=o,this.config=i}function ZT(){}function QT(){}function e_(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function t_(e,t,r,n,o,i,s){e=oE.call(this,e,t,r,n=void 0===n?null:n)||this;return e.exposureEventDedupDeterminer=o,e.sessionManager=i,e.userManager=s,e}function r_(e,t){this.hackleUserResolver=e,this.core=t}function n_(e,t,r,n){void 0===n&&(n=null);var o=iE.call(this)||this;return o.eventDispatcher=e,o.flushInterval=r,o.queue=new uE(o.drainQueue.bind(o),t,r),o.repository=n,o}function o_(){return null!==sE&&sE.apply(this,arguments)||this}function i_(){this.listeners={}}function s_(e,t,r){this.buffer=[],this.sink=e,this.maxQueueSize=t,this.timer=new aE({callback:this.flush.bind(this),timeout:r}),this.started=!1}function a_(e){var t=e.timeout,e=e.callback;this.timeout=Math.max(t,0),this.callback=e}function u_(i,s){Nw=window.onerror,window.onerror=function(e,t,r,n,o){a.isNotNullOrUndefined(o)&&i.trackException(o,s.resolveCurrentUser()),Nw&&Nw.apply(this,arguments)}}function c_(r,n){Z0=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.resolveCurrentUser()),Z0&&Z0.apply(this,arguments)}}function p_(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function l_(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function f_(t,r){return Object.keys(oI).every(function(e){return t[e]===r[e]})}mA.prototype.read=function(){var r=this;return new Promise(function(e){var t=r.storage.getItem(r.storageKey);t&&e(JSON.parse(t)),e([])})},mA.prototype.save=function(r){var n=this;return 0===r.length?this.clear():new Promise(function(e){var t=JSON.stringify(r.slice(-n.maxSize));n.storage.setItem(n.storageKey,t),e()})},mA.prototype.add=function(t){var r=this;return this.read().then(function(e){return r.save(e.concat(t).slice(-r.maxSize))})},mA.prototype.delete=function(r){var t=this;return this.read().then(function(e){e=e.filter(function(t){return r.findIndex(function(e){return e.insertId===t.insertId})<0});return t.save(e)})},mA.prototype.clear=function(){var t=this;return new Promise(function(e){t.storage.removeItem(t.storageKey),e()})};var d_=mA,h_=(vA.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(vA.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),vA.prototype.resolveCurrentOrNull=function(e){if(void 0===e)return this.currentUser;if("string"==typeof e)return this.setUser({id:e});e=Le(e);return e?this.setUser(e):null},vA.prototype.setUser=function(e){return this.updateUser(e)},vA.prototype.setUserId=function(e){e=E(E({},this._currentUser),{userId:e});return this.setUser(e)},vA.prototype.setDeviceId=function(e){e=E(E({},this._currentUser),{deviceId:e});return this.setUser(e)},vA.prototype.updateUserProperties=function(e){return this.operateProperties(e)},vA.prototype.resetUser=function(){return this.setUser(this.defaultUser)},vA.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},vA.prototype.saveUser=function(e){this.storage.saveUser(e)},vA.prototype.update=function(e){var t=this._currentUser,e=e(t);return this._currentUser=e,p_(t,e)||(this.changeUser(t,e,(new Date).getTime()),this.saveUser(e)),e},vA.prototype.updateUser=function(r){return this.update(function(e){return p_(e=e,t=r)?E(E({},t),{properties:E(E({},e.properties),t.properties)}):t;var t})},vA.prototype.operateProperties=function(r){return this.update(function(e){var t=null!=(t=null==e?void 0:e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return E(E({},e),{properties:a.fromMap(t)})})},vA),y_=(yA.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},yA.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(yA.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(yA.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),yA.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},yA.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},yA.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},yA),v_=(Object.defineProperty(hA.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(hA.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:hA.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(hA.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),hA.prototype.addListener=function(e){this.sessionListeners.push(e)},hA.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},hA.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)},hA.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},hA.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)})},hA.prototype.newSession=function(t,r){var n="".concat(r,".").concat(ae.v4().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},hA.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},hA.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},hA.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},hA.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},hA.EMPTY_SESSION_ID="0.ffffffff",hA),m_=(dA.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},dA.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},dA.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},dA.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},dA),g_=(fA.postfix=function(e,t){return new fA(e,function(e){return"".concat(e).concat(t)})},fA.prefix=function(e,t){return new fA(e,function(e){return"".concat(t).concat(e)})},fA.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},fA.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},fA.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},fA),E_=(lA.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},lA.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},lA.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},lA.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),o=0;return n.findIndex(function(e){return(o+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},lA.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[]}},lA.prototype.entries=function(){return this.getList().flatMap(Object.entries)},lA.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),o=((r={})[e]=t,r);if(!this.isAddableItem(o)){var i=this.getVictimIndex(o);if(i<0)return;n=n.slice(i+1)}var s=JSON.stringify(n.concat(o));this.delegate.setItem(this.listKey,s)}catch(e){}},lA.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]},lA.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),o=JSON.stringify(n);this.delegate.setItem(this.listKey,o)}catch(t){}},lA.prototype.clear=function(){this.delegate.removeItem(this.listKey)},lA),w_=(pA.prototype.currentUser=function(){var e=this.userManager.currentUser;return this.userResolver.resolve(e)},pA.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},pA.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},pA.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},pA.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},pA.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},pA.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},pA.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},pA.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},pA.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},pA.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},pA.prototype.increment=function(e,t){En.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},pA),T_=(cA.serverFetch=function(e){return"".concat(e,"/api/v2/workspaces")},cA.clientFetch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/w")},cA.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},cA.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},cA.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},cA.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},cA),__=(uA.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)},uA.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},uA.prototype.key=function(e){return"".concat(e.key)},uA),I_=(aA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},aA),A_=(sA.prototype.handle=function(e,t){e.close()},sA.prototype.supports=function(e){return"CLOSE"===e.type},sA),b_=(iA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},iA.prototype.supports=function(e){return"WEB_LINK"===e.type},iA),O_=(oA.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},oA.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},oA),N_=(nA.prototype.handle=function(e,t){var r=this.clock.currentMillis()+nA.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},nA.prototype.supports=function(e){return"HIDDEN"===e.type},nA.HIDE_EXPIRATION=864e5,nA),R_=(rA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},rA.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},rA),S_=(tA.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},tA.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},tA),C_=(eA.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},eA.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},eA),M_=(QI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){w.log.error("Invalid url: ".concat(t.value))}},QI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},QI),x_=(ZI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},ZI.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:E({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}}}},ZI),P_=(WI.prototype.present=function(r){return pe(this,void 0,void 0,function(){var t;return le(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]}})})},WI),k_=(XI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},XI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},XI),U_=($I.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var o=n[r];if(this.eventMatcher.matches(t,o,e)){o=this.context(o,e);if(o)return o}}},$I.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new l_(e.inAppMessage,e.message,t.user,Ne.sanitize({decision_reason:e.reason}))},$I),D_=(JI.prototype.open=function(){return pe(this,void 0,void 0,function(){var t,r;return le(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(JI.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(JI.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(JI.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]}})})},JI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(JI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},JI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(JI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},JI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},JI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},JI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},JI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",JI.CONTAINER_CLASS_NAME="hackle-iam",JI),L_=(qI.prototype.create=function(e,t){return new D_(this.scriptLoader,e,t)},qI),F_=(YI.prototype.load=function(){return pe(this,void 0,void 0,function(){var t;return le(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()]}})})},YI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},YI.prototype.waitForLoad=function(i){return new Promise(function(e,t){function r(){i.removeEventListener("error",o),i.removeEventListener("load",n)}var n=function(){r(),e(i)},o=function(e){r(),t(e.message)};i.addEventListener("load",n),i.addEventListener("error",o)})},YI),j_=(zI.prototype.isTriggerTarget=function(t,r,n){var o=this;return r.eventTrigger.rules.some(function(e){return o.ruleMatches(t,n,r,e)})},zI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=V_.of(e,t,r);return this.targetMatcher.anyMatches(e,gE.create(),n.targets)},zI),V_=(BI.of=function(e,t,r){return new BI(new mE("IN_APP_MESSAGE",r.key),e,t.user,t)},BI),H_=(GI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var o=0,i=this.storage.get(t);o<i.length;o++)for(var s=i[o],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},GI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var o=n[r];t.push(new K_(new G_(o)))}return e.durationCap&&t.push(new K_(new B_(e.durationCap))),t},GI),K_=(KI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},KI),G_=(Object.defineProperty(HI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),HI.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},HI),B_=(Object.defineProperty(VI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),VI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},VI),z_=(jI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},jI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},jI),Y_=(FI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},FI),q_=(LI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},LI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>LI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-LI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},LI.prototype.supports=function(e){return"IMPRESSION"===e.type},LI.IMPRESSION_MAX_SIZE=100,LI),J_=(DI.prototype.process=function(e,t,r){},DI.prototype.supports=function(e){return"CLOSE"===e.type},DI),$_=(UI.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},UI.prototype.supports=function(e){return"ACTION"===e.type},UI),X_=(kI.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)},kI),W_=(PI.prototype.matches=function(e,t,r){return!!so.isTrack(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},PI),Z_=(xI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},xI),Q_=(MI.prototype.handle=function(e,t){e.close()},MI.prototype.supports=function(e){return"CLOSE"===e.type},MI),eI=(CI.prototype.handle=function(e,t){var r=gr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},CI.prototype.supports=function(e){return"ACTION"===e.type},CI),tI=(SI.prototype.open=function(e){window.location.href=e.href},SI),rI=(RI.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},RI),nI=(NI.prototype.open=function(e){window.open(e.href)},NI),oI={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},iI={current:void 0,referrer:void 0},sI=(OI.prototype.startNewCampaign=function(e,t,r){for(var t=E(E({},oI),t),n=new ro,o=0,i=Object.entries(t);o<i.length;o++){var s=i[o],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userResolver.resolve(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},OI.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),o=this.parser.parse(),i=this.parser.parseDomain();r=o,i=i,null!==(n=n)&&(f_(r,oI)&&i.current===i.referrer||f_(n,r))||(this.storage.set(o),this.startNewCampaign(e,o,t))},OI.prototype.onSessionEnded=function(e,t,r){},OI.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},OI),aI=(bI.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},bI.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},bI),uI=(AI.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},AI.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var o=n[r].split("="),i=o[0],o=o[1];e&&!e(i,o)||(t[i]=decodeURIComponent(o))}return t},AI.getQueryParams=function(){return"undefined"==typeof window?{}:new AI(window.location.search).getQueryParams()},AI),cI=(II.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},II.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,II.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,II),pI=(_I.prototype.parse=function(){var e=uI.getQueryParams();return{utm_campaign:e[lI],utm_content:e[fI],utm_id:e[dI],utm_medium:e[hI],utm_source:e[yI],utm_term:e[vI],gclid:e[mI],fbclid:e[gI]}},_I.prototype.parseDomain=function(){return"undefined"==typeof window?iI:{current:cI.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,cI.extractDomain(e)}()}},_I),lI="utm_campaign",fI="utm_content",dI="utm_id",hI="utm_medium",yI="utm_source",vI="utm_term",mI="gclid",gI="fbclid",EI=w.log,wI=null,TI={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:-1,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.21.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"};function _I(){}function II(){}function AI(e){this.search=e}function bI(e){this.storage=e}function OI(e,t,r,n,o){this.storage=e,this.parser=t,this.core=r,this.userManager=n,this.userResolver=o}function NI(){}function RI(){}function SI(){}function CI(e){this.eventHandler=e}function MI(){}function xI(e){this.handlers=e}function PI(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function kI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function UI(e){this.actionHandlerFactory=e}function DI(){}function LI(e){this.impressionStorage=e}function FI(e){this.processors=e}function jI(e){this.storage=e}function VI(e){this.durationCap=e}function HI(e){this.identifierCap=e}function KI(e){this.matchCount=0,this.predicate=e}function GI(e){this.storage=e}function BI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function zI(e){this.targetMatcher=e}function YI(e){this.scriptUrl=e}function qI(e){this.scriptLoader=e}function JI(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===JI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function $I(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function XI(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 WI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function ZI(e){this.core=e}function QI(e){this.urlHandler=e}function eA(e){this.urlHandler=e}function tA(e){this.urlHandler=e}function rA(e){this.urlHandler=e}function nA(e,t){this.storage=e,this.clock=t}function oA(e){this.urlHandler=e}function iA(e){this.urlHandler=e}function sA(){}function aA(e){this.handlers=e}function uA(e){this.storage=e}function cA(){}function pA(e,t,r,n,o){this.core=e,this.userManager=t,this.userResolver=r,this.abOverrideStorage=n,this.ffOverrideStorage=o}function lA(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 fA(e,t){this.delegate=e,this.transform=t}function dA(){this.storage=window.localStorage}function hA(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function yA(e){this.storage=e}function vA(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),this.storage=e,this.hackleDeviceId=t,this.userListeners=[],this.defaultUser={deviceId:this.hackleDeviceId},this._currentUser=null!=(e=null!=n?n:r)?e:this.defaultUser,this.storage.saveUser(this._currentUser)}function mA(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}function gA(e,t){var o=E(E({},TI),t),t=new m_;if(w.initCounter(function(e){return En.counter("log",{level:e})}),o.log_disabled?w.setLogLevel(de.DISABLE):o.debug&&w.setLogLevel(de.DEBUG),EI.debug("sdkKey : "+e),e||EI.error("SDK Key must not be null"),wI)return EI.debug("use already exists hackleClient"),wI;function r(){d.drainRepository()}var n=!1,i=("undefined"!=typeof window&&(n=window&&window.navigator&&window.navigator.sendBeacon&&!0)&&EI.debug("support sendBeacon API"),-1),i=(void 0!==o.pollingIntervalMillis&&"number"==typeof o.pollingIntervalMillis&&0<o.pollingIntervalMillis&&(i=Math.max(o.pollingIntervalMillis,3e4)),new xo(e,Ie,{fetchUrl:T_.clientFetch(o.sdkUrl,e),updateInterval:i,headers:((i={})[ye]=o.SDK_NAME_HEADER,i["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,i)})),s=Do.getInstance({days:3650,isCrossSubdomain:!0,sameSite:o.sameSiteCookie,isSecure:o.secureCookie}),a=new y_(g_.postfix(s,"_".concat(e))),u=a.getUser(),c=o.user||null,a=new h_(a,qo(),u,c),p=new v_(o.sessionTimeoutMillis,g_.postfix(s,"_".concat(e.slice(8)))),c=(a.addListener(p),new d_(t,"".concat("hackle-repository-storage","_").concat(e),100)),l=new Co(e,Ie,{dispatchUrl:T_.clientDispatch(o.eventUrl),beaconDispatchUrl:T_.beaconDispatch(o.eventUrl,e),useBeacon:n,headers:((l={})[ye]=o.SDK_NAME_HEADER,l["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,l)}),f=-1,f=(void 0!==o.exposureEventDedupIntervalMillis&&"number"==typeof o.exposureEventDedupIntervalMillis&&-1!==o.exposureEventDedupIntervalMillis&&(f=o.exposureEventDedupIntervalMillis<1e3||36e5<o.exposureEventDedupIntervalMillis?(EI.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[no dedup]."),-1):o.exposureEventDedupIntervalMillis),new lE(f)),d=new pE(l,100,500,c,f,p,a),l=new IE(new E_(s,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),c=new IE(new E_(s,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),f=new __(g_.prefix(t,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),t=new z_(g_.prefix(t,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),h=Aw.create(i,d,[l,c],f),y=new Lo(a),s=new sI(new aI(g_.postfix(s,"_".concat(e.slice(0,8)))),new pI,h,a,y),v=new cE(y,h),v=(p.addListener(s),p.addListener(v),new x_(h)),f=new I_([new A_,new b_(new tI),new O_(new tI),new N_(f,Ce.instance),new R_(new rI),new S_(new rI),new C_(new nI),new M_(new nI)]),f=new Y_([new q_(t),new $_(f),new J_]),v=new X_(Ce.instance,v,f),f=new Z_([new Q_,new eI(v)]),m=new F_(T_.inAppMessageRenderer(o.cdnUrl,o.IAM_RENDERER_VERSION_HEADER)),m=new P_(new L_(m),v,f),v=new W_(new j_(gw.get("targetMatcher")),new H_(t)),f=new U_(i,v,h),t=(new k_(d,f,m),new w_(h,a,y,l,c)),f=(null==(i=o.devTool)?void 0:i.userExplorer)&&"function"==typeof(null==(v=o.devTool)?void 0:v.userExplorer),m=o.devTool&&f?{manager:o.devTool,userExplorer:t}:void 0,g=new io(h,y,p,a,m),c=(wI=g,o.autoOpenDevTool&&(o.devTool?g.showUserExplorer():EI.error("DevTool is not provided")),new wn(o.monitoringUrl,6e4,Ie,((l={})[ye]=o.SDK_NAME_HEADER,l["X-HACKLE-SDK-VERSION"]=o.SDK_VERSION_HEADER,l["X-HACKLE-SDK-KEY"]=e,l),n));return document.addEventListener("visibilitychange",function(){document.hidden||r()}),window.addEventListener("pageshow",r),window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){$o(),p.updateLastEventTime((new Date).getTime()),g.close(),En.globalRegistry.close()}),En.addRegistry(c),i=Date.now(),v=a.currentUser,f=p.currentSessionId,(p_(u,v)?p.startNewSessionIfNeeded(v,i):p.startNewSession(u,v,i))===f&&s.startNewCampaignIfNeeded(v,i),g.onReady(function(){(new Ow).install(h,y);var t,r,e=g;if(o.auto_track_page_view){e.trackPageView();try{history.pushState=(r=history.pushState,function(){try{var e=r.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)EI.error(e);else try{EI.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)EI.error(e);else try{EI.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)EI.error(e);else try{EI.error(e)}catch(e){}}}function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t,r,n),o}}),g}var R={createInstance:gA,getUserId:qo,setUserId:Jo,removeUserId:$o,Logger:w},EA=(p.Bucket=t.Bucket=ze,p.Container=t.Container=nt,p.ContainerGroup=t.ContainerGroup=ot,p.CoreVersion=t.CoreVersion=Ut,p.Decision=t.Decision=Ve,p.DecisionReason=t.DecisionReason=s,p.EmptyHackleRemoteConfig=t.EmptyHackleRemoteConfig=ie,p.EmptyParameterConfig=t.EmptyParameterConfig=Ke,p.EventType=t.EventType=qe,p.Experiment=t.Experiment=Ge,p.FeatureFlagDecision=t.FeatureFlagDecision=He,p.IAM_ACTION_AREA=t.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],p.IAM_ACTION_TYPE=t.IAM_ACTION_TYPE=Wt,p.IAM_BEHAVIOR=t.IAM_BEHAVIOR=Xt,p.IAM_DISPLAY_TYPE=t.IAM_DISPLAY_TYPE=qt,p.IAM_LAYOUT_TYPE=t.IAM_LAYOUT_TYPE=Jt,p.IAM_ORIENTATION=t.IAM_ORIENTATION=$t,p.IAM_PLATFORM_TYPE=t.IAM_PLATFORM_TYPE=zt,p.IAM_STATUS=t.IAM_STATUS=Bt,p.IAM_TIMEUNIT=t.IAM_TIMEUNIT=Yt,p.IdentifierType=t.IdentifierType=Je,p.IdentifiersBuilder=t.IdentifiersBuilder=$e,p.InAppMessage=t.InAppMessage=Zt,p.InAppMessageAction=t.InAppMessageAction=gr,p.InAppMessageBackground=t.InAppMessageBackground=mr,p.InAppMessageButton=t.InAppMessageButton=yr,p.InAppMessageButtonStyle=t.InAppMessageButtonStyle=vr,p.InAppMessageContext=t.InAppMessageContext=ur,p.InAppMessageContextLayout=t.InAppMessageContextLayout=pr,p.InAppMessageContextMessage=t.InAppMessageContextMessage=cr,p.InAppMessageDecision=t.InAppMessageDecision=je,p.InAppMessageDurationCap=t.InAppMessageDurationCap=ir,p.InAppMessageEventFrequencyCap=t.InAppMessageEventFrequencyCap=nr,p.InAppMessageEventTrigger=t.InAppMessageEventTrigger=tr,p.InAppMessageEventTriggerRule=t.InAppMessageEventTriggerRule=rr,p.InAppMessageIdentifierCap=t.InAppMessageIdentifierCap=or,p.InAppMessageImage=t.InAppMessageImage=lr,p.InAppMessagePeriodAlways=t.InAppMessagePeriodAlways=Qt,p.InAppMessagePeriodCustom=t.InAppMessagePeriodCustom=er,p.InAppMessageTargetContext=t.InAppMessageTargetContext=sr,p.InAppMessageText=t.InAppMessageText=fr,p.InAppMessageTextAttribute=t.InAppMessageTextAttribute=dr,p.InAppMessageTextStyle=t.InAppMessageTextStyle=hr,p.InAppMessageUserOverride=t.InAppMessageUserOverride=ar,p.Logger=t.Logger=w,p.MATCH_OPERATORS=t.MATCH_OPERATORS=jt,p.MATCH_TYPES=t.MATCH_TYPES=Lt,p.MATCH_VALUE_TYPES=t.MATCH_VALUE_TYPES=Ft,p.MetaVersion=t.MetaVersion=Dt,p.ParameterConfiguration=t.ParameterConfiguration=it,p.PropertyOperations=t.PropertyOperations=no,p.PropertyOperationsBuilder=t.PropertyOperationsBuilder=ro,p.RemoteConfigDecision=t.RemoteConfigDecision=Fe,p.RemoteConfigParameter=t.RemoteConfigParameter=st,p.RemoteConfigParameterValue=t.RemoteConfigParameterValue=ut,p.RemoteConfigTargetRule=t.RemoteConfigTargetRule=at,p.SEGMENT_TYPES=t.SEGMENT_TYPES=Kt,p.Segment=t.Segment=rt,p.Slot=t.Slot=Ye,p.TARGET_ACTION_TYPES=t.TARGET_ACTION_TYPES=Vt,p.TARGET_KEY_TYPES=t.TARGET_KEY_TYPES=Ht,p.Target=t.Target=Xe,p.TargetAction=t.TargetAction=et,p.TargetCondition=t.TargetCondition=We,p.TargetKey=t.TargetKey=Ze,p.TargetMatch=t.TargetMatch=Qe,p.TargetRule=t.TargetRule=tt,p.TargetingType=t.TargetingType=Gt,p.Variation=t.Variation=Be,p.Version=t.Version=kt,se=t.createInstance=gA,t.default=R,p.getUserId=t.getUserId=qo,p.removeUserId=t.removeUserId=$o,p.sanitizeUser=t.sanitizeUser=Le,p.setUserId=t.setUserId=Jo,function(e,t){return(EA=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 wA=function(){return(wA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function TA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}_A.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},_A.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},_A.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};M=_A;function _A(){this.listeners={}}AA.arePropertiesEqual=function(e,t){var r=AA.coerceUnknownToProperties(e),n=AA.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]})},AA.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var IA=AA;function AA(){}OA.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)&&IA.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&IA.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var bA=OA;function OA(){}var NA=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function o(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=se(e,wA(wA({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.21.0"})),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return EA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),o.prototype.getUser=function(){return this.client.getUser()},o.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},o.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},o.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},o.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},o.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},o.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},o.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},o.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},o.prototype.track=function(e,t){this.client.track(e,t||void 0)},o.prototype.trackPageView=function(e){this.client.trackPageView(wA(wA({},e),{user:(null==e?void 0:e.user)||void 0}))},o.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},o.prototype.onReady=function(e,t){this.client.onReady(e,t)},o.prototype.onInitialized=function(e){return this.client.onInitialized(e)},o.prototype.emitUpdatedUser=function(e){bA.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},o.prototype.showUserExplorer=function(){this.client.showUserExplorer()},o.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},o}(M);var k={exports:{}},b={},RA=Object.getOwnPropertySymbols,SA=Object.prototype.hasOwnProperty,CA=Object.prototype.propertyIsEnumerable;var ts=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))SA.call(r,i)&&(n[i]=r[i]);if(RA)for(var s=RA(r),a=0;a<s.length;a++)CA.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},MA=ts,i="function"==typeof Symbol&&Symbol.for,xA=i?Symbol.for("react.element"):60103,PA=i?Symbol.for("react.portal"):60106,tp=i?Symbol.for("react.fragment"):60107,kA=i?Symbol.for("react.strict_mode"):60108,Mi=i?Symbol.for("react.profiler"):60114,UA=i?Symbol.for("react.provider"):60109,DA=i?Symbol.for("react.context"):60110,LA=i?Symbol.for("react.forward_ref"):60112,hi=i?Symbol.for("react.suspense"):60113,FA=i?Symbol.for("react.memo"):60115,jA=i?Symbol.for("react.lazy"):60116,VA="function"==typeof Symbol&&Symbol.iterator;function HA(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 KA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GA={};function BA(e,t,r){this.props=e,this.context=t,this.refs=GA,this.updater=r||KA}function zA(){}function YA(e,t,r){this.props=e,this.context=t,this.refs=GA,this.updater=r||KA}BA.prototype.isReactComponent={},BA.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(HA(85));this.updater.enqueueSetState(this,e,t,"setState")},BA.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},zA.prototype=BA.prototype;var If=YA.prototype=new zA,qA=(If.constructor=YA,MA(If,BA.prototype),If.isPureReactComponent=!0,{current:null}),JA=Object.prototype.hasOwnProperty,$A={key:!0,ref:!0,__self:!0,__source:!0};function XA(e,t,r){var n,o={},i=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)JA.call(t,n)&&!$A.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(1===a)o.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===o[n]&&(o[n]=a[n]);return{$$typeof:xA,type:e,key:i,ref:s,props:o,_owner:qA.current}}function WA(e){return"object"==typeof e&&null!==e&&e.$$typeof===xA}var ZA=/\/+/g,QA=[];function eb(e,t,r,n){var o;return QA.length?((o=QA.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function tb(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,QA.length<10&&QA.push(e)}function rb(e,t,r){return null==e?0:function e(t,r,n,o){var i=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case xA:case PA:i=!0}}if(i)return n(o,t,""===r?"."+nb(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+nb(a=t[s],s);i+=e(a,u,n,o)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=VA&&t[VA]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)i+=e(a=a.value,u=r+nb(a,s++),n,o);else if("object"===a)throw n=""+t,Error(HA(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return i}(e,"",t,r)}function nb(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 ob(e,t){e.func.call(e.context,t,e.count++)}function ib(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?sb(e,n,r,function(e){return e}):null!=e&&(WA(e)&&(t=o+(!(o=e).key||t&&t.key===e.key?"":(""+e.key).replace(ZA,"$&/")+"/")+r,e={$$typeof:xA,type:o.type,key:t,ref:o.ref,props:o.props,_owner:o._owner}),n.push(e))}function sb(e,t,r,n,o){var i="";rb(e,ib,t=eb(t,i=null!=r?(""+r).replace(ZA,"$&/")+"/":i,n,o)),tb(t)}var ab={current:null};function ub(){var e=ab.current;if(null===e)throw Error(HA(321));return e}var cb,pb,lb,ha={ReactCurrentDispatcher:ab,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:qA,IsSomeRendererActing:{current:!1},assign:MA},y=(b.Children={map:function(e,t,r){if(null==e)return e;var n=[];return sb(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;rb(e,ob,t=eb(null,null,t,r)),tb(t)},count:function(e){return rb(e,function(){return null},null)},toArray:function(e){var t=[];return sb(e,t,null,function(e){return e}),t},only:function(e){if(WA(e))return e;throw Error(HA(143))}},b.Component=BA,b.Fragment=tp,b.Profiler=Mi,b.PureComponent=YA,b.StrictMode=kA,b.Suspense=hi,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ha,b.cloneElement=function(e,t,r){if(null==e)throw Error(HA(267,e));var n=MA({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref,s=qA.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)JA.call(t,a)&&!$A.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:xA,type:e.type,key:o,ref:i,props:n,_owner:s}},b.createContext=function(e,t){return(e={$$typeof:DA,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:UA,_context:e},e.Consumer=e},b.createElement=XA,b.createFactory=function(e){var t=XA.bind(null,e);return t.type=e,t},b.createRef=function(){return{current:null}},b.forwardRef=function(e){return{$$typeof:LA,render:e}},b.isValidElement=WA,b.lazy=function(e){return{$$typeof:jA,_ctor:e,_status:-1,_result:null}},b.memo=function(e,t){return{$$typeof:FA,type:e,compare:void 0===t?null:t}},b.useCallback=function(e,t){return ub().useCallback(e,t)},b.useContext=function(e,t){return ub().useContext(e,t)},b.useDebugValue=function(){},b.useEffect=function(e,t){return ub().useEffect(e,t)},b.useImperativeHandle=function(e,t,r){return ub().useImperativeHandle(e,t,r)},b.useLayoutEffect=function(e,t){return ub().useLayoutEffect(e,t)},b.useMemo=function(e,t){return ub().useMemo(e,t)},b.useReducer=function(e,t,r){return ub().useReducer(e,t,r)},b.useRef=function(e){return ub().useRef(e)},b.useState=function(e){return ub().useState(e)},b.version="16.14.0",{}),yp=Function.call.bind(Object.prototype.hasOwnProperty),fb=function(){};function db(e,t,r,n,o){if("production"!==production)for(var i in e)if(lb(e,i)){var s,a;try{if("function"!=typeof e[i])throw(a=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[i](t,i,n,r,null,cb)}catch(e){s=e}!s||s instanceof Error||fb((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in pb)&&(pb[s.message]=!0,i=o?o():"",fb("Failed "+r+" type: "+s.message+(null!=i?i:"")))}}if("production"!==production&&(cb="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pb={},lb=yp,fb=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),db.resetWarningCache=function(){"production"!==production&&(pb={})},"production"!==production){var hb=ts,yb=db,P="function"==typeof Symbol&&Symbol.for,vb=P?Symbol.for("react.element"):60103,mb=P?Symbol.for("react.portal"):60106,gb=P?Symbol.for("react.fragment"):60107,Eb=P?Symbol.for("react.strict_mode"):60108,wb=P?Symbol.for("react.profiler"):60114,Tb=P?Symbol.for("react.provider"):60109,_b=P?Symbol.for("react.context"):60110,Ib=P?Symbol.for("react.concurrent_mode"):60111,Ab=P?Symbol.for("react.forward_ref"):60112,bb=P?Symbol.for("react.suspense"):60113,Ob=P?Symbol.for("react.suspense_list"):60120,Nb=P?Symbol.for("react.memo"):60115,Rb=P?Symbol.for("react.lazy"):60116,Sb=P?Symbol.for("react.block"):60121,Cb=P?Symbol.for("react.fundamental"):60117,Mb=P?Symbol.for("react.responder"):60118,xb=P?Symbol.for("react.scope"):60119,Pb="function"==typeof Symbol&&Symbol.iterator,kb="@@iterator";function Ub(e){if(null===e||"object"!=typeof e)return null;e=Pb&&e[Pb]||e[kb];return"function"==typeof e?e:null}var Db={current:null},Lb={current:null},Fb=/^(.*)[\\\/]/,jb=1;function Vb(e){if(null==e)return null;if("number"==typeof e.tag&&U("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 gb:return"Fragment";case mb:return"Portal";case wb:return"Profiler";case Eb:return"StrictMode";case bb:return"Suspense";case Ob:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case _b:return"Context.Consumer";case Tb:return"Context.Provider";case Ab:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case Nb:return Vb(e.type);case Sb:return Vb(e.render);case Rb:r=(t=e)._status===jb?t._result:null;if(r)return Vb(r)}var t,r;return null}var Hb={},Kb=null;function Gb(e){Kb=e}Hb.getCurrentStack=null,Hb.getStackAddendum=function(){var e,t,r,n,o,i="",s=(Kb&&(e=Vb(Kb.type),r=Kb._owner,i+=(e=e,t=Kb._source,r=r&&Vb(r.type),o="",t?(n=(s=t.fileName).replace(Fb,""),o=" (at "+(n=/^index\./.test(n)&&(s=s.match(Fb))&&(s=s[1])?s.replace(Fb,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(o=" (created by "+r+")"),"\n in "+(e||"Unknown")+o)),Hb.getCurrentStack);return s&&(i+=s()||""),i};var Bb={ReactCurrentDispatcher:Db,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:Lb,IsSomeRendererActing:{current:!1},assign:hb};function zb(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];Yb("warn",e,r)}function U(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];Yb("error",e,r)}function Yb(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=Bb.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});throw new Error(i)}catch(e){}}hb(Bb,{ReactDebugCurrentFrame:Hb,ReactComponentTreeHook:{}});var qb={};function Jb(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;qb[r]||(U("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),qb[r]=!0)}var $b={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){Jb(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){Jb(e,"replaceState")},enqueueSetState:function(e,t,r,n){Jb(e,"setState")}},Xb={};function Wb(e,t,r){this.props=e,this.context=t,this.refs=Xb,this.updater=r||$b}Object.freeze(Xb),Wb.prototype.isReactComponent={},Wb.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")},Wb.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var Zb,Qb={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(Zb in Qb)Qb.hasOwnProperty(Zb)&&!function(e,t){Object.defineProperty(Wb.prototype,e,{get:function(){zb("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(Zb,Qb[Zb]);function e1(){}function t1(e,t,r){this.props=e,this.context=t,this.refs=Xb,this.updater=r||$b}e1.prototype=Wb.prototype,(P=t1.prototype=new e1).constructor=t1,hb(P,Wb.prototype),P.isPureReactComponent=!0;var r1,n1,o1=Object.prototype.hasOwnProperty,i1={key:!0,ref:!0,__self:!0,__source:!0};function s1(e){if(o1.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function a1(e){if(o1.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var u1={},c1=function(e,t,r,n,o,i,s){e={$$typeof:vb,type:e,key:t,ref:r,props:s,_owner:i,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function p1(e,t,r){var n,o={},i=null,s=null,a=null,u=null;if(null!=t)for(n in s1(t)&&(s=t.ref,"string"==typeof(c=t).ref&&Lb.current&&c.__self&&Lb.current.stateNode!==c.__self&&(l=Vb(Lb.current.type),u1[l]||(U('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',Vb(Lb.current.type),c.ref),u1[l]=!0))),a1(t)&&(i=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)o1.call(t,n)&&!i1.hasOwnProperty(n)&&(o[n]=t[n]);var c,p,l,f,d=arguments.length-2;if(1==d)o.children=r;else if(1<d){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];Object.freeze&&Object.freeze(h),o.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===o[n]&&(o[n]=v[n])}function m(){n1||(n1=!0,U("%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)",p))}function g(){r1||(r1=!0,U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(i||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,i&&(l=o,f=c,g.isReactWarning=!0,Object.defineProperty(l,"key",{get:g,configurable:!0})),s&&(r=o,p=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),c1(e,i,s,a,u,Lb.current,o)}function l1(e){return"object"==typeof e&&null!==e&&e.$$typeof===vb}var f1=".",d1=":",h1=!1,y1=/\/+/g;function v1(e){return(""+e).replace(y1,"$&/")}var m1=10,g1=[];function E1(e,t,r,n){var o;return g1.length?((o=g1.pop()).result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o):{result:e,keyPrefix:t,func:r,context:n,count:0}}function w1(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,g1.length<m1&&g1.push(e)}function T1(e,t,r){return null==e?0:function e(t,r,n,o){var i,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case vb:case mb:a=!0}}if(a)return n(o,t,""===r?f1+_1(t,0):r),1;var u=0,c=""===r?f1:r+d1;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(i=t[p],c+_1(i,p),n,o);else if("function"==typeof(r=Ub(t))){r===t.entries&&(h1||zb("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."),h1=!0);for(var l,f=r.call(t),d=0;!(l=f.next()).done;)u+=e(i=l.value,c+_1(i,d++),n,o)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+Hb.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 _1(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 I1(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function A1(e,t,r){var n=e.result,o=e.keyPrefix,i=e.func,s=e.context,i=i.call(s,t,e.count++);Array.isArray(i)?b1(i,n,r,function(e){return e}):null!=i&&(l1(i)&&(e=o+(!(s=i).key||t&&t.key===i.key?"":v1(i.key)+"/")+r,i=c1(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(i))}function b1(e,t,r,n,o){var i="",t=E1(t,i=null!=r?v1(r)+"/":i,n,o);T1(e,A1,t),w1(t)}function O1(e){return"string"==typeof e||"function"==typeof e||e===gb||e===Ib||e===wb||e===Eb||e===bb||e===Ob||"object"==typeof e&&null!==e&&(e.$$typeof===Rb||e.$$typeof===Nb||e.$$typeof===Tb||e.$$typeof===_b||e.$$typeof===Ab||e.$$typeof===Cb||e.$$typeof===Mb||e.$$typeof===xb||e.$$typeof===Sb)}function N1(){var e=Db.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 R1(){if(Lb.current){var e=Vb(Lb.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var S1=!1,C1={};function M1(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=R1())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),C1[t=r]||(C1[t]=!0,r="",e&&e._owner&&e._owner!==Lb.current&&(r=" It was passed a child from "+Vb(e._owner.type)+"."),Gb(e),U('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),Gb(null)))}function x1(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];l1(n)&&M1(n,t)}else if(l1(e))e._store&&(e._store.validated=!0);else if(e){var o=Ub(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)l1(i.value)&&M1(i.value,t)}}function P1(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=Vb(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==Ab&&t.$$typeof!==Nb)return;r=t.propTypes}r?(Gb(e),yb(r,e.props,"prop",n,Hb.getStackAddendum),Gb(null)):void 0===t.PropTypes||S1||(S1=!0,U("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||U("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function k1(e,t,r){var n,o=O1(e),t=(o||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||R1(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===vb?(s="<"+(Vb(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,U("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)),p1.apply(this,arguments));if(null==t)return t;if(o)for(var i=2;i<arguments.length;i++)x1(arguments[i],e);if(e===gb){var s=t;Gb(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){U("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&U("Invalid attribute `ref` supplied to `React.Fragment`."),Gb(null)}else P1(t);return t}var U1=!1;try{var D1=Object.freeze({}),L1=new Map([[D1,null]]),F1=new Set([D1]);L1.set(0,0),F1.add(0)}catch(e){}function j1(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,i=hb({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in s1(t)&&(a=t.ref,p=Lb.current),a1(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)o1.call(t,n)&&!i1.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?i[n]=o[n]:i[n]=t[n]);var l=arguments.length-2;if(1==l)i.children=r;else if(1<l){for(var f=Array(l),d=0;d<l;d++)f[d]=arguments[d+2];i.children=f}return c1(e.type,s,a,u,c,p,i)}.apply(this,arguments),o=2;o<arguments.length;o++)x1(arguments[o],n.type);return P1(n),n}function V1(e){var t=k1.bind(null,e);return t.type=e,U1||(U1=!0,zb("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 zb("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}P=k1,y.Children={map:function(e,t,r){if(null==e)return e;var n=[];return b1(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=E1(null,null,t,r),T1(e,I1,t),w1(t)},count:function(e){return T1(e,function(){return null},null)},toArray:function(e){var t=[];return b1(e,t,null,function(e){return e}),t},only:function(e){if(l1(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},y.Component=Wb,y.Fragment=gb,y.Profiler=wb,y.PureComponent=t1,y.StrictMode=Eb,y.Suspense=bb,y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bb,y.cloneElement=j1,y.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&U("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:_b,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:Tb,_context:r}),o=!1,t={$$typeof:_b,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return o||(o=!0,U("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,U("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},y.createElement=P,y.createFactory=V1,y.createRef=function(){var e={current:null};return Object.seal(e),e},y.forwardRef=function(e){return null!=e&&e.$$typeof===Nb?U("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?U("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&U("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||U("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:Ab,render:e}},y.isValidElement=l1,y.lazy=function(e){var t,r,n={$$typeof:Rb,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){U("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){U("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},y.memo=function(e,t){return O1(e)||U("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:Nb,type:e,compare:void 0===t?null:t}},y.useCallback=function(e,t){return N1().useCallback(e,t)},y.useContext=function(e,t){var r,n=N1();return void 0!==t&&U("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?U("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&&U("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},y.useDebugValue=function(e,t){return N1().useDebugValue(e,t)},y.useEffect=function(e,t){return N1().useEffect(e,t)},y.useImperativeHandle=function(e,t,r){return N1().useImperativeHandle(e,t,r)},y.useLayoutEffect=function(e,t){return N1().useLayoutEffect(e,t)},y.useMemo=function(e,t){return N1().useMemo(e,t)},y.useReducer=function(e,t,r){return N1().useReducer(e,t,r)},y.useRef=function(e){return N1().useRef(e)},y.useState=function(e){return N1().useState(e)},y.version="16.14.0"}"production"===production?k.exports=b:k.exports=y;var H1=k.exports,K1=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Ci=K1.Consumer,G1=K1.Provider;var B1=p.Logger.log;function z1(e,t){e=Y1(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function Y1(e,t){void 0===t&&(t="A");var r=k.exports.useContext(K1),n=r.hackle,o=r.userVersion,i=r.initialized,s=k.exports.useCallback(function(){return i?(null==n?void 0:n.variationDetail(e))||p.Decision.of(t,p.DecisionReason.EXCEPTION):p.Decision.of(t,p.DecisionReason.SDK_NOT_READY)},[t,e,n,i]),r=TA(k.exports.useState(function(){return n?s():(B1.error("HackleClient is not existed"),p.Decision.of(t,p.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],o={key:e,userVersion:o,initialized:i},u=TA(k.exports.useState(o),2),c=u[0],u=u[1];return $1(c,o)||(u(o),r(s())),{isLoading:!i,decision:a}}function q1(e){e=J1(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function J1(e){var t=k.exports.useContext(K1),r=t.hackle,n=t.userVersion,o=t.initialized,i=k.exports.useCallback(function(){return o?(null==r?void 0:r.featureFlagDetail(e))||p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION):p.FeatureFlagDecision.off(p.DecisionReason.SDK_NOT_READY)},[e,r,o]),t=TA(k.exports.useState(function(){return r?i():(B1.error("HackleClient is not existed"),p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:o},a=TA(k.exports.useState(n),2),u=a[0],a=a[1];return $1(u,n)||(a(n),t(i())),{isLoading:!o,decision:s}}function $1(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function X1(e){var t,r=e.experimentKey,e=e.children,n=(r=z1(r)).isLoading,o=r.variation;return n?null:e&&"function"==typeof e?e(o):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?o===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:o}):null)}function W1(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function Z1(e){var t=(r=q1(e.featureKey)).isLoading,r=r.isOn;return t?null:H1.createElement(H1.Fragment,null,e.children(r))}p.HackleContext=K1,p.HackleContextConsumer=Ci,p.HackleContextProvider=G1,p.HackleExperiment=X1,p.HackleFeature=Z1,p.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(o=e.timeout)?3e3:o,o=void 0!==(o=e.supportSSR)&&o,e=e.children,i=TA(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=i[0],a=i[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return wA(wA({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return wA(wA({},e),{initialized:!0})})},function(){a(function(e){return wA(wA({},e),{initialized:!0})})}).catch(function(){a(function(e){return wA(wA({},e),{initialized:!0})})})},[t]),o||s.initialized?H1.createElement(G1,{value:s},e):null},p.HackleVariation=W1,p.createInstance=function(e,t){return new NA(e,t)},p.useFeature=function(e){var t=(n=k.exports.useContext(K1)).hackle,r=n.userVersion,n=n.initialized,o=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),i=(s=TA(k.exports.useState(function(){return t?o():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=TA(k.exports.useState(r),2))[0],n=n[1];return $1(a,r)||(n(r),s(o())),i},p.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(K1)).hackle,r=n.userVersion,n=n.initialized,o=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION)},[e,t,n]),i=(s=TA(k.exports.useState(function(){return t?o():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),p.FeatureFlagDecision.off(p.DecisionReason.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=TA(k.exports.useState(r),2))[0],n=n[1];return $1(a,r)||(n(r),s(o())),i},p.useLoadableFeature=q1,p.useLoadableFeatureDetail=J1,p.useLoadableRemoteConfig=function(){var e=(i=k.exports.useContext(K1)).hackle,t=i.userVersion,r=i.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new p.EmptyHackleRemoteConfig},[e,r]),o=(i=TA(k.exports.useState(function(){return e||B1.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(a=TA(k.exports.useState(t),2))[0],a=a[1];return $1(s,t)||(a(t),i(n())),{isLoading:!r,remoteConfig:o}},p.useLoadableVariation=z1,p.useLoadableVariationDetail=Y1,p.useRemoteConfig=function(){var e=(r=k.exports.useContext(K1)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new p.EmptyHackleRemoteConfig},[e,r]),o=(i=TA(k.exports.useState(function(){return e||B1.error("HackleClient is not existed"),n()}),2))[0],i=i[1],t={userVersion:t,initialized:r},s=(r=TA(k.exports.useState(t),2))[0],r=r[1];return $1(s,t)||(r(t),i(n())),o},p.useTrack=function(){var t=k.exports.useContext(K1).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(B1.error("HackleClient is not existed"),function(){})},p.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(K1)).hackle,n=a.userVersion,o=a.initialized,i=k.exports.useCallback(function(){return o&&(null==r?void 0:r.variation(e))||t},[t,e,r,o]),s=(a=TA(k.exports.useState(function(){return r?i():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(c=TA(k.exports.useState(n),2))[0],c=c[1];return $1(u,n)||(c(n),a(i())),s},p.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(o=k.exports.useContext(K1)).hackle,n=o.userVersion,o=o.initialized,i=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||p.Decision.of(t,p.DecisionReason.EXCEPTION)},[t,e,r,o]),s=(a=TA(k.exports.useState(function(){return r?i():("undefined"!=typeof window&&B1.error("HackleClient is not existed"),p.Decision.of(t,p.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:o},u=(o=TA(k.exports.useState(n),2))[0],o=o[1];return $1(u,n)||(o(n),a(i())),s},Object.defineProperty(p,"__esModule",{value:!0})});