@letscooee/web-sdk 0.0.9 → 0.0.12

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see sdk-preview.min.js.LICENSE.txt */
2
- !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),r=u.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",r=0;r<24;)e+=String.fromCharCode(c[t.charCodeAt(r++)]<<4|c[t.charCodeAt(r++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=r=(r+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,n>>8&255,255&n,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,r){var n;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",g="console",v="mobile",y="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var r,n,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(r=n=0;r<h.length&&!u;)if(u=h[r++].exec(t))for(i=0;i<f.length;i++)l=u[++n],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var r in e)if(typeof e[r]===c&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(E.has(e[r][n],t))return"?"===r?o:r}else if(E.has(e[r],t))return"?"===r?o:r;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,y]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,y]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,y]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,y]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,y]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,y]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,y]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,y]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,y]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,y]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,y]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,y]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,y]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,y]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,y]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,y]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,y]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,y]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,y]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,y]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,y]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,y]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,y]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,y]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,y]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,y]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,y]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,y]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,g]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,g]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,g]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,y]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var r=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,r,n.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,r,n.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(t){return r=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(r),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:g,MOBILE:v,SMARTTV:w,TABLET:y,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(n=function(){return I}.call(e,r,e,t))===o||(t.exports=n);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var r in e)x.ua[r]=e[r]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.9"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var n={};!function(){"use strict";r.d(n,{default:function(){return re}});var t=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=r(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER="at",t.STORAGE_ACTIVE_TRIGGERS="ats",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),e=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},i=function(){function r(){}return r.log=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.log.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.error=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.error.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.warning=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.warn.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let r=1;8===(t=t.replace(/^#/,"")).length&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const n=Number.parseInt(t,16),i=n>>16,o=n>>8&255,c=255&n,u="number"==typeof e.alpha?e.alpha:r;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var d,b,g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v=function(t){function e(e){return t.call(this,e)||this}return g(e,t),e}(f),y=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),w=function(t){function e(e){var r=t.call(this,e)||this;return r.src=e.src,r}return y(e,t),e}(f),m=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(t){function e(e){var r=t.call(this,e)||this;return r.alg=d.START,r.prs=e.prs,r.alg=e.alg,e.f&&(r.f=e.f),e.c&&(r.c=new u(e.c)),r}return m(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(f);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(d||(d={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var E,T=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_=function(t){function e(e){var r,n=t.call(this,e)||this;return n.o=null!==(r=e.o)&&void 0!==r?r:E.C,n}return T(e,t),e.prototype.getStyles=function(){var t;return(t=this.o===E.NW?{top:0,left:0}:this.o===E.N?{top:0,left:"50%",transform:"translateX(-50%)"}:this.o===E.NE?{top:0,right:0}:this.o===E.E?{top:"50%",right:0,transform:"translateY(-50%)"}:this.o===E.SE?{bottom:0,right:0}:this.o===E.S?{bottom:0,left:"50%",transform:"translateX(-50%)"}:this.o===E.SW?{bottom:0,left:0}:this.o===E.W?{top:"50%",left:0,transform:"translateY(-50%)"}:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}).position="absolute",t.overflow="hidden",t},e}(f);!function(t){t[t.NW=1]="NW",t[t.N=2]="N",t[t.NE=3]="NE",t[t.W=4]="W",t[t.C=5]="C",t[t.E=6]="E",t[t.SW=7]="SW",t[t.S=8]="S",t[t.SE=9]="SE"}(E||(E={}));var A=function(t){var e=this;this.elems=[],this.cont=new _(t.cont),t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new w(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new S(t)):t.t===p.SHAPE&&e.elems.push(new v(t))}))},I=function(t){this.expireAt=(new Date).getTime(),this.id=t.id,this.expireAt=t.expireAt,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new A(t.ian)},x=function(){function t(){}return t.getString=function(e,r){return t.LOCAL_STORAGE.getItem(e)||r},t.setString=function(e,r){r||(r=""),t.LOCAL_STORAGE.setItem(e,r)},t.getNumber=function(e,r){return+t.getString(e,"")||r},t.setNumber=function(e,r){t.setString(e,r.toString())},t.getBoolean=function(t,e){var r=this.LOCAL_STORAGE.getItem(t);return r?JSON.parse(r):e},t.setBoolean=function(e,r){t.setString(e,JSON.stringify(r))},t.getObject=function(e){try{return JSON.parse(t.getString(e,""))}catch(t){return null}},t.setObject=function(e,r){t.setString(e,JSON.stringify(r))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),O=function(){function t(){this.doc=document}return t.get=function(){return t._instance||(t._instance=new t),t._instance},t.prototype.getWidth=function(){return this.parentContainer?this.parentContainer.clientWidth:document.documentElement.clientWidth},t.prototype.getHeight=function(){return this.parentContainer?this.parentContainer.clientHeight:document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,r){e&&(r?t.style.setProperty(e,r,"important"):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,r){t.setAttribute(e,r)},t.prototype.setParentContainer=function(t){this.parentContainer=t},t}(),k=r(489),N=r.n(k),C=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,x.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),D=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!x.getString(t.STORAGE_SESSION_ID,""))return!0;var e=x.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(x.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(N())).toHexString(),x.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),x.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=x.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,x.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(C.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var e={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Bt.getInstance().concludeSession(e),x.remove(t.STORAGE_ACTIVE_TRIGGER),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,x.remove(t.STORAGE_SESSION_ID),x.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(x.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=x.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=x.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return x.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),R=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},P=function(){function t(t){this.triggerID=t.id,this.engagementID=t.engagementID,this.expireAt=t.expireAt,this.isExpired&&(this.expired=this.isExpired)}return Object.defineProperty(t.prototype,"isExpired",{get:function(){return this.expireAt<(new Date).getTime()},enumerable:!1,configurable:!0}),t}(),M=function(){function e(){}return e.storeActiveTrigger=function(e){if("test"!==e.id){var r=x.getObject(t.STORAGE_ACTIVE_TRIGGERS);r||(r=[]);var n=new P(e);n.isExpired||r.push(n),x.setObject(t.STORAGE_ACTIVE_TRIGGER,n),x.setObject(t.STORAGE_ACTIVE_TRIGGERS,r)}},e.getActiveTriggers=function(){var e=x.getObject(t.STORAGE_ACTIVE_TRIGGERS);return e?(e.forEach((function(t,e,r){new P(t).isExpired&&r.splice(e,1)})),x.setObject(t.STORAGE_ACTIVE_TRIGGERS,e),e):[]},e}(),L=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},G=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(){function e(){this.runtimeData=C.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,r,n,i){return L(this,void 0,void 0,(function(){var o,s;return G(this,(function(a){switch(a.label){case 0:return r.startsWith("http")||(r=t.API_URL+r),!("keepalive"in new Request(""))&&JSON.stringify(n).includes("CE App Background")?((o=new XMLHttpRequest).open("POST",r,!1),i.forEach((function(t,e){o.setRequestHeader(e,t)})),o.send(JSON.stringify(n)),[2,o.response.json()]):[4,fetch(r,{method:e,body:JSON.stringify(n),headers:i,keepalive:!0})];case 1:if(!(s=a.sent()).ok)throw s;return[2,s.json()]}}))}))},e.prototype.registerDevice=function(t){return L(this,void 0,void 0,(function(){return G(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(e){var r=this.getDefaultHeaders();r.append("x-sdk-token",this.apiToken),e.activeTriggers=M.getActiveTriggers();var n=x.getObject(t.STORAGE_ACTIVE_TRIGGER);n&&(e.trigger=n,"test"===n.triggerID)||this.doHTTP("POST","/v1/event/track",e,r).then((function(t){i.log("Sent",e.name),t.triggerData&&(new ee).render(t.triggerData)})).catch((function(t){i.error("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.log("Updated user profile")})).catch((function(t){i.error("Error saving user profile",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.log("Conclude Session",t)})).catch((function(t){i.error(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),j=function(e,r,n,i){this.appID=e,this.appSecret=r,this.uuid=n,this.props=i,this.sdk=t.SDK},B=r(238),U=r.n(B),F=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},V=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},z=function(){function t(){this.parser=new(U()),this.result={}}return t.prototype.get=function(){return F(this,void 0,void 0,(function(){var t;return V(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,r=t.offsetWidth*e;return document.body.removeChild(t),r},t.prototype.getLocation=function(){return F(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(r){t.result.coords=[r.coords.latitude,r.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return F(this,void 0,void 0,(function(){var t;return V(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),W=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},q=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},K=function(){function e(){this.apiService=H.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!x.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return W(this,void 0,void 0,(function(){return q(this,(function(e){return this.sdkToken=x.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.log("No SDK token found in local storage"),this.userID=x.getString(t.STORAGE_USER_ID,""),this.userID||i.log("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.log("SDK Token:",this.sdkToken),i.log("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return W(this,void 0,void 0,(function(){return q(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.log("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return W(this,void 0,void 0,(function(){var t,e,r,n;return q(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return r=o.sent(),i.log("Register Device Response",r),this.saveUserDataInStorage(r),[3,5];case 4:throw n=o.sent(),i.error(n),n;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),x.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),x.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return W(this,void 0,void 0,(function(){var t;return q(this,(function(e){switch(e.label){case 0:return[4,(new z).get()];case 1:return t=e.sent(),[2,new j(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=x.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(N())).toHexString(),x.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),X=function(t,e){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function $(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function J(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function Z(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function Q(t){return"function"==typeof t}function tt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var et=tt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function rt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var nt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=J(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(Q(c))try{c()}catch(t){i=t instanceof et?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=J(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{st(h)}catch(t){i=null!=i?i:[],t instanceof et?i=Z(Z([],Y(i)),Y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new et(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)st(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(r=this._teardowns)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&rt(e,t)},t.prototype.remove=function(e){var r=this._teardowns;r&&rt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),it=nt.EMPTY;function ot(t){return t instanceof nt||t&&"closed"in t&&Q(t.remove)&&Q(t.add)&&Q(t.unsubscribe)}function st(t){Q(t)?t():t.unsubscribe()}var at=null,ct=null,ut=void 0,lt=!1,pt=!1,ht={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ht.delegate;return((null==r?void 0:r.setTimeout)||setTimeout).apply(void 0,Z([],Y(t)))},clearTimeout:function(t){var e=ht.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ft(t){ht.setTimeout((function(){if(!at)throw t;at(t)}))}function dt(){}var bt=gt("C",void 0,void 0);function gt(t,e,r){return{kind:t,value:e,error:r}}var vt=null;function yt(t){if(lt){var e=!vt;if(e&&(vt={errorThrown:!1,error:null}),t(),e){var r=vt,n=r.errorThrown,i=r.error;if(vt=null,n)throw i}}else t()}function wt(t){lt&&vt&&(vt.errorThrown=!0,vt.error=t)}var mt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,ot(e)&&e.add(r)):r.destination=At,r}return $(e,t),e.create=function(t,e,r){return new St(t,e,r)},e.prototype.next=function(t){this.isStopped?_t(function(t){return gt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?_t(gt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?_t(bt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(nt),St=function(t){function e(e,r,n){var i,o=t.call(this)||this;if(Q(e))i=e;else if(e){var s;i=e.next,r=e.error,n=e.complete,o&&pt?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),r=null==r?void 0:r.bind(s),n=null==n?void 0:n.bind(s)}return o.destination={next:i?Et(i):dt,error:Et(null!=r?r:Tt),complete:n?Et(n):dt},o}return $(e,t),e}(mt);function Et(t,e){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{t.apply(void 0,Z([],Y(e)))}catch(t){lt?wt(t):ft(t)}}}function Tt(t){throw t}function _t(t,e){var r=ct;r&&ht.setTimeout((function(){return r(t,e)}))}var At={closed:!0,next:dt,error:Tt,complete:dt},It="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function Ot(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var kt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof mt||function(t){return t&&Q(t.next)&&Q(t.error)&&Q(t.complete)}(n)&&ot(n)?t:new St(t,e,r);return yt((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Nt(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(t){n(t),null==i||i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[It]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ot(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Nt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Nt(t){var e;return null!==(e=null!=t?t:ut)&&void 0!==e?e:Promise}var Ct,Dt=tt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Rt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return $(e,t),e.prototype.lift=function(t){var e=new Pt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Dt},e.prototype.next=function(t){var e=this;yt((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=J(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;yt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;yt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=e.hasError,n=e.isStopped,i=e.observers;return r||n?it:(i.push(t),new nt((function(){return rt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new kt;return t.source=this,t},e.create=function(t,e){return new Pt(t,e)},e}(kt),Pt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return $(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:it},e}(Rt),Mt={now:function(){return(Mt.delegate||Date).now()},delegate:void 0},Lt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Mt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return $(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},e}(Rt),Gt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},Ht=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},jt=function(){function e(){this.sessionManager=D.getInstance(),this.safeHttpCallService=Bt.getInstance(),this.userAuthService=K.getInstance()}return e.prototype.init=function(t,r){var n=this;this.userAuthService.init(t,r).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){n.init(t,r)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),x.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(x.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!x.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(x.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Gt(this,void 0,void 0,(function(){var t,e;return Ht(this,(function(r){switch(r.label){case 0:return t=new R("CE App Installed",{}),e=t,[4,(new z).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Gt(this,void 0,void 0,(function(){var t,e;return Ht(this,(function(r){switch(r.label){case 0:return t=new R("CE App Launched",{}),e=t,[4,(new z).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Lt(1),e}(),Bt=function(){function t(){this.sessionManager=D.getInstance(),this.httpApiService=H.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;jt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;jt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;jt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(Ct||(Ct={}));var Ut=function(){function e(t){this.action=t,this.apiService=Bt.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new Zt).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===Ct.Location&&this.promptLocationPermission(),t===Ct.Push&&this.promptPushNotificationPermission(),t===Ct.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){var e;if(this.action.close){(new Yt).removeInApp();var r=x.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n=null===(e=x.getObject(t.STORAGE_ACTIVE_TRIGGER))||void 0===e?void 0:e.triggerID,i=((new Date).getTime()-r)/1e3,o={triggerID:n,closeBehaviour:this.action.ext||this.action.up||this.action.kv||this.action.iab||this.action.prompt||this.action.share?"CTA":"Close",duration:i};this.apiService.sendEvent(new R("CE Trigger Closed",o)),x.remove(t.STORAGE_TRIGGER_START_TIME)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.warning("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):i.warning("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,n=function(){var t,e,r;return function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(n){switch(n.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=n.sent(),[4,this.checkPermission("geolocation")];case 2:return e=n.sent(),r=Notification.permission,[2,{camera:t,location:e,notification:r}]}}))},new((r=void 0)||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),Ft=function(){function e(e,r){var n,i,o;this.renderer=O.get(),this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(i=O.get().getWidth(),o=O.get().getHeight(),n=i<o?i/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):o/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),Math.min(n,1)),this.parentHTMLEl=e,this.inappElement=r,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(e){e.stopPropagation(),new Ut(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t=this.inappElement.bg;if(t){var e=this.inappHTMLEl;if(this.inappElement instanceof _&&(e=e.parentElement),t.glossy)this.renderer.setStyle(e,"-webkit-backdrop-filter","blur("+t.glossy.radius+"px)"),this.renderer.setStyle(e,"backdrop-filter","blur("+t.glossy.radius+"px)"),t.glossy.color&&this.processColourBlock(t.glossy.color,"background",e);else if(t.solid)t.solid.grad?this.processGradient(t.solid.grad,"background"):t.solid.hex&&this.renderer.setStyle(e,"background",t.solid.rgba);else if(t.img){if(!t.img.src)return;var r='url("'+t.img.src+'") no-repeat center';this.renderer.setStyle(e,"background",r),this.renderer.setStyle(e,"background-size","cover"),t.img.a&&(this.renderer.setStyle(e,"-webkit-backdrop-filter","opacity("+t.img.a+")"),this.renderer.setStyle(e,"backdrop-filter","opacity("+t.img.a+")"))}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var r="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(r+=", "+t.c3),t.c4&&(r+=", "+t.c4),t.c5&&(r+=", "+t.c5);var n=r+=")";this.renderer.setStyle(this.inappHTMLEl,e,n)}},e.prototype.processColourBlock=function(t,e,r){void 0===e&&(e="color"),void 0===r&&(r=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(r,e,t.rgba))},e}(),Vt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zt=function(t){function e(e,r){return t.call(this,e,r)||this}return Vt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var r,n=[];e.u&&n.push("underline"),e.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",n.join(" ")),this.renderer.setStyle(t,"color",null!==(r=e.c)&&void 0!==r?r:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=d[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(Ft),Wt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return Wt(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var r,n,i=e.renderer.createElement("span");i.innerHTML=null===(n=null===(r=t.txt)||void 0===r?void 0:r.toString())||void 0===n?void 0:n.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(zt),Kt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return Kt(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(Ft),$t=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("img"),n.insertElement(),n}return $t(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(Ft),Yt=function(){function e(t){this.parent=t,this.renderer=O.get(),this.renderer.setParentContainer(t)}return e.prototype.render=function(){this.parent||this.removeInApp();var e=this.renderer.createElement("div");return e.classList.add(t.IN_APP_CONTAINER_NAME),this.parent?this.renderer.setStyle(e,"position","absolute"):this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.appendChild(this.parent||document.body,e),e.addEventListener("click",(function(){new Ut({close:!0}).execute()})),e},e.prototype.removeInApp=function(){var e=document.querySelector("."+t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),Zt=function(){function e(){this.renderer=O.get()}return e.prototype.render=function(e){var r=document.querySelector("."+t.IN_APP_CONTAINER_NAME),n=this.createIFrameContainer();return this.createIFrameElement(n,e),this.createAnchorElement(r,n),this.renderer.appendChild(r,n),n},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var r=this.renderer.createElement("iframe");return this.renderer.setStyle(r,"width","100%"),this.renderer.setStyle(r,"height","100%"),this.renderer.setAttribute(r,"src",e),this.renderer.setAttribute(r,"frameBorder","0"),this.renderer.appendChild(t,r),r},e.prototype.createAnchorElement=function(t,e){var r=this.renderer.createElement("a");return this.renderer.setStyle(r,"position","absolute"),this.renderer.setStyle(r,"top","0px"),this.renderer.setStyle(r,"right","0px"),r.href="#",r.innerHTML="Close",r.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,r),r},e}(),Qt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),te=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n.inappElement.w=1080,n.inappElement.h=1920,n}return Qt(e,t),e.prototype.render=function(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),Object.assign(this.inappHTMLEl.style,this.inappElement.getStyles()),this},e}(Ft),ee=function(){function e(t){this.parent=t,this.rootContainer=new Yt(t).render()}return e.prototype.render=function(e){e=new I(e),this.ian=e.ian;try{this.renderContainer();var r=new R("CE Trigger Displayed",{triggerID:e.id});Bt.getInstance().sendEvent(r),x.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),M.storeActiveTrigger(e)}catch(t){i.error(t)}},e.prototype.renderElement=function(t,e){e instanceof S?new qt(t,e).render():e instanceof w?new Jt(t,e).render():e instanceof v?new Xt(t,e).render():i.error("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,r=this,n=null===(t=this.ian)||void 0===t?void 0:t.cont;if(n){var i=new te(this.rootContainer,n).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){r.renderElement(i,t)}))}},e}(),re=ee}(),CooeePreview=n.default}();
2
+ !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),r=u.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",r=0;r<24;)e+=String.fromCharCode(c[t.charCodeAt(r++)]<<4|c[t.charCodeAt(r++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=r=(r+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,n>>8&255,255&n,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,r){var n;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",g="architecture",b="console",v="mobile",y="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var r,n,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(r=n=0;r<h.length&&!u;)if(u=h[r++].exec(t))for(i=0;i<f.length;i++)l=u[++n],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var r in e)if(typeof e[r]===c&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(E.has(e[r][n],t))return"?"===r?o:r}else if(E.has(e[r],t))return"?"===r?o:r;return t}},_={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","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(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,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+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],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[g,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,y]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,y]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,y]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,y]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,y]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,y]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,y]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,y]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,y]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,y]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,y]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,y]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,y]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,y]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,y]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,y]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,y]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,y]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,y]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,y]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,y]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,y]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,y]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,y]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,y]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,y]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,y]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,y]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,b]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,b]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,b]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,b]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,y]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?: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],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var r=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,r,n.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,r,n.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(t){return r=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(r),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:g},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:b,MOBILE:v,SMARTTV:w,TABLET:y,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(n=function(){return I}.call(e,r,e,t))===o||(t.exports=n);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var r in e)x.ua[r]=e[r]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.12"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var n={};!function(){"use strict";r.d(n,{default:function(){return ie}});var t=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=r(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER="at",t.STORAGE_ACTIVE_TRIGGERS="ats",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),e=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},i=function(){function r(){}return r.log=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.log.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.error=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.error.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.warning=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.warn.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let r=1;8===(t=t.replace(/^#/,"")).length&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const n=Number.parseInt(t,16),i=n>>16,o=n>>8&255,c=255&n,u="number"==typeof e.alpha?e.alpha:r;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=function(){function t(t){(null==t?void 0:t.rot)&&(this.rot=t.rot)}return Object.defineProperty(t.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),t}(),d=function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.trf=new f(t.trf),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}();!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var g,b,v=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),y=function(t){function e(e){return t.call(this,e)||this}return v(e,t),e}(d),w=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(t){function e(e){var r=t.call(this,e)||this;return r.src=e.src,r}return w(e,t),e}(d),S=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),E=function(t){function e(e){var r=t.call(this,e)||this;return r.alg=g.START,r.prs=e.prs,r.alg=e.alg,e.f&&(r.f=e.f),e.c&&(r.c=new u(e.c)),r}return S(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(d);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(g||(g={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var T,_=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(t){function e(e){var r,n=t.call(this,e)||this;return n.o=null!==(r=e.o)&&void 0!==r?r:T.C,n}return _(e,t),e.prototype.getOrigin=function(){return this.o},e}(d);!function(t){t[t.NW=1]="NW",t[t.N=2]="N",t[t.NE=3]="NE",t[t.W=4]="W",t[t.C=5]="C",t[t.E=6]="E",t[t.SW=7]="SW",t[t.S=8]="S",t[t.SE=9]="SE"}(T||(T={}));var I,x=function(){function t(t){var e=this;this.elems=[],this.cont=new A(t.cont),this.gvt=t.gvt,t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new m(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new E(t)):t.t===p.SHAPE&&e.elems.push(new y(t))}))}return t.prototype.getStyles=function(){var t;return(t=this.gvt===I.NW?{top:0,left:0}:this.gvt===I.N?{top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===I.NE?{top:0,right:0}:this.gvt===I.E?{top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===I.SE?{bottom:0,right:0}:this.gvt===I.S?{bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===I.SW?{bottom:0,left:0}:this.gvt===I.W?{top:"50%",left:0,transform:"translateY(-50%)"}:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}).position="absolute",t.overflow="hidden",t},t}();!function(t){t[t.NW=1]="NW",t[t.N=2]="N",t[t.NE=3]="NE",t[t.W=4]="W",t[t.C=5]="C",t[t.E=6]="E",t[t.SW=7]="SW",t[t.S=8]="S",t[t.SE=9]="SE"}(I||(I={}));var O=function(t){this.expireAt=(new Date).getTime(),this.id=t.id,this.expireAt=t.expireAt,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new x(t.ian)},k=function(){function t(){}return t.getString=function(e,r){return t.LOCAL_STORAGE.getItem(e)||r},t.setString=function(e,r){r||(r=""),t.LOCAL_STORAGE.setItem(e,r)},t.getNumber=function(e,r){return+t.getString(e,"")||r},t.setNumber=function(e,r){t.setString(e,r.toString())},t.getBoolean=function(t,e){var r=this.LOCAL_STORAGE.getItem(t);return r?JSON.parse(r):e},t.setBoolean=function(e,r){t.setString(e,JSON.stringify(r))},t.getObject=function(e){try{return JSON.parse(t.getString(e,""))}catch(t){return null}},t.setObject=function(e,r){t.setString(e,JSON.stringify(r))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),N=function(){function t(){this.doc=document}return t.get=function(){return t._instance||(t._instance=new t),t._instance},t.prototype.getWidth=function(){return this.parentContainer?this.parentContainer.clientWidth:document.documentElement.clientWidth},t.prototype.getHeight=function(){return this.parentContainer?this.parentContainer.clientHeight:document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,r){e&&(r?t.style.setProperty(e,r,"important"):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,r){t.setAttribute(e,r)},t.prototype.setParentContainer=function(t){this.parentContainer=t},t}(),C=r(489),D=r.n(C),P=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,k.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),R=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!k.getString(t.STORAGE_SESSION_ID,""))return!0;var e=k.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(k.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(D())).toHexString(),k.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),k.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=k.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,k.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(P.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var e={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Ft.getInstance().concludeSession(e),k.remove(t.STORAGE_ACTIVE_TRIGGER),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,k.remove(t.STORAGE_SESSION_ID),k.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(k.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=k.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=k.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return k.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),M=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},L=function(){function t(t){this.triggerID=t.id,this.engagementID=t.engagementID,this.expireAt=t.expireAt,this.isExpired&&(this.expired=this.isExpired)}return Object.defineProperty(t.prototype,"isExpired",{get:function(){return this.expireAt<(new Date).getTime()},enumerable:!1,configurable:!0}),t}(),H=function(){function e(){}return e.storeActiveTrigger=function(e){if("test"!==e.id){var r=k.getObject(t.STORAGE_ACTIVE_TRIGGERS);r||(r=[]);var n=new L(e);n.isExpired||r.push(n),k.setObject(t.STORAGE_ACTIVE_TRIGGER,n),k.setObject(t.STORAGE_ACTIVE_TRIGGERS,r)}},e.getActiveTriggers=function(){var e=k.getObject(t.STORAGE_ACTIVE_TRIGGERS);return e?(e.forEach((function(t,e,r){new L(t).isExpired&&r.splice(e,1)})),k.setObject(t.STORAGE_ACTIVE_TRIGGERS,e),e):[]},e}(),G=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},j=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},B=function(){function e(){this.runtimeData=P.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,r,n,i){return G(this,void 0,void 0,(function(){var o,s;return j(this,(function(a){switch(a.label){case 0:return r.startsWith("http")||(r=t.API_URL+r),!("keepalive"in new Request(""))&&JSON.stringify(n).includes("CE App Background")?((o=new XMLHttpRequest).open("POST",r,!1),i.forEach((function(t,e){o.setRequestHeader(e,t)})),o.send(JSON.stringify(n)),[2,o.response.json()]):[4,fetch(r,{method:e,body:JSON.stringify(n),headers:i,keepalive:!0})];case 1:if(!(s=a.sent()).ok)throw s;return[2,s.json()]}}))}))},e.prototype.registerDevice=function(t){return G(this,void 0,void 0,(function(){return j(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(e){var r=this.getDefaultHeaders();r.append("x-sdk-token",this.apiToken),e.activeTriggers=H.getActiveTriggers();var n=k.getObject(t.STORAGE_ACTIVE_TRIGGER);n&&(e.trigger=n,"test"===n.triggerID)||this.doHTTP("POST","/v1/event/track",e,r).then((function(t){i.log("Sent",e.name),t.triggerData&&(new ne).render(t.triggerData)})).catch((function(t){i.error("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.log("Updated user profile")})).catch((function(t){i.error("Error saving user profile",t)}))},e.prototype.updateDeviceProps=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/device/update",t,e).then((function(){i.log("Updated device property")})).catch((function(t){i.error("Error saving device property",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.log("Conclude Session",t)})).catch((function(t){i.error(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),U=function(e,r,n,i){this.appID=e,this.appSecret=r,this.uuid=n,this.props=i,this.sdk=t.SDK},F=r(238),V=r.n(F),z=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},W=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},q=function(){function t(){this.parser=new(V()),this.result={}}return t.prototype.get=function(){return z(this,void 0,void 0,(function(){var t;return W(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,r=t.offsetWidth*e;return document.body.removeChild(t),r},t.prototype.getLocation=function(){return z(this,void 0,void 0,(function(){var t=this;return W(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(r){t.result.coords=[r.coords.latitude,r.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return z(this,void 0,void 0,(function(){var t;return W(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),K=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},X=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},$=function(){function e(){this.apiService=B.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!k.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return K(this,void 0,void 0,(function(){return X(this,(function(e){return this.sdkToken=k.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.log("No SDK token found in local storage"),this.userID=k.getString(t.STORAGE_USER_ID,""),this.userID||i.log("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.log("SDK Token:",this.sdkToken),i.log("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return K(this,void 0,void 0,(function(){return X(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.log("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return K(this,void 0,void 0,(function(){var t,e,r,n;return X(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return r=o.sent(),i.log("Register Device Response",r),this.saveUserDataInStorage(r),[3,5];case 4:throw n=o.sent(),i.error(n),n;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),k.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),k.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return K(this,void 0,void 0,(function(){var t;return X(this,(function(e){switch(e.label){case 0:return[4,(new q).get()];case 1:return t=e.sent(),[2,new U(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=k.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(D())).toHexString(),k.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),J=function(t,e){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function Y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Z(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function tt(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function et(t){return"function"==typeof t}function rt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var nt=rt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function it(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var ot=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Z(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(et(c))try{c()}catch(t){i=t instanceof nt?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=Z(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{ct(h)}catch(t){i=null!=i?i:[],t instanceof nt?i=tt(tt([],Q(i)),Q(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new nt(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)ct(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(r=this._teardowns)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&it(e,t)},t.prototype.remove=function(e){var r=this._teardowns;r&&it(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),st=ot.EMPTY;function at(t){return t instanceof ot||t&&"closed"in t&&et(t.remove)&&et(t.add)&&et(t.unsubscribe)}function ct(t){et(t)?t():t.unsubscribe()}var ut=null,lt=null,pt=void 0,ht=!1,ft=!1,dt={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=dt.delegate;return((null==r?void 0:r.setTimeout)||setTimeout).apply(void 0,tt([],Q(t)))},clearTimeout:function(t){var e=dt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function gt(t){dt.setTimeout((function(){if(!ut)throw t;ut(t)}))}function bt(){}var vt=yt("C",void 0,void 0);function yt(t,e,r){return{kind:t,value:e,error:r}}var wt=null;function mt(t){if(ht){var e=!wt;if(e&&(wt={errorThrown:!1,error:null}),t(),e){var r=wt,n=r.errorThrown,i=r.error;if(wt=null,n)throw i}}else t()}function St(t){ht&&wt&&(wt.errorThrown=!0,wt.error=t)}var Et=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,at(e)&&e.add(r)):r.destination=xt,r}return Y(e,t),e.create=function(t,e,r){return new Tt(t,e,r)},e.prototype.next=function(t){this.isStopped?It(function(t){return yt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?It(yt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?It(vt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(ot),Tt=function(t){function e(e,r,n){var i,o=t.call(this)||this;if(et(e))i=e;else if(e){var s;i=e.next,r=e.error,n=e.complete,o&&ft?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),r=null==r?void 0:r.bind(s),n=null==n?void 0:n.bind(s)}return o.destination={next:i?_t(i):bt,error:_t(null!=r?r:At),complete:n?_t(n):bt},o}return Y(e,t),e}(Et);function _t(t,e){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{t.apply(void 0,tt([],Q(e)))}catch(t){ht?St(t):gt(t)}}}function At(t){throw t}function It(t,e){var r=lt;r&&dt.setTimeout((function(){return r(t,e)}))}var xt={closed:!0,next:bt,error:At,complete:bt},Ot="function"==typeof Symbol&&Symbol.observable||"@@observable";function kt(t){return t}function Nt(t){return 0===t.length?kt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Ct=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof Et||function(t){return t&&et(t.next)&&et(t.error)&&et(t.complete)}(n)&&at(n)?t:new Tt(t,e,r);return mt((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Dt(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(t){n(t),null==i||i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Nt(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Dt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Dt(t){var e;return null!==(e=null!=t?t:pt)&&void 0!==e?e:Promise}var Pt,Rt=rt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Mt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Y(e,t),e.prototype.lift=function(t){var e=new Lt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Rt},e.prototype.next=function(t){var e=this;mt((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=Z(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;mt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;mt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=e.hasError,n=e.isStopped,i=e.observers;return r||n?st:(i.push(t),new ot((function(){return it(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new Ct;return t.source=this,t},e.create=function(t,e){return new Lt(t,e)},e}(Ct),Lt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return Y(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:st},e}(Mt),Ht={now:function(){return(Ht.delegate||Date).now()},delegate:void 0},Gt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Ht);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return Y(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},e}(Mt),jt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},Bt=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ut=function(){function e(){this.sessionManager=R.getInstance(),this.safeHttpCallService=Ft.getInstance(),this.userAuthService=$.getInstance()}return e.prototype.init=function(t,r){var n=this;this.userAuthService.init(t,r).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){n.init(t,r)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),k.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(k.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!k.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(k.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return jt(this,void 0,void 0,(function(){var t,e;return Bt(this,(function(r){switch(r.label){case 0:return t=new M("CE App Installed",{}),e=t,[4,(new q).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return jt(this,void 0,void 0,(function(){var t,e;return Bt(this,(function(r){switch(r.label){case 0:return t=new M("CE App Launched",{}),e=t,[4,(new q).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Gt(1),e}(),Ft=function(){function t(){this.sessionManager=R.getInstance(),this.httpApiService=B.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Ut.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Ut.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.updateDeviceProps=function(t){var e=this;Ut.replaySubject.subscribe((function(){e.httpApiService.updateDeviceProps({props:t})}))},t.prototype.concludeSession=function(t){var e=this;Ut.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t[t.CAMERA=1]="CAMERA",t[t.LOCATION=2]="LOCATION",t[t.PUSH=6]="PUSH"}(Pt||(Pt={}));var Vt=function(){function e(t){this.action=t,this.apiService=Ft.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new te).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.pmpt;t&&(t===Pt.LOCATION&&this.promptLocationPermission(),t===Pt.PUSH&&this.promptPushNotificationPermission(),t===Pt.CAMERA&&this.promptCameraPermission())},e.prototype.closeAction=function(){var e;if(this.action.close){(new Qt).removeInApp();var r=k.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n=null===(e=k.getObject(t.STORAGE_ACTIVE_TRIGGER))||void 0===e?void 0:e.triggerID,i=((new Date).getTime()-r)/1e3,o={triggerID:n,closeBehaviour:this.action.ext||this.action.up||this.action.kv||this.action.iab||this.action.pmpt||this.action.share?"CTA":"Close",duration:i};this.apiService.sendEvent(new M("CE Trigger Closed",o)),k.remove(t.STORAGE_TRIGGER_START_TIME)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.warning("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateDeviceProps({pnPerm:Notification.permission}):i.warning("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,n=function(){var t,e,r;return function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(n){switch(n.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=n.sent(),[4,this.checkPermission("geolocation")];case 2:return e=n.sent(),r=Notification.permission,[2,{camera:t,location:e,notification:r}]}}))},new((r=void 0)||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateDeviceProps({perm:e})}))},e}(),zt=function(){function e(e,r){var n,i,o;this.renderer=N.get(),this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(i=N.get().getWidth(),o=N.get().getHeight(),n=i<o?i/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):o/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),Math.min(n,1)),this.parentHTMLEl=e,this.inappElement=r,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=new f(this.inappElement.trf);t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(e){e.stopPropagation(),new Vt(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t=this.inappElement.bg;if(t){var e=this.inappHTMLEl;if(this.inappElement instanceof A&&(e=e.parentElement),t.glossy)this.renderer.setStyle(e,"-webkit-backdrop-filter","blur("+t.glossy.radius+"px)"),this.renderer.setStyle(e,"backdrop-filter","blur("+t.glossy.radius+"px)"),t.glossy.color&&this.processColourBlock(t.glossy.color,"background",e);else if(t.solid)t.solid.grad?this.processGradient(t.solid.grad,"background"):t.solid.hex&&this.renderer.setStyle(e,"background",t.solid.rgba);else if(t.img){if(!t.img.src)return;var r='url("'+t.img.src+'") no-repeat center';this.renderer.setStyle(e,"background",r),this.renderer.setStyle(e,"background-size","cover"),t.img.a&&(this.renderer.setStyle(e,"-webkit-backdrop-filter","opacity("+t.img.a+")"),this.renderer.setStyle(e,"backdrop-filter","opacity("+t.img.a+")"))}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var r="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(r+=", "+t.c3),t.c4&&(r+=", "+t.c4),t.c5&&(r+=", "+t.c5);var n=r+=")";this.renderer.setStyle(this.inappHTMLEl,e,n)}},e.prototype.processColourBlock=function(t,e,r){void 0===e&&(e="color"),void 0===r&&(r=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(r,e,t.rgba))},e}(),Wt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qt=function(t){function e(e,r){return t.call(this,e,r)||this}return Wt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var r,n=[];e.u&&n.push("underline"),e.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",n.join(" ")),this.renderer.setStyle(t,"color",null!==(r=e.c)&&void 0!==r?r:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=g[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(zt),Kt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return Kt(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var r,n,i=e.renderer.createElement("span");i.innerHTML=null===(n=null===(r=t.txt)||void 0===r?void 0:r.toString())||void 0===n?void 0:n.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(qt),$t=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return $t(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(zt),Yt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("img"),n.insertElement(),n}return Yt(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(zt),Qt=function(){function e(t){this.parent=t,this.renderer=N.get(),this.renderer.setParentContainer(t)}return e.prototype.render=function(){this.parent||this.removeInApp();var e=this.renderer.createElement("div");return e.classList.add(t.IN_APP_CONTAINER_NAME),this.parent?this.renderer.setStyle(e,"position","absolute"):this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.appendChild(this.parent||document.body,e),e.addEventListener("click",(function(){new Vt({close:!0}).execute()})),e},e.prototype.removeInApp=function(){var e=document.querySelector("."+t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),te=function(){function e(){this.renderer=N.get()}return e.prototype.render=function(e){var r=document.querySelector("."+t.IN_APP_CONTAINER_NAME),n=this.createIFrameContainer();return this.createIFrameElement(n,e),this.createAnchorElement(r,n),this.renderer.appendChild(r,n),n},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var r=this.renderer.createElement("iframe");return this.renderer.setStyle(r,"width","100%"),this.renderer.setStyle(r,"height","100%"),this.renderer.setAttribute(r,"src",e),this.renderer.setAttribute(r,"frameBorder","0"),this.renderer.appendChild(t,r),r},e.prototype.createAnchorElement=function(t,e){var r=this.renderer.createElement("a");return this.renderer.setStyle(r,"position","absolute"),this.renderer.setStyle(r,"top","0px"),this.renderer.setStyle(r,"right","0px"),r.href="#",r.innerHTML="Close",r.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,r),r},e}(),ee=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),re=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n.inappElement.w=1080,n.inappElement.h=1920,n}return ee(e,t),e.prototype.render=function(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(zt),ne=function(){function e(t){this.parent=t,this.rootContainer=new Qt(t).render()}return e.prototype.render=function(e){e=new O(e),this.ian=e.ian;try{this.renderContainer();var r=new M("CE Trigger Displayed",{triggerID:e.id});Ft.getInstance().sendEvent(r),k.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),H.storeActiveTrigger(e)}catch(t){i.error(t)}},e.prototype.renderElement=function(t,e){e instanceof E?new Xt(t,e).render():e instanceof m?new Zt(t,e).render():e instanceof y?new Jt(t,e).render():i.error("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,r=this,n=null===(t=this.ian)||void 0===t?void 0:t.cont;if(n){var i=new re(this.rootContainer,n).render().getHTMLElement();this.ian.gvt||(this.ian.gvt=this.ian.cont.getOrigin()),Object.assign(i.style,this.ian.getStyles()),null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){r.renderElement(i,t)}))}},e}(),ie=ne}(),CooeePreview=n.default}();