@letscooee/web-sdk 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/sdk-preview.min.js +1 -1
- package/dist/sdk.min.js +1 -1
- package/dist/shopify-sdk.min.js +1 -1
- package/package.json +1 -1
package/dist/sdk-preview.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see sdk-preview.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={716:(t,e)=>{"use strict";e.U=void 0;var n=function(){function t(t){try{this.base=new URL(t),this.params=new URLSearchParams(this.base.search.slice(1))}catch(t){console.error("Un-parsable URL",t)}}return t.prototype.appendQueryParam=function(t,e){this.params.append(t,e?e.toString():"")},t.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},t.prototype.deleteQueryParam=function(t){this.params.delete(t)},t.prototype.getBase=function(){return this.base},t.prototype.getPath=function(){return this.base.pathname},t.prototype.getHostname=function(){return this.base.hostname},t.prototype.getParams=function(){return this.params},t.prototype.getQueryParam=function(t){if(!this.params)return"";var e=this.params.get(t);return e&&"undefined"!==e&&"null"!==e?e:void 0},t.prototype.getQueryString=function(){return this.params.toString()},t.prototype.setPath=function(t){return this.base.pathname=t,this},t.prototype.setQueryParam=function(t,e){return this.params.set(t,e?e.toString():""),this},t.prototype.setQueryString=function(t){if(t)return"?"===t[0]&&(t=t.slice(1)),this.params=new URLSearchParams(t),this},t.prototype.toString=function(){var t=this.params.toString();return this.base.search=""===t?"":"?"+t,this.base.toString()},t}();e.U=n},145:(t,e)=>{"use strict";e.r=void 0,e.r=function(){return new Promise((function(t,e){var n,r,i="Unknown";function o(e){t({isPrivate:e,browserName:i})}function s(t){return t===eval.toString().length}void 0!==(r=navigator.vendor)&&0===r.indexOf("Apple")&&s(37)?(i="Safari",void 0!==navigator.maxTouchPoints?function(){var t=String(Math.random());try{window.indexedDB.open(t,1).onupgradeneeded=function(e){var n,r,i=null===(n=e.target)||void 0===n?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),o(!1)}catch(t){var s=t;return t instanceof Error&&(s=null!==(r=t.message)&&void 0!==r?r:t),o("string"==typeof s&&/BlobURLs are not yet supported/.test(s))}finally{i.close(),window.indexedDB.deleteDatabase(t)}}}catch(t){return o(!1)}}():function(){var t=window.openDatabase,e=window.localStorage;try{t(null,null,null,null)}catch(t){return o(!0)}try{e.setItem("test","1"),e.removeItem("test")}catch(t){return o(!0)}o(!1)}()):function(){var t=navigator.vendor;return void 0!==t&&0===t.indexOf("Google")&&s(33)}()?(n=navigator.userAgent,i=n.match(/Chrome/)?void 0!==navigator.brave?"Brave":n.match(/Edg/)?"Edge":n.match(/OPR/)?"Opera":"Chrome":"Chromium",void 0!==self.Promise&&void 0!==self.Promise.allSettled?navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,e){var n;o(e<(void 0!==(n=window).performance&&void 0!==n.performance.memory&&void 0!==n.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824))}),(function(t){e(new Error("detectIncognito somehow failed to query storage quota: "+t.message))})):(0,window.webkitRequestFileSystem)(0,1,(function(){o(!1)}),(function(){o(!0)}))):void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&s(37)?(i="Firefox",o(void 0===navigator.serviceWorker)):void 0!==navigator.msSaveBlob&&s(39)?(i="Internet Explorer",o(void 0===window.indexedDB)):e(new Error("detectIncognito cannot determine the browser"))}))}},901:function(t,e,n){var r,i;!function(o){"use strict";var s,a={VERSION:"1.6.1"},u={},c=function(t,e){return function(){return e.apply(t,arguments)}},f=function(){var t,e,n=arguments,r=n[0];for(e=1;e<n.length;e++)for(t in n[e])!(t in r)&&n[e].hasOwnProperty(t)&&(r[t]=n[e][t]);return r},l=function(t,e){return{value:t,name:e}};a.TRACE=l(1,"TRACE"),a.DEBUG=l(2,"DEBUG"),a.INFO=l(3,"INFO"),a.TIME=l(4,"TIME"),a.WARN=l(5,"WARN"),a.ERROR=l(8,"ERROR"),a.OFF=l(99,"OFF");var p=function(t){this.context=t,this.setLevel(t.filterLevel),this.log=this.info};p.prototype={setLevel:function(t){t&&"value"in t&&(this.context.filterLevel=t)},getLevel:function(){return this.context.filterLevel},enabledFor:function(t){var e=this.context.filterLevel;return t.value>=e.value},trace:function(){this.invoke(a.TRACE,arguments)},debug:function(){this.invoke(a.DEBUG,arguments)},info:function(){this.invoke(a.INFO,arguments)},warn:function(){this.invoke(a.WARN,arguments)},error:function(){this.invoke(a.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(a.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(a.TIME,[t,"end"])},invoke:function(t,e){s&&this.enabledFor(t)&&s(e,f({level:t},this.context))}};var h,d=new p({filterLevel:a.OFF});(h=a).enabledFor=c(d,d.enabledFor),h.trace=c(d,d.trace),h.debug=c(d,d.debug),h.time=c(d,d.time),h.timeEnd=c(d,d.timeEnd),h.info=c(d,d.info),h.warn=c(d,d.warn),h.error=c(d,d.error),h.log=h.info,a.setHandler=function(t){s=t},a.setLevel=function(t){for(var e in d.setLevel(t),u)u.hasOwnProperty(e)&&u[e].setLevel(t)},a.getLevel=function(){return d.getLevel()},a.get=function(t){return u[t]||(u[t]=new p(f({name:t},d.context)))},a.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,e){e.name&&t.unshift("["+e.name+"]")};var e={},n=function(t,e){Function.prototype.apply.call(t,console,e)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var o,s=console.log;i.level===a.TIME?(o=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(o):e[o]=(new Date).getTime():console.timeEnd?console.timeEnd(o):n(s,[o+": "+((new Date).getTime()-e[o])+"ms"])):(i.level===a.WARN&&console.warn?s=console.warn:i.level===a.ERROR&&console.error?s=console.error:i.level===a.INFO&&console.info?s=console.info:i.level===a.DEBUG&&console.debug?s=console.debug:i.level===a.TRACE&&console.trace&&(s=console.trace),t.formatter(r,i),n(s,r))}},a.useDefaults=function(t){a.setLevel(t&&t.defaultLevel||a.DEBUG),a.setHandler(a.createDefaultHandler(t))},a.setDefaults=a.useDefaults,void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}()},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",u="object",c="string",f="model",l="name",p="type",h="vendor",d="version",g="architecture",y="console",b="mobile",m="tablet",v="smarttv",w="wearable",E="embedded",S="Amazon",_="Apple",T="ASUS",O="BlackBerry",I="Google",A="Huawei",x="LG",N="Microsoft",D="Motorola",L="Samsung",P="Sharp",R="Sony",C="Xiaomi",B="Zebra",k="Facebook",U=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},M=function(t,e){return typeof t===c&&-1!==j(e).indexOf(j(t))},j=function(t){return t.toLowerCase()},H=function(t,e){if(typeof t===c)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e===a?t:t.substring(0,350)},G=function(t,e){for(var n,r,i,a,c,f,l=0;l<e.length&&!c;){var p=e[l],h=e[l+1];for(n=r=0;n<p.length&&!c;)if(c=p[n++].exec(t))for(i=0;i<h.length;i++)f=c[++r],typeof(a=h[i])===u&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,f):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=f?f.replace(a[1],a[2]):o:this[a[0]]=f?a[1].call(this,f,a[2]):o:4===a.length&&(this[a[0]]=f?a[3].call(this,f.replace(a[1],a[2])):o):this[a]=f||o;l+=2}},F=function(t,e){for(var n in e)if(typeof e[n]===u&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(M(e[n][r],t))return"?"===n?o:n}else if(M(e[n],t))return"?"===n?o:n;return t},V={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[d,[l,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[d,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure Browser"],d],[/\bfocus\/([\w\.]+)/i],[d,[l,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[d,[l,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 Browser"]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,k],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,"Chrome WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,F,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,j]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[h,L],[p,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[h,L],[p,b]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[h,_],[p,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[h,_],[p,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[h,A],[p,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[h,A],[p,b]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[h,C],[p,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[h,C],[p,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[h,"OPPO"],[p,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[h,"Vivo"],[p,b]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[h,"Realme"],[p,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[h,D],[p,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[h,D],[p,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[h,x],[p,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[h,x],[p,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[h,"Lenovo"],[p,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[h,"Nokia"],[p,b]],[/(pixel c)\b/i],[f,[h,I],[p,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[h,I],[p,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[h,R],[p,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[h,R],[p,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[h,"OnePlus"],[p,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[h,S],[p,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[h,S],[p,b]],[/(playbook);[-\w\),; ]+(rim)/i],[f,h,[p,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[h,O],[p,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[h,T],[p,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[h,T],[p,b]],[/(nexus 9)/i],[f,[h,"HTC"],[p,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[f,/_/g," "],[p,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[h,"Acer"],[p,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[h,"Meizu"],[p,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[h,P],[p,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,f,[p,b]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,f,[p,m]],[/(surface duo)/i],[f,[h,N],[p,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[h,"Fairphone"],[p,b]],[/(u304aa)/i],[f,[h,"AT&T"],[p,b]],[/\bsie-(\w*)/i],[f,[h,"Siemens"],[p,b]],[/\b(rct\w+) b/i],[f,[h,"RCA"],[p,m]],[/\b(venue[\d ]{2,7}) b/i],[f,[h,"Dell"],[p,m]],[/\b(q(?:mv|ta)\w+) b/i],[f,[h,"Verizon"],[p,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[h,"Barnes & Noble"],[p,m]],[/\b(tm\d{3}\w+) b/i],[f,[h,"NuVision"],[p,m]],[/\b(k88) b/i],[f,[h,"ZTE"],[p,m]],[/\b(nx\d{3}j) b/i],[f,[h,"ZTE"],[p,b]],[/\b(gen\d{3}) b.+49h/i],[f,[h,"Swiss"],[p,b]],[/\b(zur\d{3}) b/i],[f,[h,"Swiss"],[p,m]],[/\b((zeki)?tb.*\b) b/i],[f,[h,"Zeki"],[p,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],f,[p,m]],[/\b(ns-?\w{0,9}) b/i],[f,[h,"Insignia"],[p,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[h,"NextBook"],[p,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],f,[p,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],f,[p,b]],[/\b(ph-1) /i],[f,[h,"Essential"],[p,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[h,"Envizen"],[p,m]],[/\b(trio[-\w\. ]+) b/i],[f,[h,"MachSpeed"],[p,m]],[/\btu_(1491) b/i],[f,[h,"Rotor"],[p,m]],[/(shield[\w ]+) b/i],[f,[h,"Nvidia"],[p,m]],[/(sprint) (\w+)/i],[h,f,[p,b]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[h,N],[p,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[h,B],[p,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[h,B],[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,f,[p,y]],[/droid.+; (shield) bui/i],[f,[h,"Nvidia"],[p,y]],[/(playstation [345portablevi]+)/i],[f,[h,R],[p,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[h,N],[p,y]],[/smart-tv.+(samsung)/i],[h,[p,v]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[h,L],[p,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,x],[p,v]],[/(apple) ?tv/i],[h,[f,"Apple TV"],[p,v]],[/crkey/i],[[f,"Chromecast"],[h,I],[p,v]],[/droid.+aft(\w)( bui|\))/i],[f,[h,S],[p,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[h,P],[p,v]],[/(bravia[\w ]+)( bui|\))/i],[f,[h,R],[p,v]],[/(mitv-\w{5}) bui/i],[f,[h,C],[p,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,H],[f,H],[p,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,v]],[/((pebble))app/i],[h,f,[p,w]],[/droid.+; (glass) \d/i],[f,[h,I],[p,w]],[/droid.+; (wt63?0{2,3})\)/i],[f,[h,B],[p,w]],[/(quest( 2)?)/i],[f,[h,k],[p,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[p,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,b]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[d,F,V]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[d,F,V]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[l,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,d]]},W=function(t,e){if(typeof t===u&&(e=t,t=o),!(this instanceof W))return new W(t,e).getResult();var n=t||(typeof i!==a&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}($,e):$;return this.getBrowser=function(){var t,e={};return e.name=o,e.version=o,G.call(e,n,r.browser),e.major=typeof(t=e.version)===c?t.replace(/[^\d\.]/g,"").split(".")[0]:o,e},this.getCPU=function(){var t={};return t.architecture=o,G.call(t,n,r.cpu),t},this.getDevice=function(){var t={};return t.vendor=o,t.model=o,t.type=o,G.call(t,n,r.device),t},this.getEngine=function(){var t={};return t.name=o,t.version=o,G.call(t,n,r.engine),t},this.getOS=function(){var t={};return t.name=o,t.version=o,G.call(t,n,r.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 n},this.setUA=function(t){return n=typeof t===c&&t.length>350?H(t,350):t,this},this.setUA(n),this};W.VERSION="1.0.32",W.BROWSER=U([l,d,"major"]),W.CPU=U([g]),W.DEVICE=U([f,h,p,y,b,v,m,w,E]),W.ENGINE=W.OS=U([l,d]),typeof e!==a?(t.exports&&(e=t.exports=W),e.UAParser=W):n.amdO?(r=function(){return W}.call(e,n,e,t))===o||(t.exports=r):typeof i!==a&&(i.UAParser=W);var z=typeof i!==a&&(i.jQuery||i.Zepto);if(z&&!z.ua){var q=new W;z.ua=q.getResult(),z.ua.get=function(){return q.getUA()},z.ua.set=function(t){q.setUA(t);var e=q.getResult();for(var n in e)z.ua[n]=e[n]}}}("object"==typeof window?window:this)},147:t=>{"use strict";t.exports={i8:"1.5.2"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};(()=>{"use strict";n.d(r,{default:()=>fr});for(var t=function(){function t(){}var e,r;return e=t,t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=n(147).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.SHOPIFY_LOG_PREFIX="CooeeShopify",t.COOEE="cooee",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_APP_ID="cooaid",t.STORAGE_USER_ID="uid",t.STORAGE_DEVICE_ID="coodid",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_ACTIVE_TRIGGER="at",t.STORAGE_GA_ENABLED="gae",t.STORAGE_GA_CLIENT_ID="gacid",t.STORAGE_GA_MEASUREMENT_ID="gamid",t.STORAGE_SHOPIFY_CART_TOKEN="coosct",t.SESSION_STORAGE_TAB_OPENED="tabop",t.SESSION_STORAGE_SCROLL_ID="sleid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_WRAPPER_NAME="cooee-wrapper",t.IN_APP_CONTAINER_NAME="cooee-container",t.IN_APP_DEFAULT_PADDING=15,t.EVENT_SCREEN_VIEW="CE Screen View",t.EVENT_APP_INSTALLED="CE App Installed",t.EVENT_APP_LAUNCHED="CE App Launched",t.EVENT_SESSION_CONCLUDED="CE Session Concluded",t.EVENT_SESSION_STARTED="CE Session Started",t.EVENT_APP_FOREGROUND="CE App Foreground",t.EVENT_APP_BACKGROUND="CE App Background",t.EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed",t.EVENT_TRIGGER_CLOSED="CE Trigger Closed",t.EVENT_SCROLL="CE Scroll",t.EVENT_TRIGGER_CLICKED="CE Trigger Clicked",t.EVENT_ADD_TO_CART="Add To Cart",t.EVENT_VIEW_ITEM="View Item",t.EVENT_VIEW_CART="View Cart",t.BOT_USER_AGENTS_PATTERN="(googlebot/|bot|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)",t.BOT_UA_REGEX=new RegExp(e.BOT_USER_AGENTS_PATTERN,"i"),r=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(r,10),t}(),e=function(){function t(t){this.triggerID=t.id,this.engagementID=t.engagementID,this.expireAt=t.expireAt,this.updateExpired()}return t.prototype.isExpired=function(){return this.expireAt<(new Date).getTime()},t.prototype.updateExpired=function(){this.isExpired()&&(this.expired=!0)},t}(),i=[],o=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)i[u]=a[u],o[a.charCodeAt(u)]=u;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var r,o,s=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var p,h,d=function(t){var e,n,r=f(t),i=r[0],a=r[1],u=new s(function(t,e,n){return 3*(e+n)/4-n}(0,i,a)),c=0,l=a>0?i-4:i;for(n=0;n<l;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===a&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,u[c++]=255&e),1===a&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},g=function(t){for(var e,n=t.length,r=n%3,o=[],s=16383,a=0,u=n-r;a<u;a+=s)o.push(l(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),o.join("")},y=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,l=n?i-1:0,p=n?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=p,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=c}return(h?-1:1)*s*Math.pow(2,o-r)},b=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+h]=255&a,h+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+h]=255&s,h+=d,s/=256,c-=8);t[n+h-d]|=128*g},m=(p=function(t,e){var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},e.INSPECT_MAX_BYTES=50;var r=2147483647;function i(t){if(t>r)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,o.prototype),e}function o(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,n)}function s(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|p(t,e),r=i(n),s=r.write(t,e);return s!==n&&(r=r.slice(0,s)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(F(t,Uint8Array)){var e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(t));if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return f(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return f(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return o.from(r,e,n);var s=function(t){if(o.isBuffer(t)){var e=0|l(t.length),n=i(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?i(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(t))}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return a(t),i(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),n=i(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function f(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,o.prototype),r}function l(t){if(t>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function p(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(i)return r?-1:j(t).length;e=(""+e).toLowerCase(),i=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return N(this,e,n);case"latin1":case"binary":return D(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:w(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):w(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,p=0;p<u;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function E(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(V(a))return s;t[n+s]=a}return s}function S(t,e,n,r){return G(j(e,t.length-n),t,n,r)}function _(t,e,n,r){return G(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return G(H(e),t,n,r)}function O(t,e,n,r){return G(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?g(t):g(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=x));return n}(r)}e.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(t,e,n){return s(t,e,n)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(t,e,n){return function(t,e,n){return a(t),t<=0?i(t):void 0!==e?"string"==typeof n?i(t).fill(e,n):i(t).fill(e):i(t)}(t,e,n)},o.allocUnsafe=function(t){return u(t)},o.allocUnsafeSlow=function(t){return u(t)},o.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==o.prototype},o.compare=function(t,e){if(F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,s=Math.min(n,r);i<s;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(F(s,Uint8Array))i+s.length>r.length?o.from(s).copy(r,i):Uint8Array.prototype.set.call(r,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i)}i+=s.length}return r},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},o.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):h.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(t,e,n,r,i){if(F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(s,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<u;++l)if(c[l]!==f[l]){s=c[l],a=f[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return S(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function N(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function D(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function L(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function P(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,s){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return e=+e,n>>>=0,i||B(t,0,n,4),b(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return e=+e,n>>>=0,i||B(t,0,n,8),b(t,e,n,r,52,8),n+8}o.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Object.setPrototypeOf(r,o.prototype),r},o.prototype.readUintLE=o.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUintBE=o.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUint8=o.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),y(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),y(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),y(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),y(this,t,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(!o.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},o.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var s;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s<n;++s)this[s]=t;else{var a=o.isBuffer(t)?t:o.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-e;++s)this[s+e]=a[s%u]}return this};var M=/[^+/0-9A-Za-z-_]/g;function j(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(t){return d(function(t){if((t=(t=t.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}()},p(h={exports:{}},h.exports),h.exports),v=m.Buffer;m.SlowBuffer,m.INSPECT_MAX_BYTES,m.kMaxLength;var w=function(t,e){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},w(t,e)};function E(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return E(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),_=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return E(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function T(t){return t&&t.Math==Math&&t}function O(){return T("object"==typeof globalThis&&globalThis)||T("object"==typeof window&&window)||T("object"==typeof self&&self)||T("object"==typeof n.g&&n.g)||Function("return this")()}var I=function(t){var e,n="object"==typeof(e=O()).navigator&&"ReactNative"===e.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=v.alloc(t),i=0;i<t;++i)r[i]=Math.floor(256*Math.random());return r},A=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(v.alloc(e))}}return void 0!==n.g&&n.g.crypto&&n.g.crypto.getRandomValues?function(t){return n.g.crypto.getRandomValues(v.alloc(t))}:I}();function x(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function N(t){return"object"==typeof t&&null!==t}function D(t,e){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(e),n=!0),t.apply(this,r)}}function L(t){if(ArrayBuffer.isView(t))return v.from(t.buffer,t.byteOffset,t.byteLength);if(e=t,["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e)))return v.from(t);var e;throw new _("Must use either Buffer or TypedArray")}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,R=function(t){return"string"==typeof t&&P.test(t)},C=function(t){if(!R(t))throw new _('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return v.from(e,"hex")},B=function(t,e){return void 0===e&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")},k=Symbol("id"),U=function(){function t(e){if(void 0===e)this.id=t.generate();else if(e instanceof t)this[k]=v.from(e.id),this.__id=e.__id;else if(ArrayBuffer.isView(e)&&16===e.byteLength)this.id=L(e);else{if("string"!=typeof e)throw new _("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");this.id=C(e)}}return Object.defineProperty(t.prototype,"id",{get:function(){return this[k]},set:function(e){this[k]=e,t.cacheHexString&&(this.__id=B(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var n=B(this.id,e);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(t){return!1}},t.prototype.toBinary=function(){return new M(this.id,M.SUBTYPE_UUID)},t.generate=function(){var t=A(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,v.from(t)},t.isValid=function(e){if(!e)return!1;if(e instanceof t)return!0;if("string"==typeof e)return R(e);if(x(e)){if(16!==e.length)return!1;try{return parseInt(e[6].toString(16)[0],10)===M.SUBTYPE_UUID}catch(t){return!1}}return!1},t.createFromHexString=function(e){return new t(C(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}();Object.defineProperty(U.prototype,"_bsontype",{value:"UUID"});var M=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(!(null==e||"string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||Array.isArray(e)))throw new _("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:t.BSON_BINARY_SUBTYPE_DEFAULT,null==e?(this.buffer=v.alloc(t.BUFFER_SIZE),this.position=0):("string"==typeof e?this.buffer=v.from(e,"binary"):Array.isArray(e)?this.buffer=v.from(e):this.buffer=L(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if("string"==typeof e&&1!==e.length)throw new _("only accepts single character String");if("number"!=typeof e&&1!==e.length)throw new _("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof e?e.charCodeAt(0):"number"==typeof e?e:e[0])<0||n>255)throw new _("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=v.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(t,e){if(e="number"==typeof e?e:this.position,this.buffer.length<e+t.length){var n=v.alloc(this.buffer.length+t.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(t)?(this.buffer.set(L(t),e),this.position=e+t.byteLength>this.position?e+t.length:this.position):"string"==typeof t&&(this.buffer.write(t,e,t.length,"binary"),this.position=e+t.length>this.position?e+t.length:this.position)},t.prototype.read=function(t,e){return e=e&&e>0?e:this.position,this.buffer.slice(t,t+e)},t.prototype.value=function(t){return(t=!!t)&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(t){return this.buffer.toString(t)},t.prototype.toExtendedJSON=function(t){t=t||{};var e=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return t.legacy?{$binary:e,$type:1===n.length?"0"+n:n}:{$binary:{base64:e,subType:1===n.length?"0"+n:n}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new U(this.buffer.slice(0,this.position));throw new S('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){var r,i;if(n=n||{},"$binary"in e?n.legacy&&"string"==typeof e.$binary&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=v.from(e.$binary,"base64")):"string"!=typeof e.$binary&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=v.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=C(e.$uuid)),!r)throw new _("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(M.prototype,"_bsontype",{value:"Binary"});var j=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},t}();Object.defineProperty(j.prototype,"_bsontype",{value:"Code"});var H=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");2===o.length&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(t.$db=this.db),t},t.prototype.toExtendedJSON=function(t){t=t||{};var e={$ref:this.collection,$id:this.oid};return t.legacy?e:(this.db&&(e.$db=this.db),e=Object.assign(e,this.fields))},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(H.prototype,"_bsontype",{value:"DBRef"});var G=void 0;try{G=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}var F=4294967296,V=0x10000000000000000,$=V/2,W={},z={},q=function(){function t(e,n,r){if(void 0===e&&(e=0),!(this instanceof t))return new t(e,n,r);"bigint"==typeof e?Object.assign(this,t.fromBigInt(e,!!n)):"string"==typeof e?Object.assign(this,t.fromString(e,!!n)):(this.low=0|e,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(o=0<=(e>>>=0)&&e<256)&&(i=z[e])?i:(r=t.fromBits(e,(0|e)<0?-1:0,!0),o&&(z[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(i=W[e])?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(W[e]=r),r)},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=V)return t.MAX_UNSIGNED_VALUE}else{if(e<=-$)return t.MIN_VALUE;if(e+1>=$)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%F|0,e/F|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+u),r);if(u<8){var f=t.fromNumber(Math.pow(r,u));s=s.mul(f).add(t.fromNumber(c))}else s=(s=s.mul(o)).add(t.fromNumber(c))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(t){return N(t)&&!0===t.__isLong__},t.fromValue=function(e,n){return"number"==typeof e?t.fromNumber(e,n):"string"==typeof e?t.fromString(e,n):t.fromBits(e.low,e.high,"boolean"==typeof n?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=0,f=0,l=0,p=0;return l+=(p+=o+(65535&e.low))>>>16,p&=65535,f+=(l+=i+u)>>>16,l&=65535,c+=(f+=r+a)>>>16,f&=65535,c+=n+s,c&=65535,t.fromBits(l<<16|p,c<<16|f,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(t){return this.compare(t)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(G){if(!this.unsigned&&-2147483648===this.high&&-1===e.low&&-1===e.high)return this;var n=(this.unsigned?G.div_u:G.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE))return e.eq(t.ONE)||e.eq(t.NEG_ONE)?t.MIN_VALUE:e.eq(t.MIN_VALUE)?t.ONE:(r=this.shr(1).div(e).shl(1)).eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=t.fromNumber(r),c=u.mul(e);c.isNegative()||c.gt(i);)r-=a,c=(u=t.fromNumber(r,this.unsigned)).mul(e);u.isZero()&&(u=t.ONE),o=o.add(u),i=i.sub(c)}return o},t.prototype.div=function(t){return this.divide(t)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},t.prototype.eq=function(t){return this.equals(t)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e,n=0!==this.high?this.high:this.low;for(e=31;e>0&&0==(n&1<<e);e--);return 0!==this.high?e+33:e+1},t.prototype.greaterThan=function(t){return this.comp(t)>0},t.prototype.gt=function(t){return this.greaterThan(t)},t.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},t.prototype.gte=function(t){return this.greaterThanOrEqual(t)},t.prototype.ge=function(t){return this.greaterThanOrEqual(t)},t.prototype.isEven=function(){return 0==(1&this.low)},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return 1==(1&this.low)},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return 0===this.high&&0===this.low},t.prototype.lessThan=function(t){return this.comp(t)<0},t.prototype.lt=function(t){return this.lessThan(t)},t.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},t.prototype.lte=function(t){return this.lessThanOrEqual(t)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),G){var n=(this.unsigned?G.rem_u:G.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(t){return this.modulo(t)},t.prototype.rem=function(t){return this.modulo(t)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),G){var n=G.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=e.high>>>16,u=65535&e.high,c=e.low>>>16,f=65535&e.low,l=0,p=0,h=0,d=0;return h+=(d+=s*f)>>>16,d&=65535,p+=(h+=o*f)>>>16,h&=65535,p+=(h+=s*c)>>>16,h&=65535,l+=(p+=i*f)>>>16,p&=65535,l+=(p+=o*c)>>>16,p&=65535,l+=(p+=s*u)>>>16,p&=65535,l+=r*f+i*c+o*u+s*a,l&=65535,t.fromBits(h<<16|d,l<<16|p,this.unsigned)},t.prototype.mul=function(t){return this.multiply(t)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(t){return!this.equals(t)},t.prototype.neq=function(t){return this.notEquals(t)},t.prototype.ne=function(t){return this.notEquals(t)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(t){return this.shiftLeft(t)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(t){return this.shiftRight(t)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),0==(e&=63))return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}return 32===e?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},t.prototype.shru=function(t){return this.shiftRightUnsigned(t)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(t){return this.subtract(t)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*F+(this.low>>>0):this.high*F+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},t.prototype.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(e);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(t){return this.lessThanOrEqual(t)},t.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(16777216),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(q.prototype,"__isLong__",{value:!0}),Object.defineProperty(q.prototype,"_bsontype",{value:"Long"});var J=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,K=/^(\+|-)?(Infinity|inf)$/i,Y=/^(\+|-)?NaN$/i,X=6111,Z=-6176,Q=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),tt=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),et=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),nt=/^([-+])?(\d+)?$/;function rt(t){return!isNaN(parseInt(t,10))}function it(t){var e=q.fromNumber(1e9),n=q.fromNumber(0);if(!(t.parts[0]||t.parts[1]||t.parts[2]||t.parts[3]))return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new q(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function ot(t,e){throw new _('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var st=function(){function t(e){if(!(this instanceof t))return new t(e);if("string"==typeof e)this.bytes=t.fromString(e).bytes;else{if(!x(e))throw new _("Decimal128 must take a Buffer or string");if(16!==e.byteLength)throw new _("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}}return t.fromString=function(e){var n,r=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,f=0,l=[0],p=0,h=0,d=0,g=0,y=0,b=0,m=new q(0,0),w=new q(0,0),E=0;if(e.length>=7e3)throw new _(e+" not a valid Decimal128 string");var S=e.match(J),T=e.match(K),O=e.match(Y);if(!S&&!T&&!O||0===e.length)throw new _(e+" not a valid Decimal128 string");if(S){var I=S[2],A=S[4],x=S[5],N=S[6];A&&void 0===N&&ot(e,"missing exponent power"),A&&void 0===I&&ot(e,"missing exponent base"),void 0===A&&(x||N)&&ot(e,"missing e before exponent")}if("+"!==e[E]&&"-"!==e[E]||(r="-"===e[E++]),!rt(e[E])&&"."!==e[E]){if("i"===e[E]||"I"===e[E])return new t(v.from(r?tt:et));if("N"===e[E])return new t(v.from(Q))}for(;rt(e[E])||"."===e[E];)"."!==e[E]?(p<34&&("0"!==e[E]||o)&&(o||(f=a),o=!0,l[h++]=parseInt(e[E],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,E+=1):(i&&ot(e,"contains multiple periods"),i=!0,E+=1);if(i&&!a)throw new _(e+" not a valid Decimal128 string");if("e"===e[E]||"E"===e[E]){var D=e.substr(++E).match(nt);if(!D||!D[2])return new t(v.from(Q));y=parseInt(D[0],10),E+=D[0].length}if(e[E])return new t(v.from(Q));if(d=0,p){if(g=p-1,1!==(s=u))for(;0===l[f+s-1];)s-=1}else d=0,g=0,l[0]=0,u=1,p=1,s=0;for(y<=c&&c-y>16384?y=Z:y-=c;y>X;){if((g+=1)-d>34){if(l.join("").match(/^0+$/)){y=X;break}ot(e,"overflow")}y-=1}for(;y<Z||p<u;){if(0===g&&s<p){y=Z,s=0;break}if(p<u?u-=1:g-=1,y<X)y+=1;else{if(l.join("").match(/^0+$/)){y=X;break}ot(e,"overflow")}}if(g-d+1<s){var L=a;i&&(f+=1,L+=1),r&&(f+=1,L+=1);var P=parseInt(e[f+g+1],10),R=0;if(P>=5&&(R=1,5===P))for(R=l[g]%2==1?1:0,b=f+g+2;b<L;b++)if(parseInt(e[b],10)){R=1;break}if(R)for(var C=g;C>=0;C--)if(++l[C]>9&&(l[C]=0,0===C)){if(!(y<X))return new t(v.from(r?tt:et));y+=1,l[C]=1}}if(m=q.fromNumber(0),w=q.fromNumber(0),0===s)m=q.fromNumber(0),w=q.fromNumber(0);else if(g-d<17)for(C=d,w=q.fromNumber(l[C++]),m=new q(0,0);C<=g;C++)w=(w=w.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]));else{for(C=d,m=q.fromNumber(l[C++]);C<=g-17;C++)m=(m=m.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]));for(w=q.fromNumber(l[C++]);C<=g;C++)w=(w=w.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]))}var B,k,U,M,j=function(t,e){if(!t&&!e)return{high:q.fromNumber(0),low:q.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new q(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new q(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),u=r.multiply(i),c=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new q(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new q(c.getLowBits(),0))}}(m,q.fromString("100000000000000000"));j.low=j.low.add(w),k=w,((U=(B=j.low).high>>>0)<(M=k.high>>>0)||U===M&&B.low>>>0<k.low>>>0)&&(j.high=j.high.add(q.fromNumber(1))),n=y+6176;var H={low:q.fromNumber(0),high:q.fromNumber(0)};j.high.shiftRightUnsigned(49).and(q.fromNumber(1)).equals(q.fromNumber(1))?(H.high=H.high.or(q.fromNumber(3).shiftLeft(61)),H.high=H.high.or(q.fromNumber(n).and(q.fromNumber(16383).shiftLeft(47))),H.high=H.high.or(j.high.and(q.fromNumber(0x7fffffffffff)))):(H.high=H.high.or(q.fromNumber(16383&n).shiftLeft(49)),H.high=H.high.or(j.high.and(q.fromNumber(562949953421311)))),H.low=j.low,r&&(H.high=H.high.or(q.fromString("9223372036854775808")));var G=v.alloc(16);return E=0,G[E++]=255&H.low.low,G[E++]=H.low.low>>8&255,G[E++]=H.low.low>>16&255,G[E++]=H.low.low>>24&255,G[E++]=255&H.low.high,G[E++]=H.low.high>>8&255,G[E++]=H.low.high>>16&255,G[E++]=H.low.high>>24&255,G[E++]=255&H.high.low,G[E++]=H.high.low>>8&255,G[E++]=H.high.low>>16&255,G[E++]=H.high.low>>24&255,G[E++]=255&H.high.high,G[E++]=H.high.high>>8&255,G[E++]=H.high.high>>16&255,G[E++]=H.high.high>>24&255,new t(G)},t.prototype.toString=function(){for(var t,e=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},f=[];a=0;var l=this.bytes,p=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,h=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,d=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,g=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24;a=0,(new q(p,h),new q(d,g)).lessThan(q.ZERO)&&f.push("-");var y=g>>26&31;if(y>>3==3){if(30===y)return f.join("")+"Infinity";if(31===y)return"NaN";t=g>>15&16383,i=8+(g>>14&1)}else i=g>>14&7,t=g>>17&16383;var b=t-6176;if(c.parts[0]=(16383&g)+((15&i)<<14),c.parts[1]=d,c.parts[2]=h,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var m=0,v=it(c);if(c=v.quotient,m=v.rem.low)for(o=8;o>=0;o--)n[9*s+o]=m%10,m=Math.floor(m/10)}if(u)e=1,n[a]=0;else for(e=36;!n[a];)e-=1,a+=1;var w=e-1+b;if(w>=34||w<=-7||b>0){if(e>34)return f.push("".concat(0)),b>0?f.push("E+".concat(b)):b<0&&f.push("E".concat(b)),f.join("");for(f.push("".concat(n[a++])),(e-=1)&&f.push("."),r=0;r<e;r++)f.push("".concat(n[a++]));f.push("E"),w>0?f.push("+".concat(w)):f.push("".concat(w))}else if(b>=0)for(r=0;r<e;r++)f.push("".concat(n[a++]));else{var E=e+b;if(E>0)for(r=0;r<E;r++)f.push("".concat(n[a++]));else f.push("0");for(f.push(".");E++<0;)f.push("0");for(r=0;r<e-Math.max(E-1,0);r++)f.push("".concat(n[a++]))}return f.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(st.prototype,"_bsontype",{value:"Decimal128"});var at=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(t){return this.value.toString(t)},t.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:(Number.isInteger(this.value)?(e=this.value.toFixed(1)).length>=13&&(e=this.value.toExponential(13).toUpperCase()):e=this.value.toString(),{$numberDouble:e});var e},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},t}();Object.defineProperty(at.prototype,"_bsontype",{value:"Double"});var ut=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=0|+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(t){return this.value.toString(t)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(ut.prototype,"_bsontype",{value:"Int32"});var ct=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(ct.prototype,"_bsontype",{value:"MaxKey"});var ft=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(ft.prototype,"_bsontype",{value:"MinKey"});var lt=new RegExp("^[0-9a-fA-F]{24}$"),pt=null,ht=Symbol("id"),dt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if("object"==typeof e&&e&&"id"in e){if("string"!=typeof e.id&&!ArrayBuffer.isView(e.id))throw new _("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in e&&"function"==typeof e.toHexString?v.from(e.toHexString(),"hex"):e.id}else n=e;if(null==n||"number"==typeof n)this[ht]=t.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[ht]=n instanceof v?n:L(n);else{if("string"!=typeof n)throw new _("Argument passed in does not match the accepted types");if(12===n.length){var r=v.from(n);if(12!==r.byteLength)throw new _("Argument passed in must be a string of 12 bytes");this[ht]=r}else{if(24!==n.length||!lt.test(n))throw new _("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[ht]=v.from(n,"hex")}}t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[ht]},set:function(e){this[ht]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){"number"!=typeof e&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=v.alloc(12);return r.writeUInt32BE(e,0),null===pt&&(pt=A(5)),r[4]=pt[0],r[5]=pt[1],r[6]=pt[2],r[7]=pt[3],r[8]=pt[4],r[11]=255&n,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(null==e)return!1;if(e instanceof t)return this[ht][11]===e[ht][11]&&this[ht].equals(e[ht]);if("string"==typeof e&&t.isValid(e)&&12===e.length&&x(this.id))return e===v.prototype.toString.call(this.id,"latin1");if("string"==typeof e&&t.isValid(e)&&24===e.length)return e.toLowerCase()===this.toHexString();if("string"==typeof e&&t.isValid(e)&&12===e.length)return v.from(e).equals(this.id);if("object"==typeof e&&"toHexString"in e&&"function"==typeof e.toHexString){var n=e.toHexString(),r=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var t=new Date,e=this.id.readUInt32BE(0);return t.setTime(1e3*Math.floor(e)),t},t.createPk=function(){return new t},t.createFromTime=function(e){var n=v.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new _("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(v.from(e,"hex"))},t.isValid=function(e){if(null==e)return!1;try{return new t(e),!0}catch(t){return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(16777215*Math.random()),t}();Object.defineProperty(dt.prototype,"generate",{value:D((function(t){return dt.generate(t)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(dt.prototype,"getInc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt.prototype,"get_inc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt,"get_inc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt.prototype,"_bsontype",{value:"ObjectID"});var gt=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new S("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new S("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new S("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(t){return t?t.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(t){return(t=t||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e){if("string"==typeof e.$regex)return new t(e.$regex,t.parseOptions(e.$options));if("BSONRegExp"===e.$regex._bsontype)return e}if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new _("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(gt.prototype,"_bsontype",{value:"BSONRegExp"});var yt=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(yt.prototype,"_bsontype",{value:"Symbol"});var bt=function(t){function e(n,r){var i=this;return i instanceof e?(i=q.isLong(n)?t.call(this,n.low,n.high,!0)||this:N(n)&&void 0!==n.t&&void 0!==n.i?t.call(this,n.i,n.t,!0)||this:t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return E(e,t),e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(t){return new e(q.fromInt(t,!0))},e.fromNumber=function(t){return new e(q.fromNumber(t,!0))},e.fromBits=function(t,n){return new e(t,n)},e.fromString=function(t,n){return new e(q.fromString(t,!0,n))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(t){return new e(t.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=q.MAX_UNSIGNED_VALUE,e}(q);var mt=2147483647,vt=-2147483648,wt=0x8000000000000000,Et=-0x8000000000000000,St={$oid:dt,$binary:M,$uuid:M,$symbol:yt,$numberInt:ut,$numberDecimal:st,$numberDouble:at,$numberLong:q,$minKey:ft,$maxKey:ct,$regex:gt,$regularExpression:gt,$timestamp:bt};function _t(t,e){if(void 0===e&&(e={}),"number"==typeof t){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=vt&&t<=mt)return new ut(t);if(t>=Et&&t<=wt)return q.fromNumber(t)}return new at(t)}if(null==t||"object"!=typeof t)return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter((function(e){return e.startsWith("$")&&null!=t[e]})),r=0;r<n.length;r++){var i=St[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(null!=t.$date){var o=t.$date,s=new Date;return e.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):q.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&e.relaxed&&s.setTime(o),s}if(null!=t.$code){var a=Object.assign({},t);return t.$scope&&(a.$scope=_t(t.$scope)),j.fromExtendedJSON(t)}if(function(t){return N(t)&&null!=t.$id&&"string"==typeof t.$ref&&(null==t.$db||"string"==typeof t.$db)}(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof H)return u;var c=Object.keys(u).filter((function(t){return t.startsWith("$")})),f=!0;if(c.forEach((function(t){-1===["$ref","$id","$db"].indexOf(t)&&(f=!1)})),f)return H.fromExtendedJSON(u)}return t}function Tt(t){var e=t.toISOString();return 0!==t.getUTCMilliseconds()?e:e.slice(0,-5)+"Z"}function Ot(t,e){if(("object"==typeof t||"function"==typeof t)&&null!==t){var n=e.seenObjects.findIndex((function(e){return e.obj===t}));if(-1!==n){var r=e.seenObjects.map((function(t){return t.propertyName})),i=r.slice(0,n).map((function(t){return"".concat(t," -> ")})).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map((function(t){return"".concat(t," -> ")})).join(""),a=r[r.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new _("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return function(t,e){return t.map((function(t,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Ot(t,e)}finally{e.seenObjects.pop()}}))}(t,e);if(void 0===t)return null;if(t instanceof Date||N(p=t)&&"[object Date]"===Object.prototype.toString.call(p)){var f=t.getTime(),l=f>-1&&f<2534023188e5;return e.legacy?e.relaxed&&l?{$date:t.getTime()}:{$date:Tt(t)}:e.relaxed&&l?{$date:Tt(t)}:{$date:{$numberLong:t.getTime().toString()}}}var p;if(!("number"!=typeof t||e.relaxed&&isFinite(t))){if(Math.floor(t)===t){var h=t>=Et&&t<=wt;if(t>=vt&&t<=mt)return{$numberInt:t.toString()};if(h)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}(t)){var d=t.flags;if(void 0===d){var g=t.toString().match(/[gimuy]*$/);g&&(d=g[0])}return new gt(t.source,d).toExtendedJSON(e)}return null!=t&&"object"==typeof t?function(t,e){if(null==t||"object"!=typeof t)throw new S("not an object instance");var n=t._bsontype;if(void 0===n){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=Ot(t[i],e);"__proto__"===i?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}if(function(t){return N(t)&&Reflect.has(t,"_bsontype")&&"string"==typeof t._bsontype}(t)){var s=t;if("function"!=typeof s.toExtendedJSON){var a=At[t._bsontype];if(!a)throw new _("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return"Code"===n&&s.scope?s=new j(s.code,Ot(s.scope,e)):"DBRef"===n&&s.oid&&(s=new H(Ot(s.collection,e),Ot(s.oid,e),Ot(s.db,e),Ot(s.fields,e))),s.toExtendedJSON(e)}throw new S("_bsontype must be a string, but was: "+typeof n)}(t,e):t}var It,At={Binary:function(t){return new M(t.value(),t.sub_type)},Code:function(t){return new j(t.code,t.scope)},DBRef:function(t){return new H(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new st(t.bytes)},Double:function(t){return new at(t.value)},Int32:function(t){return new ut(t.value)},Long:function(t){return q.fromBits(null!=t.low?t.low:t.low_,null!=t.low?t.high:t.high_,null!=t.low?t.unsigned:t.unsigned_)},MaxKey:function(){return new ct},MinKey:function(){return new ft},ObjectID:function(t){return new dt(t)},ObjectId:function(t){return new dt(t)},BSONRegExp:function(t){return new gt(t.pattern,t.options)},Symbol:function(t){return new yt(t.value)},Timestamp:function(t){return bt.fromBits(t.low,t.high)}};!function(t){function e(t,e){var n=Object.assign({},{relaxed:!0,legacy:!1},e);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(t,(function(t,e){if(-1!==t.indexOf("\0"))throw new S("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(t)));return _t(e,n)}))}function n(t,e,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==e||"object"!=typeof e||Array.isArray(e)||(r=e,e=void 0,n=0);var i=Ot(t,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,e,n)}t.parse=e,t.stringify=n,t.serialize=function(t,e){return e=e||{},JSON.parse(n(t,e))},t.deserialize=function(t,n){return n=n||{},e(JSON.stringify(t),n)}}(It||(It={}));var xt=O();xt.Map?xt.Map:function(){function t(t){void 0===t&&(t=[]),this._keys=[],this._values={};for(var e=0;e<t.length;e++)if(null!=t[e]){var n=t[e],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(t){var e=this._values[t];return null!=e&&(delete this._values[t],this._keys.splice(e.i,1),!0)},t.prototype.entries=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?[n,t._values[n].v]:void 0,done:void 0===n}}}},t.prototype.forEach=function(t,e){e=e||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];t.call(e,this._values[r].v,r,e)}},t.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},t.prototype.has=function(t){return null!=this._values[t]},t.prototype.keys=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},t.prototype.set=function(t,e){return this._values[t]?(this._values[t].v=e,this):(this._keys.push(t),this._values[t]={v:e,i:this._keys.length-1},this)},t.prototype.values=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?t._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0})}(),Math.pow(2,63),Math.pow(2,63);var Nt=Math.pow(2,53),Dt=-Math.pow(2,53);q.fromNumber(Nt),q.fromNumber(Dt),new Set(["$db","$ref","$id","$clusterTime"]);var Lt=new Uint8Array(8);new DataView(Lt.buffer,Lt.byteOffset,Lt.byteLength);v.alloc(17825792);var Pt=function(t,n,r,i){void 0===n&&(n={}),this.name=t,this.properties=n,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.id=i?new dt(i):new dt,this.occurred=(new Date).toISOString(),r&&(this.trigger=new e(r)),this.newEvent=!i},Rt=function(){function t(t){t.s&&(this.s=new Ut(t.s)),t.g&&(this.g=new $t(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 Ct=new RegExp("[^#a-f\\d]","gi"),Bt=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var kt,Ut=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||Ct.test(t)||!Bt.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=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 r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,s=255&r,a="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,s,a]:"css"===e.format?`rgb(${i} ${o} ${s}${1===a?"":` / ${Number((100*a).toFixed(2))}%`})`:{red:i,green:o,blue:s,alpha:a}}(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}(),Mt=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new Ut(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 kt[null!==(t=this.s)&&void 0!==t?t:kt.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(kt||(kt={}));var jt,Ht=function(t){var e;t=null!=t?t:{},this.name=t.name,this.fonts=null===(e=t.fonts)||void 0===e?void 0:e.map((function(t){return new Gt(t)}))},Gt=function(){function t(t){t=null!=t?t:{},this.style=t.style,this.url=t.url}return t.prototype.getFontDescriptor=function(){return{style:this.style===jt.ITALICS||this.style===jt.BOLD_ITALICS?"italic":"normal",weight:this.style===jt.BOLD_ITALICS||this.style===jt.BOLD?"700":"400"}},t.prototype.getURL=function(){return"url('".concat(this.url,"') format('truetype')")},t}();!function(t){t[t.REGULAR=1]="REGULAR",t[t.ITALICS=2]="ITALICS",t[t.BOLD=3]="BOLD",t[t.BOLD_ITALICS=4]="BOLD_ITALICS"}(jt||(jt={}));var Ft,Vt=function(){function t(t){t=null!=t?t:{},this.s=t.s,this.lh=t.lh,t.fmly&&(this.fmly=new Ht(t.fmly))}return Object.defineProperty(t.prototype,"family",{get:function(){return this.fmly},enumerable:!1,configurable:!0}),t}(),$t=function(){function t(t){this.r=t.r,t.c&&(this.c=new Ut(t.c)),t.fb&&(this.fb=new Ut(t.fb))}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}),Object.defineProperty(t.prototype,"fallback",{get:function(){var e;return null!==(e=this.fb)&&void 0!==e?e:t.DEFAULT_FALLBACK},enumerable:!1,configurable:!0}),t.DEFAULT_FALLBACK=new Ut({h:"#000000",a:50}),t}(),Wt=function(){function t(t){var e,n,r,i;t=null!=t?t:{},this.blur=null!==(e=t.blur)&&void 0!==e?e:0,this.spr=null!==(n=t.spr)&&void 0!==n?n:0,this.x=null!==(r=t.x)&&void 0!==r?r:0,this.y=null!==(i=t.y)&&void 0!==i?i:0,this.clr=new Ut(t.clr)}return t.prototype.getStyle=function(t){return"".concat(this.x*t,"px ").concat(this.y*t,"px ")+"".concat(this.blur*t,"px ").concat(this.spr*t,"px ").concat(this.clr.rgba)},t}(),zt=function(){function t(t){var e,n,r,i;t=null!=t?t:{},this.pl=null!==(e=t.pl)&&void 0!==e?e:0,this.pr=null!==(n=t.pr)&&void 0!==n?n:0,this.pt=null!==(r=t.pt)&&void 0!==r?r:0,this.pb=null!==(i=t.pb)&&void 0!==i?i:0}return t.prototype.getHorizontal=function(){return this.pl+this.pr},t.prototype.getVertical=function(){return this.pt+this.pb},t.prototype.getPaddingCSS=function(){return"".concat(this.pt,"px ").concat(this.pr,"px ").concat(this.pb,"px ").concat(this.pl,"px")},t}(),qt=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}(),Jt=function(){function t(t){this.t=t.t,t.bg&&(this.bg=new Rt(t.bg)),t.br&&(this.br=new Mt(t.br)),t.shd&&(this.shd=new Wt(t.shd)),t.spc&&(this.spc=new zt(t.spc)),this.trf=new qt(t.trf),this.clc=t.clc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.a=t.a}return Object.defineProperty(t.prototype,"alpha",{get:function(){var t;return null!==(t=this.a)&&void 0!==t?t:100},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return Ft[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"}(Ft||(Ft={}));var Kt,Yt,Xt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(e){return t.call(this,e)||this}return Xt(e,t),e}(Jt),Qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return Qt(e,t),e}(Jt),ee=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=Kt.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=new Vt(e.f)),e.c&&(n.c=new Ut(e.c)),n}return ee(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}(Jt);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(Kt||(Kt={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(Yt||(Yt={}));var re,ie,oe,se=function(){function e(t,e){this._startTime=t,this._triggerData=e}return Object.defineProperty(e.prototype,"startTime",{get:function(){return this._startTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"triggerData",{get:function(){return this._triggerData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rootClassName",{get:function(){var e=this.triggerData.id.slice(-6);return"test"===e&&(e=this.startTime.getTime().toString()),t.IN_APP_WRAPPER_NAME+"-"+e},enumerable:!1,configurable:!0}),e.prototype.onClose=function(t){this.closeCallback=t},e.prototype.closeInApp=function(t){var e={eventName:t,duration:((new Date).getTime()-this.startTime.getTime())/1e3};this.closeCallback&&this.closeCallback(e)},e}(),ae=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this,e)||this).o=null!==(n=e.o)&&void 0!==n?n:re.C,o.desk=e.desk,o.w=null!==(r=o.w)&&void 0!==r?r:1080,o.h=null!==(i=o.h)&&void 0!==i?i:1920,o}return ae(e,t),e.prototype.getOrigin=function(){return this.o},e}(Jt);!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"}(re||(re={})),function(t){t[t.ABOVE_PAGE=1]="ABOVE_PAGE",t[t.EMBEDDED=2]="EMBEDDED"}(ie||(ie={})),function(t){t[t.LOW=1]="LOW",t[t.MEDIUM=2]="MEDIUM",t[t.HIGH=3]="HIGH"}(oe||(oe={}));var ce,fe,le=function(){function t(t){t=null!=t?t:{},this.en=t.en,this.ex=t.ex}return t.prototype.getEnterAnimation=function(){switch(this.en){case ce.SLIDE_IN_TOP:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case ce.SLIDE_IN_DOWN:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case ce.SLIDE_IN_LEFT:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case ce.SLIDE_IN_RIGHT:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case ce.SLIDE_IN_TOP_LEFT:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_TOP_RIGHT:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_BOTTOM_LEFT:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_BOTTOM_RIGHT:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case ce.POP:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}},t.prototype.getExitAnimation=function(){switch(this.ex){case fe.SLIDE_OUT_TOP:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case fe.SLIDE_OUT_DOWN:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case fe.SLIDE_OUT_LEFT:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case fe.SLIDE_OUT_RIGHT:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case fe.SLIDE_OUT_TOP_LEFT:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case fe.SLIDE_OUT_TOP_RIGHT:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case fe.SLIDE_OUT_BOTTOM_LEFT:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case fe.SLIDE_OUT_BOTTOM_RIGHT:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case fe.POP:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}},t}();!function(t){t[t.NONE=1]="NONE",t[t.SLIDE_IN_TOP=2]="SLIDE_IN_TOP",t[t.SLIDE_IN_DOWN=3]="SLIDE_IN_DOWN",t[t.SLIDE_IN_LEFT=4]="SLIDE_IN_LEFT",t[t.SLIDE_IN_RIGHT=5]="SLIDE_IN_RIGHT",t[t.SLIDE_IN_TOP_LEFT=6]="SLIDE_IN_TOP_LEFT",t[t.SLIDE_IN_TOP_RIGHT=7]="SLIDE_IN_TOP_RIGHT",t[t.SLIDE_IN_BOTTOM_LEFT=8]="SLIDE_IN_BOTTOM_LEFT",t[t.SLIDE_IN_BOTTOM_RIGHT=9]="SLIDE_IN_BOTTOM_RIGHT",t[t.POP=10]="POP"}(ce||(ce={})),function(t){t[t.NONE=1]="NONE",t[t.SLIDE_OUT_TOP=2]="SLIDE_OUT_TOP",t[t.SLIDE_OUT_DOWN=3]="SLIDE_OUT_DOWN",t[t.SLIDE_OUT_LEFT=4]="SLIDE_OUT_LEFT",t[t.SLIDE_OUT_RIGHT=5]="SLIDE_OUT_RIGHT",t[t.SLIDE_OUT_TOP_LEFT=6]="SLIDE_OUT_TOP_LEFT",t[t.SLIDE_OUT_TOP_RIGHT=7]="SLIDE_OUT_TOP_RIGHT",t[t.SLIDE_OUT_BOTTOM_LEFT=8]="SLIDE_OUT_BOTTOM_LEFT",t[t.SLIDE_OUT_BOTTOM_RIGHT=9]="SLIDE_OUT_BOTTOM_RIGHT",t[t.POP=10]="POP"}(fe||(fe={}));var pe,he=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),de=function(e){function n(n){var r,i,o,s=this;return n=null!=n?n:{},(s=e.call(this,n)||this).gvt=null!==(r=n.gvt)&&void 0!==r?r:pe.C,s.max=n.max,s.cover=null===(i=n.cover)||void 0===i||i,s.anim=new le(n.anim),s.embedded=n.embedded,s.position=null!==(o=n.position)&&void 0!==o?o:ie.ABOVE_PAGE,s.spc||(s.spc=new zt({pl:t.IN_APP_DEFAULT_PADDING,pr:t.IN_APP_DEFAULT_PADDING,pt:t.IN_APP_DEFAULT_PADDING,pb:t.IN_APP_DEFAULT_PADDING})),s}return he(n,e),n.prototype.isEmbedded=function(){return this.position===ie.EMBEDDED&&!!this.embedded},n.prototype.getEmbeddedSelector=function(){return".letscooee-engagement.container-".concat(this.embedded)},n}(Jt),ge=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(t){function e(e){var n,r,i,o=this;return e=null!=e?e:{},(o=t.call(this,e)||this).elems=[],o.cont=new ue(e.cont),o.mob=new de(e.mob),o.max=null!==(n=o.max)&&void 0!==n?n:null===(i=null===(r=e.cont)||void 0===r?void 0:r.desk)||void 0===i?void 0:i.max,o.bg||(o.bg=o.cont.bg,delete o.cont.bg),e.elems.forEach((function(t){t.t===Ft.IMAGE?o.elems.push(new te(t)):t.t===Ft.TEXT||t.t===Ft.BUTTON?o.elems.push(new ne(t)):t.t===Ft.SHAPE&&o.elems.push(new Zt(t))})),o}return ge(e,t),e.prototype.getStylesForWrapper=function(){return this.cover?{}:((t=this.gvt===pe.NW?{top:0,left:0}:this.gvt===pe.N?{top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===pe.NE?{top:0,right:0}:this.gvt===pe.E?{top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===pe.SE?{bottom:0,right:0}:this.gvt===pe.S?{bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===pe.SW?{bottom:0,left:0}:this.gvt===pe.W?{top:"50%",left:0,transform:"translateY(-50%)"}:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}).overflow="visible",t);var t},e.prototype.getFlexStylesForContainer=function(){var t,e,n={display:"flex",flexDirection:"row"};return this.gvt===pe.NW?(t="flex-start",e="flex-start"):this.gvt===pe.N?(t="center",e="flex-start"):this.gvt===pe.NE?(t="flex-end",e="flex-start"):this.gvt===pe.W?(t="flex-start",e="center"):this.gvt===pe.E?(t="flex-end",e="center"):this.gvt===pe.SW?(t="flex-start",e="flex-end"):this.gvt===pe.S?(t="center",e="flex-end"):this.gvt===pe.SE?(t="flex-end",e="flex-end"):(t="center",e="center"),n.alignItems=e,n.justifyContent=t,n.overflow="visible",n},e.prototype.overrideForMobileView=function(){var t,e,n,r,i,o,s,a;this.max=null!==(t=this.mob.max)&&void 0!==t?t:this.max,this.cover=null!==(e=this.mob.cover)&&void 0!==e?e:this.cover,this.gvt=null!==(n=this.mob.gvt)&&void 0!==n?n:this.gvt,this.bg=null!==(r=this.mob.bg)&&void 0!==r?r:this.bg,this.spc=null!==(i=this.mob.spc)&&void 0!==i?i:this.spc,this.anim=null!==(o=this.mob.anim)&&void 0!==o?o:this.anim,this.position=null!==(s=this.mob.position)&&void 0!==s?s:this.position,this.embedded=null!==(a=this.mob.embedded)&&void 0!==a?a:this.embedded},e}(de);!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"}(pe||(pe={}));var be=function(){function t(t){var e,n;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=t.ian?new ye(t.ian):void 0,this.previewType=t.previewType,this.delay=null!==(e=t.delay)&&void 0!==e?e:0,this.occurred=null!==(n=t.occurred)&&void 0!==n?n:(new Date).toISOString()}return t.prototype.shouldDelay=function(){return this.delay>0},t.prototype.getDelaySeconds=function(){var t=new Date(this.occurred),e=(new Date).getTime()-t.getTime();return 1e3*this.delay-e},t}(),me=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},ve=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},we=function(){function t(){this.loadedFonts=[]}return t.prototype.loadAllFonts=function(t){var e;return me(this,void 0,void 0,(function(){var n=this;return ve(this,(function(r){return null===(e=t.elems)||void 0===e||e.forEach((function(t){t instanceof ne&&n.loadFamily(t.font.family)})),[2]}))}))},t.prototype.loadFamily=function(t){return me(this,void 0,void 0,(function(){var e;return ve(this,(function(n){switch(n.label){case 0:return(null==t?void 0:t.fonts)?this.loadedFonts.indexOf(t.name)>-1?[2]:(e=[],t.fonts.forEach((function(n){if(n.url){var r=new FontFace(t.name,n.getURL(),n.getFontDescriptor());e.push(r.load())}})),this.loadedFonts.push(t.name),[4,Promise.all(e)]):[2];case 1:return n.sent().forEach((function(t){document.fonts.add(t)})),[2]}}))}))},t}(),Ee=function(t,e){return Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ee(t,e)};function Se(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Te(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Oe(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function Ie(t){return"function"==typeof t}function Ae(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 xe=Ae((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 Ne(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var De=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=_e(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 u=this.initialTeardown;if(Ie(u))try{u()}catch(t){i=t instanceof xe?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var f=_e(c),l=f.next();!l.done;l=f.next()){var p=l.value;try{Re(p)}catch(t){i=null!=i?i:[],t instanceof xe?i=Oe(Oe([],Te(i)),Te(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}}if(i)throw new xe(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Re(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).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)&&Ne(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ne(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Le=De.EMPTY;function Pe(t){return t instanceof De||t&&"closed"in t&&Ie(t.remove)&&Ie(t.add)&&Ie(t.unsubscribe)}function Re(t){Ie(t)?t():t.unsubscribe()}var Ce=null,Be=null,ke=void 0,Ue=!1,Me=!1,je={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=je.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Oe([t,e],Te(n))):setTimeout.apply(void 0,Oe([t,e],Te(n)))},clearTimeout:function(t){var e=je.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function He(){}var Ge=Fe("C",void 0,void 0);function Fe(t,e,n){return{kind:t,value:e,error:n}}var Ve=null;function $e(t){if(Ue){var e=!Ve;if(e&&(Ve={errorThrown:!1,error:null}),t(),e){var n=Ve,r=n.errorThrown,i=n.error;if(Ve=null,r)throw i}}else t()}var We=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Pe(e)&&e.add(n)):n.destination=Ze,n}return Se(e,t),e.create=function(t,e,n){return new Ke(t,e,n)},e.prototype.next=function(t){this.isStopped?Xe(function(t){return Fe("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?Xe(Fe("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?Xe(Ge,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}(De),ze=Function.prototype.bind;function qe(t,e){return ze.call(t,e)}var Je=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ye(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ye(t)}else Ye(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ye(t)}},t}(),Ke=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;return Ie(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Me?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&qe(e.next,o),error:e.error&&qe(e.error,o),complete:e.complete&&qe(e.complete,o)}):i=e,s.destination=new Je(i),s}return Se(e,t),e}(We);function Ye(t){var e;Ue?(e=t,Ue&&Ve&&(Ve.errorThrown=!0,Ve.error=e)):function(t){je.setTimeout((function(){if(!Ce)throw t;Ce(t)}))}(t)}function Xe(t,e){var n=Be;n&&je.setTimeout((function(){return n(t,e)}))}var Ze={closed:!0,next:He,error:function(t){throw t},complete:He},Qe="function"==typeof Symbol&&Symbol.observable||"@@observable";function tn(t){return t}function en(t){return 0===t.length?tn:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var nn=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof We||function(t){return t&&Ie(t.next)&&Ie(t.error)&&Ie(t.complete)}(r)&&Pe(r)?t:new Ke(t,e,n);return $e((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?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 n=this;return new(e=rn(e))((function(e,r){var i=new Ke({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Qe]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return en(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=rn(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function rn(t){var e;return null!==(e=null!=t?t:ke)&&void 0!==e?e:Promise}var on,sn,an=Ae((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),un=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Se(e,t),e.prototype.lift=function(t){var e=new cn(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new an},e.prototype.next=function(t){var e=this;$e((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=_e(e.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;$e((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;$e((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=this.currentObservers=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,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?Le:(this.currentObservers=null,o.push(t),new De((function(){e.currentObservers=null,Ne(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new nn;return t.source=this,t},e.create=function(t,e){return new cn(t,e)},e}(nn),cn=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Se(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.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,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Le},e}(un),fn={now:function(){return(fn.delegate||Date).now()},delegate:void 0},ln=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=fn);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return Se(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(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),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,u=1;u<r.length&&r[u]<=s;u+=2)a=u;a&&r.splice(0,a+1)}},e}(un),pn=n(238),hn=n.n(pn),dn=function(){function t(){this.scalingFactor=1,this.doc=document,this.parser=new(hn())}return t.get=function(){return t._instance||(t._instance=new t),t._instance},t.prototype.getUAParser=function(){return this.parser},t.prototype.getWidth=function(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth},t.prototype.getHeight=function(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight},t.prototype.isMobile=function(){return"mobile"===this.parser.getDevice().type},t.prototype.calculateScalingFactor=function(e){var n=e.max,r=e.cont.w,i=e.cont.h,o=e.spc,s=t.get().getWidth(),a=t.get().getHeight();n&&(s=s?Math.min(s,n):n,a=a?Math.min(a,n):n),a&&(s-=o.getHorizontal(),a-=o.getVertical(),this.scalingFactor=s/a<r/i?s/r:a/i,this.scalingFactor=Math.min(this.scalingFactor,1))},t.prototype.getScalingFactor=function(){return this.scalingFactor},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,n){e&&(n?t.style.setProperty(e,n,"important"):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.removeInApp=function(t){var e=document.querySelector(".".concat(t.rootClassName));e&&e.parentElement.removeChild(e)},t.prototype.setParentContainer=function(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")},t.prototype.isParentNotBody=function(){return this.parentContainer!==document.body},t.DOCUMENT_STANDARD_MODE="CSS1Compat",t}(),gn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},yn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},bn=function(){function t(){this.result={},this.parser=dn.get().getUAParser()}return t.prototype.get=function(){return gn(this,void 0,void 0,(function(){var t;return yn(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,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return gn(this,void 0,void 0,(function(){var t=this;return yn(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(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return gn(this,void 0,void 0,(function(){var t;return yn(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}(),mn=n(145),vn=function(){function t(){}return t.getString=function(e,n){return void 0===n&&(n=""),t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.getObject=function(e){try{return JSON.parse(t.getString(e,""))}catch(t){return{}}},t.getArray=function(e,n){void 0===n&&(n=[]);try{return JSON.parse(t.getString(e,""))||n}catch(t){return n}},t.setObject=function(e,n){t.setString(e,JSON.stringify(n))},t.setArray=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),wn=n(901),En=n.n(wn),Sn=function(){function e(){}return e.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().info.apply(En(),t)},e.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().debug.apply(En(),t)},e.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().error.apply(En(),t)},e.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().warn.apply(En(),t)},e.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().info.apply(En(),t)},e.trace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().trace.apply(En(),t)},e.configure=function(e){void 0===e&&(e=t.LOG_PREFIX),En().useDefaults({formatter:function(n){n.unshift("".concat(e," (v").concat(t.SDK_VERSION,"):"))}}),localStorage.cooeeLogLevel?En().setLevel(En()[localStorage.cooeeLogLevel]):En().setLevel(En().OFF)},e}(),_n=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Tn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},On=function(){function e(){}return e.processConfiguration=function(t){this.saveConfiguration(t).then((function(){Sn.log("Google Analytics configuration processed")})).catch((function(t){Sn.error(t)}))},e.saveConfiguration=function(e){return _n(this,void 0,void 0,(function(){var n;return Tn(this,(function(r){switch(r.label){case 0:return e.gaMeasurementID&&e.gaEnabled?(n=vn.getString(t.STORAGE_GA_MEASUREMENT_ID,""),vn.getBoolean(t.STORAGE_GA_ENABLED,!1)===e.gaEnabled&&n===e.gaMeasurementID?[3,2]:(vn.remove(t.STORAGE_GA_CLIENT_ID),vn.setString(t.STORAGE_GA_MEASUREMENT_ID,e.gaMeasurementID),vn.setBoolean(t.STORAGE_GA_ENABLED,e.gaEnabled),[4,this.sendClientID()])):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e.sendClientID=function(){return _n(this,void 0,void 0,(function(){var e;return Tn(this,(function(n){switch(n.label){case 0:return vn.getBoolean(t.STORAGE_GA_ENABLED,!1)?[4,this.getClientID()]:[2];case 1:return(e=n.sent())?(Wn.getInstance().updateDeviceProps({gaClientID:e}),[2]):[2]}}))}))},e.getClientID=function(){return _n(this,void 0,void 0,(function(){var e;return Tn(this,(function(n){switch(n.label){case 0:return(e=vn.getString(t.STORAGE_GA_CLIENT_ID))?[3,2]:[4,this.getClientIDViaGTag()];case 1:e=n.sent(),n.label=2;case 2:return e?(vn.setString(t.STORAGE_GA_CLIENT_ID,e),[2,e]):[2]}}))}))},e.getClientIDViaGTag=function(){var e=vn.getString(t.STORAGE_GA_MEASUREMENT_ID,"");if(vn.getString(t.STORAGE_GA_MEASUREMENT_ID,"")&&e&&window.gtag)return new Promise((function(t){window.gtag("get",e,"client_id",(function(e){t(e)}))}))},e}(),In=function(e,n,r,i){this.appID=e,this.shopifyShop=n,this.uuid=r,this.props=i,this.sdk=t.SDK},An=n(716),xn=function(){function t(){}return t.addReferralData=function(t){Object.assign(t,this.getUTMParams()),t.referrer=this.getReferrer()},t.getReferrer=function(){if(document.referrer&&"".concat(location.origin,"/")!==document.referrer)return document.referrer.replace(location.origin,"")},t.getUTMParams=function(){var t;try{t=new An.U(location.href)}catch(t){return{}}var e={};return this.UTM_PARAMS.forEach((function(n){var r=t.getQueryParam(n);r&&(e[n]=r)})),e},t.UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],t}(),Nn=function(){function e(){this.inInactive=!1,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(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,vn.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime()),Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))},e.prototype.setActive=function(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.setScreen=function(t){this.screen=t},e.prototype.getScreen=function(){return this.screen},e.INSTANCE=new e,e}(),Dn=function(){function t(){}return t.watch=function(){var t=this.getDebugParam();"1"!==t&&"on"!==t||(localStorage.cooeeLogLevel="TRACE"),"on"===t?sessionStorage.cooeeDebug="1":"off"===t&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())},t.prepend=function(t){if(this.isOn){var e=document.createElement("div");e.innerHTML="• "+(new Date).toLocaleString()+" - "+t,this.element.prepend(e)}},t.renderDebugBar=function(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)},t.getDebugParam=function(){var t;return null===(t=new URL(location.href).searchParams)||void 0===t?void 0:t.get("cooee-debug")},t.dragElement=function(){var t=this,e=0,n=0,r=0,i=0,o=function(o){(o=o||window.event).preventDefault(),e=r-o.clientX,n=i-o.clientY,r=o.clientX,i=o.clientY,t.element.style.top=t.element.offsetTop-n+"px",t.element.style.left=t.element.offsetLeft-e+"px"},s=function(){document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=function(t){(t=t||window.event).preventDefault(),r=t.clientX,i=t.clientY,document.onmouseup=s,document.onmousemove=o}},t.isOn=!1,t}(),Ln=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.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(this.currentSessionStartTime=new Date,this.currentSessionID=(new dt).toHexString(),Dn.prepend("Session ID: <strong>".concat(this.currentSessionID,"</strong>")),vn.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),vn.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber(),Wn.getInstance().sendEvent(new Pt(t.EVENT_SESSION_STARTED)))},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=vn.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,vn.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.conclude=function(){var e={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Wn.getInstance().concludeSession(e),vn.remove(t.STORAGE_ACTIVE_TRIGGER),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,vn.remove(t.STORAGE_SESSION_ID),vn.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.isNewSessionRequired=function(){if(!vn.getString(t.STORAGE_SESSION_ID,""))return!0;var e=vn.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.getTotalDurationInSeconds=function(){if(Nn.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(vn.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=vn.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=vn.getNumber(t.STORAGE_SESSION_NUMBER,1),Dn.prepend("Session ID: <strong>".concat(this.currentSessionID,"</strong>"))},e.prototype.getLastActive=function(){return vn.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),Pn=function(){function t(){}return t.trackDeviceID=function(t){this.isInstalled()},t.trackIntent=function(t){var e;if(this.isInstalled()){var n=null===(e=oe[t])||void 0===e?void 0:e.toLowerCase();n&&(Sn.debug("Sending ".concat(n," intent to MS Clarity")),window.clarity("set","Cooee Intent",n))}},t.isInstalled=function(){return window.clarity&&"function"==typeof window.clarity},t}(),Rn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Cn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Bn=function(){function n(){this.runtimeData=Nn.getInstance(),this.apiToken="",this.userID=""}return n.getInstance=function(){return this.INSTANCE},n.prototype.registerDevice=function(t){return Rn(this,void 0,void 0,(function(){return Cn(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",this.getDefaultHeaders(),t)]}))}))},n.prototype.sendEvent=function(n){var r=this;Dn.prepend("Sending event <strong>".concat(n.name.replace("CE ",""),"</strong> with id ").concat(n.id));var i=this.getDefaultHeaders(),o=new e(vn.getObject(t.STORAGE_ACTIVE_TRIGGER));!n.trigger&&o&&(o.updateExpired(),n.trigger=o,"test"===o.triggerID)||(n.name!==t.EVENT_APP_BACKGROUND&&Nn.getInstance().setActive(),this.doHTTP("POST","/v1/event/track",i,n).then((function(t){Sn.log("Sent",n.name),t.triggerData&&(t.triggerData.occurred=n.occurred,(new cr).render(t.triggerData)),r.updateUserIDAndToken({userID:t.userID,deviceID:t.deviceID,sdkToken:t.sdkToken});var e="Event <strong>".concat(t.eventName,"</strong> tracked");t.intent&&(e+=" and <strong>".concat(oe[t.intent],"</strong> intent calculated"),Pn.trackIntent(t.intent)),Dn.prepend(e)})).catch((function(t){Sn.error("Error sending event",t)})))},n.prototype.updateUserData=function(t){var e=this,n=this.getDefaultHeaders();this.doHTTP("PUT","/v1/user/update",n,t).then((function(t){Sn.log("Updated user profile"),e.updateUserIDAndToken(t)})).catch((function(t){Sn.error("Error saving user profile",t)}))},n.prototype.updateUserIDAndToken=function(e){e&&Object.keys(e).length&&(e.userID&&vn.setString(t.STORAGE_USER_ID,e.userID),e.deviceID&&vn.setString(t.STORAGE_DEVICE_ID,e.deviceID),e.sdkToken&&(this.setAPIToken(e.sdkToken),vn.setString(t.STORAGE_SDK_TOKEN,e.sdkToken)))},n.prototype.updateDeviceProps=function(e){var n=this.getDefaultHeaders();this.doHTTP("PUT","/v1/device/update",n,e).then((function(){Sn.log("Updated device property")})).catch((function(n){var r;Sn.error("Error saving device property",n),(null===(r=null==e?void 0:e.cart)||void 0===r?void 0:r.token)&&vn.remove(t.STORAGE_SHOPIFY_CART_TOKEN)}))},n.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();this.doHTTP("POST","/v1/session/conclude",e,t).then((function(t){Sn.log("Conclude Session",t)})).catch((function(t){Sn.error(t)}))},n.prototype.logout=function(){var t=this,e=this.getDefaultHeaders();this.doHTTP("GET","/v1/user/logout",e).then((function(e){Sn.log("User logged out"),t.updateUserIDAndToken(e),Ln.getInstance().startNewSession()})).catch((function(t){Sn.error(t)}))},n.prototype.getAppConfigurations=function(){var e=this.getDefaultHeaders(),n=vn.getString(t.STORAGE_APP_ID);this.doHTTP("GET","/v1/app/configuration/".concat(n),e).then((function(t){Sn.log("Received app configuration"),On.processConfiguration(t)})).catch((function(t){Sn.error(t)}))},n.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},n.prototype.doHTTP=function(e,n,r,i){return Rn(this,void 0,void 0,(function(){var o,s,a;return Cn(this,(function(u){switch(u.label){case 0:return n.startsWith("http")||(n=t.API_URL+n),o="keepalive"in new Request(""),i&&!o&&JSON.stringify(i).includes("CE App Background")?[2,this.performXMLHttpRequest(n,r,i)]:(s={method:e,headers:r,keepalive:!0},i&&(s.body=JSON.stringify(i)),[4,fetch(n,s)]);case 1:if(!(a=u.sent()).ok)throw a;return[2,a.json()]}}))}))},n.prototype.performXMLHttpRequest=function(t,e,n){var r=new XMLHttpRequest;return r.open("POST",t,!1),e.forEach((function(t,e){r.setRequestHeader(e,t)})),r.send(JSON.stringify(n)),r.response.json()},n.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("content-type","application/json"),e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),this.apiToken&&e.append("x-sdk-token",this.apiToken),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},n.INSTANCE=new n,n}(),kn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Un=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Mn=function(){function e(){this.apiService=Bn.getInstance(),this.sdkToken="",this.userID="",this.deviceID="",this.appID="",this.shopifyShop=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t){return this.appID=t.appID,this.shopifyShop=t.shopifyShop,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!vn.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.getDeviceID=function(){return this.deviceID},e.prototype.acquireSDKToken=function(){return kn(this,void 0,void 0,(function(){return Un(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(Sn.log("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.userID,this.deviceID=e.deviceID,this.updateAPIClient(),vn.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),vn.setString(t.STORAGE_USER_ID,this.userID),vn.setString(t.STORAGE_DEVICE_ID,this.deviceID),e.appID&&vn.setString(t.STORAGE_APP_ID,e.appID)},e.prototype.populateUserDataFromStorage=function(){return kn(this,void 0,void 0,(function(){return Un(this,(function(e){return this.sdkToken=vn.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||Sn.warn("No SDK token found in local storage"),this.userID=vn.getString(t.STORAGE_USER_ID,""),this.userID||Sn.warn("No user ID found in local storage"),this.deviceID=vn.getString(t.STORAGE_DEVICE_ID,""),this.deviceID||Sn.warn("No device ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){Sn.log("SDK Token:",this.sdkToken),Sn.log("Device ID:",this.deviceID),Sn.log("User ID:",this.userID),Pn.trackDeviceID(this.deviceID),Dn.prepend("Device ID: <strong>".concat(this.deviceID,"</strong>")),this.apiService.setAPIToken(this.sdkToken)},e.prototype.getSDKTokenFromServer=function(){return kn(this,void 0,void 0,(function(){var t,e,n,r;return Un(this,(function(i){switch(i.label){case 0:return[4,this.getDeviceAuthRequest()];case 1:t=i.sent(),e=this.apiService.registerDevice(t),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e];case 3:return n=i.sent(),Sn.log("Register Device Response",n),this.saveUserDataInStorage(n),On.processConfiguration(n),[3,5];case 4:throw r=i.sent(),Sn.error(r),r;case 5:return[2]}}))}))},e.prototype.getDeviceAuthRequest=function(){return kn(this,void 0,void 0,(function(){var t,e;return Un(this,(function(n){switch(n.label){case 0:return[4,(new bn).get()];case 1:t=n.sent(),xn.addReferralData(t),t.host=location.origin,n.label=2;case 2:return n.trys.push([2,4,,5]),[4,(0,mn.r)()];case 3:return(null==(e=n.sent())?void 0:e.isPrivate)&&(t.private=!0),[3,5];case 4:return n.sent(),[3,5];case 5:return[2,new In(this.appID,this.shopifyShop,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=vn.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new dt).toHexString(),vn.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),jn=function(){function e(){}var n;return e.getString=function(t,e){return this.getItem(t)||e},e.setString=function(t,e){this.setItem(t,e)},e.remove=function(t){this.removeItem(t)},e.getItem=function(t){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t))},e.setItem=function(t,e){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t),e)},e.removeItem=function(t){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t))},e.getAppID=function(){return vn.getString(t.STORAGE_APP_ID)},n=e,e.SESSION_STORAGE=window.sessionStorage,e.SESSION_STORAGE_KEY_PREFIX=t.COOEE.concat("/",n.getAppID(),"/"),e}(),Hn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Gn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Fn=function(){function e(){this.sessionManager=Ln.getInstance(),this.safeHttpCallService=Wn.getInstance(),this.deviceAuthService=Mn.getInstance()}return e.prototype.init=function(n){var r=this;t.BOT_UA_REGEX.test(navigator.userAgent)?Sn.log("This seems to be a bot. Disabling SDK"):(this.deviceAuthService.init(n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(n)}),3e4)})),this.execute())},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():(this.sendSuccessiveLaunchEvent(),this.safeHttpCallService.getAppConfigurations())},e.prototype.isAppFirstTimeLaunch=function(){return!!vn.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(vn.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Hn(this,void 0,void 0,(function(){var e,n;return Gn(this,(function(r){switch(r.label){case 0:return e=new Pt(t.EVENT_APP_INSTALLED,{}),n=e,[4,(new bn).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Hn(this,void 0,void 0,(function(){var e,n;return Gn(this,(function(r){switch(r.label){case 0:return this.isNewTabOpened()?(e=new Pt(t.EVENT_APP_LAUNCHED),n=e,[4,(new bn).get()]):[2];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.isNewTabOpened=function(){return!jn.getString(t.SESSION_STORAGE_TAB_OPENED,"")&&(jn.setString(t.SESSION_STORAGE_TAB_OPENED,"1"),!0)},e.replaySubject=new ln(1),e}(),Vn=function(){function t(){}return t.isShopify=function(){return!!window.Shopify},t.getShopName=function(){var t,e;if(this.isShopify())return null===(e=null===(t=window.Shopify.shop)||void 0===t?void 0:t.split("."))||void 0===e?void 0:e[0]},t.getScreenName=function(){if(this.isShopify()){var t=new URL(window.location.href).pathname.slice(1).split("/")[0];return""===t?"home":"collections"===t?"collection":"products"===t?"product":"cart"===t?"cart":void 0}},t}(),$n=function(){function t(){}return t.isECommerceApp=function(){return Vn.isShopify()},t}(),Wn=function(){function e(){this.httpApiService=Bn.getInstance(),this.sessionManager=Ln.getInstance(),this.rejectEvents=[t.EVENT_SCREEN_VIEW,t.EVENT_APP_LAUNCHED]}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.sendEvent=function(t){var e=this;this.shouldReject(t)||Fn.replaySubject.subscribe((function(){e.addEventData(t),e.httpApiService.sendEvent(t)}))},e.prototype.updateProfile=function(t){var e=this;t=null!=t?t:{},Fn.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},e.prototype.updateDeviceProps=function(t,e){var n=this;Fn.replaySubject.subscribe((function(){n.httpApiService.updateDeviceProps({props:t,cart:e})}))},e.prototype.concludeSession=function(t){var e=this;Fn.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},e.prototype.logout=function(){var t=this;Fn.replaySubject.subscribe((function(){t.httpApiService.logout()}))},e.prototype.getAppConfigurations=function(){var t=this;Fn.replaySubject.subscribe((function(){t.httpApiService.getAppConfigurations()}))},e.prototype.addEventData=function(t){t.screenName=Nn.getInstance().getScreen(),t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber(),xn.addReferralData(t.properties)},e.prototype.shouldReject=function(t){return!($n.isECommerceApp()||!this.rejectEvents.includes(t.name)&&t.name.startsWith("CE ")||(Sn.log("Rejecting ".concat(t.name," as this is not e-commerce app")),0))},e}();!function(t){t[t.CAMERA=1]="CAMERA",t[t.LOCATION=2]="LOCATION",t[t.PUSH=3]="PUSH"}(on||(on={})),function(t){t[t.IAB=1]="IAB",t[t.EXTERNAL=2]="EXTERNAL",t[t.PROMPT=3]="PROMPT",t[t.SAME_TAB=4]="SAME_TAB",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.KV_VIEW_ITEM=101]="KV_VIEW_ITEM",t[t.KV_ADD_TO_CART=102]="KV_ADD_TO_CART",t[t.KV_COUPON_CODE=103]="KV_COUPON_CODE",t[t.KV_VIEW_CATEGORY=104]="KV_VIEW_CATEGORY"}(sn||(sn={}));var zn=function(){function n(){}return n.storeActiveTrigger=function(n){if((null==n?void 0:n.id)&&"test"!==n.id){var r=new e(n);return vn.setObject(t.STORAGE_ACTIVE_TRIGGER,r),r}},n}(),qn=function(){return qn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},qn.apply(this,arguments)},Jn=function(){function e(t,e){this.action=t,this.apiService=Wn.getInstance(),this.triggerContext=e}return e.prototype.execute=function(){this.closeAction();var t=this.action.custKV;switch(this.action.at){case sn.EXTERNAL:this.externalAction();break;case sn.IAB:this.iabAction();break;case sn.SAME_TAB:this.gotoURLAction();break;case sn.SHARE:this.shareAction();break;case sn.PROMPT:this.prompt();break;case sn.KEY_VALUE:case sn.KV_ADD_TO_CART:case sn.KV_COUPON_CODE:case sn.KV_VIEW_CATEGORY:case sn.KV_VIEW_ITEM:t=qn(qn({},t),this.action.kv);break;case void 0:break;default:return void Sn.error("Received an invalid ClickActionType: ",this.action.at)}this.upAction(),this.kvAction(t)},e.prototype.externalAction=function(){var t,e;if(null===(t=this.action.ext)||void 0===t?void 0:t.u){var n=this.action.ext.u;this.isValidURL(n)||(n="//".concat(n)),null===(e=window.open(n,"_blank"))||void 0===e||e.focus()}},e.prototype.isValidURL=function(t){try{new URL(t)}catch(t){return!1}return!0},e.prototype.gotoURLAction=function(){var t;if(null===(t=this.action.gu)||void 0===t?void 0:t.u){var e=this.action.gu.u;this.isValidURL(e)||(e="//".concat(e)),window.open(e,"_self")}},e.prototype.iabAction=function(){var t;if(null===(t=this.action.iab)||void 0===t?void 0:t.u){var e=this.action.iab.u;this.isValidURL(e)||(e="//".concat(e)),(new sr).render(e)}},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(t){document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:t}))},e.prototype.prompt=function(){var t=this.action.pmpt;t&&(t===on.LOCATION&&this.promptLocationPermission(),t===on.PUSH&&this.promptPushNotificationPermission(),t===on.CAMERA&&this.promptCameraPermission())},e.prototype.closeAction=function(){var e;this.containsCTA()?(e=t.EVENT_TRIGGER_CLICKED,zn.storeActiveTrigger(this.triggerContext.triggerData)):e=t.EVENT_TRIGGER_CLOSED,this.action.close&&this.triggerContext.closeInApp(e)},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)})):Sn.warn("Navigator.share is not compatible with this browser"))},e.prototype.containsCTA=function(){return!!this.action.at||!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))},e.prototype.isEmpty=function(t){return!t||0===Object.keys(t).length},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}):Sn.warn("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,r=function(){var t,e,n;return function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateDeviceProps({perm:e})}))},e}(),Kn=function(){function t(t,e,n){this.renderer=dn.get(),this.screenWidth=0,this.screenHeight=0,this.parentHTMLEl=t,this.inappElement=e,this.triggerContext=n,this.scalingFactor=this.renderer.getScalingFactor(),this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return t.prototype.getHTMLElement=function(){return this.inappHTMLEl},t.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},t.prototype.processCommonBlocks=function(){this.processDisplay(),this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},t.prototype.processDisplay=function(){this.renderer.setStyle(this.inappHTMLEl,"display","block")},t.prototype.processWidthAndHeight=function(){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))},t.prototype.getSizePx=function(t){return this.getScaledSize(t)+"px"},t.prototype.getScaledSize=function(t){return t*this.scalingFactor},t.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))},t.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")))},t.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(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"))},t.prototype.processTransparency=function(){var t=this.inappElement.alpha;if(!isNaN(t)){var e=(t/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",e)}},t.prototype.processShadow=function(){var t=this.inappElement.shd;t&&this.renderer.setStyle(this.inappHTMLEl,"box-shadow",t.getStyle(this.scalingFactor))},t.prototype.processTransformBlock=function(){var t=new qt(this.inappElement.trf);t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate(".concat(t.rotate,"deg)"))},t.prototype.registerAction=function(){var t=this,e=this.inappElement.clc;e&&0!==Object.keys(e).length&&(this.inappHTMLEl.addEventListener("click",(function(n){n.stopPropagation(),new Jn(e,t.triggerContext).execute()})),this.inappElement instanceof ue&&1===Object.keys(e).length&&void 0!==e.close&&null!==e.close||this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))},t.prototype.processBackgroundBlock=function(){var t=this.inappElement.bg;if(t){var e=this.inappHTMLEl;if(t.glossy){var n="backdrop-filter",r="-webkit-"+n,i="blur(".concat(t.glossy.radius,"px)");if(!CSS.supports(r,i)&&!CSS.supports(n,i))return void this.renderer.setStyle(e,"background",t.glossy.fallback.rgba);this.renderer.setStyle(e,r,i),this.renderer.setStyle(e,n,i),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 o='url("'.concat(t.img.src,'") no-repeat center');this.renderer.setStyle(e,"background",o),this.renderer.setStyle(e,"background-size","cover"),t.img.a&&(this.renderer.setStyle(e,"-webkit-backdrop-filter","opacity(".concat(t.img.a,")")),this.renderer.setStyle(e,"backdrop-filter","opacity(".concat(t.img.a,")")))}}},t.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient(".concat(t.ang,"deg, ").concat(t.c1,", ").concat(t.c2);t.c3&&(n+=", ".concat(t.c3)),n+=")",this.renderer.setStyle(this.inappHTMLEl,e,n)}},t.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},t}(),Yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return Yn(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.renderer.setStyle(this.inappHTMLEl,"letter-spacing","normal");var e=this.inappElement.font;e&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(e.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",null===(t=e.family)||void 0===t?void 0:t.name),this.renderer.setStyle(this.inappHTMLEl,"line-height",e.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.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",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit"),this.renderer.setStyle(t,"font-family","inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=Kt[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(Kn),Zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qn=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return Zn(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n,r,i=e.renderer.createElement("span");i.innerHTML=null===(r=null===(n=t.txt)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(Xn),tr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),er=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return tr(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(Kn),nr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("img"),i.insertElement(),i}return nr(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,"margin","0 auto"),this.processCommonBlocks()},e}(Kn),ir=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(e){function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.parent=t,i.inappHTMLEl=i.renderer.createElement("div"),i}return ir(n,e),n.prototype.render=function(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(t.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",n.MAX_Z_INDEX),this.inappHTMLEl},n.prototype.processBackgroundBlock=function(){this.inappElement.cover&&e.prototype.processBackgroundBlock.call(this)},n.prototype.processWidthAndHeight=function(){var t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{var e=this.inappElement.spc,n=this.getScaledSize(t.w)+e.getHorizontal(),r=this.getScaledSize(t.h)+e.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",r+"px")}},n.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;this.renderer.setStyle(this.inappHTMLEl,"padding",t.getPaddingCSS())},n.prototype.processDisplay=function(){this.renderer.setStyle(this.inappHTMLEl,"display","flex"),Object.assign(this.inappHTMLEl.style,this.inappElement.getStylesForWrapper()),Object.assign(this.inappHTMLEl.style,this.inappElement.getFlexStylesForContainer())},n.prototype.processPositionBlock=function(){var t;if(this.renderer.isParentNotBody()){if(null===(t=this.triggerContext.triggerData.ian)||void 0===t?void 0:t.isEmbedded())return void this.renderer.setStyle(this.inappHTMLEl,"position","block");this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")},n.prototype.processBorderBlock=function(){},n.prototype.processTransparency=function(){},n.prototype.processTransformBlock=function(){},n.prototype.processGradient=function(){},n.prototype.processShadow=function(){},n.prototype.registerAction=function(){var t=this;this.inappHTMLEl.addEventListener("click",(function(){new Jn({close:!0},t.triggerContext).execute()}))},n.MAX_Z_INDEX="2147483647",n}(Kn),sr=function(){function e(){this.renderer=dn.get()}return e.prototype.render=function(e){var n=document.querySelector(".".concat(t.IN_APP_WRAPPER_NAME)),r=this.createIFrameContainer();return this.createIFrameElement(r,e),this.createAnchorElement(n,r),this.renderer.appendChild(n,r),r},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 n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},e.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},e}(),ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ur=function(e){function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return ar(n,e),n.prototype.render=function(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(t.IN_APP_CONTAINER_NAME),this},n}(Kn),cr=function(){function e(t){var e=this;this.renderer=dn.get(),this.safeHTTP=Wn.getInstance(),this.resizeListener=function(){return e.screenResized()},this.setParentContainer(t)}return e.prototype.setParentContainer=function(t){this.parent=null!=t?t:document.body,this.renderer.setParentContainer(this.parent)},e.prototype.render=function(t){var e=this,n=new be(t);if(this.triggerContext=new se(new Date,n),this.triggerContext.onClose((function(t){e.closeInApp(t)})),this.ian=n.ian,(this.renderer.isMobile()||"mobile"===n.previewType)&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){var r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}n.shouldDelay()?window.setTimeout((function(){e.startRenderingOnce()}),n.getDelaySeconds()):this.startRenderingOnce()},e.prototype.startRenderingOnce=function(){try{this.startRendering()}catch(t){return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener)},e.prototype.startRendering=function(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new or(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw Sn.error(t),t}},e.prototype.sendTriggerDisplayed=function(){var e=new Pt(t.EVENT_TRIGGER_DISPLAYED,{},this.triggerContext.triggerData);this.safeHTTP.sendEvent(e)},e.prototype.sendTriggerClosed=function(t){var e=t.eventName;delete t.eventName;var n=new Pt(e,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n)},e.prototype.addEnterAnimation=function(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})},e.prototype.renderElement=function(t,e,n){e instanceof ne?new Qn(t,e,n).render():e instanceof te?new rr(t,e,n).render():e instanceof Zt?new er(t,e,n).render():Sn.error("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(t){var e,n,r=this,i=null===(e=this.ian)||void 0===e?void 0:e.cont;i&&(this.containerHTMLElement=new ur(this.rootContainer,i,t).render().getHTMLElement(),(new we).loadAllFonts(this.ian),null===(n=this.ian.elems)||void 0===n||n.forEach((function(e){return n=r,i=void 0,s=function(){return function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=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.renderElement(this.containerHTMLElement,e,t)];case 1:return n.sent(),[2]}}))},new((o=void 0)||(o=Promise))((function(t,e){function r(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(r,a)}u((s=s.apply(n,i||[])).next())}));var n,i,o,s})),this.addEnterAnimation(this.ian.anim))},e.prototype.closeInApp=function(t){var e=this,n=this.ian.anim.getExitAnimation();this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"}).onfinish=function(){e.removeInApp(),e.sendTriggerClosed(t),window.removeEventListener("resize",e.resizeListener)}},e.prototype.screenResized=function(){this.removeInApp(),this.startRendering()},e.prototype.removeInApp=function(){dn.get().removeInApp(this.triggerContext)},e}();const fr=cr})(),CooeePreview=r.default})();
|
|
2
|
+
(()=>{var t={716:(t,e)=>{"use strict";e.U=void 0;var n=function(){function t(t){try{this.base=new URL(t),this.params=new URLSearchParams(this.base.search.slice(1))}catch(t){console.error("Un-parsable URL",t)}}return t.prototype.appendQueryParam=function(t,e){this.params.append(t,e?e.toString():"")},t.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},t.prototype.deleteQueryParam=function(t){this.params.delete(t)},t.prototype.getBase=function(){return this.base},t.prototype.getPath=function(){return this.base.pathname},t.prototype.getHostname=function(){return this.base.hostname},t.prototype.getParams=function(){return this.params},t.prototype.getQueryParam=function(t){if(!this.params)return"";var e=this.params.get(t);return e&&"undefined"!==e&&"null"!==e?e:void 0},t.prototype.getQueryString=function(){return this.params.toString()},t.prototype.setPath=function(t){return this.base.pathname=t,this},t.prototype.setQueryParam=function(t,e){return this.params.set(t,e?e.toString():""),this},t.prototype.setQueryString=function(t){if(t)return"?"===t[0]&&(t=t.slice(1)),this.params=new URLSearchParams(t),this},t.prototype.toString=function(){var t=this.params.toString();return this.base.search=""===t?"":"?"+t,this.base.toString()},t}();e.U=n},145:(t,e)=>{"use strict";e.r=void 0,e.r=function(){return new Promise((function(t,e){var n,r,i="Unknown";function o(e){t({isPrivate:e,browserName:i})}function s(t){return t===eval.toString().length}void 0!==(r=navigator.vendor)&&0===r.indexOf("Apple")&&s(37)?(i="Safari",void 0!==navigator.maxTouchPoints?function(){var t=String(Math.random());try{window.indexedDB.open(t,1).onupgradeneeded=function(e){var n,r,i=null===(n=e.target)||void 0===n?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),o(!1)}catch(t){var s=t;return t instanceof Error&&(s=null!==(r=t.message)&&void 0!==r?r:t),o("string"==typeof s&&/BlobURLs are not yet supported/.test(s))}finally{i.close(),window.indexedDB.deleteDatabase(t)}}}catch(t){return o(!1)}}():function(){var t=window.openDatabase,e=window.localStorage;try{t(null,null,null,null)}catch(t){return o(!0)}try{e.setItem("test","1"),e.removeItem("test")}catch(t){return o(!0)}o(!1)}()):function(){var t=navigator.vendor;return void 0!==t&&0===t.indexOf("Google")&&s(33)}()?(n=navigator.userAgent,i=n.match(/Chrome/)?void 0!==navigator.brave?"Brave":n.match(/Edg/)?"Edge":n.match(/OPR/)?"Opera":"Chrome":"Chromium",void 0!==self.Promise&&void 0!==self.Promise.allSettled?navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,e){var n;o(e<(void 0!==(n=window).performance&&void 0!==n.performance.memory&&void 0!==n.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824))}),(function(t){e(new Error("detectIncognito somehow failed to query storage quota: "+t.message))})):(0,window.webkitRequestFileSystem)(0,1,(function(){o(!1)}),(function(){o(!0)}))):void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&s(37)?(i="Firefox",o(void 0===navigator.serviceWorker)):void 0!==navigator.msSaveBlob&&s(39)?(i="Internet Explorer",o(void 0===window.indexedDB)):e(new Error("detectIncognito cannot determine the browser"))}))}},901:function(t,e,n){var r,i;!function(o){"use strict";var s,a={VERSION:"1.6.1"},u={},c=function(t,e){return function(){return e.apply(t,arguments)}},f=function(){var t,e,n=arguments,r=n[0];for(e=1;e<n.length;e++)for(t in n[e])!(t in r)&&n[e].hasOwnProperty(t)&&(r[t]=n[e][t]);return r},l=function(t,e){return{value:t,name:e}};a.TRACE=l(1,"TRACE"),a.DEBUG=l(2,"DEBUG"),a.INFO=l(3,"INFO"),a.TIME=l(4,"TIME"),a.WARN=l(5,"WARN"),a.ERROR=l(8,"ERROR"),a.OFF=l(99,"OFF");var p=function(t){this.context=t,this.setLevel(t.filterLevel),this.log=this.info};p.prototype={setLevel:function(t){t&&"value"in t&&(this.context.filterLevel=t)},getLevel:function(){return this.context.filterLevel},enabledFor:function(t){var e=this.context.filterLevel;return t.value>=e.value},trace:function(){this.invoke(a.TRACE,arguments)},debug:function(){this.invoke(a.DEBUG,arguments)},info:function(){this.invoke(a.INFO,arguments)},warn:function(){this.invoke(a.WARN,arguments)},error:function(){this.invoke(a.ERROR,arguments)},time:function(t){"string"==typeof t&&t.length>0&&this.invoke(a.TIME,[t,"start"])},timeEnd:function(t){"string"==typeof t&&t.length>0&&this.invoke(a.TIME,[t,"end"])},invoke:function(t,e){s&&this.enabledFor(t)&&s(e,f({level:t},this.context))}};var h,d=new p({filterLevel:a.OFF});(h=a).enabledFor=c(d,d.enabledFor),h.trace=c(d,d.trace),h.debug=c(d,d.debug),h.time=c(d,d.time),h.timeEnd=c(d,d.timeEnd),h.info=c(d,d.info),h.warn=c(d,d.warn),h.error=c(d,d.error),h.log=h.info,a.setHandler=function(t){s=t},a.setLevel=function(t){for(var e in d.setLevel(t),u)u.hasOwnProperty(e)&&u[e].setLevel(t)},a.getLevel=function(){return d.getLevel()},a.get=function(t){return u[t]||(u[t]=new p(f({name:t},d.context)))},a.createDefaultHandler=function(t){(t=t||{}).formatter=t.formatter||function(t,e){e.name&&t.unshift("["+e.name+"]")};var e={},n=function(t,e){Function.prototype.apply.call(t,console,e)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var o,s=console.log;i.level===a.TIME?(o=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(o):e[o]=(new Date).getTime():console.timeEnd?console.timeEnd(o):n(s,[o+": "+((new Date).getTime()-e[o])+"ms"])):(i.level===a.WARN&&console.warn?s=console.warn:i.level===a.ERROR&&console.error?s=console.error:i.level===a.INFO&&console.info?s=console.info:i.level===a.DEBUG&&console.debug?s=console.debug:i.level===a.TRACE&&console.trace&&(s=console.trace),t.formatter(r,i),n(s,r))}},a.useDefaults=function(t){a.setLevel(t&&t.defaultLevel||a.DEBUG),a.setHandler(a.createDefaultHandler(t))},a.setDefaults=a.useDefaults,void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}()},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",u="object",c="string",f="model",l="name",p="type",h="vendor",d="version",g="architecture",y="console",b="mobile",m="tablet",v="smarttv",w="wearable",E="embedded",S="Amazon",_="Apple",T="ASUS",O="BlackBerry",I="Google",A="Huawei",x="LG",N="Microsoft",D="Motorola",L="Samsung",P="Sharp",R="Sony",C="Xiaomi",B="Zebra",k="Facebook",U=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},M=function(t,e){return typeof t===c&&-1!==j(e).indexOf(j(t))},j=function(t){return t.toLowerCase()},H=function(t,e){if(typeof t===c)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e===a?t:t.substring(0,350)},G=function(t,e){for(var n,r,i,a,c,f,l=0;l<e.length&&!c;){var p=e[l],h=e[l+1];for(n=r=0;n<p.length&&!c;)if(c=p[n++].exec(t))for(i=0;i<h.length;i++)f=c[++r],typeof(a=h[i])===u&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,f):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=f?f.replace(a[1],a[2]):o:this[a[0]]=f?a[1].call(this,f,a[2]):o:4===a.length&&(this[a[0]]=f?a[3].call(this,f.replace(a[1],a[2])):o):this[a]=f||o;l+=2}},F=function(t,e){for(var n in e)if(typeof e[n]===u&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(M(e[n][r],t))return"?"===n?o:n}else if(M(e[n],t))return"?"===n?o:n;return t},V={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[d,[l,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[d,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure Browser"],d],[/\bfocus\/([\w\.]+)/i],[d,[l,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[d,[l,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 Browser"]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,k],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,"Chrome WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,F,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,j]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[h,L],[p,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[h,L],[p,b]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[h,_],[p,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[h,_],[p,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[h,A],[p,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[h,A],[p,b]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[h,C],[p,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[h,C],[p,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[h,"OPPO"],[p,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[h,"Vivo"],[p,b]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[h,"Realme"],[p,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[h,D],[p,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[h,D],[p,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[h,x],[p,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[h,x],[p,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[h,"Lenovo"],[p,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[h,"Nokia"],[p,b]],[/(pixel c)\b/i],[f,[h,I],[p,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[h,I],[p,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[h,R],[p,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[h,R],[p,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[h,"OnePlus"],[p,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[h,S],[p,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[h,S],[p,b]],[/(playbook);[-\w\),; ]+(rim)/i],[f,h,[p,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[h,O],[p,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[h,T],[p,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[h,T],[p,b]],[/(nexus 9)/i],[f,[h,"HTC"],[p,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[f,/_/g," "],[p,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[h,"Acer"],[p,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[h,"Meizu"],[p,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[h,P],[p,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,f,[p,b]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,f,[p,m]],[/(surface duo)/i],[f,[h,N],[p,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[h,"Fairphone"],[p,b]],[/(u304aa)/i],[f,[h,"AT&T"],[p,b]],[/\bsie-(\w*)/i],[f,[h,"Siemens"],[p,b]],[/\b(rct\w+) b/i],[f,[h,"RCA"],[p,m]],[/\b(venue[\d ]{2,7}) b/i],[f,[h,"Dell"],[p,m]],[/\b(q(?:mv|ta)\w+) b/i],[f,[h,"Verizon"],[p,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[h,"Barnes & Noble"],[p,m]],[/\b(tm\d{3}\w+) b/i],[f,[h,"NuVision"],[p,m]],[/\b(k88) b/i],[f,[h,"ZTE"],[p,m]],[/\b(nx\d{3}j) b/i],[f,[h,"ZTE"],[p,b]],[/\b(gen\d{3}) b.+49h/i],[f,[h,"Swiss"],[p,b]],[/\b(zur\d{3}) b/i],[f,[h,"Swiss"],[p,m]],[/\b((zeki)?tb.*\b) b/i],[f,[h,"Zeki"],[p,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],f,[p,m]],[/\b(ns-?\w{0,9}) b/i],[f,[h,"Insignia"],[p,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[h,"NextBook"],[p,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],f,[p,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],f,[p,b]],[/\b(ph-1) /i],[f,[h,"Essential"],[p,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[h,"Envizen"],[p,m]],[/\b(trio[-\w\. ]+) b/i],[f,[h,"MachSpeed"],[p,m]],[/\btu_(1491) b/i],[f,[h,"Rotor"],[p,m]],[/(shield[\w ]+) b/i],[f,[h,"Nvidia"],[p,m]],[/(sprint) (\w+)/i],[h,f,[p,b]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[h,N],[p,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[h,B],[p,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[h,B],[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,f,[p,y]],[/droid.+; (shield) bui/i],[f,[h,"Nvidia"],[p,y]],[/(playstation [345portablevi]+)/i],[f,[h,R],[p,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[h,N],[p,y]],[/smart-tv.+(samsung)/i],[h,[p,v]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[h,L],[p,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,x],[p,v]],[/(apple) ?tv/i],[h,[f,"Apple TV"],[p,v]],[/crkey/i],[[f,"Chromecast"],[h,I],[p,v]],[/droid.+aft(\w)( bui|\))/i],[f,[h,S],[p,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[h,P],[p,v]],[/(bravia[\w ]+)( bui|\))/i],[f,[h,R],[p,v]],[/(mitv-\w{5}) bui/i],[f,[h,C],[p,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,H],[f,H],[p,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,v]],[/((pebble))app/i],[h,f,[p,w]],[/droid.+; (glass) \d/i],[f,[h,I],[p,w]],[/droid.+; (wt63?0{2,3})\)/i],[f,[h,B],[p,w]],[/(quest( 2)?)/i],[f,[h,k],[p,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[p,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,b]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[d,F,V]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[d,F,V]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[l,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,d]]},W=function(t,e){if(typeof t===u&&(e=t,t=o),!(this instanceof W))return new W(t,e).getResult();var n=t||(typeof i!==a&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}($,e):$;return this.getBrowser=function(){var t,e={};return e.name=o,e.version=o,G.call(e,n,r.browser),e.major=typeof(t=e.version)===c?t.replace(/[^\d\.]/g,"").split(".")[0]:o,e},this.getCPU=function(){var t={};return t.architecture=o,G.call(t,n,r.cpu),t},this.getDevice=function(){var t={};return t.vendor=o,t.model=o,t.type=o,G.call(t,n,r.device),t},this.getEngine=function(){var t={};return t.name=o,t.version=o,G.call(t,n,r.engine),t},this.getOS=function(){var t={};return t.name=o,t.version=o,G.call(t,n,r.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 n},this.setUA=function(t){return n=typeof t===c&&t.length>350?H(t,350):t,this},this.setUA(n),this};W.VERSION="1.0.32",W.BROWSER=U([l,d,"major"]),W.CPU=U([g]),W.DEVICE=U([f,h,p,y,b,v,m,w,E]),W.ENGINE=W.OS=U([l,d]),typeof e!==a?(t.exports&&(e=t.exports=W),e.UAParser=W):n.amdO?(r=function(){return W}.call(e,n,e,t))===o||(t.exports=r):typeof i!==a&&(i.UAParser=W);var z=typeof i!==a&&(i.jQuery||i.Zepto);if(z&&!z.ua){var q=new W;z.ua=q.getResult(),z.ua.get=function(){return q.getUA()},z.ua.set=function(t){q.setUA(t);var e=q.getResult();for(var n in e)z.ua[n]=e[n]}}}("object"==typeof window?window:this)},147:t=>{"use strict";t.exports={i8:"1.5.4"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};(()=>{"use strict";n.d(r,{default:()=>fr});for(var t=function(){function t(){}var e,r;return e=t,t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=n(147).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.SHOPIFY_LOG_PREFIX="CooeeShopify",t.COOEE="cooee",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_APP_ID="cooaid",t.STORAGE_USER_ID="uid",t.STORAGE_DEVICE_ID="coodid",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_ACTIVE_TRIGGER="at",t.STORAGE_GA_ENABLED="gae",t.STORAGE_GA_CLIENT_ID="gacid",t.STORAGE_GA_MEASUREMENT_ID="gamid",t.STORAGE_SHOPIFY_CART_TOKEN="coosct",t.SESSION_STORAGE_TAB_OPENED="tabop",t.SESSION_STORAGE_SCROLL_ID="sleid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_WRAPPER_NAME="cooee-wrapper",t.IN_APP_CONTAINER_NAME="cooee-container",t.IN_APP_DEFAULT_PADDING=15,t.EVENT_SCREEN_VIEW="CE Screen View",t.EVENT_APP_INSTALLED="CE App Installed",t.EVENT_APP_LAUNCHED="CE App Launched",t.EVENT_SESSION_CONCLUDED="CE Session Concluded",t.EVENT_SESSION_STARTED="CE Session Started",t.EVENT_APP_FOREGROUND="CE App Foreground",t.EVENT_APP_BACKGROUND="CE App Background",t.EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed",t.EVENT_TRIGGER_CLOSED="CE Trigger Closed",t.EVENT_SCROLL="CE Scroll",t.EVENT_TRIGGER_CLICKED="CE Trigger Clicked",t.EVENT_ADD_TO_CART="Add To Cart",t.EVENT_VIEW_ITEM="View Item",t.EVENT_VIEW_CART="View Cart",t.blackListedScreenName=["collection","product","cart"],t.BOT_USER_AGENTS_PATTERN="(googlebot/|bot|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)",t.BOT_UA_REGEX=new RegExp(e.BOT_USER_AGENTS_PATTERN,"i"),r=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(r,10),t}(),e=function(){function t(t){this.triggerID=t.id,this.engagementID=t.engagementID,this.expireAt=t.expireAt,this.updateExpired()}return t.prototype.isExpired=function(){return this.expireAt<(new Date).getTime()},t.prototype.updateExpired=function(){this.isExpired()&&(this.expired=!0)},t}(),i=[],o=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)i[u]=a[u],o[a.charCodeAt(u)]=u;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var r,o,s=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var p,h,d=function(t){var e,n,r=f(t),i=r[0],a=r[1],u=new s(function(t,e,n){return 3*(e+n)/4-n}(0,i,a)),c=0,l=a>0?i-4:i;for(n=0;n<l;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===a&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,u[c++]=255&e),1===a&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},g=function(t){for(var e,n=t.length,r=n%3,o=[],s=16383,a=0,u=n-r;a<u;a+=s)o.push(l(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),o.join("")},y=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,l=n?i-1:0,p=n?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=p,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=c}return(h?-1:1)*s*Math.pow(2,o-r)},b=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+h]=255&a,h+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+h]=255&s,h+=d,s/=256,c-=8);t[n+h-d]|=128*g},m=(p=function(t,e){var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},e.INSPECT_MAX_BYTES=50;var r=2147483647;function i(t){if(t>r)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,o.prototype),e}function o(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,n)}function s(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|p(t,e),r=i(n),s=r.write(t,e);return s!==n&&(r=r.slice(0,s)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(F(t,Uint8Array)){var e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(t));if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return f(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return f(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return o.from(r,e,n);var s=function(t){if(o.isBuffer(t)){var e=0|l(t.length),n=i(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?i(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(t))}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return a(t),i(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),n=i(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function f(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,o.prototype),r}function l(t){if(t>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function p(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(i)return r?-1:j(t).length;e=(""+e).toLowerCase(),i=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return N(this,e,n);case"latin1":case"binary":return D(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:w(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):w(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,p=0;p<u;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function E(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(V(a))return s;t[n+s]=a}return s}function S(t,e,n,r){return G(j(e,t.length-n),t,n,r)}function _(t,e,n,r){return G(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return G(H(e),t,n,r)}function O(t,e,n,r){return G(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?g(t):g(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=x));return n}(r)}e.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(t,e,n){return s(t,e,n)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(t,e,n){return function(t,e,n){return a(t),t<=0?i(t):void 0!==e?"string"==typeof n?i(t).fill(e,n):i(t).fill(e):i(t)}(t,e,n)},o.allocUnsafe=function(t){return u(t)},o.allocUnsafeSlow=function(t){return u(t)},o.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==o.prototype},o.compare=function(t,e){if(F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,s=Math.min(n,r);i<s;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(F(s,Uint8Array))i+s.length>r.length?o.from(s).copy(r,i):Uint8Array.prototype.set.call(r,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i)}i+=s.length}return r},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},o.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):h.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(t,e,n,r,i){if(F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(s,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<u;++l)if(c[l]!==f[l]){s=c[l],a=f[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return S(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function N(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function D(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function L(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function P(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,s){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return e=+e,n>>>=0,i||B(t,0,n,4),b(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return e=+e,n>>>=0,i||B(t,0,n,8),b(t,e,n,r,52,8),n+8}o.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Object.setPrototypeOf(r,o.prototype),r},o.prototype.readUintLE=o.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUintBE=o.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUint8=o.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),y(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),y(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),y(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),y(this,t,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(!o.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},o.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var s;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s<n;++s)this[s]=t;else{var a=o.isBuffer(t)?t:o.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-e;++s)this[s+e]=a[s%u]}return this};var M=/[^+/0-9A-Za-z-_]/g;function j(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(t){return d(function(t){if((t=(t=t.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}()},p(h={exports:{}},h.exports),h.exports),v=m.Buffer;m.SlowBuffer,m.INSPECT_MAX_BYTES,m.kMaxLength;var w=function(t,e){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},w(t,e)};function E(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return E(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),_=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return E(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function T(t){return t&&t.Math==Math&&t}function O(){return T("object"==typeof globalThis&&globalThis)||T("object"==typeof window&&window)||T("object"==typeof self&&self)||T("object"==typeof n.g&&n.g)||Function("return this")()}var I=function(t){var e,n="object"==typeof(e=O()).navigator&&"ReactNative"===e.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=v.alloc(t),i=0;i<t;++i)r[i]=Math.floor(256*Math.random());return r},A=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(v.alloc(e))}}return void 0!==n.g&&n.g.crypto&&n.g.crypto.getRandomValues?function(t){return n.g.crypto.getRandomValues(v.alloc(t))}:I}();function x(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function N(t){return"object"==typeof t&&null!==t}function D(t,e){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(e),n=!0),t.apply(this,r)}}function L(t){if(ArrayBuffer.isView(t))return v.from(t.buffer,t.byteOffset,t.byteLength);if(e=t,["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e)))return v.from(t);var e;throw new _("Must use either Buffer or TypedArray")}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,R=function(t){return"string"==typeof t&&P.test(t)},C=function(t){if(!R(t))throw new _('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return v.from(e,"hex")},B=function(t,e){return void 0===e&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")},k=Symbol("id"),U=function(){function t(e){if(void 0===e)this.id=t.generate();else if(e instanceof t)this[k]=v.from(e.id),this.__id=e.__id;else if(ArrayBuffer.isView(e)&&16===e.byteLength)this.id=L(e);else{if("string"!=typeof e)throw new _("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");this.id=C(e)}}return Object.defineProperty(t.prototype,"id",{get:function(){return this[k]},set:function(e){this[k]=e,t.cacheHexString&&(this.__id=B(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var n=B(this.id,e);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(t){return!1}},t.prototype.toBinary=function(){return new M(this.id,M.SUBTYPE_UUID)},t.generate=function(){var t=A(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,v.from(t)},t.isValid=function(e){if(!e)return!1;if(e instanceof t)return!0;if("string"==typeof e)return R(e);if(x(e)){if(16!==e.length)return!1;try{return parseInt(e[6].toString(16)[0],10)===M.SUBTYPE_UUID}catch(t){return!1}}return!1},t.createFromHexString=function(e){return new t(C(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}();Object.defineProperty(U.prototype,"_bsontype",{value:"UUID"});var M=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(!(null==e||"string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||Array.isArray(e)))throw new _("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:t.BSON_BINARY_SUBTYPE_DEFAULT,null==e?(this.buffer=v.alloc(t.BUFFER_SIZE),this.position=0):("string"==typeof e?this.buffer=v.from(e,"binary"):Array.isArray(e)?this.buffer=v.from(e):this.buffer=L(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if("string"==typeof e&&1!==e.length)throw new _("only accepts single character String");if("number"!=typeof e&&1!==e.length)throw new _("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof e?e.charCodeAt(0):"number"==typeof e?e:e[0])<0||n>255)throw new _("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=v.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(t,e){if(e="number"==typeof e?e:this.position,this.buffer.length<e+t.length){var n=v.alloc(this.buffer.length+t.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(t)?(this.buffer.set(L(t),e),this.position=e+t.byteLength>this.position?e+t.length:this.position):"string"==typeof t&&(this.buffer.write(t,e,t.length,"binary"),this.position=e+t.length>this.position?e+t.length:this.position)},t.prototype.read=function(t,e){return e=e&&e>0?e:this.position,this.buffer.slice(t,t+e)},t.prototype.value=function(t){return(t=!!t)&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(t){return this.buffer.toString(t)},t.prototype.toExtendedJSON=function(t){t=t||{};var e=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return t.legacy?{$binary:e,$type:1===n.length?"0"+n:n}:{$binary:{base64:e,subType:1===n.length?"0"+n:n}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new U(this.buffer.slice(0,this.position));throw new S('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){var r,i;if(n=n||{},"$binary"in e?n.legacy&&"string"==typeof e.$binary&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=v.from(e.$binary,"base64")):"string"!=typeof e.$binary&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=v.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=C(e.$uuid)),!r)throw new _("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(M.prototype,"_bsontype",{value:"Binary"});var j=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},t}();Object.defineProperty(j.prototype,"_bsontype",{value:"Code"});var H=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");2===o.length&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(t.$db=this.db),t},t.prototype.toExtendedJSON=function(t){t=t||{};var e={$ref:this.collection,$id:this.oid};return t.legacy?e:(this.db&&(e.$db=this.db),e=Object.assign(e,this.fields))},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(H.prototype,"_bsontype",{value:"DBRef"});var G=void 0;try{G=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}var F=4294967296,V=0x10000000000000000,$=V/2,W={},z={},q=function(){function t(e,n,r){if(void 0===e&&(e=0),!(this instanceof t))return new t(e,n,r);"bigint"==typeof e?Object.assign(this,t.fromBigInt(e,!!n)):"string"==typeof e?Object.assign(this,t.fromString(e,!!n)):(this.low=0|e,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(o=0<=(e>>>=0)&&e<256)&&(i=z[e])?i:(r=t.fromBits(e,(0|e)<0?-1:0,!0),o&&(z[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(i=W[e])?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(W[e]=r),r)},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=V)return t.MAX_UNSIGNED_VALUE}else{if(e<=-$)return t.MIN_VALUE;if(e+1>=$)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%F|0,e/F|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+u),r);if(u<8){var f=t.fromNumber(Math.pow(r,u));s=s.mul(f).add(t.fromNumber(c))}else s=(s=s.mul(o)).add(t.fromNumber(c))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(t){return N(t)&&!0===t.__isLong__},t.fromValue=function(e,n){return"number"==typeof e?t.fromNumber(e,n):"string"==typeof e?t.fromString(e,n):t.fromBits(e.low,e.high,"boolean"==typeof n?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=0,f=0,l=0,p=0;return l+=(p+=o+(65535&e.low))>>>16,p&=65535,f+=(l+=i+u)>>>16,l&=65535,c+=(f+=r+a)>>>16,f&=65535,c+=n+s,c&=65535,t.fromBits(l<<16|p,c<<16|f,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(t){return this.compare(t)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(G){if(!this.unsigned&&-2147483648===this.high&&-1===e.low&&-1===e.high)return this;var n=(this.unsigned?G.div_u:G.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE))return e.eq(t.ONE)||e.eq(t.NEG_ONE)?t.MIN_VALUE:e.eq(t.MIN_VALUE)?t.ONE:(r=this.shr(1).div(e).shl(1)).eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=t.fromNumber(r),c=u.mul(e);c.isNegative()||c.gt(i);)r-=a,c=(u=t.fromNumber(r,this.unsigned)).mul(e);u.isZero()&&(u=t.ONE),o=o.add(u),i=i.sub(c)}return o},t.prototype.div=function(t){return this.divide(t)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},t.prototype.eq=function(t){return this.equals(t)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e,n=0!==this.high?this.high:this.low;for(e=31;e>0&&0==(n&1<<e);e--);return 0!==this.high?e+33:e+1},t.prototype.greaterThan=function(t){return this.comp(t)>0},t.prototype.gt=function(t){return this.greaterThan(t)},t.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},t.prototype.gte=function(t){return this.greaterThanOrEqual(t)},t.prototype.ge=function(t){return this.greaterThanOrEqual(t)},t.prototype.isEven=function(){return 0==(1&this.low)},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return 1==(1&this.low)},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return 0===this.high&&0===this.low},t.prototype.lessThan=function(t){return this.comp(t)<0},t.prototype.lt=function(t){return this.lessThan(t)},t.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},t.prototype.lte=function(t){return this.lessThanOrEqual(t)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),G){var n=(this.unsigned?G.rem_u:G.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(t){return this.modulo(t)},t.prototype.rem=function(t){return this.modulo(t)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),G){var n=G.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,G.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=e.high>>>16,u=65535&e.high,c=e.low>>>16,f=65535&e.low,l=0,p=0,h=0,d=0;return h+=(d+=s*f)>>>16,d&=65535,p+=(h+=o*f)>>>16,h&=65535,p+=(h+=s*c)>>>16,h&=65535,l+=(p+=i*f)>>>16,p&=65535,l+=(p+=o*c)>>>16,p&=65535,l+=(p+=s*u)>>>16,p&=65535,l+=r*f+i*c+o*u+s*a,l&=65535,t.fromBits(h<<16|d,l<<16|p,this.unsigned)},t.prototype.mul=function(t){return this.multiply(t)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(t){return!this.equals(t)},t.prototype.neq=function(t){return this.notEquals(t)},t.prototype.ne=function(t){return this.notEquals(t)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(t){return this.shiftLeft(t)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(t){return this.shiftRight(t)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),0==(e&=63))return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}return 32===e?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},t.prototype.shru=function(t){return this.shiftRightUnsigned(t)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(t){return this.subtract(t)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*F+(this.low>>>0):this.high*F+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},t.prototype.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(e);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(t){return this.lessThanOrEqual(t)},t.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(16777216),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(q.prototype,"__isLong__",{value:!0}),Object.defineProperty(q.prototype,"_bsontype",{value:"Long"});var J=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,K=/^(\+|-)?(Infinity|inf)$/i,Y=/^(\+|-)?NaN$/i,X=6111,Z=-6176,Q=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),tt=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),et=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),nt=/^([-+])?(\d+)?$/;function rt(t){return!isNaN(parseInt(t,10))}function it(t){var e=q.fromNumber(1e9),n=q.fromNumber(0);if(!(t.parts[0]||t.parts[1]||t.parts[2]||t.parts[3]))return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new q(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function ot(t,e){throw new _('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var st=function(){function t(e){if(!(this instanceof t))return new t(e);if("string"==typeof e)this.bytes=t.fromString(e).bytes;else{if(!x(e))throw new _("Decimal128 must take a Buffer or string");if(16!==e.byteLength)throw new _("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}}return t.fromString=function(e){var n,r=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,f=0,l=[0],p=0,h=0,d=0,g=0,y=0,b=0,m=new q(0,0),w=new q(0,0),E=0;if(e.length>=7e3)throw new _(e+" not a valid Decimal128 string");var S=e.match(J),T=e.match(K),O=e.match(Y);if(!S&&!T&&!O||0===e.length)throw new _(e+" not a valid Decimal128 string");if(S){var I=S[2],A=S[4],x=S[5],N=S[6];A&&void 0===N&&ot(e,"missing exponent power"),A&&void 0===I&&ot(e,"missing exponent base"),void 0===A&&(x||N)&&ot(e,"missing e before exponent")}if("+"!==e[E]&&"-"!==e[E]||(r="-"===e[E++]),!rt(e[E])&&"."!==e[E]){if("i"===e[E]||"I"===e[E])return new t(v.from(r?tt:et));if("N"===e[E])return new t(v.from(Q))}for(;rt(e[E])||"."===e[E];)"."!==e[E]?(p<34&&("0"!==e[E]||o)&&(o||(f=a),o=!0,l[h++]=parseInt(e[E],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,E+=1):(i&&ot(e,"contains multiple periods"),i=!0,E+=1);if(i&&!a)throw new _(e+" not a valid Decimal128 string");if("e"===e[E]||"E"===e[E]){var D=e.substr(++E).match(nt);if(!D||!D[2])return new t(v.from(Q));y=parseInt(D[0],10),E+=D[0].length}if(e[E])return new t(v.from(Q));if(d=0,p){if(g=p-1,1!==(s=u))for(;0===l[f+s-1];)s-=1}else d=0,g=0,l[0]=0,u=1,p=1,s=0;for(y<=c&&c-y>16384?y=Z:y-=c;y>X;){if((g+=1)-d>34){if(l.join("").match(/^0+$/)){y=X;break}ot(e,"overflow")}y-=1}for(;y<Z||p<u;){if(0===g&&s<p){y=Z,s=0;break}if(p<u?u-=1:g-=1,y<X)y+=1;else{if(l.join("").match(/^0+$/)){y=X;break}ot(e,"overflow")}}if(g-d+1<s){var L=a;i&&(f+=1,L+=1),r&&(f+=1,L+=1);var P=parseInt(e[f+g+1],10),R=0;if(P>=5&&(R=1,5===P))for(R=l[g]%2==1?1:0,b=f+g+2;b<L;b++)if(parseInt(e[b],10)){R=1;break}if(R)for(var C=g;C>=0;C--)if(++l[C]>9&&(l[C]=0,0===C)){if(!(y<X))return new t(v.from(r?tt:et));y+=1,l[C]=1}}if(m=q.fromNumber(0),w=q.fromNumber(0),0===s)m=q.fromNumber(0),w=q.fromNumber(0);else if(g-d<17)for(C=d,w=q.fromNumber(l[C++]),m=new q(0,0);C<=g;C++)w=(w=w.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]));else{for(C=d,m=q.fromNumber(l[C++]);C<=g-17;C++)m=(m=m.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]));for(w=q.fromNumber(l[C++]);C<=g;C++)w=(w=w.multiply(q.fromNumber(10))).add(q.fromNumber(l[C]))}var B,k,U,M,j=function(t,e){if(!t&&!e)return{high:q.fromNumber(0),low:q.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new q(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new q(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),u=r.multiply(i),c=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new q(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new q(c.getLowBits(),0))}}(m,q.fromString("100000000000000000"));j.low=j.low.add(w),k=w,((U=(B=j.low).high>>>0)<(M=k.high>>>0)||U===M&&B.low>>>0<k.low>>>0)&&(j.high=j.high.add(q.fromNumber(1))),n=y+6176;var H={low:q.fromNumber(0),high:q.fromNumber(0)};j.high.shiftRightUnsigned(49).and(q.fromNumber(1)).equals(q.fromNumber(1))?(H.high=H.high.or(q.fromNumber(3).shiftLeft(61)),H.high=H.high.or(q.fromNumber(n).and(q.fromNumber(16383).shiftLeft(47))),H.high=H.high.or(j.high.and(q.fromNumber(0x7fffffffffff)))):(H.high=H.high.or(q.fromNumber(16383&n).shiftLeft(49)),H.high=H.high.or(j.high.and(q.fromNumber(562949953421311)))),H.low=j.low,r&&(H.high=H.high.or(q.fromString("9223372036854775808")));var G=v.alloc(16);return E=0,G[E++]=255&H.low.low,G[E++]=H.low.low>>8&255,G[E++]=H.low.low>>16&255,G[E++]=H.low.low>>24&255,G[E++]=255&H.low.high,G[E++]=H.low.high>>8&255,G[E++]=H.low.high>>16&255,G[E++]=H.low.high>>24&255,G[E++]=255&H.high.low,G[E++]=H.high.low>>8&255,G[E++]=H.high.low>>16&255,G[E++]=H.high.low>>24&255,G[E++]=255&H.high.high,G[E++]=H.high.high>>8&255,G[E++]=H.high.high>>16&255,G[E++]=H.high.high>>24&255,new t(G)},t.prototype.toString=function(){for(var t,e=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},f=[];a=0;var l=this.bytes,p=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,h=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,d=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,g=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24;a=0,(new q(p,h),new q(d,g)).lessThan(q.ZERO)&&f.push("-");var y=g>>26&31;if(y>>3==3){if(30===y)return f.join("")+"Infinity";if(31===y)return"NaN";t=g>>15&16383,i=8+(g>>14&1)}else i=g>>14&7,t=g>>17&16383;var b=t-6176;if(c.parts[0]=(16383&g)+((15&i)<<14),c.parts[1]=d,c.parts[2]=h,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var m=0,v=it(c);if(c=v.quotient,m=v.rem.low)for(o=8;o>=0;o--)n[9*s+o]=m%10,m=Math.floor(m/10)}if(u)e=1,n[a]=0;else for(e=36;!n[a];)e-=1,a+=1;var w=e-1+b;if(w>=34||w<=-7||b>0){if(e>34)return f.push("".concat(0)),b>0?f.push("E+".concat(b)):b<0&&f.push("E".concat(b)),f.join("");for(f.push("".concat(n[a++])),(e-=1)&&f.push("."),r=0;r<e;r++)f.push("".concat(n[a++]));f.push("E"),w>0?f.push("+".concat(w)):f.push("".concat(w))}else if(b>=0)for(r=0;r<e;r++)f.push("".concat(n[a++]));else{var E=e+b;if(E>0)for(r=0;r<E;r++)f.push("".concat(n[a++]));else f.push("0");for(f.push(".");E++<0;)f.push("0");for(r=0;r<e-Math.max(E-1,0);r++)f.push("".concat(n[a++]))}return f.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(st.prototype,"_bsontype",{value:"Decimal128"});var at=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(t){return this.value.toString(t)},t.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:(Number.isInteger(this.value)?(e=this.value.toFixed(1)).length>=13&&(e=this.value.toExponential(13).toUpperCase()):e=this.value.toString(),{$numberDouble:e});var e},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},t}();Object.defineProperty(at.prototype,"_bsontype",{value:"Double"});var ut=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=0|+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(t){return this.value.toString(t)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(ut.prototype,"_bsontype",{value:"Int32"});var ct=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(ct.prototype,"_bsontype",{value:"MaxKey"});var ft=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(ft.prototype,"_bsontype",{value:"MinKey"});var lt=new RegExp("^[0-9a-fA-F]{24}$"),pt=null,ht=Symbol("id"),dt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if("object"==typeof e&&e&&"id"in e){if("string"!=typeof e.id&&!ArrayBuffer.isView(e.id))throw new _("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in e&&"function"==typeof e.toHexString?v.from(e.toHexString(),"hex"):e.id}else n=e;if(null==n||"number"==typeof n)this[ht]=t.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[ht]=n instanceof v?n:L(n);else{if("string"!=typeof n)throw new _("Argument passed in does not match the accepted types");if(12===n.length){var r=v.from(n);if(12!==r.byteLength)throw new _("Argument passed in must be a string of 12 bytes");this[ht]=r}else{if(24!==n.length||!lt.test(n))throw new _("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[ht]=v.from(n,"hex")}}t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[ht]},set:function(e){this[ht]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){"number"!=typeof e&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=v.alloc(12);return r.writeUInt32BE(e,0),null===pt&&(pt=A(5)),r[4]=pt[0],r[5]=pt[1],r[6]=pt[2],r[7]=pt[3],r[8]=pt[4],r[11]=255&n,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(null==e)return!1;if(e instanceof t)return this[ht][11]===e[ht][11]&&this[ht].equals(e[ht]);if("string"==typeof e&&t.isValid(e)&&12===e.length&&x(this.id))return e===v.prototype.toString.call(this.id,"latin1");if("string"==typeof e&&t.isValid(e)&&24===e.length)return e.toLowerCase()===this.toHexString();if("string"==typeof e&&t.isValid(e)&&12===e.length)return v.from(e).equals(this.id);if("object"==typeof e&&"toHexString"in e&&"function"==typeof e.toHexString){var n=e.toHexString(),r=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var t=new Date,e=this.id.readUInt32BE(0);return t.setTime(1e3*Math.floor(e)),t},t.createPk=function(){return new t},t.createFromTime=function(e){var n=v.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new _("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(v.from(e,"hex"))},t.isValid=function(e){if(null==e)return!1;try{return new t(e),!0}catch(t){return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(16777215*Math.random()),t}();Object.defineProperty(dt.prototype,"generate",{value:D((function(t){return dt.generate(t)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(dt.prototype,"getInc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt.prototype,"get_inc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt,"get_inc",{value:D((function(){return dt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(dt.prototype,"_bsontype",{value:"ObjectID"});var gt=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new S("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new S("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new S("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(t){return t?t.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(t){return(t=t||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e){if("string"==typeof e.$regex)return new t(e.$regex,t.parseOptions(e.$options));if("BSONRegExp"===e.$regex._bsontype)return e}if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new _("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(gt.prototype,"_bsontype",{value:"BSONRegExp"});var yt=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(yt.prototype,"_bsontype",{value:"Symbol"});var bt=function(t){function e(n,r){var i=this;return i instanceof e?(i=q.isLong(n)?t.call(this,n.low,n.high,!0)||this:N(n)&&void 0!==n.t&&void 0!==n.i?t.call(this,n.i,n.t,!0)||this:t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return E(e,t),e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(t){return new e(q.fromInt(t,!0))},e.fromNumber=function(t){return new e(q.fromNumber(t,!0))},e.fromBits=function(t,n){return new e(t,n)},e.fromString=function(t,n){return new e(q.fromString(t,!0,n))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(t){return new e(t.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=q.MAX_UNSIGNED_VALUE,e}(q);var mt=2147483647,vt=-2147483648,wt=0x8000000000000000,Et=-0x8000000000000000,St={$oid:dt,$binary:M,$uuid:M,$symbol:yt,$numberInt:ut,$numberDecimal:st,$numberDouble:at,$numberLong:q,$minKey:ft,$maxKey:ct,$regex:gt,$regularExpression:gt,$timestamp:bt};function _t(t,e){if(void 0===e&&(e={}),"number"==typeof t){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=vt&&t<=mt)return new ut(t);if(t>=Et&&t<=wt)return q.fromNumber(t)}return new at(t)}if(null==t||"object"!=typeof t)return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter((function(e){return e.startsWith("$")&&null!=t[e]})),r=0;r<n.length;r++){var i=St[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(null!=t.$date){var o=t.$date,s=new Date;return e.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):q.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&e.relaxed&&s.setTime(o),s}if(null!=t.$code){var a=Object.assign({},t);return t.$scope&&(a.$scope=_t(t.$scope)),j.fromExtendedJSON(t)}if(function(t){return N(t)&&null!=t.$id&&"string"==typeof t.$ref&&(null==t.$db||"string"==typeof t.$db)}(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof H)return u;var c=Object.keys(u).filter((function(t){return t.startsWith("$")})),f=!0;if(c.forEach((function(t){-1===["$ref","$id","$db"].indexOf(t)&&(f=!1)})),f)return H.fromExtendedJSON(u)}return t}function Tt(t){var e=t.toISOString();return 0!==t.getUTCMilliseconds()?e:e.slice(0,-5)+"Z"}function Ot(t,e){if(("object"==typeof t||"function"==typeof t)&&null!==t){var n=e.seenObjects.findIndex((function(e){return e.obj===t}));if(-1!==n){var r=e.seenObjects.map((function(t){return t.propertyName})),i=r.slice(0,n).map((function(t){return"".concat(t," -> ")})).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map((function(t){return"".concat(t," -> ")})).join(""),a=r[r.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new _("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return function(t,e){return t.map((function(t,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Ot(t,e)}finally{e.seenObjects.pop()}}))}(t,e);if(void 0===t)return null;if(t instanceof Date||N(p=t)&&"[object Date]"===Object.prototype.toString.call(p)){var f=t.getTime(),l=f>-1&&f<2534023188e5;return e.legacy?e.relaxed&&l?{$date:t.getTime()}:{$date:Tt(t)}:e.relaxed&&l?{$date:Tt(t)}:{$date:{$numberLong:t.getTime().toString()}}}var p;if(!("number"!=typeof t||e.relaxed&&isFinite(t))){if(Math.floor(t)===t){var h=t>=Et&&t<=wt;if(t>=vt&&t<=mt)return{$numberInt:t.toString()};if(h)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}(t)){var d=t.flags;if(void 0===d){var g=t.toString().match(/[gimuy]*$/);g&&(d=g[0])}return new gt(t.source,d).toExtendedJSON(e)}return null!=t&&"object"==typeof t?function(t,e){if(null==t||"object"!=typeof t)throw new S("not an object instance");var n=t._bsontype;if(void 0===n){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=Ot(t[i],e);"__proto__"===i?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}if(function(t){return N(t)&&Reflect.has(t,"_bsontype")&&"string"==typeof t._bsontype}(t)){var s=t;if("function"!=typeof s.toExtendedJSON){var a=At[t._bsontype];if(!a)throw new _("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return"Code"===n&&s.scope?s=new j(s.code,Ot(s.scope,e)):"DBRef"===n&&s.oid&&(s=new H(Ot(s.collection,e),Ot(s.oid,e),Ot(s.db,e),Ot(s.fields,e))),s.toExtendedJSON(e)}throw new S("_bsontype must be a string, but was: "+typeof n)}(t,e):t}var It,At={Binary:function(t){return new M(t.value(),t.sub_type)},Code:function(t){return new j(t.code,t.scope)},DBRef:function(t){return new H(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new st(t.bytes)},Double:function(t){return new at(t.value)},Int32:function(t){return new ut(t.value)},Long:function(t){return q.fromBits(null!=t.low?t.low:t.low_,null!=t.low?t.high:t.high_,null!=t.low?t.unsigned:t.unsigned_)},MaxKey:function(){return new ct},MinKey:function(){return new ft},ObjectID:function(t){return new dt(t)},ObjectId:function(t){return new dt(t)},BSONRegExp:function(t){return new gt(t.pattern,t.options)},Symbol:function(t){return new yt(t.value)},Timestamp:function(t){return bt.fromBits(t.low,t.high)}};!function(t){function e(t,e){var n=Object.assign({},{relaxed:!0,legacy:!1},e);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(t,(function(t,e){if(-1!==t.indexOf("\0"))throw new S("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(t)));return _t(e,n)}))}function n(t,e,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==e||"object"!=typeof e||Array.isArray(e)||(r=e,e=void 0,n=0);var i=Ot(t,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,e,n)}t.parse=e,t.stringify=n,t.serialize=function(t,e){return e=e||{},JSON.parse(n(t,e))},t.deserialize=function(t,n){return n=n||{},e(JSON.stringify(t),n)}}(It||(It={}));var xt=O();xt.Map?xt.Map:function(){function t(t){void 0===t&&(t=[]),this._keys=[],this._values={};for(var e=0;e<t.length;e++)if(null!=t[e]){var n=t[e],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(t){var e=this._values[t];return null!=e&&(delete this._values[t],this._keys.splice(e.i,1),!0)},t.prototype.entries=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?[n,t._values[n].v]:void 0,done:void 0===n}}}},t.prototype.forEach=function(t,e){e=e||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];t.call(e,this._values[r].v,r,e)}},t.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},t.prototype.has=function(t){return null!=this._values[t]},t.prototype.keys=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},t.prototype.set=function(t,e){return this._values[t]?(this._values[t].v=e,this):(this._keys.push(t),this._values[t]={v:e,i:this._keys.length-1},this)},t.prototype.values=function(){var t=this,e=0;return{next:function(){var n=t._keys[e++];return{value:void 0!==n?t._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0})}(),Math.pow(2,63),Math.pow(2,63);var Nt=Math.pow(2,53),Dt=-Math.pow(2,53);q.fromNumber(Nt),q.fromNumber(Dt),new Set(["$db","$ref","$id","$clusterTime"]);var Lt=new Uint8Array(8);new DataView(Lt.buffer,Lt.byteOffset,Lt.byteLength);v.alloc(17825792);var Pt=function(t,n,r,i){void 0===n&&(n={}),this.name=t,this.properties=n,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.id=i?new dt(i):new dt,this.occurred=(new Date).toISOString(),r&&(this.trigger=new e(r)),this.newEvent=!i},Rt=function(){function t(t){t.s&&(this.s=new Ut(t.s)),t.g&&(this.g=new $t(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 Ct=new RegExp("[^#a-f\\d]","gi"),Bt=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var kt,Ut=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||Ct.test(t)||!Bt.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=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 r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,s=255&r,a="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,s,a]:"css"===e.format?`rgb(${i} ${o} ${s}${1===a?"":` / ${Number((100*a).toFixed(2))}%`})`:{red:i,green:o,blue:s,alpha:a}}(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}(),Mt=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new Ut(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 kt[null!==(t=this.s)&&void 0!==t?t:kt.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(kt||(kt={}));var jt,Ht=function(t){var e;t=null!=t?t:{},this.name=t.name,this.fonts=null===(e=t.fonts)||void 0===e?void 0:e.map((function(t){return new Gt(t)}))},Gt=function(){function t(t){t=null!=t?t:{},this.style=t.style,this.url=t.url}return t.prototype.getFontDescriptor=function(){return{style:this.style===jt.ITALICS||this.style===jt.BOLD_ITALICS?"italic":"normal",weight:this.style===jt.BOLD_ITALICS||this.style===jt.BOLD?"700":"400"}},t.prototype.getURL=function(){return"url('".concat(this.url,"') format('truetype')")},t}();!function(t){t[t.REGULAR=1]="REGULAR",t[t.ITALICS=2]="ITALICS",t[t.BOLD=3]="BOLD",t[t.BOLD_ITALICS=4]="BOLD_ITALICS"}(jt||(jt={}));var Ft,Vt=function(){function t(t){t=null!=t?t:{},this.s=t.s,this.lh=t.lh,t.fmly&&(this.fmly=new Ht(t.fmly))}return Object.defineProperty(t.prototype,"family",{get:function(){return this.fmly},enumerable:!1,configurable:!0}),t}(),$t=function(){function t(t){this.r=t.r,t.c&&(this.c=new Ut(t.c)),t.fb&&(this.fb=new Ut(t.fb))}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}),Object.defineProperty(t.prototype,"fallback",{get:function(){var e;return null!==(e=this.fb)&&void 0!==e?e:t.DEFAULT_FALLBACK},enumerable:!1,configurable:!0}),t.DEFAULT_FALLBACK=new Ut({h:"#000000",a:50}),t}(),Wt=function(){function t(t){var e,n,r,i;t=null!=t?t:{},this.blur=null!==(e=t.blur)&&void 0!==e?e:0,this.spr=null!==(n=t.spr)&&void 0!==n?n:0,this.x=null!==(r=t.x)&&void 0!==r?r:0,this.y=null!==(i=t.y)&&void 0!==i?i:0,this.clr=new Ut(t.clr)}return t.prototype.getStyle=function(t){return"".concat(this.x*t,"px ").concat(this.y*t,"px ")+"".concat(this.blur*t,"px ").concat(this.spr*t,"px ").concat(this.clr.rgba)},t}(),zt=function(){function t(t){var e,n,r,i;t=null!=t?t:{},this.pl=null!==(e=t.pl)&&void 0!==e?e:0,this.pr=null!==(n=t.pr)&&void 0!==n?n:0,this.pt=null!==(r=t.pt)&&void 0!==r?r:0,this.pb=null!==(i=t.pb)&&void 0!==i?i:0}return t.prototype.getHorizontal=function(){return this.pl+this.pr},t.prototype.getVertical=function(){return this.pt+this.pb},t.prototype.getPaddingCSS=function(){return"".concat(this.pt,"px ").concat(this.pr,"px ").concat(this.pb,"px ").concat(this.pl,"px")},t}(),qt=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}(),Jt=function(){function t(t){this.t=t.t,t.bg&&(this.bg=new Rt(t.bg)),t.br&&(this.br=new Mt(t.br)),t.shd&&(this.shd=new Wt(t.shd)),t.spc&&(this.spc=new zt(t.spc)),this.trf=new qt(t.trf),this.clc=t.clc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.a=t.a}return Object.defineProperty(t.prototype,"alpha",{get:function(){var t;return null!==(t=this.a)&&void 0!==t?t:100},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return Ft[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"}(Ft||(Ft={}));var Kt,Yt,Xt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(e){return t.call(this,e)||this}return Xt(e,t),e}(Jt),Qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return Qt(e,t),e}(Jt),ee=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=Kt.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=new Vt(e.f)),e.c&&(n.c=new Ut(e.c)),n}return ee(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}(Jt);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(Kt||(Kt={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(Yt||(Yt={}));var re,ie,oe,se=function(){function e(t,e){this._startTime=t,this._triggerData=e}return Object.defineProperty(e.prototype,"startTime",{get:function(){return this._startTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"triggerData",{get:function(){return this._triggerData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rootClassName",{get:function(){var e=this.triggerData.id.slice(-6);return"test"===e&&(e=this.startTime.getTime().toString()),t.IN_APP_WRAPPER_NAME+"-"+e},enumerable:!1,configurable:!0}),e.prototype.onClose=function(t){this.closeCallback=t},e.prototype.closeInApp=function(t){var e={eventName:t,duration:((new Date).getTime()-this.startTime.getTime())/1e3};this.closeCallback&&this.closeCallback(e)},e}(),ae=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(t){function e(e){var n,r,i,o=this;return(o=t.call(this,e)||this).o=null!==(n=e.o)&&void 0!==n?n:re.C,o.desk=e.desk,o.w=null!==(r=o.w)&&void 0!==r?r:1080,o.h=null!==(i=o.h)&&void 0!==i?i:1920,o}return ae(e,t),e.prototype.getOrigin=function(){return this.o},e}(Jt);!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"}(re||(re={})),function(t){t[t.ABOVE_PAGE=1]="ABOVE_PAGE",t[t.EMBEDDED=2]="EMBEDDED"}(ie||(ie={})),function(t){t[t.LOW=1]="LOW",t[t.MEDIUM=2]="MEDIUM",t[t.HIGH=3]="HIGH"}(oe||(oe={}));var ce,fe,le=function(){function t(t){t=null!=t?t:{},this.en=t.en,this.ex=t.ex}return t.prototype.getEnterAnimation=function(){switch(this.en){case ce.SLIDE_IN_TOP:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case ce.SLIDE_IN_DOWN:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case ce.SLIDE_IN_LEFT:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case ce.SLIDE_IN_RIGHT:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case ce.SLIDE_IN_TOP_LEFT:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_TOP_RIGHT:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_BOTTOM_LEFT:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case ce.SLIDE_IN_BOTTOM_RIGHT:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case ce.POP:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}},t.prototype.getExitAnimation=function(){switch(this.ex){case fe.SLIDE_OUT_TOP:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case fe.SLIDE_OUT_DOWN:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case fe.SLIDE_OUT_LEFT:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case fe.SLIDE_OUT_RIGHT:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case fe.SLIDE_OUT_TOP_LEFT:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case fe.SLIDE_OUT_TOP_RIGHT:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case fe.SLIDE_OUT_BOTTOM_LEFT:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case fe.SLIDE_OUT_BOTTOM_RIGHT:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case fe.POP:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}},t}();!function(t){t[t.NONE=1]="NONE",t[t.SLIDE_IN_TOP=2]="SLIDE_IN_TOP",t[t.SLIDE_IN_DOWN=3]="SLIDE_IN_DOWN",t[t.SLIDE_IN_LEFT=4]="SLIDE_IN_LEFT",t[t.SLIDE_IN_RIGHT=5]="SLIDE_IN_RIGHT",t[t.SLIDE_IN_TOP_LEFT=6]="SLIDE_IN_TOP_LEFT",t[t.SLIDE_IN_TOP_RIGHT=7]="SLIDE_IN_TOP_RIGHT",t[t.SLIDE_IN_BOTTOM_LEFT=8]="SLIDE_IN_BOTTOM_LEFT",t[t.SLIDE_IN_BOTTOM_RIGHT=9]="SLIDE_IN_BOTTOM_RIGHT",t[t.POP=10]="POP"}(ce||(ce={})),function(t){t[t.NONE=1]="NONE",t[t.SLIDE_OUT_TOP=2]="SLIDE_OUT_TOP",t[t.SLIDE_OUT_DOWN=3]="SLIDE_OUT_DOWN",t[t.SLIDE_OUT_LEFT=4]="SLIDE_OUT_LEFT",t[t.SLIDE_OUT_RIGHT=5]="SLIDE_OUT_RIGHT",t[t.SLIDE_OUT_TOP_LEFT=6]="SLIDE_OUT_TOP_LEFT",t[t.SLIDE_OUT_TOP_RIGHT=7]="SLIDE_OUT_TOP_RIGHT",t[t.SLIDE_OUT_BOTTOM_LEFT=8]="SLIDE_OUT_BOTTOM_LEFT",t[t.SLIDE_OUT_BOTTOM_RIGHT=9]="SLIDE_OUT_BOTTOM_RIGHT",t[t.POP=10]="POP"}(fe||(fe={}));var pe,he=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),de=function(e){function n(n){var r,i,o,s=this;return n=null!=n?n:{},(s=e.call(this,n)||this).gvt=null!==(r=n.gvt)&&void 0!==r?r:pe.C,s.max=n.max,s.cover=null===(i=n.cover)||void 0===i||i,s.anim=new le(n.anim),s.embedded=n.embedded,s.position=null!==(o=n.position)&&void 0!==o?o:ie.ABOVE_PAGE,s.spc||(s.spc=new zt({pl:t.IN_APP_DEFAULT_PADDING,pr:t.IN_APP_DEFAULT_PADDING,pt:t.IN_APP_DEFAULT_PADDING,pb:t.IN_APP_DEFAULT_PADDING})),s}return he(n,e),n.prototype.isEmbedded=function(){return this.position===ie.EMBEDDED&&!!this.embedded},n.prototype.getEmbeddedSelector=function(){return".letscooee-engagement.container-".concat(this.embedded)},n}(Jt),ge=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(t){function e(e){var n,r,i,o=this;return e=null!=e?e:{},(o=t.call(this,e)||this).elems=[],o.cont=new ue(e.cont),o.mob=new de(e.mob),o.max=null!==(n=o.max)&&void 0!==n?n:null===(i=null===(r=e.cont)||void 0===r?void 0:r.desk)||void 0===i?void 0:i.max,o.bg||(o.bg=o.cont.bg,delete o.cont.bg),e.elems.forEach((function(t){t.t===Ft.IMAGE?o.elems.push(new te(t)):t.t===Ft.TEXT||t.t===Ft.BUTTON?o.elems.push(new ne(t)):t.t===Ft.SHAPE&&o.elems.push(new Zt(t))})),o}return ge(e,t),e.prototype.getStylesForWrapper=function(){return this.cover?{}:((t=this.gvt===pe.NW?{top:0,left:0}:this.gvt===pe.N?{top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===pe.NE?{top:0,right:0}:this.gvt===pe.E?{top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===pe.SE?{bottom:0,right:0}:this.gvt===pe.S?{bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===pe.SW?{bottom:0,left:0}:this.gvt===pe.W?{top:"50%",left:0,transform:"translateY(-50%)"}:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}).overflow="visible",t);var t},e.prototype.getFlexStylesForContainer=function(){var t,e,n={display:"flex",flexDirection:"row"};return this.gvt===pe.NW?(t="flex-start",e="flex-start"):this.gvt===pe.N?(t="center",e="flex-start"):this.gvt===pe.NE?(t="flex-end",e="flex-start"):this.gvt===pe.W?(t="flex-start",e="center"):this.gvt===pe.E?(t="flex-end",e="center"):this.gvt===pe.SW?(t="flex-start",e="flex-end"):this.gvt===pe.S?(t="center",e="flex-end"):this.gvt===pe.SE?(t="flex-end",e="flex-end"):(t="center",e="center"),n.alignItems=e,n.justifyContent=t,n.overflow="visible",n},e.prototype.overrideForMobileView=function(){var t,e,n,r,i,o,s,a;this.max=null!==(t=this.mob.max)&&void 0!==t?t:this.max,this.cover=null!==(e=this.mob.cover)&&void 0!==e?e:this.cover,this.gvt=null!==(n=this.mob.gvt)&&void 0!==n?n:this.gvt,this.bg=null!==(r=this.mob.bg)&&void 0!==r?r:this.bg,this.spc=null!==(i=this.mob.spc)&&void 0!==i?i:this.spc,this.anim=null!==(o=this.mob.anim)&&void 0!==o?o:this.anim,this.position=null!==(s=this.mob.position)&&void 0!==s?s:this.position,this.embedded=null!==(a=this.mob.embedded)&&void 0!==a?a:this.embedded},e}(de);!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"}(pe||(pe={}));var be=function(){function t(t){var e,n;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=t.ian?new ye(t.ian):void 0,this.previewType=t.previewType,this.delay=null!==(e=t.delay)&&void 0!==e?e:0,this.occurred=null!==(n=t.occurred)&&void 0!==n?n:(new Date).toISOString()}return t.prototype.shouldDelay=function(){return this.delay>0},t.prototype.getDelaySeconds=function(){var t=new Date(this.occurred),e=(new Date).getTime()-t.getTime();return 1e3*this.delay-e},t}(),me=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},ve=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},we=function(){function t(){this.loadedFonts=[]}return t.prototype.loadAllFonts=function(t){var e;return me(this,void 0,void 0,(function(){var n=this;return ve(this,(function(r){return null===(e=t.elems)||void 0===e||e.forEach((function(t){t instanceof ne&&n.loadFamily(t.font.family)})),[2]}))}))},t.prototype.loadFamily=function(t){return me(this,void 0,void 0,(function(){var e;return ve(this,(function(n){switch(n.label){case 0:return(null==t?void 0:t.fonts)?this.loadedFonts.indexOf(t.name)>-1?[2]:(e=[],t.fonts.forEach((function(n){if(n.url){var r=new FontFace(t.name,n.getURL(),n.getFontDescriptor());e.push(r.load())}})),this.loadedFonts.push(t.name),[4,Promise.all(e)]):[2];case 1:return n.sent().forEach((function(t){document.fonts.add(t)})),[2]}}))}))},t}(),Ee=function(t,e){return Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ee(t,e)};function Se(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Te(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Oe(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function Ie(t){return"function"==typeof t}function Ae(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 xe=Ae((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 Ne(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var De=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=_e(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 u=this.initialTeardown;if(Ie(u))try{u()}catch(t){i=t instanceof xe?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var f=_e(c),l=f.next();!l.done;l=f.next()){var p=l.value;try{Re(p)}catch(t){i=null!=i?i:[],t instanceof xe?i=Oe(Oe([],Te(i)),Te(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}}if(i)throw new xe(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Re(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).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)&&Ne(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ne(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Le=De.EMPTY;function Pe(t){return t instanceof De||t&&"closed"in t&&Ie(t.remove)&&Ie(t.add)&&Ie(t.unsubscribe)}function Re(t){Ie(t)?t():t.unsubscribe()}var Ce=null,Be=null,ke=void 0,Ue=!1,Me=!1,je={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=je.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Oe([t,e],Te(n))):setTimeout.apply(void 0,Oe([t,e],Te(n)))},clearTimeout:function(t){var e=je.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function He(){}var Ge=Fe("C",void 0,void 0);function Fe(t,e,n){return{kind:t,value:e,error:n}}var Ve=null;function $e(t){if(Ue){var e=!Ve;if(e&&(Ve={errorThrown:!1,error:null}),t(),e){var n=Ve,r=n.errorThrown,i=n.error;if(Ve=null,r)throw i}}else t()}var We=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Pe(e)&&e.add(n)):n.destination=Ze,n}return Se(e,t),e.create=function(t,e,n){return new Ke(t,e,n)},e.prototype.next=function(t){this.isStopped?Xe(function(t){return Fe("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?Xe(Fe("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?Xe(Ge,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}(De),ze=Function.prototype.bind;function qe(t,e){return ze.call(t,e)}var Je=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ye(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ye(t)}else Ye(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ye(t)}},t}(),Ke=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;return Ie(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Me?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&qe(e.next,o),error:e.error&&qe(e.error,o),complete:e.complete&&qe(e.complete,o)}):i=e,s.destination=new Je(i),s}return Se(e,t),e}(We);function Ye(t){var e;Ue?(e=t,Ue&&Ve&&(Ve.errorThrown=!0,Ve.error=e)):function(t){je.setTimeout((function(){if(!Ce)throw t;Ce(t)}))}(t)}function Xe(t,e){var n=Be;n&&je.setTimeout((function(){return n(t,e)}))}var Ze={closed:!0,next:He,error:function(t){throw t},complete:He},Qe="function"==typeof Symbol&&Symbol.observable||"@@observable";function tn(t){return t}function en(t){return 0===t.length?tn:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var nn=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof We||function(t){return t&&Ie(t.next)&&Ie(t.error)&&Ie(t.complete)}(r)&&Pe(r)?t:new Ke(t,e,n);return $e((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?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 n=this;return new(e=rn(e))((function(e,r){var i=new Ke({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Qe]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return en(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=rn(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function rn(t){var e;return null!==(e=null!=t?t:ke)&&void 0!==e?e:Promise}var on,sn,an=Ae((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),un=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Se(e,t),e.prototype.lift=function(t){var e=new cn(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new an},e.prototype.next=function(t){var e=this;$e((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=_e(e.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;$e((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;$e((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=this.currentObservers=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,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?Le:(this.currentObservers=null,o.push(t),new De((function(){e.currentObservers=null,Ne(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new nn;return t.source=this,t},e.create=function(t,e){return new cn(t,e)},e}(nn),cn=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Se(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.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,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Le},e}(un),fn={now:function(){return(fn.delegate||Date).now()},delegate:void 0},ln=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=fn);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return Se(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(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),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,u=1;u<r.length&&r[u]<=s;u+=2)a=u;a&&r.splice(0,a+1)}},e}(un),pn=n(238),hn=n.n(pn),dn=function(){function t(){this.scalingFactor=1,this.doc=document,this.parser=new(hn())}return t.get=function(){return t._instance||(t._instance=new t),t._instance},t.prototype.getUAParser=function(){return this.parser},t.prototype.getWidth=function(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth},t.prototype.getHeight=function(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight},t.prototype.isMobile=function(){return"mobile"===this.parser.getDevice().type},t.prototype.calculateScalingFactor=function(e){var n=e.max,r=e.cont.w,i=e.cont.h,o=e.spc,s=t.get().getWidth(),a=t.get().getHeight();n&&(s=s?Math.min(s,n):n,a=a?Math.min(a,n):n),a&&(s-=o.getHorizontal(),a-=o.getVertical(),this.scalingFactor=s/a<r/i?s/r:a/i,this.scalingFactor=Math.min(this.scalingFactor,1))},t.prototype.getScalingFactor=function(){return this.scalingFactor},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,n){e&&(n?t.style.setProperty(e,n,"important"):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.removeInApp=function(t){var e=document.querySelector(".".concat(t.rootClassName));e&&e.parentElement.removeChild(e)},t.prototype.setParentContainer=function(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")},t.prototype.isParentNotBody=function(){return this.parentContainer!==document.body},t.DOCUMENT_STANDARD_MODE="CSS1Compat",t}(),gn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},yn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},bn=function(){function t(){this.result={},this.parser=dn.get().getUAParser()}return t.prototype.get=function(){return gn(this,void 0,void 0,(function(){var t;return yn(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,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return gn(this,void 0,void 0,(function(){var t=this;return yn(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(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return gn(this,void 0,void 0,(function(){var t;return yn(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}(),mn=n(145),vn=function(){function t(){}return t.getString=function(e,n){return void 0===n&&(n=""),t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.getObject=function(e){try{return JSON.parse(t.getString(e,""))}catch(t){return{}}},t.getArray=function(e,n){void 0===n&&(n=[]);try{return JSON.parse(t.getString(e,""))||n}catch(t){return n}},t.setObject=function(e,n){t.setString(e,JSON.stringify(n))},t.setArray=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),wn=n(901),En=n.n(wn),Sn=function(){function e(){}return e.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().info.apply(En(),t)},e.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().debug.apply(En(),t)},e.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().error.apply(En(),t)},e.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().warn.apply(En(),t)},e.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().info.apply(En(),t)},e.trace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];En().trace.apply(En(),t)},e.configure=function(e){void 0===e&&(e=t.LOG_PREFIX),En().useDefaults({formatter:function(n){n.unshift("".concat(e," (v").concat(t.SDK_VERSION,"):"))}}),localStorage.cooeeLogLevel?En().setLevel(En()[localStorage.cooeeLogLevel]):En().setLevel(En().OFF)},e}(),_n=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Tn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},On=function(){function e(){}return e.processConfiguration=function(t){this.saveConfiguration(t).then((function(){Sn.log("Google Analytics configuration processed")})).catch((function(t){Sn.error(t)}))},e.saveConfiguration=function(e){return _n(this,void 0,void 0,(function(){var n;return Tn(this,(function(r){switch(r.label){case 0:return e.gaMeasurementID&&e.gaEnabled?(n=vn.getString(t.STORAGE_GA_MEASUREMENT_ID,""),vn.getBoolean(t.STORAGE_GA_ENABLED,!1)===e.gaEnabled&&n===e.gaMeasurementID?[3,2]:(vn.remove(t.STORAGE_GA_CLIENT_ID),vn.setString(t.STORAGE_GA_MEASUREMENT_ID,e.gaMeasurementID),vn.setBoolean(t.STORAGE_GA_ENABLED,e.gaEnabled),[4,this.sendClientID()])):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e.sendClientID=function(){return _n(this,void 0,void 0,(function(){var e;return Tn(this,(function(n){switch(n.label){case 0:return vn.getBoolean(t.STORAGE_GA_ENABLED,!1)?[4,this.getClientID()]:[2];case 1:return(e=n.sent())?(Wn.getInstance().updateDeviceProps({gaClientID:e}),[2]):[2]}}))}))},e.getClientID=function(){return _n(this,void 0,void 0,(function(){var e;return Tn(this,(function(n){switch(n.label){case 0:return(e=vn.getString(t.STORAGE_GA_CLIENT_ID))?[3,2]:[4,this.getClientIDViaGTag()];case 1:e=n.sent(),n.label=2;case 2:return e?(vn.setString(t.STORAGE_GA_CLIENT_ID,e),[2,e]):[2]}}))}))},e.getClientIDViaGTag=function(){var e=vn.getString(t.STORAGE_GA_MEASUREMENT_ID,"");if(vn.getString(t.STORAGE_GA_MEASUREMENT_ID,"")&&e&&window.gtag)return new Promise((function(t){window.gtag("get",e,"client_id",(function(e){t(e)}))}))},e}(),In=function(e,n,r,i){this.appID=e,this.shopifyShop=n,this.uuid=r,this.props=i,this.sdk=t.SDK},An=n(716),xn=function(){function t(){}return t.addReferralData=function(t){Object.assign(t,this.getUTMParams()),t.referrer=this.getReferrer()},t.getReferrer=function(){if(document.referrer&&"".concat(location.origin,"/")!==document.referrer)return document.referrer.replace(location.origin,"")},t.getUTMParams=function(){var t;try{t=new An.U(location.href)}catch(t){return{}}var e={};return this.UTM_PARAMS.forEach((function(n){var r=t.getQueryParam(n);r&&(e[n]=r)})),e},t.UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],t}(),Nn=function(){function e(){this.inInactive=!1,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(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,vn.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime()),Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))},e.prototype.setActive=function(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.setScreen=function(t){this.screen=t},e.prototype.getScreen=function(){return this.screen},e.INSTANCE=new e,e}(),Dn=function(){function t(){}return t.watch=function(){var t=this.getDebugParam();"1"!==t&&"on"!==t||(localStorage.cooeeLogLevel="TRACE"),"on"===t?sessionStorage.cooeeDebug="1":"off"===t&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())},t.prepend=function(t){if(this.isOn){var e=document.createElement("div");e.innerHTML="• "+(new Date).toLocaleString()+" - "+t,this.element.prepend(e)}},t.renderDebugBar=function(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)},t.getDebugParam=function(){var t;return null===(t=new URL(location.href).searchParams)||void 0===t?void 0:t.get("cooee-debug")},t.dragElement=function(){var t=this,e=0,n=0,r=0,i=0,o=function(o){(o=o||window.event).preventDefault(),e=r-o.clientX,n=i-o.clientY,r=o.clientX,i=o.clientY,t.element.style.top=t.element.offsetTop-n+"px",t.element.style.left=t.element.offsetLeft-e+"px"},s=function(){document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=function(t){(t=t||window.event).preventDefault(),r=t.clientX,i=t.clientY,document.onmouseup=s,document.onmousemove=o}},t.isOn=!1,t}(),Ln=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.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(this.currentSessionStartTime=new Date,this.currentSessionID=(new dt).toHexString(),Dn.prepend("Session ID: <strong>".concat(this.currentSessionID,"</strong>")),vn.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),vn.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber(),Wn.getInstance().sendEvent(new Pt(t.EVENT_SESSION_STARTED)))},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=vn.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,vn.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.conclude=function(){var e={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Wn.getInstance().concludeSession(e),vn.remove(t.STORAGE_ACTIVE_TRIGGER),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,vn.remove(t.STORAGE_SESSION_ID),vn.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.isNewSessionRequired=function(){if(!vn.getString(t.STORAGE_SESSION_ID,""))return!0;var e=vn.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.getTotalDurationInSeconds=function(){if(Nn.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(vn.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=vn.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=vn.getNumber(t.STORAGE_SESSION_NUMBER,1),Dn.prepend("Session ID: <strong>".concat(this.currentSessionID,"</strong>"))},e.prototype.getLastActive=function(){return vn.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),Pn=function(){function t(){}return t.trackDeviceID=function(t){this.isInstalled()},t.trackIntent=function(t){var e;if(this.isInstalled()){var n=null===(e=oe[t])||void 0===e?void 0:e.toLowerCase();n&&(Sn.debug("Sending ".concat(n," intent to MS Clarity")),window.clarity("set","Cooee Intent",n))}},t.isInstalled=function(){return window.clarity&&"function"==typeof window.clarity},t}(),Rn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Cn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Bn=function(){function n(){this.runtimeData=Nn.getInstance(),this.apiToken="",this.userID=""}return n.getInstance=function(){return this.INSTANCE},n.prototype.registerDevice=function(t){return Rn(this,void 0,void 0,(function(){return Cn(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",this.getDefaultHeaders(),t)]}))}))},n.prototype.sendEvent=function(n){var r=this;if(n.name!==t.EVENT_SCREEN_VIEW||!t.blackListedScreenName.includes(n.screenName)){Dn.prepend("Sending event <strong>".concat(n.name.replace("CE ",""),"</strong> with id ").concat(n.id));var i=this.getDefaultHeaders(),o=new e(vn.getObject(t.STORAGE_ACTIVE_TRIGGER));!n.trigger&&o&&(o.updateExpired(),n.trigger=o,"test"===o.triggerID)||(n.name!==t.EVENT_APP_BACKGROUND&&Nn.getInstance().setActive(),this.doHTTP("POST","/v1/event/track",i,n).then((function(t){Sn.log("Sent",n.name),t.triggerData&&(t.triggerData.occurred=n.occurred,(new cr).render(t.triggerData)),r.updateUserIDAndToken({userID:t.userID,deviceID:t.deviceID,sdkToken:t.sdkToken});var e="Event <strong>".concat(t.eventName,"</strong> tracked");t.intent&&(e+=" and <strong>".concat(oe[t.intent],"</strong> intent calculated"),Pn.trackIntent(t.intent)),Dn.prepend(e)})).catch((function(t){Sn.error("Error sending event",t)})))}},n.prototype.updateUserData=function(t){var e=this,n=this.getDefaultHeaders();this.doHTTP("PUT","/v1/user/update",n,t).then((function(t){Sn.log("Updated user profile"),e.updateUserIDAndToken(t)})).catch((function(t){Sn.error("Error saving user profile",t)}))},n.prototype.updateUserIDAndToken=function(e){e&&Object.keys(e).length&&(e.userID&&vn.setString(t.STORAGE_USER_ID,e.userID),e.deviceID&&vn.setString(t.STORAGE_DEVICE_ID,e.deviceID),e.sdkToken&&(this.setAPIToken(e.sdkToken),vn.setString(t.STORAGE_SDK_TOKEN,e.sdkToken)))},n.prototype.updateDeviceProps=function(e){var n=this.getDefaultHeaders();this.doHTTP("PUT","/v1/device/update",n,e).then((function(){Sn.log("Updated device property")})).catch((function(n){var r;Sn.error("Error saving device property",n),(null===(r=null==e?void 0:e.cart)||void 0===r?void 0:r.token)&&vn.remove(t.STORAGE_SHOPIFY_CART_TOKEN)}))},n.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();this.doHTTP("POST","/v1/session/conclude",e,t).then((function(t){Sn.log("Conclude Session",t)})).catch((function(t){Sn.error(t)}))},n.prototype.logout=function(){var t=this,e=this.getDefaultHeaders();this.doHTTP("GET","/v1/user/logout",e).then((function(e){Sn.log("User logged out"),t.updateUserIDAndToken(e),Ln.getInstance().startNewSession()})).catch((function(t){Sn.error(t)}))},n.prototype.getAppConfigurations=function(){var e=this.getDefaultHeaders(),n=vn.getString(t.STORAGE_APP_ID);this.doHTTP("GET","/v1/app/configuration/".concat(n),e).then((function(t){Sn.log("Received app configuration"),On.processConfiguration(t)})).catch((function(t){Sn.error(t)}))},n.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},n.prototype.doHTTP=function(e,n,r,i){return Rn(this,void 0,void 0,(function(){var o,s,a;return Cn(this,(function(u){switch(u.label){case 0:return n.startsWith("http")||(n=t.API_URL+n),o="keepalive"in new Request(""),i&&!o&&JSON.stringify(i).includes("CE App Background")?[2,this.performXMLHttpRequest(n,r,i)]:(s={method:e,headers:r,keepalive:!0},i&&(s.body=JSON.stringify(i)),[4,fetch(n,s)]);case 1:if(!(a=u.sent()).ok)throw a;return[2,a.json()]}}))}))},n.prototype.performXMLHttpRequest=function(t,e,n){var r=new XMLHttpRequest;return r.open("POST",t,!1),e.forEach((function(t,e){r.setRequestHeader(e,t)})),r.send(JSON.stringify(n)),r.response.json()},n.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("content-type","application/json"),e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),this.apiToken&&e.append("x-sdk-token",this.apiToken),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},n.INSTANCE=new n,n}(),kn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Un=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Mn=function(){function e(){this.apiService=Bn.getInstance(),this.sdkToken="",this.userID="",this.deviceID="",this.appID="",this.shopifyShop=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t){return this.appID=t.appID,this.shopifyShop=t.shopifyShop,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!vn.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.getDeviceID=function(){return this.deviceID},e.prototype.acquireSDKToken=function(){return kn(this,void 0,void 0,(function(){return Un(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(Sn.log("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.userID,this.deviceID=e.deviceID,this.updateAPIClient(),vn.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),vn.setString(t.STORAGE_USER_ID,this.userID),vn.setString(t.STORAGE_DEVICE_ID,this.deviceID),e.appID&&vn.setString(t.STORAGE_APP_ID,e.appID)},e.prototype.populateUserDataFromStorage=function(){return kn(this,void 0,void 0,(function(){return Un(this,(function(e){return this.sdkToken=vn.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||Sn.warn("No SDK token found in local storage"),this.userID=vn.getString(t.STORAGE_USER_ID,""),this.userID||Sn.warn("No user ID found in local storage"),this.deviceID=vn.getString(t.STORAGE_DEVICE_ID,""),this.deviceID||Sn.warn("No device ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){Sn.log("SDK Token:",this.sdkToken),Sn.log("Device ID:",this.deviceID),Sn.log("User ID:",this.userID),Pn.trackDeviceID(this.deviceID),Dn.prepend("Device ID: <strong>".concat(this.deviceID,"</strong>")),this.apiService.setAPIToken(this.sdkToken)},e.prototype.getSDKTokenFromServer=function(){return kn(this,void 0,void 0,(function(){var t,e,n,r;return Un(this,(function(i){switch(i.label){case 0:return[4,this.getDeviceAuthRequest()];case 1:t=i.sent(),e=this.apiService.registerDevice(t),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e];case 3:return n=i.sent(),Sn.log("Register Device Response",n),this.saveUserDataInStorage(n),On.processConfiguration(n),[3,5];case 4:throw r=i.sent(),Sn.error(r),r;case 5:return[2]}}))}))},e.prototype.getDeviceAuthRequest=function(){return kn(this,void 0,void 0,(function(){var t,e;return Un(this,(function(n){switch(n.label){case 0:return[4,(new bn).get()];case 1:t=n.sent(),xn.addReferralData(t),t.host=location.origin,n.label=2;case 2:return n.trys.push([2,4,,5]),[4,(0,mn.r)()];case 3:return(null==(e=n.sent())?void 0:e.isPrivate)&&(t.private=!0),[3,5];case 4:return n.sent(),[3,5];case 5:return[2,new In(this.appID,this.shopifyShop,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=vn.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new dt).toHexString(),vn.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),jn=function(){function e(){}var n;return e.getString=function(t,e){return this.getItem(t)||e},e.setString=function(t,e){this.setItem(t,e)},e.remove=function(t){this.removeItem(t)},e.getItem=function(t){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t))},e.setItem=function(t,e){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t),e)},e.removeItem=function(t){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(t))},e.getAppID=function(){return vn.getString(t.STORAGE_APP_ID)},n=e,e.SESSION_STORAGE=window.sessionStorage,e.SESSION_STORAGE_KEY_PREFIX=t.COOEE.concat("/",n.getAppID(),"/"),e}(),Hn=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Gn=function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Fn=function(){function e(){this.sessionManager=Ln.getInstance(),this.safeHttpCallService=Wn.getInstance(),this.deviceAuthService=Mn.getInstance()}return e.prototype.init=function(n){var r=this;t.BOT_UA_REGEX.test(navigator.userAgent)?Sn.log("This seems to be a bot. Disabling SDK"):(this.deviceAuthService.init(n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(n)}),3e4)})),this.execute())},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():(this.sendSuccessiveLaunchEvent(),this.safeHttpCallService.getAppConfigurations())},e.prototype.isAppFirstTimeLaunch=function(){return!!vn.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(vn.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Hn(this,void 0,void 0,(function(){var e,n;return Gn(this,(function(r){switch(r.label){case 0:return e=new Pt(t.EVENT_APP_INSTALLED,{}),n=e,[4,(new bn).get()];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Hn(this,void 0,void 0,(function(){var e,n;return Gn(this,(function(r){switch(r.label){case 0:return this.isNewTabOpened()?(e=new Pt(t.EVENT_APP_LAUNCHED),n=e,[4,(new bn).get()]):[2];case 1:return n.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(e),[2]}}))}))},e.prototype.isNewTabOpened=function(){return!jn.getString(t.SESSION_STORAGE_TAB_OPENED,"")&&(jn.setString(t.SESSION_STORAGE_TAB_OPENED,"1"),!0)},e.replaySubject=new ln(1),e}(),Vn=function(){function t(){}return t.isShopify=function(){return!!window.Shopify},t.getShopName=function(){var t,e;if(this.isShopify())return null===(e=null===(t=window.Shopify.shop)||void 0===t?void 0:t.split("."))||void 0===e?void 0:e[0]},t.getScreenName=function(){if(this.isShopify()){var t=new URL(window.location.href).pathname.slice(1).split("/")[0];return""===t?"home":"collections"===t?"collection":"products"===t?"product":"cart"===t?"cart":void 0}},t}(),$n=function(){function t(){}return t.isECommerceApp=function(){return Vn.isShopify()},t}(),Wn=function(){function e(){this.httpApiService=Bn.getInstance(),this.sessionManager=Ln.getInstance(),this.rejectEvents=[t.EVENT_SCREEN_VIEW,t.EVENT_APP_LAUNCHED]}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.sendEvent=function(t){var e=this;this.shouldReject(t)||Fn.replaySubject.subscribe((function(){e.addEventData(t),e.httpApiService.sendEvent(t)}))},e.prototype.updateProfile=function(t){var e=this;t=null!=t?t:{},Fn.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},e.prototype.updateDeviceProps=function(t,e){var n=this;Fn.replaySubject.subscribe((function(){n.httpApiService.updateDeviceProps({props:t,cart:e})}))},e.prototype.concludeSession=function(t){var e=this;Fn.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},e.prototype.logout=function(){var t=this;Fn.replaySubject.subscribe((function(){t.httpApiService.logout()}))},e.prototype.getAppConfigurations=function(){var t=this;Fn.replaySubject.subscribe((function(){t.httpApiService.getAppConfigurations()}))},e.prototype.addEventData=function(t){t.screenName=Nn.getInstance().getScreen(),t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber(),xn.addReferralData(t.properties)},e.prototype.shouldReject=function(t){return!($n.isECommerceApp()||!this.rejectEvents.includes(t.name)&&t.name.startsWith("CE ")||(Sn.log("Rejecting ".concat(t.name," as this is not e-commerce app")),0))},e}();!function(t){t[t.CAMERA=1]="CAMERA",t[t.LOCATION=2]="LOCATION",t[t.PUSH=3]="PUSH"}(on||(on={})),function(t){t[t.IAB=1]="IAB",t[t.EXTERNAL=2]="EXTERNAL",t[t.PROMPT=3]="PROMPT",t[t.SAME_TAB=4]="SAME_TAB",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.KV_VIEW_ITEM=101]="KV_VIEW_ITEM",t[t.KV_ADD_TO_CART=102]="KV_ADD_TO_CART",t[t.KV_COUPON_CODE=103]="KV_COUPON_CODE",t[t.KV_VIEW_CATEGORY=104]="KV_VIEW_CATEGORY"}(sn||(sn={}));var zn=function(){function n(){}return n.storeActiveTrigger=function(n){if((null==n?void 0:n.id)&&"test"!==n.id){var r=new e(n);return vn.setObject(t.STORAGE_ACTIVE_TRIGGER,r),r}},n}(),qn=function(){return qn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},qn.apply(this,arguments)},Jn=function(){function e(t,e){this.action=t,this.apiService=Wn.getInstance(),this.triggerContext=e}return e.prototype.execute=function(){this.closeAction();var t=this.action.custKV;switch(this.action.at){case sn.EXTERNAL:this.externalAction();break;case sn.IAB:this.iabAction();break;case sn.SAME_TAB:this.gotoURLAction();break;case sn.SHARE:this.shareAction();break;case sn.PROMPT:this.prompt();break;case sn.KEY_VALUE:case sn.KV_ADD_TO_CART:case sn.KV_COUPON_CODE:case sn.KV_VIEW_CATEGORY:case sn.KV_VIEW_ITEM:t=qn(qn({},t),this.action.kv);break;case void 0:break;default:return void Sn.error("Received an invalid ClickActionType: ",this.action.at)}this.upAction(),this.kvAction(t)},e.prototype.externalAction=function(){var t,e;if(null===(t=this.action.ext)||void 0===t?void 0:t.u){var n=this.action.ext.u;this.isValidURL(n)||(n="//".concat(n)),null===(e=window.open(n,"_blank"))||void 0===e||e.focus()}},e.prototype.isValidURL=function(t){try{new URL(t)}catch(t){return!1}return!0},e.prototype.gotoURLAction=function(){var t;if(null===(t=this.action.gu)||void 0===t?void 0:t.u){var e=this.action.gu.u;this.isValidURL(e)||(e="//".concat(e)),window.open(e,"_self")}},e.prototype.iabAction=function(){var t;if(null===(t=this.action.iab)||void 0===t?void 0:t.u){var e=this.action.iab.u;this.isValidURL(e)||(e="//".concat(e)),(new sr).render(e)}},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(t){document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:t}))},e.prototype.prompt=function(){var t=this.action.pmpt;t&&(t===on.LOCATION&&this.promptLocationPermission(),t===on.PUSH&&this.promptPushNotificationPermission(),t===on.CAMERA&&this.promptCameraPermission())},e.prototype.closeAction=function(){var e;this.containsCTA()?(e=t.EVENT_TRIGGER_CLICKED,zn.storeActiveTrigger(this.triggerContext.triggerData)):e=t.EVENT_TRIGGER_CLOSED,this.action.close&&this.triggerContext.closeInApp(e)},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)})):Sn.warn("Navigator.share is not compatible with this browser"))},e.prototype.containsCTA=function(){return!!this.action.at||!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))},e.prototype.isEmpty=function(t){return!t||0===Object.keys(t).length},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}):Sn.warn("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,r=function(){var t,e,n;return function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateDeviceProps({perm:e})}))},e}(),Kn=function(){function t(t,e,n){this.renderer=dn.get(),this.screenWidth=0,this.screenHeight=0,this.parentHTMLEl=t,this.inappElement=e,this.triggerContext=n,this.scalingFactor=this.renderer.getScalingFactor(),this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return t.prototype.getHTMLElement=function(){return this.inappHTMLEl},t.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},t.prototype.processCommonBlocks=function(){this.processDisplay(),this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},t.prototype.processDisplay=function(){this.renderer.setStyle(this.inappHTMLEl,"display","block")},t.prototype.processWidthAndHeight=function(){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))},t.prototype.getSizePx=function(t){return this.getScaledSize(t)+"px"},t.prototype.getScaledSize=function(t){return t*this.scalingFactor},t.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))},t.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")))},t.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(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"))},t.prototype.processTransparency=function(){var t=this.inappElement.alpha;if(!isNaN(t)){var e=(t/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",e)}},t.prototype.processShadow=function(){var t=this.inappElement.shd;t&&this.renderer.setStyle(this.inappHTMLEl,"box-shadow",t.getStyle(this.scalingFactor))},t.prototype.processTransformBlock=function(){var t=new qt(this.inappElement.trf);t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate(".concat(t.rotate,"deg)"))},t.prototype.registerAction=function(){var t=this,e=this.inappElement.clc;e&&0!==Object.keys(e).length&&(this.inappHTMLEl.addEventListener("click",(function(n){n.stopPropagation(),new Jn(e,t.triggerContext).execute()})),this.inappElement instanceof ue&&1===Object.keys(e).length&&void 0!==e.close&&null!==e.close||this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))},t.prototype.processBackgroundBlock=function(){var t=this.inappElement.bg;if(t){var e=this.inappHTMLEl;if(t.glossy){var n="backdrop-filter",r="-webkit-"+n,i="blur(".concat(t.glossy.radius,"px)");if(!CSS.supports(r,i)&&!CSS.supports(n,i))return void this.renderer.setStyle(e,"background",t.glossy.fallback.rgba);this.renderer.setStyle(e,r,i),this.renderer.setStyle(e,n,i),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 o='url("'.concat(t.img.src,'") no-repeat center');this.renderer.setStyle(e,"background",o),this.renderer.setStyle(e,"background-size","cover"),t.img.a&&(this.renderer.setStyle(e,"-webkit-backdrop-filter","opacity(".concat(t.img.a,")")),this.renderer.setStyle(e,"backdrop-filter","opacity(".concat(t.img.a,")")))}}},t.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient(".concat(t.ang,"deg, ").concat(t.c1,", ").concat(t.c2);t.c3&&(n+=", ".concat(t.c3)),n+=")",this.renderer.setStyle(this.inappHTMLEl,e,n)}},t.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},t}(),Yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return Yn(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.renderer.setStyle(this.inappHTMLEl,"letter-spacing","normal");var e=this.inappElement.font;e&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(e.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",null===(t=e.family)||void 0===t?void 0:t.name),this.renderer.setStyle(this.inappHTMLEl,"line-height",e.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.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",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit"),this.renderer.setStyle(t,"font-family","inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=Kt[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(Kn),Zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qn=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return Zn(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n,r,i=e.renderer.createElement("span");i.innerHTML=null===(r=null===(n=t.txt)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(Xn),tr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),er=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return tr(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(Kn),nr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("img"),i.insertElement(),i}return nr(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,"margin","0 auto"),this.processCommonBlocks()},e}(Kn),ir=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(e){function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.parent=t,i.inappHTMLEl=i.renderer.createElement("div"),i}return ir(n,e),n.prototype.render=function(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(t.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",n.MAX_Z_INDEX),this.inappHTMLEl},n.prototype.processBackgroundBlock=function(){this.inappElement.cover&&e.prototype.processBackgroundBlock.call(this)},n.prototype.processWidthAndHeight=function(){var t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{var e=this.inappElement.spc,n=this.getScaledSize(t.w)+e.getHorizontal(),r=this.getScaledSize(t.h)+e.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",r+"px")}},n.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;this.renderer.setStyle(this.inappHTMLEl,"padding",t.getPaddingCSS())},n.prototype.processDisplay=function(){this.renderer.setStyle(this.inappHTMLEl,"display","flex"),Object.assign(this.inappHTMLEl.style,this.inappElement.getStylesForWrapper()),Object.assign(this.inappHTMLEl.style,this.inappElement.getFlexStylesForContainer())},n.prototype.processPositionBlock=function(){var t;if(this.renderer.isParentNotBody()){if(null===(t=this.triggerContext.triggerData.ian)||void 0===t?void 0:t.isEmbedded())return void this.renderer.setStyle(this.inappHTMLEl,"position","block");this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")},n.prototype.processBorderBlock=function(){},n.prototype.processTransparency=function(){},n.prototype.processTransformBlock=function(){},n.prototype.processGradient=function(){},n.prototype.processShadow=function(){},n.prototype.registerAction=function(){var t=this;this.inappHTMLEl.addEventListener("click",(function(){new Jn({close:!0},t.triggerContext).execute()}))},n.MAX_Z_INDEX="2147483647",n}(Kn),sr=function(){function e(){this.renderer=dn.get()}return e.prototype.render=function(e){var n=document.querySelector(".".concat(t.IN_APP_WRAPPER_NAME)),r=this.createIFrameContainer();return this.createIFrameElement(r,e),this.createAnchorElement(n,r),this.renderer.appendChild(n,r),r},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 n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},e.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},e}(),ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ur=function(e){function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.inappHTMLEl=i.renderer.createElement("div"),i.insertElement(),i}return ar(n,e),n.prototype.render=function(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(t.IN_APP_CONTAINER_NAME),this},n}(Kn),cr=function(){function e(t){var e=this;this.renderer=dn.get(),this.safeHTTP=Wn.getInstance(),this.resizeListener=function(){return e.screenResized()},this.setParentContainer(t)}return e.prototype.setParentContainer=function(t){this.parent=null!=t?t:document.body,this.renderer.setParentContainer(this.parent)},e.prototype.render=function(t){var e=this,n=new be(t);if(this.triggerContext=new se(new Date,n),this.triggerContext.onClose((function(t){e.closeInApp(t)})),this.ian=n.ian,(this.renderer.isMobile()||"mobile"===n.previewType)&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){var r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}n.shouldDelay()?window.setTimeout((function(){e.startRenderingOnce()}),n.getDelaySeconds()):this.startRenderingOnce()},e.prototype.startRenderingOnce=function(){try{this.startRendering()}catch(t){return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener)},e.prototype.startRendering=function(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new or(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw Sn.error(t),t}},e.prototype.sendTriggerDisplayed=function(){var e=new Pt(t.EVENT_TRIGGER_DISPLAYED,{},this.triggerContext.triggerData);this.safeHTTP.sendEvent(e)},e.prototype.sendTriggerClosed=function(t){var e=t.eventName;delete t.eventName;var n=new Pt(e,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n)},e.prototype.addEnterAnimation=function(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})},e.prototype.renderElement=function(t,e,n){e instanceof ne?new Qn(t,e,n).render():e instanceof te?new rr(t,e,n).render():e instanceof Zt?new er(t,e,n).render():Sn.error("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(t){var e,n,r=this,i=null===(e=this.ian)||void 0===e?void 0:e.cont;i&&(this.containerHTMLElement=new ur(this.rootContainer,i,t).render().getHTMLElement(),(new we).loadAllFonts(this.ian),null===(n=this.ian.elems)||void 0===n||n.forEach((function(e){return n=r,i=void 0,s=function(){return function(t,e){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=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++,r=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],r=0}finally{n=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.renderElement(this.containerHTMLElement,e,t)];case 1:return n.sent(),[2]}}))},new((o=void 0)||(o=Promise))((function(t,e){function r(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(r,a)}u((s=s.apply(n,i||[])).next())}));var n,i,o,s})),this.addEnterAnimation(this.ian.anim))},e.prototype.closeInApp=function(t){var e=this,n=this.ian.anim.getExitAnimation();this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"}).onfinish=function(){e.removeInApp(),e.sendTriggerClosed(t),window.removeEventListener("resize",e.resizeListener)}},e.prototype.screenResized=function(){this.removeInApp(),this.startRendering()},e.prototype.removeInApp=function(){dn.get().removeInApp(this.triggerContext)},e}();const fr=cr})(),CooeePreview=r.default})();
|