@hackler/react-sdk 11.34.0 → 11.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +1 -1
- package/package.json +2 -2
- package/CHANGELOG.md +0 -6
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(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[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;for(var V=[],j=0;j<256;++j)V.push((j+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(V[e[t+0]]+V[e[t+1]]+V[e[t+2]]+V[e[t+3]]+"-"+V[e[t+4]]+V[e[t+5]]+"-"+V[e[t+6]]+V[e[t+7]]+"-"+V[e[t+8]]+V[e[t+9]]+"-"+V[e[t+10]]+V[e[t+11]]+V[e[t+12]]+V[e[t+13]]+V[e[t+14]]+V[e[t+15]]).toLowerCase();if("string"==typeof(t=e)&&F.test(t))return e;throw TypeError("Stringified UUID is invalid")}function H(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(D=D||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return D(L);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return z(n)}var e="3.7.5",B="function"==typeof atob,t="function"==typeof btoa,r="function"==typeof Buffer;const G="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0;const J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(J),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=String.fromCharCode.bind(String),X="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),W=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push($.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?W(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?W(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(r>>16&255,r>>8&255,255&r);return n};const le=B?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>X(Buffer.from(e,"base64")):e=>X(le(e).split("").map(e=>e.charCodeAt(0))),fe=e=>pe(de(e)),he=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(pe(e)):e=>ce(le(e)),de=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>he(de(e));function ye(){var e=(e,t)=>Object.defineProperty(String.prototype,e,ge(t));e("fromBase64",function(){return ve(this)}),e("toBase64",function(e){return se(this,e)}),e("toBase64URI",function(){return se(this,!0)}),e("toBase64URL",function(){return se(this,!0)}),e("toUint8Array",function(){return fe(this)})}function me(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ge(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const ge=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:e,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ve,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:te,toUint8Array:fe,extendString:ye,extendUint8Array:me,extendBuiltins:()=>{ye(),me()}};we.isNotNullOrUndefined=function(e){return null!=e},we.isNullOrUndefined=function(e){return null==e},we.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},we.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=we;function we(){}be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},be.associate=function(e,t){return this.associateTo(e,new Map,t)},be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r};var p=be;function be(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(_e.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},_e.initCounter=function(t){this.counters=p.associate(Object.keys(Te),function(e){return[e,t(e)]})},_e._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)Ie.log(e,r,t.message,t);else try{Ie.log(e,r,t)}catch(e){}},_e.increment=function(e){var t;null!=(t=null==(t=_e.counters)?void 0:t.get(e))&&t.increment()},_e.logLevel=Te.INFO,_e.log={error:function(e){Te.ERROR<=_e.logLevel&&(_e._log("ERROR",e),_e.increment("ERROR"))},warn:function(e){Te.WARN<=_e.logLevel&&(_e._log("WARN",e),_e.increment("WARN"))},info:function(e){Te.INFO<=_e.logLevel&&(_e._log("INFO",e),_e.increment("INFO"))},debug:function(e){Te.DEBUG<=_e.logLevel&&(_e._log("DEBUG",e),_e.increment("DEBUG"))}},_e);function _e(){}Oe.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Oe;function Oe(){}var Ae=function(e,t){return(Ae=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 Ne(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}Ae(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function l(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Re(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Se=s.log,xe=(Ce.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},Ce.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]})},Ce.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},Ce.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},Ce.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},Ce.MAX_IDENTIFIER_TYPE_LENGTH=128,Ce.MAX_IDENTIFIER_VALUE_LENGTH=512,Ce);function Ce(){}var Ue=s.log,ke=(Me.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Ue.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?Ue.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Ue.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Me.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Me.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Me.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},Me.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))},Me.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Me.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},Me.SYSTEM_PROPERTY_KEY_PREFIX="$",Me.MAX_PROPERTIES_COUNT=128,Me.MAX_PROPERTY_KEY_LENGTH=128,Me.MAX_PROPERTY_VALUE_LENGTH=1024,Me);function Me(){}var Pe=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(f.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C0);case"seconds":return e/(f.C3/f.C0);case"minutes":return e/(f.C4/f.C0);case"hours":return e/(f.C5/f.C0);case"days":return e/(f.C6/f.C0)}},f.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C1);case"microseconds":return e;case"seconds":return e/(f.C3/f.C1);case"minutes":return e/(f.C4/f.C1);case"hours":return e/(f.C5/f.C1);case"days":return e/(f.C6/f.C1)}},f.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C2/f.C0);case"microseconds":return e*(f.C2/f.C1);case"milliseconds":return e;case"seconds":return e/(f.C3/f.C2);case"minutes":return e/(f.C4/f.C2);case"hours":return e/(f.C5/f.C2);case"days":return e/(f.C6/f.C2)}},f.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C3/f.C0);case"microseconds":return e*(f.C3/f.C1);case"milliseconds":return e*(f.C3/f.C2);case"seconds":return e;case"minutes":return e/(f.C4/f.C3);case"hours":return e/(f.C5/f.C3);case"days":return e/(f.C6/f.C3)}},f.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C4/f.C0);case"microseconds":return e*(f.C4/f.C1);case"milliseconds":return e*(f.C4/f.C2);case"seconds":return e*(f.C4/f.C3);case"minutes":return e;case"hours":return e/(f.C5/f.C4);case"days":return e/(f.C6/f.C4)}},f.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C5/f.C0);case"microseconds":return e*(f.C5/f.C1);case"milliseconds":return e*(f.C5/f.C2);case"seconds":return e*(f.C5/f.C3);case"minutes":return e*(f.C5/f.C4);case"hours":return e;case"days":return e/(f.C6/f.C5)}},f.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C6/f.C0);case"microseconds":return e*(f.C6/f.C1);case"milliseconds":return e*(f.C6/f.C2);case"seconds":return e*(f.C6/f.C3);case"minutes":return e*(f.C6/f.C4);case"hours":return e*(f.C6/f.C5);case"days":return e}},f.C6=24*(f.C5=60*(f.C4=60*(f.C3=1e3*(f.C2=1e3*(f.C1=1e3*(f.C0=1)))))),f.converter={nanoseconds:f.nanosToUnit,microseconds:f.microsToUnit,milliseconds:f.millisToUnit,seconds:f.secondsToUnit,minutes:f.minutesToUnit,hours:f.hoursToUnit,days:f.daysToUnit},f);function f(){}Fe.prototype.tick=function(){return 1e3*Date.now()},Fe.prototype.currentMillis=function(){return Date.now()},Fe.instance=new Fe;var Le=Fe;function Fe(){}je.prototype.get=function(e,t){return t};var Ve=je;function je(){}He.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var ze=He;function He(e){this.parameters=e}var Be=s.log;function Ge(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Be.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function Ke(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=Ge(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}Ye.of=function(e,t){return new Ye(e,t)};var Je=Ye;function Ye(e,t){this.value=e,this.reason=t}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r,n){return new $e(t,r,e,n=void 0===n?{}:n)};var qe=$e;function $e(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}We.of=function(e,t,r,n){return new We(e,t,r=void 0===r?new Ve:r,n=void 0===n?void 0:n)},We.prototype.get=function(e,t){return this.config.get(e,t)};var Xe=We;function We(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}Qe.on=function(e,t,r){return new Qe(!0,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.off=function(e,t,r){return new Qe(!1,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Qe.prototype.get=function(e,t){return this.config.get(e,t)};var Ze=Qe;function Qe(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}tt.prototype.get=function(e,t){return t};var et=tt;function tt(){}nt.fromJson=function(e){return new nt(e.id,new ze(p.associate(e.parameters,function(e){return[e.key,e.value]})))},nt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var rt=nt;function nt(e,t){this.id=e,this.config=t}d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET";var h=d;function d(){}var it=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],ot=(st.fromJson=function(e,t){var r=st.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new at(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return xt.fromJson(e,rr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return wt.fromJson(e,rr.PROPERTY)}),a=an.fromJson(t.execution.targetUrls),u=Ge(it,t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return xt.fromJson(e,rr.PROPERTY)}),l=Rt.fromJson(t.execution.defaultRule);return r&&u&&l&&new st(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},st.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Be.debug("Unsupported status [".concat(e,"]"))}},st.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},st.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},st.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},st);function st(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,v,y){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}var at=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ut=(ct.fromJson=function(e){return new ct(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new lt(t,r,e)}))},ct);function ct(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}pt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var lt=pt;function pt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ht.fromJson=function(e){return new ht(e.id,e.key)};var ft=ht;function ht(e,t){this.id=e,this.key=t}vt.ID="$id",vt.USER="$userId",vt.DEVICE="$deviceId",vt.SESSION="$sessionId",vt.HACKLE_DEVICE="$hackleDeviceId";var dt=vt;function vt(){}function yt(e){var t=new mt;return t.addIdentifiers(e.identifiers||{}),t.add(dt.ID,e.id),t.add(dt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(dt.USER,e.userId),t.build()}gt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},gt.prototype.add=function(e,t){var r=xe.sanitizeValue(t);return xe.isValidType(e)&&r?this.identifiers[e]=t:Be.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},gt.prototype.build=function(){return this.identifiers};var mt=gt;function gt(){this.identifiers={}}function Et(e){var t,r={};return r.id=null!=(t=xe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=xe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=xe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=ke.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=xe.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}bt.fromJson=function(e,t){return new bt(p.mapNotNullOrUndefined(e.conditions,function(e){return Tt.fromJson(e,t)}))},bt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var wt=bt;function bt(e){this.conditions=e}_t.fromJson=function(e,t){var r=It.fromJson(e.key);if(r&&t.supports(r.type))return(t=At.fromJson(e.match))&&new _t(r,t)},_t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Tt=_t;function _t(e,t){this.key=e,this.match=t}Ot.fromJson=function(e){var t=Ge(er,e.type);return t&&new Ot(t,e.name)},Ot.prototype.toJson=function(){return{type:this.type,name:this.name}};var It=Ot;function Ot(e,t){this.type=e,this.name=t}Nt.fromJson=function(e){var t=Ge(Xt,e.type),r=Ge(Zt,e.operator),n=Ge(Wt,e.valueType);return t&&r&&n&&new Nt(t,r,n,e.values)},Nt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var At=Nt;function Nt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}St.fromJson=function(e){var t=Ge(Qt,e.type);return t&&new St(t,e.variationId,e.bucketId)};var Rt=St;function St(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}Ct.fromJson=function(e,t){t=wt.fromJson(e.target,t),e=Rt.fromJson(e.action);return t&&e&&new Ct(t,e)};var xt=Ct;function Ct(e,t){this.target=e,this.action=t}kt.fromJson=function(e){var t=Ge(tr,e.type);return t&&new kt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.SEGMENT)}))};var Ut=kt;function kt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Pt.fromJson=function(e){return new Pt(e.id,e.bucketId,e.groups.map(function(e){return Dt.fromJson(e)}))},Pt.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var Mt=Pt;function Pt(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Lt.fromJson=function(e){return new Lt(e.id,e.experiments)};var Dt=Lt;function Lt(e,t){this.id=e,this.experiments=t}Vt.fromJson=function(e){var t=Ge(Wt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return jt.fromJson(e,rr.PROPERTY)}),n=Ht.fromJson(e.defaultValue);return t&&new Vt(e.id,e.key,t,e.identifierType,r,n)};var Ft=Vt;function Vt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}zt.fromJson=function(e,t){t=wt.fromJson(e.target,t);return t&&new zt(e.key,e.name,t,e.bucketId,Ht.fromJson(e.value))};var jt=zt;function zt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Bt.fromJson=function(e){return new Bt(e.id,e.value)};var Ht=Bt;function Bt(e,t){this.id=e,this.rawValue=t}Kt.tryParse=function(e){var t,r,n,i,e=Kt.regExp.exec(e);if(e)return e[0],t=e[1],r=e[2],r=void 0===r?"0":r,n=e[3],n=void 0===n?"0":n,i=e[4],e=e[5],new Kt(new Jt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),qt.parse(i),qt.parse(e))},Kt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kt.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 Gt=Kt;function Kt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Yt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Jt=Yt;function Yt(e,t,r){this.major=e,this.minor=t,this.patch=r}$t.parse=function(e){return e?new $t(e.split(".")):$t.EMPTY},$t.prototype.isEmpty=function(){return 0===this.identifiers.length},$t.prototype.isNotEmpty=function(){return!this.isEmpty()},$t.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},$t.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=$t.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},$t.compareIdentifiers=function(e,t){return $t.numericIdentifierRegExp.test(e)&&$t.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},$t.EMPTY=new $t([]),$t.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var qt=$t;function $t(e){this.identifiers=e}var Xt=["MATCH","NOT_MATCH"],Wt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Zt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Qt=["VARIATION","BUCKET"],er=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],tr=["USER_ID","USER_PROPERTY"],rr=(nr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},nr.IDENTIFIER=new nr("SEGMENT"),nr.PROPERTY=new nr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),nr.SEGMENT=new nr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),nr);function nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var ir=["ACTIVE","DRAFT","PAUSE"],or=["WEB","ANDROID","IOS"],sr=["IMMEDIATE","CUSTOM"],ar=["MODAL","BANNER"],ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE"],cr=["VERTICAL","HORIZONTAL"],lr=["CLICK"],pr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],fr=["TOP","MIDDLE","BOTTOM"],hr=["LEFT","CENTER","RIGHT"],dr=(vr.fromJson=function(e){var t,r=Ge(ir,e.status);if(!a.isNullOrUndefined(r)){switch(Ge(sr,e.timeUnit)){case"IMMEDIATE":t=new yr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=kr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(br.fromJson),i=_r.fromJson(e.eventFrequencyCap),new vr(e.id,e.key,r,t,new wr(n,i),Sr.fromJson(e.targetContext),o)}},vr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},vr);function vr(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}mr.prototype.within=function(e){return!0};var yr=mr;function mr(){this.type="IMMEDIATE"}Er.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var gr=Er;function Er(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var wr=function(e,t){this.rules=e,this.frequencyCap=t},br=(Tr.fromJson=function(e){return new Tr(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))},Tr);function Tr(e,t){this.eventKey=e,this.targets=t}Ir.fromJson=function(e){return e?new Ir(e.identifiers.map(Or.fromJson),Nr.fromJson(e.duration)):null};var _r=Ir;function Ir(e,t){this.identifierCaps=e,this.durationCap=t}Ar.fromJson=function(e){return new Ar(e.identifierType,e.countPerIdentifier)};var Or=Ar;function Ar(e,t){this.identifierType=e,this.count=t}Rr.fromJson=function(e){if(!e)return null;var t=Ge(Pe,e.durationUnit.timeUnit);return t?new Rr(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Nr=Rr;function Rr(e,t){this.durationMillis=e,this.count=t}xr.fromJson=function(e){return new xr(e.overrides.map(Cr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var Sr=xr;function xr(e,t){this.overrides=e,this.targets=t}Ur.fromJson=function(e){return new Ur(e.identifierType,e.identifiers)};var Cr=Ur;function Ur(e,t){this.identifierType=e,this.identifiers=t}Mr.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new Pr(e.exposure.key)),Ke(or,e.platformTypes));if(!a.isNullOrUndefined(r)){var n=Ke(cr,e.orientations);if(!a.isNullOrUndefined(n)){var i=p.mapOrUndefined(e.messages,Dr.fromJson);if(!a.isNullOrUndefined(i))return new Mr(e.defaultLang,t,r,n,i)}}};var kr=Mr;function Mr(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var Pr=function(e){this.key=e},Dr=(Lr.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Hr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,$r.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=$r.fromJson2(e.closeButton),!a.isNullOrUndefined(i))){var o=p.mapOrUndefined(e.outerButtons,Wr.fromJson);if(!a.isNullOrUndefined(o))return new Lr(e.variationKey,e.lang,t,r,e.text?Gr.fromJson(e.text):void 0,n,i,new en(e.background.color),e.action?tn.fromJson(e.action):void 0,o)}}}}},Lr.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,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},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()})}},Lr);function Lr(e,t,r,n,i,o,s,a,u,c){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.text=i,this.buttons=o,this.closeButton=s,this.background=a,this.action=u,this.outerButtons=c}Vr.fromJson=function(e){var t=Ge(ur,e.layoutType),r=Ge(ar,e.displayType);if(!a.isNullOrUndefined(r)&&!a.isNullOrUndefined(t))return new Vr(r,t,e.alignment?jr.fromJson(e.alignment):void 0)};var Fr=Vr;function Vr(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}zr.fromJson=function(e){var t=Ge(hr,e.horizontal);if(!a.isNullOrUndefined(t)){e=Ge(fr,e.vertical);if(!a.isNullOrUndefined(e))return new zr(t,e)}},zr.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var jr=zr;function zr(e,t){this.horizontal=e,this.vertical=t}Br.fromJson=function(e){var t=Ge(cr,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=tn.fromJson(e.action),!a.isNullOrUndefined(r)))return new Br(t,e.imagePath,r)}},Br.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}};var Hr=Br;function Br(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}Kr.fromJson=function(e){return new Kr(Jr.fromJson(e.title),Jr.fromJson(e.body))},Kr.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}}}};var Gr=Kr;function Kr(e,t){this.title=e,this.body=t}Yr.fromJson=function(e){return new Yr(e.text,new qr(e.style.textColor))};var Jr=Yr;function Yr(e,t){this.text=e,this.style=t}var qr=function(e){this.color=e},$r=(Xr.fromJson=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr(e.text,new Qr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Xr.fromJson2=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Xr("✕",new Qr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Xr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Xr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Xr);function Xr(e,t,r){this.text=e,this.style=t,this.action=r}Zr.fromJson=function(e){var t=$r.fromJson(e.button);if(!a.isNullOrUndefined(t)){e=jr.fromJson(e.alignment);if(!a.isNullOrUndefined(e))return new Zr(t,e)}},Zr.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Wr=Zr;function Zr(e,t){this.button=e,this.alignment=t}var Qr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},en=function(e){this.color=e},tn=(rn.fromJson=function(e){var t=Ge(lr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ge(pr,e.type);if(!a.isNullOrUndefined(r))return new rn(t,r,null!=(t=e.value)?t:void 0)}},rn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},rn);function rn(e,t,r){this.behavior=e,this.type=t,this.value=r}var nn=function(e){this.id=e},on=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",sn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new sn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},sn);function sn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}un.fromJson=function(e){if(null!==e)return new un(p.mapNotNullOrUndefined(e.match,function(e){return wt.fromJson(e,rr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var an=un;function un(e,t){this.includeTargets=e,this.excludeTargets=t}var cn="X-HACKLE-SDK-KEY",ln="X-HACKLE-SDK-NAME",pn="X-HACKLE-SDK-VERSION",fn="X-HACKLE-SDK-TIME",hn=100,dn=6e4,vn=500,yn=3650,mn="_hackle_hid",gn="_hackle_id",En="hackle-repository-storage",wn="_hackle_session_id",bn="_hackle_last_event_ts",Tn="_hackle_uid",_n="_hackle_did",In="_hackle_mkt",On="hackle-manual-override_ab",An="hackle-manual-override_ff",Nn="hackle-iam-hide",Rn="hackle-iam-impression",Sn="hackle-split-url-redirected",xn=1/86400*3,Cn="hackle-workspace-config",Un=6e4,kn=(Mn.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},Mn.prototype.tag=function(e,t){return this._tags[e]=t,this},Mn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Mn);function Mn(e){this.name=e,this._tags={},this.name=e}Dn.start=function(e){return new Dn(e=void 0===e?Dn.defaultClock:e)},Dn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Dn.defaultClock=new Le;var Pn=Dn;function Dn(e){this._clock=e,this.startTime=this._clock.tick()}Fn.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},Fn.prototype.tag=function(e,t){return this._tags[e]=t,this},Fn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Ln=Fn;function Fn(e){this.name=e,this._tags={}}jn.prototype.values=function(){return Array.from(this.data.values())},jn.prototype.keys=function(){return Array.from(this.data.keys())},jn.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},jn.prototype.has=function(e){return void 0!==this.get(e)},jn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},jn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},jn.prototype.forEach=function(e){this.data.forEach(e)},jn.prototype.filter=function(e){for(var t=new jn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},jn.prototype.entries=function(){return Array.from(this.data.entries())};var Vn=jn;function jn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Hn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var zn=Hn;function Hn(e,t){this.valueSupplier=t,this.field=e}function Bn(e,t){return e.name===t.name&&xe.isEquals(e.tags,t.tags)}Object.defineProperty(Gn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Gn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Gn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Gn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Ln(e).tags(t).register(this)},Gn.prototype.timer=function(e,t){return void 0===t&&(t={}),new kn(e).tags(t).register(this)},Gn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Gn.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},Gn.prototype.close=function(){};B=Gn;function Gn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Vn(Bn)}Ne(Jn,Kn=B),Jn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),s.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Jn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},Jn.prototype.close=function(){this.stop()};var Kn,r=Jn;function Jn(e,t){var r=Kn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}qn.prototype.count=function(){return this.counterValue},qn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},qn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var Yn=qn;function qn(e){this.counterValue=0,this.id=e}Xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Yn(this.id),e},Xn.prototype.count=function(){return this.currentCounter.count()},Xn.prototype.increment=function(e){this.currentCounter.increment(e)},Xn.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var $n=Xn;function Xn(e){this.id=e,this.currentCounter=new Yn(e)}Zn.prototype.count=function(){return this._count},Zn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Zn.prototype.max=function(e){return De.nanosToUnit(this._max,e)},Zn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Zn.prototype.record=function(e,t){e<0||(t=De.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Zn.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Wn=Zn;function Zn(e){this._count=0,this._total=0,this._max=0,this.id=e}ei.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Wn(this.id),e},ei.prototype.count=function(){return this.currentTimer.count()},ei.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ei.prototype.max=function(e){return this.currentTimer.max(e)},ei.prototype.record=function(e,t){this.currentTimer.record(e,t)},ei.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ei.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var Qn=ei;function ei(e){this.id=e,this.currentTimer=new Wn(e)}Ne(ri,ti=r),ri.prototype.createCounter=function(e){return new $n(e)},ri.prototype.createTimer=function(e){return new Qn(e)},ri.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0===(r=t).flush||"function"!=typeof r.flush?e:e.concat(t.flush());var r},[]);this.flushMetrics(t,e)};var ti,e=ri;function ri(e,t){return ti.call(this,e,t)||this}ii.prototype.count=function(){return 0},ii.prototype.increment=function(e){},ii.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var ni=ii;function ii(e){this.id=e}Object.defineProperty(si.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),si.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},si.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},si.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},si.prototype.measure=function(){return[new zn("count",this.count.bind(this))]};var oi=si;function si(e){this._counters=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new ni(e)}ui.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]},ui.prototype.count=function(){return 0},ui.prototype.totalTime=function(e){return 0},ui.prototype.max=function(e){return 0},ui.prototype.mean=function(e){return 0},ui.prototype.record=function(e,t){};var ai=ui;function ui(e){this.id=e}Object.defineProperty(li.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),li.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},li.prototype.max=function(e){return this.firstTimer.max(e)},li.prototype.mean=function(e){return this.firstTimer.mean(e)},li.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(li.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),li.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},li.prototype.count=function(){return this.firstTimer.count()},li.prototype.measure=function(){var e=this;return[new zn("count",this.count.bind(this)),new zn("total",function(){return e.totalTime("milliseconds")}),new zn("max",function(){return e.max("milliseconds")}),new zn("mean",function(){return e.mean("milliseconds")})]};var ci=li;function li(e){this._timers=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new ai(e)}Ne(fi,pi=B),fi.prototype.createCounter=function(e){e=new oi(e);return this.addRegistry(e),e},fi.prototype.createTimer=function(e){e=new ci(e);return this.addRegistry(e),e},fi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},fi.prototype.add=function(r){r instanceof fi||this.registries.has(r)||(this.registries.add(r),this.metrics.forEach(function(e){var t;void 0!==(t=e).add&&"function"==typeof t.add&&e.add(r)}))},fi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var pi,o=fi;function fi(){var e=null!==pi&&pi.apply(this,arguments)||this;return e.registries=new Vn(function(e,t){return e.id===t.id}),e}di.counter=function(e,t){return di.globalRegistry.counter(e,t)},di.timer=function(e,t){return di.globalRegistry.timer(e,t)},di.addRegistry=function(e){di.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},di.globalRegistry=new o;var hi=di;function di(){}yi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},yi.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var vi=yi;function yi(){}gi.builder=function(){return new Ei},gi.get=function(e){return gi.builder().url(e).build()},gi.prototype.toBuilder=function(){return new Ei(this)};var mi=gi;function gi(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}wi.prototype.url=function(e){return this._url=e,this},wi.prototype.method=function(e){return this._method=e,this},wi.prototype.body=function(e){return this._body=e,this},wi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},wi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},wi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new mi(this._url,this._method,this._body,this._headers.build(),e)};var Ei=wi;function wi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:_i.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Ti.ok=function(e,t){return Ti.of(200,e,t)},Ti.of=function(e,t,r){return new Ti(e,null!=t?t:null,null!=r?r:_i.empty())},Ti.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Ti.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Ti.prototype.isNotModified=function(){return 304===this.statusCode};var bi=Ti;function Ti(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Ii.empty=function(){return new Ii(new Map)},Ii.builder=function(){return new Oi(new Map)},Ii.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(vi.equalsIgnoreCase(i,e))return n}return null},Ii.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ii.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},Ii.prototype.toBuilder=function(){return new Oi(this.headers)},Ii.IF_MODIFIED_SINCE="If-Modified-Since",Ii.LAST_MODIFIED="Last-Modified";var _i=Ii;function Ii(e){this.headers=e}Ai.prototype.add=function(e,t){return this.headers.set(e,t),this},Ai.prototype.build=function(){return new _i(this.headers)};var Oi=Ai;function Ai(e){this.headers=e}Ne(Si,Ni=e),Si.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),hn).forEach(function(e){r.dispatch(e,t)})},Si.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Si.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return s.log.debug("Failed to flushing metrics: ".concat(e))})},Si.prototype.createRequest=function(e){return mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Si.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Si.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Si.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.publish(!0)}};var Ni,Ri=Si;function Si(e,t,r,n,i){n=Ni.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Ci.experiment=function(e,t,r){t=hi.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Ci.featureFlag=function(e,t,r){t=hi.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Ci.remoteConfig=function(e,t,r){t=hi.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Ci.inAppMessage=function(e,t,r){t=hi.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var xi=Ci;function Ci(){}ki.record=function(e,t,r){e=hi.timer("api.call",{operation:e,success:ki.success(r)});t.stop(e)},ki.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Ui=ki;function ki(){}Pi.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)}},Pi.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Mi=Pi;function Pi(){}var Di=s.log,Li=(Fi.prototype.get=function(t,r){var n,e=Pn.start();try{n=this.decide(t,r)}catch(e){Di.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,h.EXCEPTION)}return xi.remoteConfig(e,t,n),n.value},Fi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Mi.decide(this.core,e,t,r)},Fi);function Fi(e,t,r){this.core=e,this.userManager=t,this.user=r}zi.prototype.contains=function(e){return this._properties.has(e)},zi.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},zi.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)},zi.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=ke.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},zi.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},zi.prototype.build=function(){return this._properties};var Vi,ji=zi;function zi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Vi=Vi||{}).SET="$set",i.SET_ONCE="$setOnce",i.UNSET="$unset",i.INCREMENT="$increment",i.APPEND="$append",i.APPEND_ONCE="$appendOnce",i.PREPEND="$prepend",i.PREPEND_ONCE="$prependOnce",i.REMOVE="$remove",i.CLEAR_ALL="$clearAll";Bi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t).build()};var Hi=Bi;function Bi(){}Ki.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new ji).addProperties(e).addProperties(t,!0).build()};var Gi=Ki;function Ki(){}Yi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new ji).addProperties(e).remove(t).build()};var Ji=Yi;function Yi(){}$i.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},$i.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var qi=$i;function $i(){}Xi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new ji;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Xi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Xi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Xi.prototype.contains=function(e,t){return e.includes(t)},Xi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Xi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Re(Re([],e,!0),[t],!1)};t=Xi;function Xi(){}Ne(Qi,Wi=t),Qi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Wi,Zi=Qi;function Qi(){return null!==Wi&&Wi.apply(this,arguments)||this}Ne(ro,eo=t),ro.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},ro.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var eo,to=ro;function ro(){return null!==eo&&eo.apply(this,arguments)||this}Ne(oo,no=t),oo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var no,io=oo;function oo(){return null!==no&&no.apply(this,arguments)||this}Ne(uo,so=t),uo.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)},uo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},uo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var so,ao=uo;function uo(){return null!==so&&so.apply(this,arguments)||this}Ne(po,co=t),po.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},po.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var co,lo=po;function po(){return null!==co&&co.apply(this,arguments)||this}ho.prototype.operate=function(e,t){return new Map};var fo=ho;function ho(){}yo.get=function(e){switch(e){case Vi.SET:return new Hi;case Vi.SET_ONCE:return new Gi;case Vi.UNSET:return new Ji;case Vi.INCREMENT:return new qi;case Vi.APPEND:return new Zi;case Vi.APPEND_ONCE:return new to;case Vi.PREPEND:return new io;case Vi.PREPEND_ONCE:return new ao;case Vi.CLEAR_ALL:return new fo;case Vi.REMOVE:return new lo}};var vo=yo;function yo(){}go.prototype.set=function(e,t){return this.add(Vi.SET,e,t)},go.prototype.setOnce=function(e,t){return this.add(Vi.SET_ONCE,e,t)},go.prototype.unset=function(e){return this.add(Vi.UNSET,e,"-")},go.prototype.increment=function(e,t){return this.add(Vi.INCREMENT,e,t)},go.prototype.append=function(e,t){return this.add(Vi.APPEND,e,t)},go.prototype.appendOnce=function(e,t){return this.add(Vi.APPEND_ONCE,e,t)},go.prototype.prepend=function(e,t){return this.add(Vi.PREPEND,e,t)},go.prototype.prependOnce=function(e,t){return this.add(Vi.PREPEND_ONCE,e,t)},go.prototype.remove=function(e,t){return this.add(Vi.REMOVE,e,t)},go.prototype.clearAll=function(){return this.add(Vi.CLEAR_ALL,"clearAll","-")},go.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Eo(new Map(e))},go.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},go.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new ji);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var mo=go;function go(){this.operations=new Map}wo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=vo.get(t).operate(r,e)}),r},wo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),ke.sanitize(a.fromMap(e))),r))}),i},wo.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n};var Eo=wo;function wo(e){this.operations=null!=e?e:new Map}To.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})};var bo=To;function To(){}var _o=s.log,Io=(Oo.prototype.initialize=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),_o.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),_o.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),_o.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},Oo.prototype.getSessionId=function(){return this.sessionManager.sessionId},Oo.prototype.getUser=function(){return this.userManager.currentUser},Oo.prototype.setUser=function(e){try{var t=Et(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(_o.warn("invalid user"),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},Oo.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=xe.sanitizeValue(e);if(!t)return _o.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return _o.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},Oo.prototype.setDeviceId=function(e){try{var t=xe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(_o.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return _o.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},Oo.prototype.setUserProperty=function(e,t){e=(new mo).set(e,t).build();return this.updateUserProperties(e)},Oo.prototype.setUserProperties=function(e){try{var t=ke.sanitize(e),r=new mo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return _o.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},Oo.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return _o.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},Oo.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new mo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return _o.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},Oo.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},Oo.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Pn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return _o.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Xe.of(i,h.EXCEPTION)}}(this);return xi.experiment(e,r,t),t},Oo.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},Oo.prototype.featureFlagDetail=function(r,n){var e=Pn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return _o.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}}(this);return xi.featureFlag(e,r,t),t},Oo.prototype.track=function(e,t){try{_o.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){_o.error("Unexpected exception while tracking event: ".concat(e))}},Oo.prototype.trackPageView=function(e){_o.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},Oo.prototype.remoteConfig=function(e){return new Li(this.core,this.userManager,e)},Oo.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},Oo.prototype.onInitialized=function(r){var n;return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,bo.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),_o.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},Oo.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},Oo.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(_o.debug("UserExplorer opened."),hi.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):_o.error("UserExplorer is not provided")},Oo.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():_o.warn("There is no active HackleDevtools.")},Oo.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},Oo.prototype.close=function(){_o.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},Oo);function Oo(e,t,r,n,i,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.devTools=o,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}var Ao=s.log,No=(Ro.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return Ao.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Ro);function Ro(e,t){this.invocationProcessor=e,this.user=t}xo.tryParse=function(e){try{return new URL(e)}catch(e){return}},xo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:xo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},xo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},xo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},xo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},xo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var So=xo;function xo(){}Uo.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]:""},Uo.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return null!=(t=So.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Uo.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},Uo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Uo.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},Uo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Uo.prototype.getOptions=function(){return this.options},Uo.getInstance=function(e){return void 0===e&&(e={days:yn,isCrossSubdomain:!0}),Uo.storage=Uo.storage?Uo.storage:new Uo(e)};var Co=Uo;function Uo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Mo.prototype.initialize=function(){Co.getInstance().getItem(mn)||Lo()},Mo.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void Do()}};var ko=Mo;function Mo(){}function Po(){var e=Co.getInstance(),t=e.getItem(gn);if(t)return t;t=e.getItem(mn);return t||Lo()}function Do(){Co.getInstance().removeItem(gn)}function Lo(){var e=H();return Co.getInstance().setItem(mn,e),e}var Fo,Vo=s.log;(r=Fo=Fo||{}).native="native",r.web_view_wrapper="web_view_wrapper";zo.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Po()}catch(e){return Vo.error("Unexpected exception while get sessionId: ".concat(e)),Po()}},zo.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Et(t))?e:this.defaultUser()}catch(e){return Vo.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},zo.prototype.setUser=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Et(n)))return Vo.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Vo.error("Unexpected exception while set user: ".concat(e))}return[2]})})},zo.prototype.setUserId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return Vo.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Vo.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},zo.prototype.setDeviceId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=xe.sanitizeValue(n)))return Vo.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Vo.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},zo.prototype.setUserProperty=function(r,n){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Vo.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},zo.prototype.setUserProperties=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=ke.sanitize(n),r=new mo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Vo.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},zo.prototype.updateUserProperties=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Vo.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},zo.prototype.resetUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Vo.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},zo.prototype.variation=function(t,e,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return Vo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},zo.prototype.variationDetail=function(t,e,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return Xe.of(o.variation,o.reason,new ze(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(e){return Vo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Xe.of(r,h.EXCEPTION)}},zo.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return Vo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},zo.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ze(i.isOn,i.reason,new ze(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))),void 0)}catch(e){return Vo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}},zo.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){Vo.error("Unexpected exception while tracking event: ".concat(e))}},zo.prototype.trackPageView=function(e){Vo.info("Web to app integration feature is not support 'trackPageView' method")},zo.prototype.remoteConfig=function(e){return new No(this.invocationProcessor,this.convertUser(e))},zo.prototype.onReady=function(e,t){e()},zo.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Vo.error("Unexpected exception while show userExplorer: ".concat(e))}},zo.prototype.hideUserExplorer=function(){Vo.info("Web to app integration feature is not support 'hideUserExplorer' method")},zo.prototype.fetch=function(){return Promise.resolve()},zo.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},zo.prototype.close=function(){Vo.info("Web to app integration feature is not support 'close' method")},zo.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},zo.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Et(e))?e:void 0},zo.prototype.defaultUser=function(){return{deviceId:Po()}};var jo=zo;function zo(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this)}Bo.prototype.getSessionId=function(){return this.browser.getSessionId()},Bo.prototype.getUser=function(){return this.browser.getUser()},Bo.prototype.syncUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},Bo.prototype.setUser=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.setUserId=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.setDeviceId=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.setUserProperty=function(t,r){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.setUserProperties=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.updateUserProperties=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.resetUser=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Bo.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},Bo.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},Bo.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},Bo.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},Bo.prototype.track=function(e,t){return this.browser.track(e,t)},Bo.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},Bo.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},Bo.prototype.onReady=function(e,t){this.browser.onReady(e,t)},Bo.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},Bo.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},Bo.prototype.fetch=function(){return this.browser.fetch()},Bo.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},Bo.prototype.close=function(){this.browser.close()};var Ho=Bo;function Bo(e,t){this.browser=e,this.app=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this)}function Go(e){return e&&e.Math==Math&&e}function Ko(e){try{return!!e()}catch(e){return!0}}function Jo(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Yo(e){return xs(Ss(e),8,-1)}function qo(e){if(null==e)throw Ms("Can't call method on "+e);return e}function $o(e){return Ps(Ds(e))}function Xo(e){return"function"==typeof e}function Wo(e){return"object"==typeof e?null!==e:Ls(e)}function Zo(e,t){return arguments.length<2?(r=Fs[e],Vs(r)?r:void 0):Fs[e]&&Fs[e][t];var r}function Qo(e){try{return qs(e)}catch(e){return"Object"}}function es(e){if($s(e))return e;throw Ws(Xs(e)+" is not a function")}function ts(e,t){return null==(e=e[t])?void 0:Zs(e)}function rs(t,r){try{ia(na,t,{value:r,configurable:!0,writable:!0})}catch(e){na[t]=r}return r}function ns(e){return ua(aa(e))}function is(e){return"Symbol("+(void 0===e?"":e)+")_"+da(++fa+ha,36)}function os(e){var t;return ya(wa,e)&&(ga||"string"==typeof wa[e])||(t="Symbol."+e,ga&&ya(ba,e)?wa[e]=ba[e]:wa[e]=(Ea&&Ta?Ta:_a)(t)),wa[e]}function ss(e){return e=Ca(e,"string"),Ua(e)?e:e+""}function as(e){return Ma?ka.createElement(e):{}}function us(e){if(Ga(e))return e;throw Ja(Ka(e)+" is not an object")}function cs(e){return au[e]||(au[e]=su(e))}function ls(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Ou(r)&&Nu(r,o,n),n.global)i?e[t]=r:Ru(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Au.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ps(e){return(e=+e)!=e||0==e?0:Cu(e)}function fs(e,t){return(e=Uu(e))<0?ku(e+t,0):Mu(e,t)}function v(e){return Lu(e.length)}function hs(a){return function(e,t,r){var n,i=Fu(e),o=ju(i),s=Vu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function ds(e,t){var r,n=Hu(e),i=0,o=[];for(r in n)!zu(Gu,r)&&zu(n,r)&&Ku(o,r);for(;t.length>i;)!zu(n,r=t[i++])||~Bu(o,r)||Ku(o,r);return o}function vs(e,t,r){for(var n=Qu(t),i=tc.f,o=ec.f,s=0;s<n.length;s++){var a=n[s];Zu(e,a)||r&&Zu(r,a)||i(e,a,o(t,a))}}function ys(e,t){return(e=sc[oc(e)])==uc||e!=ac&&(nc(t)?rc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?cc:a?cc[o]||hc(o,{}):(cc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=lc(u,r))&&i.value:u[r],!vc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;dc(n,i)}(e.sham||i&&i.sham)&&pc(n,"sham",!0),fc(u,r,n,e)}}var ms,gs,Es,ws,bs,Ts,_s,Is,B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=Go("object"==typeof globalThis&&globalThis)||Go("object"==typeof window&&window)||Go("object"==typeof self&&self)||Go("object"==typeof B&&B)||function(){return this}()||Function("return this")(),e={},i=!Ko(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!Ko(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Os=Function.prototype.call,r=t?Os.bind(Os):function(){return Os.apply(Os,arguments)},B={},m={}.propertyIsEnumerable,As=Object.getOwnPropertyDescriptor,g=As&&!m.call({1:2},1),g=(B.f=g?function(e){e=As(this,e);return!!e&&e.enumerable}:m,t),m=Function.prototype,E=m.bind,Ns=m.call,Rs=g&&E.bind(Ns,Ns),m=g?function(e){return e&&Rs(e)}:function(e){return e&&function(){return Ns.apply(e,arguments)}},E=m,Ss=E({}.toString),xs=E("".slice),g=Ko,Cs=Yo,Us=Object,ks=m("".split),E=g(function(){return!Us("z").propertyIsEnumerable(0)})?function(e){return"String"==Cs(e)?ks(e,""):Us(e)}:Us,Ms=TypeError,Ps=E,Ds=qo,Ls=Xo,Fs=o,Vs=Xo,g=m({}.isPrototypeOf),js=Zo("navigator","userAgent")||"",w=js,zs=o.process,Hs=o.Deno,zs=zs&&zs.versions||Hs&&Hs.version,Hs=zs&&zs.v8,zs=T=!(T=Hs?0<(b=Hs.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&w&&(!(b=w.match(/Edge\/(\d+)/))||74<=b[1])&&(b=w.match(/Chrome\/(\d+)/))?+b[1]:T,Bs=zs,Hs=Ko,w=!!Object.getOwnPropertySymbols&&!Hs(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Bs&&Bs<41}),b=w&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Gs=Zo,Ks=Xo,Js=g,Ys=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Gs("Symbol");return Ks(t)&&Js(t.prototype,Ys(e))},qs=String,$s=Xo,Xs=Qo,Ws=TypeError,Zs=es,Qs=r,ea=Xo,ta=Wo,ra=TypeError,Hs={exports:{}},na=o,ia=Object.defineProperty,oa=rs,_="__core-js_shared__",oa=o[_]||oa(_,{}),sa=oa,aa=((Hs.exports=function(e,t){return sa[e]||(sa[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"}),qo),ua=Object,ca=ns,la=m({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return la(ca(e),t)},pa=m,fa=0,ha=Math.random(),da=pa(1..toString),pa=o,va=Hs.exports,ya=_,ma=is,ga=w,Ea=b,wa=va("wks"),ba=pa.Symbol,Ta=ba&&ba.for,_a=Ea?ba:ba&&ba.withoutSetter||ma,Ia=r,Oa=Wo,Aa=T,Na=ts,Ra=function(e,t){var r,n;if("string"===t&&ea(r=e.toString)&&!ta(n=Qs(r,e)))return n;if(ea(r=e.valueOf)&&!ta(n=Qs(r,e)))return n;if("string"!==t&&ea(r=e.toString)&&!ta(n=Qs(r,e)))return n;throw ra("Can't convert object to primitive value")},Sa=TypeError,xa=os("toPrimitive"),Ca=function(e,t){if(!Oa(e)||Aa(e))return e;var r=Na(e,xa);if(r){if(r=Ia(r,e,t=void 0===t?"default":t),!Oa(r)||Aa(r))return r;throw Sa("Can't convert object to primitive value")}return Ra(e,t=void 0===t?"number":t)},Ua=T,w=Wo,ka=o.document,Ma=w(ka)&&w(ka.createElement),Pa=as,b=!i&&!Ko(function(){return 7!=Object.defineProperty(Pa("div"),"a",{get:function(){return 7}}).a}),Da=r,La=B,Fa=Jo,Va=$o,ja=ss,za=_,Ha=b,Ba=Object.getOwnPropertyDescriptor,va=(e.f=i?Ba:function(e,t){if(e=Va(e),t=ja(t),Ha)try{return Ba(e,t)}catch(e){}if(za(e,t))return Fa(!Da(La.f,e,t),e[t])},{}),pa=i&&Ko(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ga=Wo,Ka=String,Ja=TypeError,Ya=b,qa=us,$a=ss,Xa=TypeError,Wa=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,Qa="enumerable",eu="configurable",tu="writable",ma=(va.f=i?pa?function(e,t,r){var n;return qa(e),t=$a(t),qa(r),"function"==typeof e&&"prototype"===t&&"value"in r&&tu in r&&!r[tu]&&((n=Za(e,t))&&n[tu]&&(e[t]=r.value,r={configurable:(eu in r?r:n)[eu],enumerable:(Qa in r?r:n)[Qa],writable:!1})),Wa(e,t,r)}:Wa:function(e,t,r){if(qa(e),t=$a(t),qa(r),Ya)try{return Wa(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Xa("Accessors not supported");return"value"in r&&(e[t]=r.value),e},i),ru=va,nu=Jo,T=ma?function(e,t,r){return ru.f(e,t,nu(1,r))}:function(e,t,r){return e[t]=r,e},w={exports:{}},B=i,b=_,ma=Function.prototype,I=B&&Object.getOwnPropertyDescriptor,b=b(ma,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!B||I(ma,"name").configurable)},B=Xo,I=oa,iu=m(Function.toString),ma=(B(I.inspectSource)||(I.inspectSource=function(e){return iu(e)}),I.inspectSource),B=Xo,I=ma,ou=o.WeakMap,B=B(ou)&&/native code/.test(I(ou)),I=Hs.exports,su=is,au=I("keys"),ou={},Hs=m,uu=Wo,cu=T,lu=_,I=oa,pu=cs,fu=ou,hu="Object already initialized",du=o.TypeError,O=o.WeakMap,B=(_s=B||I.state?(ms=I.state||(I.state=new O),gs=Hs(ms.get),Es=Hs(ms.has),ws=Hs(ms.set),bs=function(e,t){if(Es(ms,e))throw new du(hu);return t.facade=e,ws(ms,e,t),t},Ts=function(e){return gs(ms,e)||{}},function(e){return Es(ms,e)}):(fu[Is=pu("state")]=!0,bs=function(e,t){if(lu(e,Is))throw new du(hu);return t.facade=e,cu(e,Is,t),t},Ts=function(e){return lu(e,Is)?e[Is]:{}},function(e){return lu(e,Is)}),{set:bs,get:Ts,has:_s,enforce:function(e){return _s(e)?Ts(e):bs(e,{})},getterFor:function(t){return function(e){if(uu(e)&&(e=Ts(e)).type===t)return e;throw du("Incompatible receiver, "+t+" required")}}}),I=Ko,vu=Xo,yu=_,mu=i,gu=b.CONFIGURABLE,Eu=ma,wu=B.enforce,bu=B.get,Tu=Object.defineProperty,_u=mu&&!I(function(){return 8!==Tu(function(){},"length",{value:8}).length}),Iu=String(String).split("String"),O=w.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),(!yu(e,"name")||gu&&e.name!==t)&&(mu?Tu(e,"name",{value:t,configurable:!0}):e.name=t),_u&&r&&yu(r,"arity")&&e.length!==r.arity&&Tu(e,"length",{value:r.arity});try{r&&yu(r,"constructor")&&r.constructor?mu&&Tu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=wu(e);return yu(r,"source")||(r.source=Iu.join("string"==typeof t?t:"")),e},Ou=(Function.prototype.toString=O(function(){return vu(this)&&bu(this).source||Eu(this)},"toString"),Xo),Au=va,Nu=w.exports,Ru=rs,Hs={},Su=Math.ceil,xu=Math.floor,Cu=Math.trunc||function(e){e=+e;return(0<e?xu:Su)(e)},Uu=ps,ku=Math.max,Mu=Math.min,Pu=ps,Du=Math.min,Lu=function(e){return 0<e?Du(Pu(e),9007199254740991):0},Fu=$o,Vu=fs,ju=v,fu={includes:hs(!0),indexOf:hs(!1)},pu=m,zu=_,Hu=$o,Bu=fu.indexOf,Gu=ou,Ku=pu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ju=ds,Yu=I.concat("length","prototype"),O=(Hs.f=Object.getOwnPropertyNames||function(e){return Ju(e,Yu)},{}),pu=(O.f=Object.getOwnPropertySymbols,Zo),qu=Hs,$u=O,Xu=us,Wu=m([].concat),O=pu("Reflect","ownKeys")||function(e){var t=qu.f(Xu(e)),r=$u.f;return r?Wu(t,r(e)):t},Zu=_,Qu=O,ec=e,tc=va,rc=Ko,nc=Xo,ic=/#|\.prototype\./,oc=ys.normalize=function(e){return String(e).replace(ic,".").toLowerCase()},sc=ys.data={},ac=ys.NATIVE="N",uc=ys.POLYFILL="P",pu=ys,cc=o,lc=e.f,pc=T,fc=ls,hc=rs,dc=vs,vc=pu,O=!Ko(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),yc=_,mc=Xo,gc=ns,Ec=cs("IE_PROTO"),wc=Object,bc=wc.prototype,O=O?wc.getPrototypeOf:function(e){e=gc(e);if(yc(e,Ec))return e[Ec];var t=e.constructor;return mc(t)&&e instanceof t?t.prototype:e instanceof wc?bc:null},Tc=Xo,_c=String,Ic=TypeError,Oc=m,Ac=us,Nc=function(e){if("object"==typeof e||Tc(e))return e;throw Ic("Can't set "+_c(e)+" as a prototype")},Rc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Oc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Ac(e),Nc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Sc={},xc=ds,Cc=I,A=Object.keys||function(e){return xc(e,Cc)},Uc=va,kc=us,Mc=$o,Pc=A;Sc.f=i&&!pa?Object.defineProperties:function(e,t){kc(e);for(var r,n=Mc(t),i=Pc(t),o=i.length,s=0;s<o;)Uc.f(e,r=i[s++],n[r]);return e};function Dc(){}function Lc(e){e.write(il("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Fc(e,t){return fl(e),void 0===t?e:hl?dl(e,t):function(){return e.apply(t,arguments)}}function Vc(e){return void 0!==e&&(vl.Array===e||ml[yl]===e)}function jc(e){if(null!=e)return Il(e,Al)||Il(e,"@@iterator")||Ol[_l(e)]}function zc(e,t){if(t=arguments.length<2?Cl(e):t,Rl(t))return Sl(Nl(t,e));throw Ul(xl(e)+" is not iterable")}function Hc(e,t,r){var n,i;Ml(e);try{if(!(n=Pl(e,"return"))){if("throw"===t)throw r;return r}n=kl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Ml(n),r}function Bc(e,t){this.stopped=e,this.result=t}function Gc(e,t,r){function n(e){return o&&Kl(o,"normal",e),new Bc(!0,e)}function i(e){return f?(Fl(e),v?y(e[0],e[1],n):y(e[0],e[1])):v?y(e,n):y(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Dl(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Gl(e)))throw Jl(Vl(e)+" is not iterable");if(jl(r)){for(s=0,a=zl(e);s<a;s++)if((u=i(e[s]))&&Hl(Yl,u))return u;return new Bc(!1)}o=Bl(e,r)}for(c=(h?e:o).next;!(l=Ll(c,o)).done;){try{u=i(l.value)}catch(e){Kl(o,"throw",e)}if("object"==typeof u&&u&&Hl(Yl,u))return u}return new Bc(!1)}function Kc(e){if("Symbol"===ql(e))throw TypeError("Cannot convert a Symbol value to a string");return $l(e)}function Jc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Zl(fp,this);return ep?r=ep(new lp,i?Ql(this):fp):(r=i?this:tp(fp),rp(r,cp,"Error")),void 0!==t&&rp(r,"message",ap(t)),up&&rp(r,"stack",ip(r.stack,1)),op(r,n),sp(e,pp,{that:i=[]}),rp(r,"errors",i),r}function Yc(e){dp[hp][e]=!0}var qc,$c,A=Zo("document","documentElement"),Xc=us,Wc=Sc,Zc=I,pa=ou,Qc=A,el=as,tl="prototype",rl="script",nl=cs("IE_PROTO"),il=function(e){return"<"+rl+">"+e+"</"+rl+">"},ol=function(){try{qc=new ActiveXObject("htmlfile")}catch(e){}ol="undefined"==typeof document||document.domain&&qc?Lc(qc):(e=el("iframe"),t="java"+rl+":",e.style.display="none",Qc.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(il("document.F=Object")),t.close(),t.F);for(var e,t,r=Zc.length;r--;)delete ol[tl][Zc[r]];return ol()},Sc=(pa[nl]=!0,Object.create||function(e,t){var r;return null!==e?(Dc[tl]=Xc(e),r=new Dc,Dc[tl]=null,r[nl]=e):r=ol(),void 0===t?r:Wc.f(r,t)}),sl=Error,al=m("".replace),I=String(sl("zxcasd").stack),ul=/\n\s*at [^:]*:[^\n]*/,cl=ul.test(I),ll=Wo,pl=T,fl=es,hl=t,dl=m(m.bind),pa={},vl=pa,yl=os("iterator"),ml=Array.prototype,I={},I=(I[os("toStringTag")]="z","[object z]"===String(I)),N=I,gl=Xo,El=Yo,wl=os("toStringTag"),bl=Object,Tl="Arguments"==El(function(){return arguments}()),N=N?El: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=bl(e),wl))?t:Tl?El(e):"Object"==(t=El(e))&&gl(e.callee)?"Arguments":t},_l=N,Il=ts,Ol=pa,Al=os("iterator"),Nl=r,Rl=es,Sl=us,xl=Qo,Cl=jc,Ul=TypeError,kl=r,Ml=us,Pl=ts,Dl=Fc,Ll=r,Fl=us,Vl=Qo,jl=Vc,zl=v,Hl=g,Bl=zc,Gl=jc,Kl=Hc,Jl=TypeError,Yl=Bc.prototype,ql=N,$l=String,Xl=Kc,Wl=Jo,R=!Ko(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Wl(1,7)),7!==e.stack)}),S=y,Zl=g,Ql=O,ep=Rc,x=vs,tp=Sc,rp=T,np=Jo,ip=function(e,t){if(cl&&"string"==typeof e&&!sl.prepareStackTrace)for(;t--;)e=al(e,ul,"");return e},op=function(e,t){ll(t)&&"cause"in t&&pl(e,"cause",t.cause)},sp=Gc,ap=function(e,t){return void 0===e?arguments.length<2?"":t:Xl(e)},up=R,cp=os("toStringTag"),lp=Error,pp=[].push,fp=(ep?ep(Jc,lp):x(Jc,lp,{name:!0}),Jc.prototype=tp(lp.prototype,{constructor:np(1,Jc),message:np(1,""),name:np(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:Jc}),os),x=Sc,np=va.f,hp=R("unscopables"),dp=Array.prototype,S=(null==dp[hp]&&np(dp,hp,{configurable:!0,value:x(null)}),Ko),R=Xo,np=O,x=ls,vp=os("iterator"),yp=!1;[].keys&&("next"in(C=[].keys())?(np=np(np(C)))!==Object.prototype&&($c=np):yp=!0);function mp(e,t,r){(e=e&&!r?e.prototype:e)&&!Tp(e,_p)&&bp(e,_p,{configurable:!0,value:t})}function gp(){return this}function Ep(){return this}function wp(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!Hp&&e in p)return p[e];switch(e){case"keys":case Gp:case Kp:return function(){return new r(this,e)}}return function(){return new r(this)}}Up(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[Bp]||p["@@iterator"]||i&&p[i],h=!Hp&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=kp(d.call(new e)))!==Object.prototype&&d.next&&(kp(d)!==zp&&(Mp?Mp(d,zp):Cp(d[Bp])||Lp(d,Bp,Ep)),Pp(d,n,!0)),Vp&&i==Gp&&f&&f.name!==Gp&&(jp?Dp(p,"name",Gp):(l=!0,h=function(){return xp(f,this)})),i)if(u={values:a(Gp),keys:o?h:a("keys"),entries:a(Kp)},s)for(c in u)!Hp&&!l&&c in p||Lp(p,c,u[c]);else Sp({target:t,proto:!0,forced:Hp||l},u);return p[Bp]!==h&&Lp(p,Bp,h,{name:i}),Fp[t]=h,u}R(($c=null==$c||S(function(){var e={};return $c[vp].call(e)!==e})?{}:$c)[vp])||x($c,vp,function(){return this});var C={IteratorPrototype:$c,BUGGY_SAFARI_ITERATORS:yp},bp=va.f,Tp=_,_p=os("toStringTag"),Ip=C.IteratorPrototype,Op=Sc,Ap=Jo,Np=mp,Rp=pa,Sp=y,xp=r,Cp=Xo,Up=function(e,t,r,n){t+=" Iterator";return e.prototype=Op(Ip,{next:Ap(+!n,r)}),Np(e,t,!1),Rp[t]=gp,e},kp=O,Mp=Rc,Pp=mp,Dp=T,Lp=ls,np=os,Fp=pa,Vp=b.PROPER,jp=b.CONFIGURABLE,zp=C.IteratorPrototype,Hp=C.BUGGY_SAFARI_ITERATORS,Bp=np("iterator"),Gp="values",Kp="entries",Jp=$o,R=Yc,S=pa,x=B,yp=va.f,b=wp,C=i,Yp="Array Iterator",qp=x.set,$p=x.getterFor(Yp),np=b(Array,"Array",function(e,t){qp(this,{type:Yp,target:Jp(e),index:0,kind:t})},function(){var e=$p(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"),pa=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),C&&"values"!==pa.name)try{yp(pa,"name",{value:"values"})}catch(e){}var Xp=N;I||ls(Object.prototype,"toString",I?{}.toString:function(){return"[object "+Xp(this)+"]"},{unsafe:!0});function Wp(e){var e=sf(e),t=af.f;uf&&e&&!e[cf]&&t(e,cf,{configurable:!0,get:function(){return this}})}function Zp(e,t){if(lf(t,e))return e;throw pf("Incorrect invocation")}function Qp(){}function ef(e){if(!ff(e))return!1;try{return yf(Qp,vf,e),!0}catch(e){return!1}}function tf(e){if(!ff(e))return!1;switch(hf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ef||!!gf(mf,df(e))}catch(e){return!0}}function rf(e,t){return void 0===(e=_f(e).constructor)||null==(e=_f(e)[Of])?t:If(e)}var nf,of,x="process"==Yo(o.process),sf=Zo,af=va,uf=i,cf=os("species"),lf=g,pf=TypeError,b=m,S=Ko,ff=Xo,hf=N,df=ma,vf=[],yf=Zo("Reflect","construct"),mf=/^\s*(?:class|function)\b/,gf=b(mf.exec),Ef=!mf.exec(Qp),R=(tf.sham=!0,!yf||S(function(){var e;return ef(ef.call)||!ef(Object)||!ef(function(){e=!0})||e})?tf:ef),wf=R,bf=Qo,Tf=TypeError,_f=us,If=function(e){if(wf(e))return e;throw Tf(bf(e)+" is not a constructor")},Of=os("species"),C=Function.prototype,Af=C.apply,Nf=C.call,yp="object"==typeof Reflect&&Reflect.apply||(t?Nf.bind(Af):function(){return Nf.apply(Af,arguments)}),pa=m([].slice),Rf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(js),Sf=o,xf=yp,g=Fc,Cf=Xo,Uf=_,N=Ko,kf=A,Mf=pa,Pf=as,Df=function(e,t){if(e<t)throw Rf("Not enough arguments");return e},b=I,S=x,C=Sf.setImmediate,t=Sf.clearImmediate,Lf=Sf.process,Ff=Sf.Dispatch,Vf=Sf.Function,A=Sf.MessageChannel,jf=Sf.String,zf=0,Hf={},Bf="onreadystatechange";try{nf=Sf.location}catch(e){}function Gf(e){return function(){ah(e)}}function Kf(e){ah(e.data)}function Jf(e){Sf.postMessage(jf(e),nf.protocol+"//"+nf.host)}function Yf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function qf(){this.head=null,this.tail=null}function $f(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=wh(r),this.reject=wh(n)}function Xf(e,t){var r,n,i,o,s=t.value,a=t.state==$h,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===Zh&&(o=t,_h(Sh,Th,function(){var e=o.facade;bh?Bh.emit("rejectionHandled",e):td(qh,e,o.value)})),t.rejection=Wh),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(zh("Promise-chain cycle")):(n=Qh(r))?_h(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Wf,Zf,Qf,eh,th,rh,nh,ih,oh,sh,ah=function(e){var t;Uf(Hf,e)&&(t=Hf[e],delete Hf[e],t())},A=(C&&t||(C=function(e){Df(arguments.length,1);var t=Cf(e)?e:Vf(e),r=Mf(arguments,1);return Hf[++zf]=function(){xf(t,void 0,r)},of(zf),zf},t=function(e){delete Hf[e]},S?of=function(e){Lf.nextTick(Gf(e))}:Ff&&Ff.now?of=function(e){Ff.now(Gf(e))}:A&&!b?(b=(S=new A).port2,S.port1.onmessage=Kf,of=g(b.postMessage,b)):Sf.addEventListener&&Cf(Sf.postMessage)&&!Sf.importScripts&&nf&&"file:"!==nf.protocol&&!N(Jf)?(of=Jf,Sf.addEventListener("message",Kf,!1)):of=Bf in Pf("script")?function(e){kf.appendChild(Pf("script"))[Bf]=function(){kf.removeChild(this),ah(e)}}:function(e){setTimeout(Gf(e),0)}),{set:C,clear:t}),S=o,g=/ipad|iphone|ipod/i.test(js)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(js),N=o,C=Fc,t=e.f,uh=A.set,S=I,e=g,I=b,ch=x,g=N.MutationObserver||N.WebKitMutationObserver,b=N.document,lh=N.process,U=N.Promise,t=t(N,"queueMicrotask"),t=t&&t.value,I=(t||(Wf=function(){var e,t;for(ch&&(e=lh.domain)&&e.exit();Zf;){t=Zf.fn,Zf=Zf.next;try{t()}catch(e){throw Zf?eh():Qf=void 0,e}}Qf=void 0,e&&e.enter()},eh=S||ch||I||!g||!b?!e&&U&&U.resolve?((S=U.resolve(void 0)).constructor=U,nh=C(S.then,S),function(){nh(Wf)}):ch?function(){lh.nextTick(Wf)}:(uh=C(uh,N),function(){uh(Wf)}):(th=!0,rh=b.createTextNode(""),new g(Wf).observe(rh,{characterData:!0}),function(){rh.data=th=!th})),t||function(e){e={fn:e,next:void 0};Qf&&(Qf.next=e),Zf||(Zf=e,eh()),Qf=e}),ph=o,e=(qf.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}},qf),U=o.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,C=!S&&!x&&"object"==typeof window&&"object"==typeof document,N=o,fh=U,b=Xo,g=pu,hh=ma,t=os,dh=C,vh=S,yh=zs,mh=(fh&&fh.prototype,t("species")),gh=!1,Eh=b(N.PromiseRejectionEvent),ma={CONSTRUCTOR:g("Promise",function(){var e=hh(fh),t=e!==String(fh);if(!t&&66===yh)return!0;if(!yh||yh<51||!/native code/.test(e)){var e=new fh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[mh]=r,!(gh=e.then(function(){})instanceof r))return!0}return!t&&(dh||vh)&&!Eh}),REJECTION_EVENT:Eh,SUBCLASSING:gh},C={},wh=es,S=(C.f=function(e){return new $f(e)},y),bh=x,Th=o,_h=r,t=ls,b=Rc,N=mp,g=Wp,Ih=es,Oh=Xo,Ah=Wo,Nh=Zp,Rh=rf,Sh=A.set,xh=I,Ch=function(e,t){var r=ph.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Uh=Yf,kh=e,A=B,I=U,e=C,Mh="Promise",Ph=ma.CONSTRUCTOR,Dh=ma.REJECTION_EVENT,k=ma.SUBCLASSING,Lh=A.getterFor(Mh),Fh=A.set,A=I&&I.prototype,Vh=I,jh=A,zh=Th.TypeError,Hh=Th.document,Bh=Th.process,Gh=e.f,Kh=Gh,Jh=!!(Hh&&Hh.createEvent&&Th.dispatchEvent),Yh="unhandledrejection",qh="rejectionhandled",$h=1,Xh=2,Wh=1,Zh=2,Qh=function(e){var t;return!(!Ah(e)||!Oh(t=e.then))&&t},ed=function(r,i){r.notified||(r.notified=!0,xh(function(){for(var e,n,t=r.reactions;e=t.get();)Xf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,_h(Sh,Th,function(){var e=n.facade,t=n.value,r=rd(n);if(r&&(r=Uh(function(){bh?Bh.emit("unhandledRejection",t,e):td(Yh,e,t)}),n.rejection=bh||rd(n)?Zh:Wh,r.error))throw r.value}))}))},td=function(e,t,r){var n;Jh?((n=Hh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Th.dispatchEvent(n)):n={promise:t,reason:r},!Dh&&(t=Th["on"+e])?t(n):e===Yh&&Ch("Unhandled promise rejection",r)},rd=function(e){return e.rejection!==Wh&&!e.parent},nd=function(t,r,n){return function(e){t(r,e,n)}},id=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Xh,ed(e,!0))},od=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw zh("Promise can't be resolved itself");var n=Qh(e);n?xh(function(){var t={done:!1};try{_h(n,e,nd(od,t,r),nd(id,t,r))}catch(e){id(t,e,r)}}):(r.value=e,r.state=$h,ed(r,!1))}catch(e){id({done:!1},e,r)}}};if(Ph&&(jh=(Vh=function(e){Nh(this,jh),Ih(e),_h(ih,this);var t=Lh(this);try{e(nd(od,t),nd(id,t))}catch(e){id(t,e)}}).prototype,(ih=function(e){Fh(this,{type:Mh,done:!1,notified:!1,parent:!1,reactions:new kh,rejection:!1,state:0,value:void 0})}).prototype=t(jh,"then",function(e,t){var r=Lh(this),n=Gh(Rh(this,Vh));return r.parent=!0,n.ok=!Oh(e)||e,n.fail=Oh(t)&&t,n.domain=bh?Bh.domain:void 0,0==r.state?r.reactions.add(n):xh(function(){Xf(n,r)}),n.promise}),oh=function(){var e=new ih,t=Lh(e);this.promise=e,this.resolve=nd(od,t),this.reject=nd(id,t)},e.f=Gh=function(e){return e===Vh||void 0===e?new oh:Kh(e)},Oh(I)&&A!==Object.prototype)){sh=A.then,k||t(A,"then",function(e,t){var r=this;return new Vh(function(e,t){_h(sh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete A.constructor}catch(e){}b&&b(A,jh)}S({global:!0,constructor:!0,wrap:!0,forced:Ph},{Promise:Vh}),N(Vh,Mh,!1),g(Mh);var sd=os("iterator"),ad=!1;try{var ud=0,cd={next:function(){return{done:!!ud++}},return:function(){ad=!0}};cd[sd]=function(){return this},Array.from(cd,function(){throw 2})}catch(e){}function ld(e,t){if(!t&&!ad)return!1;var r=!1;try{var n={};n[sd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var pd=U,e=ld,I=ma.CONSTRUCTOR||!e(function(e){pd.all(e).then(void 0,function(){})}),fd=r,hd=es,dd=C,vd=Yf,yd=Gc,k=(y({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=dd.f(a),u=t.resolve,c=t.reject,r=vd(function(){var n=hd(a.resolve),i=[],o=0,s=1;yd(e,function(e){var t=o++,r=!1;s++,fd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),y),t=U,b=Zo,A=Xo,S=ls,Ph=t&&t.prototype;k({target:"Promise",proto:!0,forced:ma.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),A(t)&&(N=b("Promise").prototype.catch,Ph.catch!==N&&S(Ph,"catch",N,{unsafe:!0}));var md=r,gd=es,Ed=C,wd=Yf,bd=Gc;y({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=Ed.f(r),i=n.reject,t=wd(function(){var t=gd(r.resolve);bd(e,function(e){md(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function Td(e,t){return Od(e),Ad(t)&&t.constructor===e?t:((0,(e=Nd.f(e)).resolve)(t),e.promise)}var _d=r,Id=C,Od=(y({target:"Promise",stat:!0,forced:ma.CONSTRUCTOR},{reject:function(e){var t=Id.f(this);return _d(t.reject,void 0,e),t.promise}}),us),Ad=Wo,Nd=C,g=y,cd=Zo,e=ma.CONSTRUCTOR,Rd=Td;cd("Promise"),g({target:"Promise",stat:!0,forced:e},{resolve:function(e){return Rd(this,e)}});var Sd=r,xd=es,Cd=C,Ud=Yf,kd=Gc;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Cd.f(a),u=t.resolve,r=t.reject,n=Ud(function(){var n=xd(a.resolve),i=[],o=0,s=1;kd(e,function(e){var t=o++,r=!1;s++,Sd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}});function Md(i){return function(e,t){var r,e=qd($d(e)),t=Yd(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Wd(e,t))<55296||56319<r||t+1===n||(n=Wd(e,t+1))<56320||57343<n?i?Xd(e,t):r:i?Zd(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Pd=r,Dd=es,Ld=Zo,Fd=C,Vd=Yf,jd=Gc,zd="No one promise resolved",k=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=Ld("AggregateError"),t=Fd.f(u),l=t.resolve,p=t.reject,r=Vd(function(){var n=Dd(u.resolve),i=[],o=0,s=1,a=!1;jd(e,function(e){var t=o++,r=!1;s++,Pd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,zd)))})}),--s||p(new c(i,zd))});return r.error&&p(r.value),t.promise}}),y),A=U,t=Ko,Hd=Zo,Bd=Xo,Gd=rf,Kd=Td,b=ls,Jd=A&&A.prototype,Ph=(k({target:"Promise",proto:!0,real:!0,forced:!!A&&t(function(){Jd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Gd(this,Hd("Promise")),e=Bd(t);return this.then(e?function(e){return Kd(r,t()).then(function(){return e})}:t,e?function(e){return Kd(r,t()).then(function(){throw e})}:t)}}),Bd(A)&&(S=Hd("Promise").prototype.finally,Jd.finally!==S&&b(Jd,"finally",S,{unsafe:!0})),m),Yd=ps,qd=Kc,$d=qo,Xd=Ph("".charAt),Wd=Ph("".charCodeAt),Zd=Ph("".slice),Qd={codeAt:Md(!1),charAt:Md(!0)}.charAt,ev=Kc,N=B,I=wp,tv="String Iterator",rv=N.set,nv=N.getterFor(tv);I(String,"String",function(e){rv(this,{type:tv,string:ev(e),index:0})},function(){var e=nv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Qd(t,r),e.index+=t.length,{value:t,done:!1})});function iv(t,e){if(t){if(t[lv]!==fv)try{cv(t,lv,fv)}catch(e){t[lv]=fv}if(t[pv]||cv(t,pv,e),av[e])for(var r in uv)if(t[r]!==uv[r])try{cv(t,r,uv[r])}catch(e){t[r]=uv[r]}}}var ov,ma=o,cd=ma.Promise,g=as("span").classList,e=g&&g.constructor&&g.constructor.prototype,U=e===Object.prototype?void 0:e,sv=o,av={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},k=U,uv=np,cv=T,t=os,lv=t("iterator"),pv=t("toStringTag"),fv=uv.values;for(ov in av)iv(sv[ov]&&sv[ov].prototype,ov);iv(k,"DOMTokenList");var A,b,S=b=A=cd,Ph,hv=C,dv=Yf,vv=((Ph=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=hv.f(this),e=dv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),us),yv=Hc,mv=ss,gv=va,Ev=Jo,N,wv=Fc,bv=r,Tv=ns,_v=function(t,e,r,n){try{return n?e(vv(r)[0],r[1]):e(r)}catch(e){yv(t,"throw",e)}},Iv=Vc,Ov=R,Av=v,Nv=N=function(e,t,r){t=mv(t);t in e?gv.f(e,t,Ev(0,r)):e[t]=r},Rv=zc,Sv=jc,xv=Array,I,g=function(e){var t,r,n,i,o,s,a=Tv(e),e=Ov(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=wv(c,2<u?arguments[2]:void 0)),Sv(a)),p=0;if(!u||this===xv&&Iv(u))for(t=Av(a),r=e?new this(t):xv(t);p<t;p++)s=l?c(a[p],p):a[p],Nv(r,p,s);else for(o=(i=Rv(a,u)).next,r=e?new this:[];!(n=bv(o,i)).done;p++)s=l?_v(i,c,[n.value,p],!0):n.value,Nv(r,p,s);return r.length=p,r},e,U,Cv=((I=y)({target:"Array",stat:!0,forced:U=!(e=ld)(function(e){Array.from(e)})},{from:g}),Yo),np=Array.isArray||function(e){return"Array"==Cv(e)},T,t,k=((T=y)({target:"Array",stat:!0},{isArray:t=np}),y),cd=Ko,Uv=R,kv=N,Mv=Array,A=cd(function(){function e(){}return!(Mv.of.call(e)instanceof e)}),Pv=(k({target:"Array",stat:!0,forced:A},{of:function(){for(var e=0,t=arguments.length,r=new(Uv(this)?this:Mv)(t);e<t;)kv(r,e,arguments[e++]);return r.length=t,r}}),ns),Dv=v,Lv=ps,b=Yc,Fv=(y({target:"Array",proto:!0},{at:function(e){var t=Pv(this),r=Dv(t),e=Lv(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),S=function(e){if(9007199254740991<e)throw Fv("Maximum allowed index exceeded");return e},Vv=np,jv=R,zv=Wo,Hv=os("species"),Bv=Array,Gv=function(e){var t;return Vv(e)&&(t=e.constructor,(jv(t)&&(t===Bv||Vv(t.prototype))||zv(t)&&null===(t=t[Hv]))&&(t=void 0)),void 0===t?Bv:t},C=function(e,t){return new(Gv(e))(0===t?0:t)},Kv=Ko,Jv=zs,Yv=os("species"),Ph,e=y,I=Ko,qv=np,$v=Wo,Xv=ns,Wv=v,Zv=S,Qv=N,ey=C,U=Ph=function(t){return 51<=Jv||!Kv(function(){var e=[];return(e.constructor={})[Yv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},g=zs,ty=os("isConcatSpreadable"),T=51<=g||!I(function(){var e=[];return e[ty]=!1,e.concat()[0]!==e}),t=U("concat"),ry=(e({target:"Array",proto:!0,arity:1,forced:!T||!t},{concat:function(e){for(var t,r,n,i=Xv(this),o=ey(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!$v(e))return!1;var t=e[ty];return void 0!==t?!!t:qv(e)}(n=-1===a?i:arguments[a]))for(r=Wv(n),Zv(s+r),t=0;t<r;t++,s++)t in n&&Qv(o,s,n[t]);else Zv(s+1),Qv(o,s++,n);return o.length=s,o}}),Qo),ny=TypeError,cd,iy=ns,oy=fs,sy=v,ay=cd=function(e,t){if(!delete e[t])throw ny("Cannot delete property "+ry(t)+" of "+ry(e))},uy=Math.min,k=Yc,cy=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=iy(this),n=sy(r),i=oy(e,n),o=oy(t,n),e=2<arguments.length?arguments[2]:void 0,s=uy((void 0===e?n:oy(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:ay(r,i),i+=a,o+=a;return r}}),k("copyWithin"),Fc),ly=E,py=ns,fy=v,hy=C,dy=m([].push),A,b={forEach:(A=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var i,o,s=py(e),a=ly(s),u=cy(t,r),c=fy(a),l=0,t=n||hy,p=h?t(e,c):d||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(h)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:dy(p,i)}else switch(f){case 4:return!1;case 7:dy(p,i)}return m?-1:v||y?y:p}})(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)},vy=Ko,g=function(e,t){var r=[][e];return!!r&&vy(function(){r.call(null,t||function(){return 1},1)})},I=y,yy=b.every,my=(I({target:"Array",proto:!0,forced:!g("every")},{every:function(e){return yy(this,e,1<arguments.length?arguments[1]:void 0)}}),ns),gy=fs,Ey=v,U=Yc,e=(y({target:"Array",proto:!0},{fill:function(e){for(var t=my(this),r=Ey(t),n=arguments.length,i=gy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:gy(n,r);i<o;)t[i++]=e;return t}}),U("fill"),y),wy=b.filter,T=(e({target:"Array",proto:!0,forced:!Ph("filter")},{filter:function(e){return wy(this,e,1<arguments.length?arguments[1]:void 0)}}),y),by=b.find,t=Yc,k,Ty=!0,A=((k="find")in[]&&Array(1)[k](function(){Ty=!1}),T({target:"Array",proto:!0,forced:Ty},{find:function(e){return by(this,e,1<arguments.length?arguments[1]:void 0)}}),t(k),y),_y=b.findIndex,I=Yc,U,Iy=!0,Oy=((U="findIndex")in[]&&Array(1)[U](function(){Iy=!1}),A({target:"Array",proto:!0,forced:Iy},{findIndex:function(e){return _y(this,e,1<arguments.length?arguments[1]:void 0)}}),I(U),Fc),Ay=E,Ny=ns,Ry=v,e,T={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Ny(e),o=Ay(i),s=Oy(t,r),a=Ry(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}})(0),findLastIndex:e(1)},t=y,Sy=T.findLast,k=Yc,A=(t({target:"Array",proto:!0},{findLast:function(e){return Sy(this,e,1<arguments.length?arguments[1]:void 0)}}),k("findLast"),y),xy=T.findLastIndex,I=Yc,Cy=(A({target:"Array",proto:!0},{findLastIndex:function(e){return xy(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),np),Uy=v,ky=S,My=Fc,Py=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&My(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&Cy(u)?(c=Uy(u),l=Py(e,t,u,c,l,o-1)-1):(ky(l+1),e[l]=u),l++),p++;return l},U,Dy=U=Py,Ly=ns,Fy=v,Vy=ps,jy=C;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Ly(this),r=Fy(t),n=jy(t,0);return n.length=Dy(n,t,t,r,0,void 0===e?1:Vy(e)),n}});function zy(c){return function(e,t,r,n){hm(t);var i=dm(e),o=vm(i),s=ym(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw mm("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function Hy(e,t,r){for(var n=Pm(e),i=Mm(t,n),o=Mm(void 0===r?n:r,n),s=Lm(Fm(o-i,0)),a=0;i<o;i++,a++)Dm(s,a,e[i]);return s.length=a,s}function By(e,t){var r=e.length,n=jm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=By(Vm(e,0,n),t),f=By(Vm(e,n),t),h=t,d=p.length,v=f.length,y=0,m=0;y<d||m<v;)l[y+m]=y<d&&m<v?h(p[y],f[m])<=0?p[y++]:f[m++]:y<d?p[y++]:f[m++];return l}var Gy=U,Ky=es,Jy=ns,Yy=v,qy=C,$y=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=Jy(this),n=Yy(r);return Ky(e),(t=qy(r,0)).length=Gy(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),e=g("forEach")?[].forEach:function(e){return $y(this,e,1<arguments.length?arguments[1]:void 0)},t=(y({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),y),Xy=fu.includes,k=Yc,T=(t({target:"Array",proto:!0,forced:Ko(function(){return!Array(1).includes()})},{includes:function(e){return Xy(this,e,1<arguments.length?arguments[1]:void 0)}}),k("includes"),y),A=m,Wy=fu.indexOf,I=g,Zy=A([].indexOf),Qy=!!Zy&&1/Zy([1],1,-0)<0,U=I("indexOf"),e=(T({target:"Array",proto:!0,forced:Qy||!U},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Qy?Zy(this,e,t)||0:Wy(this,e,t)}}),y),t=E,em=$o,k=g,tm=m([].join),fu=t!=Object,A=k("join",","),rm=(e({target:"Array",proto:!0,forced:fu||!A},{join:function(e){return tm(em(this),void 0===e?",":e)}}),yp),nm=$o,im=ps,om=v,I=g,sm=Math.min,am=[].lastIndexOf,um=!!am&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),U=um||!T?function(e){if(um)return rm(am,this,arguments)||0;var t=nm(this),r=om(t),n=r-1;for((n=1<arguments.length?sm(n,im(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:am,t=(y({target:"Array",proto:!0,forced:U!==[].lastIndexOf},{lastIndexOf:U}),y),cm=b.map,k=(t({target:"Array",proto:!0,forced:!Ph("map")},{map:function(e){return cm(this,e,1<arguments.length?arguments[1]:void 0)}}),y),lm=ns,pm=v,fm=S,e=Ko(function(){return 4294967297!==[].push.call({length:4294967296},1)}),fu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),hm=(k({target:"Array",proto:!0,arity:1,forced:e||fu},{push:function(e){var t=lm(this),r=pm(t),n=arguments.length;fm(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),es),dm=ns,vm=E,ym=v,mm=TypeError,A={left:zy(!1),right:zy(!0)},yp=y,gm=A.left,I=zs,T=x,U=(yp({target:"Array",proto:!0,forced:!g("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return gm(this,e,t,1<t?arguments[1]:void 0)}}),y),Em=A.right,t=zs,k=x,e=(U({target:"Array",proto:!0,forced:!g("reduceRight")||!k&&79<t&&t<83},{reduceRight:function(e){return Em(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),wm=np,bm=m([].reverse),fu=[1,2],yp=(e({target:"Array",proto:!0,forced:String(fu)===String(fu.reverse())},{reverse:function(){return wm(this)&&(this.length=this.length),bm(this)}}),y),Tm=np,_m=R,Im=Wo,Om=fs,Am=v,Nm=$o,Rm=N,T=os,Sm=pa,I=Ph("slice"),xm=T("species"),Cm=Array,Um=Math.max,A=(yp({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=Nm(this),s=Am(o),a=Om(e,s),u=Om(void 0===t?s:t,s);if(Tm(o)&&(r=o.constructor,(r=_m(r)&&(r===Cm||Tm(r.prototype))||Im(r)&&null===(r=r[xm])?void 0:r)===Cm||void 0===r))return Sm(o,a,u);for(n=new(void 0===r?Cm:r)(Um(u-a,0)),i=0;a<u;a++,i++)a in o&&Rm(n,i,o[a]);return n.length=i,n}}),y),km=b.some,Mm=(A({target:"Array",proto:!0,forced:!g("some")},{some:function(e){return km(this,e,1<arguments.length?arguments[1]:void 0)}}),fs),Pm=v,Dm=N,Lm=Array,Fm=Math.max,Vm=Hy,jm=Math.floor,x=By,U=js.match(/firefox\/(\d+)/i),k=!!U&&+U[1],t=/MSIE|Trident/.test(js),e=js.match(/AppleWebKit\/(\d+)\./),fu=!!e&&+e[1],pa=y,T=m,zm=es,Hm=ns,Bm=v,Gm=cd,Km=Kc,yp=Ko,Jm=x,I=g,Ym=k,qm=t,$m=zs,Xm=fu,Wm=[],Zm=T(Wm.sort),Qm=T(Wm.push),A=yp(function(){Wm.sort(void 0)}),U=yp(function(){Wm.sort(null)}),js=I("sort"),eg=!yp(function(){if($m)return $m<70;if(!(Ym&&3<Ym)){if(qm)return!0;if(Xm)return Xm<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Wm.push({k:e+r,v:t})}for(Wm.sort(function(e,t){return t.v-e.v}),r=0;r<Wm.length;r++)e=Wm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});pa({target:"Array",proto:!0,forced:A||!U||!js||!eg},{sort:function(e){void 0!==e&&zm(e);var t=Hm(this);if(eg)return void 0===e?Zm(t):Zm(t,e);for(var r,n,i=[],o=Bm(t),s=0;s<o;s++)s in t&&Qm(i,t[s]);for(Jm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Km(e)>Km(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Gm(t,s++);return t}});Wp("Array");var e=y,tg=ns,rg=fs,ng=ps,ig=v,og=S,sg=C,ag=N,ug=cd,x=Ph("splice"),cg=Math.max,lg=Math.min;e({target:"Array",proto:!0,forced:!x},{splice:function(e,t){var r,n,i,o,s,a,u=tg(this),c=ig(u),l=rg(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,lg(cg(ng(t),0),c-l)),og(c+r-n),i=sg(u,n),o=0;o<n;o++)(s=l+o)in u&&ag(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:ug(u,a);for(o=c;c-n+r<o;o--)ug(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:ug(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Yc("flat");Yc("flatMap");var k=y,pg=ns,fg=v,hg=cd,dg=S,t=1!==[].unshift(0),zs=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();k({target:"Array",proto:!0,arity:1,forced:t||zs},{unshift:function(e){var t=pg(this),r=fg(t),n=arguments.length;if(n){dg(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:hg(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});ma.Array;var fu={exports:{}},T={},vg=Yo,yg=$o,mg=Hs.f,gg=Hy,Eg="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!Eg||"Window"!=vg(e))return mg(yg(e));try{return mg(e)}catch(e){return gg(Eg)}};function wg(e){Ug(e,Fg,{value:{objectID:"O"+Vg++,weakData:{}}})}function bg(e,t,r){for(var n in t)iE(e,n,t[n],r);return e}function Tg(e,t){for(var r=0,n=mE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function _g(e,t,r,n){for(var i,o,s,a=wE(e),u=EE(a),c=gE(t,r),l=_E(null),p=TE(u),f=0;f<p;f++)s=u[f],(o=bE(c(s,f,a)))in l?AE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==OE)for(o in l)l[o]=IE(i,l[o]);return l}var I=Ko(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),yp=Ko,Ig=Wo,Og=Yo,Ag=I,Ng=Object.isExtensible,pa=yp(function(){Ng(1)})||Ag?function(e){return!!Ig(e)&&((!Ag||"ArrayBuffer"!=Og(e))&&(!Ng||Ng(e)))}:Ng,A=!Ko(function(){return Object.isExtensible(Object.preventExtensions({}))}),Rg=y,Sg=m,U=ou,xg=Wo,Cg=_,Ug=va.f,kg=Hs,Mg=T,Pg=pa,Dg=A,Lg=!1,Fg=is("meta"),Vg=0,jg=fu.exports={enable:function(){jg.enable=function(){},Lg=!0;var i=kg.f,o=Sg([].splice),e={};e[Fg]=1,i(e).length&&(kg.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Fg){o(t,r,1);break}return t},Rg({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Mg.f}))},fastKey:function(e,t){if(!xg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Cg(e,Fg)){if(!Pg(e))return"F";if(!t)return"E";wg(e)}return e[Fg].objectID},getWeakData:function(e,t){if(!Cg(e,Fg)){if(!Pg(e))return!0;if(!t)return!1;wg(e)}return e[Fg].weakData},onFreeze:function(e){return Dg&&Lg&&Pg(e)&&!Cg(e,Fg)&&wg(e),e}},zg=(U[Fg]=!0,Xo),Hg=Wo,Bg=Rc,Gg=y,Kg=o,Jg=m,Yg=pu,qg=ls,$g=fu.exports,Xg=Gc,Wg=Zp,Zg=Xo,Qg=Wo,eE=Ko,tE=ld,rE=mp,nE=function(e,t,r){return Bg&&zg(t=t.constructor)&&t!==r&&Hg(t=t.prototype)&&t!==r.prototype&&Bg(e,t),e},iE=ls,oE=va.f,sE=Sc,aE=bg,uE=Fc,cE=Zp,lE=Gc,pE=wp,fE=Wp,hE=i,dE=fu.exports.fastKey,vE=B.set,yE=B.getterFor,mE=(function(e,t,r){function n(e){var r=Jg(h[e]);qg(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!Qg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!Qg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!Qg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,o,s,a,u,c=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),p=c?"set":"add",f=Kg[e],h=f&&f.prototype,d=f,v={};return Yg(e,!Zg(f)||!(l||h.forEach&&!eE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),$g.enable()):Yg(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=eE(function(){i.has(1)}),a=tE(function(e){new f(e)}),u=!l&&eE(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){Wg(e,h);e=nE(new f,e,d);return null!=t&&Xg(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&h.clear&&delete h.clear),v[e]=d,Gg({global:!0,constructor:!0,forced:d!=f},v),rE(d,e),l||r.setStrong(d,e,c),d}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=dE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),hE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=dE(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){cE(e,a),vE(e,{type:r,index:sE(null),first:void 0,last:void 0,size:0}),hE||(e.size=0),null!=t&&lE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=yE(r);return aE(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,hE?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),hE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=uE(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)}}),aE(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),hE&&oE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=yE(t),o=yE(n);pE(e,t,function(e,t){vE(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),fE(t)}}),v),gE=Fc,EE=E,wE=ns,bE=ss,TE=v,_E=Sc,IE=Tg,OE=Array,AE=m([].push),NE=_g,js=Yc;y({target:"Array",proto:!0},{group:function(e){return NE(this,e,1<arguments.length?arguments[1]:void 0)}}),js("group");var RE=_g,N=Yc;y({target:"Array",proto:!0,forced:!g("groupBy")},{groupBy:function(e){return RE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function SE(e){for(var t,r,n=UE(this),i=CE(n),o=xE(e,1<arguments.length?arguments[1]:void 0),s=new ME,a=kE(i),u=0;u<a;u++)t=o(r=i[u],u,n),DE(s,t)?FE(PE(s,t),r):LE(s,t,[r]);return s}var xE=Fc,Ph=m,CE=E,UE=ns,kE=v,ME=Zo("Map"),e=ME.prototype,PE=Ph(e.get),DE=Ph(e.has),LE=Ph(e.set),FE=Ph([].push),x=Yc,cd=SE;y({target:"Array",proto:!0,name:"groupToMap",forced:!g("groupByToMap")},{groupByToMap:cd}),x("groupByToMap");function VE(e){return GE[e].prototype}var k=Yc,jE=(y({target:"Array",proto:!0},{groupToMap:SE}),k("groupToMap"),v),zE=function(e,t){for(var r=jE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},HE=$o,t=Yc,BE=Array,GE=(y({target:"Array",proto:!0},{toReversed:function(){return zE(HE(this),BE)}}),t("toReversed"),o),zs=y,KE=es,JE=$o,YE=Tg,ma=Yc,qE=Array,$E=m(VE("Array").sort),I=(zs({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&KE(e);var t=JE(this),t=YE(qE,t);return $E(t,e)}}),ma("toSorted"),y),yp=Yc,XE=S,WE=v,ZE=fs,QE=$o,ew=ps,tw=Array,rw=Math.max,nw=Math.min,iw=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=QE(this),a=WE(s),u=ZE(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,nw(rw(ew(t),0),a-u)),i=XE(a+r-n),o=tw(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),yp("toSpliced"),v),ow=ps,sw=RangeError,aw=function(e,t,r,n){var i=iw(e),r=ow(r),o=r<0?i+r:r;if(i<=o||o<0)throw sw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},uw=$o,cw=Array;y({target:"Array",proto:!0},{with:function(e,t){return aw(uw(this),cw,e,t)}});ou=o,_=oa,Hs=Xo,T=O,pa=ls,A="USE_FUNCTION_CONSTRUCTOR",U=os("asyncIterator"),Rc=ou.AsyncIterator,pu=_.AsyncIteratorPrototype;if(pu)Sb=pu;else if(Hs(Rc))Sb=Rc.prototype;else if(_[A]||ou[A])try{wb=T(T(T(Function("return async function*(){}()")()))),T(wb)===Object.prototype&&(Sb=wb)}catch(e){}Hs((Sb=Sb||{})[U])||pa(Sb,U,function(){return this});function lw(e,t,r){var n=e.done;gw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function pw(e){ww(this,{type:Ew,iterator:yw(e),next:e.next})}function fw(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Fw(e),u=Lw("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Mw(s),new u(function(r,n){var i=function(e){Vw(c,n,e,n)},o=function(){try{if(f&&p)try{Dw(l)}catch(e){i(e)}u.resolve(Pw(kw(t,c))).then(function(e){try{if(Pw(e).done)f?(a.length=l,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(h)o();else if(d)e?o():Vw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?Vw(c,r,v||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function hw(e,t){if(!t0||!e0(e)||!t0(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function dw(e,t,r){return r.get&&r0(r.get,t,{getter:!0}),r.set&&r0(r.set,t,{setter:!0}),n0.f(e,t,r)}var vw=r,yw=us,fu=Sc,mw=ts,js=bg,N=B,E=Sb,gw=Zo("Promise"),Ew="AsyncFromSyncIterator",ww=N.set,bw=N.getterFor(Ew),e=(pw.prototype=js(fu(E),{next:function(){var n=bw(this);return new gw(function(e,t){var r=yw(vw(n.next,n.iterator));lw(r,e,t)})},return:function(){var n=bw(this).iterator;return new gw(function(e,t){var r=mw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=yw(vw(r,n));lw(r,e,t)})}}),pw),Tw=r,_w=e,Iw=us,Ow=zc,Aw=ts,Nw=os("asyncIterator"),Rw=es,Sw=us,xw=r,Cw=Zo,Uw=ts,kw=r,Mw=es,Pw=us,Dw=S,Lw=Zo,Fw=function(e){return{iterator:e,next:Rw(Sw(e).next)}},Vw=function(e,t,r,n){try{var i=Uw(e,"return");if(i)return Cw("Promise").resolve(xw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Ph={toArray:fw(0),forEach:fw(1),every:fw(2),some:fw(3),find:fw(4)},jw=Fc,zw=ns,Hw=R,Bw=function(e,t){t=arguments.length<2?Aw(e,Nw):t;return t?Iw(Tw(t,e)):new _w(Ow(e))},Gw=zc,Kw=jc,Jw=ts,g=VE,Yw=Zo,cd=os,qw=e,$w=Ph.toArray,Xw=cd("asyncIterator"),Ww=g("Array").values,x=(y({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(Yw("Promise"))(function(e){var t=zw(o),r=(void 0!==a&&(a=jw(a,u)),Jw(t,Xw)),n=r?void 0:Kw(t)||Ww,i=Hw(s)?new s:[],r=r?Bw(t,r):new qw(Gw(t,n));e($w(r,a,i))})}}),y),Zw=b.filterReject,k=Yc,t=(x({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return Zw(this,e,1<arguments.length?arguments[1]:void 0)}}),k("filterOut"),y),Qw=b.filterReject,zs=Yc,ma=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return Qw(this,e,1<arguments.length?arguments[1]:void 0)}}),zs("filterReject"),y),e0=np,t0=Object.isFrozen,r0=(ma({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!hw(e,!0))return!1;var t=e.raw;return t.length===e.length&&hw(t,!1)}}),w.exports),n0=va,I=Yc,i0=ns,o0=v;i&&(dw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=i0(this),t=o0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=i0(this),r=o0(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var yp=Yc,s0=ns,a0=v;i&&(dw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=s0(this),e=a0(e);return 0==e?0:e-1}}),yp("lastIndex"));var o=m,u0=es,c0=v,l0=ns,p0=C,f0=Zo("Map"),oa=f0.prototype,h0=o(oa.forEach),d0=o(oa.has),v0=o(oa.set),y0=o([].push),O=Yc;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=l0(this),i=c0(n),o=p0(n,0),s=new f0,a=null!=e?u0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),d0(s,r)||v0(s,r,t);return h0(s,function(e){y0(o,e)}),o}}),O("uniqueBy");g0.exposure=function(e,t,r,n){return new w0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},g0.track=function(e,t,r,n){return new _0(n,r,e,t)},g0.remoteConfig=function(e,t,r,n){return new A0(n,e,t.parameter,t.valueId,t.reason,r)},g0.isExposureEvent=function(e){return void 0!==e.experiment},g0.isTrackEvent=function(e){return void 0!==e.eventType},g0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},g0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},g0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},g0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},g0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[dt.ID],identifiers:this.user.identifiers,userProperties:ke.sanitize(this.user.properties),hackleProperties:ke.sanitize(this.user.hackleProperties)}};var m0=g0;function g0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(b0,E0=m0),b0.prototype.copyWithUser=function(e){return new b0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},b0.prototype.toDto=function(){return c(c({},E0.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})};var E0,w0=b0;function b0(e,t,r,n,i,o,s,a){e=E0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(I0,T0=m0),I0.prototype.copyWithUser=function(e){return new I0(this.timestamp,e,this.eventType,this.event,this.insertId)},I0.prototype.toDto=function(){return c(c({},T0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:ke.sanitize(this.event.properties)})};var T0,_0=I0;function I0(e,t,r,n,i){e=T0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(N0,O0=m0),N0.prototype.copyWithUser=function(e){return new N0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},N0.prototype.toDto=function(){return c(c({},O0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:ke.sanitize(this.properties)})};var O0,A0=N0;function N0(e,t,r,n,i,o,s){e=O0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}S0.isSessionEvent=function(e){return!!m0.isTrackEvent(e)&&(e.event.key===S0.SESSION_START_EVENT_NAME||e.event.key===S0.SESSION_END_EVENT_NAME)},S0.prototype.onSessionStarted=function(e,t,r){this.track(S0.SESSION_START_EVENT_NAME,e,t,r)},S0.prototype.onSessionEnded=function(e,t,r){this.track(S0.SESSION_END_EVENT_NAME,e,t,r)},S0.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},S0.prototype.decorateSession=function(e,t){t=(new mt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},S0.SESSION_START_EVENT_NAME="$session_start",S0.SESSION_END_EVENT_NAME="$session_end";var R0=S0;function S0(e,t){this.userManager=e,this.core=t}C0.prototype.process=function(e){var t;R0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[dt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[dt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},C0.prototype.flush=function(e){this.delegate.flush(e)},C0.prototype.close=function(){this.delegate.close()},C0.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.flush(!0)}};var x0=C0;function C0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}k0.toEvent=function(e){var t;return{key:k0.EVENT_KEY,properties:{level:k0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:k0._stacktrace(e)}}},k0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,k0.STACK_TRACK_LIMIT).join("\n")},k0.EVENT_KEY="$trace",k0.LEVEL_ERROR="error",k0.STACK_TRACK_LIMIT=30;var U0=k0;function k0(){}M0.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)}};pu=M0;function M0(){}D0.prototype.with=function(e){return new D0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},D0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new D0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},D0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new D0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},D0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var P0=D0;function D0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Ne(V0,L0=pu),V0.prototype.supports=function(e){return void 0!==e.experiment},V0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:P0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var L0,F0=V0;function V0(e){var t=L0.call(this)||this;return t.evaluationFlowFactory=e,t}z0.of=function(e,t,r,n,i,o){return o.returnValue=ke.truncateStringValue(n),new z0(i,t.targetEvaluations,e.parameter,r,n,o)},z0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var j0=z0;function z0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Ne(G0,H0=pu),G0.prototype.supports=function(e){return void 0!==e.parameter},G0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=ke.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return j0.ofDefault(e,t,h.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,h.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,h.DEFAULT_RULE,r)},G0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?j0.ofDefault(e,t,h.TYPE_MISMATCH,i):j0.of(e,t,r.id,r.rawValue,n,i)};var H0,B0=G0;function G0(e){var t=H0.call(this)||this;return t.targetRuleDeterminer=e,t}J0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var K0=J0;function J0(e,t){this.type=e,this.id=t}q0.create=function(){return new q0},Object.defineProperty(q0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(q0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(q0.prototype,"properties",{get:function(){return ke.sanitize(this._properties)},enumerable:!1,configurable:!0}),q0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},q0.prototype.addRequest=function(e){this._stack.push(e)},q0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},q0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof P0&&e.experiment.id===t.id})},q0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},q0.prototype.setProperty=function(e,t){this._properties[e]=t};var Y0=q0;function q0(){this._stack=[],this._targetEvaluations=[],this._properties={}}X0.of=function(e,t,r,n){return new X0(e,t,r,n)},X0.by=function(e,t){return new X0(e.workspace,e.user,t,"A")},X0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var $0=X0;function X0(e,t,r,n){this.key=new K0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}Z0.of=function(e,t,r,n,i){return new Z0(e,t,r,n,i)},Z0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var W0=Z0;function Z0(e,t,r,n,i){this.key=new K0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}eb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},eb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},eb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var Q0=eb;function eb(){}rb.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}};var tb=rb;function rb(e){this.storages=e}ib.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},ib.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return Q0.asNumber(e)},ib.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=Q0.asNumber(t),e=Q0.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},ib.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},ib.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},ib.prototype.clear=function(){this.listStorage.clear()};var nb=ib;function ib(e){this.listStorage=e}sb.prototype.add=function(e){this.evaluators.push(e)},sb.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)};var ob=sb;function sb(){this.evaluators=new Array}ub.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},ub.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},ub.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var ab=ub;function ub(e){this.conditionMatcherFactory=e}lb.prototype.decorate=function(e){return e};var cb=lb;function lb(){}fb.prototype.decorate=function(e){return"string"==typeof e?So.decodeURIOrOriginal(e):e};var pb=fb;function fb(){}db.prototype.matches=function(e,t,r){void 0===r&&(r=new cb);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},db.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},db.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},db.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},db.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var hb=db;function db(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}vb.prototype.booleanMatches=function(e,t){return e===t},vb.prototype.numberMatches=function(e,t){return e===t},vb.prototype.stringMatches=function(e,t){return e===t},vb.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},vb.prototype.urlMatches=function(e,t){return So.decodeURIOrOriginal(So.removePathnameTrailingSlash(e))===So.decodeURIOrOriginal(So.removePathnameTrailingSlash(t))};Rc=vb;function vb(){}yb.prototype.booleanMatches=function(e,t){return!1},yb.prototype.numberMatches=function(e,t){return!1},yb.prototype.stringMatches=function(e,t){return e.includes(t)},yb.prototype.versionMatches=function(e,t){return!1},yb.prototype.urlMatches=function(e,t){e=So.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))};_=yb;function yb(){}mb.prototype.booleanMatches=function(e,t){return!1},mb.prototype.numberMatches=function(e,t){return!1},mb.prototype.stringMatches=function(e,t){return e.startsWith(t)},mb.prototype.versionMatches=function(e,t){return!1},mb.prototype.urlMatches=function(e,t){e=So.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))};ou=mb;function mb(){}gb.prototype.booleanMatches=function(e,t){return!1},gb.prototype.numberMatches=function(e,t){return!1},gb.prototype.stringMatches=function(e,t){return e.endsWith(t)},gb.prototype.versionMatches=function(e,t){return!1},gb.prototype.urlMatches=function(e,t){return!1};A=gb;function gb(){}Eb.prototype.booleanMatches=function(e,t){return!1},Eb.prototype.numberMatches=function(e,t){return t<e},Eb.prototype.stringMatches=function(e,t){return t<e},Eb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},Eb.prototype.urlMatches=function(e,t){return!1};T=Eb;function Eb(){}bb.prototype.booleanMatches=function(e,t){return!1},bb.prototype.numberMatches=function(e,t){return t<=e},bb.prototype.stringMatches=function(e,t){return t<=e},bb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},bb.prototype.urlMatches=function(e,t){return!1};var wb=bb;function bb(){}Tb.prototype.booleanMatches=function(e,t){return!1},Tb.prototype.numberMatches=function(e,t){return e<t},Tb.prototype.stringMatches=function(e,t){return e<t},Tb.prototype.versionMatches=function(e,t){return e.isLessThan(t)},Tb.prototype.urlMatches=function(e,t){return!1};Hs=Tb;function Tb(){}_b.prototype.booleanMatches=function(e,t){return!1},_b.prototype.numberMatches=function(e,t){return e<=t},_b.prototype.stringMatches=function(e,t){return e<=t},_b.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},_b.prototype.urlMatches=function(e,t){return!1};pa=_b;function _b(){}Ob.prototype.getMatcher=function(e){switch(e){case"IN":return Ob.IN_MATCHER;case"CONTAINS":return Ob.CONTAINS_MATCHER;case"STARTS_WITH":return Ob.STARTS_WITH_MATCHER;case"ENDS_WITH":return Ob.ENDS_WITH_MATCHER;case"GT":return Ob.GT_MATCHER;case"GTE":return Ob.GTE_MATCHER;case"LT":return Ob.LT_MATCHER;case"LTE":return Ob.LTE_MATCHER}},Ob.IN_MATCHER=new Rc,Ob.CONTAINS_MATCHER=new _,Ob.STARTS_WITH_MATCHER=new ou,Ob.ENDS_WITH_MATCHER=new A,Ob.GT_MATCHER=new T,Ob.GTE_MATCHER=new wb,Ob.LT_MATCHER=new Hs,Ob.LTE_MATCHER=new pa;var Ib=Ob;function Ob(){}Ab.prototype.matches=function(e,t,r){t=Q0.asString(t),r=Q0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};U=Ab;function Ab(){}Nb.prototype.matches=function(e,t,r){t=Q0.asNumber(t),r=Q0.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};Sc=Nb;function Nb(){}Rb.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};B=Rb;function Rb(){}xb.prototype.matches=function(e,t,r){t=Gt.tryParse(t),r=Gt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var Sb=xb;function xb(){}Cb.prototype.matches=function(e,t,r){t=So.tryParse(t),r=Q0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=Cb;function Cb(){}Ub.prototype.matches=function(e,t,r){return!1};js=Ub;function Ub(){}Mb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Mb.STRING_MATCHER;case"NUMBER":return Mb.NUMBER_MATCHER;case"BOOLEAN":return Mb.BOOLEAN_MATCHER;case"VERSION":return Mb.VERSION_MATCHER;case"URL":return Mb.URL_MATCHER;case"NULL":case"UNKNOWN":return Mb.NULL_MATCHER}},Mb.STRING_MATCHER=new U,Mb.NUMBER_MATCHER=new Sc,Mb.BOOLEAN_MATCHER=new B,Mb.VERSION_MATCHER=new Sb,Mb.URL_MATCHER=new N,Mb.NULL_MATCHER=new js;var kb=Mb;function Mb(){}Db.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},Db.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?pb:cb)};var Pb=Db;function Db(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Fb.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Lb=Fb;function Fb(){}jb.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},jb.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,"]"))};var Vb=jb;function jb(e){this.segmentMatcher=e}Hb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Hb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var zb=Hb;function Hb(e){this.userConditionMatcher=e}Gb.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Bb=Gb;function Gb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}Kb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(Q0.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},Kb.prototype.evaluate=function(e,t,r){r=$0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};fu=Kb;function Kb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne(qb,Jb=fu),qb.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},qb.prototype.resolve=function(e,t){return e instanceof $0&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},qb.prototype.evaluationMatches=function(e,t){return!!qb.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},qb.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var Jb,Yb=qb;function qb(e,t){return Jb.call(this,e,t)||this}Ne(Wb,$b=fu),Wb.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},Wb.prototype.resolve=function(e,t){return t},Wb.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var $b,Xb=Wb;function Wb(e,t){return $b.call(this,e,t)||this}Qb.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},Qb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var Zb=Qb;function Qb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}tT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},tT.prototype.properties=function(e){return m0.isTrackEvent(e)?e.event.properties:m0.isExposureEvent(e)||m0.isRemoteConfigEvent(e)?e.properties:void 0};var eT=tT;function tT(){}nT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})};var rT=nT;function nT(e){this.valueOperatorMatcher=e}oT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}};var iT=oT;function oT(e){var t=new hb(new kb,new Ib);this.userConditionMatcher=new Pb(new Lb,t),this.eventConditionMatcher=new Zb(new eT,t),this.segmentConditionMatcher=new Vb(new zb(this.userConditionMatcher)),this.experimentConditionMatcher=new Bb(new Yb(e,t),new Xb(e,t)),this.cohortConditionMatcher=new rT(t)}aT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},aT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},aT.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)}};var sT=aT;function aT(e){this.bucketer=e}var uT={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=this.mul32(i,3432918353),s=5*(s=(524287&(s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=this.mul32(i,3432918353),s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),s=this.mul32(s^=s>>>13,3266489909),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},cT=(lT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},lT.prototype.calculateSlotNumber=function(e,t,r){r=uT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},lT);function lT(){}fT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},fT.end=function(){return new fT(void 0,void 0)},fT.decision=function(e,t){return new fT(e,t)},fT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r};var pT=fT;function fT(e,t){this.flowEvaluator=e,this.nextFlow=t}dT.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 P0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return P0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var hT=dT;function dT(e){this.overrideResolver=e}yT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?P0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var vT=yT;function yT(){}gT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return P0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return P0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var mT=gT;function gT(){}wT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return P0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var ET=wT;function wT(){}TT.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):P0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var bT=TT;function TT(e){this.experimentTargetDeterminer=e}IT.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?P0.ofDefault(e,t,h.VARIATION_DROPPED):P0.of(e,t,n,h.TRAFFIC_ALLOCATED):P0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var _T=IT;function IT(e){this.actionResolver=e}AT.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 P0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var OT=AT;function AT(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}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 P0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return P0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var NT=RT;function RT(e){this.actionResolver=e}xT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):P0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var ST=xT;function xT(e){this.containerResolver=e}UT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):P0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var CT=UT;function UT(){}MT.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)})};var kT=MT;function MT(e){this.targetMatcher=e}DT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var PT=DT;function DT(e){this.targetMatcher=e}FT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},FT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},FT.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)}},FT.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)};var LT=FT;function FT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}jT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var VT=jT;function jT(e){this.bucketer=e}HT.of=function(e,t,r,n){return new HT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var zT=HT;function HT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}GT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):zT.of(e,t,h.UNSUPPORTED_PLATFORM)};var BT=GT;function GT(){}JT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),zT.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var KT=JT;function JT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}qT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?zT.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var YT=qT;function qT(){}XT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?zT.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var $T=XT;function XT(){}ZT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):zT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var WT=ZT;function ZT(){}e_.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?zT.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var QT=e_;function e_(e){this.hiddenMatcher=e}r_.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),zT.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):zT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var t_=r_;function r_(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}i_.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},i_.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=a.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=$0.by(e,n),i=this.evaluator.evaluate(n,t),o=(this.addExperimentContext(i,t),e.inAppMessage.messageContext.defaultLang);return this.resolveMessage(e,function(e){return e.lang===o&&i.variationKey===e.variationKey})},i_.prototype.addExperimentContext=function(e,t){t.addEvaluation(e),t.setProperty("experiment_id",e.experiment.id),t.setProperty("experiment_key",e.experiment.key),t.setProperty("variation_id",e.variationId),t.setProperty("variation_key",e.variationKey),t.setProperty("experiment_decision_reason",e.reason)},i_.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},i_.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return a.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var n_=i_;function i_(e){this.evaluator=e}s_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},s_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var o_=s_;function s_(){}u_.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)})};var a_=u_;function u_(e){this.targetMatcher=e}l_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var c_=l_;function l_(e){this.storage=e}f_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},f_.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))};var p_=f_;function f_(e,t){this.targetMatcher=e,this.bucketer=t}d_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},d_.getOrNull=function(e){return d_.instances.get(e)},d_.register=function(e,t){return d_.instances.set(e,t),t},d_.instances=new Map;var h_=d_;function d_(){}y_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},y_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var v_=y_;function y_(e,t,r){var n=new cT,i=h_.register("targetMatcher",new ab(new iT(e))),o=new sT(n),t=new LT(t,i,o),s=new VT(n),s=(this.abTestFlow=pT.of(new hT(t),new CT,new ST(s),new bT(new kT(i)),new vT,new mT,new ET,new _T(o)),this.featureFlagFlow=pT.of(new vT,new mT,new ET,new hT(t),new CT,new OT(new PT(i),o),new NT(o)),new n_(e));this.inAppMessageFlow=pT.of(new BT,new KT(new o_,s),new YT,new $T,new WT,new QT(new c_(r)),new t_(new a_(i),s)),this.remoteConfigParameterTargetRuleDeterminer=new p_(i,n)}g_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return t&&o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[g_.ROOT_TYPE]=r.key.type,t[g_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},g_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof P0)return n[g_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[g_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[g_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,m0.exposure(e.user,t,n,r);if(t instanceof j0)return m0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof zT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},g_.ROOT_TYPE="$targetingRootType",g_.ROOT_ID="$targetingRootId",g_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",g_.EXPERIMENT_VERSION_KEY="$experiment_version",g_.EXECUTION_VERSION_KEY="$execution_version";var m_=g_;function g_(e){this.clock=e}Ne(b_,E_=pu),b_.prototype.supports=function(e){return void 0!==e.inAppMessage},b_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:zT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var E_,w_=b_;function b_(e){var t=E_.call(this)||this;return t.evaluationFlowFactory=e,t}__.of=function(e,t,r,n){return new __(e,t,r,n)},__.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var T_=__;function __(e,t,r,n){this.key=new K0("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var I_=s.log,O_=(A_.create=function(e,t,r,n){var i=new ob,r=new tb(r),r=new v_(i,r,n),n=new F0(r),o=new B0(r.remoteConfigParameterTargetRuleDeterminer),r=new w_(r);return i.add(n),i.add(o),new A_(n,o,r,e,new m_(Le.instance),t,new N_,Le.instance)},A_.prototype.experiment=function(e,t,r){var n=this;if(!e)return I_.error("experimentKey must not be empty"),Xe.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return I_.warn("SDK not ready."),Xe.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return I_.warn("Experiment does not exist."),Xe.of(r,h.EXPERIMENT_NOT_FOUND);i=$0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},A_.prototype.experiments=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=$0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},A_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,Y0.create()),t=null!=(t=e.config)?t:new Ve;return[e,Xe.of(e.variationKey,e.reason,t,e.experiment)]},A_.prototype.featureFlag=function(e,t){var r=this;if(!e)return I_.error("featureKey must not be empty"),Ze.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return I_.warn("SDK not ready."),Ze.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return I_.warn("FeatureFlag does not exist."),Ze.off(h.FEATURE_FLAG_NOT_FOUND);n=$0.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},A_.prototype.featureFlags=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=$0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},A_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,Y0.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?Ze.off(e.reason,t,e.experiment):Ze.on(e.reason,t,e.experiment)]},A_.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return I_.warn("SDK not ready."),qe.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return I_.warn("In app message does not exist."),qe.of(h.IN_APP_MESSAGE_NOT_FOUND);n=T_.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,Y0.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),qe.of(t.reason,t.inAppMessage,t.message,t.properties)},A_.prototype.tryInAppMessage=function(t,e){var r,n=Pn.start();try{r=this.inAppMessage(t,e)}catch(e){I_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.of(h.EXCEPTION)}return xi.inAppMessage(n,t,r),r},A_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?I_.warn("Event must be event type."):"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new ft(0,e.key),this.eventProcessor.process(m0.track(n,e,t,r))):I_.warn("Event key must be not null. or event key must be string type."):I_.warn("event must not be null.")},A_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=U0.toEvent(e),this.flush(),this.track(e,t),this.flush())},A_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},A_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return I_.warn("SDK not ready."),Je.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return I_.warn("Remote config parameter does not exist."),Je.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=W0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,Y0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},A_.prototype.close=function(){this.eventProcessor.close()},A_);function A_(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}R_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},R_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var N_=R_;function R_(){}x_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},x_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var S_=x_;function x_(){this._installed=[],this._installations={onerror:k_,onunhandledrejection:M_}}var C_,U_=null;function k_(o,s){U_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),U_&&U_.apply(this,arguments)}}function M_(r,n){C_=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),C_&&C_.apply(this,arguments)}}D_.prototype.read=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},D_.prototype.save=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},D_.prototype.add=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},D_.prototype.delete=function(n){return u(this,void 0,void 0,function(){var t,r=this;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},D_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},D_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var P_=D_;function D_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var L_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},F_=(V_.builder=function(){return new j_},V_.empty=function(){return V_.builder().build()},V_.from=function(e){return new V_(e)},V_.fromDto=function(e){for(var t=V_.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new nn(e)})})}return t.build()},Object.defineProperty(V_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),V_.prototype.get=function(e){return this.cohorts.get(e)},V_.prototype.filterBy=function(e){var r=yt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return V_.from(e)},V_.prototype.asArray=function(){return this.cohorts.values()},V_.prototype.asComparable=function(){return this.cohorts},V_.prototype.toBuilder=function(){return new j_(this)},V_);function V_(e){this.cohorts=e}z_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},z_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},z_.prototype.build=function(){return new F_(this.cohorts)};var j_=z_;function z_(e){this.cohorts=new Vn(xe.isEqual),e&&this.putAll(e)}var E="model",r="name",S="type",R="vendor",e="version",Ph="architecture",cd="console",g="mobile",x="tablet",k="smarttv",b="wearable",H_=(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],[r,e],[/(opios)[\/\s]+([\w\.]+)/i],[[r,"Opera Mini"],e],[/\s(opr)\/([\w\.]+)/i],[[r,"Opera"],e],[/(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],[r,e],[/(konqueror)\/([\w\.]+)/i],[[r,"Konqueror"],e],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[r,"IE"],e],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[r,"Edge"],e],[/(yabrowser)\/([\w\.]+)/i],[[r,"Yandex"],e],[/(Avast)\/([\w\.]+)/i],[[r,"Avast Secure Browser"],e],[/(AVG)\/([\w\.]+)/i],[[r,"AVG Secure Browser"],e],[/(puffin)\/([\w\.]+)/i],[[r,"Puffin"],e],[/(focus)\/([\w\.]+)/i],[[r,"Firefox Focus"],e],[/(opt)\/([\w\.]+)/i],[[r,"Opera Touch"],e],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[r,"UCBrowser"],e],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],e],[/(windowswechat qbcore)\/([\w\.]+)/i],[[r,"WeChat(Win) Desktop"],e],[/(micromessenger)\/([\w\.]+)/i],[[r,"WeChat"],e],[/(brave)\/([\w\.]+)/i],[[r,"Brave"],e],[/(whale)\/([\w\.]+)/i],[[r,"Whale"],e],[/(qqbrowserlite)\/([\w\.]+)/i],[r,e],[/(QQ)\/([\d\.]+)/i],[r,e],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[r,e],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[r,e],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[r,e],[/(MetaSr)[\/\s]?([\w\.]+)/i],[r],[/(LBBROWSER)/i],[r],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[e,[r,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[e,[r,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[r,e],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[e,[r,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[r,/(.+)/,"$1 WebView"],e],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[r,/(.+(?:g|us))(.+)/,"$1 $2"],e],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[r,"Chrome Mobile"],e],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[e,[r,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[r,"Sailfish Browser"],e],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[r,e],[/(dolfin)\/([\w\.]+)/i],[[r,"Dolphin"],e],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[r,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[r,"Opera Coast"],e],[/fxios\/([\w\.-]+)/i],[e,[r,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[e,[r,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[e,r],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[r,"GSA"],e],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[r,[e,(M.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(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],[r,e],[/(navigator|netscape)\/([\w\.-]+)/i],[[r,"Netscape"],e],[/(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],[r,e]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Ph,"amd64"]],[/(ia32(?=;))/i],[[Ph,M.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Ph,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Ph,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Ph,/ower/,"",M.util.lowerize]],[/(sun4\w)[;\)]/i],[[Ph,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Ph,M.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[E,R,[S,x]],[/applecoremedia\/[\w\.]+ \((ipad)/],[E,[R,"Apple"],[S,x]],[/(apple\s{0,1}tv)/i],[[E,"Apple TV"],[R,"Apple"],[S,k]],[/(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],[R,E,[S,x]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[E,[R,"Amazon"],[S,x]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[E,M.mapper.str,M.maps.device.amazon.model],[R,"Amazon"],[S,g]],[/android.+aft([bms])\sbuild/i],[E,[R,"Amazon"],[S,k]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[E,R,[S,g]],[/\((ip[honed|\s\w*]+);/i],[E,[R,"Apple"],[S,g]],[/(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],[R,E,[S,g]],[/\(bb10;\s(\w+)/i],[E,[R,"BlackBerry"],[S,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[E,[R,"Asus"],[S,x]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[E,"Xperia Tablet"],[S,x]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[R,"Sony"],[S,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,E,[S,cd]],[/android.+;\s(shield)\sbuild/i],[E,[R,"Nvidia"],[S,cd]],[/(playstation\s[34portablevi]+)/i],[E,[R,"Sony"],[S,cd]],[/(sprint\s(\w+))/i],[[R,M.mapper.str,M.maps.device.sprint.vendor],[E,M.mapper.str,M.maps.device.sprint.model],[S,g]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[E,/_/g," "],[S,g]],[/(nexus\s9)/i],[E,[R,"HTC"],[S,x]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[E,[R,"Huawei"],[S,g]],[/android.+(bah2?-a?[lw]\d{2})/i],[E,[R,"Huawei"],[S,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,E,[S,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[E,[R,"Microsoft"],[S,cd]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[R,"Microsoft"],[S,g]],[/\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],[E,[R,"Motorola"],[S,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[E,[R,"Motorola"],[S,x]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,M.util.trim],[E,M.util.trim],[S,k]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[R,"Samsung"],[S,k]],[/\(dtv[\);].+(aquos)/i],[E,[R,"Sharp"],[S,k]],[/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],[[R,"Samsung"],E,[S,x]],[/smart-tv.+(samsung)/i],[R,[S,k],E],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[R,"Samsung"],E,[S,g]],[/sie-(\w*)/i],[E,[R,"Siemens"],[S,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],E,[S,g]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[E,[R,"Acer"],[S,x]],[/android.+([vl]k\-?\d{3})\s+build/i],[E,[R,"LG"],[S,x]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],E,[S,x]],[/(lg) netcast\.tv/i],[R,E,[S,k]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[E,[R,"LG"],[S,g]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,E,[S,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[E,[R,"Lenovo"],[S,x]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,E,[S,g]],[/linux;.+((jolla));/i],[R,E,[S,g]],[/((pebble))app\/[\d\.]+\s/i],[R,E,[S,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,E,[S,g]],[/crkey/i],[[E,"Chromecast"],[R,"Google"],[S,k]],[/android.+;\s(glass)\s\d/i],[E,[R,"Google"],[S,b]],[/android.+;\s(pixel c)[\s)]/i],[E,[R,"Google"],[S,x]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[E,[R,"Google"],[S,g]],[/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],[[E,/_/g," "],[R,"Xiaomi"],[S,g]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,x]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[E,[R,"Meizu"],[S,g]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],E,[S,g]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[E,[R,"OnePlus"],[S,g]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[E,[R,"RCA"],[S,x]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[E,[R,"Dell"],[S,x]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[E,[R,"Verizon"],[S,x]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],E,[S,x]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[E,[R,"NuVision"],[S,x]],[/android.+;\s(k88)\sbuild/i],[E,[R,"ZTE"],[S,x]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[E,[R,"Swiss"],[S,g]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[E,[R,"Swiss"],[S,x]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[E,[R,"Zeki"],[S,x]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],E,[S,x]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[E,[R,"Insignia"],[S,x]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[E,[R,"NextBook"],[S,x]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],E,[S,g]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],E,[S,g]],[/android.+;\s(PH-1)\s/i],[E,[R,"Essential"],[S,g]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[E,[R,"Envizen"],[S,x]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[E,[R,"MachSpeed"],[S,x]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,E,[S,x]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[E,[R,"Rotor"],[S,x]],[/android.+(KS(.+))\s+build/i],[E,[R,"Amazon"],[S,x]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,E,[S,x]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[S,M.util.lowerize],R,E],[/[\s\/\(](smart-?tv)[;\)]/i],[[S,k]],[/(android[\w\.\s\-]{0,9});.+build/i],[E,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[e,[r,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[e,[r,"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],[r,e],[/rv\:([\w\.]{1,9}).+(gecko)/i],[e,r]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[r,e],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[r,M.mapper.str,M.maps.os.windows],[e,M.mapper.str,M.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[r,"Windows"],[e,M.mapper.str,M.maps.os.windows.version]],[/\((bb)(10);/i],[[r,"BlackBerry"],e],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[r,e],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[r,"Symbian"],e],[/\((series40);/i],[r],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[r,"Firefox OS"],e],[/(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],[[r,"Linux"],e],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[r,"Chromium OS"],e],[/(sunos)\s?([\w\.\d]*)/i],[[r,"Solaris"],e],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[r,"Linux"],e],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(haiku)\s(\w+)/i],[r,e],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[e,/_/g,"."],[r,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[r,"Mac"],[e,/_/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],[r,e]]},M);function M(){}G_.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,e=H_.parse(o.navigator.userAgent),s=e.browser,a=e.os,e=e.device,u=(o.location.protocol||"").replace(":",""),c=o.screen,l=(null==(l=o.navigator.languages)?void 0:l[0])||"",p=l.split("-")[0],f=(null!=(f=e.type)?f:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=a.name||"",d="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,d=null!=(i=null==(n=c.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:h,osVersion:a.version||"",deviceModel:e.model||"",deviceType:f,deviceVendor:e.vendor||"",deviceBrand:e.vendor||"",locale:l,language:p,orientation:d,userAgent:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:u,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:c.width||"",screenHeight:c.height||"",timeZone:v}};var B_=G_;function G_(){}J_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return $_.of(W_(e,this.hackleDeviceId),F_.empty())},J_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(J_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),J_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},J_.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},J_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},J_.prototype.hackleUser=function(e){var t=(new mt).addIdentifiers(e.user.identifiers||{}).add(dt.ID,e.user.id||this.hackleDeviceId).add(dt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(dt.HACKLE_DEVICE,this.hackleDeviceId),t=(a.isNotNullOrUndefined(e.user.userId)&&t.add(dt.USER,e.user.userId),t.build()),r=this.campaignParser.parse();return{identifiers:t,properties:c(c({},r),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},J_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?B_.generate(window):e)||{}},J_.prototype.setUser=function(e){return this.updateUser(e).user},J_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},J_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},J_.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},J_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},J_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},J_.prototype.saveUser=function(e){this.storage.saveUser(e)},J_.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,L_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},J_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=W_(r,n.hackleDeviceId),L_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},J_.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},J_.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},J_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var K_=J_;function J_(e,t,r,n,i,o,s){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.campaignParser=n,this.clock=i,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,s),this.storage.saveUser(this.context.user)}q_.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},q_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(q_.prototype,"deviceId",{get:function(){return this.storage.getItem(_n)},enumerable:!1,configurable:!0}),Object.defineProperty(q_.prototype,"userId",{get:function(){return this.storage.getItem(Tn)},enumerable:!1,configurable:!0}),q_.prototype.setDeviceId=function(e){this.setId(_n,e)},q_.prototype.setUserId=function(e){this.setId(Tn,e)},q_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var Y_=q_;function q_(e){this.storage=e}X_.of=function(e,t){return new X_(e,t.filterBy(e))},X_.prototype.with=function(e){return X_.of(e,this.cohorts.filterBy(e))},X_.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return X_.of(this.user,e)};var $_=X_;function X_(e,t){this.user=e,this.cohorts=t}var W_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},Z_=(Object.defineProperty(Q_.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(Q_.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:Q_.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(Q_.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),Q_.prototype.addListener=function(e){this.sessionListeners.push(e)},Q_.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},Q_.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)},Q_.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(bn,"".concat(e))},Q_.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)})},Q_.prototype.newSession=function(t,r){var n="".concat(r,".").concat(H().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},Q_.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(wn,e)},Q_.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(wn)},Q_.prototype.loadLastEventTime=function(){var e=this.storage.getItem(bn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},Q_.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},Q_.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.updateLastEventTime(t)}},Q_.EMPTY_SESSION_ID="0.ffffffff",Q_);function Q_(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}tI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},tI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},tI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},tI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var eI=tI;function tI(){this.storage=window.localStorage}nI.postfix=function(e,t){return new nI(e,function(e){return"".concat(e).concat(t)})},nI.prefix=function(e,t){return new nI(e,function(e){return"".concat(t).concat(e)})},nI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},nI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},nI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var rI=nI;function nI(e,t){this.delegate=e,this.transform=t}oI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},oI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},oI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},oI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},oI.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[]}},oI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},oI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},oI.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]},oI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},oI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var iI=oI;function oI(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)}aI.prototype.currentUser=function(){return this.userManager.resolve()},aI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},aI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},aI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},aI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},aI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},aI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},aI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},aI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},aI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},aI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},aI.prototype.increment=function(e,t){hi.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var sI=aI;function aI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}cI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},cI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},cI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},cI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},cI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},cI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},cI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},cI.monitoring=function(e){return"".concat(e,"/metrics")};var uI=cI;function cI(){}pI.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)},pI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},pI.prototype.key=function(e){return"".concat(e.key)};var lI=pI;function pI(e){this.storage=e}hI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var fI=hI;function hI(e){this.handlers=e}vI.prototype.handle=function(e,t){e.close()},vI.prototype.supports=function(e){return"CLOSE"===e.type};var dI=vI;function vI(){}mI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},mI.prototype.supports=function(e){return"WEB_LINK"===e.type};var yI=mI;function mI(e){this.urlHandler=e}EI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},EI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var gI=EI;function EI(e){this.urlHandler=e}bI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+bI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},bI.prototype.supports=function(e){return"HIDDEN"===e.type},bI.HIDE_EXPIRATION=864e5;var wI=bI;function bI(e,t){this.storage=e,this.clock=t}_I.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},_I.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var TI=_I;function _I(e){this.urlHandler=e}OI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},OI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var II=OI;function OI(e){this.urlHandler=e}NI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},NI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var AI=NI;function NI(e){this.urlHandler=e}SI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},SI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var RI=SI;function SI(e){this.urlHandler=e}CI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},CI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},t.properties),{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})})};case"CLOSE":return{key:"$in_app_close",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key})};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.text})}}};var xI=CI;function CI(e){this.core=e}kI.prototype.present=function(r){return u(this,void 0,void 0,function(){var t;return l(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]}})})};var UI=kI;function kI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}PI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},PI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var MI=PI;function PI(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()}var DI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},LI=(FI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},FI.prototype.context=function(e,t){var r,e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return r=c(c({},e.properties),{decision_reason:e.reason}),new DI(e.inAppMessage,e.message,t.user,ke.sanitize(r))},FI);function FI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}jI.prototype.open=function(){return u(this,void 0,void 0,function(){var t,r;return l(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),r=this.context.user.hackleProperties.deviceType,[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),deviceType:r?String(r):null})];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";var VI=jI;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))}}HI.create=function(e){return new HI(e)},HI.prototype.create=function(e,t){return new VI(this.scriptLoader,e,t)};var zI=HI;function HI(e){this.scriptLoader=e}GI.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(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()]}})})},GI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},GI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})};var BI=GI;function GI(e){this.scriptUrl=e}JI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},JI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=YI.of(e,t,r);return this.targetMatcher.anyMatches(e,Y0.create(),n.targets)};var KI=JI;function JI(e){this.targetMatcher=e}qI.of=function(e,t,r){return new qI(new K0("IN_APP_MESSAGE",r.id),e,t.user,t)};var YI=qI;function qI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}XI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},XI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new WI(new QI(i)))}return e.durationCap&&t.push(new WI(new tO(e.durationCap))),t};var $I=XI;function XI(e){this.storage=e}ZI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var WI=ZI;function ZI(e){this.matchCount=0,this.predicate=e}Object.defineProperty(eO.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),eO.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};var QI=eO;function eO(e){this.identifierCap=e}Object.defineProperty(rO.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),rO.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var tO=rO;function rO(e){this.durationCap=e}iO.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},iO.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var nO=iO;function iO(e){this.storage=e}sO.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var oO=sO;function sO(e){this.processors=e}uO.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},uO.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>uO.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-uO.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},uO.prototype.supports=function(e){return"IMPRESSION"===e.type},uO.IMPRESSION_MAX_SIZE=100;var aO=uO;function uO(e){this.impressionStorage=e}lO.prototype.process=function(e,t,r){},lO.prototype.supports=function(e){return"CLOSE"===e.type};var cO=lO;function lO(){}fO.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},fO.prototype.supports=function(e){return"ACTION"===e.type};var pO=fO;function fO(e){this.actionHandlerFactory=e}dO.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)};var hO=dO;function dO(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}yO.prototype.matches=function(e,t,r){return!!m0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var vO=yO;function yO(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}gO.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var mO=gO;function gO(e){this.handlers=e}wO.prototype.handle=function(e,t){e.close()},wO.prototype.supports=function(e){return"CLOSE"===e.type};var EO=wO;function wO(){}TO.prototype.handle=function(e,t){var r=tn.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},TO.prototype.supports=function(e){return"ACTION"===e.type};var bO=TO;function TO(e){this.eventHandler=e}IO.prototype.open=function(e){window.location.href=e.href};var _O=IO;function IO(){}AO.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var OO=AO;function AO(){}RO.prototype.open=function(e){window.open(e.href)};var NO=RO;function RO(){}xO.prototype.open=function(e){window.location.replace(e)};var SO=xO;function xO(){}function CO(e,t,r){return null===e||(!MO(t,UO)||r.current!==r.referrer)&&!MO(e,t)}var UO={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},kO={current:void 0,referrer:void 0},MO=function(t,r){return Object.keys(UO).every(function(e){return t[e]===r[e]})},PO=(DO.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},UO),t),n=new mo,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},DO.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();CO(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},DO.prototype.onSessionEnded=function(e,t,r){},DO.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},DO);function DO(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}FO.prototype.get=function(){var e=this.storage.getItem(In);return e?JSON.parse(e):null},FO.prototype.set=function(e){this.storage.setItem(In,JSON.stringify(e))};var LO=FO;function FO(e){this.storage=e}jO.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},jO.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(i=So.tryDecodeURIComponent(i))&&(t[o]=i)}return t},jO.getQueryParams=function(e){return"undefined"==typeof window?{}:new jO(window.location.search).getQueryParams(e)};var VO=jO;function jO(e){this.search=e}HO.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},HO.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,HO.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var zO=HO;function HO(){}GO.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},GO.prototype.params=function(e){return(a.isNullOrUndefined(e)?VO:new VO(e)).getQueryParams(GO.CAMPAIGN_QUERY_CONDITION)},GO.prototype.resolve=function(e){return{utm_campaign:e[KO],utm_content:e[JO],utm_id:e[YO],utm_medium:e[qO],utm_source:e[$O],utm_term:e[XO],gclid:e[WO],fbclid:e[ZO]}},GO.prototype.parseDomain=function(){if("undefined"==typeof window)return kO;return{current:zO.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,zO.extractDomain(e)}()}},GO.CAMPAIGN_QUERY_CONDITION=function(e,t){return vi.isNotEmptyString(t)};var BO=GO;function GO(){}var KO="utm_campaign",JO="utm_content",YO="utm_id",qO="utm_medium",$O="utm_source",XO="utm_term",WO="gclid",ZO="fbclid",QO=(eA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},eA.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){s.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},eA);function eA(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}rA.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!m0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var tA=rA;function rA(e){this.workspaceFetcher=e}var nA={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.34.0",IAM_RENDERER_VERSION_HEADER:"0.0.6"},iA=(oA.config=function(e){return c(c({},nA),e)},oA.logging=function(e){s.initCounter(function(e){return hi.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},oA.sdk=function(e,t){return s.log.debug("SDK key: ".concat(e)),e||s.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},oA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},oA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},oA.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(s.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},oA);function oA(){}aA.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},aA.prototype.sync=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},aA.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},aA.prototype.close=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},aA.prototype.safe=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var sA=aA;function aA(){this.synchronizations=[]}cA.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},cA.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},cA.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},cA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},cA.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var uA=cA;function cA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}pA.prototype.schedule=function(e,t){e=new fA(e,t);return e.start(),e},pA.prototype.schedulePeriodically=function(e,t,r){e=new dA(e,t,r);return e.start(),e};var lA=pA;function pA(){}hA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},hA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var fA=hA;function hA(e,t){this.delayMillis=e,this.task=t,this.timeout=null}vA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},vA.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},vA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var dA=vA;function vA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}mA.prototype.fetchIfModified=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},mA.prototype.createRequest=function(e){var t=mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(_i.IF_MODIFIED_SINCE,e),t.build()},mA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Pn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ui.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Ui.record("get.workspace",t,null),r;case 4:return[2]}})})},mA.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(_i.LAST_MODIFIED)}};var yA=mA;function mA(e,t){this.url=e,this.transport=t}EA.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},EA.prototype.createRequest=function(e){e={identifiers:yt(e)},e=Ee.encodeURL(JSON.stringify(e));return mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},EA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Pn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ui.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Ui.record("get.cohorts",t,null),r;case 4:return[2]}})})},EA.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return F_.fromDto(e)};var gA=EA;function EA(e,t){this.url=e,this.transport=t}bA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},bA.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},bA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},bA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},bA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},bA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},bA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},bA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},bA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},bA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},bA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},bA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},bA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},bA.prototype.getAttributes=function(){return this.attributes},bA.from=function(e){return new bA(p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return ot.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ut.fromJson),e.events.map(ft.fromJson),p.mapNotNullOrUndefined(e.segments,Ut.fromJson),e.containers.map(Mt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ft.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,dr.fromJson),e.workspace.attributes)};var wA=bA;function bA(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}_A.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},_A.prototype.setWorkspace=function(e){try{this.workspace=wA.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},_A.prototype.get=function(){return this.workspace},_A.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},_A.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var TA=_A;function _A(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}OA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},OA.prototype.dispatchEventsSynchronously=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.synchronousTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},OA.prototype.dispatchEvents=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})};var IA=OA;function OA(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}NA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},NA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof m0?m0.isExposureEvent(e)?t.push(e.toDto()):m0.isTrackEvent(e)?r.push(e.toDto()):m0.isRemoteConfigEvent(e)&&n.push(e.toDto()):m0.isExposureEventDto(e)?t.push(e):m0.isTrackEventDto(e)?r.push(e):m0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return mi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},NA.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Pn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ui.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Ui.record("post.events",t,null),r;case 4:return[2]}})})};var AA=NA;function NA(e,t){this.url=e,this.transport=t}SA.prototype.add=function(e){return this.repository.add(e)},SA.prototype.delete=function(e){return this.repository.delete(e)},SA.prototype.flush=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},SA.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"hidden":return}};var RA=SA;function SA(e,t){this.repository=e,this.transport=t}function xA(){this.listeners={}}xA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},xA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},xA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(UA,CA=xA);var CA,t=UA;function UA(){return null!==CA&&CA.apply(this,arguments)||this}Ne(PA,kA=t),PA.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},PA.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},PA.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},PA.prototype.isPageViewEvent=function(e){return m0.isTrackEvent(e)&&"$page_view"===e.event.key},PA.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},PA.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return s.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},PA.prototype.close=function(){this.flush(!0)};var kA,MA=PA;function PA(e,t,r,n,i){var o=kA.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}LA.prototype.send=function(e){e=e.toBuilder().addHeader(cn,this.sdk.key).addHeader(ln,this.sdk.name).addHeader(pn,this.sdk.version).addHeader(fn,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var DA=LA;function LA(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}VA.intercept=function(e,t){return t instanceof DA?t:new DA(e,Le.instance,t)};var FA=VA;function VA(){}zA.create=function(){return new zA},zA.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0===n.status?r(new Error("Request Error")):(e=new bi(n.status,n.responseText,function(e){var t=_i.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var jA=zA;function zA(){}BA.create=function(){return new BA},BA.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(bi.ok())})},BA.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(cn),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(ln,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(pn,"unknown")),e.headers.get(fn));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var HA=BA;function BA(){}KA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var GA=KA;function KA(e){this.invocationResponseResolver=e}qA.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)};var JA,YA=qA;function qA(e){this.invocationResponseResolver=e}(zs=JA=JA||{}).prompt="prompt",zs.function="function";XA.prototype.getInvocator=function(e,t){return e===JA.prompt?new GA(t):e===JA.function?new YA(t):null};var $A=XA;function XA(){}ZA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},ZA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var WA=ZA;function ZA(e,t,r,n){var i=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.core=n,this.onEvent=function(e){e=i.determiner.determineOrNull(e);e&&(i.core.flush(!0),i.redirector.redirect(e))},this.initialize()}var QA=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.event=n},eN=(tN.prototype.determineOrNull=function(e){if(!m0.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new QA(t,o,i,e)}return null},tN);function tN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}nN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=iN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,Y0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,Y0.create(),t.includeTargets))};var rN=nN;function nN(e){this.targetMatcher=e}oN.of=function(e,t){return new oN(new K0("SPLIT_URL",t.insertId),t.user,e)};var iN=oN;function oN(e,t,r){this.key=e,this.user=t,this.workspace=r}aN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var sN=aN;function aN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}cN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(cN.SPLIT_URL_CONFIG_KEY,"")),r=on.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},cN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},cN.prototype.resolveManualRedirectUrl=function(e,t){e=So.tryParse(e);return e?this.decorateCampaign(e,t):null},cN.prototype.decorateCampaign=function(e,t){t=t.event.user.hackleProperties.queryParameter;if(vi.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];vi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},cN.SPLIT_URL_CONFIG_KEY="redirectUrl";var uN=cN;function cN(e){this.campaignParser=e}pN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},pN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},pN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var lN=pN;function pN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}hN.prototype.setNeedDispatch=function(e){this.needDispatch=e},hN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(hN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},hN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var fN=hN;function hN(){this.needDispatch=!0}vN.prototype.get=function(){var e=this.storage.getItem(Cn);if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},vN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(Cn,JSON.stringify(e))},vN.prototype.clear=function(){this.storage.removeItem(Cn)};var dN=vN;function vN(e,t){this.sdk=e,this.storage=t}mN.prototype.addListener=function(e){this.listeners.push(e)},mN.prototype.changeVisibility=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onVisibilityChanged(t,r)})};var yN=mN;function mN(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[]}EN.create=function(e,t,r){return void 0===r&&(r=Le.instance),new EN(new wN(r,e,t))},EN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var gN=EN;function EN(e){this.limiter=e}bN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},bN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new TN(e+this.intervalMillis,this.limit)),this.currentScope};var wN=bN;function bN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}_N.prototype.isExpired=function(e){return this.expirationTime<e},_N.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var TN=_N;function _N(e,t){this.expirationTime=e,this.token=t}ON.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var IN=ON;function ON(e){this.determiners=e}AN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;xe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};np=AN;function AN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Ne(SN,NN=np),SN.prototype.supports=function(e){return m0.isRemoteConfigEvent(e)},SN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var NN,RN=SN;function SN(e,t){return void 0===t&&(t=Le.instance),NN.call(this,e,t)||this}Ne(UN,xN=np),UN.prototype.supports=function(e){return m0.isExposureEvent(e)},UN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var xN,CN=UN;function UN(e,t){return void 0===t&&(t=Le.instance),xN.call(this,e,t)||this}MN.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},MN.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")};var kN=MN;function MN(){}DN.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},DN.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var PN=DN;function DN(e){this.invocator=e}var LN=s.log,FN=null;function VN(e,t){var r,t=iA.config(t);iA.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp,s=(new $A).getInvocator(o.getInvocationType(),new kN);if(null===s)throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));if(s=new PN(s),s=new jo(s),!o.getAppMode)return s;if((o=o.getAppMode().toLowerCase())===Fo.native)return s;if(o!==Fo.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(o));return o=jN(n,i),(n=new Ho(o,s)).syncUser(),n}}catch(e){LN.error("Unexpected exception while check WebApp client: ".concat(e))}return jN(e,t)}function jN(e,t){var r=iA.sdk(e,t);if(FN)return LN.debug("use already exists hackleClient"),FN;var n=new ko,i=(n.initialize(),new eI),o=Co.getInstance({days:yn,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=iA.isBeaconSupported(),a=FA.intercept(r,jA.create()),u=FA.intercept(r,HA.create()),c=a,l=(s&&(c=u),new sA),p=new uA(l,new lA,iA.pollingIntervalMillis(t)),f=new dN(r,rI.postfix(i,"_".concat(e.slice(0,8)))),h=new yA(uI.clientFetch(t.sdkUrl,r.key),a),f=new TA(f,h),h=(l.add("workspace",f),new gA(uI.userCohorts(t.sdkUrl),a)),d=new BO,v=new Y_(rI.postfix(o,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new K_(Po(),v,h,d,Le.instance,y,m),v=(l.add("cohort",g),new Z_(t.sessionTimeoutMillis,rI.postfix(o,"_".concat(e.slice(8))))),h=(g.addListener(v),new P_(i,"".concat(En,"_").concat(e),hn)),m=new AA(uI.clientDispatch(t.eventUrl),a),l=m,s=(s&&(l=new AA(uI.beaconDispatch(t.eventUrl,r.key),u)),new RA(h,m)),r=new IA(m,l,s),u=new IN([new RN(iA.dedupIntervalMillis(t)),new CN(iA.dedupIntervalMillis(t))]),h=new MA(r,hn,new lA,vn,t.auto_track_page_view),m=new x0(h,u,v,g),E=new fN,l=new nb(new iI(o,"".concat(On,"_").concat(e.slice(0,8)))),r=new nb(new iI(o,"".concat(An,"_").concat(e.slice(0,8)))),u=new lI(rI.prefix(i,"".concat(Nn,"_").concat(e.slice(0,8),"_"))),i=new nO(rI.prefix(i,"".concat(Rn,"_").concat(e.slice(0,8),"_"))),w=O_.create(f,m,[l,r],u),e=new PO(new LO(rI.postfix(o,"_".concat(e.slice(0,8)))),d,w,g),b=new R0(g,w),b=(v.addListener(e),v.addListener(b),new xI(w)),u=new fI([new dI,new yI(new _O),new gI(new _O),new wI(u,Le.instance),new TI(new OO),new II(new OO),new AI(new NO),new RI(new NO)]),u=new oO([new aO(i),new pO(u),new cO]),b=new hO(Le.instance,b,u),u=new mO([new EO,new bO(b)]),T=new BI(uI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),T=new UI(zI.create(T),b,u),b=new vO(new KI(h_.get("targetMatcher")),new $I(i)),u=new LI(f,b,w),i=(new MI(h,u,T),new tA(f)),b=(new QO(h,i),new rN(h_.get("targetMatcher"))),u=new lN(o,Sn,{days:xn}),T=new eN(f,b,u,w),i=new sN(new uN(d),new SO,u,E),o=(new WA(h,T,i,w),new sI(w,g,l,r)),d=(null==(f=t.devTool)?void 0:f.userExplorer)&&"function"==typeof(null==(b=t.devTool)?void 0:b.userExplorer),u=t.devTool&&d?{manager:t.devTool,userExplorer:o}:void 0,h=new Ri(uI.monitoring(t.monitoringUrl),a,c,new lA,dn),T=(hi.addRegistry(h),p.start(),gN.create(Un,1)),_=new Io(w,p,v,g,T,u),I=(FN=_,new yN);I.addListener(m),I.addListener(s),I.addListener(v),I.addListener(h),I.addListener(n),window.addEventListener("pageshow",function(){return I.changeVisibility("visible")}),window.addEventListener("pagehide",function(){return I.changeVisibility("hidden")}),document.addEventListener("visibilitychange",function(){return I.changeVisibility(document.visibilityState)});return t.autoOpenDevTool&&(t.devTool?_.showUserExplorer():LN.error("DevTool is not provided")),i=Date.now(),l=g.currentUser,r=v.currentSessionId,(L_(y,l)?v.startNewSessionIfNeeded(l,i):v.startNewSession(y,l,i))===r&&e.startNewCampaignIfNeeded(l,i),I.changeVisibility("visible"),_.onReady(function(){(new S_).install(w,g);var e=_;function r(e){if("function"==typeof window.Event)return new Event(e);var t={bubbles:!1,cancelable:!1,detail:void 0},r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}try{history.pushState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)LN.error(e);else try{LN.error(e)}catch(e){}}}}(history.pushState),history.replaceState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)LN.error(e);else try{LN.error(e)}catch(e){}}}}(history.replaceState),window.addEventListener("popstate",function(){try{window.dispatchEvent(r("locationchange"))}catch(e){if(e instanceof Error)LN.error(e);else try{LN.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)LN.error(e);else try{LN.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)LN.error(e);else try{LN.error(e)}catch(e){}}_.trackPageView(),E.dispatchDoneEventIfNeeded()}),_}var zN=function(e,t){return(zN=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 HN=function(){return(HN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function BN(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}GN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},GN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},GN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};ma=GN;function GN(){this.listeners={}}JN.arePropertiesEqual=function(e,t){var r=JN.coerceUnknownToProperties(e),n=JN.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]})},JN.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var KN=JN;function JN(){}qN.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)&&KN.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&KN.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var YN=qN;function qN(){}var $N=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=VN(e,HN(HN({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.34.0"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return zN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(HN(HN({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){YN.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i.prototype.fetch=function(){return this.client.fetch()},i}(ma);var P={exports:{}},w={},XN=Object.getOwnPropertySymbols,WN=Object.prototype.hasOwnProperty,ZN=Object.prototype.propertyIsEnumerable;var va=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))WN.call(r,o)&&(n[o]=r[o]);if(XN)for(var s=XN(r),a=0;a<s.length;a++)ZN.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},QN=va,I="function"==typeof Symbol&&Symbol.for,eR=I?Symbol.for("react.element"):60103,tR=I?Symbol.for("react.portal"):60106,i=I?Symbol.for("react.fragment"):60107,yp=I?Symbol.for("react.strict_mode"):60108,m=I?Symbol.for("react.profiler"):60114,rR=I?Symbol.for("react.provider"):60109,nR=I?Symbol.for("react.context"):60110,iR=I?Symbol.for("react.forward_ref"):60112,C=I?Symbol.for("react.suspense"):60113,oR=I?Symbol.for("react.memo"):60115,sR=I?Symbol.for("react.lazy"):60116,aR="function"==typeof Symbol&&Symbol.iterator;function uR(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 cR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lR={};function pR(e,t,r){this.props=e,this.context=t,this.refs=lR,this.updater=r||cR}function fR(){}function hR(e,t,r){this.props=e,this.context=t,this.refs=lR,this.updater=r||cR}pR.prototype.isReactComponent={},pR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(uR(85));this.updater.enqueueSetState(this,e,t,"setState")},pR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},fR.prototype=pR.prototype;var oa=hR.prototype=new fR,dR=(oa.constructor=hR,QN(oa,pR.prototype),oa.isPureReactComponent=!0,{current:null}),vR=Object.prototype.hasOwnProperty,yR={key:!0,ref:!0,__self:!0,__source:!0};function mR(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)vR.call(t,n)&&!yR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:eR,type:e,key:o,ref:s,props:i,_owner:dR.current}}function gR(e){return"object"==typeof e&&null!==e&&e.$$typeof===eR}var ER=/\/+/g,wR=[];function bR(e,t,r,n){var i;return wR.length?((i=wR.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function TR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,wR.length<10&&wR.push(e)}function _R(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case eR:case tR:o=!0}}if(o)return n(i,t,""===r?"."+IR(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+IR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=aR&&t[aR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+IR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(uR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function IR(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 OR(e,t){e.func.call(e.context,t,e.count++)}function AR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?NR(e,n,r,function(e){return e}):null!=e&&(gR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(ER,"$&/")+"/")+r,e={$$typeof:eR,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function NR(e,t,r,n,i){var o="";_R(e,AR,t=bR(t,o=null!=r?(""+r).replace(ER,"$&/")+"/":o,n,i)),TR(t)}var RR={current:null};function SR(){var e=RR.current;if(null===e)throw Error(uR(321));return e}var xR,CR,UR,o={ReactCurrentDispatcher:RR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:dR,IsSomeRendererActing:{current:!1},assign:QN},O=(w.Children={map:function(e,t,r){if(null==e)return e;var n=[];return NR(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;_R(e,OR,t=bR(null,null,t,r)),TR(t)},count:function(e){return _R(e,function(){return null},null)},toArray:function(e){var t=[];return NR(e,t,null,function(e){return e}),t},only:function(e){if(gR(e))return e;throw Error(uR(143))}},w.Component=pR,w.Fragment=i,w.Profiler=m,w.PureComponent=hR,w.StrictMode=yp,w.Suspense=C,w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o,w.cloneElement=function(e,t,r){if(null==e)throw Error(uR(267,e));var n=QN({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=dR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)vR.call(t,a)&&!yR.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:eR,type:e.type,key:i,ref:o,props:n,_owner:s}},w.createContext=function(e,t){return(e={$$typeof:nR,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:rR,_context:e},e.Consumer=e},w.createElement=mR,w.createFactory=function(e){var t=mR.bind(null,e);return t.type=e,t},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:iR,render:e}},w.isValidElement=gR,w.lazy=function(e){return{$$typeof:sR,_ctor:e,_status:-1,_result:null}},w.memo=function(e,t){return{$$typeof:oR,type:e,compare:void 0===t?null:t}},w.useCallback=function(e,t){return SR().useCallback(e,t)},w.useContext=function(e,t){return SR().useContext(e,t)},w.useDebugValue=function(){},w.useEffect=function(e,t){return SR().useEffect(e,t)},w.useImperativeHandle=function(e,t,r){return SR().useImperativeHandle(e,t,r)},w.useLayoutEffect=function(e,t){return SR().useLayoutEffect(e,t)},w.useMemo=function(e,t){return SR().useMemo(e,t)},w.useReducer=function(e,t,r){return SR().useReducer(e,t,r)},w.useRef=function(e){return SR().useRef(e)},w.useState=function(e){return SR().useState(e)},w.version="16.14.0",{}),Rc=Function.call.bind(Object.prototype.hasOwnProperty),kR=function(){};function MR(e,t,r,n,i){if("production"!==production)for(var o in e)if(UR(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,xR)}catch(e){s=e}!s||s instanceof Error||kR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in CR)&&(CR[s.message]=!0,o=i?i():"",kR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(xR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CR={},UR=Rc,kR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),MR.resetWarningCache=function(){"production"!==production&&(CR={})},"production"!==production){var PR=va,DR=MR,_="function"==typeof Symbol&&Symbol.for,LR=_?Symbol.for("react.element"):60103,FR=_?Symbol.for("react.portal"):60106,VR=_?Symbol.for("react.fragment"):60107,jR=_?Symbol.for("react.strict_mode"):60108,zR=_?Symbol.for("react.profiler"):60114,HR=_?Symbol.for("react.provider"):60109,BR=_?Symbol.for("react.context"):60110,GR=_?Symbol.for("react.concurrent_mode"):60111,KR=_?Symbol.for("react.forward_ref"):60112,JR=_?Symbol.for("react.suspense"):60113,YR=_?Symbol.for("react.suspense_list"):60120,qR=_?Symbol.for("react.memo"):60115,$R=_?Symbol.for("react.lazy"):60116,XR=_?Symbol.for("react.block"):60121,WR=_?Symbol.for("react.fundamental"):60117,ZR=_?Symbol.for("react.responder"):60118,QR=_?Symbol.for("react.scope"):60119,eS="function"==typeof Symbol&&Symbol.iterator,tS="@@iterator";function rS(e){if(null===e||"object"!=typeof e)return null;e=eS&&e[eS]||e[tS];return"function"==typeof e?e:null}var nS={current:null},iS={current:null},oS=/^(.*)[\\\/]/,sS=1;function aS(e){if(null==e)return null;if("number"==typeof e.tag&&hS("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 VR:return"Fragment";case FR:return"Portal";case zR:return"Profiler";case jR:return"StrictMode";case JR:return"Suspense";case YR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case BR:return"Context.Consumer";case HR:return"Context.Provider";case KR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case qR:return aS(e.type);case XR:return aS(e.render);case $R:r=(t=e)._status===sS?t._result:null;if(r)return aS(r)}var t,r;return null}var uS={},cS=null;function lS(e){cS=e}uS.getCurrentStack=null,uS.getStackAddendum=function(){var e,t,r,n,i,o="",s=(cS&&(e=aS(cS.type),r=cS._owner,o+=(e=e,t=cS._source,r=r&&aS(r.type),i="",t?(n=(s=t.fileName).replace(oS,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(oS))&&(s=s[1])?s.replace(oS,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),uS.getCurrentStack);return s&&(o+=s()||""),o};var pS={ReactCurrentDispatcher:nS,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:iS,IsSomeRendererActing:{current:!1},assign:PR};function fS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];dS("warn",e,r)}function hS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];dS("error",e,r)}function dS(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=pS.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}PR(pS,{ReactDebugCurrentFrame:uS,ReactComponentTreeHook:{}});var vS={};function yS(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;vS[r]||(hS("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),vS[r]=!0)}var mS={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){yS(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){yS(e,"replaceState")},enqueueSetState:function(e,t,r,n){yS(e,"setState")}},gS={};function ES(e,t,r){this.props=e,this.context=t,this.refs=gS,this.updater=r||mS}Object.freeze(gS),ES.prototype.isReactComponent={},ES.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")},ES.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var wS,bS={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(wS in bS)bS.hasOwnProperty(wS)&&!function(e,t){Object.defineProperty(ES.prototype,e,{get:function(){fS("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(wS,bS[wS]);function TS(){}function _S(e,t,r){this.props=e,this.context=t,this.refs=gS,this.updater=r||mS}TS.prototype=ES.prototype,(_=_S.prototype=new TS).constructor=_S,PR(_,ES.prototype),_.isPureReactComponent=!0;var IS,OS,AS=Object.prototype.hasOwnProperty,NS={key:!0,ref:!0,__self:!0,__source:!0};function RS(e){if(AS.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function SS(e){if(AS.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var xS={},CS=function(e,t,r,n,i,o,s){e={$$typeof:LR,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function US(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in RS(t)&&(s=t.ref,"string"==typeof(c=t).ref&&iS.current&&c.__self&&iS.current.stateNode!==c.__self&&(p=aS(iS.current.type),xS[p]||(hS('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',aS(iS.current.type),c.ref),xS[p]=!0))),SS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)AS.call(t,n)&&!NS.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,h=arguments.length-2;if(1==h)i.children=r;else if(1<h){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function m(){OS||(OS=!0,hS("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){IS||(IS=!0,hS("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),CS(e,o,s,a,u,iS.current,i)}function kS(e){return"object"==typeof e&&null!==e&&e.$$typeof===LR}var MS=".",PS=":",DS=!1,LS=/\/+/g;function FS(e){return(""+e).replace(LS,"$&/")}var VS=10,jS=[];function zS(e,t,r,n){var i;return jS.length?((i=jS.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function HS(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,jS.length<VS&&jS.push(e)}function BS(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case LR:case FR:a=!0}}if(a)return n(i,t,""===r?MS+GS(t,0):r),1;var u=0,c=""===r?MS:r+PS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+GS(o,l),n,i);else if("function"==typeof(r=rS(t))){r===t.entries&&(DS||fS("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."),DS=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+GS(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+uS.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 GS(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 KS(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function JS(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?YS(o,n,r,function(e){return e}):null!=o&&(kS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":FS(o.key)+"/")+r,o=CS(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function YS(e,t,r,n,i){var o="",t=zS(t,o=null!=r?FS(r)+"/":o,n,i);BS(e,JS,t),HS(t)}function qS(e){return"string"==typeof e||"function"==typeof e||e===VR||e===GR||e===zR||e===jR||e===JR||e===YR||"object"==typeof e&&null!==e&&(e.$$typeof===$R||e.$$typeof===qR||e.$$typeof===HR||e.$$typeof===BR||e.$$typeof===KR||e.$$typeof===WR||e.$$typeof===ZR||e.$$typeof===QR||e.$$typeof===XR)}function $S(){var e=nS.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 XS(){if(iS.current){var e=aS(iS.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var WS=!1,ZS={};function QS(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=XS())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),ZS[t=r]||(ZS[t]=!0,r="",e&&e._owner&&e._owner!==iS.current&&(r=" It was passed a child from "+aS(e._owner.type)+"."),lS(e),hS('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),lS(null)))}function ex(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];kS(n)&&QS(n,t)}else if(kS(e))e._store&&(e._store.validated=!0);else if(e){var i=rS(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)kS(o.value)&&QS(o.value,t)}}function tx(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=aS(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==KR&&t.$$typeof!==qR)return;r=t.propTypes}r?(lS(e),DR(r,e.props,"prop",n,uS.getStackAddendum),lS(null)):void 0===t.PropTypes||WS||(WS=!0,hS("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||hS("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function rx(e,t,r){var n,i=qS(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||XS(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===LR?(s="<"+(aS(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,hS("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)),US.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)ex(arguments[o],e);if(e===VR){var s=t;lS(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){hS("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&hS("Invalid attribute `ref` supplied to `React.Fragment`."),lS(null)}else tx(t);return t}var nx=!1;try{var ix=Object.freeze({}),ox=new Map([[ix,null]]),sx=new Set([ix]);ox.set(0,0),sx.add(0)}catch(e){}function ax(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=PR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in RS(t)&&(a=t.ref,l=iS.current),SS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)AS.call(t,n)&&!NS.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return CS(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)ex(arguments[i],n.type);return tx(n),n}function ux(e){var t=rx.bind(null,e);return t.type=e,nx||(nx=!0,fS("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 fS("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}_=rx,O.Children={map:function(e,t,r){if(null==e)return e;var n=[];return YS(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=zS(null,null,t,r),BS(e,KS,t),HS(t)},count:function(e){return BS(e,function(){return null},null)},toArray:function(e){var t=[];return YS(e,t,null,function(e){return e}),t},only:function(e){if(kS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},O.Component=ES,O.Fragment=VR,O.Profiler=zR,O.PureComponent=_S,O.StrictMode=jR,O.Suspense=JR,O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pS,O.cloneElement=ax,O.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&hS("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:BR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:HR,_context:r}),i=!1,t={$$typeof:BR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,hS("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,hS("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},O.createElement=_,O.createFactory=ux,O.createRef=function(){var e={current:null};return Object.seal(e),e},O.forwardRef=function(e){return null!=e&&e.$$typeof===qR?hS("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?hS("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&hS("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||hS("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:KR,render:e}},O.isValidElement=kS,O.lazy=function(e){var t,r,n={$$typeof:$R,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){hS("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){hS("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},O.memo=function(e,t){return qS(e)||hS("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:qR,type:e,compare:void 0===t?null:t}},O.useCallback=function(e,t){return $S().useCallback(e,t)},O.useContext=function(e,t){var r,n=$S();return void 0!==t&&hS("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?hS("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&&hS("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},O.useDebugValue=function(e,t){return $S().useDebugValue(e,t)},O.useEffect=function(e,t){return $S().useEffect(e,t)},O.useImperativeHandle=function(e,t,r){return $S().useImperativeHandle(e,t,r)},O.useLayoutEffect=function(e,t){return $S().useLayoutEffect(e,t)},O.useMemo=function(e,t){return $S().useMemo(e,t)},O.useReducer=function(e,t,r){return $S().useReducer(e,t,r)},O.useRef=function(e){return $S().useRef(e)},O.useState=function(e){return $S().useState(e)},O.version="16.14.0"}"production"===production?P.exports=w:P.exports=O;var cx=P.exports,lx=P.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),ou=lx.Consumer,px=lx.Provider;var fx=s.log;function hx(e,t){e=dx(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function dx(e,t){void 0===t&&(t="A");var r=P.exports.useContext(lx),n=r.hackle,i=r.userVersion,o=r.initialized,s=P.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||Xe.of(t,h.EXCEPTION):Xe.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=BN(P.exports.useState(function(){return n?s():(fx.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=BN(P.exports.useState(i),2),c=u[0],u=u[1];return mx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function vx(e){e=yx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function yx(e){var t=P.exports.useContext(lx),r=t.hackle,n=t.userVersion,i=t.initialized,o=P.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ze.off(h.EXCEPTION):Ze.off(h.SDK_NOT_READY)},[e,r,i]),t=BN(P.exports.useState(function(){return r?o():(fx.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=BN(P.exports.useState(n),2),u=a[0],a=a[1];return mx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function mx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function gx(e){var t,r=e.experimentKey,e=e.children,n=(r=hx(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(P.exports.Children.forEach(e,function(e){P.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?P.exports.cloneElement(t,{variation:i}):null)}function Ex(e){return e.variation,e=e.children,P.exports.createElement(P.exports.Fragment,null,e)}function wx(e){var t=(r=vx(e.featureKey)).isLoading,r=r.isOn;return t?null:cx.createElement(cx.Fragment,null,e.children(r))}n.Bucket=ut,n.Cohort=nn,n.Container=Mt,n.ContainerGroup=Dt,n.CoreVersion=Jt,n.Decision=Xe,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=it,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=Ve,n.EventType=ft,n.Experiment=ot,n.FeatureFlagDecision=Ze,n.HackleContext=lx,n.HackleContextConsumer=ou,n.HackleContextProvider=px,n.HackleExperiment=gx,n.HackleFeature=wx,n.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=BN(P.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return P.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),P.exports.useEffect(function(){function e(){a(function(e){return HN(HN({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),P.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return HN(HN({},e),{initialized:!0})})},function(){a(function(e){return HN(HN({},e),{initialized:!0})})}).catch(function(){a(function(e){return HN(HN({},e),{initialized:!0})})})},[t]),i||s.initialized?cx.createElement(px,{value:s},e):null},n.HackleVariation=Ex,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=pr,n.IAM_BEHAVIOR=lr,n.IAM_DISPLAY_TYPE=ar,n.IAM_HORIZONTAL_ALIGNMENT=hr,n.IAM_LAYOUT_TYPE=ur,n.IAM_ORIENTATION=cr,n.IAM_PLATFORM_TYPE=or,n.IAM_STATUS=ir,n.IAM_TIMEUNIT=sr,n.IAM_VERTICAL_ALIGNMENT=fr,n.IdentifierType=dt,n.IdentifiersBuilder=mt,n.InAppMessage=dr,n.InAppMessageAction=tn,n.InAppMessageAlignment=jr,n.InAppMessageBackground=en,n.InAppMessageButton=$r,n.InAppMessageButtonStyle=Qr,n.InAppMessageContext=kr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Dr,n.InAppMessageDecision=qe,n.InAppMessageDurationCap=Nr,n.InAppMessageEventFrequencyCap=_r,n.InAppMessageEventTrigger=wr,n.InAppMessageEventTriggerRule=br,n.InAppMessageExperimentContext=Pr,n.InAppMessageIdentifierCap=Or,n.InAppMessageImage=Hr,n.InAppMessagePeriodAlways=yr,n.InAppMessagePeriodCustom=gr,n.InAppMessagePositionalButton=Wr,n.InAppMessageTargetContext=Sr,n.InAppMessageText=Gr,n.InAppMessageTextAttribute=Jr,n.InAppMessageTextStyle=qr,n.InAppMessageUserOverride=Cr,n.Logger=s,n.MATCH_OPERATORS=Zt,n.MATCH_TYPES=Xt,n.MATCH_VALUE_TYPES=Wt,n.MetaVersion=qt,n.ParameterConfiguration=rt,n.PropertyOperations=Eo,n.PropertyOperationsBuilder=mo,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Ft,n.RemoteConfigParameterValue=Ht,n.RemoteConfigTargetRule=jt,n.SEGMENT_TYPES=tr,n.Segment=Ut,n.Slot=lt,n.SplitUrlConfig=on,n.SplitUrlTargets=an,n.TARGET_ACTION_TYPES=Qt,n.TARGET_KEY_TYPES=er,n.Target=wt,n.TargetAction=Rt,n.TargetCondition=Tt,n.TargetKey=It,n.TargetMatch=At,n.TargetRule=xt,n.TargetingType=rr,n.Variation=at,n.Version=Gt,n.createInstance=function(e,t){return new $N(e,t)},n.getUserId=Po,n.removeUserId=Do,n.resolveIdentifiers=yt,n.sanitizeUser=Et,n.setUserId=function(e){Co.getInstance().setItem(gn,e)},n.useFeature=function(e){var t=(n=P.exports.useContext(lx)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=BN(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&fx.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=BN(P.exports.useState(r),2))[0],n=n[1];return mx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=P.exports.useContext(lx)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(h.EXCEPTION)},[e,t,n]),o=(s=BN(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&fx.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=BN(P.exports.useState(r),2))[0],n=n[1];return mx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=vx,n.useLoadableFeatureDetail=yx,n.useLoadableRemoteConfig=function(){var e=(o=P.exports.useContext(lx)).hackle,t=o.userVersion,r=o.initialized,n=P.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=BN(P.exports.useState(function(){return e||fx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=BN(P.exports.useState(t),2))[0],a=a[1];return mx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=hx,n.useLoadableVariationDetail=dx,n.useRemoteConfig=function(){var e=(r=P.exports.useContext(lx)).hackle,t=r.userVersion,r=r.initialized,n=P.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=BN(P.exports.useState(function(){return e||fx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=BN(P.exports.useState(t),2))[0],r=r[1];return mx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=P.exports.useContext(lx).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(fx.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=P.exports.useContext(lx)).hackle,n=a.userVersion,i=a.initialized,o=P.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=BN(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&fx.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=BN(P.exports.useState(n),2))[0],c=c[1];return mx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=P.exports.useContext(lx)).hackle,n=i.userVersion,i=i.initialized,o=P.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Xe.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=BN(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&fx.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=BN(P.exports.useState(n),2))[0],i=i[1];return mx(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__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(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[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;for(var j=[],V=0;V<256;++V)j.push((V+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+"-"+j[e[t+4]]+j[e[t+5]]+"-"+j[e[t+6]]+j[e[t+7]]+"-"+j[e[t+8]]+j[e[t+9]]+"-"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase();if("string"==typeof(t=e)&&F.test(t))return e;throw TypeError("Stringified UUID is invalid")}function H(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(D=D||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return D(L);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return z(n)}var e="3.7.5",G="function"==typeof atob,t="function"==typeof btoa,r="function"==typeof Buffer;const B="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0;const J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(J),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=String.fromCharCode.bind(String),W="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),X=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push($.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?X(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?X(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(r>>16&255,r>>8&255,255&r);return n};const le=G?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>W(Buffer.from(e,"base64")):e=>W(le(e).split("").map(e=>e.charCodeAt(0))),fe=e=>pe(de(e)),he=r?e=>Buffer.from(e,"base64").toString("utf8"):B?e=>B.decode(pe(e)):e=>ce(le(e)),de=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>he(de(e));function ye(){var e=(e,t)=>Object.defineProperty(String.prototype,e,me(t));e("fromBase64",function(){return ve(this)}),e("toBase64",function(e){return se(this,e)}),e("toBase64URI",function(){return se(this,!0)}),e("toBase64URL",function(){return se(this,!0)}),e("toUint8Array",function(){return fe(this)})}function ge(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,me(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const me=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:e,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ve,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:te,toUint8Array:fe,extendString:ye,extendUint8Array:ge,extendBuiltins:()=>{ye(),ge()}};we.isNotNullOrUndefined=function(e){return null!=e},we.isNullOrUndefined=function(e){return null==e},we.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},we.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=we;function we(){}be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},be.associate=function(e,t){return this.associateTo(e,new Map,t)},be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r};var p=be;function be(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(_e.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},_e.initCounter=function(t){this.counters=p.associate(Object.keys(Te),function(e){return[e,t(e)]})},_e._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)Ie.log(e,r,t.message,t);else try{Ie.log(e,r,t)}catch(e){}},_e.increment=function(e){var t;null!=(t=null==(t=_e.counters)?void 0:t.get(e))&&t.increment()},_e.logLevel=Te.INFO,_e.log={error:function(e){Te.ERROR<=_e.logLevel&&(_e._log("ERROR",e),_e.increment("ERROR"))},warn:function(e){Te.WARN<=_e.logLevel&&(_e._log("WARN",e),_e.increment("WARN"))},info:function(e){Te.INFO<=_e.logLevel&&(_e._log("INFO",e),_e.increment("INFO"))},debug:function(e){Te.DEBUG<=_e.logLevel&&(_e._log("DEBUG",e),_e.increment("DEBUG"))}},_e);function _e(){}Ae.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Ae;function Ae(){}var Oe=function(e,t){return(Oe=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 Ne(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}Oe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function l(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Re(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Se=s.log,Ce=(xe.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},xe.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]})},xe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},xe.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},xe.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},xe.MAX_IDENTIFIER_TYPE_LENGTH=128,xe.MAX_IDENTIFIER_VALUE_LENGTH=512,xe);function xe(){}var Me=s.log,Pe=(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 i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){Me.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?Me.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Me.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},ke.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},ke.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},ke.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},ke.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))},ke.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},ke.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},ke.SYSTEM_PROPERTY_KEY_PREFIX="$",ke.MAX_PROPERTIES_COUNT=128,ke.MAX_PROPERTY_KEY_LENGTH=128,ke.MAX_PROPERTY_VALUE_LENGTH=1024,ke);function ke(){}var Ue=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(f.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C0);case"seconds":return e/(f.C3/f.C0);case"minutes":return e/(f.C4/f.C0);case"hours":return e/(f.C5/f.C0);case"days":return e/(f.C6/f.C0)}},f.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C1);case"microseconds":return e;case"seconds":return e/(f.C3/f.C1);case"minutes":return e/(f.C4/f.C1);case"hours":return e/(f.C5/f.C1);case"days":return e/(f.C6/f.C1)}},f.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C2/f.C0);case"microseconds":return e*(f.C2/f.C1);case"milliseconds":return e;case"seconds":return e/(f.C3/f.C2);case"minutes":return e/(f.C4/f.C2);case"hours":return e/(f.C5/f.C2);case"days":return e/(f.C6/f.C2)}},f.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C3/f.C0);case"microseconds":return e*(f.C3/f.C1);case"milliseconds":return e*(f.C3/f.C2);case"seconds":return e;case"minutes":return e/(f.C4/f.C3);case"hours":return e/(f.C5/f.C3);case"days":return e/(f.C6/f.C3)}},f.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C4/f.C0);case"microseconds":return e*(f.C4/f.C1);case"milliseconds":return e*(f.C4/f.C2);case"seconds":return e*(f.C4/f.C3);case"minutes":return e;case"hours":return e/(f.C5/f.C4);case"days":return e/(f.C6/f.C4)}},f.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C5/f.C0);case"microseconds":return e*(f.C5/f.C1);case"milliseconds":return e*(f.C5/f.C2);case"seconds":return e*(f.C5/f.C3);case"minutes":return e*(f.C5/f.C4);case"hours":return e;case"days":return e/(f.C6/f.C5)}},f.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C6/f.C0);case"microseconds":return e*(f.C6/f.C1);case"milliseconds":return e*(f.C6/f.C2);case"seconds":return e*(f.C6/f.C3);case"minutes":return e*(f.C6/f.C4);case"hours":return e*(f.C6/f.C5);case"days":return e}},f.C6=24*(f.C5=60*(f.C4=60*(f.C3=1e3*(f.C2=1e3*(f.C1=1e3*(f.C0=1)))))),f.converter={nanoseconds:f.nanosToUnit,microseconds:f.microsToUnit,milliseconds:f.millisToUnit,seconds:f.secondsToUnit,minutes:f.minutesToUnit,hours:f.hoursToUnit,days:f.daysToUnit},f);function f(){}Fe.prototype.tick=function(){return 1e3*Date.now()},Fe.prototype.currentMillis=function(){return Date.now()},Fe.instance=new Fe;var Le=Fe;function Fe(){}Ve.prototype.get=function(e,t){return t};var je=Ve;function Ve(){}He.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var ze=He;function He(e){this.parameters=e}var Ge=s.log;function Be(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Ge.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function Ke(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=Be(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}Ye.of=function(e,t){return new Ye(e,t)};var Je=Ye;function Ye(e,t){this.value=e,this.reason=t}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r,n){return new $e(t,r,e,n=void 0===n?{}:n)};var qe=$e;function $e(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}Xe.of=function(e,t,r,n){return new Xe(e,t,r=void 0===r?new je:r,n=void 0===n?void 0:n)},Xe.prototype.get=function(e,t){return this.config.get(e,t)};var We=Xe;function Xe(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}Qe.on=function(e,t,r){return new Qe(!0,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},Qe.off=function(e,t,r){return new Qe(!1,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},Qe.prototype.get=function(e,t){return this.config.get(e,t)};var Ze=Qe;function Qe(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}tt.prototype.get=function(e,t){return t};var et=tt;function tt(){}nt.fromJson=function(e){return new nt(e.id,new ze(p.associate(e.parameters,function(e){return[e.key,e.value]})))},nt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var rt=nt;function nt(e,t){this.id=e,this.config=t}d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET";var h=d;function d(){}var it=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],ot=(st.fromJson=function(e,t){var r=st.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new at(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return Ct.fromJson(e,rr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return wt.fromJson(e,rr.PROPERTY)}),a=an.fromJson(t.execution.targetUrls),u=Be(it,t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return Ct.fromJson(e,rr.PROPERTY)}),l=Rt.fromJson(t.execution.defaultRule);return r&&u&&l&&new st(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},st.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Ge.debug("Unsupported status [".concat(e,"]"))}},st.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},st.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},st.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},st);function st(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,v,y){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}var at=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ut=(ct.fromJson=function(e){return new ct(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new lt(t,r,e)}))},ct);function ct(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}pt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var lt=pt;function pt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ht.fromJson=function(e){return new ht(e.id,e.key)};var ft=ht;function ht(e,t){this.id=e,this.key=t}vt.ID="$id",vt.USER="$userId",vt.DEVICE="$deviceId",vt.SESSION="$sessionId",vt.HACKLE_DEVICE="$hackleDeviceId";var dt=vt;function vt(){}function yt(e){var t=new gt;return t.addIdentifiers(e.identifiers||{}),t.add(dt.ID,e.id),t.add(dt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(dt.USER,e.userId),t.build()}mt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},mt.prototype.add=function(e,t){var r=Ce.sanitizeValue(t);return Ce.isValidType(e)&&r?this.identifiers[e]=t:Ge.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},mt.prototype.build=function(){return this.identifiers};var gt=mt;function mt(){this.identifiers={}}function Et(e){var t,r={};return r.id=null!=(t=Ce.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Ce.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Ce.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Pe.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Ce.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}bt.fromJson=function(e,t){return new bt(p.mapNotNullOrUndefined(e.conditions,function(e){return Tt.fromJson(e,t)}))},bt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var wt=bt;function bt(e){this.conditions=e}_t.fromJson=function(e,t){var r=It.fromJson(e.key);if(r&&t.supports(r.type))return(t=Ot.fromJson(e.match))&&new _t(r,t)},_t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Tt=_t;function _t(e,t){this.key=e,this.match=t}At.fromJson=function(e){var t=Be(er,e.type);return t&&new At(t,e.name)},At.prototype.toJson=function(){return{type:this.type,name:this.name}};var It=At;function At(e,t){this.type=e,this.name=t}Nt.fromJson=function(e){var t=Be(Wt,e.type),r=Be(Zt,e.operator),n=Be(Xt,e.valueType);return t&&r&&n&&new Nt(t,r,n,e.values)},Nt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Ot=Nt;function Nt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}St.fromJson=function(e){var t=Be(Qt,e.type);return t&&new St(t,e.variationId,e.bucketId)};var Rt=St;function St(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}xt.fromJson=function(e,t){t=wt.fromJson(e.target,t),e=Rt.fromJson(e.action);return t&&e&&new xt(t,e)};var Ct=xt;function xt(e,t){this.target=e,this.action=t}Pt.fromJson=function(e){var t=Be(tr,e.type);return t&&new Pt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.SEGMENT)}))};var Mt=Pt;function Pt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Ut.fromJson=function(e){return new Ut(e.id,e.bucketId,e.groups.map(function(e){return Dt.fromJson(e)}))},Ut.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var kt=Ut;function Ut(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Lt.fromJson=function(e){return new Lt(e.id,e.experiments)};var Dt=Lt;function Lt(e,t){this.id=e,this.experiments=t}jt.fromJson=function(e){var t=Be(Xt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Vt.fromJson(e,rr.PROPERTY)}),n=Ht.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)};var Ft=jt;function jt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}zt.fromJson=function(e,t){t=wt.fromJson(e.target,t);return t&&new zt(e.key,e.name,t,e.bucketId,Ht.fromJson(e.value))};var Vt=zt;function zt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Gt.fromJson=function(e){return new Gt(e.id,e.value)};var Ht=Gt;function Gt(e,t){this.id=e,this.rawValue=t}Kt.tryParse=function(e){var t,r,n,i,e=Kt.regExp.exec(e);if(e)return e[0],t=e[1],r=e[2],r=void 0===r?"0":r,n=e[3],n=void 0===n?"0":n,i=e[4],e=e[5],new Kt(new Jt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),qt.parse(i),qt.parse(e))},Kt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kt.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 Bt=Kt;function Kt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Yt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Jt=Yt;function Yt(e,t,r){this.major=e,this.minor=t,this.patch=r}$t.parse=function(e){return e?new $t(e.split(".")):$t.EMPTY},$t.prototype.isEmpty=function(){return 0===this.identifiers.length},$t.prototype.isNotEmpty=function(){return!this.isEmpty()},$t.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},$t.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=$t.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},$t.compareIdentifiers=function(e,t){return $t.numericIdentifierRegExp.test(e)&&$t.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},$t.EMPTY=new $t([]),$t.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var qt=$t;function $t(e){this.identifiers=e}var Wt=["MATCH","NOT_MATCH"],Xt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Zt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Qt=["VARIATION","BUCKET"],er=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],tr=["USER_ID","USER_PROPERTY"],rr=(nr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},nr.IDENTIFIER=new nr("SEGMENT"),nr.PROPERTY=new nr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),nr.SEGMENT=new nr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),nr);function nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var ir=["ACTIVE","DRAFT","PAUSE"],or=["WEB","ANDROID","IOS"],sr=["IMMEDIATE","CUSTOM"],ar=["MODAL","BANNER"],ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE"],cr=["VERTICAL","HORIZONTAL"],lr=["CLICK"],pr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],fr=["TOP","MIDDLE","BOTTOM"],hr=["LEFT","CENTER","RIGHT"],dr=(vr.fromJson=function(e){var t,r=Be(ir,e.status);if(!a.isNullOrUndefined(r)){switch(Be(sr,e.timeUnit)){case"IMMEDIATE":t=new yr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new mr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=Pr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(br.fromJson),i=_r.fromJson(e.eventFrequencyCap),new vr(e.id,e.key,r,t,new wr(n,i),Sr.fromJson(e.targetContext),o)}},vr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},vr);function vr(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}gr.prototype.within=function(e){return!0};var yr=gr;function gr(){this.type="IMMEDIATE"}Er.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var mr=Er;function Er(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var wr=function(e,t){this.rules=e,this.frequencyCap=t},br=(Tr.fromJson=function(e){return new Tr(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))},Tr);function Tr(e,t){this.eventKey=e,this.targets=t}Ir.fromJson=function(e){return e?new Ir(e.identifiers.map(Ar.fromJson),Nr.fromJson(e.duration)):null};var _r=Ir;function Ir(e,t){this.identifierCaps=e,this.durationCap=t}Or.fromJson=function(e){return new Or(e.identifierType,e.countPerIdentifier)};var Ar=Or;function Or(e,t){this.identifierType=e,this.count=t}Rr.fromJson=function(e){if(!e)return null;var t=Be(Ue,e.durationUnit.timeUnit);return t?new Rr(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Nr=Rr;function Rr(e,t){this.durationMillis=e,this.count=t}Cr.fromJson=function(e){return new Cr(e.overrides.map(xr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var Sr=Cr;function Cr(e,t){this.overrides=e,this.targets=t}Mr.fromJson=function(e){return new Mr(e.identifierType,e.identifiers)};var xr=Mr;function Mr(e,t){this.identifierType=e,this.identifiers=t}kr.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new Ur(e.exposure.key)),Ke(or,e.platformTypes));if(!a.isNullOrUndefined(r)){var n=Ke(cr,e.orientations);if(!a.isNullOrUndefined(n)){var i=p.mapOrUndefined(e.messages,Dr.fromJson);if(!a.isNullOrUndefined(i))return new kr(e.defaultLang,t,r,n,i)}}};var Pr=kr;function kr(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var Ur=function(e){this.key=e},Dr=(Lr.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Hr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,$r.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=$r.fromJson2(e.closeButton),!a.isNullOrUndefined(i))){var o=p.mapOrUndefined(e.outerButtons,Xr.fromJson);if(!a.isNullOrUndefined(o))return new Lr(e.variationKey,e.lang,t,r,e.text?Br.fromJson(e.text):void 0,n,i,new en(e.background.color),e.action?tn.fromJson(e.action):void 0,o)}}}}},Lr.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,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},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()})}},Lr);function Lr(e,t,r,n,i,o,s,a,u,c){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.text=i,this.buttons=o,this.closeButton=s,this.background=a,this.action=u,this.outerButtons=c}jr.fromJson=function(e){var t=Be(ur,e.layoutType),r=Be(ar,e.displayType);if(!a.isNullOrUndefined(r)&&!a.isNullOrUndefined(t))return new jr(r,t,e.alignment?Vr.fromJson(e.alignment):void 0)};var Fr=jr;function jr(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}zr.fromJson=function(e){var t=Be(hr,e.horizontal);if(!a.isNullOrUndefined(t)){e=Be(fr,e.vertical);if(!a.isNullOrUndefined(e))return new zr(t,e)}},zr.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var Vr=zr;function zr(e,t){this.horizontal=e,this.vertical=t}Gr.fromJson=function(e){var t=Be(cr,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=tn.fromJson(e.action),!a.isNullOrUndefined(r)))return new Gr(t,e.imagePath,r)}},Gr.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}};var Hr=Gr;function Gr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}Kr.fromJson=function(e){return new Kr(Jr.fromJson(e.title),Jr.fromJson(e.body))},Kr.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}}}};var Br=Kr;function Kr(e,t){this.title=e,this.body=t}Yr.fromJson=function(e){return new Yr(e.text,new qr(e.style.textColor))};var Jr=Yr;function Yr(e,t){this.text=e,this.style=t}var qr=function(e){this.color=e},$r=(Wr.fromJson=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Wr(e.text,new Qr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Wr.fromJson2=function(e){var t=tn.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Wr("✕",new Qr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Wr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Wr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Wr);function Wr(e,t,r){this.text=e,this.style=t,this.action=r}Zr.fromJson=function(e){var t=$r.fromJson(e.button);if(!a.isNullOrUndefined(t)){e=Vr.fromJson(e.alignment);if(!a.isNullOrUndefined(e))return new Zr(t,e)}},Zr.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Xr=Zr;function Zr(e,t){this.button=e,this.alignment=t}var Qr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},en=function(e){this.color=e},tn=(rn.fromJson=function(e){var t=Be(lr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Be(pr,e.type);if(!a.isNullOrUndefined(r))return new rn(t,r,null!=(t=e.value)?t:void 0)}},rn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},rn);function rn(e,t,r){this.behavior=e,this.type=t,this.value=r}var nn=function(e){this.id=e},on=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",sn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new sn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},sn);function sn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}un.fromJson=function(e){if(null!==e)return new un(p.mapNotNullOrUndefined(e.match,function(e){return wt.fromJson(e,rr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var an=un;function un(e,t){this.includeTargets=e,this.excludeTargets=t}var cn="X-HACKLE-SDK-KEY",ln="X-HACKLE-SDK-NAME",pn="X-HACKLE-SDK-VERSION",fn="X-HACKLE-SDK-TIME",hn=100,dn=6e4,vn=500,yn=3650,gn="_hackle_hid",mn="_hackle_id",En="hackle-repository-storage",wn="_hackle_session_id",bn="_hackle_last_event_ts",Tn="_hackle_uid",_n="_hackle_did",In="_hackle_mkt",An="hackle-manual-override_ab",On="hackle-manual-override_ff",Nn="hackle-iam-hide",Rn="hackle-iam-impression",Sn="hackle-split-url-redirected",Cn=1/86400*3,xn="hackle-workspace-config",Mn=6e4,Pn=1e3,kn=(Un.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},Un.prototype.tag=function(e,t){return this._tags[e]=t,this},Un.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Un);function Un(e){this.name=e,this._tags={},this.name=e}Ln.start=function(e){return new Ln(e=void 0===e?Ln.defaultClock:e)},Ln.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Ln.defaultClock=new Le;var Dn=Ln;function Ln(e){this._clock=e,this.startTime=this._clock.tick()}jn.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},jn.prototype.tag=function(e,t){return this._tags[e]=t,this},jn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Fn=jn;function jn(e){this.name=e,this._tags={}}zn.prototype.values=function(){return Array.from(this.data.values())},zn.prototype.keys=function(){return Array.from(this.data.keys())},zn.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},zn.prototype.has=function(e){return void 0!==this.get(e)},zn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},zn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},zn.prototype.forEach=function(e){this.data.forEach(e)},zn.prototype.filter=function(e){for(var t=new zn(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},zn.prototype.entries=function(){return Array.from(this.data.entries())};var Vn=zn;function zn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Gn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Hn=Gn;function Gn(e,t){this.valueSupplier=t,this.field=e}function Bn(e,t){return e.name===t.name&&Ce.isEquals(e.tags,t.tags)}Object.defineProperty(Kn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Kn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Kn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Kn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Fn(e).tags(t).register(this)},Kn.prototype.timer=function(e,t){return void 0===t&&(t={}),new kn(e).tags(t).register(this)},Kn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Kn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Kn.prototype.close=function(){};G=Kn;function Kn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Vn(Bn)}Ne(Yn,Jn=G),Yn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),s.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Yn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},Yn.prototype.close=function(){this.stop()};var Jn,r=Yn;function Yn(e,t){var r=Jn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}$n.prototype.count=function(){return this.counterValue},$n.prototype.increment=function(e){this.counterValue+=null!=e?e:1},$n.prototype.measure=function(){return[new Hn("count",this.count.bind(this))]};var qn=$n;function $n(e){this.counterValue=0,this.id=e}Xn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new qn(this.id),e},Xn.prototype.count=function(){return this.currentCounter.count()},Xn.prototype.increment=function(e){this.currentCounter.increment(e)},Xn.prototype.measure=function(){return[new Hn("count",this.count.bind(this))]};var Wn=Xn;function Xn(e){this.id=e,this.currentCounter=new qn(e)}Qn.prototype.count=function(){return this._count},Qn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Qn.prototype.max=function(e){return De.nanosToUnit(this._max,e)},Qn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Qn.prototype.record=function(e,t){e<0||(t=De.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Qn.prototype.measure=function(){var e=this;return[new Hn("count",this.count.bind(this)),new Hn("total",function(){return e.totalTime("milliseconds")}),new Hn("max",function(){return e.max("milliseconds")}),new Hn("mean",function(){return e.mean("milliseconds")})]};var Zn=Qn;function Qn(e){this._count=0,this._total=0,this._max=0,this.id=e}ti.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Zn(this.id),e},ti.prototype.count=function(){return this.currentTimer.count()},ti.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ti.prototype.max=function(e){return this.currentTimer.max(e)},ti.prototype.record=function(e,t){this.currentTimer.record(e,t)},ti.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ti.prototype.measure=function(){var e=this;return[new Hn("count",this.count.bind(this)),new Hn("total",function(){return e.totalTime("milliseconds")}),new Hn("max",function(){return e.max("milliseconds")}),new Hn("mean",function(){return e.mean("milliseconds")})]};var ei=ti;function ti(e){this.id=e,this.currentTimer=new Zn(e)}Ne(ni,ri=r),ni.prototype.createCounter=function(e){return new Wn(e)},ni.prototype.createTimer=function(e){return new ei(e)},ni.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0===(r=t).flush||"function"!=typeof r.flush?e:e.concat(t.flush());var r},[]);this.flushMetrics(t,e)};var ri,e=ni;function ni(e,t){return ri.call(this,e,t)||this}oi.prototype.count=function(){return 0},oi.prototype.increment=function(e){},oi.prototype.measure=function(){return[new Hn("count",this.count.bind(this))]};var ii=oi;function oi(e){this.id=e}Object.defineProperty(ai.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),ai.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},ai.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},ai.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},ai.prototype.measure=function(){return[new Hn("count",this.count.bind(this))]};var si=ai;function ai(e){this._counters=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new ii(e)}ci.prototype.measure=function(){var e=this;return[new Hn("count",this.count.bind(this)),new Hn("total",function(){return e.totalTime("milliseconds")}),new Hn("max",function(){return e.max("milliseconds")}),new Hn("mean",function(){return e.mean("milliseconds")})]},ci.prototype.count=function(){return 0},ci.prototype.totalTime=function(e){return 0},ci.prototype.max=function(e){return 0},ci.prototype.mean=function(e){return 0},ci.prototype.record=function(e,t){};var ui=ci;function ci(e){this.id=e}Object.defineProperty(pi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),pi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},pi.prototype.max=function(e){return this.firstTimer.max(e)},pi.prototype.mean=function(e){return this.firstTimer.mean(e)},pi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(pi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),pi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},pi.prototype.count=function(){return this.firstTimer.count()},pi.prototype.measure=function(){var e=this;return[new Hn("count",this.count.bind(this)),new Hn("total",function(){return e.totalTime("milliseconds")}),new Hn("max",function(){return e.max("milliseconds")}),new Hn("mean",function(){return e.mean("milliseconds")})]};var li=pi;function pi(e){this._timers=new Vn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new ui(e)}Ne(hi,fi=G),hi.prototype.createCounter=function(e){e=new si(e);return this.addRegistry(e),e},hi.prototype.createTimer=function(e){e=new li(e);return this.addRegistry(e),e},hi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},hi.prototype.add=function(r){r instanceof hi||this.registries.has(r)||(this.registries.add(r),this.metrics.forEach(function(e){var t;void 0!==(t=e).add&&"function"==typeof t.add&&e.add(r)}))},hi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var fi,o=hi;function hi(){var e=null!==fi&&fi.apply(this,arguments)||this;return e.registries=new Vn(function(e,t){return e.id===t.id}),e}vi.counter=function(e,t){return vi.globalRegistry.counter(e,t)},vi.timer=function(e,t){return vi.globalRegistry.timer(e,t)},vi.addRegistry=function(e){vi.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},vi.globalRegistry=new o;var di=vi;function vi(){}gi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},gi.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var yi=gi;function gi(){}Ei.builder=function(){return new wi},Ei.get=function(e){return Ei.builder().url(e).build()},Ei.prototype.toBuilder=function(){return new wi(this)};var mi=Ei;function Ei(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}bi.prototype.url=function(e){return this._url=e,this},bi.prototype.method=function(e){return this._method=e,this},bi.prototype.body=function(e){return this._body=e,this},bi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},bi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},bi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new mi(this._url,this._method,this._body,this._headers.build(),e)};var wi=bi;function bi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:Ii.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}_i.ok=function(e,t){return _i.of(200,e,t)},_i.of=function(e,t,r){return new _i(e,null!=t?t:null,null!=r?r:Ii.empty())},_i.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},_i.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},_i.prototype.isNotModified=function(){return 304===this.statusCode};var Ti=_i;function _i(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Ai.empty=function(){return new Ai(new Map)},Ai.builder=function(){return new Oi(new Map)},Ai.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(yi.equalsIgnoreCase(i,e))return n}return null},Ai.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ai.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},Ai.prototype.toBuilder=function(){return new Oi(this.headers)},Ai.IF_MODIFIED_SINCE="If-Modified-Since",Ai.LAST_MODIFIED="Last-Modified";var Ii=Ai;function Ai(e){this.headers=e}Ni.prototype.add=function(e,t){return this.headers.set(e,t),this},Ni.prototype.build=function(){return new Ii(this.headers)};var Oi=Ni;function Ni(e){this.headers=e}Ne(Ci,Ri=e),Ci.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),hn).forEach(function(e){r.dispatch(e,t)})},Ci.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Ci.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return s.log.debug("Failed to flushing metrics: ".concat(e))})},Ci.prototype.createRequest=function(e){return mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Ci.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Ci.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Ci.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}};var Ri,Si=Ci;function Ci(e,t,r,n,i){n=Ri.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Mi.experiment=function(e,t,r){t=di.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Mi.featureFlag=function(e,t,r){t=di.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Mi.remoteConfig=function(e,t,r){t=di.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Mi.inAppMessage=function(e,t,r){t=di.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var xi=Mi;function Mi(){}ki.record=function(e,t,r){e=di.timer("api.call",{operation:e,success:ki.success(r)});t.stop(e)},ki.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Pi=ki;function ki(){}Di.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)}},Di.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Ui=Di;function Di(){}var Li=s.log,Fi=(ji.prototype.get=function(t,r){var n,e=Dn.start();try{n=this.decide(t,r)}catch(e){Li.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,h.EXCEPTION)}return xi.remoteConfig(e,t,n),n.value},ji.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Ui.decide(this.core,e,t,r)},ji);function ji(e,t,r){this.core=e,this.userManager=t,this.user=r}Hi.prototype.contains=function(e){return this._properties.has(e)},Hi.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},Hi.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)},Hi.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=Pe.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},Hi.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},Hi.prototype.build=function(){return this._properties};var Vi,zi=Hi;function Hi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Vi=Vi||{}).SET="$set",i.SET_ONCE="$setOnce",i.UNSET="$unset",i.INCREMENT="$increment",i.APPEND="$append",i.APPEND_ONCE="$appendOnce",i.PREPEND="$prepend",i.PREPEND_ONCE="$prependOnce",i.REMOVE="$remove",i.CLEAR_ALL="$clearAll";Bi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new zi).addProperties(e).addProperties(t).build()};var Gi=Bi;function Bi(){}Ji.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new zi).addProperties(e).addProperties(t,!0).build()};var Ki=Ji;function Ji(){}qi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new zi).addProperties(e).remove(t).build()};var Yi=qi;function qi(){}Wi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new zi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},Wi.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var $i=Wi;function Wi(){}Xi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new zi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Xi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Xi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Xi.prototype.contains=function(e,t){return e.includes(t)},Xi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Xi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Re(Re([],e,!0),[t],!1)};t=Xi;function Xi(){}Ne(eo,Zi=t),eo.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Zi,Qi=eo;function eo(){return null!==Zi&&Zi.apply(this,arguments)||this}Ne(no,to=t),no.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},no.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var to,ro=no;function no(){return null!==to&&to.apply(this,arguments)||this}Ne(so,io=t),so.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var io,oo=so;function so(){return null!==io&&io.apply(this,arguments)||this}Ne(co,ao=t),co.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)},co.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},co.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var ao,uo=co;function co(){return null!==ao&&ao.apply(this,arguments)||this}Ne(fo,lo=t),fo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},fo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var lo,po=fo;function fo(){return null!==lo&&lo.apply(this,arguments)||this}vo.prototype.operate=function(e,t){return new Map};var ho=vo;function vo(){}go.get=function(e){switch(e){case Vi.SET:return new Gi;case Vi.SET_ONCE:return new Ki;case Vi.UNSET:return new Yi;case Vi.INCREMENT:return new $i;case Vi.APPEND:return new Qi;case Vi.APPEND_ONCE:return new ro;case Vi.PREPEND:return new oo;case Vi.PREPEND_ONCE:return new uo;case Vi.CLEAR_ALL:return new ho;case Vi.REMOVE:return new po}};var yo=go;function go(){}Eo.prototype.set=function(e,t){return this.add(Vi.SET,e,t)},Eo.prototype.setOnce=function(e,t){return this.add(Vi.SET_ONCE,e,t)},Eo.prototype.unset=function(e){return this.add(Vi.UNSET,e,"-")},Eo.prototype.increment=function(e,t){return this.add(Vi.INCREMENT,e,t)},Eo.prototype.append=function(e,t){return this.add(Vi.APPEND,e,t)},Eo.prototype.appendOnce=function(e,t){return this.add(Vi.APPEND_ONCE,e,t)},Eo.prototype.prepend=function(e,t){return this.add(Vi.PREPEND,e,t)},Eo.prototype.prependOnce=function(e,t){return this.add(Vi.PREPEND_ONCE,e,t)},Eo.prototype.remove=function(e,t){return this.add(Vi.REMOVE,e,t)},Eo.prototype.clearAll=function(){return this.add(Vi.CLEAR_ALL,"clearAll","-")},Eo.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new wo(new Map(e))},Eo.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},Eo.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new zi);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var mo=Eo;function Eo(){this.operations=new Map}bo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=yo.get(t).operate(r,e)}),r},bo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),Pe.sanitize(a.fromMap(e))),r))}),i},bo.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n};var wo=bo;function bo(e){this.operations=null!=e?e:new Map}_o.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})};var To=_o;function _o(){}Ao.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Ao.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Ao.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Ao:new Ao(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Ao.prototype.toProperties=function(){return{pagePath:this.pagePath,pageTitle:this.pageTitle,host:this.host,url:this.url,referrer:this.referrer,queryParameter:this.queryParameter,protocol:this.protocol.replace(":","")}};var Io=Ao;function Ao(e,t,r,n,i,o,s){void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),this.pagePath=e=void 0===e?"":e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s}var Oo=s.log,No=(Ro.prototype.initialize=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Oo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Oo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Oo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},Ro.prototype.getSessionId=function(){return this.sessionManager.sessionId},Ro.prototype.getUser=function(){return this.userManager.currentUser},Ro.prototype.setUser=function(e){try{var t=Et(e);if(!t)return Oo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Oo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},Ro.prototype.setUserId=function(e){try{var t=void 0;if(void 0===e)t=this.userManager.setUserId(void 0);else{var r=Ce.sanitizeValue(e);if(!r)return Oo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Oo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},Ro.prototype.setDeviceId=function(e){try{var t=Ce.sanitizeValue(e);if(!t)return Oo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Oo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},Ro.prototype.setUserProperty=function(e,t){e=(new mo).set(e,t).build();return this.updateUserProperties(e)},Ro.prototype.setUserProperties=function(e){try{var t=Pe.sanitize(e),r=new mo;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return Oo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},Ro.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Oo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},Ro.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new mo).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Oo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},Ro.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},Ro.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Dn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Oo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),We.of(i,h.EXCEPTION)}}(this);return xi.experiment(e,r,t),t},Ro.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},Ro.prototype.featureFlagDetail=function(r,n){var e=Dn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Oo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}}(this);return xi.featureFlag(e,r,t),t},Ro.prototype.track=function(e,t){try{Oo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Oo.error("Unexpected exception while tracking event: ".concat(e))}},Ro.prototype.trackPageView=function(e){var t=Io.createWithCurrentPage();this.pageEventTracker.track(t)},Ro.prototype.remoteConfig=function(e){return new Fi(this.core,this.userManager,e)},Ro.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},Ro.prototype.onInitialized=function(r){var n;return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,To.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),Oo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},Ro.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},Ro.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Oo.debug("UserExplorer opened."),di.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Oo.error("UserExplorer is not provided")},Ro.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Oo.warn("There is no active HackleDevtools.")},Ro.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},Ro.prototype.close=function(){Oo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},Ro);function Ro(e,t,r,n,i,o,s){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.pageEventTracker=o,this.devTools=s,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}var So=s.log,Co=(xo.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return So.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},xo);function xo(e,t){this.invocationProcessor=e,this.user=t}Po.tryParse=function(e){try{return new URL(e)}catch(e){return}},Po.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:Po.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},Po.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},Po.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},Po.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},Po.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Mo=Po;function Po(){}Uo.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]:""},Uo.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return null!=(t=Mo.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Uo.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},Uo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Uo.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},Uo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Uo.prototype.getOptions=function(){return this.options},Uo.getInstance=function(e){return void 0===e&&(e={days:yn,isCrossSubdomain:!0}),Uo.storage=Uo.storage?Uo.storage:new Uo(e)};var ko=Uo;function Uo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Lo.prototype.initialize=function(){ko.getInstance().getItem(gn)||Vo()},Lo.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return jo();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var Do=Lo;function Lo(){}function Fo(){var e=ko.getInstance(),t=e.getItem(mn);if(t)return t;t=e.getItem(gn);return t||Vo()}function jo(){ko.getInstance().removeItem(mn)}function Vo(){var e=H();return ko.getInstance().setItem(gn,e),e}var zo,Ho=s.log;(r=zo=zo||{}).native="native",r.web_view_wrapper="web_view_wrapper";Bo.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Fo()}catch(e){return Ho.error("Unexpected exception while get sessionId: ".concat(e)),Fo()}},Bo.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Et(t))?e:this.defaultUser()}catch(e){return Ho.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},Bo.prototype.setUser=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Et(n)))return Ho.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set user: ".concat(e))}return[2]})})},Bo.prototype.setUserId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Ce.sanitizeValue(n)))return Ho.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},Bo.prototype.setDeviceId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Ce.sanitizeValue(n)))return Ho.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},Bo.prototype.setUserProperty=function(r,n){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},Bo.prototype.setUserProperties=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=Pe.sanitize(n),r=new mo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Ho.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},Bo.prototype.updateUserProperties=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},Bo.prototype.resetUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Ho.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},Bo.prototype.variation=function(t,e,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return Ho.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},Bo.prototype.variationDetail=function(t,e,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return We.of(o.variation,o.reason,new ze(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(e){return Ho.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),We.of(r,h.EXCEPTION)}},Bo.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return Ho.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},Bo.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ze(i.isOn,i.reason,new ze(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))),void 0)}catch(e){return Ho.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}},Bo.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){Ho.error("Unexpected exception while tracking event: ".concat(e))}},Bo.prototype.trackPageView=function(e){Ho.info("Web to app integration feature is not support 'trackPageView' method")},Bo.prototype.remoteConfig=function(e){return new Co(this.invocationProcessor,this.convertUser(e))},Bo.prototype.onReady=function(e,t){e()},Bo.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Ho.error("Unexpected exception while show userExplorer: ".concat(e))}},Bo.prototype.hideUserExplorer=function(){Ho.info("Web to app integration feature is not support 'hideUserExplorer' method")},Bo.prototype.fetch=function(){return Promise.resolve()},Bo.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},Bo.prototype.close=function(){Ho.info("Web to app integration feature is not support 'close' method")},Bo.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},Bo.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Et(e))?e:void 0},Bo.prototype.defaultUser=function(){return{deviceId:Fo()}};var Go=Bo;function Bo(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this)}Jo.prototype.getSessionId=function(){return this.browser.getSessionId()},Jo.prototype.getUser=function(){return this.browser.getUser()},Jo.prototype.syncUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},Jo.prototype.setUser=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.setUserId=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.setDeviceId=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.setUserProperty=function(t,r){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.setUserProperties=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.updateUserProperties=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.resetUser=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Jo.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},Jo.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},Jo.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},Jo.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},Jo.prototype.track=function(e,t){return this.browser.track(e,t)},Jo.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},Jo.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},Jo.prototype.onReady=function(e,t){this.browser.onReady(e,t)},Jo.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},Jo.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},Jo.prototype.fetch=function(){return this.browser.fetch()},Jo.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},Jo.prototype.close=function(){this.browser.close()};var Ko=Jo;function Jo(e,t){this.browser=e,this.app=t,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this)}function Yo(e){return e&&e.Math==Math&&e}function qo(e){try{return!!e()}catch(e){return!0}}function $o(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Wo(e){return Ps(Ms(e),8,-1)}function Xo(e){if(null==e)throw Ls("Can't call method on "+e);return e}function Zo(e){return Fs(js(e))}function Qo(e){return"function"==typeof e}function es(e){return"object"==typeof e?null!==e:Vs(e)}function ts(e,t){return arguments.length<2?(r=zs[e],Hs(r)?r:void 0):zs[e]&&zs[e][t];var r}function rs(e){try{return Xs(e)}catch(e){return"Object"}}function ns(e){if(Zs(e))return e;throw ea(Qs(e)+" is not a function")}function is(e,t){return null==(e=e[t])?void 0:ta(e)}function os(t,r){try{aa(sa,t,{value:r,configurable:!0,writable:!0})}catch(e){sa[t]=r}return r}function ss(e){return pa(la(e))}function as(e){return"Symbol("+(void 0===e?"":e)+")_"+ga(++va+ya,36)}function us(e){var t;return Ea(_a,e)&&(ba||"string"==typeof _a[e])||(t="Symbol."+e,ba&&Ea(Ia,e)?_a[e]=Ia[e]:_a[e]=(Ta&&Aa?Aa:Oa)(t)),_a[e]}function cs(e){return e=ka(e,"string"),Ua(e)?e:e+""}function ls(e){return La?Da.createElement(e):{}}function ps(e){if(Ya(e))return e;throw $a(qa(e)+" is not an object")}function fs(e){return lu[e]||(lu[e]=cu(e))}function hs(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Ru(r)&&Cu(r,o,n),n.global)i?e[t]=r:xu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Su.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ds(e){return(e=+e)!=e||0==e?0:ku(e)}function vs(e,t){return(e=Uu(e))<0?Du(e+t,0):Lu(e,t)}function v(e){return Vu(e.length)}function ys(a){return function(e,t,r){var n,i=zu(e),o=Gu(i),s=Hu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function gs(e,t){var r,n=Ku(e),i=0,o=[];for(r in n)!Bu(Yu,r)&&Bu(n,r)&&qu(o,r);for(;t.length>i;)!Bu(n,r=t[i++])||~Ju(o,r)||qu(o,r);return o}function ms(e,t,r){for(var n=rc(t),i=ic.f,o=nc.f,s=0;s<n.length;s++){var a=n[s];tc(e,a)||r&&tc(r,a)||i(e,a,o(t,a))}}function Es(e,t){return(e=cc[uc(e)])==pc||e!=lc&&(sc(t)?oc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?fc:a?fc[o]||yc(o,{}):(fc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=hc(u,r))&&i.value:u[r],!mc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;gc(n,i)}(e.sham||i&&i.sham)&&dc(n,"sham",!0),vc(u,r,n,e)}}var ws,bs,Ts,_s,Is,As,Os,Ns,G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=Yo("object"==typeof globalThis&&globalThis)||Yo("object"==typeof window&&window)||Yo("object"==typeof self&&self)||Yo("object"==typeof G&&G)||function(){return this}()||Function("return this")(),e={},i=!qo(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!qo(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Rs=Function.prototype.call,r=t?Rs.bind(Rs):function(){return Rs.apply(Rs,arguments)},G={},g={}.propertyIsEnumerable,Ss=Object.getOwnPropertyDescriptor,m=Ss&&!g.call({1:2},1),m=(G.f=m?function(e){e=Ss(this,e);return!!e&&e.enumerable}:g,t),g=Function.prototype,E=g.bind,Cs=g.call,xs=m&&E.bind(Cs,Cs),g=m?function(e){return e&&xs(e)}:function(e){return e&&function(){return Cs.apply(e,arguments)}},E=g,Ms=E({}.toString),Ps=E("".slice),m=qo,ks=Wo,Us=Object,Ds=g("".split),E=m(function(){return!Us("z").propertyIsEnumerable(0)})?function(e){return"String"==ks(e)?Ds(e,""):Us(e)}:Us,Ls=TypeError,Fs=E,js=Xo,Vs=Qo,zs=o,Hs=Qo,m=g({}.isPrototypeOf),Gs=ts("navigator","userAgent")||"",w=Gs,Bs=o.process,Ks=o.Deno,Bs=Bs&&Bs.versions||Ks&&Ks.version,Ks=Bs&&Bs.v8,Bs=T=!(T=Ks?0<(b=Ks.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&w&&(!(b=w.match(/Edge\/(\d+)/))||74<=b[1])&&(b=w.match(/Chrome\/(\d+)/))?+b[1]:T,Js=Bs,Ks=qo,w=!!Object.getOwnPropertySymbols&&!Ks(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Js&&Js<41}),b=w&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ys=ts,qs=Qo,$s=m,Ws=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Ys("Symbol");return qs(t)&&$s(t.prototype,Ws(e))},Xs=String,Zs=Qo,Qs=rs,ea=TypeError,ta=ns,ra=r,na=Qo,ia=es,oa=TypeError,Ks={exports:{}},sa=o,aa=Object.defineProperty,ua=os,_="__core-js_shared__",ua=o[_]||ua(_,{}),ca=ua,la=((Ks.exports=function(e,t){return ca[e]||(ca[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"}),Xo),pa=Object,fa=ss,ha=g({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return ha(fa(e),t)},da=g,va=0,ya=Math.random(),ga=da(1..toString),da=o,ma=Ks.exports,Ea=_,wa=as,ba=w,Ta=b,_a=ma("wks"),Ia=da.Symbol,Aa=Ia&&Ia.for,Oa=Ta?Ia:Ia&&Ia.withoutSetter||wa,Na=r,Ra=es,Sa=T,Ca=is,xa=function(e,t){var r,n;if("string"===t&&na(r=e.toString)&&!ia(n=ra(r,e)))return n;if(na(r=e.valueOf)&&!ia(n=ra(r,e)))return n;if("string"!==t&&na(r=e.toString)&&!ia(n=ra(r,e)))return n;throw oa("Can't convert object to primitive value")},Ma=TypeError,Pa=us("toPrimitive"),ka=function(e,t){if(!Ra(e)||Sa(e))return e;var r=Ca(e,Pa);if(r){if(r=Na(r,e,t=void 0===t?"default":t),!Ra(r)||Sa(r))return r;throw Ma("Can't convert object to primitive value")}return xa(e,t=void 0===t?"number":t)},Ua=T,w=es,Da=o.document,La=w(Da)&&w(Da.createElement),Fa=ls,b=!i&&!qo(function(){return 7!=Object.defineProperty(Fa("div"),"a",{get:function(){return 7}}).a}),ja=r,Va=G,za=$o,Ha=Zo,Ga=cs,Ba=_,Ka=b,Ja=Object.getOwnPropertyDescriptor,ma=(e.f=i?Ja:function(e,t){if(e=Ha(e),t=Ga(t),Ka)try{return Ja(e,t)}catch(e){}if(Ba(e,t))return za(!ja(Va.f,e,t),e[t])},{}),da=i&&qo(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ya=es,qa=String,$a=TypeError,Wa=b,Xa=ps,Za=cs,Qa=TypeError,eu=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,ru="enumerable",nu="configurable",iu="writable",wa=(ma.f=i?da?function(e,t,r){var n;return Xa(e),t=Za(t),Xa(r),"function"==typeof e&&"prototype"===t&&"value"in r&&iu in r&&!r[iu]&&((n=tu(e,t))&&n[iu]&&(e[t]=r.value,r={configurable:(nu in r?r:n)[nu],enumerable:(ru in r?r:n)[ru],writable:!1})),eu(e,t,r)}:eu:function(e,t,r){if(Xa(e),t=Za(t),Xa(r),Wa)try{return eu(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Qa("Accessors not supported");return"value"in r&&(e[t]=r.value),e},i),ou=ma,su=$o,T=wa?function(e,t,r){return ou.f(e,t,su(1,r))}:function(e,t,r){return e[t]=r,e},w={exports:{}},G=i,b=_,wa=Function.prototype,I=G&&Object.getOwnPropertyDescriptor,b=b(wa,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!G||I(wa,"name").configurable)},G=Qo,I=ua,au=g(Function.toString),wa=(G(I.inspectSource)||(I.inspectSource=function(e){return au(e)}),I.inspectSource),G=Qo,I=wa,uu=o.WeakMap,G=G(uu)&&/native code/.test(I(uu)),I=Ks.exports,cu=as,lu=I("keys"),uu={},Ks=g,pu=es,fu=T,hu=_,I=ua,du=fs,vu=uu,yu="Object already initialized",gu=o.TypeError,A=o.WeakMap,G=(Os=G||I.state?(ws=I.state||(I.state=new A),bs=Ks(ws.get),Ts=Ks(ws.has),_s=Ks(ws.set),Is=function(e,t){if(Ts(ws,e))throw new gu(yu);return t.facade=e,_s(ws,e,t),t},As=function(e){return bs(ws,e)||{}},function(e){return Ts(ws,e)}):(vu[Ns=du("state")]=!0,Is=function(e,t){if(hu(e,Ns))throw new gu(yu);return t.facade=e,fu(e,Ns,t),t},As=function(e){return hu(e,Ns)?e[Ns]:{}},function(e){return hu(e,Ns)}),{set:Is,get:As,has:Os,enforce:function(e){return Os(e)?As(e):Is(e,{})},getterFor:function(t){return function(e){if(pu(e)&&(e=As(e)).type===t)return e;throw gu("Incompatible receiver, "+t+" required")}}}),I=qo,mu=Qo,Eu=_,wu=i,bu=b.CONFIGURABLE,Tu=wa,_u=G.enforce,Iu=G.get,Au=Object.defineProperty,Ou=wu&&!I(function(){return 8!==Au(function(){},"length",{value:8}).length}),Nu=String(String).split("String"),A=w.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),(!Eu(e,"name")||bu&&e.name!==t)&&(wu?Au(e,"name",{value:t,configurable:!0}):e.name=t),Ou&&r&&Eu(r,"arity")&&e.length!==r.arity&&Au(e,"length",{value:r.arity});try{r&&Eu(r,"constructor")&&r.constructor?wu&&Au(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=_u(e);return Eu(r,"source")||(r.source=Nu.join("string"==typeof t?t:"")),e},Ru=(Function.prototype.toString=A(function(){return mu(this)&&Iu(this).source||Tu(this)},"toString"),Qo),Su=ma,Cu=w.exports,xu=os,Ks={},Mu=Math.ceil,Pu=Math.floor,ku=Math.trunc||function(e){e=+e;return(0<e?Pu:Mu)(e)},Uu=ds,Du=Math.max,Lu=Math.min,Fu=ds,ju=Math.min,Vu=function(e){return 0<e?ju(Fu(e),9007199254740991):0},zu=Zo,Hu=vs,Gu=v,vu={includes:ys(!0),indexOf:ys(!1)},du=g,Bu=_,Ku=Zo,Ju=vu.indexOf,Yu=uu,qu=du([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$u=gs,Wu=I.concat("length","prototype"),A=(Ks.f=Object.getOwnPropertyNames||function(e){return $u(e,Wu)},{}),du=(A.f=Object.getOwnPropertySymbols,ts),Xu=Ks,Zu=A,Qu=ps,ec=g([].concat),A=du("Reflect","ownKeys")||function(e){var t=Xu.f(Qu(e)),r=Zu.f;return r?ec(t,r(e)):t},tc=_,rc=A,nc=e,ic=ma,oc=qo,sc=Qo,ac=/#|\.prototype\./,uc=Es.normalize=function(e){return String(e).replace(ac,".").toLowerCase()},cc=Es.data={},lc=Es.NATIVE="N",pc=Es.POLYFILL="P",du=Es,fc=o,hc=e.f,dc=T,vc=hs,yc=os,gc=ms,mc=du,A=!qo(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ec=_,wc=Qo,bc=ss,Tc=fs("IE_PROTO"),_c=Object,Ic=_c.prototype,A=A?_c.getPrototypeOf:function(e){e=bc(e);if(Ec(e,Tc))return e[Tc];var t=e.constructor;return wc(t)&&e instanceof t?t.prototype:e instanceof _c?Ic:null},Ac=Qo,Oc=String,Nc=TypeError,Rc=g,Sc=ps,Cc=function(e){if("object"==typeof e||Ac(e))return e;throw Nc("Can't set "+Oc(e)+" as a prototype")},xc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Rc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Sc(e),Cc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Mc={},Pc=gs,kc=I,O=Object.keys||function(e){return Pc(e,kc)},Uc=ma,Dc=ps,Lc=Zo,Fc=O;Mc.f=i&&!da?Object.defineProperties:function(e,t){Dc(e);for(var r,n=Lc(t),i=Fc(t),o=i.length,s=0;s<o;)Uc.f(e,r=i[s++],n[r]);return e};function jc(){}function Vc(e){e.write(al("")),e.close();var t=e.parentWindow.Object;return e=null,t}function zc(e,t){return vl(e),void 0===t?e:yl?gl(e,t):function(){return e.apply(t,arguments)}}function Hc(e){return void 0!==e&&(ml.Array===e||wl[El]===e)}function Gc(e){if(null!=e)return Nl(e,Sl)||Nl(e,"@@iterator")||Rl[Ol(e)]}function Bc(e,t){if(t=arguments.length<2?kl(e):t,xl(t))return Ml(Cl(t,e));throw Ul(Pl(e)+" is not iterable")}function Kc(e,t,r){var n,i;Ll(e);try{if(!(n=Fl(e,"return"))){if("throw"===t)throw r;return r}n=Dl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Ll(n),r}function Jc(e,t){this.stopped=e,this.result=t}function Yc(e,t,r){function n(e){return o&&ql(o,"normal",e),new Jc(!0,e)}function i(e){return f?(zl(e),v?y(e[0],e[1],n):y(e[0],e[1])):v?y(e,n):y(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=jl(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Yl(e)))throw $l(Hl(e)+" is not iterable");if(Gl(r)){for(s=0,a=Bl(e);s<a;s++)if((u=i(e[s]))&&Kl(Wl,u))return u;return new Jc(!1)}o=Jl(e,r)}for(c=(h?e:o).next;!(l=Vl(c,o)).done;){try{u=i(l.value)}catch(e){ql(o,"throw",e)}if("object"==typeof u&&u&&Kl(Wl,u))return u}return new Jc(!1)}function qc(e){if("Symbol"===Xl(e))throw TypeError("Cannot convert a Symbol value to a string");return Zl(e)}function $c(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=tp(vp,this);return np?r=np(new hp,i?rp(this):vp):(r=i?this:ip(vp),op(r,fp,"Error")),void 0!==t&&op(r,"message",lp(t)),pp&&op(r,"stack",ap(r.stack,1)),up(r,n),cp(e,dp,{that:i=[]}),op(r,"errors",i),r}function Wc(e){gp[yp][e]=!0}var Xc,Zc,O=ts("document","documentElement"),Qc=ps,el=Mc,tl=I,da=uu,rl=O,nl=ls,il="prototype",ol="script",sl=fs("IE_PROTO"),al=function(e){return"<"+ol+">"+e+"</"+ol+">"},ul=function(){try{Xc=new ActiveXObject("htmlfile")}catch(e){}ul="undefined"==typeof document||document.domain&&Xc?Vc(Xc):(e=nl("iframe"),t="java"+ol+":",e.style.display="none",rl.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(al("document.F=Object")),t.close(),t.F);for(var e,t,r=tl.length;r--;)delete ul[il][tl[r]];return ul()},Mc=(da[sl]=!0,Object.create||function(e,t){var r;return null!==e?(jc[il]=Qc(e),r=new jc,jc[il]=null,r[sl]=e):r=ul(),void 0===t?r:el.f(r,t)}),cl=Error,ll=g("".replace),I=String(cl("zxcasd").stack),pl=/\n\s*at [^:]*:[^\n]*/,fl=pl.test(I),hl=es,dl=T,vl=ns,yl=t,gl=g(g.bind),da={},ml=da,El=us("iterator"),wl=Array.prototype,I={},I=(I[us("toStringTag")]="z","[object z]"===String(I)),N=I,bl=Qo,Tl=Wo,_l=us("toStringTag"),Il=Object,Al="Arguments"==Tl(function(){return arguments}()),N=N?Tl: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=Il(e),_l))?t:Al?Tl(e):"Object"==(t=Tl(e))&&bl(e.callee)?"Arguments":t},Ol=N,Nl=is,Rl=da,Sl=us("iterator"),Cl=r,xl=ns,Ml=ps,Pl=rs,kl=Gc,Ul=TypeError,Dl=r,Ll=ps,Fl=is,jl=zc,Vl=r,zl=ps,Hl=rs,Gl=Hc,Bl=v,Kl=m,Jl=Bc,Yl=Gc,ql=Kc,$l=TypeError,Wl=Jc.prototype,Xl=N,Zl=String,Ql=qc,ep=$o,R=!qo(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ep(1,7)),7!==e.stack)}),S=y,tp=m,rp=A,np=xc,C=ms,ip=Mc,op=T,sp=$o,ap=function(e,t){if(fl&&"string"==typeof e&&!cl.prepareStackTrace)for(;t--;)e=ll(e,pl,"");return e},up=function(e,t){hl(t)&&"cause"in t&&dl(e,"cause",t.cause)},cp=Yc,lp=function(e,t){return void 0===e?arguments.length<2?"":t:Ql(e)},pp=R,fp=us("toStringTag"),hp=Error,dp=[].push,vp=(np?np($c,hp):C($c,hp,{name:!0}),$c.prototype=ip(hp.prototype,{constructor:sp(1,$c),message:sp(1,""),name:sp(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:$c}),us),C=Mc,sp=ma.f,yp=R("unscopables"),gp=Array.prototype,S=(null==gp[yp]&&sp(gp,yp,{configurable:!0,value:C(null)}),qo),R=Qo,sp=A,C=hs,mp=us("iterator"),Ep=!1;[].keys&&("next"in(x=[].keys())?(sp=sp(sp(x)))!==Object.prototype&&(Zc=sp):Ep=!0);function wp(e,t,r){(e=e&&!r?e.prototype:e)&&!Ap(e,Op)&&Ip(e,Op,{configurable:!0,value:t})}function bp(){return this}function Tp(){return this}function _p(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!Kp&&e in p)return p[e];switch(e){case"keys":case Yp:case qp:return function(){return new r(this,e)}}return function(){return new r(this)}}Up(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[Jp]||p["@@iterator"]||i&&p[i],h=!Kp&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=Dp(d.call(new e)))!==Object.prototype&&d.next&&(Dp(d)!==Bp&&(Lp?Lp(d,Bp):kp(d[Jp])||Vp(d,Jp,Tp)),Fp(d,n,!0)),Hp&&i==Yp&&f&&f.name!==Yp&&(Gp?jp(p,"name",Yp):(l=!0,h=function(){return Pp(f,this)})),i)if(u={values:a(Yp),keys:o?h:a("keys"),entries:a(qp)},s)for(c in u)!Kp&&!l&&c in p||Vp(p,c,u[c]);else Mp({target:t,proto:!0,forced:Kp||l},u);return p[Jp]!==h&&Vp(p,Jp,h,{name:i}),zp[t]=h,u}R((Zc=null==Zc||S(function(){var e={};return Zc[mp].call(e)!==e})?{}:Zc)[mp])||C(Zc,mp,function(){return this});var x={IteratorPrototype:Zc,BUGGY_SAFARI_ITERATORS:Ep},Ip=ma.f,Ap=_,Op=us("toStringTag"),Np=x.IteratorPrototype,Rp=Mc,Sp=$o,Cp=wp,xp=da,Mp=y,Pp=r,kp=Qo,Up=function(e,t,r,n){t+=" Iterator";return e.prototype=Rp(Np,{next:Sp(+!n,r)}),Cp(e,t,!1),xp[t]=bp,e},Dp=A,Lp=xc,Fp=wp,jp=T,Vp=hs,sp=us,zp=da,Hp=b.PROPER,Gp=b.CONFIGURABLE,Bp=x.IteratorPrototype,Kp=x.BUGGY_SAFARI_ITERATORS,Jp=sp("iterator"),Yp="values",qp="entries",$p=Zo,R=Wc,S=da,C=G,Ep=ma.f,b=_p,x=i,Wp="Array Iterator",Xp=C.set,Zp=C.getterFor(Wp),sp=b(Array,"Array",function(e,t){Xp(this,{type:Wp,target:$p(e),index:0,kind:t})},function(){var e=Zp(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"),da=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),x&&"values"!==da.name)try{Ep(da,"name",{value:"values"})}catch(e){}var Qp=N;I||hs(Object.prototype,"toString",I?{}.toString:function(){return"[object "+Qp(this)+"]"},{unsafe:!0});function ef(e){var e=cf(e),t=lf.f;pf&&e&&!e[ff]&&t(e,ff,{configurable:!0,get:function(){return this}})}function tf(e,t){if(hf(t,e))return e;throw df("Incorrect invocation")}function rf(){}function nf(e){if(!vf(e))return!1;try{return Ef(rf,mf,e),!0}catch(e){return!1}}function of(e){if(!vf(e))return!1;switch(yf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Tf||!!bf(wf,gf(e))}catch(e){return!0}}function sf(e,t){return void 0===(e=Of(e).constructor)||null==(e=Of(e)[Rf])?t:Nf(e)}var af,uf,C="process"==Wo(o.process),cf=ts,lf=ma,pf=i,ff=us("species"),hf=m,df=TypeError,b=g,S=qo,vf=Qo,yf=N,gf=wa,mf=[],Ef=ts("Reflect","construct"),wf=/^\s*(?:class|function)\b/,bf=b(wf.exec),Tf=!wf.exec(rf),R=(of.sham=!0,!Ef||S(function(){var e;return nf(nf.call)||!nf(Object)||!nf(function(){e=!0})||e})?of:nf),_f=R,If=rs,Af=TypeError,Of=ps,Nf=function(e){if(_f(e))return e;throw Af(If(e)+" is not a constructor")},Rf=us("species"),x=Function.prototype,Sf=x.apply,Cf=x.call,Ep="object"==typeof Reflect&&Reflect.apply||(t?Cf.bind(Sf):function(){return Cf.apply(Sf,arguments)}),da=g([].slice),xf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(Gs),Mf=o,Pf=Ep,m=zc,kf=Qo,Uf=_,N=qo,Df=O,Lf=da,Ff=ls,jf=function(e,t){if(e<t)throw xf("Not enough arguments");return e},b=I,S=C,x=Mf.setImmediate,t=Mf.clearImmediate,Vf=Mf.process,zf=Mf.Dispatch,Hf=Mf.Function,O=Mf.MessageChannel,Gf=Mf.String,Bf=0,Kf={},Jf="onreadystatechange";try{af=Mf.location}catch(e){}function Yf(e){return function(){lh(e)}}function qf(e){lh(e.data)}function $f(e){Mf.postMessage(Gf(e),af.protocol+"//"+af.host)}function Wf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function Xf(){this.head=null,this.tail=null}function Zf(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=_h(r),this.reject=_h(n)}function Qf(e,t){var r,n,i,o,s=t.value,a=t.state==Zh,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===td&&(o=t,Oh(Mh,Ah,function(){var e=o.facade;Ih?Jh.emit("rejectionHandled",e):id(Xh,e,o.value)})),t.rejection=ed),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(Bh("Promise-chain cycle")):(n=rd(r))?Oh(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var eh,th,rh,nh,ih,oh,sh,ah,uh,ch,lh=function(e){var t;Uf(Kf,e)&&(t=Kf[e],delete Kf[e],t())},O=(x&&t||(x=function(e){jf(arguments.length,1);var t=kf(e)?e:Hf(e),r=Lf(arguments,1);return Kf[++Bf]=function(){Pf(t,void 0,r)},uf(Bf),Bf},t=function(e){delete Kf[e]},S?uf=function(e){Vf.nextTick(Yf(e))}:zf&&zf.now?uf=function(e){zf.now(Yf(e))}:O&&!b?(b=(S=new O).port2,S.port1.onmessage=qf,uf=m(b.postMessage,b)):Mf.addEventListener&&kf(Mf.postMessage)&&!Mf.importScripts&&af&&"file:"!==af.protocol&&!N($f)?(uf=$f,Mf.addEventListener("message",qf,!1)):uf=Jf in Ff("script")?function(e){Df.appendChild(Ff("script"))[Jf]=function(){Df.removeChild(this),lh(e)}}:function(e){setTimeout(Yf(e),0)}),{set:x,clear:t}),S=o,m=/ipad|iphone|ipod/i.test(Gs)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(Gs),N=o,x=zc,t=e.f,ph=O.set,S=I,e=m,I=b,fh=C,m=N.MutationObserver||N.WebKitMutationObserver,b=N.document,hh=N.process,M=N.Promise,t=t(N,"queueMicrotask"),t=t&&t.value,I=(t||(eh=function(){var e,t;for(fh&&(e=hh.domain)&&e.exit();th;){t=th.fn,th=th.next;try{t()}catch(e){throw th?nh():rh=void 0,e}}rh=void 0,e&&e.enter()},nh=S||fh||I||!m||!b?!e&&M&&M.resolve?((S=M.resolve(void 0)).constructor=M,sh=x(S.then,S),function(){sh(eh)}):fh?function(){hh.nextTick(eh)}:(ph=x(ph,N),function(){ph(eh)}):(ih=!0,oh=b.createTextNode(""),new m(eh).observe(oh,{characterData:!0}),function(){oh.data=ih=!ih})),t||function(e){e={fn:e,next:void 0};rh&&(rh.next=e),th||(th=e,nh()),rh=e}),dh=o,e=(Xf.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}},Xf),M=o.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,x=!S&&!C&&"object"==typeof window&&"object"==typeof document,N=o,vh=M,b=Qo,m=du,yh=wa,t=us,gh=x,mh=S,Eh=Bs,wh=(vh&&vh.prototype,t("species")),bh=!1,Th=b(N.PromiseRejectionEvent),wa={CONSTRUCTOR:m("Promise",function(){var e=yh(vh),t=e!==String(vh);if(!t&&66===Eh)return!0;if(!Eh||Eh<51||!/native code/.test(e)){var e=new vh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[wh]=r,!(bh=e.then(function(){})instanceof r))return!0}return!t&&(gh||mh)&&!Th}),REJECTION_EVENT:Th,SUBCLASSING:bh},x={},_h=ns,S=(x.f=function(e){return new Zf(e)},y),Ih=C,Ah=o,Oh=r,t=hs,b=xc,N=wp,m=ef,Nh=ns,Rh=Qo,Sh=es,Ch=tf,xh=sf,Mh=O.set,Ph=I,kh=function(e,t){var r=dh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Uh=Wf,Dh=e,O=G,I=M,e=x,Lh="Promise",Fh=wa.CONSTRUCTOR,jh=wa.REJECTION_EVENT,P=wa.SUBCLASSING,Vh=O.getterFor(Lh),zh=O.set,O=I&&I.prototype,Hh=I,Gh=O,Bh=Ah.TypeError,Kh=Ah.document,Jh=Ah.process,Yh=e.f,qh=Yh,$h=!!(Kh&&Kh.createEvent&&Ah.dispatchEvent),Wh="unhandledrejection",Xh="rejectionhandled",Zh=1,Qh=2,ed=1,td=2,rd=function(e){var t;return!(!Sh(e)||!Rh(t=e.then))&&t},nd=function(r,i){r.notified||(r.notified=!0,Ph(function(){for(var e,n,t=r.reactions;e=t.get();)Qf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Oh(Mh,Ah,function(){var e=n.facade,t=n.value,r=od(n);if(r&&(r=Uh(function(){Ih?Jh.emit("unhandledRejection",t,e):id(Wh,e,t)}),n.rejection=Ih||od(n)?td:ed,r.error))throw r.value}))}))},id=function(e,t,r){var n;$h?((n=Kh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Ah.dispatchEvent(n)):n={promise:t,reason:r},!jh&&(t=Ah["on"+e])?t(n):e===Wh&&kh("Unhandled promise rejection",r)},od=function(e){return e.rejection!==ed&&!e.parent},sd=function(t,r,n){return function(e){t(r,e,n)}},ad=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Qh,nd(e,!0))},ud=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Bh("Promise can't be resolved itself");var n=rd(e);n?Ph(function(){var t={done:!1};try{Oh(n,e,sd(ud,t,r),sd(ad,t,r))}catch(e){ad(t,e,r)}}):(r.value=e,r.state=Zh,nd(r,!1))}catch(e){ad({done:!1},e,r)}}};if(Fh&&(Gh=(Hh=function(e){Ch(this,Gh),Nh(e),Oh(ah,this);var t=Vh(this);try{e(sd(ud,t),sd(ad,t))}catch(e){ad(t,e)}}).prototype,(ah=function(e){zh(this,{type:Lh,done:!1,notified:!1,parent:!1,reactions:new Dh,rejection:!1,state:0,value:void 0})}).prototype=t(Gh,"then",function(e,t){var r=Vh(this),n=Yh(xh(this,Hh));return r.parent=!0,n.ok=!Rh(e)||e,n.fail=Rh(t)&&t,n.domain=Ih?Jh.domain:void 0,0==r.state?r.reactions.add(n):Ph(function(){Qf(n,r)}),n.promise}),uh=function(){var e=new ah,t=Vh(e);this.promise=e,this.resolve=sd(ud,t),this.reject=sd(ad,t)},e.f=Yh=function(e){return e===Hh||void 0===e?new uh:qh(e)},Rh(I)&&O!==Object.prototype)){ch=O.then,P||t(O,"then",function(e,t){var r=this;return new Hh(function(e,t){Oh(ch,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}b&&b(O,Gh)}S({global:!0,constructor:!0,wrap:!0,forced:Fh},{Promise:Hh}),N(Hh,Lh,!1),m(Lh);var cd=us("iterator"),ld=!1;try{var pd=0,fd={next:function(){return{done:!!pd++}},return:function(){ld=!0}};fd[cd]=function(){return this},Array.from(fd,function(){throw 2})}catch(e){}function hd(e,t){if(!t&&!ld)return!1;var r=!1;try{var n={};n[cd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var dd=M,e=hd,I=wa.CONSTRUCTOR||!e(function(e){dd.all(e).then(void 0,function(){})}),vd=r,yd=ns,gd=x,md=Wf,Ed=Yc,P=(y({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=gd.f(a),u=t.resolve,c=t.reject,r=md(function(){var n=yd(a.resolve),i=[],o=0,s=1;Ed(e,function(e){var t=o++,r=!1;s++,vd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),y),t=M,b=ts,O=Qo,S=hs,Fh=t&&t.prototype;P({target:"Promise",proto:!0,forced:wa.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(t)&&(N=b("Promise").prototype.catch,Fh.catch!==N&&S(Fh,"catch",N,{unsafe:!0}));var wd=r,bd=ns,Td=x,_d=Wf,Id=Yc;y({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=Td.f(r),i=n.reject,t=_d(function(){var t=bd(r.resolve);Id(e,function(e){wd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function Ad(e,t){return Rd(e),Sd(t)&&t.constructor===e?t:((0,(e=Cd.f(e)).resolve)(t),e.promise)}var Od=r,Nd=x,Rd=(y({target:"Promise",stat:!0,forced:wa.CONSTRUCTOR},{reject:function(e){var t=Nd.f(this);return Od(t.reject,void 0,e),t.promise}}),ps),Sd=es,Cd=x,m=y,fd=ts,e=wa.CONSTRUCTOR,xd=Ad;fd("Promise"),m({target:"Promise",stat:!0,forced:e},{resolve:function(e){return xd(this,e)}});var Md=r,Pd=ns,kd=x,Ud=Wf,Dd=Yc;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=kd.f(a),u=t.resolve,r=t.reject,n=Ud(function(){var n=Pd(a.resolve),i=[],o=0,s=1;Dd(e,function(e){var t=o++,r=!1;s++,Md(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}});function Ld(i){return function(e,t){var r,e=Xd(Zd(e)),t=Wd(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=ev(e,t))<55296||56319<r||t+1===n||(n=ev(e,t+1))<56320||57343<n?i?Qd(e,t):r:i?tv(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Fd=r,jd=ns,Vd=ts,zd=x,Hd=Wf,Gd=Yc,Bd="No one promise resolved",P=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=Vd("AggregateError"),t=zd.f(u),l=t.resolve,p=t.reject,r=Hd(function(){var n=jd(u.resolve),i=[],o=0,s=1,a=!1;Gd(e,function(e){var t=o++,r=!1;s++,Fd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,Bd)))})}),--s||p(new c(i,Bd))});return r.error&&p(r.value),t.promise}}),y),O=M,t=qo,Kd=ts,Jd=Qo,Yd=sf,qd=Ad,b=hs,$d=O&&O.prototype,Fh=(P({target:"Promise",proto:!0,real:!0,forced:!!O&&t(function(){$d.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Yd(this,Kd("Promise")),e=Jd(t);return this.then(e?function(e){return qd(r,t()).then(function(){return e})}:t,e?function(e){return qd(r,t()).then(function(){throw e})}:t)}}),Jd(O)&&(S=Kd("Promise").prototype.finally,$d.finally!==S&&b($d,"finally",S,{unsafe:!0})),g),Wd=ds,Xd=qc,Zd=Xo,Qd=Fh("".charAt),ev=Fh("".charCodeAt),tv=Fh("".slice),rv={codeAt:Ld(!1),charAt:Ld(!0)}.charAt,nv=qc,N=G,I=_p,iv="String Iterator",ov=N.set,sv=N.getterFor(iv);I(String,"String",function(e){ov(this,{type:iv,string:nv(e),index:0})},function(){var e=sv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=rv(t,r),e.index+=t.length,{value:t,done:!1})});function av(t,e){if(t){if(t[hv]!==vv)try{fv(t,hv,vv)}catch(e){t[hv]=vv}if(t[dv]||fv(t,dv,e),lv[e])for(var r in pv)if(t[r]!==pv[r])try{fv(t,r,pv[r])}catch(e){t[r]=pv[r]}}}var uv,wa=o,fd=wa.Promise,m=ls("span").classList,e=m&&m.constructor&&m.constructor.prototype,M=e===Object.prototype?void 0:e,cv=o,lv={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},P=M,pv=sp,fv=T,t=us,hv=t("iterator"),dv=t("toStringTag"),vv=pv.values;for(uv in lv)av(cv[uv]&&cv[uv].prototype,uv);av(P,"DOMTokenList");var O,b,S=b=O=fd,Fh,yv=x,gv=Wf,mv=((Fh=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=yv.f(this),e=gv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),ps),Ev=Kc,wv=cs,bv=ma,Tv=$o,N,_v=zc,Iv=r,Av=ss,Ov=function(t,e,r,n){try{return n?e(mv(r)[0],r[1]):e(r)}catch(e){Ev(t,"throw",e)}},Nv=Hc,Rv=R,Sv=v,Cv=N=function(e,t,r){t=wv(t);t in e?bv.f(e,t,Tv(0,r)):e[t]=r},xv=Bc,Mv=Gc,Pv=Array,I,m=function(e){var t,r,n,i,o,s,a=Av(e),e=Rv(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=_v(c,2<u?arguments[2]:void 0)),Mv(a)),p=0;if(!u||this===Pv&&Nv(u))for(t=Sv(a),r=e?new this(t):Pv(t);p<t;p++)s=l?c(a[p],p):a[p],Cv(r,p,s);else for(o=(i=xv(a,u)).next,r=e?new this:[];!(n=Iv(o,i)).done;p++)s=l?Ov(i,c,[n.value,p],!0):n.value,Cv(r,p,s);return r.length=p,r},e,M,kv=((I=y)({target:"Array",stat:!0,forced:M=!(e=hd)(function(e){Array.from(e)})},{from:m}),Wo),sp=Array.isArray||function(e){return"Array"==kv(e)},T,t,P=((T=y)({target:"Array",stat:!0},{isArray:t=sp}),y),fd=qo,Uv=R,Dv=N,Lv=Array,O=fd(function(){function e(){}return!(Lv.of.call(e)instanceof e)}),Fv=(P({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(Uv(this)?this:Lv)(t);e<t;)Dv(r,e,arguments[e++]);return r.length=t,r}}),ss),jv=v,Vv=ds,b=Wc,zv=(y({target:"Array",proto:!0},{at:function(e){var t=Fv(this),r=jv(t),e=Vv(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),S=function(e){if(9007199254740991<e)throw zv("Maximum allowed index exceeded");return e},Hv=sp,Gv=R,Bv=es,Kv=us("species"),Jv=Array,Yv=function(e){var t;return Hv(e)&&(t=e.constructor,(Gv(t)&&(t===Jv||Hv(t.prototype))||Bv(t)&&null===(t=t[Kv]))&&(t=void 0)),void 0===t?Jv:t},x=function(e,t){return new(Yv(e))(0===t?0:t)},qv=qo,$v=Bs,Wv=us("species"),Fh,e=y,I=qo,Xv=sp,Zv=es,Qv=ss,ey=v,ty=S,ry=N,ny=x,M=Fh=function(t){return 51<=$v||!qv(function(){var e=[];return(e.constructor={})[Wv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},m=Bs,iy=us("isConcatSpreadable"),T=51<=m||!I(function(){var e=[];return e[iy]=!1,e.concat()[0]!==e}),t=M("concat"),oy=(e({target:"Array",proto:!0,arity:1,forced:!T||!t},{concat:function(e){for(var t,r,n,i=Qv(this),o=ny(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Zv(e))return!1;var t=e[iy];return void 0!==t?!!t:Xv(e)}(n=-1===a?i:arguments[a]))for(r=ey(n),ty(s+r),t=0;t<r;t++,s++)t in n&&ry(o,s,n[t]);else ty(s+1),ry(o,s++,n);return o.length=s,o}}),rs),sy=TypeError,fd,ay=ss,uy=vs,cy=v,ly=fd=function(e,t){if(!delete e[t])throw sy("Cannot delete property "+oy(t)+" of "+oy(e))},py=Math.min,P=Wc,fy=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=ay(this),n=cy(r),i=uy(e,n),o=uy(t,n),e=2<arguments.length?arguments[2]:void 0,s=py((void 0===e?n:uy(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:ly(r,i),i+=a,o+=a;return r}}),P("copyWithin"),zc),hy=E,dy=ss,vy=v,yy=x,gy=g([].push),O,b={forEach:(O=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,g=6==f,m=7==f,E=5==f||g;return function(e,t,r,n){for(var i,o,s=dy(e),a=hy(s),u=fy(t,r),c=vy(a),l=0,t=n||yy,p=h?t(e,c):d||m?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(h)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:gy(p,i)}else switch(f){case 4:return!1;case 7:gy(p,i)}return g?-1:v||y?y:p}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},my=qo,m=function(e,t){var r=[][e];return!!r&&my(function(){r.call(null,t||function(){return 1},1)})},I=y,Ey=b.every,wy=(I({target:"Array",proto:!0,forced:!m("every")},{every:function(e){return Ey(this,e,1<arguments.length?arguments[1]:void 0)}}),ss),by=vs,Ty=v,M=Wc,e=(y({target:"Array",proto:!0},{fill:function(e){for(var t=wy(this),r=Ty(t),n=arguments.length,i=by(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:by(n,r);i<o;)t[i++]=e;return t}}),M("fill"),y),_y=b.filter,T=(e({target:"Array",proto:!0,forced:!Fh("filter")},{filter:function(e){return _y(this,e,1<arguments.length?arguments[1]:void 0)}}),y),Iy=b.find,t=Wc,P,Ay=!0,O=((P="find")in[]&&Array(1)[P](function(){Ay=!1}),T({target:"Array",proto:!0,forced:Ay},{find:function(e){return Iy(this,e,1<arguments.length?arguments[1]:void 0)}}),t(P),y),Oy=b.findIndex,I=Wc,M,Ny=!0,Ry=((M="findIndex")in[]&&Array(1)[M](function(){Ny=!1}),O({target:"Array",proto:!0,forced:Ny},{findIndex:function(e){return Oy(this,e,1<arguments.length?arguments[1]:void 0)}}),I(M),zc),Sy=E,Cy=ss,xy=v,e,T={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Cy(e),o=Sy(i),s=Ry(t,r),a=xy(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}})(0),findLastIndex:e(1)},t=y,My=T.findLast,P=Wc,O=(t({target:"Array",proto:!0},{findLast:function(e){return My(this,e,1<arguments.length?arguments[1]:void 0)}}),P("findLast"),y),Py=T.findLastIndex,I=Wc,ky=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Py(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),sp),Uy=v,Dy=S,Ly=zc,Fy=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&Ly(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&ky(u)?(c=Uy(u),l=Fy(e,t,u,c,l,o-1)-1):(Dy(l+1),e[l]=u),l++),p++;return l},M,jy=M=Fy,Vy=ss,zy=v,Hy=ds,Gy=x;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Vy(this),r=zy(t),n=Gy(t,0);return n.length=jy(n,t,t,r,0,void 0===e?1:Hy(e)),n}});function By(c){return function(e,t,r,n){yg(t);var i=gg(e),o=mg(i),s=Eg(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw wg("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function Ky(e,t,r){for(var n=Fg(e),i=Lg(t,n),o=Lg(void 0===r?n:r,n),s=Vg(zg(o-i,0)),a=0;i<o;i++,a++)jg(s,a,e[i]);return s.length=a,s}function Jy(e,t){var r=e.length,n=Gg(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Jy(Hg(e,0,n),t),f=Jy(Hg(e,n),t),h=t,d=p.length,v=f.length,y=0,g=0;y<d||g<v;)l[y+g]=y<d&&g<v?h(p[y],f[g])<=0?p[y++]:f[g++]:y<d?p[y++]:f[g++];return l}var Yy=M,qy=ns,$y=ss,Wy=v,Xy=x,Zy=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=$y(this),n=Wy(r);return qy(e),(t=Xy(r,0)).length=Yy(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),e=m("forEach")?[].forEach:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)},t=(y({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),y),Qy=vu.includes,P=Wc,T=(t({target:"Array",proto:!0,forced:qo(function(){return!Array(1).includes()})},{includes:function(e){return Qy(this,e,1<arguments.length?arguments[1]:void 0)}}),P("includes"),y),O=g,eg=vu.indexOf,I=m,tg=O([].indexOf),rg=!!tg&&1/tg([1],1,-0)<0,M=I("indexOf"),e=(T({target:"Array",proto:!0,forced:rg||!M},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return rg?tg(this,e,t)||0:eg(this,e,t)}}),y),t=E,ng=Zo,P=m,ig=g([].join),vu=t!=Object,O=P("join",","),og=(e({target:"Array",proto:!0,forced:vu||!O},{join:function(e){return ig(ng(this),void 0===e?",":e)}}),Ep),sg=Zo,ag=ds,ug=v,I=m,cg=Math.min,lg=[].lastIndexOf,pg=!!lg&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),M=pg||!T?function(e){if(pg)return og(lg,this,arguments)||0;var t=sg(this),r=ug(t),n=r-1;for((n=1<arguments.length?cg(n,ag(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:lg,t=(y({target:"Array",proto:!0,forced:M!==[].lastIndexOf},{lastIndexOf:M}),y),fg=b.map,P=(t({target:"Array",proto:!0,forced:!Fh("map")},{map:function(e){return fg(this,e,1<arguments.length?arguments[1]:void 0)}}),y),hg=ss,dg=v,vg=S,e=qo(function(){return 4294967297!==[].push.call({length:4294967296},1)}),vu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),yg=(P({target:"Array",proto:!0,arity:1,forced:e||vu},{push:function(e){var t=hg(this),r=dg(t),n=arguments.length;vg(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),ns),gg=ss,mg=E,Eg=v,wg=TypeError,O={left:By(!1),right:By(!0)},Ep=y,bg=O.left,I=Bs,T=C,M=(Ep({target:"Array",proto:!0,forced:!m("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return bg(this,e,t,1<t?arguments[1]:void 0)}}),y),Tg=O.right,t=Bs,P=C,e=(M({target:"Array",proto:!0,forced:!m("reduceRight")||!P&&79<t&&t<83},{reduceRight:function(e){return Tg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),_g=sp,Ig=g([].reverse),vu=[1,2],Ep=(e({target:"Array",proto:!0,forced:String(vu)===String(vu.reverse())},{reverse:function(){return _g(this)&&(this.length=this.length),Ig(this)}}),y),Ag=sp,Og=R,Ng=es,Rg=vs,Sg=v,Cg=Zo,xg=N,T=us,Mg=da,I=Fh("slice"),Pg=T("species"),kg=Array,Ug=Math.max,O=(Ep({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=Cg(this),s=Sg(o),a=Rg(e,s),u=Rg(void 0===t?s:t,s);if(Ag(o)&&(r=o.constructor,(r=Og(r)&&(r===kg||Ag(r.prototype))||Ng(r)&&null===(r=r[Pg])?void 0:r)===kg||void 0===r))return Mg(o,a,u);for(n=new(void 0===r?kg:r)(Ug(u-a,0)),i=0;a<u;a++,i++)a in o&&xg(n,i,o[a]);return n.length=i,n}}),y),Dg=b.some,Lg=(O({target:"Array",proto:!0,forced:!m("some")},{some:function(e){return Dg(this,e,1<arguments.length?arguments[1]:void 0)}}),vs),Fg=v,jg=N,Vg=Array,zg=Math.max,Hg=Ky,Gg=Math.floor,C=Jy,M=Gs.match(/firefox\/(\d+)/i),P=!!M&&+M[1],t=/MSIE|Trident/.test(Gs),e=Gs.match(/AppleWebKit\/(\d+)\./),vu=!!e&&+e[1],da=y,T=g,Bg=ns,Kg=ss,Jg=v,Yg=fd,qg=qc,Ep=qo,$g=C,I=m,Wg=P,Xg=t,Zg=Bs,Qg=vu,em=[],tm=T(em.sort),rm=T(em.push),O=Ep(function(){em.sort(void 0)}),M=Ep(function(){em.sort(null)}),Gs=I("sort"),nm=!Ep(function(){if(Zg)return Zg<70;if(!(Wg&&3<Wg)){if(Xg)return!0;if(Qg)return Qg<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)em.push({k:e+r,v:t})}for(em.sort(function(e,t){return t.v-e.v}),r=0;r<em.length;r++)e=em[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});da({target:"Array",proto:!0,forced:O||!M||!Gs||!nm},{sort:function(e){void 0!==e&&Bg(e);var t=Kg(this);if(nm)return void 0===e?tm(t):tm(t,e);for(var r,n,i=[],o=Jg(t),s=0;s<o;s++)s in t&&rm(i,t[s]);for($g(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:qg(e)>qg(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Yg(t,s++);return t}});ef("Array");var e=y,im=ss,om=vs,sm=ds,am=v,um=S,cm=x,lm=N,pm=fd,C=Fh("splice"),fm=Math.max,hm=Math.min;e({target:"Array",proto:!0,forced:!C},{splice:function(e,t){var r,n,i,o,s,a,u=im(this),c=am(u),l=om(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,hm(fm(sm(t),0),c-l)),um(c+r-n),i=cm(u,n),o=0;o<n;o++)(s=l+o)in u&&lm(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:pm(u,a);for(o=c;c-n+r<o;o--)pm(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:pm(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Wc("flat");Wc("flatMap");var P=y,dm=ss,vm=v,ym=fd,gm=S,t=1!==[].unshift(0),Bs=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();P({target:"Array",proto:!0,arity:1,forced:t||Bs},{unshift:function(e){var t=dm(this),r=vm(t),n=arguments.length;if(n){gm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:ym(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});wa.Array;var vu={exports:{}},T={},mm=Wo,Em=Zo,wm=Ks.f,bm=Ky,Tm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!Tm||"Window"!=mm(e))return wm(Em(e));try{return wm(e)}catch(e){return bm(Tm)}};function _m(e){Um(e,zm,{value:{objectID:"O"+Hm++,weakData:{}}})}function Im(e,t,r){for(var n in t)aE(e,n,t[n],r);return e}function Am(e,t){for(var r=0,n=wE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Om(e,t,r,n){for(var i,o,s,a=_E(e),u=TE(a),c=bE(t,r),l=OE(null),p=AE(u),f=0;f<p;f++)s=u[f],(o=IE(c(s,f,a)))in l?SE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==RE)for(o in l)l[o]=NE(i,l[o]);return l}var I=qo(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),Ep=qo,Nm=es,Rm=Wo,Sm=I,Cm=Object.isExtensible,da=Ep(function(){Cm(1)})||Sm?function(e){return!!Nm(e)&&((!Sm||"ArrayBuffer"!=Rm(e))&&(!Cm||Cm(e)))}:Cm,O=!qo(function(){return Object.isExtensible(Object.preventExtensions({}))}),xm=y,Mm=g,M=uu,Pm=es,km=_,Um=ma.f,Dm=Ks,Lm=T,Fm=da,jm=O,Vm=!1,zm=as("meta"),Hm=0,Gm=vu.exports={enable:function(){Gm.enable=function(){},Vm=!0;var i=Dm.f,o=Mm([].splice),e={};e[zm]=1,i(e).length&&(Dm.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===zm){o(t,r,1);break}return t},xm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Lm.f}))},fastKey:function(e,t){if(!Pm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!km(e,zm)){if(!Fm(e))return"F";if(!t)return"E";_m(e)}return e[zm].objectID},getWeakData:function(e,t){if(!km(e,zm)){if(!Fm(e))return!0;if(!t)return!1;_m(e)}return e[zm].weakData},onFreeze:function(e){return jm&&Vm&&Fm(e)&&!km(e,zm)&&_m(e),e}},Bm=(M[zm]=!0,Qo),Km=es,Jm=xc,Ym=y,qm=o,$m=g,Wm=du,Xm=hs,Zm=vu.exports,Qm=Yc,eE=tf,tE=Qo,rE=es,nE=qo,iE=hd,oE=wp,sE=function(e,t,r){return Jm&&Bm(t=t.constructor)&&t!==r&&Km(t=t.prototype)&&t!==r.prototype&&Jm(e,t),e},aE=hs,uE=ma.f,cE=Mc,lE=Im,pE=zc,fE=tf,hE=Yc,dE=_p,vE=ef,yE=i,gE=vu.exports.fastKey,mE=G.set,EE=G.getterFor,wE=(function(e,t,r){function n(e){var r=$m(h[e]);Xm(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!rE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!rE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!rE(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,o,s,a,u,c=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),p=c?"set":"add",f=qm[e],h=f&&f.prototype,d=f,v={};return Wm(e,!tE(f)||!(l||h.forEach&&!nE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),Zm.enable()):Wm(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=nE(function(){i.has(1)}),a=iE(function(e){new f(e)}),u=!l&&nE(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){eE(e,h);e=sE(new f,e,d);return null!=t&&Qm(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&h.clear&&delete h.clear),v[e]=d,Ym({global:!0,constructor:!0,forced:d!=f},v),oE(d,e),l||r.setStrong(d,e,c),d}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=gE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),yE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=gE(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){fE(e,a),mE(e,{type:r,index:cE(null),first:void 0,last:void 0,size:0}),yE||(e.size=0),null!=t&&hE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=EE(r);return lE(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,yE?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),yE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=pE(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)}}),lE(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),yE&&uE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=EE(t),o=EE(n);dE(e,t,function(e,t){mE(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),vE(t)}}),v),bE=zc,TE=E,_E=ss,IE=cs,AE=v,OE=Mc,NE=Am,RE=Array,SE=g([].push),CE=Om,Gs=Wc;y({target:"Array",proto:!0},{group:function(e){return CE(this,e,1<arguments.length?arguments[1]:void 0)}}),Gs("group");var xE=Om,N=Wc;y({target:"Array",proto:!0,forced:!m("groupBy")},{groupBy:function(e){return xE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function ME(e){for(var t,r,n=UE(this),i=kE(n),o=PE(e,1<arguments.length?arguments[1]:void 0),s=new LE,a=DE(i),u=0;u<a;u++)t=o(r=i[u],u,n),jE(s,t)?zE(FE(s,t),r):VE(s,t,[r]);return s}var PE=zc,Fh=g,kE=E,UE=ss,DE=v,LE=ts("Map"),e=LE.prototype,FE=Fh(e.get),jE=Fh(e.has),VE=Fh(e.set),zE=Fh([].push),C=Wc,fd=ME;y({target:"Array",proto:!0,name:"groupToMap",forced:!m("groupByToMap")},{groupByToMap:fd}),C("groupByToMap");function HE(e){return YE[e].prototype}var P=Wc,GE=(y({target:"Array",proto:!0},{groupToMap:ME}),P("groupToMap"),v),BE=function(e,t){for(var r=GE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},KE=Zo,t=Wc,JE=Array,YE=(y({target:"Array",proto:!0},{toReversed:function(){return BE(KE(this),JE)}}),t("toReversed"),o),Bs=y,qE=ns,$E=Zo,WE=Am,wa=Wc,XE=Array,ZE=g(HE("Array").sort),I=(Bs({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&qE(e);var t=$E(this),t=WE(XE,t);return ZE(t,e)}}),wa("toSorted"),y),Ep=Wc,QE=S,ew=v,tw=vs,rw=Zo,nw=ds,iw=Array,ow=Math.max,sw=Math.min,aw=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=rw(this),a=ew(s),u=tw(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,sw(ow(nw(t),0),a-u)),i=QE(a+r-n),o=iw(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),Ep("toSpliced"),v),uw=ds,cw=RangeError,lw=function(e,t,r,n){var i=aw(e),r=uw(r),o=r<0?i+r:r;if(i<=o||o<0)throw cw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},pw=Zo,fw=Array;y({target:"Array",proto:!0},{with:function(e,t){return lw(pw(this),fw,e,t)}});uu=o,_=ua,Ks=Qo,T=A,da=hs,O="USE_FUNCTION_CONSTRUCTOR",M=us("asyncIterator"),xc=uu.AsyncIterator,du=_.AsyncIteratorPrototype;if(du)Mb=du;else if(Ks(xc))Mb=xc.prototype;else if(_[O]||uu[O])try{_b=T(T(T(Function("return async function*(){}()")()))),T(_b)===Object.prototype&&(Mb=_b)}catch(e){}Ks((Mb=Mb||{})[M])||da(Mb,M,function(){return this});function hw(e,t,r){var n=e.done;bw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function dw(e){_w(this,{type:Tw,iterator:Ew(e),next:e.next})}function vw(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=zw(e),u=Vw("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Lw(s),new u(function(r,n){var i=function(e){Hw(c,n,e,n)},o=function(){try{if(f&&p)try{jw(l)}catch(e){i(e)}u.resolve(Fw(Dw(t,c))).then(function(e){try{if(Fw(e).done)f?(a.length=l,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(h)o();else if(d)e?o():Hw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?Hw(c,r,v||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function yw(e,t){if(!i0||!n0(e)||!i0(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function gw(e,t,r){return r.get&&o0(r.get,t,{getter:!0}),r.set&&o0(r.set,t,{setter:!0}),s0.f(e,t,r)}var mw=r,Ew=ps,vu=Mc,ww=is,Gs=Im,N=G,E=Mb,bw=ts("Promise"),Tw="AsyncFromSyncIterator",_w=N.set,Iw=N.getterFor(Tw),e=(dw.prototype=Gs(vu(E),{next:function(){var n=Iw(this);return new bw(function(e,t){var r=Ew(mw(n.next,n.iterator));hw(r,e,t)})},return:function(){var n=Iw(this).iterator;return new bw(function(e,t){var r=ww(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Ew(mw(r,n));hw(r,e,t)})}}),dw),Aw=r,Ow=e,Nw=ps,Rw=Bc,Sw=is,Cw=us("asyncIterator"),xw=ns,Mw=ps,Pw=r,kw=ts,Uw=is,Dw=r,Lw=ns,Fw=ps,jw=S,Vw=ts,zw=function(e){return{iterator:e,next:xw(Mw(e).next)}},Hw=function(e,t,r,n){try{var i=Uw(e,"return");if(i)return kw("Promise").resolve(Pw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Fh={toArray:vw(0),forEach:vw(1),every:vw(2),some:vw(3),find:vw(4)},Gw=zc,Bw=ss,Kw=R,Jw=function(e,t){t=arguments.length<2?Sw(e,Cw):t;return t?Nw(Aw(t,e)):new Ow(Rw(e))},Yw=Bc,qw=Gc,$w=is,m=HE,Ww=ts,fd=us,Xw=e,Zw=Fh.toArray,Qw=fd("asyncIterator"),e0=m("Array").values,C=(y({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(Ww("Promise"))(function(e){var t=Bw(o),r=(void 0!==a&&(a=Gw(a,u)),$w(t,Qw)),n=r?void 0:qw(t)||e0,i=Kw(s)?new s:[],r=r?Jw(t,r):new Xw(Yw(t,n));e(Zw(r,a,i))})}}),y),t0=b.filterReject,P=Wc,t=(C({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return t0(this,e,1<arguments.length?arguments[1]:void 0)}}),P("filterOut"),y),r0=b.filterReject,Bs=Wc,wa=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return r0(this,e,1<arguments.length?arguments[1]:void 0)}}),Bs("filterReject"),y),n0=sp,i0=Object.isFrozen,o0=(wa({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!yw(e,!0))return!1;var t=e.raw;return t.length===e.length&&yw(t,!1)}}),w.exports),s0=ma,I=Wc,a0=ss,u0=v;i&&(gw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=a0(this),t=u0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=a0(this),r=u0(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var Ep=Wc,c0=ss,l0=v;i&&(gw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=c0(this),e=l0(e);return 0==e?0:e-1}}),Ep("lastIndex"));var o=g,p0=ns,f0=v,h0=ss,d0=x,v0=ts("Map"),ua=v0.prototype,y0=o(ua.forEach),g0=o(ua.has),m0=o(ua.set),E0=o([].push),A=Wc;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=h0(this),i=f0(n),o=d0(n,0),s=new v0,a=null!=e?p0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),g0(s,r)||m0(s,r,t);return y0(s,function(e){E0(o,e)}),o}}),A("uniqueBy");b0.exposure=function(e,t,r,n){return new _0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},b0.track=function(e,t,r,n){return new O0(n,r,e,t)},b0.remoteConfig=function(e,t,r,n){return new S0(n,e,t.parameter,t.valueId,t.reason,r)},b0.isExposureEvent=function(e){return void 0!==e.experiment},b0.isTrackEvent=function(e){return void 0!==e.eventType},b0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},b0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},b0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},b0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},b0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[dt.ID],identifiers:this.user.identifiers,userProperties:Pe.sanitize(this.user.properties),hackleProperties:Pe.sanitize(this.user.hackleProperties)}};var w0=b0;function b0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(I0,T0=w0),I0.prototype.copyWithUser=function(e){return new I0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},I0.prototype.toDto=function(){return c(c({},T0.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})};var T0,_0=I0;function I0(e,t,r,n,i,o,s,a){e=T0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(N0,A0=w0),N0.prototype.copyWithUser=function(e){return new N0(this.timestamp,e,this.eventType,this.event,this.insertId)},N0.prototype.toDto=function(){return c(c({},A0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Pe.sanitize(this.event.properties)})};var A0,O0=N0;function N0(e,t,r,n,i){e=A0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(C0,R0=w0),C0.prototype.copyWithUser=function(e){return new C0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},C0.prototype.toDto=function(){return c(c({},R0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Pe.sanitize(this.properties)})};var R0,S0=C0;function C0(e,t,r,n,i,o,s){e=R0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}M0.isSessionEvent=function(e){return!!w0.isTrackEvent(e)&&(e.event.key===M0.SESSION_START_EVENT_NAME||e.event.key===M0.SESSION_END_EVENT_NAME)},M0.prototype.onSessionStarted=function(e,t,r){this.track(M0.SESSION_START_EVENT_NAME,e,t,r)},M0.prototype.onSessionEnded=function(e,t,r){this.track(M0.SESSION_END_EVENT_NAME,e,t,r)},M0.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},M0.prototype.decorateSession=function(e,t){t=(new gt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},M0.SESSION_START_EVENT_NAME="$session_start",M0.SESSION_END_EVENT_NAME="$session_end";var x0=M0;function M0(e,t){this.userManager=e,this.core=t}k0.prototype.process=function(e){var t;x0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e.copyWithUser(e.user),t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[dt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[dt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},k0.prototype.flush=function(e){this.delegate.flush(e)},k0.prototype.close=function(){this.delegate.close()},k0.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.flush(!0);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var P0=k0;function k0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}D0.toEvent=function(e){var t;return{key:D0.EVENT_KEY,properties:{level:D0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:D0._stacktrace(e)}}},D0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,D0.STACK_TRACK_LIMIT).join("\n")},D0.EVENT_KEY="$trace",D0.LEVEL_ERROR="error",D0.STACK_TRACK_LIMIT=30;var U0=D0;function D0(){}L0.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)}};du=L0;function L0(){}j0.prototype.with=function(e){return new j0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},j0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new j0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},j0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new j0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},j0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var F0=j0;function j0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Ne(H0,V0=du),H0.prototype.supports=function(e){return void 0!==e.experiment},H0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:F0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var V0,z0=H0;function H0(e){var t=V0.call(this)||this;return t.evaluationFlowFactory=e,t}B0.of=function(e,t,r,n,i,o){return o.returnValue=Pe.truncateStringValue(n),new B0(i,t.targetEvaluations,e.parameter,r,n,o)},B0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var G0=B0;function B0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Ne(Y0,K0=du),Y0.prototype.supports=function(e){return void 0!==e.parameter},Y0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Pe.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return G0.ofDefault(e,t,h.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,h.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,h.DEFAULT_RULE,r)},Y0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?G0.ofDefault(e,t,h.TYPE_MISMATCH,i):G0.of(e,t,r.id,r.rawValue,n,i)};var K0,J0=Y0;function Y0(e){var t=K0.call(this)||this;return t.targetRuleDeterminer=e,t}$0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var q0=$0;function $0(e,t){this.type=e,this.id=t}X0.create=function(){return new X0},Object.defineProperty(X0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(X0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(X0.prototype,"properties",{get:function(){return Pe.sanitize(this._properties)},enumerable:!1,configurable:!0}),X0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},X0.prototype.addRequest=function(e){this._stack.push(e)},X0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},X0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof F0&&e.experiment.id===t.id})},X0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},X0.prototype.setProperty=function(e,t){this._properties[e]=t};var W0=X0;function X0(){this._stack=[],this._targetEvaluations=[],this._properties={}}Q0.of=function(e,t,r,n){return new Q0(e,t,r,n)},Q0.by=function(e,t){return new Q0(e.workspace,e.user,t,"A")},Q0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var Z0=Q0;function Q0(e,t,r,n){this.key=new q0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}tb.of=function(e,t,r,n,i){return new tb(e,t,r,n,i)},tb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var eb=tb;function tb(e,t,r,n,i){this.key=new q0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}nb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},nb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},nb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var rb=nb;function nb(){}ob.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}};var ib=ob;function ob(e){this.storages=e}ab.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},ab.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return rb.asNumber(e)},ab.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=rb.asNumber(t),e=rb.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},ab.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},ab.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},ab.prototype.clear=function(){this.listStorage.clear()};var sb=ab;function ab(e){this.listStorage=e}cb.prototype.add=function(e){this.evaluators.push(e)},cb.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)};var ub=cb;function cb(){this.evaluators=new Array}pb.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},pb.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},pb.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var lb=pb;function pb(e){this.conditionMatcherFactory=e}hb.prototype.decorate=function(e){return e};var fb=hb;function hb(){}vb.prototype.decorate=function(e){return"string"==typeof e?Mo.decodeURIOrOriginal(e):e};var db=vb;function vb(){}gb.prototype.matches=function(e,t,r){void 0===r&&(r=new fb);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},gb.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},gb.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},gb.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},gb.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var yb=gb;function gb(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}mb.prototype.booleanMatches=function(e,t){return e===t},mb.prototype.numberMatches=function(e,t){return e===t},mb.prototype.stringMatches=function(e,t){return e===t},mb.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},mb.prototype.urlMatches=function(e,t){return Mo.decodeURIOrOriginal(Mo.removePathnameTrailingSlash(e))===Mo.decodeURIOrOriginal(Mo.removePathnameTrailingSlash(t))};xc=mb;function mb(){}Eb.prototype.booleanMatches=function(e,t){return!1},Eb.prototype.numberMatches=function(e,t){return!1},Eb.prototype.stringMatches=function(e,t){return e.includes(t)},Eb.prototype.versionMatches=function(e,t){return!1},Eb.prototype.urlMatches=function(e,t){e=Mo.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))};_=Eb;function Eb(){}wb.prototype.booleanMatches=function(e,t){return!1},wb.prototype.numberMatches=function(e,t){return!1},wb.prototype.stringMatches=function(e,t){return e.startsWith(t)},wb.prototype.versionMatches=function(e,t){return!1},wb.prototype.urlMatches=function(e,t){e=Mo.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))};uu=wb;function wb(){}bb.prototype.booleanMatches=function(e,t){return!1},bb.prototype.numberMatches=function(e,t){return!1},bb.prototype.stringMatches=function(e,t){return e.endsWith(t)},bb.prototype.versionMatches=function(e,t){return!1},bb.prototype.urlMatches=function(e,t){return!1};O=bb;function bb(){}Tb.prototype.booleanMatches=function(e,t){return!1},Tb.prototype.numberMatches=function(e,t){return t<e},Tb.prototype.stringMatches=function(e,t){return t<e},Tb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},Tb.prototype.urlMatches=function(e,t){return!1};T=Tb;function Tb(){}Ib.prototype.booleanMatches=function(e,t){return!1},Ib.prototype.numberMatches=function(e,t){return t<=e},Ib.prototype.stringMatches=function(e,t){return t<=e},Ib.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},Ib.prototype.urlMatches=function(e,t){return!1};var _b=Ib;function Ib(){}Ab.prototype.booleanMatches=function(e,t){return!1},Ab.prototype.numberMatches=function(e,t){return e<t},Ab.prototype.stringMatches=function(e,t){return e<t},Ab.prototype.versionMatches=function(e,t){return e.isLessThan(t)},Ab.prototype.urlMatches=function(e,t){return!1};Ks=Ab;function Ab(){}Ob.prototype.booleanMatches=function(e,t){return!1},Ob.prototype.numberMatches=function(e,t){return e<=t},Ob.prototype.stringMatches=function(e,t){return e<=t},Ob.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},Ob.prototype.urlMatches=function(e,t){return!1};da=Ob;function Ob(){}Rb.prototype.getMatcher=function(e){switch(e){case"IN":return Rb.IN_MATCHER;case"CONTAINS":return Rb.CONTAINS_MATCHER;case"STARTS_WITH":return Rb.STARTS_WITH_MATCHER;case"ENDS_WITH":return Rb.ENDS_WITH_MATCHER;case"GT":return Rb.GT_MATCHER;case"GTE":return Rb.GTE_MATCHER;case"LT":return Rb.LT_MATCHER;case"LTE":return Rb.LTE_MATCHER}},Rb.IN_MATCHER=new xc,Rb.CONTAINS_MATCHER=new _,Rb.STARTS_WITH_MATCHER=new uu,Rb.ENDS_WITH_MATCHER=new O,Rb.GT_MATCHER=new T,Rb.GTE_MATCHER=new _b,Rb.LT_MATCHER=new Ks,Rb.LTE_MATCHER=new da;var Nb=Rb;function Rb(){}Sb.prototype.matches=function(e,t,r){t=rb.asString(t),r=rb.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};M=Sb;function Sb(){}Cb.prototype.matches=function(e,t,r){t=rb.asNumber(t),r=rb.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};Mc=Cb;function Cb(){}xb.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};G=xb;function xb(){}Pb.prototype.matches=function(e,t,r){t=Bt.tryParse(t),r=Bt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var Mb=Pb;function Pb(){}kb.prototype.matches=function(e,t,r){t=Mo.tryParse(t),r=rb.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=kb;function kb(){}Ub.prototype.matches=function(e,t,r){return!1};Gs=Ub;function Ub(){}Lb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Lb.STRING_MATCHER;case"NUMBER":return Lb.NUMBER_MATCHER;case"BOOLEAN":return Lb.BOOLEAN_MATCHER;case"VERSION":return Lb.VERSION_MATCHER;case"URL":return Lb.URL_MATCHER;case"NULL":case"UNKNOWN":return Lb.NULL_MATCHER}},Lb.STRING_MATCHER=new M,Lb.NUMBER_MATCHER=new Mc,Lb.BOOLEAN_MATCHER=new G,Lb.VERSION_MATCHER=new Mb,Lb.URL_MATCHER=new N,Lb.NULL_MATCHER=new Gs;var Db=Lb;function Lb(){}jb.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},jb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?db:fb)};var Fb=jb;function jb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}zb.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Vb=zb;function zb(){}Gb.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},Gb.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,"]"))};var Hb=Gb;function Gb(e){this.segmentMatcher=e}Kb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Kb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Bb=Kb;function Kb(e){this.userConditionMatcher=e}Yb.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Jb=Yb;function Yb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}qb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(rb.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},qb.prototype.evaluate=function(e,t,r){r=Z0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};vu=qb;function qb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne(Xb,$b=vu),Xb.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},Xb.prototype.resolve=function(e,t){return e instanceof Z0&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},Xb.prototype.evaluationMatches=function(e,t){return!!Xb.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},Xb.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var $b,Wb=Xb;function Xb(e,t){return $b.call(this,e,t)||this}Ne(eT,Zb=vu),eT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},eT.prototype.resolve=function(e,t){return t},eT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var Zb,Qb=eT;function eT(e,t){return Zb.call(this,e,t)||this}rT.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)},rT.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var tT=rT;function rT(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}iT.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},iT.prototype.properties=function(e){return w0.isTrackEvent(e)?e.event.properties:w0.isExposureEvent(e)||w0.isRemoteConfigEvent(e)?e.properties:void 0};var nT=iT;function iT(){}sT.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})};var oT=sT;function sT(e){this.valueOperatorMatcher=e}uT.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}};var aT=uT;function uT(e){var t=new yb(new Db,new Nb);this.userConditionMatcher=new Fb(new Vb,t),this.eventConditionMatcher=new tT(new nT,t),this.segmentConditionMatcher=new Hb(new Bb(this.userConditionMatcher)),this.experimentConditionMatcher=new Jb(new Wb(e,t),new Qb(e,t)),this.cohortConditionMatcher=new oT(t)}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)}};var cT=lT;function lT(e){this.bucketer=e}var pT={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=this.mul32(i,3432918353),s=5*(s=(524287&(s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=this.mul32(i,3432918353),s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),s=this.mul32(s^=s>>>13,3266489909),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},fT=(hT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},hT.prototype.calculateSlotNumber=function(e,t,r){r=pT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},hT);function hT(){}vT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},vT.end=function(){return new vT(void 0,void 0)},vT.decision=function(e,t){return new vT(e,t)},vT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r};var dT=vT;function vT(e,t){this.flowEvaluator=e,this.nextFlow=t}gT.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 F0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return F0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var yT=gT;function gT(e){this.overrideResolver=e}ET.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?F0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var mT=ET;function ET(){}bT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return F0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return F0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var wT=bT;function bT(){}_T.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return F0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var TT=_T;function _T(){}AT.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):F0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var IT=AT;function AT(e){this.experimentTargetDeterminer=e}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?F0.ofDefault(e,t,h.VARIATION_DROPPED):F0.of(e,t,n,h.TRAFFIC_ALLOCATED):F0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var OT=NT;function NT(e){this.actionResolver=e}ST.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 F0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var RT=ST;function ST(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}xT.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 F0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return F0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var CT=xT;function xT(e){this.actionResolver=e}PT.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):F0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var MT=PT;function PT(e){this.containerResolver=e}UT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):F0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var kT=UT;function UT(){}LT.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)})};var DT=LT;function LT(e){this.targetMatcher=e}jT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var FT=jT;function jT(e){this.targetMatcher=e}zT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},zT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},zT.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)}},zT.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)};var VT=zT;function zT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}GT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var HT=GT;function GT(e){this.bucketer=e}KT.of=function(e,t,r,n){return new KT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var BT=KT;function KT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}YT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):BT.of(e,t,h.UNSUPPORTED_PLATFORM)};var JT=YT;function YT(){}$T.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),BT.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var qT=$T;function $T(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}XT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?BT.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var WT=XT;function XT(){}QT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?BT.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var ZT=QT;function QT(){}t_.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):BT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var e_=t_;function t_(){}n_.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?BT.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var r_=n_;function n_(e){this.hiddenMatcher=e}o_.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),BT.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):BT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var i_=o_;function o_(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}a_.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},a_.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=a.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=Z0.by(e,n),i=this.evaluator.evaluate(n,t),o=(this.addExperimentContext(i,t),e.inAppMessage.messageContext.defaultLang);return this.resolveMessage(e,function(e){return e.lang===o&&i.variationKey===e.variationKey})},a_.prototype.addExperimentContext=function(e,t){t.addEvaluation(e),t.setProperty("experiment_id",e.experiment.id),t.setProperty("experiment_key",e.experiment.key),t.setProperty("variation_id",e.variationId),t.setProperty("variation_key",e.variationKey),t.setProperty("experiment_decision_reason",e.reason)},a_.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},a_.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return a.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var s_=a_;function a_(e){this.evaluator=e}c_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},c_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var u_=c_;function c_(){}p_.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)})};var l_=p_;function p_(e){this.targetMatcher=e}h_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var f_=h_;function h_(e){this.storage=e}v_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},v_.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))};var d_=v_;function v_(e,t){this.targetMatcher=e,this.bucketer=t}g_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},g_.getOrNull=function(e){return g_.instances.get(e)},g_.register=function(e,t){return g_.instances.set(e,t),t},g_.instances=new Map;var y_=g_;function g_(){}E_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},E_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var m_=E_;function E_(e,t,r){var n=new fT,i=y_.register("targetMatcher",new lb(new aT(e))),o=new cT(n),t=new VT(t,i,o),s=new HT(n),s=(this.abTestFlow=dT.of(new yT(t),new kT,new MT(s),new IT(new DT(i)),new mT,new wT,new TT,new OT(o)),this.featureFlagFlow=dT.of(new mT,new wT,new TT,new yT(t),new kT,new RT(new FT(i),o),new CT(o)),new s_(e));this.inAppMessageFlow=dT.of(new JT,new qT(new u_,s),new WT,new ZT,new e_,new r_(new f_(r)),new i_(new l_(i),s)),this.remoteConfigParameterTargetRuleDeterminer=new d_(i,n)}b_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return t&&o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[b_.ROOT_TYPE]=r.key.type,t[b_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},b_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof F0)return n[b_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[b_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[b_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,w0.exposure(e.user,t,n,r);if(t instanceof G0)return w0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof BT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},b_.ROOT_TYPE="$targetingRootType",b_.ROOT_ID="$targetingRootId",b_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",b_.EXPERIMENT_VERSION_KEY="$experiment_version",b_.EXECUTION_VERSION_KEY="$execution_version";var w_=b_;function b_(e){this.clock=e}Ne(I_,T_=du),I_.prototype.supports=function(e){return void 0!==e.inAppMessage},I_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:BT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var T_,__=I_;function I_(e){var t=T_.call(this)||this;return t.evaluationFlowFactory=e,t}O_.of=function(e,t,r,n){return new O_(e,t,r,n)},O_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var A_=O_;function O_(e,t,r,n){this.key=new q0("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var N_=s.log,R_=(S_.create=function(e,t,r,n){var i=new ub,r=new ib(r),r=new m_(i,r,n),n=new z0(r),o=new J0(r.remoteConfigParameterTargetRuleDeterminer),r=new __(r);return i.add(n),i.add(o),new S_(n,o,r,e,new w_(Le.instance),t,new C_,Le.instance)},S_.prototype.experiment=function(e,t,r){var n=this;if(!e)return N_.error("experimentKey must not be empty"),We.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return N_.warn("SDK not ready."),We.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return N_.warn("Experiment does not exist."),We.of(r,h.EXPERIMENT_NOT_FOUND);i=Z0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},S_.prototype.experiments=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=Z0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},S_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,W0.create()),t=null!=(t=e.config)?t:new je;return[e,We.of(e.variationKey,e.reason,t,e.experiment)]},S_.prototype.featureFlag=function(e,t){var r=this;if(!e)return N_.error("featureKey must not be empty"),Ze.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return N_.warn("SDK not ready."),Ze.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return N_.warn("FeatureFlag does not exist."),Ze.off(h.FEATURE_FLAG_NOT_FOUND);n=Z0.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},S_.prototype.featureFlags=function(r){var n=this,i=new Vn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=Z0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},S_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,W0.create()),t=null!=(t=e.config)?t:new je;return[e,"A"===e.variationKey?Ze.off(e.reason,t,e.experiment):Ze.on(e.reason,t,e.experiment)]},S_.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return N_.warn("SDK not ready."),qe.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return N_.warn("In app message does not exist."),qe.of(h.IN_APP_MESSAGE_NOT_FOUND);n=A_.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,W0.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),qe.of(t.reason,t.inAppMessage,t.message,t.properties)},S_.prototype.tryInAppMessage=function(t,e){var r,n=Dn.start();try{r=this.inAppMessage(t,e)}catch(e){N_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.of(h.EXCEPTION)}return xi.inAppMessage(n,t,r),r},S_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?N_.warn("Event must be event type."):"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new ft(0,e.key),this.eventProcessor.process(w0.track(n,e,t,r))):N_.warn("Event key must be not null. or event key must be string type."):N_.warn("event must not be null.")},S_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=U0.toEvent(e),this.flush(),this.track(e,t),this.flush())},S_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},S_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return N_.warn("SDK not ready."),Je.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return N_.warn("Remote config parameter does not exist."),Je.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=eb.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,W0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},S_.prototype.close=function(){this.eventProcessor.close()},S_);function S_(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}x_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},x_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var C_=x_;function x_(){}P_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},P_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var M_=P_;function P_(){this._installed=[],this._installations={onerror:D_,onunhandledrejection:L_}}var k_,U_=null;function D_(o,s){U_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),U_&&U_.apply(this,arguments)}}function L_(r,n){k_=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),k_&&k_.apply(this,arguments)}}j_.prototype.read=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},j_.prototype.save=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},j_.prototype.add=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},j_.prototype.delete=function(n){return u(this,void 0,void 0,function(){var t,r=this;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},j_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},j_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var F_=j_;function j_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var V_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},z_=(H_.builder=function(){return new G_},H_.empty=function(){return H_.builder().build()},H_.from=function(e){return new H_(e)},H_.fromDto=function(e){for(var t=H_.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new nn(e)})})}return t.build()},Object.defineProperty(H_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),H_.prototype.get=function(e){return this.cohorts.get(e)},H_.prototype.filterBy=function(e){var r=yt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return H_.from(e)},H_.prototype.asArray=function(){return this.cohorts.values()},H_.prototype.asComparable=function(){return this.cohorts},H_.prototype.toBuilder=function(){return new G_(this)},H_);function H_(e){this.cohorts=e}B_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},B_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},B_.prototype.build=function(){return new z_(this.cohorts)};var G_=B_;function B_(e){this.cohorts=new Vn(Ce.isEqual),e&&this.putAll(e)}var E="model",r="name",S="type",R="vendor",e="version",Fh="architecture",fd="console",m="mobile",C="tablet",P="smarttv",b="wearable",K_=(k.parse=function(e){return{browser:k.getBrowser(e),cpu:k.getCPU(e),device:k.getDevice(e),engine:k.getEngine(e),os:k.getOS(e)}},k.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return k.mapper.rgx.call(t,e,k.regexes.browser),t.major=k.util.major(t.version),t},k.getCPU=function(e){var t={architecture:void 0};return k.mapper.rgx.call(t,e,k.regexes.cpu),t},k.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return k.mapper.rgx.call(t,e,k.regexes.device),t},k.getEngine=function(e){var t={name:void 0,version:void 0};return k.mapper.rgx.call(t,e,k.regexes.os),t},k.getOS=function(e){var t={name:void 0,version:void 0};return k.mapper.rgx.call(t,e,k.regexes.os),t},k.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,"")}},k.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[r,e],[/(opios)[\/\s]+([\w\.]+)/i],[[r,"Opera Mini"],e],[/\s(opr)\/([\w\.]+)/i],[[r,"Opera"],e],[/(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],[r,e],[/(konqueror)\/([\w\.]+)/i],[[r,"Konqueror"],e],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[r,"IE"],e],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[r,"Edge"],e],[/(yabrowser)\/([\w\.]+)/i],[[r,"Yandex"],e],[/(Avast)\/([\w\.]+)/i],[[r,"Avast Secure Browser"],e],[/(AVG)\/([\w\.]+)/i],[[r,"AVG Secure Browser"],e],[/(puffin)\/([\w\.]+)/i],[[r,"Puffin"],e],[/(focus)\/([\w\.]+)/i],[[r,"Firefox Focus"],e],[/(opt)\/([\w\.]+)/i],[[r,"Opera Touch"],e],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[r,"UCBrowser"],e],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],e],[/(windowswechat qbcore)\/([\w\.]+)/i],[[r,"WeChat(Win) Desktop"],e],[/(micromessenger)\/([\w\.]+)/i],[[r,"WeChat"],e],[/(brave)\/([\w\.]+)/i],[[r,"Brave"],e],[/(whale)\/([\w\.]+)/i],[[r,"Whale"],e],[/(qqbrowserlite)\/([\w\.]+)/i],[r,e],[/(QQ)\/([\d\.]+)/i],[r,e],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[r,e],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[r,e],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[r,e],[/(MetaSr)[\/\s]?([\w\.]+)/i],[r],[/(LBBROWSER)/i],[r],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[e,[r,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[e,[r,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[r,e],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[e,[r,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[r,/(.+)/,"$1 WebView"],e],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[r,/(.+(?:g|us))(.+)/,"$1 $2"],e],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[r,"Chrome Mobile"],e],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[e,[r,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[r,"Sailfish Browser"],e],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[r,e],[/(dolfin)\/([\w\.]+)/i],[[r,"Dolphin"],e],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[r,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[r,"Opera Coast"],e],[/fxios\/([\w\.-]+)/i],[e,[r,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[e,[r,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[e,r],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[r,"GSA"],e],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[r,[e,(k.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(k.util.has(t[r][n],e))return"?"===r?void 0:r}else if(k.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(k.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],[r,e],[/(navigator|netscape)\/([\w\.-]+)/i],[[r,"Netscape"],e],[/(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],[r,e]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Fh,"amd64"]],[/(ia32(?=;))/i],[[Fh,k.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Fh,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Fh,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Fh,/ower/,"",k.util.lowerize]],[/(sun4\w)[;\)]/i],[[Fh,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Fh,k.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[E,R,[S,C]],[/applecoremedia\/[\w\.]+ \((ipad)/],[E,[R,"Apple"],[S,C]],[/(apple\s{0,1}tv)/i],[[E,"Apple TV"],[R,"Apple"],[S,P]],[/(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],[R,E,[S,C]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[E,[R,"Amazon"],[S,C]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[E,k.mapper.str,k.maps.device.amazon.model],[R,"Amazon"],[S,m]],[/android.+aft([bms])\sbuild/i],[E,[R,"Amazon"],[S,P]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[E,R,[S,m]],[/\((ip[honed|\s\w*]+);/i],[E,[R,"Apple"],[S,m]],[/(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],[R,E,[S,m]],[/\(bb10;\s(\w+)/i],[E,[R,"BlackBerry"],[S,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[E,[R,"Asus"],[S,C]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[E,"Xperia Tablet"],[S,C]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[R,"Sony"],[S,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,E,[S,fd]],[/android.+;\s(shield)\sbuild/i],[E,[R,"Nvidia"],[S,fd]],[/(playstation\s[34portablevi]+)/i],[E,[R,"Sony"],[S,fd]],[/(sprint\s(\w+))/i],[[R,k.mapper.str,k.maps.device.sprint.vendor],[E,k.mapper.str,k.maps.device.sprint.model],[S,m]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[E,/_/g," "],[S,m]],[/(nexus\s9)/i],[E,[R,"HTC"],[S,C]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[E,[R,"Huawei"],[S,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[E,[R,"Huawei"],[S,C]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,E,[S,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[E,[R,"Microsoft"],[S,fd]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[R,"Microsoft"],[S,m]],[/\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],[E,[R,"Motorola"],[S,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[E,[R,"Motorola"],[S,C]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,k.util.trim],[E,k.util.trim],[S,P]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[R,"Samsung"],[S,P]],[/\(dtv[\);].+(aquos)/i],[E,[R,"Sharp"],[S,P]],[/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],[[R,"Samsung"],E,[S,C]],[/smart-tv.+(samsung)/i],[R,[S,P],E],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[R,"Samsung"],E,[S,m]],[/sie-(\w*)/i],[E,[R,"Siemens"],[S,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],E,[S,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[E,[R,"Acer"],[S,C]],[/android.+([vl]k\-?\d{3})\s+build/i],[E,[R,"LG"],[S,C]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],E,[S,C]],[/(lg) netcast\.tv/i],[R,E,[S,P]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[E,[R,"LG"],[S,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,E,[S,C]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[E,[R,"Lenovo"],[S,C]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,E,[S,m]],[/linux;.+((jolla));/i],[R,E,[S,m]],[/((pebble))app\/[\d\.]+\s/i],[R,E,[S,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,E,[S,m]],[/crkey/i],[[E,"Chromecast"],[R,"Google"],[S,P]],[/android.+;\s(glass)\s\d/i],[E,[R,"Google"],[S,b]],[/android.+;\s(pixel c)[\s)]/i],[E,[R,"Google"],[S,C]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[E,[R,"Google"],[S,m]],[/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],[[E,/_/g," "],[R,"Xiaomi"],[S,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[E,/_/g," "],[R,"Xiaomi"],[S,C]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[E,[R,"Meizu"],[S,m]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],E,[S,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[E,[R,"OnePlus"],[S,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[E,[R,"RCA"],[S,C]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[E,[R,"Dell"],[S,C]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[E,[R,"Verizon"],[S,C]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],E,[S,C]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[E,[R,"NuVision"],[S,C]],[/android.+;\s(k88)\sbuild/i],[E,[R,"ZTE"],[S,C]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[E,[R,"Swiss"],[S,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[E,[R,"Swiss"],[S,C]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[E,[R,"Zeki"],[S,C]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],E,[S,C]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[E,[R,"Insignia"],[S,C]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[E,[R,"NextBook"],[S,C]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],E,[S,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],E,[S,m]],[/android.+;\s(PH-1)\s/i],[E,[R,"Essential"],[S,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[E,[R,"Envizen"],[S,C]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,E,[S,C]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[E,[R,"MachSpeed"],[S,C]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,E,[S,C]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[E,[R,"Rotor"],[S,C]],[/android.+(KS(.+))\s+build/i],[E,[R,"Amazon"],[S,C]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,E,[S,C]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[S,k.util.lowerize],R,E],[/[\s\/\(](smart-?tv)[;\)]/i],[[S,P]],[/(android[\w\.\s\-]{0,9});.+build/i],[E,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[e,[r,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[e,[r,"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],[r,e],[/rv\:([\w\.]{1,9}).+(gecko)/i],[e,r]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[r,e],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[r,k.mapper.str,k.maps.os.windows],[e,k.mapper.str,k.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[r,"Windows"],[e,k.mapper.str,k.maps.os.windows.version]],[/\((bb)(10);/i],[[r,"BlackBerry"],e],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[r,e],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[r,"Symbian"],e],[/\((series40);/i],[r],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[r,"Firefox OS"],e],[/(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],[[r,"Linux"],e],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[r,"Chromium OS"],e],[/(sunos)\s?([\w\.\d]*)/i],[[r,"Solaris"],e],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[r,"Linux"],e],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(haiku)\s(\w+)/i],[r,e],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[e,/_/g,"."],[r,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[r,"Mac"],[e,/_/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],[r,e]]},k);function k(){}Y_.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=K_.parse(e.navigator.userAgent),s=o.browser,a=o.os,o=o.device,u=e.screen,c=(null==(c=e.navigator.languages)?void 0:c[0])||"",l=c.split("-")[0],p=(null!=(p=o.type)?p:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),f=a.name||"",h="",d="";try{f=null!=(r=null==(t=f.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:f,h=null!=(i=null==(n=u.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",d=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:f,osVersion:a.version||"",deviceModel:o.model||"",deviceType:p,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",locale:c,language:l,orientation:h,userAgent:e.navigator.userAgent||"",screenWidth:u.width||"",screenHeight:u.height||"",timeZone:d}};var J_=Y_;function Y_(){}$_.prototype.map=function(e){return new $_(e(this.previous),e(this.current))};var q_=$_;function $_(e,t){this.previous=e,this.current=t}X_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return eI.of(rI(e,this.hackleDeviceId),z_.empty())},X_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(X_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),X_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},X_.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},X_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},X_.prototype.hackleUser=function(e){var t=(new gt).addIdentifiers(e.user.identifiers||{}).add(dt.ID,e.user.id||this.hackleDeviceId).add(dt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(dt.HACKLE_DEVICE,this.hackleDeviceId),t=(a.isNotNullOrUndefined(e.user.userId)&&t.add(dt.USER,e.user.userId),t.build()),r=this.campaignParser.parse();return{identifiers:t,properties:c(c({},r),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},X_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?c(c({},J_.generate(window)),this.pageManager.currentPage.toProperties()):e)||{}},X_.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},X_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},X_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},X_.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},X_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},X_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},X_.prototype.saveUser=function(e){this.storage.saveUser(e)},X_.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,V_(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new q_(t,n)},X_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=rI(r,n.hackleDeviceId),V_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},X_.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},X_.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},X_.prototype.syncIfNeeded=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return this.hasNewIdentifiers(t.previous,t.current)?[2,this.sync()]:[2]})})},X_.prototype.hasNewIdentifiers=function(e,t){var r=yt(e),e=yt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},X_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var W_=X_;function X_(e,t,r,n,i,o,s,a){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.campaignParser=n,this.pageManager=i,this.clock=o,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(s,a),this.storage.saveUser(this.context.user)}Q_.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},Q_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(Q_.prototype,"deviceId",{get:function(){return this.storage.getItem(_n)},enumerable:!1,configurable:!0}),Object.defineProperty(Q_.prototype,"userId",{get:function(){return this.storage.getItem(Tn)},enumerable:!1,configurable:!0}),Q_.prototype.setDeviceId=function(e){this.setId(_n,e)},Q_.prototype.setUserId=function(e){this.setId(Tn,e)},Q_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var Z_=Q_;function Q_(e){this.storage=e}tI.of=function(e,t){return new tI(e,t.filterBy(e))},tI.prototype.with=function(e){return tI.of(e,this.cohorts.filterBy(e))},tI.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return tI.of(this.user,e)};var eI=tI;function tI(e,t){this.user=e,this.cohorts=t}var rI=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},nI=(Object.defineProperty(iI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(iI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:iI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(iI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),iI.prototype.addListener=function(e){this.sessionListeners.push(e)},iI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},iI.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)},iI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(bn,"".concat(e))},iI.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)})},iI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(H().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},iI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(wn,e)},iI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(wn)},iI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(bn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},iI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},iI.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.updateLastEventTime(t);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},iI.EMPTY_SESSION_ID="0.ffffffff",iI);function iI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}sI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},sI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},sI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},sI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var oI=sI;function sI(){this.storage=window.localStorage}uI.postfix=function(e,t){return new uI(e,function(e){return"".concat(e).concat(t)})},uI.prefix=function(e,t){return new uI(e,function(e){return"".concat(t).concat(e)})},uI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},uI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},uI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var aI=uI;function uI(e,t){this.delegate=e,this.transform=t}lI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},lI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},lI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},lI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},lI.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[]}},lI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},lI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},lI.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]},lI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},lI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var cI=lI;function lI(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)}fI.prototype.currentUser=function(){return this.userManager.resolve()},fI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},fI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},fI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},fI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},fI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},fI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},fI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},fI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},fI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},fI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},fI.prototype.increment=function(e,t){di.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var pI=fI;function fI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}dI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},dI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},dI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},dI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},dI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},dI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},dI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},dI.monitoring=function(e){return"".concat(e,"/metrics")};var hI=dI;function dI(){}yI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},yI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},yI.prototype.key=function(e){return"".concat(e.key)};var vI=yI;function yI(e){this.storage=e}mI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var gI=mI;function mI(e){this.handlers=e}wI.prototype.handle=function(e,t){e.close()},wI.prototype.supports=function(e){return"CLOSE"===e.type};var EI=wI;function wI(){}TI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},TI.prototype.supports=function(e){return"WEB_LINK"===e.type};var bI=TI;function TI(e){this.urlHandler=e}II.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var _I=II;function II(e){this.urlHandler=e}OI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+OI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},OI.prototype.supports=function(e){return"HIDDEN"===e.type},OI.HIDE_EXPIRATION=864e5;var AI=OI;function OI(e,t){this.storage=e,this.clock=t}RI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},RI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var NI=RI;function RI(e){this.urlHandler=e}CI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},CI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var SI=CI;function CI(e){this.urlHandler=e}MI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},MI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var xI=MI;function MI(e){this.urlHandler=e}kI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},kI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var PI=kI;function kI(e){this.urlHandler=e}DI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},DI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},t.properties),{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})})};case"CLOSE":return{key:"$in_app_close",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key})};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.text})}}};var UI=DI;function DI(e){this.core=e}FI.prototype.present=function(r){return u(this,void 0,void 0,function(){var t;return l(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]}})})};var LI=FI;function FI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}VI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},VI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var jI=VI;function VI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}var zI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},HI=(GI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},GI.prototype.context=function(e,t){var r,e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return r=c(c({},e.properties),{decision_reason:e.reason}),new zI(e.inAppMessage,e.message,t.user,Pe.sanitize(r))},GI);function GI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}KI.prototype.open=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(KI.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(KI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.context.user.hackleProperties.deviceType,[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),deviceType:r?String(r):null})];case 2:return e.sent(),t.classList.remove("".concat(KI.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]}})})},KI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(KI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},KI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(KI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},KI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},KI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},KI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},KI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",KI.CONTAINER_CLASS_NAME="hackle-iam";var BI=KI;function KI(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===KI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}YI.create=function(e){return new YI(e)},YI.prototype.create=function(e,t){return new BI(this.scriptLoader,e,t)};var JI=YI;function YI(e){this.scriptLoader=e}$I.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(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()]}})})},$I.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},$I.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})};var qI=$I;function $I(e){this.scriptUrl=e}XI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},XI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=ZI.of(e,t,r);return this.targetMatcher.anyMatches(e,W0.create(),n.targets)};var WI=XI;function XI(e){this.targetMatcher=e}QI.of=function(e,t,r){return new QI(new q0("IN_APP_MESSAGE",r.id),e,t.user,t)};var ZI=QI;function QI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}tA.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},tA.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new rA(new iA(i)))}return e.durationCap&&t.push(new rA(new sA(e.durationCap))),t};var eA=tA;function tA(e){this.storage=e}nA.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var rA=nA;function nA(e){this.matchCount=0,this.predicate=e}Object.defineProperty(oA.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),oA.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};var iA=oA;function oA(e){this.identifierCap=e}Object.defineProperty(aA.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),aA.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var sA=aA;function aA(e){this.durationCap=e}cA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},cA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var uA=cA;function cA(e){this.storage=e}pA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var lA=pA;function pA(e){this.processors=e}hA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},hA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>hA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-hA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},hA.prototype.supports=function(e){return"IMPRESSION"===e.type},hA.IMPRESSION_MAX_SIZE=100;var fA=hA;function hA(e){this.impressionStorage=e}vA.prototype.process=function(e,t,r){},vA.prototype.supports=function(e){return"CLOSE"===e.type};var dA=vA;function vA(){}gA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},gA.prototype.supports=function(e){return"ACTION"===e.type};var yA=gA;function gA(e){this.actionHandlerFactory=e}EA.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)};var mA=EA;function EA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}bA.prototype.matches=function(e,t,r){return!!w0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var wA=bA;function bA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}_A.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var TA=_A;function _A(e){this.handlers=e}AA.prototype.handle=function(e,t){e.close()},AA.prototype.supports=function(e){return"CLOSE"===e.type};var IA=AA;function AA(){}NA.prototype.handle=function(e,t){var r=tn.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},NA.prototype.supports=function(e){return"ACTION"===e.type};var OA=NA;function NA(e){this.eventHandler=e}SA.prototype.open=function(e){window.location.href=e.href};var RA=SA;function SA(){}xA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var CA=xA;function xA(){}PA.prototype.open=function(e){window.open(e.href)};var MA=PA;function PA(){}UA.prototype.open=function(e){window.location.replace(e)};var kA=UA;function UA(){}function DA(e,t,r){return null===e||(!jA(t,LA)||r.current!==r.referrer)&&!jA(e,t)}var LA={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},FA={current:void 0,referrer:void 0},jA=function(t,r){return Object.keys(LA).every(function(e){return t[e]===r[e]})},VA=(zA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},LA),t),n=new mo,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},zA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();DA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},zA.prototype.onSessionEnded=function(e,t,r){},zA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},zA);function zA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}GA.prototype.get=function(){var e=this.storage.getItem(In);return e?JSON.parse(e):null},GA.prototype.set=function(e){this.storage.setItem(In,JSON.stringify(e))};var HA=GA;function GA(e){this.storage=e}KA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},KA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(i=Mo.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var BA=KA;function KA(e){this.search=e}YA.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},YA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,YA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var JA=YA;function YA(){}$A.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},$A.prototype.params=function(e){e=a.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new BA(e).getQueryParams($A.CAMPAIGN_QUERY_CONDITION)},$A.prototype.resolve=function(e){return{utm_campaign:e[WA],utm_content:e[XA],utm_id:e[ZA],utm_medium:e[QA],utm_source:e[eO],utm_term:e[tO],gclid:e[rO],fbclid:e[nO]}},$A.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return FA;return{current:JA.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,JA.extractDomain(e)}()}},$A.CAMPAIGN_QUERY_CONDITION=function(e,t){return yi.isNotEmptyString(t)};var qA=$A;function $A(e){this.pageManager=e}var WA="utm_campaign",XA="utm_content",ZA="utm_id",QA="utm_medium",eO="utm_source",tO="utm_term",rO="gclid",nO="fbclid",iO=(oO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},oO.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){s.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},oO);function oO(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}aO.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!w0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var sO=aO;function aO(e){this.workspaceFetcher=e}var uO={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.34.2",IAM_RENDERER_VERSION_HEADER:"0.0.6"},cO=(lO.config=function(e){return c(c(c({},uO),e),{automaticPageTracking:lO.resolveAutomaticPageTracking(e)})},lO.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?uO.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},lO.logging=function(e){s.initCounter(function(e){return di.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},lO.sdk=function(e,t){return s.log.debug("SDK key: ".concat(e)),e||s.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},lO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},lO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},lO.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(s.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},lO);function lO(){}fO.prototype.add=function(e){this.synchronizers.push(e)},fO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.sync())}))];case 1:return e.sent(),[2]}})})},fO.prototype.close=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.close())}))];case 1:return e.sent(),[2]}})})},fO.prototype.safe=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var pO=fO;function fO(){this.synchronizers=[]}dO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},dO.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},dO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},dO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var hO=dO;function dO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}yO.prototype.schedule=function(e,t){e=new gO(e,t);return e.start(),e},yO.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new EO(e,t,r);break;case"setInterval":n=new bO(e,t,r)}return n.start(),n};var vO=yO;function yO(e){this.scheduleType=e}mO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},mO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var gO=mO;function mO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}wO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},wO.prototype.run=function(){var e=this;try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},wO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var EO=wO;function wO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}TO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},TO.prototype.run=function(){try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}},TO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var bO=TO;function TO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}IO.prototype.fetchIfModified=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},IO.prototype.createRequest=function(e){var t=mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(Ii.IF_MODIFIED_SINCE,e),t.build()},IO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Dn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Pi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Pi.record("get.workspace",t,null),r;case 4:return[2]}})})},IO.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(Ii.LAST_MODIFIED)}};var _O=IO;function IO(e,t){this.url=e,this.transport=t}OO.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},OO.prototype.createRequest=function(e){e={identifiers:yt(e)},e=Ee.encodeURL(JSON.stringify(e));return mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},OO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Dn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Pi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Pi.record("get.cohorts",t,null),r;case 4:return[2]}})})},OO.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return z_.fromDto(e)};var AO=OO;function OO(e,t){this.url=e,this.transport=t}RO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},RO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},RO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},RO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},RO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},RO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},RO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},RO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},RO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},RO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},RO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},RO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},RO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},RO.prototype.getAttributes=function(){return this.attributes},RO.from=function(e){return new RO(p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return ot.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ut.fromJson),e.events.map(ft.fromJson),p.mapNotNullOrUndefined(e.segments,Mt.fromJson),e.containers.map(kt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ft.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,dr.fromJson),e.workspace.attributes)};var NO=RO;function RO(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}CO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},CO.prototype.setWorkspace=function(e){try{this.workspace=NO.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},CO.prototype.get=function(){return this.workspace},CO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},CO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var SO=CO;function CO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}MO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},MO.prototype.dispatchEventsSynchronously=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.synchronousTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},MO.prototype.dispatchEvents=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})};var xO=MO;function MO(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}kO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},kO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof w0?w0.isExposureEvent(e)?t.push(e.toDto()):w0.isTrackEvent(e)?r.push(e.toDto()):w0.isRemoteConfigEvent(e)&&n.push(e.toDto()):w0.isExposureEventDto(e)?t.push(e):w0.isTrackEventDto(e)?r.push(e):w0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return mi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},kO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Dn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Pi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Pi.record("post.events",t,null),r;case 4:return[2]}})})};var PO=kO;function kO(e,t){this.url=e,this.transport=t}DO.prototype.add=function(e){return this.repository.add(e)},DO.prototype.delete=function(e){return this.repository.delete(e)},DO.prototype.flush=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},DO.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var UO=DO;function DO(e,t){this.repository=e,this.transport=t}function LO(){this.listeners={}}LO.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},LO.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},LO.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(jO,FO=LO);var FO,t=jO;function jO(){return null!==FO&&FO.apply(this,arguments)||this}Ne(HO,VO=t),HO.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},HO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},HO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},HO.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return s.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},HO.prototype.close=function(){this.flush(!0)};var VO,zO=HO;function HO(e,t,r,n){var i=VO.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}BO.prototype.send=function(e){e=e.toBuilder().addHeader(cn,this.sdk.key).addHeader(ln,this.sdk.name).addHeader(pn,this.sdk.version).addHeader(fn,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var GO=BO;function BO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}JO.intercept=function(e,t){return t instanceof GO?t:new GO(e,Le.instance,t)};var KO=JO;function JO(){}qO.create=function(){return new qO},qO.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0===n.status?r(new Error("Request Error")):(e=new Ti(n.status,n.responseText,function(e){var t=Ii.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var YO=qO;function qO(){}WO.create=function(){return new WO},WO.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(Ti.ok())})},WO.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(cn),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(ln,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(pn,"unknown")),e.headers.get(fn));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var $O=WO;function WO(){}ZO.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var XO=ZO;function ZO(e){this.invocationResponseResolver=e}tN.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)};var QO,eN=tN;function tN(e){this.invocationResponseResolver=e}(Bs=QO=QO||{}).prompt="prompt",Bs.function="function";nN.prototype.getInvocator=function(e,t){return e===QO.prompt?new XO(t):e===QO.function?new eN(t):null};var rN=nN;function nN(){}oN.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},oN.prototype.onPageEnded=function(e,t){};var iN=oN;function oN(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var sN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},aN=(uN.prototype.determineOrNull=function(e){if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e,"A"),new sN(t,o,i,e)}return null},uN);function uN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}lN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=pN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,W0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,W0.create(),t.includeTargets))};var cN=lN;function lN(e){this.targetMatcher=e}fN.of=function(e,t){return new fN(new q0("SPLIT_URL",H()),t,e)};var pN=fN;function fN(e,t,r){this.key=e,this.user=t,this.workspace=r}dN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var hN=dN;function dN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}yN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(yN.SPLIT_URL_CONFIG_KEY,"")),r=on.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},yN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},yN.prototype.resolveManualRedirectUrl=function(e,t){e=Mo.tryParse(e);return e?this.decorateCampaign(e,t):null},yN.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(yi.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];yi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},yN.SPLIT_URL_CONFIG_KEY="redirectUrl";var vN=yN;function yN(e){this.campaignParser=e}mN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},mN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},mN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var gN=mN;function mN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}wN.prototype.setNeedDispatch=function(e){this.needDispatch=e},wN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(wN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},wN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var EN=wN;function wN(){this.needDispatch=!0}TN.prototype.get=function(){var e=this.storage.getItem(xn);if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},TN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(xn,JSON.stringify(e))},TN.prototype.clear=function(){this.storage.removeItem(xn)};var bN=TN;function TN(e,t){this.sdk=e,this.storage=t}var _N=s.log,IN=(AN.prototype.install=function(e){void 0===e&&(e=null);try{var t=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return t("pageshow")}),window.addEventListener("pagehide",function(){return t("pagehide")}),document.addEventListener("visibilitychange",function(){return t(document.visibilityState)}),window.addEventListener("blur",function(){return t("blur")}),window.addEventListener("focus",function(){return t("focus")}),AN.isSafariBrowser(e)&&window.addEventListener("beforeunload",function(){return t("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&_N.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&_N.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&_N.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&_N.error(e)}var r,n},AN.prototype.addListener=function(e){this.listeners.push(e)},AN.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},AN.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},AN.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},AN.isSafariBrowser=function(e){return!a.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},AN);function AN(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[],this._initialized=!1}NN.create=function(e,t,r){return void 0===r&&(r=Le.instance),new NN(new RN(r,e,t))},NN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var ON=NN;function NN(e){this.limiter=e}SN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},SN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new CN(e+this.intervalMillis,this.limit)),this.currentScope};var RN=SN;function SN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}xN.prototype.isExpired=function(e){return this.expirationTime<e},xN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var CN=xN;function xN(e,t){this.expirationTime=e,this.token=t}PN.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var MN=PN;function PN(e){this.determiners=e}kN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Ce.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};sp=kN;function kN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Ne(LN,UN=sp),LN.prototype.supports=function(e){return w0.isRemoteConfigEvent(e)},LN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var UN,DN=LN;function LN(e,t){return void 0===t&&(t=Le.instance),UN.call(this,e,t)||this}Ne(VN,FN=sp),VN.prototype.supports=function(e){return w0.isExposureEvent(e)},VN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var FN,jN=VN;function VN(e,t){return void 0===t&&(t=Le.instance),FN.call(this,e,t)||this}HN.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},HN.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")};var zN=HN;function HN(){}BN.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},BN.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var GN=BN;function BN(e){this.invocator=e}var KN=s.log,JN=(YN.prototype.onPageStarted=function(e,t){this.track(e,t)},YN.prototype.onPageEnded=function(e,t){},YN.prototype.track=function(e,t){KN.debug("tracking page view");var r,e={key:YN.PAGE_VIEW_EVENT_KEY,properties:((r={})[YN.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},YN.PAGE_VIEW_EVENT_KEY="$page_view",YN.PAGE_NAME_PROPERTY_KEY="$page_name",YN);function YN(e,t){this.core=e,this.userManager=t}Object.defineProperty($N.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:Io.createWithCurrentPage()},enumerable:!1,configurable:!0}),$N.prototype.updatePage=function(e,t){var r=this._currentPage;r&&e.isEquals(r)||(r&&this.publishEnd(r,t),this._currentPage=e,this.publishStart(e,t))},$N.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},$N.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},$N.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=Io.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},$N.prototype.addListener=function(e){this.listeners.push(e)};var qN=$N;function $N(){this.listeners=[],this._currentPage=null}var WN=s.log,XN=(Object.defineProperty(ZN.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),ZN.prototype.startEngagement=function(e){WN.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},ZN.prototype.endEngagement=function(e,t){var r;a.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},this.userManager.resolve(),t))},ZN.prototype.publish=function(e,t,r){WN.debug("onEngagement timestamp:".concat(r,", page:").concat(this.pageManager.currentPage.url));for(var n=0,i=this.listeners;n<i.length;n++)i[n].onEngagement(e,t,r)},ZN.prototype.onPageStarted=function(e,t){this.startEngagement(t)},ZN.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},ZN.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"focus":return this.startEngagement(t);case"pagehide":case"hidden":case"blur":return this.endEngagement(this.pageManager.currentPage,t);case"pageshow":case"locationChange":return}},ZN.prototype.addListener=function(e){this.listeners.push(e)},ZN);function ZN(e,t,r){this.userManager=e,this.pageManager=t,this.minimumEngagementDurationMillis=r,this.listeners=[],this._lastEngagementTime=null}eR.prototype.onEngagement=function(e,t,r){var n,e={key:eR.ENGAGEMENT_EVENT_KEY,properties:((n={})[JN.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,n[eR.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,n)};this.core.track(e,t,r)},eR.ENGAGEMENT_EVENT_KEY="$engagement",eR.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var QN=eR;function eR(e){this.core=e}var tR=s.log,rR=null;function nR(e,t){var r,t=cO.config(t);cO.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp,s=(new rN).getInvocator(o.getInvocationType(),new zN);if(null===s)throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));if(s=new GN(s),s=new Go(s),!o.getAppMode)return s;if((o=o.getAppMode().toLowerCase())===zo.native)return s;if(o!==zo.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(o));return o=iR(n,i),(n=new Ko(o,s)).syncUser(),n}}catch(e){tR.error("Unexpected exception while check WebApp client: ".concat(e))}return iR(e,t)}function iR(e,t){var r=cO.sdk(e,t);if(rR)return tR.debug("use already exists hackleClient"),rR;var n=new Do,i=(n.initialize(),new oI),o=ko.getInstance({days:yn,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=cO.isBeaconSupported(),a=KO.intercept(r,YO.create()),u=KO.intercept(r,$O.create()),c=a,l=(s&&(c=u),new pO),p=new hO(l,new vO("setTimeout"),cO.pollingIntervalMillis(t)),f=new bN(r,aI.postfix(i,"_".concat(e.slice(0,8)))),h=new _O(hI.clientFetch(t.sdkUrl,r.key),a),f=new SO(f,h),h=(l.add(f),new qN),d=new AO(hI.userCohorts(t.sdkUrl),a),v=new qA(h),y=new Z_(aI.postfix(o,"_".concat(e))),g=y.getUser(),m=t.user||null,y=new W_(Fo(),y,d,v,h,Le.instance,g,m),d=(l.add(y),new nI(t.sessionTimeoutMillis,aI.postfix(o,"_".concat(e.slice(8))))),m=(y.addListener(d),new F_(i,"".concat(En,"_").concat(e),hn)),l=new PO(hI.clientDispatch(t.eventUrl),a),E=l,s=(s&&(E=new PO(hI.beaconDispatch(t.eventUrl,r.key),u)),new UO(m,l)),r=new xO(l,E,s),u=new MN([new DN(cO.dedupIntervalMillis(t)),new jN(cO.dedupIntervalMillis(t))]),m=new zO(r,hn,new vO("setTimeout"),vn),l=new P0(m,u,d,y),w=new EN,E=new sb(new cI(o,"".concat(An,"_").concat(e.slice(0,8)))),r=new sb(new cI(o,"".concat(On,"_").concat(e.slice(0,8)))),u=new vI(aI.prefix(i,"".concat(Nn,"_").concat(e.slice(0,8),"_"))),i=new uA(aI.prefix(i,"".concat(Rn,"_").concat(e.slice(0,8),"_"))),b=R_.create(f,l,[E,r],u),e=new VA(new HA(aI.postfix(o,"_".concat(e.slice(0,8)))),v,b,y),T=new x0(y,b),T=(d.addListener(e),d.addListener(T),new UI(b)),u=new gI([new EI,new bI(new RA),new _I(new RA),new AI(u,Le.instance),new NI(new CA),new SI(new CA),new xI(new MA),new PI(new MA)]),u=new lA([new fA(i),new yA(u),new dA]),T=new mA(Le.instance,T,u),u=new TA([new IA,new OA(T)]),_=new qI(hI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),_=new LI(JI.create(_),T,u),T=new wA(new WI(y_.get("targetMatcher")),new eA(i)),u=new HI(f,T,b),i=(new jI(m,u,_),new sO(f)),T=(new iO(m,i),new XN(y,h,Pn)),u=(h.addListener(T),new QN(b)),_=(T.addListener(u),new JN(b,y)),m=(t.automaticPageTracking&&h.addListener(_),new cN(y_.get("targetMatcher"))),i=new gN(o,Sn,{days:Cn}),u=new aN(f,m,i,b),o=new hN(new vN(v),new kA,i,w),f=new iN(u,o,y,b),m=(h.addListener(f),new pI(b,y,E,r)),u=(null==(v=t.devTool)?void 0:v.userExplorer)&&"function"==typeof(null==(i=t.devTool)?void 0:i.userExplorer),o=t.devTool&&u?{manager:t.devTool,userExplorer:m}:void 0,f=new Si(hI.monitoring(t.monitoringUrl),a,c,new vO("setTimeout"),dn),I=(di.addRegistry(f),new IN),E=(I.addListener(h),I.addListener(T),I.addListener(d),I.addListener(n),I.addListener(s),I.addListener(l),I.addListener(f),p.start(),ON.create(Mn,1)),A=new No(b,p,d,y,E,_,o),r=(rR=A,(new M_).install(b,y),y.resolve().hackleProperties.browserName);return I.install("string"==typeof r?r:null),v=Date.now(),i=y.currentUser,u=d.currentSessionId,(V_(g,i)?d.startNewSessionIfNeeded(i,v):d.startNewSession(g,i,v))===u&&e.startNewCampaignIfNeeded(i,v),A.onReady(function(){t.autoOpenDevTool&&(t.devTool?A.showUserExplorer():tR.error("DevTool is not provided")),I.initialize(),w.dispatchDoneEventIfNeeded()}),A}var oR=function(e,t){return(oR=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 sR=function(){return(sR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function aR(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}uR.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},uR.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},uR.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};wa=uR;function uR(){this.listeners={}}lR.arePropertiesEqual=function(e,t){var r=lR.coerceUnknownToProperties(e),n=lR.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]})},lR.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var cR=lR;function lR(){}fR.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)&&cR.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&cR.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var pR=fR;function fR(){}var hR=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=nR(e,sR(sR({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.34.2"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return oR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(sR(sR({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){pR.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i.prototype.fetch=function(){return this.client.fetch()},i}(wa);var U={exports:{}},w={},dR=Object.getOwnPropertySymbols,vR=Object.prototype.hasOwnProperty,yR=Object.prototype.propertyIsEnumerable;var ma=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))vR.call(r,o)&&(n[o]=r[o]);if(dR)for(var s=dR(r),a=0;a<s.length;a++)yR.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},gR=ma,I="function"==typeof Symbol&&Symbol.for,mR=I?Symbol.for("react.element"):60103,ER=I?Symbol.for("react.portal"):60106,i=I?Symbol.for("react.fragment"):60107,Ep=I?Symbol.for("react.strict_mode"):60108,g=I?Symbol.for("react.profiler"):60114,wR=I?Symbol.for("react.provider"):60109,bR=I?Symbol.for("react.context"):60110,TR=I?Symbol.for("react.forward_ref"):60112,x=I?Symbol.for("react.suspense"):60113,_R=I?Symbol.for("react.memo"):60115,IR=I?Symbol.for("react.lazy"):60116,AR="function"==typeof Symbol&&Symbol.iterator;function OR(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 NR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RR={};function SR(e,t,r){this.props=e,this.context=t,this.refs=RR,this.updater=r||NR}function CR(){}function xR(e,t,r){this.props=e,this.context=t,this.refs=RR,this.updater=r||NR}SR.prototype.isReactComponent={},SR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(OR(85));this.updater.enqueueSetState(this,e,t,"setState")},SR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},CR.prototype=SR.prototype;var ua=xR.prototype=new CR,MR=(ua.constructor=xR,gR(ua,SR.prototype),ua.isPureReactComponent=!0,{current:null}),PR=Object.prototype.hasOwnProperty,kR={key:!0,ref:!0,__self:!0,__source:!0};function UR(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)PR.call(t,n)&&!kR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:mR,type:e,key:o,ref:s,props:i,_owner:MR.current}}function DR(e){return"object"==typeof e&&null!==e&&e.$$typeof===mR}var LR=/\/+/g,FR=[];function jR(e,t,r,n){var i;return FR.length?((i=FR.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function VR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,FR.length<10&&FR.push(e)}function zR(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case mR:case ER:o=!0}}if(o)return n(i,t,""===r?"."+HR(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+HR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=AR&&t[AR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+HR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(OR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function HR(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 GR(e,t){e.func.call(e.context,t,e.count++)}function BR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?KR(e,n,r,function(e){return e}):null!=e&&(DR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(LR,"$&/")+"/")+r,e={$$typeof:mR,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function KR(e,t,r,n,i){var o="";zR(e,BR,t=jR(t,o=null!=r?(""+r).replace(LR,"$&/")+"/":o,n,i)),VR(t)}var JR={current:null};function YR(){var e=JR.current;if(null===e)throw Error(OR(321));return e}var qR,$R,WR,o={ReactCurrentDispatcher:JR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:MR,IsSomeRendererActing:{current:!1},assign:gR},A=(w.Children={map:function(e,t,r){if(null==e)return e;var n=[];return KR(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;zR(e,GR,t=jR(null,null,t,r)),VR(t)},count:function(e){return zR(e,function(){return null},null)},toArray:function(e){var t=[];return KR(e,t,null,function(e){return e}),t},only:function(e){if(DR(e))return e;throw Error(OR(143))}},w.Component=SR,w.Fragment=i,w.Profiler=g,w.PureComponent=xR,w.StrictMode=Ep,w.Suspense=x,w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o,w.cloneElement=function(e,t,r){if(null==e)throw Error(OR(267,e));var n=gR({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=MR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)PR.call(t,a)&&!kR.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:mR,type:e.type,key:i,ref:o,props:n,_owner:s}},w.createContext=function(e,t){return(e={$$typeof:bR,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:wR,_context:e},e.Consumer=e},w.createElement=UR,w.createFactory=function(e){var t=UR.bind(null,e);return t.type=e,t},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:TR,render:e}},w.isValidElement=DR,w.lazy=function(e){return{$$typeof:IR,_ctor:e,_status:-1,_result:null}},w.memo=function(e,t){return{$$typeof:_R,type:e,compare:void 0===t?null:t}},w.useCallback=function(e,t){return YR().useCallback(e,t)},w.useContext=function(e,t){return YR().useContext(e,t)},w.useDebugValue=function(){},w.useEffect=function(e,t){return YR().useEffect(e,t)},w.useImperativeHandle=function(e,t,r){return YR().useImperativeHandle(e,t,r)},w.useLayoutEffect=function(e,t){return YR().useLayoutEffect(e,t)},w.useMemo=function(e,t){return YR().useMemo(e,t)},w.useReducer=function(e,t,r){return YR().useReducer(e,t,r)},w.useRef=function(e){return YR().useRef(e)},w.useState=function(e){return YR().useState(e)},w.version="16.14.0",{}),xc=Function.call.bind(Object.prototype.hasOwnProperty),XR=function(){};function ZR(e,t,r,n,i){if("production"!==production)for(var o in e)if(WR(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,qR)}catch(e){s=e}!s||s instanceof Error||XR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in $R)&&($R[s.message]=!0,o=i?i():"",XR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(qR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",$R={},WR=xc,XR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),ZR.resetWarningCache=function(){"production"!==production&&($R={})},"production"!==production){var QR=ma,eS=ZR,_="function"==typeof Symbol&&Symbol.for,tS=_?Symbol.for("react.element"):60103,rS=_?Symbol.for("react.portal"):60106,nS=_?Symbol.for("react.fragment"):60107,iS=_?Symbol.for("react.strict_mode"):60108,oS=_?Symbol.for("react.profiler"):60114,sS=_?Symbol.for("react.provider"):60109,aS=_?Symbol.for("react.context"):60110,uS=_?Symbol.for("react.concurrent_mode"):60111,cS=_?Symbol.for("react.forward_ref"):60112,lS=_?Symbol.for("react.suspense"):60113,pS=_?Symbol.for("react.suspense_list"):60120,fS=_?Symbol.for("react.memo"):60115,hS=_?Symbol.for("react.lazy"):60116,dS=_?Symbol.for("react.block"):60121,vS=_?Symbol.for("react.fundamental"):60117,yS=_?Symbol.for("react.responder"):60118,gS=_?Symbol.for("react.scope"):60119,mS="function"==typeof Symbol&&Symbol.iterator,ES="@@iterator";function wS(e){if(null===e||"object"!=typeof e)return null;e=mS&&e[mS]||e[ES];return"function"==typeof e?e:null}var bS={current:null},TS={current:null},_S=/^(.*)[\\\/]/,IS=1;function AS(e){if(null==e)return null;if("number"==typeof e.tag&&xS("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 nS:return"Fragment";case rS:return"Portal";case oS:return"Profiler";case iS:return"StrictMode";case lS:return"Suspense";case pS:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case aS:return"Context.Consumer";case sS:return"Context.Provider";case cS:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case fS:return AS(e.type);case dS:return AS(e.render);case hS:r=(t=e)._status===IS?t._result:null;if(r)return AS(r)}var t,r;return null}var OS={},NS=null;function RS(e){NS=e}OS.getCurrentStack=null,OS.getStackAddendum=function(){var e,t,r,n,i,o="",s=(NS&&(e=AS(NS.type),r=NS._owner,o+=(e=e,t=NS._source,r=r&&AS(r.type),i="",t?(n=(s=t.fileName).replace(_S,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(_S))&&(s=s[1])?s.replace(_S,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),OS.getCurrentStack);return s&&(o+=s()||""),o};var SS={ReactCurrentDispatcher:bS,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:TS,IsSomeRendererActing:{current:!1},assign:QR};function CS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];MS("warn",e,r)}function xS(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];MS("error",e,r)}function MS(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=SS.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}QR(SS,{ReactDebugCurrentFrame:OS,ReactComponentTreeHook:{}});var PS={};function kS(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;PS[r]||(xS("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),PS[r]=!0)}var US={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){kS(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){kS(e,"replaceState")},enqueueSetState:function(e,t,r,n){kS(e,"setState")}},DS={};function LS(e,t,r){this.props=e,this.context=t,this.refs=DS,this.updater=r||US}Object.freeze(DS),LS.prototype.isReactComponent={},LS.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")},LS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var FS,jS={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(FS in jS)jS.hasOwnProperty(FS)&&!function(e,t){Object.defineProperty(LS.prototype,e,{get:function(){CS("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(FS,jS[FS]);function VS(){}function zS(e,t,r){this.props=e,this.context=t,this.refs=DS,this.updater=r||US}VS.prototype=LS.prototype,(_=zS.prototype=new VS).constructor=zS,QR(_,LS.prototype),_.isPureReactComponent=!0;var HS,GS,BS=Object.prototype.hasOwnProperty,KS={key:!0,ref:!0,__self:!0,__source:!0};function JS(e){if(BS.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function YS(e){if(BS.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var qS={},$S=function(e,t,r,n,i,o,s){e={$$typeof:tS,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function WS(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in JS(t)&&(s=t.ref,"string"==typeof(c=t).ref&&TS.current&&c.__self&&TS.current.stateNode!==c.__self&&(p=AS(TS.current.type),qS[p]||(xS('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',AS(TS.current.type),c.ref),qS[p]=!0))),YS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)BS.call(t,n)&&!KS.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,h=arguments.length-2;if(1==h)i.children=r;else if(1<h){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function g(){GS||(GS=!0,xS("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function m(){HS||(HS=!0,xS("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,m.isReactWarning=!0,Object.defineProperty(p,"key",{get:m,configurable:!0})),s&&(r=i,l=c,g.isReactWarning=!0,Object.defineProperty(r,"ref",{get:g,configurable:!0}))),$S(e,o,s,a,u,TS.current,i)}function XS(e){return"object"==typeof e&&null!==e&&e.$$typeof===tS}var ZS=".",QS=":",eC=!1,tC=/\/+/g;function rC(e){return(""+e).replace(tC,"$&/")}var nC=10,iC=[];function oC(e,t,r,n){var i;return iC.length?((i=iC.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function sC(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,iC.length<nC&&iC.push(e)}function aC(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case tS:case rS:a=!0}}if(a)return n(i,t,""===r?ZS+uC(t,0):r),1;var u=0,c=""===r?ZS:r+QS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+uC(o,l),n,i);else if("function"==typeof(r=wS(t))){r===t.entries&&(eC||CS("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."),eC=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+uC(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+OS.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 uC(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 cC(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function lC(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?pC(o,n,r,function(e){return e}):null!=o&&(XS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":rC(o.key)+"/")+r,o=$S(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function pC(e,t,r,n,i){var o="",t=oC(t,o=null!=r?rC(r)+"/":o,n,i);aC(e,lC,t),sC(t)}function fC(e){return"string"==typeof e||"function"==typeof e||e===nS||e===uS||e===oS||e===iS||e===lS||e===pS||"object"==typeof e&&null!==e&&(e.$$typeof===hS||e.$$typeof===fS||e.$$typeof===sS||e.$$typeof===aS||e.$$typeof===cS||e.$$typeof===vS||e.$$typeof===yS||e.$$typeof===gS||e.$$typeof===dS)}function hC(){var e=bS.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 dC(){if(TS.current){var e=AS(TS.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var vC=!1,yC={};function gC(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=dC())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),yC[t=r]||(yC[t]=!0,r="",e&&e._owner&&e._owner!==TS.current&&(r=" It was passed a child from "+AS(e._owner.type)+"."),RS(e),xS('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),RS(null)))}function mC(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];XS(n)&&gC(n,t)}else if(XS(e))e._store&&(e._store.validated=!0);else if(e){var i=wS(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)XS(o.value)&&gC(o.value,t)}}function EC(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=AS(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==cS&&t.$$typeof!==fS)return;r=t.propTypes}r?(RS(e),eS(r,e.props,"prop",n,OS.getStackAddendum),RS(null)):void 0===t.PropTypes||vC||(vC=!0,xS("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||xS("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function wC(e,t,r){var n,i=fC(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||dC(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===tS?(s="<"+(AS(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,xS("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)),WS.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)mC(arguments[o],e);if(e===nS){var s=t;RS(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){xS("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&xS("Invalid attribute `ref` supplied to `React.Fragment`."),RS(null)}else EC(t);return t}var bC=!1;try{var TC=Object.freeze({}),_C=new Map([[TC,null]]),IC=new Set([TC]);_C.set(0,0),IC.add(0)}catch(e){}function AC(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=QR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in JS(t)&&(a=t.ref,l=TS.current),YS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)BS.call(t,n)&&!KS.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return $S(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)mC(arguments[i],n.type);return EC(n),n}function OC(e){var t=wC.bind(null,e);return t.type=e,bC||(bC=!0,CS("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 CS("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}_=wC,A.Children={map:function(e,t,r){if(null==e)return e;var n=[];return pC(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=oC(null,null,t,r),aC(e,cC,t),sC(t)},count:function(e){return aC(e,function(){return null},null)},toArray:function(e){var t=[];return pC(e,t,null,function(e){return e}),t},only:function(e){if(XS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},A.Component=LS,A.Fragment=nS,A.Profiler=oS,A.PureComponent=zS,A.StrictMode=iS,A.Suspense=lS,A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SS,A.cloneElement=AC,A.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&xS("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:aS,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:sS,_context:r}),i=!1,t={$$typeof:aS,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,xS("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,xS("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},A.createElement=_,A.createFactory=OC,A.createRef=function(){var e={current:null};return Object.seal(e),e},A.forwardRef=function(e){return null!=e&&e.$$typeof===fS?xS("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?xS("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&xS("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||xS("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:cS,render:e}},A.isValidElement=XS,A.lazy=function(e){var t,r,n={$$typeof:hS,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){xS("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){xS("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},A.memo=function(e,t){return fC(e)||xS("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:fS,type:e,compare:void 0===t?null:t}},A.useCallback=function(e,t){return hC().useCallback(e,t)},A.useContext=function(e,t){var r,n=hC();return void 0!==t&&xS("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?xS("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&&xS("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},A.useDebugValue=function(e,t){return hC().useDebugValue(e,t)},A.useEffect=function(e,t){return hC().useEffect(e,t)},A.useImperativeHandle=function(e,t,r){return hC().useImperativeHandle(e,t,r)},A.useLayoutEffect=function(e,t){return hC().useLayoutEffect(e,t)},A.useMemo=function(e,t){return hC().useMemo(e,t)},A.useReducer=function(e,t,r){return hC().useReducer(e,t,r)},A.useRef=function(e){return hC().useRef(e)},A.useState=function(e){return hC().useState(e)},A.version="16.14.0"}"production"===production?U.exports=w:U.exports=A;var NC=U.exports,RC=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),uu=RC.Consumer,SC=RC.Provider;var CC=s.log;function xC(e,t){e=MC(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function MC(e,t){void 0===t&&(t="A");var r=U.exports.useContext(RC),n=r.hackle,i=r.userVersion,o=r.initialized,s=U.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||We.of(t,h.EXCEPTION):We.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=aR(U.exports.useState(function(){return n?s():(CC.error("HackleClient is not existed"),We.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=aR(U.exports.useState(i),2),c=u[0],u=u[1];return UC(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function PC(e){e=kC(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function kC(e){var t=U.exports.useContext(RC),r=t.hackle,n=t.userVersion,i=t.initialized,o=U.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ze.off(h.EXCEPTION):Ze.off(h.SDK_NOT_READY)},[e,r,i]),t=aR(U.exports.useState(function(){return r?o():(CC.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=aR(U.exports.useState(n),2),u=a[0],a=a[1];return UC(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function UC(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function DC(e){var t,r=e.experimentKey,e=e.children,n=(r=xC(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:i}):null)}function LC(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function FC(e){var t=(r=PC(e.featureKey)).isLoading,r=r.isOn;return t?null:NC.createElement(NC.Fragment,null,e.children(r))}n.Bucket=ut,n.Cohort=nn,n.Container=kt,n.ContainerGroup=Dt,n.CoreVersion=Jt,n.Decision=We,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=it,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=je,n.EventType=ft,n.Experiment=ot,n.FeatureFlagDecision=Ze,n.HackleContext=RC,n.HackleContextConsumer=uu,n.HackleContextProvider=SC,n.HackleExperiment=DC,n.HackleFeature=FC,n.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=aR(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return sR(sR({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return sR(sR({},e),{initialized:!0})})},function(){a(function(e){return sR(sR({},e),{initialized:!0})})}).catch(function(){a(function(e){return sR(sR({},e),{initialized:!0})})})},[t]),i||s.initialized?NC.createElement(SC,{value:s},e):null},n.HackleVariation=LC,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=pr,n.IAM_BEHAVIOR=lr,n.IAM_DISPLAY_TYPE=ar,n.IAM_HORIZONTAL_ALIGNMENT=hr,n.IAM_LAYOUT_TYPE=ur,n.IAM_ORIENTATION=cr,n.IAM_PLATFORM_TYPE=or,n.IAM_STATUS=ir,n.IAM_TIMEUNIT=sr,n.IAM_VERTICAL_ALIGNMENT=fr,n.IdentifierType=dt,n.IdentifiersBuilder=gt,n.InAppMessage=dr,n.InAppMessageAction=tn,n.InAppMessageAlignment=Vr,n.InAppMessageBackground=en,n.InAppMessageButton=$r,n.InAppMessageButtonStyle=Qr,n.InAppMessageContext=Pr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Dr,n.InAppMessageDecision=qe,n.InAppMessageDurationCap=Nr,n.InAppMessageEventFrequencyCap=_r,n.InAppMessageEventTrigger=wr,n.InAppMessageEventTriggerRule=br,n.InAppMessageExperimentContext=Ur,n.InAppMessageIdentifierCap=Ar,n.InAppMessageImage=Hr,n.InAppMessagePeriodAlways=yr,n.InAppMessagePeriodCustom=mr,n.InAppMessagePositionalButton=Xr,n.InAppMessageTargetContext=Sr,n.InAppMessageText=Br,n.InAppMessageTextAttribute=Jr,n.InAppMessageTextStyle=qr,n.InAppMessageUserOverride=xr,n.Logger=s,n.MATCH_OPERATORS=Zt,n.MATCH_TYPES=Wt,n.MATCH_VALUE_TYPES=Xt,n.MetaVersion=qt,n.ParameterConfiguration=rt,n.PropertyOperations=wo,n.PropertyOperationsBuilder=mo,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Ft,n.RemoteConfigParameterValue=Ht,n.RemoteConfigTargetRule=Vt,n.SEGMENT_TYPES=tr,n.Segment=Mt,n.Slot=lt,n.SplitUrlConfig=on,n.SplitUrlTargets=an,n.TARGET_ACTION_TYPES=Qt,n.TARGET_KEY_TYPES=er,n.Target=wt,n.TargetAction=Rt,n.TargetCondition=Tt,n.TargetKey=It,n.TargetMatch=Ot,n.TargetRule=Ct,n.TargetingType=rr,n.Variation=at,n.Version=Bt,n.createInstance=function(e,t){return new hR(e,t)},n.getUserId=Fo,n.removeUserId=jo,n.resolveIdentifiers=yt,n.sanitizeUser=Et,n.setUserId=function(e){ko.getInstance().setItem(mn,e)},n.useFeature=function(e){var t=(n=U.exports.useContext(RC)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=aR(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&CC.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=aR(U.exports.useState(r),2))[0],n=n[1];return UC(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(RC)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(h.EXCEPTION)},[e,t,n]),o=(s=aR(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&CC.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=aR(U.exports.useState(r),2))[0],n=n[1];return UC(a,r)||(n(r),s(i())),o},n.useLoadableFeature=PC,n.useLoadableFeatureDetail=kC,n.useLoadableRemoteConfig=function(){var e=(o=U.exports.useContext(RC)).hackle,t=o.userVersion,r=o.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=aR(U.exports.useState(function(){return e||CC.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=aR(U.exports.useState(t),2))[0],a=a[1];return UC(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=xC,n.useLoadableVariationDetail=MC,n.useRemoteConfig=function(){var e=(r=U.exports.useContext(RC)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=aR(U.exports.useState(function(){return e||CC.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=aR(U.exports.useState(t),2))[0],r=r[1];return UC(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=U.exports.useContext(RC).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(CC.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(RC)).hackle,n=a.userVersion,i=a.initialized,o=U.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=aR(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&CC.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=aR(U.exports.useState(n),2))[0],c=c[1];return UC(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=U.exports.useContext(RC)).hackle,n=i.userVersion,i=i.initialized,o=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||We.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=aR(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&CC.error("HackleClient is not existed"),We.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=aR(U.exports.useState(n),2))[0],i=i[1];return UC(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});
|