PageSourceSearch

https://app.netlify.com/assets/js/monitoring.vendor.d1a11d03159abc367abb.js

js netlify.com collected 2026-09-24 07:55:14 UTC 965,269 bytes, 306 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[4539],{76(e){e.exports=Array.isArray},1005(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2576(e,t,r){var n=r(89992),i=r(80014),o=r(78409),s=r(1005);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return("number"==a?!!(i(r)&&o(t,r.length)):"string"==a&&t in r)&&n(r[t],e)}},3210(e,t,r){var n=r(35256),i=r(1005);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3342(e,t,r){e.exports=r(58780)(Object.getPrototypeOf,Object)},4236(e,t,r){e.exports=r(87776).Symbol},9984(e,t,r){var n=r(64809),i=r(60961);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},11991(e,t,r){"use strict";r.d(t,{Se:()=>u,T$:()=>l});var n,i,o=r(55823),s=r(79548),a=r(81645),l=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,o.Cl)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(i.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(i.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(i.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(i.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(i.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(i.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(i.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(i.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(i.UNSET,e,s.mG),this},e.prototype.clearAll=function(){return this._properties={},this._properties[i.CLEAR_ALL]=s.mG,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return!(void 0!==this._properties[i.CLEAR_ALL]||this._propertySet.has(t))&&(e===i.ADD?"number"==typeof r:e===i.UNSET||e===i.REMOVE||(0,a.E)(t,r))},e}();(n=i||(i={})).SET="$set",n.SET_ONCE="$setOnce",n.ADD="$add",n.APPEND="$append",n.PREPEND="$prepend",n.REMOVE="$remove",n.PREINSERT="$preInsert",n.POSTINSERT="$postInsert",n.UNSET="$unset",n.CLEAR_ALL="$clearAll";var u=[i.CLEAR_ALL,i.UNSET,i.SET,i.SET_ONCE,i.ADD,i.APPEND,i.PREPEND,i.PREINSERT,i.POSTINSERT,i.REMOVE]},12597(e){e.exports=function(e){return void 0===e}},13088(e,t,r){var n=r(4236),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},14553(e,t,r){e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},16350(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null==e)throw TypeError("Expected a string but received a ".concat(e));if("String"!==e.constructor.name)throw TypeError("Expected a string but received a ".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default},20519(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},21610(e){e.exports=function(e){return null!=e&&"object"==typeof e}},23822(e,t,r){"use strict";var n,i,o,s;r.d(t,{S:()=>i,e:()=>n}),(o=n||(n={})).SET="$set",o.SET_ONCE="$setOnce",o.ADD="$add",o.APPEND="$append",o.PREPEND="$prepend",o.REMOVE="$remove",o.PREINSERT="$preInsert",o.POSTINSERT="$postInsert",o.UNSET="$unset",o.CLEAR_ALL="$clearAll",(s=i||(i={})).IDENTIFY="$identify",s.GROUP_IDENTIFY="$groupidentify",s.REVENUE="revenue_amount"},26136(e){e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},35240(e,t,r){var n=r(67518),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},35256(e,t,r){var n=r(55665),i=r(68515),o=r(81958),s=n?n.toStringTag:void 0;
1e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},37811(e,t,r){"use strict";r.d(t,{iE:()=>tU,Zh:()=>tz,Z3:()=>tH,bL:()=>tj,j8:()=>tB});var n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E,C,_,O,I,T,R,A,P,M,N,D,L,U,j,F,B=r(36870),H=r(86326),z=r(96708),q=r.n(z),V=r(38161),$=r(72386),W=r(1003),K=r(36337),J=r(93666),Y=r(26167),G=r(73183),X=r(32402),Q=r(5227),Z=r(11234),ee=r(2596),et=r(92148),er=r(47918),en=r(31194),ei=r(49778);r(89463);var eo=r(9984),es=r.n(eo),ea=r(64417),el=r.n(ea),eu=r(51658),ec=r.n(eu),ed=r(50140),eh=r.n(ed),ef=r(12597),ep=r.n(ef);let eg={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"}
1,kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"}
1,sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};class em{static getLanguages(e=[]){return e.map(e=>({code:e,name:em.getName(e),nativeName:em.getNativeName(e)}))}static getName(e){return em.validate(e)?eg[e].name:""}static getAllNames(){return Object.values(eg).map(e=>e.name)}static getNativeName(e){return em.validate(e)?eg[e].nativeName:""}static getAllNativeNames(){return Object.values(eg).map(e=>e.nativeName)}static getCode(e){return Object.keys(eg).find(t=>{let r=eg[t];return r.name.toLowerCase()===e.toLowerCase()||r.nativeName.toLowerCase()===e.toLowerCase()})||""}static getAllCodes(){return Object.keys(eg)}static validate(e){return eg.hasOwnProperty(e)}}function ev(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function ey(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function eb(e){return function(t,r){(0,V.B)({name:"isLongerThan",target:t.constructor,propertyName:r,options:e,validator:{validate:ew,defaultMessage:()=>"$property must be a JSON Object with only string / number / boolean / null types"}})}}function ew(e){if(!ec()(e))return!1;for(let t in e){if(!q()(t))return!1;let r=e[t];if(ep()(r)||!(q()(r)||es()(r)||el()(r)||eh()(r)))return!1}return!0}function eS(e){return function(t,r){(0,V.B)({name:"isNotBlank",target:t.constructor,propertyName:r,options:e,validator:{validate:ek}})}}function ek(e){return"string"==typeof e&&e.trim().length>0}function ex(e){return(0,$.q)({name:"isISO6391",validator:{validate:(e,t)=>{var r;return"string"==typeof e&&(r=e,em.validate(r.toLocaleLowerCase()))},defaultMessage:(0,$.Y)(e=>e+"$property must be a valid ISO6391 code",e)}},e)}(n=S||(S={})).TARGETING_MATCH="TARGETING_MATCH",n.SPLIT="SPLIT",n.DEFAULT="DEFAULT",n.DISABLED="DISABLED",n.ERROR="ERROR",n.OVERRIDE="OVERRIDE",n.OPT_IN="OPT_IN",(i=k||(k={})).ALL_USERS="All Users",i.AUDIENCE_MATCH="Audience Match",i.NOT_IN_AUDIENCE="Not in Audience",i.OPT_IN="Opt-In",i.NOT_OPTED_IN="Not Opt-In",i.OVERRIDE="Override",i.USER_ID="User ID",i.EMAIL="Email",i.COUNTRY="Country",i.PLATFORM="Platform",i.PLATFORM_VERSION="Platform Version",i.APP_VERSION="App Version",i.DEVICE_MODEL="Device Model",i.CUSTOM_DATA="Custom Data",i.RANDOM_DISTRIBUTION="Random Distribution",i.ROLLOUT="Rollout",(o=x||(x={})).MISSING_CONFIG="Missing Config",o.MISSING_VARIABLE="Missing Variable",o.MISSING_FEATURE="Missing Feature",o.MISSING_VARIATION="Missing Variation",o.MISSING_VARIABLE_FOR_VARIATION="Missing Variable for Variation",o.USER_NOT_IN_ROLLOUT="User Not in Rollout",o.USER_NOT_TARGETED="User Not Targeted",o.INVALID_VARIABLE_TYPE="Invalid Variable Type",o.TYPE_MISMATCH="Variable Type Mismatch",o.UNKNOWN="Unknown",o.ERROR="Error";let eE=({value:e})=>"true"===e||"false"!==e&&e,eC=({value:e})=>
1{if(!e)return;let t=Number(e);return new Date(isNaN(t)?e:t)};class e_{isAnonymous;user_id;email;name;language;country;appVersion;appBuild;customData;privateCustomData;createdDate;lastSeenDate;platform;platformVersion;deviceModel;sdkType="api";sdkVersion}ev([(0,W.Zx)(),(0,K.X)(),(0,en.d)(eE),ey("design:type",Boolean)],e_.prototype,"isAnonymous",void 0),ev([(0,J.IP)(),eS(),(0,Y.Fv)(),ey("design:type",String)],e_.prototype,"user_id",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"email",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"name",void 0),ev([ex(),(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"language",void 0),ev([(0,G.Nt)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"country",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"appVersion",void 0),ev([(0,X.Mx)(),(0,K.X)(),(0,ei.Z)(()=>Number),ey("design:type",Number)],e_.prototype,"appBuild",void 0),ev([eb(),(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?JSON.parse(e):e),ey("design:type",Object)],e_.prototype,"customData",void 0),ev([eb(),(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?JSON.parse(e):e),ey("design:type",Object)],e_.prototype,"privateCustomData",void 0),ev([(0,Q.XF)(),(0,K.X)(),(0,en.d)(eC),ey("design:type",Date)],e_.prototype,"createdDate",void 0),ev([(0,Q.XF)(),(0,K.X)(),(0,en.d)(eC),ey("design:type",Date)],e_.prototype,"lastSeenDate",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"platform",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"platformVersion",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"deviceModel",void 0),ev([(0,J.IP)(),(0,K.X)(),(0,Z.Sf)(["client","server","mobile","api"]),(0,en.d)(({value:e})=>e),ey("design:type",String)],e_.prototype,"sdkType",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],e_.prototype,"sdkVersion",void 0),ev([(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?JSON.parse(e):e),ey("design:type",Object)],(class extends e_{optIns}).prototype,"optIns",void 0);class eO{isAnonymous;user_id;email;name;language;country;appVersion;appBuild;customData;privateCustomData;createdDate;lastSeenDate;platform;platformVersion;deviceModel;sdkType;sdkVersion;isDebug}ev([(0,W.Zx)(),(0,en.d)(eE),ey("design:type",Boolean)],eO.prototype,"isAnonymous",void 0),ev([(0,J.IP)(),eS(),(0,Y.Fv)(),ey("design:type",String)],eO.prototype,"user_id",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],eO.prototype,"email",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],eO.prototype,"name",void 0),ev([ex(),(0,J.IP)(),(0,K.X)(),ey("design:type",String)],eO.prototype,"language",void 0),ev([(0,G.Nt)(),(0,K.X)(),ey("design:type",String)],eO.prototype,"country",void 0),ev([(0,J.IP)(),(0,K.X)(),ey("design:type",String)],eO.prototype,"appVersion",void 0),ev([(0,X.Mx)(),(0,K.X)(),(0,ei.Z)(()=>Number),ey("design:type",Number)],eO.prototype,"appBuild",void 0),ev([eb(),(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?JSON.parse(e):e),ey("design:type",Object)],eO.prototype,"customData",void 0),ev([eb(),(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?JSON.parse(e):e),ey("design:type",Object)],eO.prototype,"privateCustomData",void 0),ev([(0,Q.XF)(),(0,en.d)(eC),ey("design:type",Date)],eO.prototype,"createdDate",void 0),ev([(0,Q.XF)(),(0,en.d)(eC),ey("design:type",Date)],eO.prototype,"lastSeenDate",void 0),ev([(0,J.IP)(),(0,Y.Fv)(),ey("design:type",String)],eO.prototype,"platform",void 0),ev([(0,J.IP)(),(0,Y.Fv)(),ey("design:type",String)],eO.prototype,"platformVersion",void 0),ev([(0,J.IP)(),(0,Y.Fv)(),ey("design:type",String)],eO.prototype,"deviceModel",void 0),ev([(0,J.IP)(),(0,Z.Sf)(["client","mobile"]),ey("design:type",String)],eO.prototype,"sdkType",void 0),ev([(0,J.IP)(),(0,Y.Fv)(),ey("design:type",String)],eO.prototype,"sdkVersion",void 0),ev([(0,W.Zx)(),(0,K.X)(),(0,en.d)(({value:e})=>q()(e)?"true"===e:e),ey("design:type",Boolean)],eO.prototype,"isDebug",void 0),ev([(0,J.IP)(),eS(),(0,Y.Fv)(),ey("design:type",String)],(class{user_id}).prototype,"user_id",void 0);class eI{type;target;date;value;metaData}ev([(0,Y.Fv)(),(0,J.IP)(),ey("design:type",String)],eI.prototype,"type",void 0),ev([(0,K.X)(),(0,J.IP)(),ey("design:type",String)],eI.prototype,"target",void 0),ev([(0,K.X)(),(0,X.Mx)(),ey("design:type",Number)],eI.prototype,"date",void 0),ev([(0,K.X)(),(0,X.Mx)(),ey("design:type",Number)],eI.prototype,"value",void 0),ev([(0,K.X)(),(0,ee.av)(),ey("design:type",Object)],eI.prototype,"metaData",void 0);class eT{user;events}ev([(0,Y.Fv)(),(0,et.K)(),(0,ei.Z)(()=>e_),ey("design:type",e_)],eT.prototype,"user",void 0),ev([(0,Y.Fv)(),(0,er.QS)(),(0,et.K)({each:!0}),(0,ei.Z)(()=>eI),ey("design:type",Array)],eT.prototype,"events",void 0),(s=E||(E={}))["="]="=",s["!="]="!=",s[">"]=">",s[">="]=">=",s["<"]="<",s["<="]="<=",s.exist="exist",s["!exist"]="!exist",s.contain="contain",s["!contain"]="!contain",s.startWith="startWith",s["!startWith"]="!startWith",s.endWith="endWith",s["!endWith"]="!endWith",(a=C||(C={}))["="]="=",a.exist="exist",a["!exist"]="!exist",(l=_||(_={}))["="]="=",l["!="]="!=",l.exist="exist",l["!exist"]="!exist",l.contain="contain",l["!contain"]="!contain",l.startWith="startWith",l["!startWith"]="!startWith",l.endWith="endWith",l["!endWith"]="!endWith",(u=O||(O={}))["="]="=",u["!="]="!=",u[">"]=">",u[">="]=">=",u["<"]="<",u["<="]="<=",u.exist="exist",u["!exist"]="!exist",(c=I||(I={}))["="]="=",c["!="]="!=",c[">"]=">",c[">="]=">=",c["<"]="<",c["<="]="<=",c.exist="exist",c["!exist"]="!exist",(d=T||(T={})).all="all",d.user="user",d.optIn="optIn",d.audienceMatch="audienceMatch",(h=R||(R={})).user_id="user_id",h.email="email",h.country="country",h.platform="platform",h.platformVersion="platformVersion",h.appVersion="appVersion",h.deviceModel="deviceModel",h.customData="customData",(f=A||(A={})).mixpanel="mixpanel",f.csv="csv",(p=P||(P={})).string="String",p.boolean="Boolean",p.number="Number",p.semver="Semver",(g=M||(M={})).and="and",g.or="or",(N||(N={})).override="override";class eR{type;date;percentage}ev([(0,ei.Z)(()=>Date),ey("design:type",Date)],eR.prototype,"date",void 0);class eA{type;startPercentage;startDate;stages}ev([(0,ei.Z)(()=>Date),ey("design:type",Date)],eA.prototype,"startDate",void 0),ev([(0,ei.Z)(()=>eR),ey("design:type",Array)],eA.prototype,"stages",void 0);class eP{_id;_audience;rollout;distribution;type;bucketingKey}ev([(0,ei.Z)(()=>eA),ey("design:type",eA)],eP.prototype,"rollout",void 0);class eM{_id;prerequisites;winningVariation;forcedUsers;targets}ev([(0,ei.Z)(()=>eP),ey("design:type",Array)],eM.prototype,"targets",void 0),(m=D||(D={})).api="api",m.dashboard="dashboard",(v=L||(L={})).release="release",v.experiment="experiment",v.permission="permission",v.ops="ops";class eN{_id;type;key;variations;configuration;settings;tags}ev([(0,ei.Z)(()=>eM),ey("design:type",eM)],eN.prototype,"configuration",void 0),(y=U||(U={})).api="api",y.dashboard="dashboard",y.clientSDK="clientSDK",y.serverSDK="serverSDK",(b=j||(j={})).string="String",b.boolean="Boolean",b.number="Number",b.json="JSON",ev([(0,ei.Z)(()=>eN),ey("design:type",Array)],(class{project;environment;features;variables;audiences;variableHashes;listAudiences;debugUsers;sse;ably;clientSDKKey}).prototype,"features",void 0);class eD{type;target;customType;user_id;date;clientDate;value;featureVars;metaData}
1function eL(e,t,r,n){if("boolean"==typeof e)return j.boolean;if("number"==typeof e)return j.number;if("string"==typeof e)return j.string;if("object"==typeof e)return j.json;if(!n)return r.warn(`The default value for variable ${t} is not of type Boolean, Number, String, or JSON`),null;else throw Error(`The default value for variable ${t} is not of type Boolean, Number, String, or JSON`)}ev([(0,J.IP)(),ey("design:type",String)],eD.prototype,"type",void 0),ev([(0,K.X)(),(0,J.IP)(),ey("design:type",String)],eD.prototype,"target",void 0),ev([(0,K.X)(),(0,J.IP)(),ey("design:type",String)],eD.prototype,"customType",void 0),ev([(0,J.IP)(),(0,Y.Fv)(),ey("design:type",String)],eD.prototype,"user_id",void 0),ev([(0,X.Mx)(),ey("design:type",Number)],eD.prototype,"date",void 0),ev([(0,X.Mx)(),ey("design:type",Number)],eD.prototype,"clientDate",void 0),ev([(0,K.X)(),(0,X.Mx)(),ey("design:type",Number)],eD.prototype,"value",void 0),ev([(0,Y.Fv)(),ey("design:type",Object)],eD.prototype,"featureVars",void 0),ev([(0,K.X)(),ey("design:type",Object)],eD.prototype,"metaData",void 0);class eU extends Error{constructor(e){super(e instanceof Error?e.message:e),this.name="UserError",e instanceof Error&&(this.stack=e.stack)}}var ej=r(38085),eF=r.n(ej),eB=r(59468),eH=r.n(eB),ez=r(53642),eq=r(37856),eV=r.n(eq),e$=r(61143),eW=r.n(e$);let eK="dvc:user",eJ="dvc:anonymous_user_id",eY="dvc:anonymous_config",eG="dvc:identified_config",eX=e=>e instanceof Date?e.getTime():"object"==typeof e?JSON.stringify(e):e,eQ=(e,t)=>{if(!eZ(t))throw Error(`Missing parameter: ${e}`)},eZ=e=>null!=e,e0=(e,t,r)=>{if(!t)throw Error(`Missing parameter: ${e}`);if(typeof t!==r)throw Error(`${e} is not of type ${r}`)};function e1(){return"undefined"!=typeof self&&self.constructor&&"ServiceWorkerGlobalScope"===self.constructor.name}class e2{constructor(e){let{key:t,defaultValue:r}=e;e0("key",t,"string"),eQ("defaultValue",r),this.key=t.toLowerCase(),void 0===e.value||null===e.value?(this.isDefaulted=!0,this.value=r):(this.value=e.value,this.isDefaulted=!1),this.defaultValue=e.defaultValue,this.eval=e.eval,this._feature=e._feature||null}onUpdate(e){return e0("callback",e,"function"),this.callback=e,this}}let e3={variableEvaluated:"variableEvaluated",variableDefaulted:"variableDefaulted"};class e4{constructor(e,t,r){var n,i,o;this.eventQueueBatchSize=100,this.sdkKey=e,this.client=t,this.eventQueue=[],this.aggregateEventMap={},this.options=r;let s="number"==typeof r.eventFlushIntervalMS?r.eventFlushIntervalMS:1e4;if(s<500)throw Error(`eventFlushIntervalMS: ${s} must be larger than 500ms`);if(s>6e4)throw Error(`eventFlushIntervalMS: ${s} must be smaller than 1 minute`);if((null==(n=r.next)?void 0:n.disableAutomaticEventFlush)||(this.flushInterval=setInterval(this.flushEvents.bind(this),s)),this.flushEventQueueSize=null!=(i=null==r?void 0:r.flushEventQueueSize)?i:100,this.maxEventQueueSize=null!=(o=null==r?void 0:r.maxEventQueueSize)?o:1e3,this.flushEventQueueSize>=this.maxEventQueueSize)throw Error(`flushEventQueueSize: ${this.flushEventQueueSize} must be smaller than maxEventQueueSize: ${this.maxEventQueueSize}`);if(this.flushEventQueueSize<10||this.flushEventQueueSize>1e3)throw Error(`flushEventQueueSize: ${this.flushEventQueueSize} must be between 10 and 1000`);if(this.maxEventQueueSize<100||this.maxEventQueueSize>5e3)throw Error(`maxEventQueueSize: ${this.maxEventQueueSize} must be between 100 and 5000`)}async flushEvents(){let e=this.client.user;if(!e)return void this.client.logger.warn("Skipping event flush, user has not been set yet.");let t=[...this.eventQueue],r=this.eventsFromAggregateEventMap();if(t.push(...r),t.length)for(let r of(this.client.logger.info(`Flush ${t.length} Events`),this.eventQueue=[],this.aggregateEventMap={},eF()(t,this.eventQueueBatchSize)))try{let t=await tu(this.sdkKey,this.client.config,e,r,this.client.logger,this.options);201===t.status?this.client.logger.info(`DevCycle Flushed ${r.length} Events.`):t.status>=500||408===t.status?(this.client.logger.warn(`failed to flush events, retrying events. Response status: ${t.status}, message: ${t.statusText}`),this.eventQueue.push(...r)):this.client.logger.error(`failed to flush events, dropping events. Response status: ${t.status}, message: ${t.statusText}`)}catch(e){this.client.eventEmitter.emitError(e),this.client.logger.error(`failed to flush events due to error, dropping events. Error message: ${null==e?void 0:e.message}`)}}queueEvent(e){if(this.checkEventQueueSize())return void this.client.logger.warn(`DevCycle: Max event queue size (${this.maxEventQueueSize}) reached, dropping event: ${e}`);this.eventQueue.push(e)}queueAggregateEvent(e){if(this.checkEventQueueSize())return void this.client.logger.warn(`DevCycle: Max event queue size (${this.maxEventQueueSize}) reached, dropping event: ${e}`);eQ("type",e.type),eQ("target",e.target),e.date=Date.now(),e.value=1;let t=this.aggregateEventMap[e.type];t?t[e.target]?t[e.target].value++:t[e.target]=e:this.aggregateEventMap[e.type]={[e.target]:e}}checkEventQueueSize(){let e=Object.values(this.aggregateEventMap).reduce((e,t)=>
1e+Object.keys(t).length,0),t=this.eventQueue.length+e;return t>=this.flushEventQueueSize&&this.flushEvents(),t>=this.maxEventQueueSize}eventsFromAggregateEventMap(){return Object.values(this.aggregateEventMap).map(e=>Object.values(e)).flat()}async close(){clearInterval(this.flushInterval),await this.flushEvents()}}class e6{constructor(e,t,r){var n;let{type:i,target:o,date:s,value:a,metaData:l}=e;eQ("type",i);let u=!(i in e3);if(this.type=u?"customEvent":i,this.customType=u?i:void 0,this.target=o,this.user_id=t,this.clientDate=s||Date.now(),this.value=a,r&&(null==(n=r.settings)?void 0:n.filterFeatureVars)&&("variableEvaluated"===i||"variableDefaulted"===i)&&o){let e=null==r?void 0:r.variables[o],t=null==e?void 0:e._feature;this.featureVars=t&&(null==r?void 0:r.featureVariationMap[t])?{[t]:null==r?void 0:r.featureVariationMap[t]}:{}}else this.featureVars=(null==r?void 0:r.featureVariationMap)||{};this.metaData=l}}class e5 extends Error{constructor(e){super(e),this.name="ResponseError"}}let e8=e=>{let t=100*Math.pow(2,e),r=.2*t*Math.random();return t+r};async function e9(e){if(!e.ok&&e.status>=400){let t;try{let r=await e.clone().json();t=new e5(r.message||"Something went wrong")}catch(e){t=new e5("Something went wrong")}throw t.status=e.status,t}return e}async function e7(e,t,r){var n;let i=new AbortController;try{let n=setTimeout(()=>{i.abort()},r),o=await tr(e,{...t,signal:i.signal});return clearTimeout(n),o}catch(e){if(null==(n=null==i?void 0:i.signal)?void 0:n.aborted)throw Error("Network connection timed out.");throw e}}async function te(e,t,r){let[n,i]=await tn(t),o={...i.headers,Authorization:r,"Content-Type":"application/json"};return e9(await n(e,{...i,headers:o,method:"POST"}))}async function tt(e,t,r){let[n,i]=await tn(t),o={...i.headers,Authorization:r,"Content-Type":"application/json"};return e9(await n(e,{...i,headers:o,method:"PATCH"}))}async function tr(e,t){let[r,n]=await tn(t),i={...n.headers,"Content-Type":"application/json"};return e9(await r(e,{...n,headers:i,method:"GET"}))}async function tn(e){if("retries"in e&&e.retries){let t,r={...e};return t=e.retries,r.retryOn=(e,r,n)=>!(e>=t)&&(!n||!((null==n?void 0:n.status)<500)),r.retryDelay=e8,[eH()(fetch),r]}return[fetch,e]}let ti=".devcycle.com",to="https://sdk-api"+ti,ts="https://events"+ti,ta={retries:5,retryDelay:e8},tl=async(e,t,r,n,i)=>{let o=new URLSearchParams({sdkKey:e});for(let e in t){let r=eX(t[e]);null!=r&&o.append(e,r)}(null==n?void 0:n.enableEdgeDB)&&o.append("enableEdgeDB",n.enableEdgeDB.toString()),(null==i?void 0:i.sse)&&(o.append("sse","1"),i.lastModified&&o.append("sseLastModified",i.lastModified.toString()),i.etag&&o.append("sseEtag",i.etag)),(null==n?void 0:n.enableObfuscation)&&o.append("obfuscated","1");let s=`${(null==n?void 0:n.apiProxyURL)||to}/v1/sdkConfig?`+o.toString();try{let e=await e7(s,ta,5e3);return await e.json()}catch(e){if(r.error(`Request to get config failed for url: ${s}, response message: ${e}`),e instanceof e5){if(401===e.status||403===e.status)throw new eU(`Invalid SDK Key. Error details: ${e.message}`);throw Error(`Failed to download DevCycle config. Error details: ${e.message}`)}throw Error(`Failed to download DevCycle config. Error details: ${e}`)}},tu=async(e,t,r,n,i,o)=>{if(!e)throw Error("Missing sdkKey to publish events to Events API");let s={events:n.map(e=>new e6(e,r.user_id,t)),user:r};i.info(`Submit Events Payload: ${JSON.stringify(s)}`);let a=`${(null==o?void 0:o.apiProxyURL)||ts}/v1/events`;(null==o?void 0:o.enableObfuscation)&&(a+="?obfuscated=1");let l=await te(a,{...ta,body:JSON.stringify(s)},e),u=await l.json();return l.status>=400?i.error(`Error posting events, status: ${l.status}, body: ${u}`):i.info(`Posted Events, status: ${l.status}, body: ${u}`),l},tc=async(e,t,r,n)=>{if(!t)throw Error("Missing sdkKey to save to Edge DB!");if(!e||!e.user_id)throw Error("Missing user to save to Edge DB!");if(e.isAnonymous)throw Error("Cannot save user data for an anonymous user!");try{return await tt(`${(null==n?void 0:n.apiProxyURL)||to}/v1/edgedb/${encodeURIComponent(e.user_id)}`,{...ta,body:JSON.stringify(e)},t)}catch(e){403===e.status?r.warn("Warning: EdgeDB feature is not enabled for this project"):e.status>=400?r.warn(`Error saving user entity, status: ${e.status}, body: ${e.message}`):r.info(`Saved user entity, status: ${e.status}, body: ${e.message}`);return}};class td{generateAndSaveAnonUserId(e,t){let r=e||(0,ez.A)();return!e&&t&&t.saveAnonUserId(r),r}constructor(e,t,r,n,i,o){let s=""===e.user_id?void 0:e.user_id;if(!1===e.isAnonymous&&!s)throw Error("A User cannot be created with isAnonymous: false without a valid user_id");s?(this.user_id=s,this.isAnonymous=!1):(this.user_id=this.generateAndSaveAnonUserId(n,o),this.isAnonymous=!0),this.email=e.email,this.name=e.name,this.language=e.language,this.country=e.country,this.appVersion=e.appVersion,this.appBuild=e.appBuild,this.customData=e.customData,this.privateCustomData=e.privateCustomData,this.lastSeenDate=new Date;let a="undefined"!=typeof window?window.navigator.userAgent:i;if(r)Object.assign(this,r);else{let e=new(eV())(a),r=e.getBrowser().name&&`${e.getBrowser().name} ${e.getBrowser().version}`;this.createdDate=new Date,this.platform=(null==t?void 0:t.reactNative)?"ReactNative":"web",this.platformVersion=null!=r?r:"unknown",this.deviceModel=(null==t?void 0:t.reactNative)&&globalThis.DeviceInfo?globalThis.DeviceInfo.getModel():null!=a?a:"SSR - unknown",this.sdkType="client",this.sdkVersion="1.47.8",this.sdkPlatform=null==t?void 0:t.sdkPlatform}}getStaticData(){return{createdDate:this.createdDate,platform:this.platform,platformVersion:this.platformVersion,deviceModel:this.deviceModel,sdkType:this.sdkType,sdkVersion:this.sdkVersion,sdkPlatform:this.sdkPlatform}}updateUser(e,t){if(this.user_id!==e.user_id)throw Error("Cannot update a user with a different user_id");
1return new td(e,t,this.getStaticData())}}class th{constructor(e,t,r=2592e6){this.store=e,this.logger=t,this.configCacheTTL=r}getConfigKey(e){return e.isAnonymous?`${eY}.${e.user_id}`:`${eG}.${e.user_id}`}getConfigExpiryKey(e){return`${this.getConfigKey(e)}.expiry_date`}async loadConfigExpiryDate(e){let t=this.getConfigExpiryKey(e);return parseInt(await this.store.load(t)||"0",10)}async saveConfig(e,t){var r;let n=this.getConfigKey(t),i=this.getConfigExpiryKey(t),o=Date.now()+this.configCacheTTL;await Promise.all([this.store.save(n,e),this.store.save(i,o)]),null==(r=this.logger)||r.info(`Successfully saved config for user ${t.user_id} to local storage`)}isBucketedUserConfig(e){return!!e&&"object"==typeof e&&"features"in e&&"project"in e&&"environment"in e&&"featureVariationMap"in e&&"variableVariationMap"in e&&"variables"in e}async loadConfig(e){var t,r,n;await this.migrateLegacyConfigs(),await this.cleanupExpiredConfigs();let i=this.getConfigKey(e),o=await this.store.load(i);if(!o)return null==(t=this.logger)||t.debug("Skipping cached config: no config found"),null;if(!this.isBucketedUserConfig(o))return null==(r=this.logger)||r.debug(`Skipping cached config: invalid config found: ${JSON.stringify(o)}`),null;let s=await this.loadConfigExpiryDate(e);if(Date.now()>s){null==(n=this.logger)||n.debug("Skipping cached config: config has expired");let t=this.getConfigExpiryKey(e);return await Promise.all([this.store.remove(i),this.store.remove(t)]),null}return o}async saveAnonUserId(e){var t;await this.store.save(eJ,e),null==(t=this.logger)||t.info("Successfully saved anonymous user id to local storage")}async loadAnonUserId(){return await this.store.load(eJ)}async removeAnonUserId(){let e=await this.loadAnonUserId();if(e){let t=`${eY}.${e}`,r=`${t}.expiry_date`;await Promise.all([this.store.remove(t),this.store.remove(r)])}await this.store.remove(eJ)}async migrateLegacyConfigs(){await Promise.all([this.migrateLegacyConfigType(eY,!0),this.migrateLegacyConfigType(eG,!1)])}async migrateLegacyConfigType(e,t){var r,n;try{let n=await this.store.load(e);if(!n||!this.isBucketedUserConfig(n))return;let i=`${e}.user_id`,o=await this.store.load(i);if(!o)return;let s=new td({user_id:o,isAnonymous:t},{}),a=`${e}.fetch_date`,l=this.getConfigKey(s);if(await this.store.load(l))return void await Promise.all([this.store.remove(e),this.store.remove(i),this.store.remove(a),this.store.remove(eK)]);null==(r=this.logger)||r.debug(`Migrating legacy ${t?"anonymous":"identified"} config for user ${o} to new format`),await this.saveConfig(n,s),await Promise.all([this.store.remove(e),this.store.remove(i),this.store.remove(a),this.store.remove(eK)])}catch(t){null==(n=this.logger)||n.debug(`Failed to migrate legacy config from ${e}: ${t}`)}}async cleanupExpiredConfigs(){var e,t,r,n;if(!this.store.listKeys){null==(e=this.logger)||e.debug("Storage does not support key enumeration, skipping cleanup");return}try{let e=Date.now();for(let n of[eY,eG])for(let i of(await this.store.listKeys(n))){if(i.endsWith(".expiry_date"))continue;let n=`${i}.expiry_date`,o=await this.store.load(n);if(o){let r=parseInt(o,10);e>r&&(null==(t=this.logger)||t.debug(`Cleaning up expired config: ${i}`),await Promise.all([this.store.remove(i),this.store.remove(n)]))}else null==(r=this.logger)||r.debug(`Cleaning up orphaned config: ${i}`),await this.store.remove(i)}}catch(e){null==(n=this.logger)||n.debug(`Failed to cleanup expired configs: ${e}`)}}}class tf{}class tp extends tf{constructor(e=!1){super(),this.isTesting=e,this.init()}
1async init(){this.store=this.isTesting?tg:window.localStorage}async save(e,t){this.store.setItem(e,JSON.stringify(t))}async load(e){let t=this.store.getItem(e);return t?JSON.parse(t):void 0}async remove(e){this.store.removeItem(e)}async listKeys(e){let t=[];for(let r=0;r<this.store.length;r++){let n=this.store.key(r);n&&n.startsWith(e)&&t.push(n)}return t}}let tg={getItem:()=>null,setItem:()=>void 0,removeItem:()=>void 0,clear:()=>void 0,key:()=>null,length:0};class tm extends tf{constructor(){super(),this.connectionPromise=new Promise((e,t)=>{this.init().then(t=>{this.store=t,this.isReady=!0,e()}).catch(e=>t(e))})}async init(){return new Promise((e,t)=>{let r=indexedDB.open(tm.DBName,1);r.onupgradeneeded=e=>{let t=r.result;t.objectStoreNames.contains(tm.storeName)||t.createObjectStore(tm.storeName,{keyPath:"id"})},r.onsuccess=t=>{e(r.result)},r.onerror=e=>{t(r.error)}})}async save(e,t){await this.connectionPromise,this.store.transaction(tm.storeName,"readwrite").objectStore(tm.storeName).put({id:e,data:t})}async load(e){await this.connectionPromise;let t=this.store.transaction(tm.storeName,"readonly").objectStore(tm.storeName).get(e);return new Promise((e,r)=>{t.onsuccess=()=>{e(t.result?t.result.data:void 0)},t.onerror=()=>r(t.error)})}async remove(e){await this.connectionPromise,this.store.transaction(tm.storeName,"readwrite").objectStore(tm.storeName).delete(e)}async listKeys(e){let t=[];await this.connectionPromise;let r=this.store.transaction(tm.storeName,"readonly").objectStore(tm.storeName).openCursor();return new Promise((n,i)=>{r.onsuccess=r=>{let i=r.target.result;if(i){let r=i.key;r.startsWith(e)&&t.push(r),i.continue()}else n(t)},r.onerror=()=>i(r.error)})}}tm.storeName="DevCycleStore",tm.DBName="DevCycleDB";let tv={INITIALIZED:"initialized",NEW_VARIABLES:"newVariables",ERROR:"error",VARIABLE_UPDATED:"variableUpdated",FEATURE_UPDATED:"featureUpdated",CONFIG_UPDATED:"configUpdated",VARIABLE_EVALUATED:"variableEvaluated",DEBUG_USER_SET:"debugUserSet",DEBUG_USER_REVERTED:"debugUserReverted"},ty=e=>!Object.values(tv).includes(e)&&!e.startsWith(tv.VARIABLE_UPDATED)&&!e.startsWith(tv.FEATURE_UPDATED)&&!e.startsWith(tv.NEW_VARIABLES)&&!e.startsWith(tv.VARIABLE_EVALUATED);class tb{constructor(){this.handlers={}}subscribe(e,t){if(e0("key",e,"string"),e0("handler",t,"function"),ty(e))throw Error("Not a valid event to subscribe to");this.handlers[e]?this.handlers[e].push(t):this.handlers[e]=[t]}unsubscribe(e,t){if(e0("key",e,"string"),!ty(e))if(t){let r=this.handlers[e].findIndex(e=>e===t);this.handlers[e].splice(r,1)}else this.handlers[e]=[]}emit(e,...t){var r;e0("key",e,"string"),null==(r=this.handlers[e])||r.forEach(e=>{new Promise(r=>{e(...t),r(!0)})})}emitDebugUserSet(e){this.emit(tv.DEBUG_USER_SET,e)}emitDebugUserReverted(e){this.emit(tv.DEBUG_USER_REVERTED,e)}emitInitialized(e){this.emit(tv.INITIALIZED,e)}emitError(e){this.emit(tv.ERROR,e)}emitConfigUpdate(e){this.emit(tv.CONFIG_UPDATED,e)}emitVariableEvaluated(e){this.emit(`${tv.VARIABLE_EVALUATED}:*`,e.key,e),this.emit(`${tv.VARIABLE_EVALUATED}:${e.key}`,e.key,e)}emitVariableUpdates(e,t,r){let n=new Set(Object.keys(e).concat(Object.keys(t))),i=!1;n.forEach(n=>{let o=e[n]&&e[n].value,s=t[n],a=s&&t[n].value;if(JSON.stringify(o)!==JSON.stringify(a)){let e=r[n]&&Object.values(r[n]);e&&(i=!0,e.forEach(e=>{var t;e.value=null!=a?a:e.defaultValue,e.isDefaulted=null==a,null==(t=e.callback)||t.call(e,e.value)}));let t=s||null;this.emit(`${tv.VARIABLE_UPDATED}:*`,n,t),this.emit(`${tv.VARIABLE_UPDATED}:${n}`,n,t)}}),i&&this.emit(`${tv.NEW_VARIABLES}`)}emitFeatureUpdates(e,t){Object.keys(e).concat(Object.keys(t)).forEach(r=>{let n=e[r]&&e[r]._variation,i=t[r],o=i&&t[r]._variation,s=i||null;n!==o&&(this.emit(`${tv.FEATURE_UPDATED}:*`,r,s),this.emit(`${tv.FEATURE_UPDATED}:${r}`,r,s))})}}class tw{constructor(e,t,r){this.requestConfigFunction=e,this.handleConfigReceivedFunction=t,this.nextUser=r,this.resolvers=[],this.requestParams=null}async queue(e,t){e&&(this.nextUser=e),t&&(this.requestParams=t);let r=new Promise((e,t)=>{this.resolvers.push({resolve:e,reject:t})});return this.currentPromise||this.processQueue(),r}async processQueue(){if(!this.resolvers.length)return;let e=this.resolvers.splice(0);await this.performRequest(this.nextUser).then(t=>{this.resolvers.length?this.resolvers.push(...e):(this.handleConfigReceivedFunction(t,this.nextUser),e.forEach(({resolve:e})=>e(t)))}).catch(t=>{e.forEach(({reject:e})=>e(t))}),this.resolvers.length&&this.processQueue()}async performRequest(e){return this.currentPromise=this.requestConfigFunction(e,this.requestParam
1s?this.requestParams:void 0),this.requestParams=null,await this.currentPromise.finally(()=>{this.currentPromise=null})}}let tS="[DevCycle]: ";(w=F||(F={}))[w.debug=0]="debug",w[w.info=1]="info",w[w.warn=2]="warn",w[w.error=3]="error";class tk{constructor(e,t,r){this.url=e,this.onMessage=t,this.logger=r,this.openConnection()}updateURL(e){this.close(),this.url=e,this.openConnection()}openConnection(){if("undefined"==typeof EventSource)return void this.logger.warn("StreamingConnection not opened. EventSource is not available.");this.connection=new EventSource(this.url,{withCredentials:!0}),this.connection.onmessage=e=>{this.onMessage(e.data)},this.connection.onerror=()=>{this.logger.warn("StreamingConnection warning. Connection failed to establish.")},this.connection.onopen=()=>{this.logger.debug("StreamingConnection opened")}}isConnected(){var e,t;return(null==(e=this.connection)?void 0:e.readyState)===(null==(t=this.connection)?void 0:t.OPEN)}reopen(){this.isConnected()||(this.close(),this.openConnection())}close(){var e;null==(e=this.connection)||e.close()}}class tx{constructor(e,t,r,n,i){this.user=e,this.variableKey=t,this.defaultValue=r,this.metadata=n,this.evaluationContext=i}}class tE{constructor(e=[],t){this.hooks=e,this.logger=t}runHooksForEvaluation(e,t,r,n){let i,o=new tx(null!=e?e:{},t,r,{}),s=[...this.hooks],a=[...s].reverse();try{let e=Object.freeze({...o});this.runBefore(s,e),i=n.call(e),o.evaluationContext={key:t,value:i.value,isDefaulted:i.isDefaulted,eval:i.eval},this.runAfter(a,o)}catch(e){throw this.runError(a,o,e),this.runFinally(a,o),e}return this.runFinally(a,o),i}runBefore(e,t){for(let r of e)r.before(t)}runAfter(e,t){for(let r of e)r.after(t)}runFinally(e,t){var r;try{for(let r of e)r.onFinally(t)}catch(e){null==(r=this.logger)||r.error("Error running before hooks",e)}}runError(e,t,r){var n;try{for(let n of e)n.error(t,r)}catch(e){null==(n=this.logger)||n.error("Error running error hooks",e)}}enqueue(e){this.hooks.push(e)}clear(){this.hooks=[]}}class tC{get isInitialized(){return this._isInitialized}constructor(e,t,r={}){var n;if(this._isInitialized=!1,this.userSaved=!1,this._closing=!1,this.isConfigCached=!1,this.initializeTriggered=!1,this.clientInitialization=async e=>{if(this.initializeTriggered||this._closing)return this;this.initializeTriggered=!0;let t=e.user_id?void 0:await this.store.loadAnonUserId();this.user=new td(e,this.options,void 0,t,void 0,this.store),this.options.bootstrapConfig||await this.getConfigCache(this.user),this.requestConsolidator=new tw((e,t)=>tl(this.sdkKey,e,this.logger,this.options,t),(e,t)=>this.handleConfigReceived(e,t),this.user);try{this.options.bootstrapConfig?this.handleConfigReceived(this.options.bootstrapConfig,this.user):await this.requestConsolidator.queue(this.user),this._isInitialized=!0,this.settleOnInitialized(this),this.logger.info("Client initialized")}catch(e){return this.initializeOnConfigFailure(this.user,e),this}return this.eventEmitter.emitInitialized(!0),this},this.initializeOnConfigFailure=(e,t)=>{this.isInitialized||(this.eventEmitter.emitInitialized(!1),t&&this.eventEmitter.emitError(t),this.setUser(e),this.settleOnInitialized(this,t instanceof eU?t:null))},r.sdkPlatform||(r.sdkPlatform="js"),(null==(n=r.next)?void 0:n.configRefreshHandler)&&(this.configRefetchHandler=r.next.configRefreshHandler),this.logger=r.logger||function(e){let t=(null==e?void 0:e.level)&&eW()(F[null==e?void 0:e.level])?F[null==e?void 0:e.level]:F.error,r=(null==e?void 0:e.logWriter)||console.log,n=(null==e?void 0:e.logWriter)||console.error,i=e=>r(tS+e),o=e=>{};return{error:F.error>=t?(e,t)=>n(tS+e,t):o,warn:F.warn>=t?i:o,info:F.info>=t?i:o,debug:F.debug>=t?i:o}}({level:r.logLevel}),this.store=new th(r.storage||(e1()?new tm:new tp("undefined"==typeof window)),this.logger,r.configCacheTTL),this.options=r,this.sdkKey=e,this.variableDefaultMap={},this.evalHooksRunner=new tE(r.hooks),this.options.disableAutomaticEventLogging&&this.options.disableCustomEventLogging||(this.eventQueue=new e4(e,this,r)),this.eventEmitter=new tb,this.options.disableRealtimeUpdates||this.registerVisibilityChangeHandler(),this.onInitialized=new Promise((e,t)=>
1{this.settleOnInitialized=(r,n)=>{n?(this._isInitialized=!1,t(n)):(this._isInitialized=!0,e(r))}}),this.options.deferInitialization){if(this.options.bootstrapConfig)throw Error("bootstrapConfig option can not be combined with deferred initialization!")}else{if(!t)throw Error("User must be provided to initialize SDK");this.clientInitialization(t)}(null==r?void 0:r.reactNative)||"undefined"==typeof window||(this.windowMessageHandler=e=>{let t=e.data;(null==t?void 0:t.type)==="DVC.optIn.saved"&&this.refetchConfig(!1)},window.addEventListener("message",this.windowMessageHandler),this.windowPageHideHandler=()=>{this.flushEvents()},window.addEventListener("pagehide",this.windowPageHideHandler))}onClientInitialized(e){return e&&"function"==typeof e?void this.onInitialized.then(()=>e(null,this)).catch(t=>e(t)):this.onInitialized}variable(e,t){return this.evalHooksRunner.runHooksForEvaluation(this.user,e,t,()=>this._variable(e,t))}_variable(e,t){var r,n;let i;if(null==t)throw Error("Default value is a required param");let o=eL(t,e,this.logger,!0),s="string"==typeof t?t:JSON.stringify(t);if(this.variableDefaultMap[e]&&this.variableDefaultMap[e][s])i=this.variableDefaultMap[e][s];else{let a=null==(n=null==(r=this.config)?void 0:r.variables)?void 0:n[e],l={key:e,defaultValue:t};a?a.type===o?(l.value=a.value,l._feature=a._feature,l.eval=a.eval):(this.logger.warn(`Type mismatch for variable ${e}. Expected ${o}, got ${a.type}`),l.eval={reason:S.DEFAULT,details:x.TYPE_MISMATCH}):l.eval={reason:S.DEFAULT,details:x.USER_NOT_TARGETED},i=new e2(l),this.variableDefaultMap[e]={[s]:i,...this.variableDefaultMap[e]}}return this.trackVariableEvaluated(i),this.eventEmitter.emitVariableEvaluated(i),i}trackVariableEvaluated(e){var t,r,n;if(!this.options.disableAutomaticEventLogging)try{let i=null==(r=null==(t=this.config)?void 0:t.variables)?void 0:r[e.key];null==(n=this.eventQueue)||n.queueAggregateEvent({type:e.isDefaulted?e3.variableDefaulted:e3.variableEvaluated,target:e.key,metaData:{value:e.value,type:eL(e.defaultValue,e.key,this.logger),_variable:null==i?void 0:i._id,eval:e.eval}})}catch(e){this.eventEmitter.emitError(e),this.logger.warn(`Error with queueing aggregate events ${e}`)}}variableValue(e,t){return this.variable(e,t).value}identifyUser(e,t){if(this.options.next)return void this.logger.error("Unable to change user identity from the clientside in Next.js");let r=this._identifyUser(e);return t&&"function"==typeof t?void r.then(e=>t(null,e)).catch(e=>t(e,null)):r}async _identifyUser(e){var t,r;let n;if(this.options.deferInitialization&&!this.initializeTriggered)return await this.clientInitialization(e),(null==(t=this.config)?void 0:t.variables)||{};null==(r=this.eventQueue)||r.flushEvents();try{await this.onInitialized;let t=await this.store.loadAnonUserId();n=this.user&&e.user_id===this.user.user_id?this.user.updateUser(e,this.options):new td(e,this.options,void 0,t,void 0,this.store);let r=await this.requestConsolidator.queue(n);if(r)return r.variables;throw this.logger.error("Config fetch returned no config"),Error("Failed to fetch user configuration")}catch(e){if(n)try{let e=await this.store.loadConfig(n);if(e)return this.logger.warn("Config fetch failed, using cached user config"),this.handleConfigReceived(e,n),e.variables||{};this.logger.debug("Config fetch failed and no cached config available")}catch(e){this.logger.error("Failed to load cached config",e)}throw this.eventEmitter.emitError(e),e}}resetUser(e){if(this.options.next)return void this.logger.error("Unable to change user identity from the clientside in Next.js");let t=new Promise((e,t)=>{var r;null==(r=this.eventQueue)||r.flushEvents(),this.onInitialized.then(async()=>{let e=await this.store.loadAnonUserId();await this.store.removeAnonUserId();let t=new td({isAnonymous:!0},this.options,void 0,void 0,void 0,this.store);try{let e=await this.requestConsolidator.queue(t);if(!e)throw this.logger.error("Config fetch returned no config"),Error("Failed to fetch user configuration");return e}catch(t){throw e?await this.store.saveAnonUserId(e):await this.store.removeAnonUserId(),t}}).then(async t=>{e(t.variables)}).catch(async e=>{this.eventEmitter.emitError(e),t(e)})});return e&&"function"==typeof e?void t.then(t=>e(null,t)).catch(t=>e(t,null)):t}allFeatures(){var e;return(null==(e=this.config)?void 0:e.features)||{}}allVariables(){var e;return(null==(e=this.config)?void 0:e.variables)||{}}subscribe(e,t){this.eventEmitter.subscribe(e,t)}unsubscribe(e,t){this.eventEmitter.unsubscribe(e,t)}track(e){if(this._closing)return void this.logger.error("Client is closing, cannot track new events.");this.options.disableCustomEventLogging||(eQ("type",e.type),this.onInitialized.then(()=>{var t;null==(t=this.eventQueue)||t.queueEvent(e)}))}flushEvents(e){var t,r;return null!=(r=null==(t=this.eventQueue)?void 0:t.flushEvents().then(()=>null==e?void 0:e()))?r:Promise.resolve().then(()=>null==e?void 0:e())}async close(){var e,t;this.logger.debug("Closing client"),this._closing=!0,this.pageVisibilityHandler&&document.removeEventListener("visibilitychange",this.pageVisibilityHandler),this.windowMessageHandler&&window.removeEventListener("message",this.windowMessageHandler),this.windowPageHideHandler&&window.removeEventListener("pagehide",this.windowPageHideHandler),null==(e=this.streamingConnection)||e.close(),await (null==(t=this.eventQueue)?void 0:t.close())}get closing(){return this._closing}synchronizeBootstrapData(e,t,r){let n=new td(t,this.options,void 0,void 0,r,this.store);return e?(this.options.bootstrapConfig=e,this.options.deferInitialization&&!this.initializeTriggered)?void this.clientInitialization(t):void this.handleConfigReceived(e,n):void this.initializeOnConfigFailure(n)}async refetchConfig(e,t,r){await this.onInitialized,this.configRefetchHandler?this.configRefetchHandler(t):await this.requestConsolidator.queue(null,{sse:e,lastModified:t,etag:r})}addHook(e){this.evalHooksRunner.enqueue(e)}clearHooks(){this.evalHooksRunner.clear()}handleConfigReceived(e,t){var r,n,i,o,s;if(!e)return;let a=this.config;this.config=e,this.store.saveConfig(e,t),this.isConfigCached=!1,this.setUser(t);let l=(null==a?void 0:a.features)||{},u=(null==a?void 0:a.variables)||{};this.eventEmitter.emitFeatureUpdates(l,e.features),this.eventEmitter.emitVariableUpdates(u,e.variables,this.variableDefaultMap);let c=null==(i=null==(n=null==(r=this.config)?void 0:r.sse)?void 0:n.url)?void 0:i.includes("dvc_user");if((!a||c||a.etag!==this.config.etag)&&this.eventEmitter.emitConfigUpdate(e.variables),null==(o=null==e?void 0:e.sse)?void 0:o.url)if(this.streamingConnection)e.sse.url!==(null==(s=null==a?void 0:a.sse)?void 0:s.url)&&this.streamingConnection.updateURL(e.sse.url);else if(this.options.disableRealtimeUpdates)this.logger.info("Disabling Realtime Updates based on Initialization parameter");else{let t=this.options.sseConnectionClass||tk;this.streamingConnection=new t(e.sse.url,this.onSSEMessage.bind(this),this.logger)}}async setUser(e){var t;if(this.user!=e||!this.userSaved){if(this.user=e,!this.user.isAnonymous&&t_(this.logger,this.config,null==(t=this.options)?void 0:t.enableEdgeDB,!0)){let e=await tc(this.user,this.sdkKey,this.logger,this.options);this.logger.info(`Saved response entity! ${e}`)}this.userSaved=!0}
1}onSSEMessage(e){var t,r;try{let n=JSON.parse(e),i=JSON.parse(n.data);if(!i)return;i.type&&"refetchConfig"!==i.type||(null==(t=this.config)?void 0:t.etag)&&i.etag===(null==(r=this.config)?void 0:r.etag)||this.refetchConfig(!0,i.lastModified,i.etag).catch(e=>{this.logger.warn(`Failed to refetch config ${e}`)})}catch(e){this.logger.warn(`Streaming Connection: Unparseable message ${e}`)}}registerVisibilityChangeHandler(){var e,t,r;if("undefined"==typeof document)return;let n=(null==(t=null==(e=this.config)?void 0:e.sse)?void 0:t.inactivityDelay)||12e4;this.pageVisibilityHandler=()=>{var e,t,r;(null==(e=this.config)?void 0:e.sse)&&("visible"===document.visibilityState?((null==(t=this.streamingConnection)?void 0:t.isConnected())||(this.logger.debug("Page became visible, refetching config"),this.refetchConfig(!1).catch(e=>{this.logger.warn(`Failed to refetch config ${e}`)}),null==(r=this.streamingConnection)||r.reopen()),null==window||window.clearTimeout(this.inactivityHandlerId)):(null==window||window.clearTimeout(this.inactivityHandlerId),this.inactivityHandlerId=null==window?void 0:window.setTimeout(()=>{var e;this.logger.debug("Page is not visible, closing streaming connection"),null==(e=this.streamingConnection)||e.close()},n)))},null==(r=document.addEventListener)||r.call(document,"visibilitychange",this.pageVisibilityHandler)}async getConfigCache(e){if(this.options.disableConfigCache)return void this.logger.info("Skipping config cache");let t=await this.store.loadConfig(e);t&&(this.config=t,this.isConfigCached=!0,this.eventEmitter.emitFeatureUpdates({},t.features),this.eventEmitter.emitVariableUpdates({},t.variables,this.variableDefaultMap),this.logger.debug("Initialized with a cached config"))}}let t_=(e,t,r,n=!1)=>{var i,o,s;return(null==(s=null==(o=null==(i=null==t?void 0:t.project)?void 0:i.settings)?void 0:o.edgeDB)?void 0:s.enabled)?!!r:(r&&n&&e.warn("EdgeDB is not enabled for this project. Only using local user data."),!1)};function tO(e,t,r={}){let n;if(!e)throw new eU("Missing SDK key! Call initialize with a valid SDK key");if(!e.startsWith("client")&&!e.startsWith("dvc_client")&&!(null==r?void 0:r.next))throw new eU("Invalid SDK key provided. Please call initialize with a valid client SDK key");let i=((e,t={})=>{let r;if(e&&"deferInitialization"in e){if(e.deferInitialization)return{user:void 0,options:e,isDeferred:!0}}else r=e;if(!r)throw Error("Missing user! Call initialize with a valid user");return{user:r,options:t,isDeferred:!1}})(t,r),{options:o}=i,s=e1();if("undefined"!=typeof window&&!window.addEventListener&&!s&&!(null==o?void 0:o.reactNative))throw Error("Window is not defined, try initializing in a browser context. If running on React Native, initialize with the option reactNative: true");if((null==o?void 0:o.reactNative)&&!globalThis.DeviceInfo)throw Error("DeviceInfo is not defined. Import react-native-device-info and set global.DeviceInfo when running on React Native");if(!o||null===o)throw Error("Invalid options! Call initialize with valid options");return(n=i.isDeferred?new tC(e,void 0,i.options):new tC(e,i.user,i.options)).onClientInitialized().then(()=>n.logger.info("Successfully initialized DevCycle!")).catch(e=>n.logger.error(`Error initializing DevCycle: ${e}`)),n}var tI=r(2396),tT=r.n(tI);let tR=(0,H.createContext)(void 0),{Provider:tA,Consumer:tP}=tR,tM=(0,H.createContext)({isInitialized:!1}),tN={showConditionalBorders:!1,borderColor:"#ff6347"},tD=(0,H.createContext)(tN),tL=(e,t={isAnonymous:!0},r)=>(null==r?void 0:r.deferInitialization)?tO(e,{sdkPlatform:"react",...r,deferInitialization:!0,bootstrapConfig:void 0}):tO(e,t,{sdkPlatform:"react",...r}),tU=()=>{let e=(0,H.useContext)(tR);if(void 0===e)throw Error("useDevCycleClient must be used within DevCycleProvider");return e.client},tj=(e,t)=>((e,t)=>{let r=(0,H.useContext)(tR),[n,i]=(0,H.useState)({}),o=(0,H.useCallback)(()=>i({}),[]);if(void 0===r)throw Error("useVariable must be used within DevCycleProvider");return(0,H.useEffect)(()=>(r.client.subscribe(`variableUpdated:${e}`,o),()=>{r.client.unsubscribe(`variableUpdated:${e}`,o)}),[r,e,o]),r.client.variable(e,t)})(e,t).value;function tF(e){var t,r;let n,{config:i}=e,{user:o,options:s}=i,[a,l]=(0,H.useState)(!1);if(!(n="sdkKey"in i?i.sdkKey:i.envKey))throw Error("You must provide a sdkKey to DevCycleProvider");let u=(0,H.useRef)(),[c,d]=(0,H.useState)({});void 0===u.current&&(u.current=tL(n,o,{...s})),(0,H.useEffect)(()=>(void 0===u.current&&(u.current=tL(n,o,{...s}),d({})),u.current.onClientInitialized().then(()=>{l(!0)}).catch(()=>{console.log("Error initializing DevCycle."),l(!0)}),()=>{var e;null==(e=u.current)||e.close(),u.current=void 0}),[n,o,s]);let h=Object.assign({},tN,null!=(r=null==(t=e.config.options)?void 0:t.reactDebug)?r:{});return(0,B.jsx)(tA,{value:{client:u.current},children:(0,B.jsx)(tM.Provider,{value:{isInitialized:a||u.current.isInitialized},children:(0,B.jsx)(tD.Provider,{value:h,children:e.children})})})}function tB(e){return function(t){let r=(0,H.forwardRef)((r,n)=>(0,B.jsx)(tF,{config:e,children:(0,B.jsx)(t,{...r,ref:n})}));return tT()(r,t),r}}let tH=()=>{let e=(0,H.useContext)(tM);if(void 0===e)throw Error("useIsDevCycleInitialized must be used within DevCycleProvider");return e.isInitialized},tz=tH},37856(e,t,r){var n;!function(i,o){"use strict";var s="function",a="undefined",l="object",u="string",c="major",d="model",h="name",f="type",p="vendor",g="version",m="architecture",v="console",y="mobile",b="tablet",w="smarttv",S="wearable",k="embedded",x="Amazon",E="Apple",C="ASUS",_="BlackBerry",O="Browser",I="Chrome",T="Firefox",R="Google",A="Huawei",P="Microsoft",M="Motorola",N="Opera",D="Samsung",L="Sharp",U="Sony",j="Xiaomi",F="Zebra",B="Facebook",H="Chromium OS",z="Mac OS",q=" Browser",V=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},$=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},W=function(e,t){return typeof e===u&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},J=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},Y=function(e,t){for(var r,n,i,a,u,c,d=0;d<t.length&&!u;){var h=t[d],f=t[d+1];for(r=n=0;r<h.length&&!u&&h[r];)if(u=h[r++].exec(e))for(i=0;i<f.length;i++)c=u[++n],typeof(a=f[i])===l&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):o):this[a]=c||o;d+=2}},G=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(W(t[r][n],e))return"?"===r?o:r}
vendor: 1,519 bytes, line 1
1else if(W(t[r],e))return"?"===r?o:r;return t.hasOwnProperty("*")?t["*"]:e},X={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"},Q={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,g],[/opios[\/ ]+([\w\.]+)/i],[g,[h,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[g,[h,N+" GX"]],[/\bopr\/([\w\.]+)/i],[g,[h,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[g,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[g,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,g],[/quark(?:pc)?\/([-\w\.]+)/i],[g,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[g,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[h,"UC"+O]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[g,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[h,"
1Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[g,[h,"Smart Lenovo "+O]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+O],g],[/\bfocus\/([\w\.]+)/i],[g,[h,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[h,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[h,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[h,"MIUI"+q]],[/fxios\/([\w\.-]+)/i],[g,[h,T]],[/\bqihoobrowser\/?([\w\.]*)/i],[g,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],g],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+q],g],[/samsungbrowser\/([\w\.]+)/i],[g,[h,D+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[g,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,g],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[g,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,B],g],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[h,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,I+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[h,"Android "+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[g,G,{"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],[h,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],g],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[h,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\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|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[g,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[g,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,K]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,K]]],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],[d,[p,D],[f,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,D],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,E],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,E],[f,b]],[/(macintosh);/i],[d,[p,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,L],[f,y]],[/(?:honor)([-\w ]+)[;\)]/i],[d,[p,"Honor"],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[p,A],[f,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,A],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[d,/_/g," "],[p,j],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[p,j],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[d,[p,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[f,y]],[/\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],[d,[p,M],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,M],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,"LG"],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,"LG"],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[p,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[p,"Nokia"],[f,y]],[/(pixel c)\b/i],[d,[p,R],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,R],[f,y]],[/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],[d,[p,U],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,U],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,x],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,x],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,_],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,C],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,C],[f,y]],[/(nexus 9)/i],[d,[p,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[f,y]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[p,"TCL"],[f,b]],[/(itel) ((\w+))/i],[[p,K],d,[f,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[p,"Ulefone"],[f,y]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[p,"Energizer"],[f,y]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[p,"Cat"],[f,y]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[p,"Smartfren"],[f,y]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[p,"Nothing"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/;
1 (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[f,y]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(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],[p,d,[f,b]],[/(surface duo)/i],[d,[p,P],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[f,y]],[/(u304aa)/i],[d,[p,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[f,b]],[/\b(k88) b/i],[d,[p,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[f,b]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[f,y]],[/\b(ph-1) /i],[d,[p,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[d,[p,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[p,d,[f,y]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,P],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,F],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,F],[f,y]],[/smart-tv.+(samsung)/i],[p,[f,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,D],[f,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[f,w]],[/(apple) ?tv/i],[p,[d,E+" TV"],[f,w]],[/crkey/i],[[d,I+"cast"],[p,R],[f,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,x],[f,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,L],[f,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,U],[f,w]],[/(mitv-\w{5}) bui/i],[d,[p,j],[f,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[f,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,J],[d,J],[f,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[f,v]],[/droid.+; (shield) bui/i],[d,[p,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[d,[p,U],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,P],[f,v]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[p,D],[f,S]],[/((pebble))app/i],[p,d,[f,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,E],[f,S]],[/droid.+; (glass) \d/i],[d,[p,R],[f,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,F],[f,S]],[/droid.+; (glass) \d/i],[d,[p,R],[f,S]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,d,[f,S]],[/; (quest( \d| pro)?)/i],[d,[p,B],[f,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[f,k]],[/(aeobc)\b/i],[d,[p,x],[f,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[h,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[h,g],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,g],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[g,G,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,G,X],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,z],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,g],[/\(bb(10);/i],[g,[h,_]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[h,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[g,[h,I+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,H],g],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(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],[h,g],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,g]]},Z=function(e,t){if(typeof e===l&&(t=e,e=o),!(this instanceof Z))return new Z(e,t).getResult();var r=typeof i!==a&&i.navigator?i.navigator:o,n=e||(r&&r.userAgent?r.userAgent:""),v=r&&r.userAgentData?r.userAgentData:o,w=t?V(Q,t):Q,S=r&&r.userAgent==n;return this.getBrowser=function(){var e,t={};return t[h]=o,t[g]=o,Y.call(t,n,w.browser),t[c]=typeof(e=t[g])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o,S&&r&&r.brave&&typeof r.brave.isBrave==s&&(t[h]="Brave"),t},this.getCPU=function(){var e={};return e[m]=o,Y.call(e,n,w.cpu),e},this.getDevice=function(){var e={};return e[p]=o,e[d]=o,e[f]=o,Y.call(e,n,w.device),S&&!e[f]&&v&&v.mobile&&(e[f]=y),S&&"Macintosh"==e[d]&&r&&typeof r.standalone!==a&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[d]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[h]=o,e[g]=o,Y.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[h]=o,e[g]=o,Y.call(e,n,w.os),S&&!e[h]&&v&&v.platform&&"Unknown"!=v.platform&&(e[h]=v.platform.replace(/chrome os/i,H).replace(/macos/i,z)),e},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(e){return n=typeof e===u&&e.length>500?J(e,500):e,this},this.setUA(n),this};Z.VERSION="1.0.40",Z.BROWSER=$([h,g,c]),Z.CPU=$([m]),Z.DEVICE=$([d,p,f,v,y,w,b,S,k]),Z.ENGINE=Z.OS=$([h,g]),typeof t!==a?(e.exports&&(t=e.exports=Z),t.UAParser=Z):r.amdO?o===(n=(function(){return Z}).call(t,r,t,e))||(e.exports=n):typeof i!==a&&(i.UAParser=Z);var ee=typeof i!==a&&(i.jQuery||i.Zepto);if(ee&&!ee.ua){var et=new Z;ee.ua=et.getResult(),ee.ua.get=function(){return et.getUA()},ee.ua.set=function(e){et.setUA(e);var t=et.getResult();for(var r in t)ee.ua[r]=t[r]}}}("object"==typeof window?window:this)},38085(e,t,r){var n=r(26136),i=r(2576),o=r(78977),s=Math.ceil,a=Math.max;e.exports=function(e,t,r){t=(r?i(e,t,r):void 0===t)?1:a(o(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var u=0,c=0,d=Array(s(l/t));u<l;)d[c++]=n(e,u,u+=t);return d}},38900(e){e.exports=function(){var e={};function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
1).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}e=function(){function e(){var e="undefined"!=typeof window&&window.React;if(this.name="react",this.lazy=0==arguments.length&&!e,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||e,!this.React))throw Error("@bugsnag/plugin-react reference to `React` was undefined")}return e.prototype.load=function(e){if(!this.lazy){var t=i(this.React,e);return t.createErrorBoundary=function(){return t},t}var r=function(){throw Error(`@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:
2Pass React to the plugin constructor
3
4  \`Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })\`
5and then call \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()\`
6
7Or if React is not available until after Bugsnag has started,
8construct the plugin with no arguments
9  \`Bugsnag.start({ plugins: [new BugsnagPluginReact()] })\`,
10then pass in React when available to construct your error boundary
11  \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)\``)};return r.createErrorBoundary=function(t){if(!t)throw Error("@bugsnag/plugin-react reference to `React` was undefined");return i(t,e)},r},e}();var n=function(e){for(var t=e.split(/\n/g),r="",n=0,i=t.length;n<i;n++)t[n].length&&(r+=(r.length?`
12`:"")+t[n].trim());return r},i=function(e,i){return function(o){function s(e){var t;return(t=o.call(this,e)||this).state={error:null,info:null},t.handleClearError=t.handleClearError.bind(t),t}s.prototype=Object.create(o.prototype),s.prototype.constructor=s,r(s,o);var a=s.prototype;return a.handleClearError=function(){this.setState({error:null,info:null})},a.componentDidCatch=function(e,t){var r=this.props.onError,o=i.Event.create(e,!0,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},1);t&&t.componentStack&&(t.componentStack=n(t.componentStack)),o.addMetadata("react",t),i._notify(o,r),this.setState({error:e,info:t})},a.render=function(){if(this.state.error){var r=this.props.FallbackComponent;return r?e.createElement(r,t({},this.state,{clearError:this.handleClearError})):null}return this.props.children},s}(e.Component)};return e.formatComponentStack=n,e.default=e,e}()},39468(e,t,r){"use strict";t.Ay=function(e){return(0,i.default)(e),o.has(e.toUpperCase())};var n,i=(n=r(16350))&&n.__esModule?n:{default:n},o=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"])},41765(e,t,r){"use strict";let n,i,o,s,a;r.r(t),r.d(t,{evaluateTargeting:()=>eD});var l,u=r(55823),c=function(e,t){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function h(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function f(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){var u=[a,l];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
12if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}"function"==typeof SuppressedError&&SuppressedError;var g="is not",m="contains",v="does not contain",y="less",b="less or equal",w="greater",S="greater or equal",k="version less",x="version less or equal",E="version greater",C="version greater or equal",_="set is",O="set is not",I="set contains",T="set does not contain",R="set contains any",A="set does not contain any",P=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return Uint8Array.from(t)},M=function(e,t){void 0===t&&(t=0);for(var r=P(e),n=r.length,i=n>>2,o=t,s=0;s<i;s++)o=N(U(r,s<<2),o);var a=i<<2,l=0;switch(n-a){case 3:l^=r[a+2]<<16,l^=r[a+1]<<8,l^=r[a],o^=l=Math.imul(l=L(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 2:l^=r[a+1]<<8,l^=r[a],o^=l=Math.imul(l=L(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 1:l^=r[a],o^=l=Math.imul(l=L(l=Math.imul(l,-0x3361d2af),15),0x1b873593)}return D(o^=n)>>>0},N=function(e,t){var r=e,n=t;return n^=r=Math.imul(r=L(r=Math.imul(r,-0x3361d2af),15),0x1b873593),(n=Math.imul(n=L(n,13),5))+-0x19ab949c|0},D=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-0x7a143595),t^=t>>>13,t=Math.imul(t,-0x3d4d51cb),t^=t>>>16},L=function(e,t,r){void 0===r&&(r=32),t>r&&(t%=r);var n=(e&0xffffffff<<r-t>>>0)>>>0>>>r-t>>>0;return(e<<t|n)>>>0},U=function(e,t){return void 0===t&&(t=0),j(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},j=function(e){return(-0x1000000&e)>>>24|(0xff0000&e)>>>8|(65280&e)<<8|(255&e)<<24},F=function(e,t){var r,n;if(t&&0!==t.length){try{for(var i=p(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!=typeof e)return;e=e[s]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(!e)return;return e}},B="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),H=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp(B).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i)))return new e(n,i,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){if(this.major>e.major)return 1;if(this.major<e.major)return -1;if(this.minor>e.minor)return 1;if(this.minor<e.minor)return -1;if(this.patch>e.patch)return 1;if(this.patch<e.patch||this.preRelease&&!e.preRelease)return -1;if(!this.preRelease&&e.preRelease)return 1;if(this.preRelease&&e.preRelease){if(this.preRelease>e.preRelease)return 1;if(this.preRelease<e.preRelease)return -1}return 0},e}(),z=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,i={},o={context:e,result:i};try{for(var s=p(t),a=s.next();!a.done;a=s.next()){var l=a.value,u=this.evaluateFlag(o,l);u&&(i[l.key]=u)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e.prototype.evaluateFlag=function(e,t){try{for(var r,n,i,o=p(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var l=d(d(d({},t.metadata),a.metadata),i.metadata);i=d(d({},i),{metadata:l});break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.prototype.evaluateSegment=function(e,t,r){var n,i,o,s;if(!r.conditions){var a=this.bucket(e,r);return void 0!==a?t.variants[a]:void 0}try{for(var l=p(r.conditions),u=l.next();!u.done;u=l.next()){var c=u.value,d=!0;try{for(var h=(o=void 0,p(c)),f=h.next();!f.done;f=h.next()){var g=f.value;if(!(d=this.matchCondition(e,g)))break}}catch(e){o={error:e}}finally{try{f&&!f.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}if(d){var a=this.bucket(e,r);if(void 0!==a)return t.variants[a];return}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}},e.prototype.matchCondition=function(e,t){var r=F(e,t.selector);if(!r)return this.matchNull(t.op,t.values);if(this.isSetOperator(t.op)){var n=this.coerceStringArray(r);return!!n&&this.matchSet(n,t.op,t.values)}var i=this.coerceString(r);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return M(e)},e.prototype.bucket=function(e,t){if(!t.bucket)return t.variant;var r,n,i,o,s=this.coerceString(F(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),l=this.getHash(a),u=l%100,c=Math.floor(l/100);try{for(var d=p(t.bucket.allocations),h=d.next();!h.done;h=d.next()){var f=h.value,g=f.range[0],m=f.range[1];if(u>=g&&u<m)try{for(var v=(i=void 0,p(f.distributions)),y=v.next();!y.done;y=v.next()){var b=y.value,w=b.range[0],S=b.range[1];if(c>=w&&c<S)return b.variant}}catch(e){i={error:e}}
12finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case"is":case m:case y:case b:case w:case S:case k:case x:case E:case C:case _:case I:case R:return r;case g:case v:case T:case A:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case _:return this.setEquals(e,r);case O:return!this.setEquals(e,r);case I:return this.matchesSetContainsAll(e,r);case T:return!this.matchesSetContainsAll(e,r);case R:return this.matchesSetContainsAny(e,r);case A:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case"is":return this.matchesIs(e,r);case g:return!this.matchesIs(e,r);case m:return this.matchesContains(e,r);case v:return!this.matchesContains(e,r);case y:case b:case w:case S:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case k:case x:case E:case C:return this.matchesComparable(e,t,r,function(e){return H.parse(e)},this.versionComparator);case"regex match":return this.matchesRegex(e,r);case"regex does not match":return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var i=p(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,i){var o=this,s=n(e),a=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?r.some(function(r){return o.comparator(e,t,r)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case y:case k:return e<r;case b:case x:return e<=r;case w:case E:return e>r;case S:case C:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case y:case k:return n<0;case b:case x:return n<=0;case w:case E:return n>0;case S:case C:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!=(t=Number(e))?t:void 0},e.prototype.coerceString=function(e){if(e)return"object"==typeof e?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e)){var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}var n=String(e);try{var i=JSON.parse(n);if(!Array.isArray(i))return;var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case _:case O:case I:case T:case R:case A:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&(function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))})([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var i=p(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var i=p(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e}();let q="function"==typeof atob,V="function"==typeof btoa,$="function"==typeof Buffer,W="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0,J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
12+/="),Y=(o={},J.forEach((e,t)=>o[e]=t),o),G=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),Q="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Z=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),ee=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),et=V?e=>btoa(e):$?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,i,o="",s=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw TypeError("invalid character found");o+=J[(t=r<<16|n<<8|i)>>18&63]+J[t>>12&63]+J[t>>6&63]+J[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},er=$?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(X.apply(null,e.subarray(r,r+4096)));return et(t.join(""))},en=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?X(192|t>>>6)+X(128|63&t):X(224|t>>>12&15)+X(128|t>>>6&63)+X(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return X(240|t>>>18&7)+X(128|t>>>12&63)+X(128|t>>>6&63)+X(128|63&t)},ei=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,eo=$?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>er(K.encode(e)):e=>et(e.replace(ei,en)),es=(e,t=!1)=>t?Z(eo(e)):eo(e),ea=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,el=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return X((t>>>10)+55296)+X((1023&t)+56320);case 3:return X((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return X((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},eu=q?e=>atob(ee(e)):$?e=>Buffer.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!G.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r="",n,i;for(let o=0;o<e.length;)t=Y[e.charAt(o++)]<<18|Y[e.charAt(o++)]<<12|(n=Y[e.charAt(o++)])<<6|(i=Y[e.charAt(o++)]),r+=64===n?X(t>>16&255):64===i?X(t>>16&255,t>>8&255):X(t>>16&255,t>>8&255,255&t);return r},ec=$?e=>Q(Buffer.from(e,"base64")):e=>Q(eu(e).split("").map(e=>e.charCodeAt(0))),ed=$?e=>Buffer.from(e,"base64").toString("utf8"):W?e=>W.decode(ec(e)):e=>eu(e).replace(ea,el),eh=e=>es(e,!0);var ef=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}function r(t,n){var i=e.call(this,n)||this;return i.statusCode=t,Object.setPrototypeOf(i,r.prototype),i}return c(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r}(Error);(function(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}).prototype.getVariants=function(e,t){return h(this,void 0,void 0,function(){var r,n,i;return f(this,function(o){switch(o.label){case 0:return r=eh(JSON.stringify(e)),n={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":r},(null==t?void 0:t.flagKeys)&&(n["X-Amp-Exp-Flag-Keys"]=eh(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(n["X-Amp-Exp-Track"]=t.trackingOption),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/vardata?v=0"),method:"GET",headers:n,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(i=o.sent()).status)throw new ef(i.status,"Fetch error response: status=".concat(i.status));return[2,JSON.parse(i.body)]}})})},(function(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}).prototype.getFlags=function(e){return h(this,void 0,void 0,function(){var t,r;return f(this,function(n){switch(n.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(r=n.sent()).status)throw Error("Flags error response: status=".concat(r.status));return[2,JSON.parse(r.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})};var ep="undefined"!=typeof globalThis?globalThis:r.g||self;function eg(e,t){this.poller=void 0,this.action=e,this.ms=t}eg.prototype.start=function(){this.poller||(this.poller=ep.setInterval(this.action,this.ms),this.action())},eg.prototype.stop=function(){this.poller&&(ep.clearInterval(this.poller),this.poller=void 0)};let em=(e,t)=>
12t.some(t=>e instanceof t),ev=new WeakMap,ey=new WeakMap,eb=new WeakMap,ew={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ev.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return eS(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function eS(e){if(e instanceof IDBRequest){let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(eS(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)});return eb.set(t,e),t}if(ey.has(e))return ey.get(e);let t=function(e){if("function"==typeof e)return(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ek(this),t),eS(this.request)}:function(...t){return eS(e.apply(ek(this),t))};return(e instanceof IDBTransaction&&function(e){if(ev.has(e))return;let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ev.set(e,t)}(e),em(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,ew):e}(e);return t!==e&&(ey.set(e,t),eb.set(t,e)),t}let ek=e=>eb.get(e),ex=["get","getKey","getAll","getAllKeys","count"],eE=["put","add","delete","clear"],eC=new Map;function e_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(eC.get(t))return eC.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=eE.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ex.includes(r)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return eC.set(t,o),o}ew={...s=ew,get:(e,t,r)=>e_(e,t)||s.get(e,t,r),has:(e,t)=>!!e_(e,t)||s.has(e,t)};let eO=["continue","continuePrimaryKey","advance"],eI={},eT=new WeakMap,eR=new WeakMap,eA={get(e,t){if(!eO.includes(t))return e[t];let r=eI[t];return r||(r=eI[t]=function(...e){eT.set(this,eR.get(this)[t](...e))}),r}};async function*eP(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;let r=new Proxy(t,eA);for(eR.set(r,t),eb.set(r,ek(t));t;)yield r,t=await (eT.get(r)||t.continue()),eT.delete(r)}function eM(e,t){return t===Symbol.asyncIterator&&em(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&em(e,[IDBIndex,IDBObjectStore])}ew={...a=ew,get:(e,t,r)=>eM(e,t)?eP:a.get(e,t,r),has:(e,t)=>eM(e,t)||a.has(e,t)};var eN=new function(){var e=this;this.dbs={},this.createStore=function(t){return(0,u.sH)(e,void 0,void 0,function(){return(0,u.YH)(this,function(e){switch(e.label){case 0:return[4,function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){let s=indexedDB.open(e,1),a=eS(s);return n&&s.addEventListener("upgradeneeded",e=>{n(eS(s.result),e.oldVersion,e.newVersion,eS(s.transaction),e)}),r&&s.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}(t,0,{upgrade:function(e){e.objectStoreNames.contains("eventTypesForSession")||e.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return(0,u.sH)(e,void 0,void 0,function(){var e,r;return(0,u.YH)(this,function(n){switch(n.label){case 0:if(this.dbs&&this.dbs[t])return[2,this.dbs[t]];return e="".concat(t.substring(0,10),"_amp_targeting"),[4,this.createStore(e)];case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.updateEventListForSession=function(t){var r=t.sessionId,n=t.eventType,i=t.eventTime,o=t.loggerProvider,s=t.tx;return(0,u.sH)(e,void 0,void 0,function(){var e,t,a,l,c,d,h;return(0,u.YH)(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,4]),[4,s.store.get(r)];case 1:return a=(t=(e=f.sent())?e.eventTypes:{})[n]||{},l=(0,u.Cl)((0,u.Cl)({},t),((d={})[n]=(0,u.Cl)((0,u.Cl)({},a),((h={})[i]={event_type:n},h)),d)),[4,s.store.put({sessionId:r,eventTypes:l})];case 2:return f.sent(),[2,l];case 3:return c=f.sent(),o.warn("Failed to store events for targeting ".concat(r,": ").concat(c)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var r=t.currentSessionId,n=t.loggerProvider,i=t.tx;return(0,u.sH)(e,void 0,void 0,function(){var e,t,o,s,a;return(0,u.YH)(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,i.store.getAll()];case 1:e=l.sent(),t=0,l.label=2;case 2:if(!(t<e.length))return[3,5];if(o=e[t],s=Date.now()-o.sessionId,!(o.sessionId!==r&&s>1728e5))return[3,4];return[4,i.store.delete(o.sessionId)];case 3:l.sent(),l.label=4;case 4:return t++,[3,2];case 5:return[3,7];case 6:return a=l.sent(),n.warn("Failed to clear old session events for targeting: ".concat(a)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var r=t.loggerProvider,n=t.sessionId,i=t.eventType,o=t.eventTime,s=t.apiKey;return(0,u.sH)(e,void 0,void 0,function(){var e,t,a;return(0,u.YH)(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),[4,this.openOrCreateDB(s)];case 1:if(!(e=l.sent().transaction("eventTypesForSession","readwrite")))return[2];return[4,this.updateEventListForSession({sessionId:n,tx:e,loggerProvider:r,eventType:i,eventTime:o})];case 2:return t=l.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:n,tx:e,loggerProvider:r})];case 3:return l.sent(),[4,e.done];case 4:return l.sent(),[2,t];case 5:return a=l.sent(),r.warn("Failed to store events for targeting ".concat(n,": ").concat(a)),[3,6];case 6:return[2,void 0]}})})}},eD={evaluateTargeting:(l=new function(){var e=this;this.evaluateTargeting=function(t){var r=t.apiKey,n=t.loggerProvider,i=t.event,o=t.sessionId,s=t.userProperties,a=t.deviceId,l=t.flag;return(0,u.sH)(e,void 0,void 0,function(){var e,t,c,d;return(0,u.YH)(this,function(u){switch(u.label){case 0:if(!(i&&i.time))return[3,2];return[4,eN.storeEventTypeForSession({loggerProvider:n,apiKey:r,sessionId:o,eventType:i.event_type,eventTime:i.time})];case 1:return t=u.sent(),[3,3];case 2:t=void 0,u.label=3;case 3:return d={session_id:o,event:i,event_types:(c=(e=t)&&new Set(Object.keys(e)))&&Array.from(c),user:{device_id:a,user_properties:s}},[2,this.evaluationEngine.evaluate(d,[l])]}})})},this.evaluationEngine=new z}).evaluateTargeting.bind(l)}.evaluateTargeting},45880(e,t,r){"use strict";r.d(t,{Lc:()=>tb,Ts:()=>tv,mY:()=>ty}),(n=i||(i={}))[n.None=0]="None",n[n.Error=1]="Error",n[n.Warn=2]="Warn",n[n.Verbose
12=3]="Verbose",n[n.Debug=4]="Debug";var n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E,C,_,O,I=function(e,t,r,n,o){return void 0===o&&(o=null),function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=r(),u=l.logger,c=l.logLevel;if(c&&c<i.Debug||!c||!u)return e.apply(o,s);var d={type:"invoke public method",name:t,args:s,stacktrace:(Error().stack||"").split(`
13`).slice(3).map(function(e){return e.trim()}),time:{start:new Date().toISOString()},states:{}};n&&d.states&&(d.states.before=n());var h=e.apply(o,s);return h&&h.promise?h.promise.then(function(){n&&d.states&&(d.states.after=n()),d.time&&(d.time.end=new Date().toISOString()),u.debug(JSON.stringify(d,null,2))}):(n&&d.states&&(d.states.after=n()),d.time&&(d.time.end=new Date().toISOString()),u.debug(JSON.stringify(d,null,2))),h}},T=r(55823),R="Amplitude Logger ",A=function(){function e(){this.logLevel=i.None}return e.prototype.disable=function(){this.logLevel=i.None},e.prototype.enable=function(e){void 0===e&&(e=i.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<i.Verbose||console.log("".concat(R,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<i.Warn||console.warn("".concat(R,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<i.Error||console.error("".concat(R,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<i.Debug||console.log("".concat(R,"[Debug]: ").concat(e.join(" ")))},e}();(p=o||(o={})).Unknown="unknown",p.Skipped="skipped",p.Success="success",p.RateLimit="rate_limit",p.PayloadTooLarge="payload_too_large",p.Invalid="invalid",p.Failed="failed",p.Timeout="Timeout",p.SystemError="SystemError";var P=function(){function e(){}return e.prototype.send=function(e,t,r){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E=e.code||0,C=this.buildStatus(E);switch(C){case o.Success:return{status:C,statusCode:E,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(r=e.payload_size_bytes)?r:0,serverUploadTime:null!=(n=e.server_upload_time)?n:0}};case o.Invalid:return{status:C,statusCode:E,body:{error:null!=(i=e.error)?i:"",missingField:null!=(s=e.missing_field)?s:"",eventsWithInvalidFields:null!=(a=e.events_with_invalid_fields)?a:{},eventsWithMissingFields:null!=(l=e.events_with_missing_fields)?l:{},eventsWithInvalidIdLengths:null!=(u=e.events_with_invalid_id_lengths)?u:{},epsThreshold:null!=(c=e.eps_threshold)?c:0,exceededDailyQuotaDevices:null!=(d=e.exceeded_daily_quota_devices)?d:{},silencedDevices:null!=(h=e.silenced_devices)?h:[],silencedEvents:null!=(f=e.silenced_events)?f:[],throttledDevices:null!=(p=e.throttled_devices)?p:{},throttledEvents:null!=(g=e.throttled_events)?g:[]}};case o.PayloadTooLarge:return{status:C,statusCode:E,body:{error:null!=(m=e.error)?m:""}};case o.RateLimit:return{status:C,statusCode:E,body:{error:null!=(v=e.error)?v:"",epsThreshold:null!=(y=e.eps_threshold)?y:0,throttledDevices:null!=(b=e.throttled_devices)?b:{},throttledUsers:null!=(w=e.throttled_users)?w:{},exceededDailyQuotaDevices:null!=(S=e.exceeded_daily_quota_devices)?S:{},exceededDailyQuotaUsers:null!=(k=e.exceeded_daily_quota_users)?k:{},throttledEvents:null!=(x=e.throttled_events)?x:[]}};case o.Timeout:default:return{status:C,statusCode:E}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),M=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.customHeaders=t,r}return(0,T.C6)(t,e),t.prototype.send=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){var r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:(0,T.Cl)({"Content-Type":"application/json",Accept:"*/*"},this.customHeaders),body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).text()];case 2:n=i.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:r.status})]}}})})},t}(P),N="$default_instance",D="https://api2.amplitude.com/2/httpapi",L=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:N,logLevel:i.Warn,loggerProvider:new A,offline:!1,optOut:!1,serverUrl:D,serverZone:"US",useBatch:!1}},U=function(){function e(e){this._optOut=!1;var t,r,n,i,o=L();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(r=e.logLevel)?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(n=e.optOut)?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=j(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
13,enumerable:!1,configurable:!0}),e}(),j=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=L().serverZone),void 0===r&&(r=L().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:L().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":n?"https://api2.amplitude.com/batch":D)}};(function(){this.sdk={metrics:{histogram:{}}}}).prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},(g=s||(s={})).US="US",g.EU="EU",g.STAGING="STAGING";var F="[Amplitude]",B="".concat(F," Session Replay ID"),H=s.US,z={enabled:!0},q="".concat(F," Session Replay Debug"),V="amp-mask",$="https://api-sr.amplitude.com/sessions/v2/track",W="https://api-sr.eu.amplitude.com/sessions/v2/track",K="https://api-sr.stag2.amplitude.com/sessions/v2/track";(m=a||(a={})).GET_SR_PROPS="get-sr-props",m.DEBUG_INFO="debug-info",m.FETCH_REQUEST="fetch-request",m.METADATA="metadata",m.TARGETING_DECISION="targeting-decision";var J=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){if(!this.logger)return function(){};var t,r=this.logger[e];return"function"==typeof r?(null!=(t=r.__rrweb_original__)?t:r).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),Y=r(70556),G="medium",X=function(e,t,r){switch(t){case"light":if("input"!==e)return!0;var n,i,o=r?(i=(n=r).type,n.hasAttribute("data-rr-is-password")?"password":i?i.toLowerCase():null):"";if(!o)return!1;if(["password","hidden","email","tel"].includes(o)||r.autocomplete.startsWith("cc-"))return!0;return!1;case"medium":case"conservative":return!0;default:return X(e,G,r)}},Q=function(e,t){if(e&&t.urlMaskLevels)try{for(var r,n,i,o=(0,T.Ju)(t.urlMaskLevels),s=o.next();!s.done;s=o.next()){var a=s.value;if(en(a.match).test(e))return a.maskLevel}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null!=(i=t.defaultMaskLevel)?i:G},Z=function(e,t,r,n){var i,o;if(void 0===t&&(t={defaultMaskLevel:G}),r){if(r.closest("."+V)||(null!=(i=t.maskSelector)?i:[]).some(function(e){return r.closest(e)}))return!0;if(r.closest(".amp-unmask")||(null!=(o=t.unmaskSelector)?o:[]).some(function(e){return r.closest(e)}))return!1}return X(e,Q(n,t),r)},ee=function(e,t,r){return function(n,i){return Z(e,t,i,null==r?void 0:r())?n.replace(/[^\s]/g,"*"):n}},et=function(){var e=(0,Y.m)();return(null==e?void 0:e.location)?e.location.href:""},er=new Map,en=function(e){var t=er.get(e);if(t)return t;var r="\0TRAIL\0",n="\0MID\0",i="\0DS\0",o="\0ST\0",s="\0QU\0",a=e;a=(a=(a=(a=(a=(a=(a=(a=(a=(a=(a=a.replace(/\/\*\*$/,r)).replace(/\/\*\*\//g,n)).replace(/\*\*/g,i)).replace(/\*/g,o)).replace(/\?/g,s)).replace(/[.+^${}()|[\]\\]/g,"\\$&")).split(r).join("(/.*)?")).split(n).join("/(.*\\/)?")).split(i).join(".*")).split(o).join(".*")).split(s).join(".");var l=new RegExp("^".concat(a,"$"));return er.set(e,l),l},ei=function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){var t;return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t)}))throw Error("ugcFilterRules must be an array of objects with valid globs")},eo=function(e,t){var r,n;try{for(var i=(0,T.Ju)(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=en(s.selector);if(a.test(e))return e.replace(a,s.replacement)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},es=function(){return(0,T.sH)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),!(e=(0,Y.m)()))return[3,2];return[4,e.navigator.storage.estimate()];case 1:return r=(t=i.sent()).usage,n=t.quota,[2,{totalStorageSize:r?Math.round(r/1024):0,percentOfQuota:r&&n?Math.round((r/n+Number.EPSILON)*1e3)/1e3:0,usageDetails:JSON.stringify(t.usageDetails)}];case 2:return[3,4];case 3:return i.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},ea=function(e){var t=(0,T.Cl)({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},el=function(){return{flushMaxRetries:2,logLevel:i.Warn,loggerProvider:new A,transportProvider:new M}},eu=function(e){function t(t,r){var n,i,o,s,a,l,u,c=this,d=el();return(c=e.call(this,(0,T.Cl)((0,T.Cl)({transportProvider:d.transportProvider,loggerProvider:new J(r.loggerProvider||d.loggerProvider)},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=d.flushMaxRetries?r.flushMaxRetries:d.flushMaxRetries,c.apiKey=t,c.sampleRate=r.sampleRate||0,c.serverZone=r.serverZone||H,c.configServerUrl=r.configServerUrl,c.trackServerUrl=r.trackServerUrl,c.shouldInlineStylesheet=r.shouldInlineStylesheet,c.version=r.version,c.performanceConfig=r.performanceConfig||z,c.storeType=null!=(n=r.storeType)?n:"idb",c.applyBackgroun
13dColorToBlockedElements=null!=(i=r.applyBackgroundColorToBlockedElements)&&i,c.enableUrlChangePolling=null!=(o=r.enableUrlChangePolling)&&o,c.urlChangePollingInterval=null!=(s=r.urlChangePollingInterval)?s:1e3,c.captureDocumentTitle=null!=(a=r.captureDocumentTitle)&&a,r.privacyConfig&&(c.privacyConfig=r.privacyConfig),r.interactionConfig&&(c.interactionConfig=r.interactionConfig,c.interactionConfig.ugcFilterRules&&ei(c.interactionConfig.ugcFilterRules)),r.debugMode&&(c.debugMode=r.debugMode),void 0!==r.useWebWorker?c.useWebWorker=r.useWebWorker:(null==(l=r.experimental)?void 0:l.useWebWorker)!==void 0&&(c.useWebWorker=r.experimental.useWebWorker),r.omitElementTags&&(c.omitElementTags=r.omitElementTags),c.captureAdoptedStyleSheets=null==(u=r.captureAdoptedStyleSheets)||u,c}return(0,T.C6)(t,e),t}(U);(v=l||(l={})).SET="$set",v.SET_ONCE="$setOnce",v.ADD="$add",v.APPEND="$append",v.PREPEND="$prepend",v.REMOVE="$remove",v.PREINSERT="$preInsert",v.POSTINSERT="$postInsert",v.UNSET="$unset",v.CLEAR_ALL="$clearAll",(y=u||(u={})).IDENTIFY="$identify",y.GROUP_IDENTIFY="$groupidentify",y.REVENUE="revenue_amount";var ec=function(e){return{promise:e||Promise.resolve()}},ed="https://app.amplitude.com",eh={US:ed,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},ef="__AMPLITUDE_MESSENGER_INSTANCE__",ep="__AMPLITUDE_MESSENGER__",eg=function(){function e(e){var t=(void 0===e?{}:e).origin;this[c]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=void 0===t?ed:t}return e.prototype.notify=function(e){var t,r,n,i;null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(n=window.opener)?void 0:n.postMessage)||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){n.requestCallbacks[i]={resolve:t,reject:s},n.notify(o),r.timeout>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.registerActionHandler=function(e,t){this.actionHandlers.has(e)&&(null==(o=null==(i=this.logger)?void 0:i.warn)||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var r,n,i,o,s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=(0,T.Ju)(s),l=a.next();!l.done;l=a.next()){var u=l.value;t(u)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},e.prototype.loadScriptOnce=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t,r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];r=(document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,r){var n;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){r({status:!1,message:"Failed to load the script ".concat(e)})}),null==(n=document.head)||n.appendChild(i)}catch(e){r(e)}})).then(function(){}),this.scriptLoadPromises.set(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r];case 2:return i.sent(),[3,4];case 3:throw n=i.sent(),this.scriptLoadPromises.delete(e),n;case 4:return[2]}})})},e.prototype.setup=function(e){var t,r,n=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===ed&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Setting up messenger"),this.messageHandler=function(e){if(null==(r=null==(t=n.logger)?void 0:t.debug)||r.call(t,"Message received: ",JSON.stringify(e)),n.endpoint===e.origin){var t,r,i,o,s,a=e.data,l=null==a?void 0:a.action;if(l)if("id"in a&&a.id)null==(o=null==(i=n.logger)?void 0:i.debug)||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),n.handleResponse(a
13);else{if("ping"===l)return void n.notify({action:"pong"});var u=n.actionHandlers.get(l);if(u)u(a.data);else{var c=null!=(s=n.pendingMessages.get(l))?s:[];c.push(a.data),n.pendingMessages.set(l,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=(0,Y.m)();(null==e?void 0:e[ep])===this&&delete e[ep]},e}();c=ef;var em="__AMPLITUDE_BACKGROUND_CAPTURE__",ev=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t},ey=r(76459),eb=((b=eb||{})[b.DomContentLoaded=0]="DomContentLoaded",b[b.Load=1]="Load",b[b.FullSnapshot=2]="FullSnapshot",b[b.IncrementalSnapshot=3]="IncrementalSnapshot",b[b.Meta=4]="Meta",b[b.Custom=5]="Custom",b[b.Plugin=6]="Plugin",b),ew=((w=ew||{})[w.Mutation=0]="Mutation",w[w.MouseMove=1]="MouseMove",w[w.MouseInteraction=2]="MouseInteraction",w[w.Scroll=3]="Scroll",w[w.ViewportResize=4]="ViewportResize",w[w.Input=5]="Input",w[w.TouchMove=6]="TouchMove",w[w.MediaInteraction=7]="MediaInteraction",w[w.StyleSheetRule=8]="StyleSheetRule",w[w.CanvasMutation=9]="CanvasMutation",w[w.Font=10]="Font",w[w.Log=11]="Log",w[w.Drag=12]="Drag",w[w.StyleDeclaration=13]="StyleDeclaration",w[w.Selection=14]="Selection",w[w.AdoptedStyleSheet=15]="AdoptedStyleSheet",w[w.CustomElement=16]="CustomElement",w),eS=((S=eS||{})[S.MouseUp=0]="MouseUp",S[S.MouseDown=1]="MouseDown",S[S.Click=2]="Click",S[S.ContextMenu=3]="ContextMenu",S[S.DblClick=4]="DblClick",S[S.Focus=5]="Focus",S[S.Blur=6]="Blur",S[S.TouchStart=7]="TouchStart",S[S.TouchMove_Departed=8]="TouchMove_Departed",S[S.TouchEnd=9]="TouchEnd",S[S.TouchCancel=10]="TouchCancel",S),ek=((k=ek||{})[k.Mouse=0]="Mouse",k[k.Pen=1]="Pen",k[k.Touch=2]="Touch",k),ex=((x=ex||{})[x["2D"]=0]="2D",x[x.WebGL=1]="WebGL",x[x.WebGL2=2]="WebGL2",x),eE=((E=eE||{})[E.Play=0]="Play",E[E.Pause=1]="Pause",E[E.Seeked=2]="Seeked",E[E.VolumeChange=3]="VolumeChange",E[E.RateChange=4]="RateChange",E),eC=((C=eC||{}).Start="start",C.Pause="pause",C.Resume="resume",C.Resize="resize",C.Finish="finish",C.FullsnapshotRebuilded="fullsnapshot-rebuilded",C.LoadStylesheetStart="load-stylesheet-start",C.LoadStylesheetEnd="load-stylesheet-end",C.SkipStart="skip-start",C.SkipEnd="skip-end",C.MouseInteraction="mouse-interaction",C.EventCast="event-cast",C.CustomEvent="custom-event",C.Flush="flush",C.StateChange="state-change",C.PlayBack="play-back",C.Destroy="destroy",C),e_=((_=e_||{})[_.Document=0]="Document",_[_.DocumentType=1]="DocumentType",_[_.Element=2]="Element",_[_.Text=3]="Text",_[_.CDATA=4]="CDATA",_[_.Comment=5]="Comment",_),eO=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),eI=(0,T.fX)([],(0,T.zs)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),eT=function(e){var t,r=(0,Y.m)();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,eT);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,T.fX)([],(0,T.zs)(n.entries()),!1).map(function(e){var t=(0,T.zs)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(eI[n]):eI[n]}).join("")},eR=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvali
13dApiKey=!1,this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new eO(e,t)}return e.prototype.subscribe=function(e,t,r){var n=eT(),i={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,T.sH)(this,void 0,void 0,function(){var e,t=this;return(0,T.YH)(this,function(r){switch(r.label){case 0:if(this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5)return this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2];return[4,this.getOrCreateFetchPromise()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null})):this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null})),this.fetchPromise},e.prototype.subscribeAll=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,T.YH)(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),null!==n.remoteConfig?this.sendCallback(e,n,"cache"):this.logger.debug("Remote config client skips sending c
13allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){var r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),r])];case 2:return n=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,T.sH)(this,void 0,void 0,function(){var r,n,i,o,s,a,l=this;return(0,T.YH)(this,function(u){switch(u.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},i=function(n){var i,s,a,u,c,d;return(0,T.YH)(this,function(h){switch(h.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),h.label=1;case 1:return h.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:s.signal})];case 2:if((u=h.sent()).ok)return[3,4];return[4,u.text()];case 3:return c=h.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(u.status,": ").concat(c)),401===u.status||403===u.status?(o.logger.error("Remote config client fetch failed with ".concat(u.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):u.status>=400&&u.status<500&&429!==u.status&&(i=!1),[3,6];case 4:return[4,u.json()];case 5:return[2,{value:{remoteConfig:h.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(d=h.sent())instanceof Error&&"AbortError"===d.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(a),[7];case 9:if(!i)return[2,"break"];if(!(n<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,l.getJitterDelay(r))})];case 10:h.sent(),h.label=11;case 11:return[2]}})},o=this,s=0,u.label=1;case 1:if(!(s<e))return[3,4];return[5,i(s)];case 2:if("object"==typeof(a=u.sent()))return[2,a.value];if("break"===a)return[3,4];u.label=3;case 3:return s++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}(),eA=function(e,t){var r=document.createDocumentFragment(),n=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{r.querySelector(e)}catch(r){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})).length)return e};return e.blockSelector=n(e.blockSelector),e.maskSelector=n(e.maskSelector),e.unmaskSelector=n(e.unmaskSelector),e},eP=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,t,r,n,i,o,s;return(0,T.sH)(this,void 0,void 0,function(){var a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E=this;return(0,T.YH)(this,function(C){switch(C.label){case 0:(a=(0,T.Cl)({},this.localConfig)).optOut=this.localConfig.optOut,a.captureEnabled=!0,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,new Promise(function(e,t){E.remoteConfigClient.subscribe("configs.sessionReplay","all",function(r,n){if(E.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(n,":"),JSON.stringify(r,null,2)),!r)return void t(Error("No remote config received"));var i,o=r.sr_sampling_config,s=r.sr_privacy_config,u=r.sr_targeting_config,c=null==(i=a.interactionConfig)?void 0:i.ugcFilterRules;a.interactionConfig=r.sr_interaction_config,a.interactionConfig&&c&&(a.interactionConfig.ugcFilterRules=c),a.loggingConfig=r.sr_logging_config,(o||s||u)&&(l={},o&&(l.sr_sampling_config=o),s&&(l.sr_privacy_config=s),u&&(l.sr_targeting_config=u)),e()})})];case 2:return C.sent(),[3,4];case 3:return u=C.sent(),this.localConfig.loggerProvider.error("Failed to generate joined config: ",u),a.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:void 0}];case 4:if(!l)return[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:l}];if(c=l.sr_sampling_config,d=l.sr_privacy_config,h=l.sr_targeting_config,c&&Object.keys(c).length>0?(Object.prototype.hasOwnProperty.call(c,"capture_enabled")?a.captureEnabled=c.capture_enabled:a.captureEnabled=!1,Object.prototype.hasOwnProperty.call(c,"sample_rate")&&(a.sampleRate=c.sample_rate)):(a.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),d){f=null!=(e=a.privacyConfig)?e:{},p={defaultMaskLevel:null!=(r=null!=(t=d.defaultMaskLevel)?t:f.defaultMaskLevel)?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[],maskAttributes:(0,T.fX)([],(0,T.zs)(new Set((0,T.fX)((0,T.fX)([],(0,T.zs)(null!=(n=f.maskAttributes)?n:[]),!1),(0,T.zs)(null!=(i=d.maskAttributes)?i:[]),!1))),!1),urlMaskLevels:(0,T.fX)((0,T.fX)([],(0,T.zs)(null!=(o=d.urlMaskLevels)?o:[]),!1),(0,T.zs)(null!=(s=f.urlMaskLevels)?s:[]),!1)},g=function(e){var t,r,n,i,o,s,a,l,u,c={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=(0,T.Ju)(null!=(a=e.blockSelector)?a:[]),h=d.next();!h.done;h=d.next()){var f=h.value;c[f]="block"}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var p=(0,T.Ju)(null!=(l=e.maskSelector)?l:[]),g=p.next();!g.done;g=p.next()){var f=g.value;c[f]="mask"}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}try{for(var m=(0,T.Ju)(null!=(u=e.unmaskSelector)?u:[]),v=m.next();!v.done;v=m.next()){var f=v.value;c[f]="unmask"}}catch(e){o={error:e}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}return c},m=(0,T.Cl)((0,T.Cl)({},g(f)),g(d));try{for(y=(v=(0,T.Ju)(Object.entries(m))).next();!y.done;y=v.next())w=(b=(0,T.zs)(y.value,2))[0],S=b[1],"mask"===S?p.maskSelector.push(w):"block"===S?p.blockSelector.push(w):"unmask"===S&&p.unmaskSelector.push(w)}catch(e){k={error:e}}finally{try{y&&!y.done&&(x=v.return)&&x.call(v)}finally{if(k)throw k.error}}a.privacyConfig=eA(p,this.localConfig.loggerProvider)}return h&&Object.keys(h).length>0&&(a.targetingConfig=h),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:ea(a)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:l}]}})})},e}();function eM(e,t){return t||("STAGING"===e?K:"EU"===e?W:$)}function eN(e){if(e.type!==eb.IncrementalSnapshot)return!1;var t=e.data;return t.source===ew.Mutation&&!t.isAttachIframe}var eD=function(){function e(e,t,r,n,i){var o,s=this;this.taskQueue=[],this.pendingQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=e.type,r=e.timestamp,n=e.delay,i=e.data;return null!=n?JSON.stringify({type:t,timestamp:r,delay:n,data:i}):JSON.stringify({type:t,timestamp:r,data:i})},this.addCompressedEventToManager=function(e,t){s.eventsManager&&s.deviceId&&s.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:s.deviceId})},this.addCompressedEvent=function(e,t){if(s.worker)try{s.worker.postMessage({event:e,sessionId:t})}catch(r){"DataCloneError"===r.name?s.worker.postMessage(JSON.stringify({event:e,sessionId:t})):s.config.loggerProvider.warn("Unexpected error while posting message to worker:",r)}else{var r=s.compressEvent(e);s.addCompressedEventToManager(r,t)}},this.terminate=function(){var e;null==(e=s.worker)||e.terminate()};var a=(0,Y.m)();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null==(o=t.performanceConfig)?void 0:o.timeout)||2e3,this.onFullSnapshotProcessed=i,n){t.loggerProvider.log("Enabling web worker for compression");try{var l=new Blob([n],{type:"application/javascript"}),u=URL.createObjectURL(l),c=new Worker(u);c.onerror=function(e){e.preventDefault(),t.loggerProvider.error("Worker failed, falling back to non-worker compression: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),c.terminate(),s.worker=void 0},c.onmessage=function(e){var t=e.data,r=t.compressedEvent,n=t.sessionId;s.addCompressedEventToManager(r,n)},this.worker=c}catch(e){t.loggerProvider.error("Failed to create worker, falling back to non-worker compression:",e)}}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){if(e.type===eb.FullSnapshot){if(this.config.loggerProvider.debug("Processing full snapshot immediately."),this.taskQueue.length>0||this.pendingQueue.length>0){var r,n,i,o,s=(0,T.fX)((0,T.fX)([],(0,T.zs)(this.taskQueue.splice(0)),!1),(0,T.zs)(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1);try{for(var a=(0,T.Ju)(s),l=a.next();!l.done;l=a.next()){var u=l.value,c=this.compressEvent(u.event);this.addCompressedEventToManager(c,u.sessionId)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.isProcessing=!1}var d=this.compressEvent(e);this.addCompressedEventToManager(d,t),null==(i=this.onFullSnapshotProcessed)||i.call(this);return}this.canUseIdleCallback&&(null==(o=this.config.performanceConfig)?void 0:o.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.pendingQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){var t,r=this;for(this.pendingQueue.length>0&&(t=this.taskQueue).push.apply(t,(0,T.fX)([],(0,T.zs)(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1));this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var n=this.taskQueue.shift();if(n){var i=n.event,o=n.sessionId;this.addCompressedEvent(i,o)}}this.taskQueue.length>0||this.pendingQueue.length>0?requestIdleCallback(function(e){r.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e.prototype.mergeMutationTasks=function(e){if(!(null==(n=this.config.performanceConfig)?void 0:n.mergeMutations)||e.length<=1)return e;for(var t,r,n,i=[],o=0;o<e.length;){for(var s=e[o].sessionId,a=o+1;a<e.length&&e[a].sessionId===s;)a++;var l=function(e){if(e.length<=1)return e;for(var t=[],r=0;r<e.length;){if(!eN(e[r])){t.push(e[r]),r++;continue}for(var n=r+1;n<e.length&&eN(e[n]);)n++;t.push(n>r+1?function(e){var t,r,n,i,o=e[0],s=new Map,a=new Map,l=new Map,u=new Map,c=new Map;e.forEach(function(e,t){var r,n,i,o,d=e.data;try{for(var h=(0,T.Ju)(d.adds),f=h.next();!f.done;f=h.next()){var p=f.value;s.has(p.node.id)||s.set(p.node.id,t),a.set(p.node.id,t),c.set(p.node.id,p.parentId)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}try{for(var g=(0,T.Ju)(d.removes),m=g.next();!m.done;m=g.next()){var v=m.value;l.has(v.id)||l.set(v.id,t),u.set(v.id,t)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}});var d=new Set,h=new Set;try{for(var f=(0,T.Ju)(s),p=f.next();!p.done;p=f.next()){var g=(0,T.zs)(p.value,2),m=g[0],v=g[1],y=l.get(m);
13if(void 0!==y){var b=a.get(m),w=u.get(m);!(b>=w)&&(v<y?d.add(m):y<v&&h.add(m))}}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}var S=new Set;if(d.size>0||h.size>0)for(var k=!0;k;){k=!1;try{for(var x=(n=void 0,(0,T.Ju)(c)),E=x.next();!E.done;E=x.next()){var C=(0,T.zs)(E.value,2),_=C[0],O=C[1];if(!d.has(_)&&!h.has(_)&&!S.has(_)&&(d.has(O)||h.has(O)||S.has(O))){var I=l.get(_),R=s.get(_);void 0!==I&&void 0!==R&&I<R?h.add(_):void 0!==I&&void 0!==R&&I===R?S.add(_):d.add(_),k=!0}}}catch(e){n={error:e}}finally{try{E&&!E.done&&(i=x.return)&&i.call(x)}finally{if(n)throw n.error}}}var A=d.size>0||h.size>0||S.size>0,P=[];e.forEach(function(e,t){var r,n;try{for(var i=(0,T.Ju)(e.data.removes),o=i.next();!o.done;o=i.next()){var a=o.value;!(d.has(a.id)||h.has(a.id)&&t>=s.get(a.id))&&(S.has(a.id)&&(d.has(a.parentId)||h.has(a.parentId)||S.has(a.parentId))||P.push(a))}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}});var M=e.flatMap(function(e){return e.data.adds}),N=e.flatMap(function(e){return e.data.texts}),D=e.flatMap(function(e){return e.data.attributes}),L={source:ew.Mutation,removes:P,adds:A?M.filter(function(e){return!d.has(e.node.id)&&!h.has(e.node.id)&&!S.has(e.node.id)}):M,texts:A?N.filter(function(e){return!d.has(e.id)&&!h.has(e.id)&&!S.has(e.id)}):N,attributes:A?D.filter(function(e){return!d.has(e.id)&&!h.has(e.id)&&!S.has(e.id)}):D};return(0,T.Cl)((0,T.Cl)({},o),{data:L})}(e.slice(r,n)):e[r]),r=n}return t}(e.slice(o,a).map(function(e){return e.event}));try{for(var u=(t=void 0,(0,T.Ju)(l)),c=u.next();!c.done;c=u.next()){var d=c.value;i.push({event:d,sessionId:s})}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}o=a}return i},e}(),eL="Session replay event batch rejected due to exceeded retry count",eU="Failed to store session replay events in IndexedDB",ej="1.39.0",eF=function(){function e(e){var t=e.trackServerUrl,r=e.loggerProvider,n=e.payloadBatcher,i=e.workerScript,o=this;if(this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.sendIdCounter=0,this.pendingWorkerRequests=new Map,this.loggerProvider=r,this.payloadBatcher=n||function(e){return e},this.trackServerUrl=t,i)try{var s=new Blob([i],{type:"application/javascript"}),a=URL.createObjectURL(s),l=new Worker(a);l.onerror=function(e){var t,n;e.preventDefault(),r.error("Track destination worker failed, falling back to main-thread sending: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),l.terminate(),o.worker=void 0;try{for(var i=(0,T.Ju)(o.pendingWorkerRequests),s=i.next();!s.done;s=i.next()){var a=(0,T.zs)(s.value,2)[1];r.warn("Session replay event send failed due to worker crash: ".concat(e.message)),a.resolve()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}o.pendingWorkerRequests.clear()},l.onmessage=function(e){var t=e.data;if("log"===t.type)r.log(t.message);else if("warn"===t.type)r.warn(t.message);else if("complete"===t.type){var n=o.pendingWorkerRequests.get(t.id);n&&(o.completeRequest({context:n.context}),n.resolve(),o.pendingWorkerRequests.delete(t.id))}},this.worker=l}catch(e){r.error("Failed to create track destination worker, falling back to main-thread sending:",e)}}return e.prototype.sendEventsList=function(e){this.addToQueue((0,T.Cl)((0,T.Cl)({},e),{attempts:0,timeout:0}))},e.prototype.sendBeacon=function(e){var t,r,n=e.events,i=e.sessionId,o=e.deviceId,s=e.apiKey,a=e.serverZone,l=function(e){return new Blob([e]).size},u=n,c=JSON.stringify({version:2,events:u});if(l(c)>65536){for(var d=0,h=u.length;d<h;){var f=Math.floor((d+h+1)/2);65536>=l(JSON.stringify({version:2,events:u.slice(0,f)}))?d=f:h=f-1}c=JSON.stringify({version:2,events:u=u.slice(0,d)}),this.loggerProvider.warn("sendBeacon payload exceeded 64 KB limit, trimmed from ".concat(n.length," to ").concat(u.length," events"))}if(0!==u.length){var p=new URLSearchParams({device_id:o,session_id:String(i),type:"replay",api_key:s}),g="".concat(eM(a,this.trackServerUrl),"?").concat(p.toString()),m=(0,Y.m)();
13try{var v=new Blob([c],{type:"application/json"}),y=null==(r=null==(t=null==m?void 0:m.navigator)?void 0:t.sendBeacon)?void 0:r.call(t,g,v);!1===y&&this.loggerProvider.warn("sendBeacon failed to queue session replay payload")}catch(e){}}},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.filter(function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:eL}),!1)}).forEach(function(t){e.queue=e.queue.concat(t),e.schedule(0)})},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,T.sH)(this,void 0,void 0,function(){var t,r,n,i,o,s;return(0,T.YH)(this,function(a){switch(a.label){case 0:t=this.queue,this.queue=[],this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),a.label=1;case 1:a.trys.push([1,6,7,8]),n=(r=(0,T.Ju)(t)).next(),a.label=2;case 2:if(n.done)return[3,5];return i=n.value,[4,this.send(i,e)];case 3:a.sent(),a.label=4;case 4:return n=r.next(),[3,2];case 5:return[3,8];case 6:return o={error:a.sent()},[3,8];case 7:try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(o)throw o.error}return[7];case 8:return[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,T.sH)(this,void 0,void 0,function(){var r,n,i,o;return(0,T.YH)(this,function(s){return(r=e.apiKey)?(n=e.deviceId)?0===(i=this.payloadBatcher({version:1,events:e.events})).events.length?(this.completeRequest({context:e}),[2]):(o=this.worker)?[2,this.sendViaWorker(o,e,i,t)]:[2,this.sendOnMainThread(r,n,e,i,t)]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})]})})},e.prototype.sendViaWorker=function(e,t,r,n){return(0,T.sH)(this,void 0,void 0,function(){var i,o=this;return(0,T.YH)(this,function(s){return i="".concat(++this.sendIdCounter),[2,new Promise(function(s){var a;o.pendingWorkerRequests.set(i,{context:t,resolve:s}),e.postMessage({type:"send",id:i,payload:r,useRetry:n,context:{apiKey:t.apiKey,deviceId:t.deviceId,sessionId:t.sessionId,events:t.events,eventType:t.type,flushMaxRetries:null!=(a=t.flushMaxRetries)?a:0,sampleRate:t.sampleRate,serverZone:t.serverZone,trackServerUrl:o.trackServerUrl,version:t.version,currentUrl:et(),sdkVersion:ej}})})]})})},e.prototype.sendOnMainThread=function(e,t,r,n,i){var o,s,a,l;return(0,T.sH)(this,void 0,void 0,function(){var u,c,d,h,f,p,g,m,v,y,b,w,S;return(0,T.YH)(this,function(k){switch(k.label){case 0:u=et(),c=ej,d=r.sampleRate,h=new URLSearchParams({device_id:t,session_id:"".concat(r.sessionId),type:"".concat(r.type)}),f="".concat(null!=(s=null==(o=r.version)?void 0:o.type)?s:"standalone","/").concat(null!=(l=null==(a=r.version)?void 0:a.version)?l:c),k.label=1;case 1:if(k.trys.push([1,9,,10]),p=JSON.stringify(n),!((g=(0,Y.m)())&&"CompressionStream"in g))return[3,3];return[4,function(e,t){return(0,T.sH)(this,void 0,void 0,function(){var r,n,i,o,s,a,l,u,c,d,h,f,p=this;return(0,T.YH)(this,function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),n=(r=new t.CompressionStream("gzip")).writable.getWriter(),i=r.readable.getReader(),o=[],s=(0,T.sH)(p,void 0,void 0,function(){var e,t,r;return(0,T.YH)(this,function(n){switch(n.label){case 0:return[4,i.read()];case 1:if(t=(e=n.sent()).done,r=e.value,t)return[3,3];o.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,n.write(new TextEncoder().encode(e))];case 1:return g.sent(),[4,n.close()];case 2:return g.sent(),[4,s];case 3:g.sent(),a=new Uint8Array(o.reduce(function(e,t){return e+t.length},0)),l=0;try{for(c=(u=(0,T.Ju)(o)).next();!c.done;c=u.next())d=c.value,a.set(d,l),l+=d.length}catch(e){h={error:e}}finally{try{c&&!c.done&&(f=u.return)&&f.call(u)}finally{if(h)throw h.error}}return[2,a];case 4:return g.sent(),[2,null];case 5:return[2]}})})}(p,g)];case 2:return v=k.sent(),[3,4];case 3:v=null,k.label=4;case 4:return m=v,y={headers:(0,T.Cl)({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(e),"X-Client-Version":c,"X-Client-Library":f,"X-Client-Url":u.substring(0,1e3),"X-Client-Sample-Rate":"".concat(d),"X-Sampling-Hash-Alg":"xxhash32"},m?{"Content-Encoding":"gzip"}:{}),body:null!=m?m:p,method:"POST"},[4,fetch("".concat(eM(r.serverZone,this.trackServerUrl),"?").concat(h.toString()),y)];case 5:if(null===(b=k.sent()))return this.completeRequest({context:r,err:"Unexpected error occurred"}),[2];if(i)return[3,6];w="";try{w=JSON.stringify(b.body,null,2)}catch(e){}return this.completeRequest({context:r,success:"".concat(b.status,": ").concat(w)}),[3,8];case 6:return[4,this.handleReponse(b.status,r)];case 7:k.sent(),k.label=8;case 8:return[3,10];case 9:return S=k.sent(),this.completeRequest({context:r,err:S}),[3,10];case 10:return[2]}})})},e.prototype.handleReponse=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(r){switch(r.label){case 0:switch(new P().buildStatus(e)){case o.Success:return[3,1];case o.Failed:case o.Timeout:case o.RateLimit:return[3,2]}return[3,4];case 1:return this.handleSuccessResponse(t),[3,7];case 2:return[4,this.handleOtherResponse(t)];case 3:case 5:return r.sent(),[3,7];case 4:if(499!==e)return[3,6];return[4,this.handleOtherResponse(t)];case 6:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"}),r.label=7;case 7:return[2]}})})},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t;return(0,T.YH)(this,function(r){switch(r.label){case 0:if(t=Math.random()*e.attempts*this.retryTimeout,e.attempts++,e.attempts>(e.flushMaxRetries||0))return this.completeRequest({context:e,err:eL}),[2];return[4,new Promise(function(e){return setTimeout(e,t)})];case 1:return r.sent(),[4,this.send(e,!0)];case 2:return r.sent(),[2]}})})},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,n=e.success;t.onComplete(),r?this.loggerProvider.warn(r):n&&this.loggerProvider.log(n)},e}
13(),eB=r(48862),eH=function(){function e(e){var t,r,n,i=this;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=i.getStringSize(t);return i.getEventsArraySize(e)+r>=i.maxPersistedEventsSize||Date.now()-i.timeAtLastSplit>i.interval&&!!e.length&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!=(t=e.minInterval)?t:this.minInterval,this.maxInterval=null!=(r=e.maxInterval)?r:this.maxInterval,this.maxPersistedEventsSize=null!=(n=e.maxPersistedEventsSize)?n:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){return e.length},e.prototype.getEventsArraySize=function(e){var t,r,n=0;try{for(var i=(0,T.Ju)(e),o=i.next();!o.done;o=i.next()){var s=o.value;n+=this.getStringSize(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n+(2+Math.max(0,e.length-1)+2*e.length)},e}(),ez=function(e,t,r){"object"==typeof r&&null!==r&&"AbortError"===r.name?e.debug(t):e.warn(t)},eq="sessionCurrentSequence",eV="sequencesToSend",e$=function(e){var t,r;return e.objectStoreNames.contains(eq)||(r=e.createObjectStore(eq,{keyPath:"sessionId"})),e.objectStoreNames.contains(eV)||(t=e.createObjectStore(eV,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},eW=function(e){function t(t){var r,n=this;return(n=e.call(this,t)||this).consecutiveFailures=0,n.hasTriggeredFallback=!1,n.getSequencesToSend=function(){return(0,T.sH)(n,void 0,void 0,function(){var e,t,r,n,i,o,s,a,l=this;return(0,T.YH)(this,function(u){switch(u.label){case 0:e=!1,u.label=1;case 1:return u.trys.push([1,6,,7]),t=[],(r=this.db.transaction("sequencesToSend")).done.catch(function(t){e||ez(l.loggerProvider,"".concat(eU,": ").concat(t),t)}),[4,r.store.openCursor()];case 2:n=u.sent(),u.label=3;case 3:if(!n)return[3,5];return o=(i=n.value).sessionId,s=i.events,t.push({events:s,sequenceId:n.key,sessionId:o}),[4,n.continue()];case 4:return n=u.sent(),[3,3];case 5:return this.recordSuccess(),[2,t];case 6:return a=u.sent(),e=!0,ez(this.loggerProvider,"".concat(eU,": ").concat(a),a),this.recordFailure(),[3,7];case 7:return[2,void 0]}})})},n.storeCurrentSequence=function(e){return(0,T.sH)(n,void 0,void 0,function(){var t,r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.db.get(eq,e)];case 1:if(!(t=i.sent()))return this.recordSuccess(),[2,void 0];return[4,this.db.put(eV,{sessionId:e,events:t.events})];case 2:return r=i.sent(),[4,this.db.put(eq,{sessionId:e,events:[]})];case 3:return i.sent(),this.recordSuccess(),[2,(0,T.Cl)((0,T.Cl)({},t),{sessionId:e,sequenceId:r})];case 4:return n=i.sent(),ez(this.loggerProvider,"".concat(eU,": ").concat(n),n),this.recordFailure(),[3,5];case 5:return[2,void 0]}})})},n.addEventToCurrentSequence=function(e,t){return(0,T.sH)(n,void 0,void 0,function(){var r,n,i,o,s,a,l=this;return(0,T.YH)(this,function(u){switch(u.label){case 0:r=!1,u.label=1;case 1:return u.trys.push([1,9,,10]),(n=this.db.transaction([eq,eV],"readwrite")).done.catch(function(e){r||ez(l.loggerProvider,"".concat(eU,": ").concat(e),e)}),[4,n.objectStore(eq).get(e)];case 2:if(i=u.sent())return[3,4];return[4,n.objectStore(eq).put({sessionId:e,events:[t]})];case 3:case 5:return u.sent(),this.recordSuccess(),[2,void 0];case 4:if(this.shouldSplitEventsList(i.events,t))return[3,6];return[4,n.objectStore(eq).put({sessionId:e,events:i.events.concat(t)})];case 6:return o=i.events,[4,n.objectStore(eq).put({sessionId:e,events:[t]})];case 7:return u.sent(),[4,n.objectStore(eV).put({sessionId:e,events:o})];case 8:return s=u.sent(),this.recordSuccess(),[2,{events:o,sessionId:e,sequenceId:s}];case 9:return a=u.sent(),r=!0,ez(this.loggerProvider,"".concat(eU,": ").concat(a),a),this.recordFailure(),[3,10];case 10:return[2,void 0]}})})},n.storeSendingEvents=function(e,t){return(0,T.sH)(n,void 0,void 0,function(){var r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.db.put(eV,{sessionId:e,events:t})];case 1:return r=i.sent(),this.recordSuccess(),[2,r];case 2:return n=i.sent(),ez(this.loggerProvider,"".concat(eU,": ").concat(n),n),this.recordFailure(),[3,3];case 3:return[2,void 0]}})})},n.cleanUpSessionEventsStore=function(e,t){return(0,T.sH)(n,void 0,void 0,function(){var e;return(0,T.YH)(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete(eV,t)];case 2:return r.sent(),this.recordSuccess(),[3,4];case 3:return e=r.sent(),ez(this.loggerProvider,"".concat(eU,": ").concat(e),e),this.recordFailure(),[3,4];case 4:return[2]}})})},n.db=t.db,n.onPersistentFailure=t.onPersistentFailure,n.consecutiveFailureThreshold=null!=(r=t.consecutiveFailureThreshold)?r:3,n}return(0,T.C6)(t,e),t.prototype.recordFailure=function(){var e;this.consecutiveFailures++,!this.hasTriggeredFallback&&this.consecutiveFailures>=this.consecutiveFailureThreshold&&(this.hasTriggeredFallback=!0,null==(e=this.onPersistentFailure)||e.call(this))},t.prototype.recordSuccess=function(){this.consecutiveFailures=0},t.new=function(e,r){return(0,T.sH)(this,void 0,void 0,function(){var n,i,o;return(0,T.YH)(this,function(s){switch(s.label){case 0:var a;return s.trys.push([0,2,,3]),n="replay"===e?"":"_".concat(e),[4,(a="".concat(r.a
13piKey.substring(0,10),"_amp_session_replay_events").concat(n),(0,T.sH)(void 0,void 0,void 0,function(){return(0,T.YH)(this,function(e){switch(e.label){case 0:return[4,(0,eB.P2)(a,1,{upgrade:e$})];case 1:return[2,e.sent()]}})}))];case 1:return i=s.sent(),[2,new t((0,T.Cl)((0,T.Cl)({},r),{db:i}))];case 2:return o=s.sent(),ez(r.loggerProvider,"".concat(eU,": ").concat(o),o),[3,3];case 3:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t,r,n,i,o,s;return(0,T.YH)(this,function(a){switch(a.label){case 0:if(!e)return[3,2];return[4,this.db.get("sessionCurrentSequence",e)];case 1:if(!(t=a.sent()))return[2,void 0];return[2,[t]];case 2:r=[],a.label=3;case 3:return a.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=(n=T.Ju.apply(void 0,[a.sent()])).next(),a.label=5;case 5:if(i.done)return[3,7];t=i.value,r.push(t),a.label=6;case 6:return i=n.next(),[3,5];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 10:return[2,r]}})})},t}(eH),eK=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return(0,T.C6)(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=(0,T.fX)([],(0,T.zs)(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.getSequencesToSend=function(){return(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(e){return[2,Object.entries(this.finalizedSequences).map(function(e){var t=(0,T.zs)(e,2),r=t[0],n=t[1],i=n.sessionId,o=n.events;return{sequenceId:Number(r),sessionId:i,events:o}})]})})},t.prototype.storeCurrentSequence=function(e){return(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){var r;return(0,T.YH)(this,function(n){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),[2,r]})})},t.prototype.storeSendingEvents=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(eH),eJ=function(e){var t=e.config,r=e.minInterval,n=e.maxInterval,i=e.type,o=e.payloadBatcher,s=e.storeType,a=e.trackDestinationWorkerScript;return(0,T.sH)(void 0,void 0,void 0,function(){var e,l,u,c,d,h,f,p,g,m;function v(t){return void 0===t&&(t=!1),(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(r){return[2,e.flush(t)]})})}return(0,T.YH)(this,function(y){switch(y.label){case 0:if(e=new eF((0,T.Cl)((0,T.Cl)({},t),{loggerProvider:t.loggerProvider,payloadBatcher:o,workerScript:a})),l=function(){return new eK({loggerProvider:t.loggerProvider,maxInterval:n,minInterval:r})},c=!1,"idb"!==s)return[3,2];return[4,(0,T.sH)(void 0,void 0,void 0,function(){var e;return(0,T.YH)(this,function(o){switch(o.label){case 0:return[4,eW.new(i,{loggerProvider:t.loggerProvider,minInterval:r,maxInterval:n,apiKey:t.apiKey,onPersistentFailure:function(){(0,T.sH)(void 0,void 0,void 0,function(){var e,r,n;return(0,T.YH)(this,function(i){switch(i.label){case 0:if(!c)return[2];if(c=!1,t.loggerProvider.warn("IDB store is experiencing repeated failures; falling back to in-memory event store."),!u)return[3,2];return[4,d.getSequencesToSend()];case 1:return r=i.sent(),[3,3];case 2:r=void 0,i.label=3;case 3:return e=r,d=l(),e&&u&&(n=u,e.forEach(function(e){m({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})})),[2]}})})}})];case 1:if(!(e=o.sent()))return t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,l()];return c=!0,[2,e]}})})];case 1:return h=y.sent(),[3,3];case 2:h=l(),y.label=3;case 3:return d=h,f=[],p=0,g=function(e){if(!(e<=p)){var t=Math.min(e-p,f.length);t>0&&(f.splice(0,t),p=e)}},m=function(r){var n=r.events,o=r.sessionId,s=r.deviceId,a=r.sequenceId;t.debugMode&&es().then(function(e){var r=e.totalStorageSize,n=e.percentOfQuota,i=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(n,"%, usage details: ").concat(i))}).catch(function(){}),e.sendEventsList({events:n,sessionId:o,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:s,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:i,onComplete:function(){return(0,T.sH)(void 0,void 0,void 0,function(){return(0,T.YH)(this,function(e){switch(e.label){case 0:return[4,d.cleanUpSessionEventsStore(o,a)];case 1:return e.sent(),[2]}})})}})},[2,{sendCurrentSequenceEvents:function(e){var r=e.sessionId,n=e.deviceId;u=n;var i=p+f.length;d.storeCurrentSequence(r).then(function(e){e&&(g(i),m({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n}))}).catch(function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})},addEvent:function(e){var r=e.event,n=e.sessionId,i=e.deviceId;u=i;var o=p+f.length;f.push(r.data),d.addEventToCurrentSequence(n,r.data).then(function(e){e&&(g(o),m({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i}))}).catch(function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)})},sendStoredEvents:function(e){var t=e.deviceId;return(0,T.sH)(void 0,void 0,void 0,function(){var e;return(0,T.YH)(this,function(r){switch(r.label){case 0:return u=t,[4,d.getSequencesToSend()];case 1:return(e=r.sent())&&e.forEach(function(e){m({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]}})})},flush:v,getBeaconEvents:function(){return(0,T.fX)([],(0,T.zs)(f),!1)},trackDestination:e}]}})})},eY=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach(function(e){r.set(e.name,e.manager)}),this.managers=r}return e.prototype.sendStoredEvents=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t;return(0,T.YH)(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEac
13h(function(r){t.push(r.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,r=e.sessionId,n=e.event,i=e.deviceId;null==(t=this.managers.get(n.type))||t.addEvent({sessionId:r,event:n,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})})},e.prototype.flush=function(e){return(0,T.sH)(this,void 0,void 0,function(){var t;return(0,T.YH)(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEach(function(r){t.push(r.flush(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e}();function eG(e,t,r){for(var n=null,i=[],o=e,s=0;o&&"break"!==function(){var e,a,l,u,c=new Date().getTime()-f.getTime();if(void 0!==d.timeoutMs&&c>d.timeoutMs)throw Error("Timeout: Can't find a unique selector after ".concat(c,"ms"));var h=e4((e=o.getAttribute("id"))&&d.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||e4.apply(void 0,(0,T.fX)([],(0,T.zs)(Array.from(o.attributes).filter(function(e){return d.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||e4.apply(void 0,(0,T.fX)([],(0,T.zs)(Array.from(o.classList).filter(d.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||e4((a=o.tagName.toLowerCase(),d.tagName(a)?{name:a,penalty:2}:null))||[e1()],p=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}(o);if("all"==t)p&&(h=h.concat(h.filter(e3).map(function(e){return e2(e,p)})));else if("two"==t)h=h.slice(0,1),p&&(h=h.concat(h.filter(e3).map(function(e){return e2(e,p)})));else if("one"==t){var g=(0,T.zs)(h=h.slice(0,1),1)[0];p&&e3(g)&&(h=[e2(g,p)])}else"none"==t&&(h=[e1()],p&&(h=[e2(h[0],p)]));try{for(var m=(l=void 0,(0,T.Ju)(h)),v=m.next();!v.done;v=m.next()){var g=v.value;g.level=s}}catch(e){l={error:e}}finally{try{v&&!v.done&&(u=m.return)&&u.call(m)}finally{if(l)throw l.error}}if(i.push(h),i.length>=d.seedMinLength&&(n=eX(i,r)))return"break";o=o.parentElement,s++}(););return(n||(n=eX(i,r)),!n&&r)?r():n}function eX(e,t){var r,n,i=e5(function e(t,r){var n,i,o,s,a;return void 0===r&&(r=[]),(0,T.YH)(this,function(l){switch(l.label){case 0:if(!(t.length>0))return[3,9];l.label=1;case 1:l.trys.push([1,6,7,8]),i=(n=(0,T.Ju)(t[0])).next(),l.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,(0,T.Ju)(e(t.slice(1,t.length),r.concat(o)))];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s={error:l.sent()},[3,8];case 7:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,r];case 10:l.sent(),l.label=11;case 11:return[2]}})}(e));if(i.length>d.threshold)return t?t():null;try{for(var o=(0,T.Ju)(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(e0(a))return a}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function eQ(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var i=e[n].level||0;r=t.level===i-1?"".concat(e[n].name," > ").concat(r):"".concat(e[n].name," ").concat(r),t=e[n]}return r}function eZ(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function e0(e){var t=eQ(e);switch(h.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function e1(){return{name:"*",penalty:3}}function e2(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function e3(e){return"html"!==e.name&&!e.name.startsWith("#")}function e4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(e6);return r.length>0?r:null}function e6(e){return null!=e}function e5(e){return(0,T.fX)([],(0,T.zs)(e),!1).sort(function(e,t){return eZ(e)-eZ(t)})}var e8=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&n.push(t)}),{version:t,events:n}},e9=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)}),{version:t,events:Object.values(n.reduce(function(e,t){var r=t.x,n=t.y,i=t.selector,o=t.timestamp,s=o-o%36e5,a="".concat(r,":").concat(n,":").concat(null!=i?i:"",":").concat(s);return e[a]?e[a].count+=1:e[a]=(0,T.Cl)((0,T.Cl)({},t),{timestamp:s,count:1}),e},{}))}},e7=function(e,t){var r=this;this.createHook=function(e){var t=e.eventsManager,n=e.sessionId,i=e.deviceIdFn,o=e.mirror,s=e.ugcFilterRules,a=e.performanceOptions;return function(e){if(e.type!==eS.Click)return;var l,u=(0,Y.m)();
13if(u){var c=u.location,p=u.innerHeight,g=u.innerWidth;if(c){var m=e.x,v=e.y;if(void 0!==m&&void 0!==v){var y=o.getNode(e.id);if(y)try{l=function(e,t){if(f=new Date,e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r,n,i={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};r=(d=(0,T.Cl)((0,T.Cl)({},i),t)).root,n=i,h=r.nodeType===Node.DOCUMENT_NODE?r:r===n.root?r.ownerDocument:r;var o=eG(e,"all",function(){return eG(e,"two",function(){return eG(e,"one",function(){return eG(e,"none")})})});if(o){var s=e5(function e(t,r,n){var i,o,s;return void 0===n&&(n={counter:0,visited:new Map}),(0,T.YH)(this,function(a){switch(a.label){case 0:if(!(t.length>2&&t.length>d.optimizedMinLength))return[3,5];i=1,a.label=1;case 1:var l,u;if(!(i<t.length-1))return[3,5];if(n.counter>d.maxNumberOfTries||(n.counter+=1,(o=(0,T.fX)([],(0,T.zs)(t),!1)).splice(i,1),s=eQ(o),n.visited.has(s)))return[2];if(!(e0(o)&&(l=o,u=r,h.querySelector(eQ(l))===u)))return[3,4];return[4,o];case 2:return a.sent(),n.visited.set(s,!0),[5,(0,T.Ju)(e(o,r,n))];case 3:a.sent(),a.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(o,e));return s.length>0&&(o=s[0]),eQ(o)}throw Error("Selector was not found.")}(y,a)}catch(e){r.logger.debug("error resolving selector from finder")}var b=eo(c.href,s),w={x:m+r.scrollWatcher.currentScrollX,y:v+r.scrollWatcher.currentScrollY,selector:l,viewportHeight:p,viewportWidth:g,pageUrl:b,timestamp:Date.now(),type:"click"},S=i();S&&t.addEvent({sessionId:n,event:{type:"interaction",data:JSON.stringify(w)},deviceId:S})}}}}},this.logger=e,this.scrollWatcher=t};function te(){var e=(0,Y.m)();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||0}function tt(){var e=(0,Y.m)();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||0}var tr=function(){function e(e,t){var r=(0,Y.m)();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=eM(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var r=this.context,n=r.sessionId,i=r.type,o=new URLSearchParams({device_id:e,session_id:String(n),type:String(i),api_key:this.apiKey}),s="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(s,t)||this.sendXhr(s,t)},e}(),tn=function(){function e(e,t){var r=this;this.timestamp=Date.now(),this.hook=function(e){r.update(e)},this.send=function(e){return function(t){var n,i,o,s,a=e(),l=(0,Y.m)();if(l&&a){var u=null!=(n=l.scrollX)?n:0,c=null!=(i=l.scrollY)?i:0;(u>0||c>0)&&r.update({id:1,x:u,y:c}),r.transport.send(a,{version:1,events:[{maxScrollX:r._maxScrollX,maxScrollY:r._maxScrollY,maxScrollWidth:r._maxScrollWidth,maxScrollHeight:r._maxScrollHeight,viewportHeight:te(),viewportWidth:tt(),pageUrl:eo(l.location.href,null!=(s=null==(o=r.config.interactionConfig)?void 0:o.ugcFilterRules)?s:[]),timestamp:r.timestamp,type:"scroll"}]})}}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=tt(),this._maxScrollHeight=te(),this.config=t,this.transport=e}return e.default=function(t,r){return new e(new tr(t,r),r)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight}
13,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollX",{get:function(){return this._currentScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollY",{get:function(){return this._currentScrollY},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(this._currentScrollX=e.x,this._currentScrollY=e.y,e.x>this._maxScrollX){var r=tt();this._maxScrollX=e.x;var n=e.x+r;n>this._maxScrollWidth&&(this._maxScrollWidth=n),this.timestamp=t}if(e.y>this._maxScrollY){var i=te();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),ti=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId="".concat(r,"/").concat(t))},to=new function(){var e=this;this.dbs={},this.createStore=function(t){return(0,T.sH)(e,void 0,void 0,function(){return(0,T.YH)(this,function(e){switch(e.label){case 0:return[4,(0,eB.P2)(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return(0,T.sH)(e,void 0,void 0,function(){var e,r;return(0,T.YH)(this,function(n){switch(n.label){case 0:if(this.dbs&&this.dbs[t])return[2,this.dbs[t]];return e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)];case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.getTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.sessionId;return(0,T.sH)(e,void 0,void 0,function(){var e,t,o,s;return(0,T.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=a.sent(),t=String(i),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=a.sent())?void 0:o.targetingMatch];case 3:return s=a.sent(),ez(r,"Failed to get targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.sessionId,o=t.targetingMatch;return(0,T.sH)(e,void 0,void 0,function(){var e,t,s;return(0,T.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=a.sent(),t=String(i),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,a.sent()];case 3:return s=a.sent(),ez(r,"Failed to store targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.currentSessionId;return(0,T.sH)(e,void 0,void 0,function(){var e,t,o,s,a,l,u,c;return(0,T.YH)(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(n)];case 1:return e=d.sent(),t=String(i),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:s=d.sent(),a=0,d.label=3;case 3:if(!(a<s.length))return[3,6];if(l=s[a],u=Date.now()-l.lastUpdated,!(l.sessionId!==t&&u>1728e5))return[3,5];return[4,o.store.delete(l.sessionId)];case 4:d.sent(),d.label=5;case 5:return a++,[3,3];case 6:return[4,o.done];case 7:return d.sent(),[3,9];case 8:return c=d.sent(),ez(r,"Failed to clear old targeting matches for sessions: ".concat(c),c),[3,9];case 9:return[2]}})})}},ts=function(e){var t=e.sessionId,n=e.targetingConfig,i=e.loggerProvider,o=e.apiKey,s=e.targetingParams,a=e.urlChange,l=void 0!==a&&a;return(0,T.sH)(void 0,void 0,void 0,function(){var e,a,u;return(0,T.YH)(this,function(c){switch(c.label){case 0:return[4,to.clearStoreOfOldSessions({loggerProvider:i,apiKey:o,currentSessionId:t})];case 1:return c.sent(),[4,to.getTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:t})];case 2:if(!0===c.sent()&&!l)return[2,!0];e=!0,c.label=3;case 3:return c.trys.push([3,6,,7]),[4,r.e(4539).then(r.bind(r,41765))];case 4:return[4,(0,c.sent().evaluateTargeting)((0,T.Cl)((0,T.Cl)({},s),{flag:n,sessionId:"string"==typeof t?parseInt(t,10):t,apiKey:o,loggerProvider:i}))];case 5:return(a=c.sent())&&a.sr_targeting_config&&(e="on"===a.sr_targeting_config.key),to.storeTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:t,targetingMatch:e}),[3,7];case 6:return u=c.sent(),i.warn(u.message),[3,7];case 7:return[2,e]}})})};function ta(e,t){return(e<<t|e>>>32-t)>>>0}function tl(e,t){return Math.imul(e=ta(e=e+Math.imul(t,0x85ebca77)>>>0,13),0x9e3779b1)>>>0}function tu(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}var tc="__amplitude_url_tracking_patched__",td=new WeakMap;function th(e,t,r){if(void 0===r&&(r={}),!(null==e?void 0:e.location))return function(){};var n=r.enablePolling,i=r.pollingInterval;if(void 0!==n&&n){var o=function(){var t;return null!=(t=e.location.href)?t:""},s=o(),a=e.setInterval(function(){var e=o();e!==s&&(s=e,t(e))},void 0===i?1e3:i);return function(){null!=a&&e.clearInterval(a)}}var l=td.get(e);if(!l){var u=void 0,c=new Set,d=function(){var t;return null!=(t=e.location.href)?t:""},h=function(){var e=d();
13(void 0===u||e!==u)&&(u=e,c.forEach(function(t){return t(e)}))},f=function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t);return h(),n};return t[tc]=!0,t},p=e.history;if(null==p?void 0:p.pushState){var g=Reflect.get(p,"pushState");g[tc]||(p.pushState=f(g))}if(null==p?void 0:p.replaceState){var m=Reflect.get(p,"replaceState");m[tc]||(p.replaceState=f(m))}l={callbacks:c,notify:h,onPopStateOrHashChange:function(){return h()},listenersAttached:!1},td.set(e,l)}var v=l;return v.listenersAttached||(e.addEventListener("popstate",v.onPopStateOrHashChange),e.addEventListener("hashchange",v.onPopStateOrHashChange),v.listenersAttached=!0),v.callbacks.add(t),function(){v.callbacks.delete(t),0===v.callbacks.size&&v.listenersAttached&&(e.removeEventListener("popstate",v.onPopStateOrHashChange),e.removeEventListener("hashchange",v.onPopStateOrHashChange),v.listenersAttached=!1)}}function tf(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,r,n){var i,o,s,a=(0,T.Cl)((0,T.Cl)({},e),n),l=a.ugcFilterRules||[],u=null!=(i=a.enablePolling)&&i,c=null!=(o=a.pollingInterval)?o:1e3,d=null!=(s=a.captureDocumentTitle)&&s;if(!r)return function(){};var h=void 0,f=function(){return r.location&&r.location.href||""},p=function(){var e=r.innerHeight,t=r.innerWidth,n=r.document,i=f(),o="";return d&&(o=(null==n?void 0:n.title)||""),{href:l.length>0?eo(i,l):i,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}},g=function(){var e=f();(void 0===h||e!==h)&&(h=e,t(p()))},m=th(r,function(){return g()},u?{enablePolling:!0,pollingInterval:c}:{});return g(),function(){return m()}},options:e}}tf();var tp=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.recordFunction=null,this.recordEventsInFlight=!1,this.currentPageUrl="",this.recordEventsPendingShouldLogMetadata=null,this.urlChangeCleanup=null,this.latestUrlChangeTargetingEvaluationId=0,this.teardownEventListeners=function(t){var r=(0,Y.m)();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),t||r.addEventListener("blur",e.blurListener),t||r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),t||r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),t||r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){if(e.recordCancelCallback&&e.recordFunction)try{e.recordFunction.takeFullSnapshot(!0)}catch(t){e.loggerProvider.warn("Failed to take full snapshot on focus:",t)}else e.recordEventsInFlight||e.recordEvents(!1)},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,r,n,i){return void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),(0,T.sH)(e,void 0,void 0,function(){var e,o,s,a,l,c,d,h,f,p,g,m;return(0,T.YH)(this,function(v){switch(v.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig)if(!r)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];else this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.");if(this.lastTargetingParams=t,!((e=this.config.targetingConfig)&&!this.sessionTargetingMatch))return[3,2];return o=i?this.latestUrlChangeTargetingEvaluationId:void 0,(s=t.event)&&Object.values(u).includes(s.event_type)&&(s=void 0),a=null!=(g=null!=(h=null==(d=t.page)?void 0:d.url)?h:null==(p=null==(f=(0,Y.m)())?void 0:f.location)?void 0:p.href)?g:"",l=null!=(m=t.page)?m:""!==a?{url:a}:void 0,[4,ts({sessionId:this.identifiers.sessionId,targetingConfig:e,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:s,page:l},urlChange:i})];case 1:if(c=v.sent(),i&&void 0!==o&&o!==this.latestUrlChangeTargetingEvaluationId)return this.loggerProvider.debug("Ignoring stale URL-change targeting result #".concat(o,"; latest is #").concat(this.latestUrlChangeTargetingEvaluationId,".")),[2];this.sessionTargetingMatch=this.sessionTargetingMatch||c,this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:s,targetingParams:t},null,2)),v.label=2;case 2:if(!r)return[3,3];return this.initialize(!0),[3,5];case 3:if(!(n||!this.recordCancelCallback))return[3,5];return this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()];case 4:v.sent(),v.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n=!0),(0,T.sH)(e,void 0,void 0,function(){var e,i,o,s;return(0,T.YH)(this,function(l){switch(l.label){case 0:if(l.trys.push([0,3,,4]),e=void 0,!((i=this.config)&&t!==a.METADATA)||(e={config:ea(i),version:ej},!n))return[3,2];return[4,es()];case 1:o=l.sent(),e=(0,T.Cl)((0,T.Cl)({},o),e),l.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(t,(0,T.Cl)((0,T.Cl)({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return s=l.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",s),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null==(t=e.networkObservers)||t.stop()}catch(t){e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(t.toString()))}},this.loggerProvider=new J(new A)}return e.prototype.init=function(e,t){return ec(this._init(e,t))},e.prototype.setupUrlChangeListener=function(){var e,t,r=this;null==(e=this.urlChangeCleanup)||e.call(this);var n=(0,Y.m)();if(null==n?void 0:n.location){var i=!!(null==(t=this.config)?void 0:t.targetingConfig),o=th(n,function(e){if(r.currentPageUrl=e,i){var t=++r.latestUrlChangeTargetingEvaluationId;r.evaluateTargetingAndCapture({userProperties:{},event:void 0,page:{url:e}}
13,!1,!1,!0),r.loggerProvider.debug("Queued URL-change targeting re-evaluation #".concat(t," for ").concat(e,"."))}});this.urlChangeCleanup=function(){o(),r.urlChangeCleanup=null}}},e.prototype.getCurrentPageForTargeting=function(){var e,t,r=null==(t=null==(e=(0,Y.m)())?void 0:e.location)?void 0:t.href;return null!=r?{url:r}:void 0},e.prototype._init=function(e,t){var n,i,o,s,a,l,u,c,d,h,f;return(0,T.sH)(this,void 0,void 0,function(){var p,g,m,v,y,b,w,S,k,x,E,C,_,O,I,R,P,M,N,D=this;return(0,T.YH)(this,function(L){switch(L.label){case 0:return null==(n=this.urlChangeCleanup)||n.call(this),this.loggerProvider=new J(t.loggerProvider||new A),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.currentPageUrl=et(),this.identifiers=new ti({sessionId:t.sessionId,deviceId:t.deviceId}),p=this,[4,(0,T.sH)(void 0,void 0,void 0,function(){var r;return(0,T.YH)(this,function(n){return r=new eu(e,t),[2,new eP(new eR(e,r.loggerProvider,r.serverZone,t.configServerUrl),r)]})})];case 1:return p.joinedConfigGenerator=L.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:if(m=(g=L.sent()).joinedConfig,v=g.localConfig,y=g.remoteConfig,this.config=m,this.setMetadata(t.sessionId,m,v,y,null==(i=t.version)?void 0:i.version,ej,null==(o=t.version)?void 0:o.type),this.pageLeaveFns=[],t.sessionId&&(null==(s=this.config.interactionConfig)?void 0:s.enabled)&&(b=tn.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[b.send(this.getDeviceId.bind(this)).bind(b)],this.scrollHook=b.hook.bind(b),this.clickHandler=new e7(this.loggerProvider,b)),w=[],"idb"!==(S=this.config.storeType)||(null==(a=(0,Y.m)())?void 0:a.indexedDB)||(S="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(S," for event storage.")),E=(0,Y.m)(),!(this.config.useWebWorker&&E&&E.Worker))return[3,4];return[4,r.e(4539).then(r.bind(r,60457))];case 3:_=(C=L.sent()).compressionScript,O=C.trackDestinationScript,k=_,x=O,L.label=4;case 4:return L.trys.push([4,6,,7]),[4,eJ({config:this.config,type:"replay",storeType:S,trackDestinationWorkerScript:x})];case 5:return I=L.sent(),w.push({name:"replay",manager:I}),[3,7];case 6:return R=L.sent(),this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(R.toString())),[3,7];case 7:if(!(null==(l=this.config.interactionConfig)?void 0:l.enabled))return[3,11];P=this.config.interactionConfig.batch?e9:e8,L.label=8;case 8:return L.trys.push([8,10,,11]),[4,eJ({config:this.config,type:"interaction",minInterval:null!=(u=this.config.interactionConfig.trackEveryNms)?u:3e4,maxInterval:6e4,payloadBatcher:P,storeType:S,trackDestinationWorkerScript:x})];case 9:return M=L.sent(),w.push({name:"interaction",manager:M}),[3,11];case 10:return R=L.sent(),this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(R.toString())),[3,11];case 11:return this.eventsManager=new(eY.bind.apply(eY,(0,T.fX)([void 0],(0,T.zs)(w),!1))),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new eD(this.eventsManager,this.config,this.getDeviceId(),k,function(){return D.sendEvents()}),this.pageLeaveFns=(0,T.fX)((0,T.fX)([],(0,T.zs)(this.pageLeaveFns),!1),[function(){if(D.config&&(null==(e=D.identifiers)?void 0:e.sessionId)&&I){var e,t=I.getBeaconEvents();if(t.length){var r=D.getDeviceId();r&&I.trackDestination.sendBeacon({events:t,sessionId:D.identifiers.sessionId,deviceId:r,apiKey:D.config.apiKey,serverZone:D.config.serverZone})}}}],!1),[4,this.initializeNetworkObservers()];case 12:return L.sent(),(null==(c=(0,Y.m)())?void 0:c.opener)&&(!function(e,t){if(!0!==e[em]){e[em]=!0;var r="https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.3.js.gz",n=null,i=function(t,r){var n,i;"background-capture-complete"===t&&(null==(i=null==(n=e.logger)?void 0:n.debug)||i.call(n,"Background capture complete"),e.notify({action:"background-capture-complete",data:r}))};e.registerActionHandler("initialize-background-capture",function(){null==(o=null==(t=e.logger)?void 0:t.debug)||o.call(t,"Initializing background capture (external script)");var t,o,s=new URL(r,e.endpoint).toString();e.loadScriptOnce(s).then(function(){var t,r,o;null==(r=null==(t=e.logger)?void 0:t.debug)||r.call(t,"Backgroun
13d capture script loaded (external)"),n=null==(o=null==window?void 0:window.amplitudeBackgroundCapture)?void 0:o.call(window,{messenger:e,onBackgroundCapture:i}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null==(e=null==n?void 0:n.close)||e.call(n),n=null})}}(N=function(e){var t=(0,Y.m)(),r=null==t?void 0:t[ep];if("object"==typeof r&&null!==r&&ef in r&&!0===r[ef])return r;var n=new eg(void 0);return t&&(t[ep]=n),n}()),N.setup((0,T.Cl)({logger:this.loggerProvider},this.config.serverZone&&{endpoint:eh[this.config.serverZone]}))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:t.userProperties,page:this.getCurrentPageForTargeting()},!0)];case 13:return L.sent(),(this.config.targetingConfig||(null!=(f=null==(h=null==(d=this.config.privacyConfig)?void 0:d.urlMaskLevels)?void 0:h.length)?f:0)>0)&&this.setupUrlChangeListener(),[2]}})})},e.prototype.setSessionId=function(e,t){return ec(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,r){var n;return(0,T.sH)(this,void 0,void 0,function(){var i,o,s;return(0,T.YH)(this,function(a){switch(a.label){case 0:if(this.latestUrlChangeTargetingEvaluationId++,this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,(i=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(i),o=t||this.getDeviceId(),this.identifiers=new ti({sessionId:e,deviceId:o}),!(this.joinedConfigGenerator&&i))return[3,2];return[4,this.joinedConfigGenerator.generateJoinedConfig()];case 1:s=a.sent().joinedConfig,this.config=s,a.label=2;case 2:if(!(null==(n=this.config)?void 0:n.targetingConfig))return[3,4];return[4,this.evaluateTargetingAndCapture({userProperties:null==r?void 0:r.userProperties,page:this.getCurrentPageForTargeting()},!1,!0)];case 3:return a.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:a.sent(),a.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var n=this.getShouldRecord(),i={};return n&&((e={})[B]=r.sessionReplayId?r.sessionReplayId:null,i=e,t.debugMode&&(i[q]=JSON.stringify({appHash:ev(t.apiKey).toString()}))),this.addCustomRRWebEvent(a.GET_SR_PROPS,{shouldRecord:n,eventProperties:i},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,i},e.prototype.sendEvents=function(e){var t,r=e||(null==(t=this.identifiers)?void 0:t.sessionId),n=this.getDeviceId();this.eventsManager&&r&&n&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:n})},e.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),(0,T.sH)(this,void 0,void 0,function(){var r;return(0,T.YH)(this,function(n){return(null==(t=this.identifiers)?void 0:t.sessionId)?(r=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){if(null==(t=this.config)?void 0:t.instanceName){var e,t,r,n;n=(void 0===(e=this.config.instanceName)&&(e=N),ey.i.getInstance(e)).identityStore.getIdentity().optOut}return void 0!==n?n:null==(r=this.config)?void 0:r.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r=!1,n="",i=!1;return this.config.targetingConfig?this.sessionTargetingMatch?(n="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(n),r=!0,i=!0):(n="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(n),r=!1,i=!1):(e=this.identifiers.sessionId,t=this.config.sampleRate,function(e,t){void 0===t&&(t=0);var r,n=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<e.length){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(n=(n-55296<<10)+(i-56320)+65536,r++)}n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<65536?t.push(224|n>>12,128|n>>6&63,128|63&n):t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n)}return new Uint8Array(t)}(e),i=n.length,o=0;if(i>=16){for(var s=t+0x9e3779b1+0x85ebca77>>>0,a=t+0x85ebca77>>>0,l=t>>>0,u=t-0x9e3779b1>>>0;o<=i-16;)s=tl(s,tu(n,o)),o+=4,a=tl(a,tu(n,o)),o+=4,l=tl(l,tu(n,o)),o+=4,u=tl(u,tu(n,o)),o+=4;r=ta(s,1)+ta(a,7)+ta(l,12)+ta(u,18)>>>0}else r=t+0x165667b1>>>0;for(r=r+i>>>0;o<=i-4;)r=Math.imul(ta(r=r+Math.imul(tu(n,o),0xc2b2ae3d)>>>0,17),0x27d4eb2f)>>>0,o+=4;for(;o<i;)r=Math.imul(ta(r=r+Math.imul(n[o],0x165667b1)>>>0,11),0x9e3779b1)>>>0,o++;return r^=r>>>15,r=Math.imul(r,0x85ebca77)>>>0,r^=r>>>13,r=Math.imul(r,0xc2b2ae3d)>>>0,(r^=r>>>16)>>>0}(e.toString())%1e6/1e6<t)?(r=!0,i=!0):(n="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(n),r=!1,i=!1),this.lastShouldRecordDecision!==r&&this.config.targetingConfig&&(this.addCustomRRWebEvent(a.TARGETING_DECISION,{message:n,sessionId:this.identifiers.sessionId,matched:i,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=r),r},e.prototype.getBlockSelectors=function(){var e,t,r,n=null!=(r=null==(t=null==(e=this.config)?void 0:e.privacyConfig)?void 0:t.blockSelector)?r:[];if(0!==n.length)return n},e.prototype.getMaskTextSelectors=function(){var e,t,r=null==(e=this.config)?void 0:e.privacyConfig;if("conservative"===(r?Q(this.currentPageUrl,r):void 0)||(null==(t=null==r?void 0:r.urlMaskLevels)?void 0:t.some(function(e){return"conservative"===e.maskLevel})))return"*";var n=null==r?void 0:r.urlMaskLevels;if((null==r?void 0:r.defaultMaskLevel)==="conservative"&&n&&n.length>0)return"*";var i=null==r?void 0:r.maskSelector;if(i)return i},e.prototype.getRecordingPlugins=function(e){var t,n,i,o,s,a;return(0,T.sH)(this,void 0,void 0,function(){var l,u,c,d;return(0,T.YH)(this,function(h){switch(h.label){case 0:l=[];try{u=tf({ugcFilterRules:(null==(n=null==(t=this.config)?void 0:t.interactionConfig)?void 0:n.ugcFilterRules)||[],enablePolling:(null==(i=this.config)?void 0:i.enableUrlChangePolling)||!1,pollingInterval:null==(o=this.config)?void 0:o.urlChangePollingInterval,captureDocumentTitle:null==(s=this.config)?void 0:s.captureDocumentTitle}),l.push(u)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null==(a=null==e?void 0:e.console)?void 0:a.enabled))return[3,4];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,r.e(4539).then(r.bind(r,67743))];case 2:return c=h.sent().getRecordConsolePlugin,l.push(c({level:e.console.levels})),[3,4];case 3:return d=h.sent(),this.loggerProvider.warn("Failed to load console plugin:",d),[3,4];case 4:return[2,l.length>0?l:void 0]}})})},e.prototype.getRecordFunction=function(){return(0,T.sH)(this,void 0,void 0,function(){var e,t;return(0,T.YH)(this,function(n){switch(n.label){case 0:if(this.recordFunction)return[2,this.recordFunction];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,r.e(4539).then(r.bind(r,52295))];case 2:return e=n.sent().record,this.recordFunction=e,[2,e];case 3:return t=n.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){return void 0===e&&(e=!0),(0,T.sH)(this,void 0,void 0,function(){var t;return(0,T.YH)(this,function(r){switch(r.label){case 0:if(this.recordEventsInFlight)return this.recordEventsPendingShouldLogMetadata=e,[2];this.recordEventsInFlight=!0,r.label=1;case 1:return r.trys.push([1,,6,7]),[4,this._recordEvents(e)];case 2:r.sent(),r.label=3;case 3:if(null===this.recordEventsPendingShouldLogMetadata)return[3,5];return t=this.recordEventsPendingShouldLogMetadata,this.recordEventsPendingShouldLogMetadata=null,[4,this._recordEvents(t)];case 4:return r.sent(),[3,3];case 5:return[3,7];case 6:return this.recordEventsInFlight=!1,this.recordEventsPendingShouldLogMetadata=null,[7];case 7:return[2]}})})},e.prototype._recordEvents=function(e){var t,r,n,i,o,s,l,u;return void 0===e&&(e=!0),(0,T.sH)(this,void 0,void 0,function(){var c,d,h,f,p,g,m,v,y,b,w,S,k,x,E,C=this;return(0,T.YH)(this,function(_){switch(_.label){case 0:if(c=this.config,d=this.getShouldRecord(),h=null==(t=this.identifiers)?void 0:t.sessionId,!d||!h||!c)return[2];return this.stopRecordingEvents(),[4,this.getRecordFunction()];case 1:if(!(f=_.sent()))return[2];return[4,this.initializeNetworkObservers()];case 2:_.sent(),p=null==(r=c.loggingConfig)?void 0:r.network,g=[$,W,K,eM(c.serverZone,c.trackServerUrl)],null==(n=this.networkObservers)||n.start(function(e){g.some(function(t){return e.url.
13startsWith(t)})||C.addCustomRRWebEvent(a.FETCH_REQUEST,e)},p),m=c.privacyConfig,v=c.interactionConfig,y=c.loggingConfig,b=(null==v?void 0:v.enabled)?{mouseInteraction:this.eventsManager&&(null==(i=this.clickHandler)?void 0:i.createHook({eventsManager:this.eventsManager,sessionId:h,deviceIdFn:this.getDeviceId.bind(this),mirror:f.mirror,ugcFilterRules:null!=(o=v.ugcFilterRules)?o:[],performanceOptions:null==(s=c.performanceConfig)?void 0:s.interaction})),scroll:this.scrollHook}:{},w=(null==v?void 0:v.enabled)&&v.ugcFilterRules?v.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(h,".")),_.label=3;case 3:var O,I;return _.trys.push([3,5,,6]),S=this,k=f,E={emit:function(e){if(C.shouldOptOut()){C.loggerProvider.log("Opting session ".concat(h," out of recording due to optOut config.")),C.stopRecordingEvents(),C.sendEvents();return}e.type===eb.Meta&&(e.data.href=eo(e.data.href,w)),C.eventCompressor&&C.eventCompressor.enqueueEvent(e,h)},inlineStylesheet:c.shouldInlineStylesheet,hooks:b,maskAllInputs:!0,maskTextClass:V,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:c.applyBackgroundColorToBlockedElements,maskInputFn:ee("input",m,function(){return C.currentPageUrl}),maskTextFn:ee("text",m,function(){return C.currentPageUrl}),maskAttributeFn:(O=m,I=function(){return C.currentPageUrl},function(e,t,r){var n;return"style"!==e&&(null!=(n=null==O?void 0:O.maskAttributes)?n:[]).includes(e)&&Z("text",O,r,null==I?void 0:I())?t.replace(/[^\s]/g,"*"):t}),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,captureAdoptedStyleSheets:c.captureAdoptedStyleSheets,slimDOMOptions:{script:null==(l=c.omitElementTags)?void 0:l.script,comment:null==(u=c.omitElementTags)?void 0:u.comment},errorHandler:function(e){if(e.message.includes("insertRule")&&e.message.includes("CSSStyleSheet")||e._external_)throw e;return C.loggerProvider.warn("Error while capturing replay: ",e.toString()),!0}},[4,this.getRecordingPlugins(y)];case 4:return S.recordCancelCallback=k.apply(void 0,[(E.plugins=_.sent(),E)]),this.addCustomRRWebEvent(a.DEBUG_INFO),e&&this.addCustomRRWebEvent(a.METADATA,this.metadata),[3,6];case 5:return x=_.sent(),this.loggerProvider.warn("Failed to initialize session replay:",x),[3,6];case 6:return[2]}})})},e.prototype.getDeviceId=function(){var e;return null==(e=this.identifiers)?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null==(e=this.identifiers)?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),(0,T.sH)(this,void 0,void 0,function(){return(0,T.YH)(this,function(r){return[2,null==(t=this.eventsManager)?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){var e;null==(e=this.urlChangeCleanup)||e.call(this),this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(e,t,r,n,i,o,s){var a=(null==e?void 0:e.toString())?ev(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:n,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(s),replaySDKVersion:i,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},e.prototype.initializeNetworkObservers=function(){var e,t,n;return(0,T.sH)(this,void 0,void 0,function(){var i,o;return(0,T.YH)(this,function(s){switch(s.label){case 0:if(!((null==(n=null==(t=null==(e=this.config)?void 0:e.loggingConfig)?void 0:t.network)?void 0:n.enabled)&&!this.networkObservers))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r.e(4539).then(r.bind(r,77373))];case 2:return i=s.sent().NetworkObservers,this.networkObservers=new i,[3,4];case 3:return o=s.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",o),[3,4];case 4:return[2]}})})},e}(),tg=function(e){return function(){var t=e.config||el();return{logger:t.loggerProvider,logLevel:t.logLevel}}};let tm={init:I((O=new tp).init.bind(O),"init",tg(O)),evaluateTargetingAndCapture:I(O.evaluateTargetingAndCapture.bind(O),"evaluateTargetingAndRecord",tg(O)),setSessionId:I(O.setSessionId.bind(O),"setSessionId",tg(O)),getSessionId:I(O.getSessionId.bind(O),"getSessionId",tg(O)),getSessionReplayProperties:I(O.getSessionReplayProperties.bind(O),"getSessionReplayProperties",tg(O)),flush:I(O.flush.bind(O),"flush",tg(O)),shutdown:I(O.shutdown.bind(O),"shutdown",tg(O))};var tv=tm.init,ty=tm.setSessionId,tb=(tm.getSessionId,tm.getSessionReplayProperties);tm.flush,tm.shutdown,tm.evaluateTargetingAndCapture},49050(e,t,r){"use strict";let n;r.d(t,{aj:()=>tS});
13var i,o,s,a,l,u,c,d,h=function(e,t){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function g(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function m(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){var u=[a,l];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function b(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var w="is not",S="contains",k="does not contain",x="less",E="less or equal",C="greater",_="greater or equal",O="version less",I="version less or equal",T="version greater",R="version greater or equal",A="set is",P="set is not",M="set contains",N="set does not contain",D="set contains any",L="set does not contain any",U=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return Uint8Array.from(t)},j=function(e,t){void 0===t&&(t=0);for(var r=U(e),n=r.length,i=n>>2,o=t,s=0;s<i;s++)o=F(z(r,s<<2),o);var a=i<<2,l=0;switch(n-a){case 3:l^=r[a+2]<<16,l^=r[a+1]<<8,l^=r[a],o^=l=Math.imul(l=H(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 2:l^=r[a+1]<<8,l^=r[a],o^=l=Math.imul(l=H(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 1:l^=r[a],o^=l=Math.imul(l=H(l=Math.imul(l,-0x3361d2af),15),0x1b873593)}return B(o^=n)>>>0},F=function(e,t){var r=e,n=t;return n^=r=Math.imul(r=H(r=Math.imul(r,-0x3361d2af),15),0x1b873593),(n=Math.imul(n=H(n,13),5))+-0x19ab949c|0},B=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-0x7a143595),t^=t>>>
1313,t=Math.imul(t,-0x3d4d51cb),t^=t>>>16},H=function(e,t,r){void 0===r&&(r=32),t>r&&(t%=r);var n=(e&0xffffffff<<r-t>>>0)>>>0>>>r-t>>>0;return(e<<t|n)>>>0},z=function(e,t){return void 0===t&&(t=0),q(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},q=function(e){return(-0x1000000&e)>>>24|(0xff0000&e)>>>8|(65280&e)<<8|(255&e)<<24},V=function(e,t){var r,n;if(t&&0!==t.length){try{for(var i=v(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!=typeof e)return;e=e[s]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(null==e)return;return e}},$="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),W=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp($).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i)))return new e(n,i,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){if(this.major>e.major)return 1;if(this.major<e.major)return -1;if(this.minor>e.minor)return 1;if(this.minor<e.minor)return -1;if(this.patch>e.patch)return 1;if(this.patch<e.patch||this.preRelease&&!e.preRelease)return -1;if(!this.preRelease&&e.preRelease)return 1;if(this.preRelease&&e.preRelease){if(this.preRelease>e.preRelease)return 1;if(this.preRelease<e.preRelease)return -1}return 0},e}(),K=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,i={},o={context:e,result:i};try{for(var s=v(t),a=s.next();!a.done;a=s.next()){var l=a.value,u=this.evaluateFlag(o,l);u&&(i[l.key]=u)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e.prototype.evaluateWithTraces=function(e,t){var r,n,i={},o={},s={context:e,result:i};try{for(var a=v(t),l=a.next();!l.done;l=a.next()){var u=l.value,c=this.evaluateFlagWithTrace(s,u),d=c.variant,h=c.trace;d&&(i[u.key]=d),o[u.key]=h}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return{results:i,traces:o}},e.prototype.evaluateFlag=function(e,t){try{for(var r,n,i,o=v(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var l=p(p(p({},t.metadata),a.metadata),i.metadata);i=p(p({},i),{metadata:l});break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.prototype.evaluateFlagWithTrace=function(e,t){var r,n,i,o,s,a,l,u,c,d,h,f=[];try{for(var g=v(t.segments),m=g.next();!m.done;m=g.next()){var y=m.value;if(!y.conditions){var b=this.bucket(e,y),w=void 0!==b;f.push({segmentMetadata:y.metadata,conditionsPassed:!0,bucketed:w,bucketVariant:b,conditionResult:void 0,matched:w}),c||void 0===b||(c=t.variants[b],d=y,h=null==(l=y.metadata)?void 0:l.segmentName);continue}var S=[],k=!1;try{for(var x=(i=void 0,v(y.conditions)),E=x.next();!E.done;E=x.next()){var C=E.value,_=!0,O=[];try{for(var I=(s=void 0,v(C)),T=I.next();!T.done;T=I.next()){var R=T.value,A=V(e,R.selector),P=this.matchCondition(e,R);if(O.push({propValue:A,condition:R,matched:P}),!P){_=!1;break}}}catch(e){s={error:e}}finally{try{T&&!T.done&&(a=I.return)&&a.call(I)}finally{if(s)throw s.error}}if(S.push(O),_){k=!0;break}}}catch(e){i={error:e}}
13finally{try{E&&!E.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}var M=!1,N=void 0;k&&(N=this.bucket(e,y),M=void 0!==N),f.push({segmentMetadata:y.metadata,conditionsPassed:k,bucketed:M,bucketVariant:N,conditionResult:S,matched:k&&M}),k&&void 0!==N&&!c&&(c=t.variants[N],d=y,h=null==(u=y.metadata)?void 0:u.segmentName)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}if(c&&d){var D=p(p(p({},t.metadata),d.metadata),c.metadata);c=p(p({},c),{metadata:D})}var L={flagKey:t.key,matched:void 0!==c,matchedSegment:h,steps:f};return{variant:c,trace:L}},e.prototype.evaluateSegment=function(e,t,r){if(!r.conditions){var n=this.bucket(e,r);return void 0!==n?t.variants[n]:void 0}if(this.evaluateConditions(e,r.conditions)){var n=this.bucket(e,r);if(void 0!==n)return t.variants[n]}},e.prototype.evaluateConditions=function(e,t){var r,n,i,o;try{for(var s=v(t),a=s.next();!a.done;a=s.next()){var l=a.value,u=!0;try{for(var c=(i=void 0,v(l)),d=c.next();!d.done;d=c.next()){var h=d.value;if(!(u=this.matchCondition(e,h)))break}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}if(u)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1},e.prototype.matchCondition=function(e,t){var r=V(e,t.selector);if(null==r)return this.matchNull(t.op,t.values);var n=this.coerceStringArray(r);if(this.isSetOperator(t.op))return!!n&&this.matchSet(n,t.op,t.values);if(n)return this.matchStringsNonSet(n,t.op,t.values);var i=this.coerceString(r);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return j(e)},e.prototype.bucket=function(e,t){if(!t.bucket)return t.variant;var r,n,i,o,s=this.coerceString(V(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),l=this.getHash(a),u=l%100,c=Math.floor(l/100);try{for(var d=v(t.bucket.allocations),h=d.next();!h.done;h=d.next()){var f=h.value,p=f.range[0],g=f.range[1];if(u>=p&&u<g)try{for(var m=(i=void 0,v(f.distributions)),y=m.next();!y.done;y=m.next()){var b=y.value,w=b.range[0],S=b.range[1];if(c>=w&&c<S)return b.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case"is":case S:case x:case E:case C:case _:case O:case I:case T:case R:case A:case M:case D:return r;case w:case k:case N:case L:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case A:return this.setEquals(e,r);case P:return!this.setEquals(e,r);case M:return this.matchesSetContainsAll(e,r);case N:return!this.matchesSetContainsAll(e,r);case D:return this.matchesSetContainsAny(e,r);case L:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case"is":return this.matchesIs(e,r);case w:return!this.matchesIs(e,r);case S:return this.matchesContains(e,r);case k:return!this.matchesContains(e,r);case x:case E:case C:case _:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case O:case I:case T:case R:return this.matchesComparable(e,t,r,function(e){return W.parse(e)},this.versionComparator);case"regex match":return this.matchesRegex(e,r);case"regex does not match":return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchStringsNonSet=function(e,t,r){var n=this;return e.some(function(e){return n.matchString(e,t,r)})},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var i=v(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,i){var o=this,s=n(e),a=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?r.some(function(r){return o.comparator(e,t,r)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case x:case O:return e<r;case E:case I:return e<=r;case C:case T:return e>r;case _:case R:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case x:case O:return n<0;case E:case I:return n<=0;case C:case T:return n>0;case _:case R:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!=(t=Number(e))?t:void 0},e.prototype.coerceString=function(e){if(null!=e)return"object"==typeof e?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}
13).filter(Boolean);var r=String(e);if(r.startsWith("["))try{var n=JSON.parse(r);if(Array.isArray(n))return n.map(function(e){return t.coerceString(e)}).filter(Boolean);return}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case A:case P:case M:case N:case D:case L:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&b([],y(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var i=v(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var i=v(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e}(),J=function(e,t){var r,n,i=p({},e),o=[],s=t||Object.keys(i);try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var u=l.value,c=Y(u,i);c&&o.push.apply(o,b([],y(c),!1))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},Y=function(e,t,r){void 0===r&&(r=[]);var n,i,o=t[e];if(o){if(!o.dependencies||0===o.dependencies.length)return delete t[o.key],[o];r.push(o.key);var s=[],a=function(e){if(r.some(function(t){return t===e}))throw Error("Detected a cycle between flags ".concat(r));var n=Y(e,t,r);n&&s.push.apply(s,b([],y(n),!1))};try{for(var l=v(o.dependencies),u=l.next();!u.done;u=l.next()){var c=u.value;a(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s.push(o),r.pop(),delete t[o.key],s}};let G="function"==typeof Buffer,X="function"==typeof TextDecoder?new TextDecoder:void 0,Q="function"==typeof TextEncoder?new TextEncoder:void 0,Z=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ee=(n={},Z.forEach((e,t)=>n[e]=t),n),et=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,er=String.fromCharCode.bind(String),en="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),ei=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),eo=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),es="function"==typeof btoa?e=>btoa(e):G?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,i,o="",s=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw TypeError("invalid character found");o+=Z[(t=r<<16|n<<8|i)>>18&63]+Z[t>>12&63]+Z[t>>6&63]+Z[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},ea=G?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(er.apply(null,e.subarray(r,r+4096)));return es(t.join(""))},el=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?er(192|t>>>6)+er(128|63&t):er(224|t>>>12&15)+er(128|t>>>6&63)+er(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return er(240|t>>>18&7)+er(128|t>>>12&63)+er(128|t>>>6&63)+er(128|63&t)},eu=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ec=G?e=>Buffer.from(e,"utf8").toString("base64"):Q?e=>ea(Q.encode(e)):e=>es(e.replace(eu,el)),ed=(e,t=!1)=>t?ei(ec(e)):ec(e),eh=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ef=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return er((t>>>10)+55296)+er((1023&t)+56320);case 3:return er((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return er((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ep="function"==typeof atob?e=>atob(eo(e)):G?e=>Buffer.from(e,"base64").toString("binary"):e=>{let t,r,n;if(e=e.replace(/\s+/g,""),!et.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let i=[];for(let o=0;o<e.length;)t=ee[e.charAt(o++)]<<18|ee[e.charAt(o++)]<<12|(r=ee[e.charAt(o++)])<<6|(n=ee[e.charAt(o++)]),64===r?i.push(er(t>>16&255)):64===n?i.push(er(t>>16&255,t>>8&255)):i.push(er(t>>16&255,t>>8&255,255&t));return i.join("")},eg=G?e=>en(Buffer.from(e,"base64")):e=>en(ep(e).split("").map(e=>e.charCodeAt(0))),em=G?e=>Buffer.from(e,"base64").toString("utf8"):X?e=>X.decode(eg(e)):e=>ep(e).replace(eh,ef),ev=e=>ed(e,!0);var ey=function(e){function t(r,n){var i=e.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,t.prototype),i}return f(t,e),t}(Error),eb=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return f(t,e),t}(Error),ew=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getVariants=function(e,t){return g(this,void 0,void 0,function(){var r,n,i,o;return m(this,function(s){switch(s.label){case 0:return r=ev(JSON.stringify(e)),n={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":r},(null==t?void 0:t.flagKeys)&&(n["X-Amp-Exp-Flag-Keys"]=ev(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(n["X-Amp-Exp-Track"]=t.trackingOption),(null==t?void 0:t.exposureTrackingOption)&&(n["X-Amp-Exp-Exposure-Track"]=t.exposureTrackingOption),i=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),(null==t?void 0:t.evaluationMode)&&i.searchParams.append("eval_mode",null==t?void 0:t.evaluationMode),(null==t?void 0:t.deliveryMethod)&&i.searchParams.append("delivery_method",null==t?void 0:t.deliveryMethod),[4,this.httpClient.request({requestUrl:i.toString(),method:"GET",headers:n,timeoutMillis:null==t?void 0:t.t
13imeoutMillis})];case 1:if(200!=(o=s.sent()).status)throw new ey(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e}(),eS=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getFlags=function(e){return g(this,void 0,void 0,function(){var t,r;return m(this,function(n){switch(n.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),(null==e?void 0:e.user)&&(t["X-Amp-Exp-User"]=ev(JSON.stringify(e.user))),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+((null==e?void 0:e.deliveryMethod)?"?delivery_method=".concat(e.deliveryMethod):""),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(r=n.sent()).status)throw Error("Flags error response: status=".concat(r.status));return[2,JSON.parse(r.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),ek=function(){return"undefined"!=typeof globalThis&&null!==globalThis?globalThis:"undefined"!=typeof window&&null!==window?window:"undefined"!=typeof self&&null!==self?self:void 0!==r.g&&null!==r.g?r.g:void 0};ek();var ex=function(){var e=ek();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch(e){}return!1},eE=function(){var e;return null==(e=ek())?void 0:e.localStorage},eC=function(){var e;return null==(e=ek())?void 0:e.sessionStorage},e_=function(){var e;return null==(e=ek())?void 0:e.document},eO=function(){var e=ek();return(null==e?void 0:e.setTimeout)?e.setTimeout.bind(e):void 0},eI=function(){var e=ek();return(null==e?void 0:e.clearTimeout)?e.clearTimeout.bind(e):void 0},eT=function(){var e=ek();return(null==e?void 0:e.setInterval)?e.setInterval.bind(e):void 0},eR=function(){var e=ek();return(null==e?void 0:e.clearInterval)?e.clearInterval.bind(e):void 0},eA=function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){if(!this.poller){var e=eT();e&&(this.poller=e(this.action,this.ms),this.action())}},e.prototype.stop=function(){if(this.poller){var e=eR();e&&e(this.poller),this.poller=void 0}},e}(),eP=r(76459),eM=r(87810);function eN(e){this.amplitudeInstance=e}function eD(e){this.amplitudeInstance=e}eN.prototype.getUser=function(){var e,t,r,n,i,o,s,a,l,u;return{device_id:null==(t=null==(e=this.amplitudeInstance)?void 0:e.options)?void 0:t.deviceId,user_id:null==(n=null==(r=this.amplitudeInstance)?void 0:r.options)?void 0:n.userId,version:null==(o=null==(i=this.amplitudeInstance)?void 0:i.options)?void 0:o.versionName,language:null==(a=null==(s=this.amplitudeInstance)?void 0:s.options)?void 0:a.language,platform:null==(u=null==(l=this.amplitudeInstance)?void 0:l.options)?void 0:u.platform,os:this.getOs(),device_model:this.getDeviceModel()}},eN.prototype.getOs=function(){var e,t,r,n,i,o;return[null==(r=null==(t=null==(e=this.amplitudeInstance)?void 0:e._ua)?void 0:t.browser)?void 0:r.name,null==(o=null==(i=null==(n=this.amplitudeInstance)?void 0:n._ua)?void 0:i.browser)?void 0:o.major].filter(function(e){return null!=e}).join(" ")},eN.prototype.getDeviceModel=function(){var e,t,r;return null==(r=null==(t=null==(e=this.amplitudeInstance)?void 0:e._ua)?void 0:t.os)?void 0:r.name},eD.prototype.track=function(e){this.amplitudeInstance.logEvent(e.name,e.properties)},eD.prototype.setUserProperty=function(e){var t,r;this.amplitudeInstance.setUserProperties(((t={})[e.userProperty]=null==(r=e.variant)?void 0:r.value,t))},eD.prototype.unsetUserProperty=function(e){var t;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:((t={})[e.userProperty]="-",t)})};var eL=function(){return(eL=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function eU(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function ej(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){var u=[a,l];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function eF(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
13if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eB(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function eH(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var ez=function(e,t){void 0===t&&(t=!1);var r,n,i=e$(e,t),o=void 0,s=e_();if(s){var a=s.cookie.split("; ");try{for(var l=eF(a),u=l.next();!u.done;u=l.next()){var c=u.value,d=eB(c.split("=",2),2),h=d[0],f=d[1];h===i&&(o=decodeURIComponent(f))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(o)try{if(t){var p=atob(o);return JSON.parse(decodeURIComponent(p))}var g=o.split("."),m=void 0;return g.length>=2&&g[1]&&(m=atob(g[1])),{deviceId:g[0],userId:m}}catch(e){return}}},eq=function(e){var t=e$(e,!0);try{var r=eE();if(!r)return;var n=r.getItem(t);if(!n)return;var i=JSON.parse(n);if("object"!=typeof i)return;return i}catch(e){return}},eV=function(e){var t=e$(e,!0);try{var r=eC();if(!r)return;var n=r.getItem(t);if(!n)return;var i=JSON.parse(n);if("object"!=typeof i)return;return i}catch(e){return}},e$=function(e,t){if(t){if((null==e?void 0:e.length)<10)return;return"AMP_".concat(e.substring(0,10))}if(!((null==e?void 0:e.length)<6))return"amp_".concat(e.substring(0,6))},eW=function(){function e(e,t,r){this.type="integration",this.apiKey=e,this.identityStore=t.identityStore,this.eventBridge=t.eventBridge,this.contextProvider=t.applicationContextProvider,this.timeoutMillis=r,this.loadPersistedState(),r<=0&&(this.setup=void 0)}return e.prototype.setup=function(e,t){return eU(this,void 0,void 0,function(){return ej(this,function(r){return(null==e?void 0:e.automaticFetchOnAmplitudeIdentityChange)&&this.identityStore.addIdentityListener(function(){null==t||t.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(e){return!!this.eventBridge.receiver&&(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0)},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=ez(this.apiKey,!0);return!!(e||(e=ez(this.apiKey,!1))||(e=eq(this.apiKey))||(e=eV(this.apiKey)))&&(this.commitIdentityToConnector(e),!0)},e.prototype.commitIdentityToConnector=function(e){var t=this.identityStore.editIdentity();t.setDeviceId(e.deviceId),e.userId&&t.setUserId(e.userId),t.commit()},e.prototype.waitForConnectorIdentity=function(e){return eU(this,void 0,void 0,function(){var t,r=this;return ej(this,function(n){return(t=this.identityStore.getIdentity()).userId||t.deviceId?[2]:[2,Promise.race([new Promise(function(e){var t=function(){e(),r.identityStore.removeIdentityListener(t)};r.identityStore.addIdentityListener(t)}),new Promise(function(t,r){var n=eO();if(!n)return void r("Timed out waiting for Amplitude Analytics SDK to initialize.");n(r,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]})})},e}(),eK=((null==(i=ek())?void 0:i.fetch)?i.fetch.bind(i):void 0)||function(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],s=[],a={},l=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,r){o.push(t=t.toLowerCase()),s.push([t,r]),a[t]=a[t]?a[t]+","+r:r}),r(l())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)})},eJ=function(){function e(e){this.client=e}return e.prototype.request=function(e){return eU(this,void 0,void 0,function(){return ej(this,function(t){switch(t.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,t.sent()]}})})},e}(),eY={request:function(e,t,r,n,i){var o;return o=eU(void 0,void 0,void 0,function(){var i,o;return ej(this,function(s){switch(s.label){case 0:return[4,eK(e,{method:t,headers:r,body:n})];case 1:return o={status:(i=s.sent()).status},[4,i.text()];case 2:return o.body=s.sent(),[2,o]}})}),null==i||i<=0?o:new Promise(function(e,t){var r=eO();r&&r(function(){t(new eb("Request timeout after "+i+" milliseconds"))},i),o.then(e,t)})}};(o=l||(l={}))[o.Disable=0]="Disable",o[o.Error=1]="Error",o[o.Warn=2]="Warn",o[o.Info=3]="Info",o[o.Debug=4]="Debug",o[o.Verbose
13=5]="Verbose",(s=u||(u={})).LocalStorage="localStorage",s.InitialVariants="initialVariants",(a=c||(c={})).LocalStorage="storage",a.InitialVariants="initial",a.SecondaryLocalStorage="secondary-storage",a.SecondaryInitialVariants="secondary-initial",a.FallbackInline="fallback-inline",a.FallbackConfig="fallback-config",a.LocalEvaluation="local-evaluation";var eG=function(e){return!e||e===c.FallbackInline||e===c.FallbackConfig||e===c.SecondaryInitialVariants},eX={debug:!1,logLevel:l.Error,loggerProvider:null,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:u.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,throwOnError:!1,automaticExposureTracking:!0,pollOnStart:!0,flagConfigPollingIntervalMillis:3e5,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:eY},eQ="1.21.3",eZ=function(){function e(e,t){var r,n=this;this.isReady=new Promise(function(e){n.resolve=e}),this.config=e,this.client=t;var i=null!=(r=e.instanceName)?r:eX.instanceName;this.queue=new e1(i),this.cache=new e0(i)}return e.prototype.ready=function(){return this.integration?this.isReady:Promise.resolve()},e.prototype.setIntegration=function(e){var t=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()},function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(e,t){if(this.cache.shouldTrack(e,t)){var r=this.getExposureEvent(e);this.queue.push(r)}},e.prototype.getExposureEvent=function(e){var t,r,n,i={eventType:"$exposure",eventProperties:e};return(null==(t=e.metadata)?void 0:t.exposureEvent)?i={eventType:null==(r=e.metadata)?void 0:r.exposureEvent,eventProperties:e}:(null==(n=e.metadata)?void 0:n.deliveryMethod)==="web"&&(i={eventType:"$impression",eventProperties:e}),i},e}(),e0=function(){function e(e){this.isSessionStorageAvailable=e2(),this.inMemoryCache={},this.identity={},this.storageKey="EXP_sent_v3_".concat(e);var t=eC();this.isSessionStorageAvailable&&t&&(t.removeItem("EXP_sent_".concat(e)),t.removeItem("EXP_sent_v2_".concat(e)))}return e.prototype.shouldTrack=function(e,t){if((null==(r=e.metadata)?void 0:r.deliveryMethod)==="web")return!0;var r,n,i={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,i)||this.clearCache(),this.identity=i,this.loadCache();var o=e.flag_key in this.inMemoryCache,s=this.inMemoryCache[e.flag_key],a=null!=(n=e.variant)?n:null,l=!1;return o&&(null!=s?s:null)===a||(l=!0,this.inMemoryCache[e.flag_key]=a),this.storeCache(),l},e.prototype.clearCache=function(){this.inMemoryCache={};var e=eC();this.isSessionStorageAvailable&&e&&e.removeItem(this.storageKey)},e.prototype.identityEquals=function(e,t){return e.userId&&t.userId?e.userId===t.userId:!e.userId&&!t.userId&&e.deviceId===t.deviceId},e.prototype.loadCache=function(){var e=eC();if(this.isSessionStorageAvailable&&e){var t=e.getItem(this.storageKey);this.inMemoryCache=t?JSON.parse(t):{}}},e.prototype.storeCache=function(){var e=eC();if(this.isSessionStorageAvailable&&e)try{e.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))}catch(e){}},e}(),e1=function(){function e(e,t){void 0===t&&(t=512),this.isLocalStorageAvailable=ex(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=t}return e.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},e.prototype.setTracker=function(e){var t=this;this.tracker=e;var r=eT();r&&(this.poller=r(function(){t.loadFlushStore()},1e3)),this.loadFlushStore()},e.prototype.flush=function(){if(this.tracker&&0!==this.inMemoryQueue.length){for(var e=0;e<this.inMemoryQueue.length;e++)try{if(!this.tracker(this.inMemoryQueue[e]))break}catch(e){break}if(this.inMemoryQueue=this.inMemoryQueue.slice(e),0===this.inMemoryQueue.length&&this.poller){var t=eR();t&&t(this.poller),this.poller=void 0}}},e.prototype.loadQueue=function(){var e=eE();if(this.isLocalStorageAvailable&&e){var t=e.getItem(this.storageKey);this.inMemoryQueue=t?JSON.parse(t):[]}},e.prototype.storeQueue=function(){var e=eE();this.isLocalStorageAvailable&&e&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),e.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e}(),e2=function(){var e=ek();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch(e){}return!1},e3=function(){function e(e,t){void 0===t&&(t=l.Error),this.logger=e,this.logLevel=t}return e.prototype.error=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.logLevel>=l.Error&&(t=this.logger).error.apply(t,eH([e],eB(r),!1))},e.prototype.warn=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.logLevel>=l.Warn&&(t=this.logger).warn.apply(t,eH([e],eB(r),!1))},e.prototype.info=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.logLevel>=l.Info&&(t=this.logger).info.apply(t,eH([e],eB(r),!1))},e.prototype.debug=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.logLevel>=l.Debug&&(t=this.logger).debug.apply(t,eH([e],eB(r),!1))},e.prototype.verbose=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.logLevel>=l.Verbose&&(t=this.logger).verbose.apply(t,eH([e],eB(r),!1))},e}(),e4=function(){function e(){}return e.prototype.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.error.apply(console,eH([e],eB(t),!1))},e.prototype.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.warn.apply(console,eH([e],eB(t),!1))},e.prototype.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.info.apply(console,eH([e],eB(t),!1))},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.debug.apply(console,eH([e],eB(t),!1))},e.prototype.verbose=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.debug.apply(console,eH([e],eB(t),!1))},e}(),e6=function(){function e(){this.globalScope=ek()}return e.prototype.get=function(e){var t;return null==(t=this.globalScope)?void 0:t.localStorage.getItem(e)},e.prototype.put=function(e,t){var r;null==(r=this.globalScope)||r.localStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null==(t=this.globalScope)||t.localStorage.removeItem(e)},e}(),e5=function(e,t,r){var n=e.substring(e.length-6);return new te("amp-exp-".concat(t,"-").concat(n),r,tt)},e8=function(e,t,r){void 0===r&&(r=new e6);var n=e.substring(e.length-6);return new te("amp-exp-".concat(t,"-").concat(n,"-flags"),r)},e9=function(e,t,r){void 0===r&&(r=new e6);var n=e.substring(e.length-6);return new e7("amp-exp-".concat(t,"-").concat(n,"-variants-options"),r)},e7=function(){function e(e,t){this.namespace=e,this.storage=t}return e.prototype.get=function(){return this.value},e.prototype.put=function(e){this.value=e},e.prototype.load=function(){var e=this.storage.get(this.namespace);e&&(this.value=JSON.parse(e))},e.prototype.store=function(){void 0===this.value?this.storage.delete(this.namespace):this.storage.put(this.namespace,JSON.stringify(this.value))},e}(),te=function(){function e(e,t,r){this.cache={},this.namespace=e,this.storage=t,this.transformer=r}return e.prototype.get=function(e){return this.cache[e]},e.prototype.getAll=function(){return eL({},this.cache)},e.prototype.put=function(e,t){this.cache[e]=t},e.prototype.putAll=function(e){var t,r;try{for(var n=eF(Object.keys(e)),i=n.next();!i.done;i=n.next()){var o=i.value;this.cache[o]=e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var e,t,r,n=this.storage.get(this.namespace);try{r=JSON.parse(n)||{}}catch(e){return}var i={};try{for(var o=eF(Object.keys(r)),s=o.next();!s.done;s=o.next()){var a=s.value;try{var l=void 0;(l=this.transformer?this.transformer(r[a]):r[a])&&(i[a]=l)}catch(e){}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(i)},e.prototype.store=function(e){void 0===e&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},e}(),tt=function(e){if("string"==typeof e)return{key:e,value:e};if("object"==typeof e){var t=e.key,r=e.value,n=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&((i=i||{}).experimentKey=o);var s={};return t?s.key=t:r&&(s.key=r),r&&(s.value=r),i&&(s.metadata=i),n&&(s.payload=n),o&&(s.expKey=o),s}},tr=function(){function e(){this.globalScope=ek()}return e.prototype.get=function(e){var t;return null==(t=this.globalScope)?void 0:t.sessionStorage.getItem(e)},e.prototype.put=function(e,t){var r;null==(r=this.globalScope)||r.sessionStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null==(t=this.globalScope)||t.sessionStorage.removeItem(e)},e}(),tn=function(e,t,r,n){var i,o=null==r?void 0:r.value,s="[Experiment] ".concat(t);return{name:"[Experiment] Exposure",user:e,key:t,variant:r,userProperty:s,properties:{key:t,variant:o,source:n},userProperties:((i={})[s]=o,i)}},ti=function(e){return null==e},to=function(e){return!!ti(e)||e&&0===Object.keys(e).length},ts=function(e){if(!e||"object"!=typeof e)return{};var t,r,n={};try{for(var i=eF(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=eB(o.value,2),a=s[0],l=s[1];ti(l)||(n[a]=l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},ta=function(e){var t;return(null==(t=null==e?void 0:e.metadata)?void 0:t.evaluationMode)==="local"},tl=function(){function e(e,t,r,n){this.started=!1,this.done=!1,this.attempts=e,this.min=t,this.max=r,this.scalar=n}return e.prototype.start=function(e){return eU(this,void 0,void 0,function(){return ej(this,function(t){switch(t.label){case 0:if(this.started)throw Error("Backoff already started");return this.started=!0,[4,this.backoff(e,0,this.min)];case 1:return t.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0;var e=eI();e&&e(this.timeoutHandle)},e.prototype.backoff=function(e,t,r){return eU(this,void 0,void 0,function(){var n,i=this;return ej(this,function(o){return!this.done&&(n=eO())&&(this.timeoutHandle=n(function(){return eU(i,void 0,void 0,function(){var n,i;return ej(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return o.sent(),[3,3];case 2:return o.sent(),(n=t+1)<this.attempts&&(i=Math.min(r*this.scalar,this.max),this.backoff(e,n,i)
13),[3,3];case 3:return[2]}})})},r)),[2]})})},e}(),tu=function(e){if(!e)return{};var t,r,n,i,o={user:e},s=ek();(null==s?void 0:s.location)&&(o.page={url:s.location.href});var a={};if(!e.groups)return o;try{for(var l=eF(Object.keys(e.groups)),u=l.next();!u.done;u=l.next()){var c=u.value,d=e.groups[c];if(d.length>0&&d[0]){var h=d[0],f={group_name:h},p=null==(i=null==(n=e.group_properties)?void 0:n[c])?void 0:i[h];p&&Object.keys(p).length>0&&(f.group_properties=p),a[c]=f}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return Object.keys(a).length>0&&(o.groups=a),delete o.user.groups,delete o.user.group_properties,o},tc=function(e){return null==e?{}:"string"==typeof e?{key:e,value:e}:e},td=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var r={};return e.key&&(r.key=e.key),e.value&&(r.value=e.value),e.payload&&(r.payload=e.payload),t&&(r.expKey=t),e.metadata&&(r.metadata=e.metadata),r},th=function(){function e(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return e.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},e.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},e.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},e}(),tf=function(){function e(e){this.tracked={},this.identity={},this.exposureTrackingProvider=e}return e.prototype.track=function(e,t){var r={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,r)||(this.tracked={}),this.identity=r;var n=e.flag_key in this.tracked,i=this.tracked[e.flag_key];n&&i===e.variant||(this.tracked[e.flag_key]=e.variant,this.exposureTrackingProvider.track(e))},e.prototype.identityEquals=function(e,t){return e.userId===t.userId&&e.deviceId===t.deviceId},e}(),tp=function(){function e(t,r){var n,i,o,s,a,l=this;this.engine=new K,this.isRunning=!1,this.apiKey=t,r=ts(r),this.config=eL(eL(eL({},eX),r),{serverUrl:(null==r?void 0:r.serverUrl)||((null==(n=null==r?void 0:r.serverZone)?void 0:n.toLowerCase())==="eu"?"https://api.lab.eu.amplitude.com":eX.serverUrl),flagsServerUrl:(null==r?void 0:r.flagsServerUrl)||((null==(i=null==r?void 0:r.serverZone)?void 0:i.toLowerCase())==="eu"?"https://flag.lab.eu.amplitude.com":eX.flagsServerUrl),flagConfigPollingIntervalMillis:r.flagConfigPollingIntervalMillis<6e4?6e4:null!=(o=r.flagConfigPollingIntervalMillis)?o:eX.flagConfigPollingIntervalMillis}),this.logger=new e3(this.config.loggerProvider||new e4,e.getLogLevel(r));var u=null==(s=this.config)?void 0:s.internalInstanceNameSuffix;if(this.isWebExperiment="web"===u,this.poller=new eA(function(){return eU(l,void 0,void 0,function(){var e;return ej(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.doFlags()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),this.logger.info(e),[3,3];case 3:return[2]}})})},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var c in this.config.initialVariants)this.config.initialVariants[c]=tt(this.config.initialVariants[c]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new th(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new tf(this.config.exposureTrackingProvider)),this.integrationManager=new eZ(this.config,this);var d=new eJ(this.config.httpClient||eY);this.flagApi=new eS(this.apiKey,this.config.flagsServerUrl,d),this.evaluationApi=new ew(this.apiKey,this.config.serverUrl,d);var h=u?"".concat(this.config.instanceName,"-").concat(u):this.config.instanceName;a=this.isWebExperiment?new tr:new e6,this.variants=e5(this.apiKey,h,a),this.flags=e8(this.apiKey,h,a),this.fetchVariantsOptions=e9(this.apiKey,h,a);try{this.flags.load(),this.variants.load(),this.fetchVariantsOptions.load()}catch(e){}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(e){return eU(this,void 0,void 0,function(){var t,r,n;return ej(this,function(i){switch(i.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(e),i.label=1;case 1:if(i.trys.push([1,6,,7]),t=this.doFlags(),!(null==(n=this.config.fetchOnStart)||n))return[3,3];return[4,Promise.all([this.fetch(e),t])];case 2:return i.sent(),[3,5];case 3:return[4,t];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:if(r=i.sent(),this.config.throwOnError)throw r;return[3,7];case 7:return this.config.pollOnStart&&this.poller.start(),[2]}})})},e.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},e.prototype.fetch=function(){return eU(this,arguments,void 0,function(e,t){var r;return void 0===e&&(e=this.user),ej(this,function(n){switch(n.label){case 0:this.setUser(e||{}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,t)];case 2:return n.sent(),[3,4];case 3:if(r=n.sent(),this.config.throwOnError)throw r;return r instanceof eb?this.logger.debug(r):this.logger.error(r),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(e,t){if(!this.apiKey)return{value:void 0};var r,n,i=this.variantAndSource(e,t);return this.config.automaticExposureTracking&&this.exposureInternal(e,i),this.logger.debug("[Experiment] variant for ".concat(e," is ").concat((null==(r=i.variant)?void 0:r.key)||(null==(n=i.variant)?void 0:n.value))),i.variant||{}}
13,e.prototype.exposure=function(e){var t=this.variantAndSource(e);this.exposureInternal(e,t)},e.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var t in e)ta(this.flags.get(t))||delete e[t];return eL(eL(eL({},this.secondaryVariants()),this.sourceVariants()),e)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch(e){}},e.prototype.getUser=function(){if(!this.user)return this.user;if(null==(e=this.user)||!e.user_properties)return eL({},this.user);var e,t=eL({},this.user.user_properties);return eL(eL({},this.user),{user_properties:t})},e.prototype.setUser=function(e){var t;if(!e){this.user=null;return}if(null==(t=this.user)?void 0:t.user_properties){var r=eL({},e.user_properties);this.user=eL(eL({},e),{user_properties:r})}else this.user=eL({},e)},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(e){return this.userProvider=e,this},e.prototype.mergeInitialFlagsWithStorage=function(){var e=this;this.config.initialFlags&&JSON.parse(this.config.initialFlags).forEach(function(t){e.flags.get(t.key)||e.flags.put(t.key,t)})},e.prototype.evaluate=function(e){var t,r,n=this.addContext(this.user),i=J(this.flags.getAll(),e),o=tu(n),s=this.engine.evaluate(o,i),a={};try{for(var l=eF(Object.keys(s)),u=l.next();!u.done;u=l.next()){var c=u.value;a[c]=td(s[c])}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return a},e.prototype.getEvaluationTraces=function(e){var t=this.addContext(this.user),r=J(this.flags.getAll(),e),n=tu(t);return this.engine.evaluateWithTraces(n,r).traces},e.prototype.variantAndSource=function(e,t){var r={};this.config.source===u.LocalStorage?r=this.localStorageVariantAndSource(e,t):this.config.source===u.InitialVariants&&(r=this.initialVariantsVariantAndSource(e,t));var n=this.flags.get(e);return(ta(n)||!r.variant&&n)&&(r=this.localEvaluationVariantAndSource(e,n,t)),r},e.prototype.localEvaluationVariantAndSource=function(e,t,r){var n,i={},o=this.evaluate([t.key])[e],s=c.LocalEvaluation,a=null==(n=null==o?void 0:o.metadata)?void 0:n.default;if(!ti(o)&&!a)return{variant:tc(o),source:s,hasDefaultVariant:!1};if(a&&(i={variant:tc(o),source:s,hasDefaultVariant:!0}),!ti(r))return{variant:tc(r),source:c.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var l=this.config.initialVariants[e];if(!ti(l))return{variant:tc(l),source:c.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var u=tc(this.config.fallbackVariant),d={variant:u,source:c.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return to(u)?i:d},e.prototype.localStorageVariantAndSource=function(e,t){var r,n={},i=this.variants.get(e),o=null==(r=null==i?void 0:i.metadata)?void 0:r.default;if(!ti(i)&&!o)return{variant:tc(i),source:c.LocalStorage,hasDefaultVariant:!1};if(o&&(n={variant:tc(i),source:c.LocalStorage,hasDefaultVariant:!0}),!ti(t))return{variant:tc(t),source:c.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var s=this.config.initialVariants[e];if(!ti(s))return{variant:tc(s),source:c.SecondaryInitialVariants,hasDefaultVariant:n.hasDefaultVariant};var a=tc(this.config.fallbackVariant),l={variant:a,source:c.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return to(a)?n:l},e.prototype.initialVariantsVariantAndSource=function(e,t){var r,n={},i=this.config.initialVariants[e];if(!ti(i))return{variant:tc(i),source:c.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),s=null==(r=null==o?void 0:o.metadata)?void 0:r.default;if(!ti(o)&&!s)return{variant:tc(o),source:c.LocalStorage,hasDefaultVariant:!1};if(s&&(n={variant:tc(o),source:c.LocalStorage,hasDefaultVariant:!0}),!ti(t))return{variant:tc(t),source:c.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var a=tc(this.config.fallbackVariant),l={variant:a,source:c.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return to(a)?n:l},e.prototype.fetchInternal=function(e,t,r,n){return eU(this,void 0,void 0,function(){var i,o,s;return ej(this,function(a){switch(a.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.logger.debug("[Experiment] Fetch all: retry=".concat(r)),r&&this.stopRetries(),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.doFetch(e,t,eL({trackingOption:null==(s=this.fetchVariantsOptions.get())?void 0:s.trackingOption},n))];case 2:return i=a.sent(),[4,this.storeVariants(i,n)];case 3:return a.sent(),[2,i];case 4:throw o=a.sent(),r&&this.shouldRetryFetch(o)&&this.startRetries(e,n),o;case 5:return[2]}})})},e.prototype.setTracksAssignment=function(e){return eU(this,void 0,void 0,function(){return ej(this,function(t){return this.fetchVariantsOptions.put(eL(eL({},this.fetchVariantsOptions.get()||{}),{trackingOption:e?"track":"no-track"}
13)),this.fetchVariantsOptions.store(),[2]})})},e.prototype.cleanUserPropsForFetch=function(e){var t=eL({},e);return delete t.cookie,t},e.prototype.doFetch=function(e,t,r){return eU(this,void 0,void 0,function(){var n,i,o,s,a,l,u;return ej(this,function(c){switch(c.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=c.sent(),e=this.cleanUserPropsForFetch(e),this.logger.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,eL({timeoutMillis:t},r))];case 2:n=c.sent(),i={};try{for(s=(o=eF(Object.keys(n))).next();!s.done;s=o.next())i[a=s.value]=td(n[a])}catch(e){l={error:e}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(l)throw l.error}}return this.logger.debug("[Experiment] Received variants: ",i),[2,i]}})})},e.prototype.doFlags=function(){return eU(this,void 0,void 0,function(){var e,t,r;return ej(this,function(n){switch(n.label){case 0:if(n.trys.push([0,4,,5]),e=void 0,!this.isWebExperiment)return[3,2];return[4,this.addContextOrWait(this.getUser())];case 1:e=n.sent(),n.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:eQ,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:(null==e?void 0:e.user_id)||(null==e?void 0:e.device_id)?{user_id:null==e?void 0:e.user_id,device_id:null==e?void 0:e.device_id}:void 0})];case 3:return t=n.sent(),this.flags.clear(),this.flags.putAll(t),[3,5];case 4:if((r=n.sent())instanceof eb){if(this.logger.debug(r),this.config.throwOnError)throw r}else throw r;return[3,5];case 5:try{this.flags.store()}catch(e){}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(e,t){return eU(this,void 0,void 0,function(){var r,n,i,o;return ej(this,function(s){for(o in 0===(r=t&&t.flagKeys?t.flagKeys:[]).length&&this.variants.clear(),n=function(t){r=r.filter(function(e){return e!==t}),i.variants.put(t,e[t])},i=this,e)n(o);for(o in r)this.variants.remove(o);try{this.variants.store()}catch(e){}return this.logger.debug("[Experiment] Stored variants: ",e),[2]})})},e.prototype.startRetries=function(e,t){return eU(this,void 0,void 0,function(){var r=this;return ej(this,function(n){return this.logger.debug("[Experiment] Retry fetch"),this.retriesBackoff=new tl(8,500,1e4,1.5),this.retriesBackoff.start(function(){return eU(r,void 0,void 0,function(){return ej(this,function(r){switch(r.label){case 0:return[4,this.fetchInternal(e,1e4,!1,t)];case 1:return r.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(e){var t,r=null==(t=this.userProvider)?void 0:t.getUser(),n=this.integrationManager.getUser(),i=eL(eL(eL({},null==r?void 0:r.user_properties),n.user_properties),null==e?void 0:e.user_properties);return eL(eL(eL(eL({library:"experiment-js-client/".concat(eQ)},r),n),e),{user_properties:i})},e.prototype.addContextOrWait=function(e){return eU(this,void 0,void 0,function(){return ej(this,function(t){switch(t.label){case 0:return[4,this.integrationManager.ready()];case 1:return t.sent(),[2,this.addContext(e)]}})})},e.prototype.sourceVariants=function(){return this.config.source==u.LocalStorage?this.variants.getAll():this.config.source==u.InitialVariants?this.config.initialVariants:void 0},e.prototype.secondaryVariants=function(){return this.config.source==u.LocalStorage?this.config.initialVariants:this.config.source==u.InitialVariants?this.variants.getAll():void 0},e.prototype.exposureInternal=function(e,t){if(null==(i=null==(n=null==(r=t.variant)?void 0:r.metadata)?void 0:n.trackExposure)||i){this.legacyExposureInternal(e,t.variant,t.source);var r,n,i,o,s,a,l,u,c,d={flag_key:e},h=eG(t.source);if(!h||t.hasDefaultVariant){(null==(o=t.variant)?void 0:o.expKey)&&(d.experiment_key=null==(s=t.variant)?void 0:s.expKey);var f=null==(a=t.variant)?void 0:a.metadata;if(h||(null==f?void 0:f.default)||((null==(l=t.variant)?void 0:l.key)?d.variant=t.variant.key:(null==(u=t.variant)?void 0:u.value)&&(d.variant=t.variant.value)),f&&(d.metadata=f),this.isWebExperiment&&(d.time=Date.now()),this.isWebExperiment){var p=ek();if(null==p?void 0:p.location)try{var g=p.location.href;d.metadata.url=g.split("?")[0]||""}catch(e){}}var m=this.addContext(this.getUser());null==(c=this.userSessionExposureTracker)||c.track(d,m),this.integrationManager.track(d,m)}}},e.prototype.legacyExposureInternal=function(e,t,r){var n,i,o,s,a;if(this.analyticsProvider){var l=tn(this.addContext(this.getUser()),e,t,r);!eG(r)&&(null==t?void 0:t.value)?(null==t?void 0:t.value)&&(null==(s=null==(o=this.analyticsProvider)?void 0:o.setUserProperty)||s.call(o,l),null==(a=this.analyticsProvider)||a.track(l)):null==(i=null==(n=this.analyticsProvider)?void 0:n.unsetUserProperty)||i.call(n,l)}},e.getLogLevel=function(e){var t;return!0===e.debug?l.Debug:null!=(t=e.logLevel)?t:l.Error},e.prototype.shouldRetryFetch=function(e){return!(e instanceof ey)||e.statusCode<400||e.statusCode>=500||429===e.statusCode}
13,e.prototype.addPlugin=function(e){"integration"===e.type&&this.integrationManager.setIntegration(e)},e}(),tg=function(){function e(e,t){var r,n,i;this.globalScope=ek(),this.userAgent=void 0!==(null==(r=this.globalScope)?void 0:r.navigator)?null==(n=this.globalScope)?void 0:n.navigator.userAgent:void 0,this.ua=new eM.UAParser(this.userAgent).getResult(),this.localStorage=new e6,this.sessionStorage=new tr,this.userProvider=e,this.apiKey=t,this.storageKey="EXP_".concat(null==(i=this.apiKey)?void 0:i.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var e,t,r,n,i,o=(null==(e=this.userProvider)?void 0:e.getUser())||{};return eL({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:null!=(r=null==(t=this.ua.device)?void 0:t.type)?r:"desktop",referring_url:null==(i=null==(n=this.globalScope)?void 0:n.document)?void 0:i.referrer.replace(/\/$/,""),cookie:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},e.prototype.getLanguage=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(e){var t,r;return[null==(t=e.browser)?void 0:t.name,null==(r=e.browser)?void 0:r.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(e){var t;return null==(t=e.os)?void 0:t.name},e.prototype.getBrowser=function(e){var t,r=null==(t=e.browser)?void 0:t.name;return(null==r?void 0:r.includes("Chrom"))&&(r="Chrome"),(null==r?void 0:r.includes("Firefox"))&&(r="Firefox"),(null==r?void 0:r.includes("Safari"))&&(r="Safari"),(null==r?void 0:r.includes("Edge"))&&(r="Edge"),(null==r?void 0:r.includes("Opera"))&&(r="Opera"),r},e.prototype.getCookie=function(){var e,t,r,n,i;if(null==(t=null==(e=this.globalScope)?void 0:e.document)?void 0:t.cookie)return Object.fromEntries(null==(i=null==(n=null==(r=this.globalScope)?void 0:r.document)?void 0:n.cookie)?void 0:i.split("; ").map(function(e){return e.split("=")}))},e.prototype.getLandingUrl=function(){var e,t;try{var r=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return r.landing_url||(r.landing_url=null==(t=null==(e=this.globalScope)?void 0:e.location)?void 0:t.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(r))),r.landing_url}catch(e){return}},e.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch(e){return}},e.prototype.getUrlParam=function(){if(this.globalScope){var e,t,r,n={};try{var i=new URL(this.globalScope.location.href);try{for(var o=eF(i.searchParams),s=o.next();!s.done;s=o.next()){var a=eB(s.value,2),l=a[0],u=a[1];n[l]=eH(eH([],eB(null!=(r=n[l])?r:[]),!1),eB(u.split(",")),!1)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}catch(e){return}return Object.entries(n).reduce(function(e,t){var r=eB(t,2),n=r[0],i=r[1];return e[n]=1==i.length?i[0]:i,e},{})}},e}(),tm=ek();tm&&(tm.experimentInstances={});var tv=null!=(d=null==tm?void 0:tm.experimentInstances)?d:{},ty=function(e){return(null==e?void 0:e.instanceName)||eX.instanceName},tb=function(e,t){var r=ty(t),n=null==t?void 0:t.internalInstanceNameSuffix;return n?"".concat(r,".").concat(e,".").concat(n):"".concat(r,".").concat(e)},tw=function(e,t,r){var n=tb(e,t),i=tv[n];return i?i:(i=new tp(e,eL(eL({},t),{userProvider:new tg(null==t?void 0:t.userProvider,e)})),r&&i.addPlugin(r()),tv[n]=i,i)},tS={initialize:function(e,t){return tw(e,t)},initializeWithAmplitudeAnalytics:function(e,t){return tw(e,t,function(){return new eW(e,eP.i.getInstance(ty(t)),1e4)})}};function tk(){}tk.prototype.getUser=function(){return{}},tk.prototype.start=function(e){return eU(this,void 0,void 0,function(){return ej(this,function(e){return[2]})})},tk.prototype.stop=function(){},tk.prototype.setUser=function(e){},tk.prototype.fetch=function(e,t){return eU(this,void 0,void 0,function(){return ej(this,function(e){return[2,this]})})},tk.prototype.getUserProvider=function(){return null},tk.prototype.setUserProvider=function(e){return this},tk.prototype.variant=function(e,t){return eX.fallbackVariant},tk.prototype.all=function(){return{}},tk.prototype.clear=function(){}
13,tk.prototype.exposure=function(e){}},49128(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},49568(e,t,r){"use strict";r.d(t,{Q:()=>nB});var n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E=r(55823);(n=h||(h={}))[n.None=0]="None",n[n.Error=1]="Error",n[n.Warn=2]="Warn",n[n.Verbose=3]="Verbose",n[n.Debug=4]="Debug";var C=function(e){return void 0===e&&(e=0),(Error().stack||"").split(`
14`).slice(2+e).map(function(e){return e.trim()})},_=function(e){return function(){var t=(0,E.Cl)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},O=function(e,t){var r,n;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,E.Ju)(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},I=function(e,t){return function(){var r,n,i={};try{for(var o=(0,E.Ju)(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=O(e,a)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},T=function(e,t,r,n,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=r(),l=a.logger,u=a.logLevel;if(u&&u<h.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:C(1),time:{start:new Date().toISOString()},states:{}};n&&c.states&&(c.states.before=n());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))}):(n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))),d}},R=function(e){return{promise:e||Promise.resolve()}},A="Amplitude Logger ",P=function(){function e(){this.logLevel=h.None}return e.prototype.disable=function(){this.logLevel=h.None},e.prototype.enable=function(e){void 0===e&&(e=h.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<h.Verbose||console.log("".concat(A,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<h.Warn||console.warn("".concat(A,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<h.Error||console.error("".concat(A,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<h.Debug||console.log("".concat(A,"[Debug]: ").concat(e.join(" ")))},e}(),M=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),N=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0},D=(0,E.fX)([],(0,E.zs)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),L=function(e){var t,r=N();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,L);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,E.fX)([],(0,E.zs)(n.entries()),!1).map(function(e){var t=(0,E.zs)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(D[n]):D[n]}).join("")},U=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvali
14dApiKey=!1,this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new M(e,t)}return e.prototype.subscribe=function(e,t,r){var n=L(),i={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t=this;return(0,E.YH)(this,function(r){switch(r.label){case 0:if(this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5)return this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2];return[4,this.getOrCreateFetchPromise()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null})):this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null})),this.fetchPromise},e.prototype.subscribeAll=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),null!==n.remoteConfig?this.sendCallback(e,n,"cache"):this.logger.debug("Remote config client skips sending c
14allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,E.sH)(this,void 0,void 0,function(){var r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),r])];case 2:return n=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,E.sH)(this,void 0,void 0,function(){var r,n,i,o,s,a,l=this;return(0,E.YH)(this,function(u){switch(u.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},i=function(n){var i,s,a,u,c,d;return(0,E.YH)(this,function(h){switch(h.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),h.label=1;case 1:return h.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:s.signal})];case 2:if((u=h.sent()).ok)return[3,4];return[4,u.text()];case 3:return c=h.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(u.status,": ").concat(c)),401===u.status||403===u.status?(o.logger.error("Remote config client fetch failed with ".concat(u.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):u.status>=400&&u.status<500&&429!==u.status&&(i=!1),[3,6];case 4:return[4,u.json()];case 5:return[2,{value:{remoteConfig:h.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(d=h.sent())instanceof Error&&"AbortError"===d.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(a),[7];case 9:if(!i)return[2,"break"];if(!(n<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,l.getJitterDelay(r))})];case 10:h.sent(),h.label=11;case 11:return[2]}})},o=this,s=0,u.label=1;case 1:if(!(s<e))return[3,4];return[5,i(s)];case 2:if("object"==typeof(a=u.sent()))return[2,a.value];if("break"===a)return[3,4];u.label=3;case 3:return s++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}(),j="tags",F="counters",B="histograms",H="events",z="internal",q="last_flush_timestamp",V=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return(null==(e=N())?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=indexedDB.open(e.dbName,1);n.onerror=function(){e.dbPromise=null,r(Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),r.close()},t(r)},n.onupgradeneeded=function(t){var r=t.target.result;e.createTables(r)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(j)||e.createObjectStore(j,{keyPath:"key"}),e.objectStoreNames.contains(F)||e.createObjectStore(F,{keyPath:"key"}),e.objectStoreNames.contains(B)||e.createObjectStore(B,{keyPath:"key"}),e.objectStoreNames.contains(H)||e.createObjectStore(H,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(z)||e.createObjectStore(z,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;
14return(0,E.YH)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([j],"readwrite")).objectStore(j),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),n()},o.forEach(function(e){var t=(0,E.zs)(e,2),n=t[0],o=t[1];r.put({key:n,value:o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",n),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([F],"readwrite")).objectStore(F),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),n()},o.forEach(function(e){var t=(0,E.zs)(e,2),n=t[0],o=t[1],s=r.get(n);s.onsuccess=function(){var e=s.result,t=e?e.value:0;r.put({key:n,value:t+o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},s.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",n),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([B],"readwrite")).objectStore(B),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),n()},o.forEach(function(e){var t=(0,E.zs)(e,2),n=t[0],o=t[1],s=r.get(n);s.onsuccess=function(){var e,t=s.result;e=t?{key:n,count:t.count+o.count,min:Math.min(t.min,o.min),max:Math.max(t.max,o.max),sum:t.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},r.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},s.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===e.length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([H],"readwrite")).objectStore(H),[2,new Promise(function(n){t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),n()};var o=r.count();o.onsuccess=function(){var t=Math.max(0,10-o.result);t<e.length&&i.logger.debug("DiagnosticsStorage: Only added ".concat(t," of ").concat(e.length," events due to storage limit")),e.slice(0,t).forEach(function(e){r.add(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",n),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,E.sH)(this,void 0,void 0,function(){var r,n,i;return(0,E.YH)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(r=o.sent().transaction([z],"readwrite")).objectStore(z),[2,new Promise(function(i,o){r.onabort=function(){return o(Error("Failed to set internal value"))};var s=n.put({key:e,value:t});s.onsuccess=function(){return i()},s.onerror=function(){return o(Error("Failed to set internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",i),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(t=i.sent().transaction([z],"readonly")).objectStore(z),[2,new Promise(function(n,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return n(o.result)},o.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return n=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",n),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t;return(0,E.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(q)];case 1:return[2,(e=r.sent())?parseInt(e.value,10):void 0];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(q,e.toString())];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).clear();i.onsuccess=function(){return r()},i.onerror=function(){return n(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t,r,n,i,o,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=a.sent().transaction([j,F,B,H],"readwrite"),[4,Promise.all([this.getAllFromStore(e,j),this.getAllFromStore(e,F),this.getAllFromStore(e,B),this.getAllFromStore(e,H)])];case 2:return r=(t=E.zs.apply(void 0,[a.sent(),4]))[0],n=t[1],i=t[2],o=t[3],[4,Promise.all([this.clearTable(e,F),this.clearTable(e,B),this.clearTable(e,H)])];case 3:return a.sent(),[2,{tags:r,counters:n,histogramStats:i,events:o}];case 4:return s=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).getAll();i.onsuccess=function(){return r(i.result)},i.onerror=function(){return n(Error("Failed to get all from ".concat(t)))}})},e}(),$=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}
14,W=function(e,t){return 31*Math.abs($(e.toString()))%1e5/1e5<t},K=function(){var e=N();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},J=function(e){var t=N();if(t&&"function"==typeof t.addEventListener){var r=function(t){e.recordEvent("sdk.error.uncaught",(0,E.Cl)({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,n=null==t?void 0:t.stack,i=Y({filename:e.filename,stack:n});i&&r({type:"error",message:e.message,stack:n,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,n=e.reason instanceof Error?e.reason:void 0,i=null==n?void 0:n.stack,o=G(i),s=Y({filename:o,stack:i});s&&r({type:"unhandledrejection",message:null!=(t=null==n?void 0:n.message)?t:X(e.reason),stack:i,filename:o,errorName:null==n?void 0:n.name,metadata:{isTrusted:e.isTrusted,matchReason:s}})},!0)}},Y=function(e){var t,r,n=K();if(0!==n.length)try{for(var i=(0,E.Ju)(n),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.filename&&e.filename.includes(s))return"filename";if(e.stack&&e.stack.includes(s))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},G=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},X=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},Q=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=(0,E.Cl)({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=W(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,V.isSupported()?this.storage=new V(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),J(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(void 0===t&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");var r=this.inMemoryHistograms[e];r?(r.count+=1,r.min=Math.min(r.min,t),r.max=Math.max(r.max,t),r.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10)return void this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},3e5))},e.prototype.saveAllDataToStorage=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t,r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,E.Cl)({},this.inMemoryTags),t=(0,E.Cl)({},this.inMemoryCounters),r=(0,E.Cl)({},this.inMemoryHistograms),n=(0,E.fX)([],(0,E.zs)(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(r),this.storage.addEventRecords(n)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t,r,n,i,o,s,a,l,u;return(0,E.YH)(this,function(c){switch(c.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=c.sent()).tags,r=e.counters,n=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]=e.value}),a={}
14,n.forEach(function(e){a[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),l=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(s).length&&0===Object.keys(a).length&&0===l.length)return[2];return u={tags:o,histogram:a,counters:s,events:l},this.fetch(u),[2]}})})},e.prototype.fetch=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),!N())throw Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if(!r.sent().ok)return this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2];return this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t,r;return(0,E.YH)(this,function(n){switch(n.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=n.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(r=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-r),[2]}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=W(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),Z=function(){var e,t=N();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var r=t.split("=",2),n=ee(r[0]),i=ee(r[1]);return i&&(e[n]=i),e},{}):{}},ee=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},et=r(76459),er=r(79548),en=function(e){return void 0===e&&(e=er.e5),et.i.getInstance(e)},ei=function(e,t){en(t).identityStore.editIdentity().setUserId(e).commit()},eo=function(e,t){en(t).identityStore.editIdentity().setDeviceId(e).commit()};(i=f||(f={})).Unknown="unknown",i.Skipped="skipped",i.Success="success",i.RateLimit="rate_limit",i.PayloadTooLarge="payload_too_large",i.Invalid="invalid",i.Failed="failed",i.Timeout="Timeout",i.SystemError="SystemError";var es=function(e,t){var r=Math.max(t,1);return e.reduce(function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e},[])},ea=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=f.Unknown),{event:e,code:t,message:r}},el=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:er.e5,logLevel:h.Warn,loggerProvider:new P,offline:!1,optOut:!1,serverUrl:er.mJ,serverZone:"US",useBatch:!1}},eu=function(){function e(e){this._optOut=!1;var t,r,n,i,o=el();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(r=e.logLevel)?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(n=e.optOut)?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=ec(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
14,enumerable:!1,configurable:!0}),e}(),ec=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=el().serverZone),void 0===r&&(r=el().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:el().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?er.OP:er.bu:n?er.pL:er.mJ)}},ed=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function eh(e){return e>=200&&e<300}var ef=new Set([er.mJ,er.bu,er.pL,er.OP]);function ep(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var eg=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return(0,E.sH)(this,void 0,void 0,function(){var r,n=this;return(0,E.YH)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(er.fS,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(r=i.sent())&&r.length>0&&Promise.all(r.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=L()),new Promise(function(r){t.queue.push({event:e,attempts:0,callback:function(e){return r(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,E.sH)(this,void 0,void 0,function(){var t,r,n=this;return(0,E.YH)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),[4,es(t,this.config.flushQueueSize).reduce(function(t,r){return(0,E.sH)(n,void 0,void 0,function(){return(0,E.YH)(this,function(n){switch(n.label){case 0:return[4,t];case 1:return n.sent(),[4,this.send(r,e)];case 2:return[2,n.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var r;return void 0===t&&(t=!0),(0,E.sH)(this,void 0,void 0,function(){var n,i,o,s,a;return(0,E.YH)(this,function(l){var u,c,d;switch(l.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,E.Tt)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ed,l.label=1;case 1:return l.trys.push([1,3,,4]),u=i=ec(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,void 0===(c=this.config.enableRequestBodyCompression)&&(c=!1),o=!!ef.has(u)||c,[4,this.config.transportProvider.send(i,n,this.config._enableRequestBodyCompressionExperimental&&o)];case 2:if(null===(s=l.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(ep(s))):this.fulfillRequest(e,s.statusCode,s.status),[2];return this.handleResponse(s,e),[3,4];case 3:return a=(d=l.sent())instanceof Error?d.message:String(d),this.config.loggerProvider.error(a),null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:a,stack_trace:C()}),this.handleResponse({status:f.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){eh(e.statusCode)||null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:ep(e),stack_trace:C()});var r,n=e.status;switch(n){case f.Success:this.handleSuccessResponse(e,t);break;case f.Invalid:this.handleInvalidResponse(e,t);break;case f.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case f.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var r=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var n=new Set((0,E.fX)((0,E.fX)((0,E.fX)((0,E.fX)([],(0,E.zs)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,E.zs)(Object.values(e.body.eventsWithMissingFields)),!1),(0,E.zs)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,E.zs)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!n.has(i)||void r.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(ep(e));
14var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(ep(e)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(e,t){var r=this,n=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(n),a=new Set(i),l=new Set(o),u=t.filter(function(t,n){return t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)?void r.fulfillRequest([t],e.statusCode,e.body.error):(l.has(n)&&(t.timeout=r.throttleTimeout),!0)});u.length>0&&this.config.loggerProvider.warn(ep(e));var c=this.removeEventsExceedFlushMaxRetries(u);this.scheduleEvents(c)},e.prototype.handleOtherResponse=function(e){var t=this,r=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),n=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(n)},e.prototype.fulfillRequest=function(e,t,r){var n,i,o;eh(t)?null==(o=this.diagnosticsClient)||o.increment("analytics.events.sent",e.length):(null==(n=this.diagnosticsClient)||n.increment("analytics.events.dropped",e.length),null==(i=this.diagnosticsClient)||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:r,stack_trace:C()})),this.removeEvents(e),e.forEach(function(e){return e.callback(ea(e.event,t,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),em=function(){function e(){this.name="identity",this.type="before",this.identityStore=en().identityStore}return e.prototype.execute=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){return e.instanceName&&(this.identityStore=en(e.instanceName).identityStore),[2]})})},e}(),ev=r(11991),ey=r(23822),eb=function(e,t){return(0,E.Cl)((0,E.Cl)({},t),{event_type:ey.S.IDENTIFY,user_properties:e.getUserProperties()})},ew=function(e,t,r,n){var i;return(0,E.Cl)((0,E.Cl)({},n),{event_type:ey.S.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:((i={})[e]=t,i)})},eS=function(e,t,r){var n,i=new ev.T$;return i.set(e,t),(0,E.Cl)((0,E.Cl)({},r),{event_type:ey.S.IDENTIFY,user_properties:i.getUserProperties(),groups:((n={})[e]=t,n)})},ek=r(81645),ex=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));(0,ek.a)(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?(0,E.Cl)({},this.properties):{};return e[p.REVENUE_PRODUCT_ID]=this.productId,e[p.REVENUE_QUANTITY]=this.quantity,e[p.REVENUE_PRICE]=this.price,e[p.REVENUE_TYPE]=this.revenueType,e[p.REVENUE_CURRENCY]=this.currency,e[p.REVENUE]=this.revenue,e[p.RECEIPT]=this.receipt,e[p.RECEIPT_SIG]=this.receiptSig,e},e}();(o=p||(p={})).REVENUE_PRODUCT_ID="$productId",o.REVENUE_QUANTITY="$quantity",o.REVENUE_PRICE="$price",o.REVENUE_TYPE="$revenueType",o.REVENUE_CURRENCY="$currency",o.REVENUE="$revenue",o.RECEIPT="$receipt",o.RECEIPT_SIG="$receiptSig";var eE=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eC=r(37511),e_=r.n(eC)()||eC,eO=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this._optOutListeners=[]}return e.prototype.register=function(e,t){var r,n;return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return this.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=L(),this.loggerProvider.warn(`Plugin name is undefined. 
15      Generating a random UUID for plugin name: `.concat(e.name,`. 
16      Set a name for the plugin to prevent it from being added multiple times.`))),e.type=null!=(r=e.type)?r:"enrichment",[4,null==(n=e.setup)?void 0:n.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var r;return(0,E.sH)(this,void 0,void 0,function(){var n,i;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(-1===(n=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[n],this.plugins.splice(n,1),[4,null==(r=i.teardown)?void 0:r.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(r){t.queue.push([e,r]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i,o,s,a,l,u,c,d,h,f,p,g;return(0,E.YH)(this,function(m){switch(m.label){case 0:if(!e)return[2];t=(0,E.zs)(e,1)[0],r=(0,E.zs)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),n=this.plugins.filter(function(e){return"before"===e.type}),m.label=1;case 1:m.trys.push([1,6,7,8]),o=(i=(0,E.Ju)(n)).next(),m.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute((0,E.Cl)({},t))];case 3:if(null===(a=m.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=a,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),m.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return h={error:m.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}
16return[7];case 8:l=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),m.label=9;case 9:m.trys.push([9,14,15,16]),c=(u=(0,E.Ju)(l)).next(),m.label=10;case 10:if(c.done)return[3,13];if(!(s=c.value).execute)return[3,12];return[4,s.execute((0,E.Cl)({},t))];case 11:if(null===(a=m.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=a,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),m.label=12;case 12:return c=u.next(),[3,10];case 13:return[3,16];case 14:return p={error:m.sent()},[3,16];case 15:try{c&&!c.done&&(g=u.return)&&g.call(u)}finally{if(p)throw p.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var r=(0,E.Cl)({},t);return e.execute(r).catch(function(e){return ea(r,0,String(e))})})).then(function(e){var n=(0,E.zs)(e,1)[0]||ea(t,100,"Event not tracked, no destination plugins on the instance");r(n)}),[2]}})})},e.prototype.flush=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t=this;return(0,E.YH)(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return r.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return r.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onIdentityChanged)||r.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onSessionIdChanged)||r.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onOptOutChanged)||r.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i,o,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:a.trys.push([0,7,8,9]),r=(t=(0,E.Ju)(this._optOutListeners)).next(),a.label=1;case 1:if(r.done)return[3,6];n=r.value,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,n(e)];case 3:return a.sent(),[3,5];case 4:return i=a.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return r=t.next(),[3,1];case 6:return[3,9];case 7:return o={error:a.sent()},[3,9];case 8:try{r&&!r.done&&(s=t.return)&&s.call(t)}finally{if(o)throw o.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null==(t=e.onReset)||t.call(e)})},e}(),eI=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new eO(this),this.name=e}return e.prototype._init=function(e){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i,o,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,8,9,10]),n=(r=(0,E.Ju)(t)).next(),a.label=2;case 2:if(n.done)return[3,7];if(!((i=(0,n.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return a.sent(),[3,6];case 4:return[4,i];case 5:a.sent(),a.label=6;case 6:return n=r.next(),[3,2];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(o)throw o.error}
16return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:a.sent(),a.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,r){var n=(0,E.Cl)((0,E.Cl)((0,E.Cl)({},"string"==typeof e?{event_type:e}:e),r),t&&{event_properties:t});return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),R(this.dispatch(n))},e.prototype.identify=function(e,t){var r=eb(e,t);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),R(this.dispatch(r))},e.prototype.groupIdentify=function(e,t,r,n){var i=ew(e,t,r,n);return R(this.dispatch(i))},e.prototype.setGroup=function(e,t,r){var n=eS(e,t,r);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),R(this.dispatch(n))},e.prototype.revenue=function(e,t){var r=(0,E.Cl)((0,E.Cl)({},t),{event_type:ey.S.REVENUE,event_properties:e.getEventProperties()});return R(this.dispatch(r))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),R())},e.prototype._addPlugin=function(e){return R(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),R())},e.prototype._removePlugin=function(e){return R(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(ea(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t=this;return(0,E.YH)(this,function(r){return this.isReady?[2,this.process(e)]:[2,new Promise(function(r){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,r))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,r=null!=(t=this.userProperties)?t:{},n=(0,E.Cl)({},r);if(void 0===e)return n;var i={};return Object.keys(e).forEach(function(t){Object.values(ey.e).includes(t)||(i[t]=e[t])}),ev.Se.forEach(function(t){if(Object.keys(e).includes(t)){var r=e[t];switch(t){case ey.e.CLEAR_ALL:Object.keys(n).forEach(function(e){delete n[e]});break;case ey.e.UNSET:Object.keys(r).forEach(function(e){delete n[e]});break;case ey.e.SET:Object.assign(n,r)}}}),Object.assign(n,i),n},e.prototype.process=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r;return(0,E.YH)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.config.optOut)return[2,ea(e,0,"Event skipped due to optOut config")];return e.event_type===ey.S.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)];case 1:return 200===(t=n.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return r=String(n.sent()),this.config.loggerProvider.error(r),[2,t=ea(e,0,r)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady)return void this.q.push(this._setOptOut.bind(this,!!e));this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=!!e,this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return R(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),eT=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},eR=function(e){return eT(e,"attribution")},eA=function(e){return eT(e,"formInteractions")},eP=function(e){return eT(e,"pageViews")},eM=function(e){return eT(e,"sessions")},eN=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},eD=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},eL=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},eU=function(e){if(eD(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ej=function(e){if(eL(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},eF=function(e){var t;if(eN(e.autocapture)){var r=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.
16networkTracking?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),(0,E.Cl)((0,E.Cl)({},r),{captureRules:null==(t=null==r?void 0:r.captureRules)?void 0:t.map(function(t){var r,n,i;if((null==(r=t.urls)?void 0:r.length)&&(null==(n=t.hosts)?void 0:n.length)){var o=JSON.stringify(t.hosts),s=JSON.stringify(t.urls);return null==(i=e.loggerProvider)||i.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,E.Cl)((0,E.Cl)({},t),{hosts:void 0})}return t})})}},eB=function(e){var t,r=function(){return!1},n=void 0,i=e.pageCounter;return eP(e.defaultTracking)&&(r=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:t,pageCounter:i}},eH=function(e){return eR(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.attribution&&"object"==typeof e.defaultTracking.attribution?(0,E.Cl)({},e.defaultTracking.attribution):{}},ez=function(e){if(eA(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions},eq=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,s=n.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e},eV=function(e){return e&&void 0!==e._q},e$=function(){if("undefined"==typeof navigator)return"";var e,t,r,n,i=navigator.userLanguage;return null!=(n=null!=(r=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?r:i)?n:""},eW="2.39.0",eK="amplitude-ts",eJ=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(eK,"/").concat(eW),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,r;return(0,E.sH)(this,void 0,void 0,function(){var n,i,o;return(0,E.YH)(this,function(s){return n=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,o=null!=(r=e.event_id)?r:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=n),[2,(0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:e$()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:L(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),eY=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),eG=function(){var e,t=N();return null==(e=null==t?void 0:t.navigator)?void 0:e.locks},eX=function(){function e(e,t){void 0===t&&(t={}),this.options=(0,E.Cl)({},e),this.config=t}return e.prototype.isEnabled=function(){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:return t="AMP_TEST",r=new e((0,E.Cl)({},this.options)),n=String(Date.now()),[4,r.transaction(t,function(e){var r,o;try{e.set(n);var s=e.get()===n;return!s&&i.config.diagnosticsClient&&(null==(r=i.config.diagnosticsClient)||r.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:n,sync:!0})),s}catch(e){if(i.config.diagnosticsClient){var a=e instanceof Error?e.message:String(e);null==(o=i.config.diagnosticsClient)||o.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:n,error:a,sync:!0})}return!1}
16finally{e.set(null)}})];case 1:return[2,o.sent()]}})})},e.prototype.get=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:return[4,this.getRaw(e)];case 1:return t=r.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var r=e0(t);if(void 0===r)return void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t));return JSON.parse(r)}catch(r){console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t));return}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,r;return(0,E.sH)(this,void 0,void 0,function(){var n,i,o,s,a,l,u,c;return(0,E.YH)(this,function(d){switch(d.label){case 0:n=N(),d.label=1;case 1:if(d.trys.push([1,4,,5]),!(i=null==n?void 0:n.cookieStore))return[3,3];return[4,i.getAll(e)];case 2:if(o=d.sent()){o.length>1&&(null==(t=this.config.diagnosticsClient)||t.recordEvent("cookies.duplicate",{cookies:o.map(function(e){return e.domain})}),null==(r=this.config.diagnosticsClient)||r.increment("cookies.duplicate.occurrence.cookieStore"));try{for(a=(s=(0,E.Ju)(o)).next();!a.done;a=s.next())if(l=a.value,e1(l.domain,this.options.domain))return[2,l.value]}catch(e){u={error:e}}finally{try{a&&!a.done&&(c=s.return)&&c.call(s)}finally{if(u)throw u.error}}}d.label=3;case 3:return[3,5];case 4:return d.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,r,n=this,i=N(),o=(null!=(r=null==(t=null==i?void 0:i.document)?void 0:t.cookie.split("; "))?r:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,a=this.config.duplicateResolverFn;if("function"==typeof a&&o.length>1&&(s=o.find(function(t){var r;try{var i=a(t.substring(e.length+1));return i||null==(r=n.config.diagnosticsClient)||r.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var r;try{var n=null!=(r=this.options.expirationDays)?r:0,i=null!==t?n:-1,o=void 0;if(i){var s=new Date;s.setTime(s.getTime()+24*i*36e5),o=s}var a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite));var l=N();(null==l?void 0:l.document)&&(l.document.cookie=a)}catch(t){var u=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(u))}},e.prototype.remove=function(e){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){return[2]})})},e.isDomainWritable=function(t){return(0,E.sH)(this,void 0,void 0,function(){var r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];r="AMP_TLDTEST",n=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.transaction(r,function(r){if(e.cachedTlds[t])return!0;try{r.set(1);var n=!!r.get();return n&&(e.cachedTlds[t]=!0),n}finally{r.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return(0,E.sH)(this,void 0,void 0,function(){var r,n,i=this;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(r=eG(),n=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!r)return[2,n()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.request("com.amplitude:cookie-lock:".concat(e),n)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,n()];case 4:return[2]}})})},e.cachedTlds={},e}(),eQ=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},eZ=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},e0=function(e){var t;return null!=(t=eQ(e))?t:eZ(e)},e1=function(e,t){if(""===e&&""===t)return!0;
16if(!e||!t)return!1;var r=e.startsWith(".")?e.substring(1):e,n=t.startsWith(".")?t.substring(1):t;return r.toLowerCase()===n.toLowerCase()},e2=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),[er.r,t,e.substring(0,r)].filter(Boolean).join("_")},e3=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(n){try{null==(r=this.storage)||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),e4=function(e){function t(t){var r,n,i,o=this;try{i=null==(r=N())?void 0:r.localStorage}catch(e){null==(n=null==t?void 0:t.loggerProvider)||n.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return(0,E.C6)(t,e),t.prototype.set=function(t,r){var n;return(0,E.sH)(this,void 0,void 0,function(){var i;return(0,E.YH)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(r)&&r.length>1e3))return[3,2];return i=r.length-1e3,[4,e.prototype.set.call(this,t,r.slice(0,1e3))];case 1:return o.sent(),null==(n=this.loggerProvider)||n.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,r)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(e3),e6=function(e){function t(){var t;return e.call(this,null==(t=N())?void 0:t.sessionStorage)||this}return(0,E.C6)(t,e),t}(e3);function e5(){return"undefined"!=typeof CompressionStream}function e8(e){return(0,E.sH)(this,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,new Response(new Blob([e]).stream().pipeThrough(new t("gzip"))).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var e9=function(){function e(){}return e.prototype.send=function(e,t,r){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,o,s,a,l,u,c,d,h,p,g,m,v,y,b,w,S,k,x,E=e.code||0,C=this.buildStatus(E);switch(C){case f.Success:return{status:C,statusCode:E,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(r=e.payload_size_bytes)?r:0,serverUploadTime:null!=(n=e.server_upload_time)?n:0}};case f.Invalid:return{status:C,statusCode:E,body:{error:null!=(i=e.error)?i:"",missingField:null!=(o=e.missing_field)?o:"",eventsWithInvalidFields:null!=(s=e.events_with_invalid_fields)?s:{},eventsWithMissingFields:null!=(a=e.events_with_missing_fields)?a:{},eventsWithInvalidIdLengths:null!=(l=e.events_with_invalid_id_lengths)?l:{},epsThreshold:null!=(u=e.eps_threshold)?u:0,exceededDailyQuotaDevices:null!=(c=e.exceeded_daily_quota_devices)?c:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(h=e.silenced_events)?h:[],throttledDevices:null!=(p=e.throttled_devices)?p:{},throttledEvents:null!=(g=e.throttled_events)?g:[]}};case f.PayloadTooLarge:return{status:C,statusCode:E,body:{error:null!=(m=e.error)?m:""}};case f.RateLimit:return{status:C,statusCode:E,body:{error:null!=(v=e.error)?v:"",epsThreshold:null!=(y=e.eps_threshold)?y:0,throttledDevices:null!=(b=e.throttled_devices)?b:{},throttledUsers:null!=(w=e.throttled_users)?w:{},exceededDailyQuotaDevices:null!=(S=e.exceeded_daily_quota_devices)?S:{},exceededDailyQuotaUsers:null!=(k=e.exceeded_daily_quota_users)?k:{},throttledEvents:null!=(x=e.throttled_events)?x:[]}};case f.Timeout:default:return{status:C,statusCode:E}}},e.prototype.buildStatus=function(e){return eh(e)?f.Success:429===e?f.RateLimit:413===e?f.PayloadTooLarge:408===e?f.Timeout:e>
16=400&&e<500?f.Invalid:e>=500?f.Failed:f.Unknown},e}(),e7=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.state={done:4},r.customHeaders=t,r}return(0,E.C6)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,E.sH)(this,void 0,void 0,function(){var n=this;return(0,E.YH)(this,function(i){return[2,new Promise(function(i,o){"undefined"==typeof XMLHttpRequest&&o(Error("XHRTransport is not supported."));var s=new XMLHttpRequest;s.open("POST",e,!0),s.onreadystatechange=function(){if(s.readyState===n.state.done){var e=s.responseText;try{i(n.buildResponse(JSON.parse(e)))}catch(e){i(n.buildResponse({code:s.status}))}}};var a={"Content-Type":"application/json",Accept:"*/*"},l=JSON.stringify(t),u=r&&l.length>=2048&&e5(),c=function(e){var t,r;a=(0,E.Cl)((0,E.Cl)({},n.customHeaders),a);try{for(var i=(0,E.Ju)(Object.entries(a)),o=i.next();!o.done;o=i.next()){var l=(0,E.zs)(o.value,2),u=l[0],c=l[1];s.setRequestHeader(u,c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}s.send(e)};(0,E.sH)(n,void 0,void 0,function(){var e;return(0,E.YH)(this,function(t){switch(t.label){case 0:if(!u)return[3,2];return[4,e8(l)];case 1:return(e=t.sent())?(a["Content-Encoding"]="gzip",c(e)):c(l),[3,3];case 2:c(l),t.label=3;case 3:return[2]}})}).catch(o)})]})})},t}(e9),te=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.customHeaders=t,r}return(0,E.C6)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,E.sH)(this,void 0,void 0,function(){var n,i,o,s,a,l,u;return(0,E.YH)(this,function(c){switch(c.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");if(n=JSON.stringify(t),i=r&&n.length>=2048&&e5(),o=n,s={"Content-Type":"application/json",Accept:"*/*"},!i)return[3,2];return[4,e8(n)];case 1:(a=c.sent())&&(s["Content-Encoding"]="gzip",o=a),c.label=2;case 2:return[4,fetch(e,{headers:s=(0,E.Cl)((0,E.Cl)({},this.customHeaders),s),body:o,method:"POST"})];case 3:return[4,(l=c.sent()).text()];case 4:u=c.sent();try{return[2,this.buildResponse(JSON.parse(u))]}catch(e){return[2,this.buildResponse({code:l.status})]}}})})},t}(e9),tt=function(e){function t(){return e.call(this)||this}return(0,E.C6)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,E.sH)(this,void 0,void 0,function(){var r=this;return(0,E.YH)(this,function(n){return[2,new Promise(function(n,i){var o=N();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);if(o.navigator.sendBeacon(e,s))return n(r.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}));return n(r.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(e9),tr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tn=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},ti="[Amplitude]",to="".concat(ti," Form Started"),ts="".concat(ti," Form Submitted"),ta="".concat(ti," File Downloaded"),tl="session_start",tu="session_end",tc="".concat(ti," File Extension"),td="".concat(ti," File Name"),th="".concat(ti," Link ID"),tf="".concat(ti," Link Text"),tp="".concat(ti," Link URL"),tg="".concat(ti," Form ID"),tm="".concat(ti," Form Name"),tv="".concat(ti," Form Destination"),ty="cookie",tb={always:"always",ifEmptyCampaign:"ifEmptyCampaign"},tw=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},tS=function(e,t,r,n,i,o){void 0===i&&(i=!0),e.referrer;var s=e.referring_domain,a=(0,E.Tt)(e,["referrer","referring_domain"]),l=t||{},u=(l.referrer,l.referring_domain),c=(0,E.Tt)(l,["referrer","referring_domain"]),d=r.excludeInternalReferrers;if(d){var h=tC(d,n);if(!(h instanceof TypeError)&&e.referring_domain&&tT(e.referring_domain,o)){if("always"===h)return t_(h,e.referring_domain,n),!1;else if("ifEmptyCampaign"===h&&Object.values((0,E.Cl)((0,E.Cl)({},e),{referring_domain:void 0,referrer:void 0})).every(function(e){return!e}))return t_(h,e.referring_domain,n),!1}}if(tk(r.excludeReferrers,e.referring_domain))return n.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return n.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var f=JSON.stringify(a)!==JSON.stringify(c),p=tw(s||"")!==tw(u||""),g=!t||f||p;return g?n.debug("This is a new campaign. An $identify event will be sent."):n.debug("This is not a new campaign because it's the same as the previous one."),g},tk=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},tx=function(e,t){var r=t.startsWith(".")?t:".".concat(t);return!!(e.startsWith(".")?e:".".concat(e)).endsWith(r)},tE=function(e){var t=e;
16return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},tC=function(e,t){if(!0===e)return tb.always;if("object"==typeof e){var r=e.condition;if("string"==typeof r&&Object.keys(tb).includes(r))return r;if(void 0===r)return tb.always}var n="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(n),TypeError(n)};function t_(e,t,r){var n="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?r.debug(n):"ifEmptyCampaign"===e&&r.debug("".concat(n," with empty campaign parameters"))}var tO=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],tI=function(e){var t,r,n=e||(null==(r=null==(t=N())?void 0:t.location)?void 0:r.hostname);if(!n)return"";var i=n.split("."),o=i[i.length-1],s=i[i.length-2];return(tO.find(function(e){return n.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s)?"".concat(s,".").concat(o):o},tT=function(e,t){var r=N();return!!r&&tx(e,(t||"").trim()||tI(r.location.hostname))},tR=function(e){function t(t,r,n,i,o,s,a,l,u,c,d,f,p,g,m,v,y,b,w,S,k,x,E,C,_,O,I,T,R,A,M,N,D,L,U,j,F,B,H,z,q,V,$,W,K){void 0===n&&(n=new eY),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===l&&(l=1e3),void 0===u&&(u=5),void 0===c&&(c=30),void 0===d&&(d=ty),void 0===v&&(v=new P),void 0===y&&(y=h.Warn),void 0===w&&(w=!1),void 0===S&&(S=!1),void 0===E&&(E=""),void 0===C&&(C="US"),void 0===I&&(I=18e5),void 0===T&&(T=new e4({loggerProvider:v})),void 0===R&&(R={ipAddress:!0,language:!0,platform:!0}),void 0===A&&(A="fetch"),void 0===M&&(M=!1),void 0===N&&(N=!0),void 0===B&&(B=!0),void 0===H&&(H=0),void 0===$&&($=!1),void 0===W&&(W=!1);var J,Y=this;(Y=e.call(this,{apiKey:t,storageProvider:T,transportProvider:tM(A)})||this).apiKey=t,Y.appVersion=r,Y.cookieOptions=i,Y.defaultTracking=o,Y.autocapture=s,Y.flushIntervalMillis=l,Y.flushMaxRetries=u,Y.flushQueueSize=c,Y.identityStorage=d,Y.ingestionMetadata=f,Y.instanceName=p,Y.loggerProvider=v,Y.logLevel=y,Y.minIdLength=b,Y.offline=w,Y.partnerId=k,Y.plan=x,Y.serverUrl=E,Y.serverZone=C,Y.sessionTimeout=I,Y.storageProvider=T,Y.trackingOptions=R,Y.transport=A,Y.useBatch=M,Y.fetchRemoteConfig=N,Y.networkTrackingOptions=j,Y.identify=F,Y.enableDiagnostics=B,Y.diagnosticsSampleRate=H,Y.diagnosticsClient=z,Y.remoteConfig=q,Y.topLevelDomain=V,Y.enableRequestBodyCompression=$,Y._enableRequestBodyCompressionExperimental=W,Y.customEnrichment=K,Y.version=eW,Y._optOut=!1,Y._cookieStorage=n,Y.deviceId=a,Y.lastEventId=g,Y.lastEventTime=m,Y.optOut=S,Y.deferredSessionId=O,Y.sessionId=_,Y.pageCounter=L,Y.userId=D,Y.debugLogsEnabled=U,Y.loggerProvider.enable(U?h.Debug:Y.logLevel),Y.networkTrackingOptions=j,Y.identify=F,Y.enableDiagnostics=B,Y.diagnosticsSampleRate=H,Y.diagnosticsClient=z;var G=null!=(J=null==q?void 0:q.fetchRemoteConfig)?J:N;return Y.remoteConfig=Y.remoteConfig||{},Y.remoteConfig.fetchRemoteConfig=G,Y.fetchRemoteConfig=G,Y.topLevelDomain=V||tI(),Y}return(0,E.C6)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
16,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof eX&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(e2(this.apiKey),e)},t}(eu),tA=function(e,t,r){switch(void 0===e&&(e=ty),void 0===t&&(t={}),e){case"localStorage":return new e4;case"sessionStorage":return new e6;case"none":return new eY;default:return new eX((0,E.Cl)((0,E.Cl)({},t),{expirationDays:t.expiration}),r)}},tP=function(e){var t,r;return void 0===e&&(e={}),(null==(t=e.remoteConfig)?void 0:t.fetchRemoteConfig)===!0||(null==(r=e.remoteConfig)?void 0:r.fetchRemoteConfig)!==!1&&!1!==e.fetchRemoteConfig},tM=function(e){var t="object"==typeof e?e.type:e,r="object"==typeof e?e.headers:void 0;return"xhr"===t?new e7(r):"beacon"===t?new tt:new te(r)},tN="data-amp-mask",tD="*****",tL=/\b(?:\d[ -]*?){13,16}\b/,tU=/(\d{3}-?\d{2}-?\d{4})/g,tj=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,tF=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var r,n,i=e;i=(i=(i=i.replace(tL,tD)).replace(tU,tD)).replace(tj,tD);try{for(var o=(0,E.Ju)(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,tD)}catch(e){}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},tB=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(tN)?tD:e?e(document.title):document.title},tH=function(){function e(){}return e.prototype.parse=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){return[2,(0,E.Cl)((0,E.Cl)((0,E.Cl)((0,E.Cl)({},er.F3),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=Z();return{utm_campaign:e[er._9],utm_content:e[er.fL],utm_id:e[er.Cs],utm_medium:e[er.Jn],utm_source:e[er.VU],utm_term:e[er.Wx]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=Z();return(e={})[er.h2]=t[er.h2],e[er.lT]=t[er.lT],e[er.wX]=t[er.wX],e[er.q2]=t[er.q2],e[er.KY]=t[er.KY],e[er.Ct]=t[er.Ct],e[er.qr]=t[er.qr],e[er.wu]=t[er.wu],e[er.tt]=t[er.tt],e[er.Gp]=t[er.Gp],e[er.SO]=t[er.SO],e},e}(),tz=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t},tq="AMP_PAGE_VIEW",tV=function(e){void 0===e&&(e={});var t,r,n,i=N(),o=void 0,s=!1,a=e.trackOn,l=e.trackHistoryChanges,u=e.eventType,c=void 0===u?"[Amplitude] Page Viewed":u,d=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==o||o.error("Malformed URI sequence: ",e)}return t},h=function(e){return(0,E.sH)(void 0,void 0,void 0,function(){var t,r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:return t=d("undefined"!=typeof location&&location.href||""),n={event_type:c},r=[{}],[4,t$()];case 1:return[2,(n.event_properties=E.Cl.apply(void 0,[E.Cl.apply(void 0,r.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&d(location.pathname)||"","[Amplitude] Page Title":tB(tF),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),n)]}})})},f=function(){return void 0===a||"function"==typeof a&&a()},p="undefined"!=typeof location?location.href:null,g=function(){(0,E.sH)(void 0,void 0,void 0,function(){var e,r,i,s,a;return(0,E.YH)(this,function(u){switch(u.label){case 0:if(r=tK(l,e=location.href,p||"")&&f(),p=e,!r)return[3,4];if(i=void 0,n&&(i=L(),n.set(tq,{pageViewId:i})),null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return a=(s=t).track,[4,h(i)];case 2:a.apply(s,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,a){return(0,E.sH)(void 0,void 0,void 0,function(){var l,u,c;return(0,E.YH)(this,function(d){switch(d.label){case 0:if(t=a,r=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),s=!0,i){try{n=new e3(i.sessionStorage)}catch(e){null==o||o.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",g),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,r){var n=(0,E.zs)(r,3),i=n[0],o=n[1],a=n[2];e.apply(t,[i,o,a]),s&&g()}})}if(!f())return[3,2];return o.log("Tracking page view event"),l=void 0,n&&(l=L(),n.set(tq,{pageViewId:l})),c=(u=t).track,[4,h(l)];case 1:c.apply(u,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){var t,i,s;return(0,E.YH)(this,function(l){switch(l.label){case 0:if(!("attribution"===a&&tW(e)))return[3,4];
16if(null==o||o.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,!n)return[3,2];return[4,n.get(tq)];case 1:t=null==(i=l.sent())?void 0:i.pageViewId,l.label=2;case 2:return[4,h(t)];case 3:e.event_type=(s=l.sent()).event_type,e.event_properties=(0,E.Cl)((0,E.Cl)({},e.event_properties),s.event_properties),l.label=4;case 4:return r&&e.event_type===c&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=(0,E.Cl)((0,E.Cl)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(e){return i&&(i.removeEventListener("popstate",g),s=!1),[2]})})}}},t$=function(){return(0,E.sH)(void 0,void 0,void 0,function(){var e;return(0,E.YH)(this,function(t){switch(t.label){case 0:return e=tz,[4,new tH().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tW=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[ey.e.SET]||{},n=t[ey.e.UNSET]||{},i=(0,E.fX)((0,E.fX)([],(0,E.zs)(Object.keys(r)),!1),(0,E.zs)(Object.keys(n)),!1);return Object.keys(er.F3).every(function(e){return i.includes(e)})}return!1},tK=function(e,t,r){if("pathOnly"!==e)return t!==r;if(""==r)return!0;var n=new URL(t),i=new URL(r);return n.origin+n.pathname!==i.origin+i.pathname},tJ=function(){var e,t,r=[],n=function(e,t,n){e.addEventListener(t,n),r.push({element:e,type:t,handler:n})},i=function(){r.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),r=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(r,i){return(0,E.sH)(void 0,void 0,void 0,function(){var o,s;return(0,E.YH)(this,function(a){return t=ez(r),o=function(){if(!i)return void r.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("undefined"!=typeof document){var o=new WeakSet,s=function(e){if(!o.has(e)){o.add(e);var s=!1;n(e,"change",function(){var t,r=tG(e);s||i.track(to,((t={})[tg]=tY(e.id),t[tm]=tY(e.name),t[tv]=r,t)),s=!0}),n(e,"submit",function(n){var o,a,l=tG(e);if(s||i.track(to,((o={})[tg]=tY(e.id),o[tm]=tY(e.name),o[tv]=l,o)),s=!0,(null==t?void 0:t.shouldTrackSubmit)!==void 0)if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&n instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(n))return}catch(e){r.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else r.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(ts,((a={})[tg]=tY(e.id),a[tm]=tY(e.name),a[tv]=l,a)),s=!1})}};Array.from(document.getElementsByTagName("form")).forEach(s),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&s(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(s)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?o():(s=N())?s.addEventListener("load",o):r.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return null==e||e.disconnect(),i(),[2]})})}}},tY=function(e){if("string"==typeof e)return e},tG=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},tX=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,n){return(0,E.sH)(void 0,void 0,void 0,function(){var i,o;return(0,E.YH)(this,function(s){return i=function(){if(!n)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),s=null==i?void 0:i[1];s&&r(e,"click",function(){var r;s&&n.track(ta,((r={})[tc]=s,r[td]=t.pathname,r[th]=e.id,r[tf]=e.text,r[tp]=e.href,r))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
16Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=N())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},tQ=!1,tZ=function(e){if(!tQ&&void 0===e.defaultTracking){var t=`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:
17
18amplitude.init(<YOUR_API_KEY>, {
19  defaultTracking: true,
20});
21
22Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),tQ=!0}},t0=function(){var e=N(),t=[],r=function(r,n){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(r,n),t.push({type:r,handler:n}))},n=function(){t.forEach(function(t){var r=t.type,n=t.handler;null==e||e.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(n){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,r("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),r("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(e){return n(),[2]})})}}};function t1(e,t,r){var n,i,o=[];try{for(var s=(0,E.Ju)(null!=t?t:[]),a=s.next();!a.done;a=s.next()){var l=a.value;try{o.push(new RegExp(l))}catch(e){r.loggerProvider.warn("Invalid regex pattern: ".concat(l),e)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return e.concat(o)}var t2=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],t3="data-amp-track-",t4=["div","span","h1","h2","h3","h4","h5","h6"],t6=r(79294),t5=r.n(t6);function t8(e,t){return new(t5())(function(r){e.subscribe({next:function(e){t(e).then(function(e){return r.next(e)}).catch(function(e){return r.error(e)})},error:function(e){r.error(e)},complete:function(){r.complete()}})})}function t9(e,t){return new(t5())(function(r){var n=!1,i=new Set,o=function(){var e,t;n=!0;try{for(var r=(0,E.Ju)(i),o=r.next();!o.done;o=r.next()){var s=o.value;try{s.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.clear()},s=function(e){var t=e.subscribe({next:function(e){n||r.next(e)},error:function(e){n||(n=!0,r.error(e),o())},complete:function(){i.delete(t),n||0!==i.size||(r.complete(),o(),n=!0)}});i.add(t)};return s(e),s(t),o})}function t7(e){var t=new Set,r=null;function n(){null==r||r.unsubscribe(),r=null,t.clear()}return new(t5())(function(i){return t.add(i),null===r&&(r=e.subscribe({next:function(e){try{for(var r,n,i,o=(0,E.Ju)(t),s=o.next();!s.done;s=o.next()){var a=s.value;null==(i=a.next)||i.call(a,e)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},error:function(e){try{for(var r,i,o,s=(0,E.Ju)(t),a=s.next();!a.done;a=s.next()){var l=a.value;null==(o=l.error)||o.call(l,e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}n()},complete:function(){try{for(var e,r,i,o=(0,E.Ju)(t),s=o.next();!s.done;s=o.next()){var a=s.value;null==(i=a.complete)||i.call(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}n()}})),function(){t.delete(i),0===t.size&&r&&(r.unsubscribe(),r=null)}})}var re="https://app.amplitude.com",rt={US:re,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},rr="__AMPLITUDE_MESSENGER_INSTANCE__",rn="__AMPLITUDE_MESSENGER__",ri=function(){function e(e){var t=(void 0===e?{}:e).origin;this[g]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=void 0===t?re:t}return e.prototype.notify=function(e){var t,r,n,i;null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(n=window.opener)?void 0:n.postMessage)||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){n.requestCallbacks[i]={resolve:t,reject:s},n.notify(o),r.timeout>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.registerActionHandler=function(e,t){this.actionHandlers.has(e)&&(null==(o=null==(i=this.logger)?void 0:i.warn)||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var r,n,i,o,s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=(0,E.Ju)(s),l=a.next();!l.done;l=a.next()){var u=l.value;t(u)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},e.prototype.loadScriptOnce=function(e){return(0,E.sH)(this,void 0,void 0,function(){var t,r,n;return(0,E.YH)(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];r=(document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,r){var n;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){r({status:!1,message:"Failed to load the script ".concat(e)})}),null==(n=document.head)||n.appendChild(i)}catch(e){r(e)}})).then(function(){}),this.scriptLoadPromises.set(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r];case 2:return i.sent(),[3,4];case 3:throw n=i.sent(),this.scriptLoadPromises.delete(e),n;case 4:return[2]}})})},e.prototype.setup=function(e){var t,r,n=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===re&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Setting up messenger"),this.messageHandler=function(e){if(null==(r=null==(t=n.logger)?void 0:t.debug)||r.call(t,"Message received: ",JSON.stringify(e)),n.endpoint===e.origin){var t,r,i,o,s,a=e.data,l=null==a?void 0:a.action;if(l)if("id"in a&&a.id)null==(o=null==(i=n.logger)?void 0:i.debug)||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),n.handleResponse(a
22);else{if("ping"===l)return void n.notify({action:"pong"});var u=n.actionHandlers.get(l);if(u)u(a.data);else{var c=null!=(s=n.pendingMessages.get(l))?s:[];c.push(a.data),n.pendingMessages.set(l,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=N();(null==e?void 0:e[rn])===this&&delete e[rn]},e}();g=rr;var ro="__AMPLITUDE_BACKGROUND_CAPTURE__",rs="1.25.2",ra="[Amplitude] Element Clicked",rl="[Amplitude] Element Tag",ru="[Amplitude] Element Text",rc="[Amplitude] Page URL",rd="[Amplitude] Viewport Height",rh="[Amplitude] Viewport Width",rf="[Amplitude] Page View ID",rp="data-amp-mask-attributes",rg=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},rm=function(e,t){var r=e;try{r=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return r},rv=["input","select","textarea"],ry=function(e,t){var r,n=null==(r=null==window?void 0:window.getComputedStyle)?void 0:r.call(window,e);return(null==n?void 0:n.getPropertyValue("cursor"))==="pointer"&&"click"===t},rb=function(e){var t=e.pageUrlAllowlist,r=e.pageUrlExcludelist;return!(r&&r.length>0&&rg(window.location.href,r))&&!!rg(window.location.href,t)},rw=function(e,t,r){return void 0===r&&(r=!1),function(n,i){var o,s,a=e.shouldTrackEventResolver,l=null==(s=null==(o=null==i?void 0:i.tagName)?void 0:o.toLowerCase)?void 0:s.call(o);if(!l)return!1;if(a)return a(n,i);if(!rb(e))return!1;var u=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}var c=ry(i,n);if(r&&c)return!0;if(t&&!t.some(function(e){var t;return!!(null==(t=null==i?void 0:i.matches)?void 0:t.call(i,e))}))return!1;switch(l){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:if(c)return!0;return"click"===n}}},rS=function(e){var t,r,n,i=null==(r=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:r.call(t),o=e instanceof HTMLElement&&(null==(n=e.getAttribute("contenteditable"))?void 0:n.toLowerCase())==="true";return!rv.includes(i)&&!o},rk=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return null!=n&&("object"!=typeof n||0!==Object.keys(n).length)&&("string"!=typeof n||0!==n.trim().length)&&(t[r]=n),t},{})},rx=function(){var e;try{var t=N(),r=null==(e=null==t?void 0:t.sessionStorage)?void 0:e.getItem("AMP_PAGE_VIEW");if(!r)return;var n=JSON.parse(r);if("string"==typeof n.pageViewId)return n.pageViewId}catch(e){}},rE=function(e,t){return e?t.some(function(t){var r;return null==(r=null==e?void 0:e.matches)?void 0:r.call(e,t)})?e:rE(null==e?void 0:e.parentElement,t):null},rC=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor};(s=m||(m={}))[s.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",s[s.MIDDLE=1]="MIDDLE",s[s.RIGHT=2]="RIGHT";var r_="__AMPLITUDE_VISUAL_TAGGING__",rO=N(),rI=null==rO?void 0:rO.console,rT={},rR={},rA=!1,rP=function(e,t){if(!rI||"function"!=typeof rI[e]||!rR[e]&&(rR[e]=rI[e],rI[e]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{if(rT[e]&&!rA){rA=!0;var n=rT[e];n&&n.forEach(function(r){try{r(e,t)}catch(e){}})}}catch(e){}return rA=!1,rR[e].apply(rI,t)},0))return Error("Console override failed");rT[e]?rT[e].push(t):rT[e]=[t]},rM=function(e){var t,r;try{for(var n=(0,E.Ju)(Object.values(rT)),i=n.next();!i.done;i=n.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},rN=N(),rD=function(){return new(t5())(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},rL=function(e){return void 0===e&&(e="click"),new(t5())(function(t){var r,n=function(e){t.next(e)};return null==(r=N())||r.document.addEventListener(e,n,{capture:!0}),function(){var t;null==(t=N())||t.document.removeEventListener(e,n,{capture:!0})}})},rU=function(){var e=t9(new(t5())(function(e){var t=function(t){if(t instanceof ErrorEvent){var r={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?r=(0,E.Cl)((0,E.Cl)({},r),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(r.message=t.error),e.next(r)}};return rN.addEventListener("error",t),function(){rN.removeEventListener("error",t)}}),new(t5())(function(e){var t=function(t){var r={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(r.message=t.reason.message,r.stack=t.reason.stack):"string"==typeof t.reason&&(r.message=t.reason),e.next(r)};return rN.addEventListener("unhandledrejection",t),function(){rN.removeEventListener("unhandledrejection",t)}}));return t9(e,new(t5())(function(e){var t=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=void 0;Array.isArray(r[0])&&"string"==typeof r[0][0]&&(i=r[0][0]),e.next({kind:"console",message:i})};return rP("error",t),function(){rM(t)}}
22))},rj=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},rF=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var r=document.documentElement;if(e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector)return r.querySelector(e.selector);return r}}catch(e){}},rB=function(e,t,r){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var n=r.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=n}})},rH={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},rz=function(e){var t,r,n,i,o=Object.values(rH).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var s=(0,E.Ju)(e),a=s.next();!a.done;a=s.next()){var l=a.value;try{try{for(var u=(n=void 0,(0,E.Ju)(l.definition)),c=u.next();!c.done;c=u.next()){var d=rH[c.value.event_type];d&&o[d].add(l.id)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==l?void 0:l.id,e)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o},rq=function(e){var t,r,n,i,o=new Map;try{for(var s=(0,E.Ju)(e),a=s.next();!a.done;a=s.next()){var l=a.value;try{for(var u=(n=void 0,(0,E.Ju)(l.conditions)),c=u.next();!c.done;c=u.next()){var d=c.value;if("LABELED_EVENT"===d.type){var h=d.match.eventId,f=o.get(h);f||(f=[],o.set(h,f)),f.push(l)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o},rV=function(e,t){var r,n,i,o,s=new Set;try{for(var a=(0,E.Ju)(e),l=a.next();!l.done;l=a.next()){var u=l.value,c=t.get(u.id);if(c)try{for(var d=(i=void 0,(0,E.Ju)(c)),h=d.next();!h.done;h=d.next()){var f=h.value;s.add(f)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return Array.from(s)},r$=function(){function e(e,t,r,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=r,this.options=n}return e.prototype.evaluate=function(e){var t,r,n=this.options.pageActions;if(!n)return e;var i=rV(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return n.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return rH[t.event_type]===e.type&&t.filters.every(function(t){return rj(e,t)})})}),this.labeledEventToTriggerMap);try{for(var o=(0,E.Ju)(i),s=o.next();!s.done;s=o.next()){var a=s.value;rB(a.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=r},e}(),rW=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",rp,tN]),rK=["type"],rJ=["svg","path","g"],rY=["password","hidden"],rG=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),rX=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var r=[],n=e;n;){var i=rQ(n,!!t,n===e);if(!i||(r.push(i),i.optimized))break;n=n.parentElement}return r.reverse(),r.join(" > ")},rQ=function(e,t,r){if(e.nodeType!==Node.ELEMENT_NODE)return null;var n,i,o=e.getAttribute("id");if(t){if(o)return new rG(c(o),!0);var s=e.tagName.toLowerCase();if("body"===s||"head"===s||"html"===s)return new rG(s,!0)}var a=e.tagName.toLowerCase();if(o)return new rG(a+c(o),!0);var l=e.parentNode;if(!l||l.nodeType===Node.DOCUMENT_NODE)return new rG(a,!0);function u(e){var t=e.getAttribute("class");
22return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function c(e){return"#"+CSS.escape(e)}for(var d=u(e),h=!1,f=!1,p=-1,g=-1,m=l.children,v=0;m&&(-1===p||!f)&&v<m.length;++v){var y=m[v];if(y.nodeType===Node.ELEMENT_NODE){if(g+=1,y===e){p=g;continue}if(!f&&y.tagName.toLowerCase()===a){h=!0;var b=new Set(d);if(!b.size){f=!0;continue}for(var w=u(y),S=0;S<w.length;++S){var k=w[S];if(b.has(k)&&(b.delete(k),!b.size)){f=!0;break}}}}}var x=a;if(r&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(x+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),f)x+=":nth-child("+String(p+1)+")";else if(h)try{for(var C=(0,E.Ju)(d),_=C.next();!_.done;_=C.next()){var O=_.value;x+="."+CSS.escape(O.slice(1))}}catch(e){n={error:e}}finally{try{_&&!_.done&&(i=C.return)&&i.call(C)}finally{if(n)throw n.error}}return new rG(x,!1)},rZ=function(e,t){var r,n,i,o=this;this.replaceSensitiveString=function(e){return tF(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,r,n,i,s=performance.now(),a=[];if(!e)return[];for(var l=function(e){var t=[];if(!e)return t;
22t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t}(e),u=new Map,c=l.length-1;c>=0;c--){var d=l[c];if(d){var h,f=(h=d.getAttribute(rp))?h.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],p=c===l.length-1?[]:null!=(n=u.get(l[c+1]))?n:new Set,g=new Set((0,E.fX)((0,E.fX)([],(0,E.zs)(p),!1),(0,E.zs)(f),!1));u.set(d,g)}}a=l.map(function(e){var t;return function(e,t){if(null===e)return null;var r,n,i,o,s,a,l=String(e.tagName).toLowerCase(),u={tag:l},c=Array.from(null!=(o=null==(i=e.parentElement)?void 0:i.children)?o:[]);c.length&&(u.index=c.indexOf(e),u.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null==(a=null==(s=e.previousElementSibling)?void 0:s.tagName)?void 0:a.toLowerCase();d&&(u.prevSib=String(d));var h=e.getAttribute("id");h&&(u.id=String(h));var f=Array.from(e.classList);f.length&&(u.classes=f);var p={},g=Array.from(e.attributes).filter(function(e){return!rW.has(e.name)}),m=!rS(e);if(!rY.includes(String(e.getAttribute("type")))&&!rJ.includes(l))try{for(var v=(0,E.Ju)(g),y=v.next();!y.done;y=v.next()){var b=y.value;if(!m||rK.includes(b.name)){if(t.has(b.name)){p[b.name]=tD;continue}p[b.name]=String(b.value).substring(0,128)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return Object.keys(p).length&&(u.attrs=p),u}(e,null!=(t=u.get(e))?t:new Set)});var m=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var r=(0,E.zs)(t,2),n=r[0],i=r[1];e.attrs&&(e.attrs[n]=o.replaceSensitiveString(i))})};try{for(var v=(0,E.Ju)(a),y=v.next();!y.done;y=v.next()){var b=y.value;m(b)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}var w=performance.now();return null==(i=o.diagnosticsClient)||i.recordHistogram("autocapturePlugin.getHierarchy",w-s),a},this.getNearestLabel=function(e){var t,r=e.parentElement;if(!r)return"";try{t=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(r)},this.getElementPath=function(e){if(!e)return"";var t,r=performance.now(),n=rX(e),i=performance.now();return null==(t=o.diagnosticsClient)||t.recordHistogram("autocapturePlugin.getElementPath",i-r),n},this.getEventProperties=function(e,t,r){var n,i,s,a,l=null==(s=null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase)?void 0:s.call(i),u="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=o.getHierarchy(t),d=null==(a=c[0])?void 0:a.attrs,h=o.getNearestLabel(t),f=Object.entries(null!=d?d:{}).reduce(function(e,t){var n=(0,E.zs)(t,2),i=n[0],o=n[1];if(i.startsWith(r)){var s=i.replace(r,"");s&&(e[s]=o||"")}return e},{}),p=((n={})["[Amplitude] Element Hierarchy"]=c,n[rl]=l,n[ru]=o.getText(t),n["[Amplitude] Element Position Left"]=null==u.left?null:Math.round(u.left),n["[Amplitude] Element Position Top"]=null==u.top?null:Math.round(u.top),n["[Amplitude] Element Attributes"]=f,n["[Amplitude] Element Path"]=o.getElementPath(t),n["[Amplitude] Element Parent Label"]=h,n[rc]=rm(window.location.href.split("?")[0]),n["[Amplitude] Page Title"]=tB(o.replaceSensitiveString),n[rd]=window.innerHeight,n[rh]=window.innerWidth,n),g=rx();if(g&&(p[rf]=g),p["[Amplitude] Element ID"]=t.getAttribute("id")||"",p["[Amplitude] Element Class"]=t.getAttribute("class"),p["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===l&&"click"===e&&t instanceof HTMLAnchorElement){var m=t.href.substring(0,128);p["[Amplitude] Element Href"]=o.replaceSensitiveString(m)}return rk(p)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,r,n,i){void 0===i&&(i=!1);var s=o.addTypeAndTimestamp(e,t);if(("click"===s.type||"change"===s.type)&&null!==s.event.target){if(i&&ry(s.event.target,s.type))return s.closestTrackedAncestor=s.event.target,s.targetElementProperties=o.getEventProperties(s.type,s.closestTrackedAncestor,n),s;var a=rE(s.event.target,r);a&&(s.closestTrackedAncestor=a,s.targetElementProperties=o.getEventProperties(s.type,a,n))}return s},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var r=rF(e,t);if(r){if("TEXT"===e.elementExtractType)return o.getText(r);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return r.getAttribute(e.attribute)}}},this.getTextWithMaskedDescendants=function(e){var t,r,n="[".concat(tN,"], [contenteditable]");if(!e.querySelector(n))return e.innerText;var i="",s=Array.from(e.childNodes);try{for(var a=(0,E.Ju)(s),l=a.next();!l.done;l=a.next()){var u=l.value;if(u.nodeType===Node.TEXT_NODE){i+=u.textContent||"";continue}if(u instanceof Element){if(u.hasAttribute(tN)||u.hasAttribute("contenteditable")){i+=tD;continue}i+=o.getTextWithMaskedDescendants(u)}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(tN,"]")))return tD;var t="";return t=e.querySelector("[".concat(tN,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveStr
22ing(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){if(!e)return{};var t,r,n,i=null==(n=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:n.call(r);return rk(((t={})[rl]=i,t[ru]=o.getText(e),t[rc]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var s=null!=(i=e.maskTextRegex)?i:[],a=[];try{for(var l=(0,E.Ju)(s),u=l.next();!u.done;u=l.next()){var c=u.value;if(a.length>=25)break;if(c instanceof RegExp)a.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{a.push(RegExp(c.pattern,"i"))}catch(e){}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=a};(a=v||(v={})).ClickObservable="clickObservable",a.ChangeObservable="changeObservable",a.NavigateObservable="navigateObservable",a.MutationObservable="mutationObservable",a.ScrollObservable="scrollObservable",a.ExposureObservable="exposureObservable",a.BrowserErrorObservable="browserErrorObservable",a.SelectionObservable="selectionObservable",a.MouseMoveObservable="mouseMoveObservable";var r0=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",rs);var r,n,i,o,s,a,l,u,c,d,h,f,p,g=e.dataAttributePrefix,m=void 0===g?t3:g,y=e.visualTaggingOptions,b=void 0===y?{enabled:!0}:y;e.cssSelectorAllowlist=null!=(r=e.cssSelectorAllowlist)?r:t2,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:t4,e.debounceTime=null!=(i=e.debounceTime)?i:0;var w=(null==(o=e.viewportContentUpdated)?void 0:o.enabled)!==!1,S=null!=(l=null!=(a=null==(s=e.viewportContentUpdated)?void 0:s.exposureDuration)?a:e.exposureDuration)?l:150;e.viewportContentUpdated=(0,E.Cl)((0,E.Cl)({},e.viewportContentUpdated),{exposureDuration:S}),e.pageUrlExcludelist=null==(u=e.pageUrlExcludelist)?void 0:u.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(e){console.warn("Invalid regex pattern: ".concat(t.pattern),e)}return e},[]);var k="@amplitude/plugin-autocapture-browser",x=[],C=new rZ(e,t),_=new Set,O=new Set,I=function(){var t,r,n,i=t7(rL().map(function(t){return C.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,m)})),o=t7(new(t5())(function(t){var r,n=function(r){var n=C.addAdditionalEventProperties(r,"change",e.cssSelectorAllowlist,m);t.next(n)};return null==(r=N())||r.document.addEventListener("change",n,{capture:!0}),function(){var e;return null==(e=N())?void 0:e.document.removeEventListener("change",n)}}));window.navigation&&(n=t7(new(t5())(function(t){var r=function(r){var n=C.addAdditionalEventProperties(r,"navigate",e.cssSelectorAllowlist,m);t.next(n)};return window.navigation.addEventListener("navigate",r),function(){window.navigation.removeEventListener("navigate",r)}})));var s=t7(rD().map(function(t){return C.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,m)})),a=new(t5())(function(e){var t,r=function(t){e.next(t)};return null==(t=N())||t.addEventListener("scroll",r),function(){var e;null==(e=N())||e.removeEventListener("scroll",r)}}),l=(t=e.cssSelectorAllowlist,new(t5())(function(e){var r,n=N();if(!(null==n?void 0:n.IntersectionObserver))return function(){};var i=new IntersectionObserver(function(t){t.forEach(function(t){e.next(t)})},{root:null,rootMargin:"0px",threshold:1}),o=t.join(",");(null!=(r=null==n?void 0:n.document.querySelectorAll(o))?r:[]).forEach(function(e){i.observe(e)});var a=s.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(o)&&i.observe(e),e.querySelectorAll(o).forEach(function(e){i.observe(e)}))})})});return function(){a.unsubscribe(),i.disconnect()}}));return(r={})[v.ChangeObservable]=o,r[v.ClickObservable]=i,r[v.MutationObservable]=s,r[v.NavigateObservable]=n,r[v.ScrollObservable]=a,r[v.ExposureObservable]=l,r},T=rz(Object.values(null!=(d=null==(c=e.pageActions)?void 0:c.labeledEvents)?d:{})),R=rq(null!=(f=null==(h=e.pageActions)?void 0:h.triggers)?f:[]),A=new r$(T,R,C,e),P=function(t){var r,n;t&&(e.pageActions=(0,E.Cl)((0,E.Cl)({},e.pageActions),t),T=rz(Object.values(null!=(r=e.pageActions.labeledEvents)?r:{})),R=rq(null!=(n=e.pageActions.triggers)?n:[]),A.update(T,R,e))};return{name:k,type:"enrichment",setup:function(t,r){return(0,E.sH)(void 0,void 0,void 0,function(){var n,i,o,s,a,l,u,c,d,h,f,g,y,T,R,M,D,L,U,j,F;return(0,E.YH)(this,function(B){var H,z,q,V,$,W,K,J,Y,G,X,Q,Z,ee,et,er,en,ei,eo,es,ea,el,eu,ec,ed,eh,ef,ep,eg,em,ev,ey,eb,ew,eS,ek,ex,eE,eC;return"undefined"==typeof document?[2]:(n=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(e){P(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),o=rw(e,e.cssSelectorAllowlist),s=rw(e,e.actionClickAllowlist),z=(H={allObservables:a=I(),amplitude:r,shouldTrackEvent:o,evaluateTriggers:A.evaluate.bind(A)}).amplitude,q=H.allObservables,V=H.shouldTrackEvent,$=H.evaluateTriggers,l=q.clickObservable.filter(rC).filter(function(e){return V("click",e.closestTrackedAncestor)}).map(function(e){return $(e)}).subscribe(function(e){null==z||z.track(ra,e.targetElementProperties)}),x.push(l),K=(W={allObservables:a,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,(0,E.fX)((0,E.fX)([],(0,E.zs)(e),!1),[m],!1))},amplitude:r,shouldTrackEvent:o,evaluateTriggers:A.evaluate.bind(A)}).amplitude,J=W.allObservables,Y=W.getEventProperties,G=W.shouldTrackEvent,X=W.evaluateTriggers,u=J.changeObservable.filter(rC).filter(function(e){return G("change",e.closestTrackedAncestor)}).map(function(e){return X(e)}).subscribe(function(e){null==K||K.track("[Amplitude] Element Changed",Y("change",e.closestTrackedAncestor))}),x.push(u),Z=(Q={allObservables:a,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,(0,E.fX)((0,E.fX)([],(0,E.zs)(e),!1),[m],!1))},amplitude:r,shouldTrackEvent:o,shouldTrackActionClick:s}).amplitude,ee=Q.allObservables,et=Q.options,er=Q.getEventProperties,en=Q.shouldTrackEvent,ei=Q.shouldTrackActionClick,eo=ee.clickObservable,es=ee.mutationObservable,ea=ee.navigateObservable,el=eo.filter(function(e){return!en("click",e.closestTrackedAncestor)}).map(function(e){var t=rE(e.event.target,et.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=er(e.type,e.closestTrackedAncestor)),e}).filter(rC).filter(function(e){return ei("click",e.closestTrackedAncestor)}),eu=ea?t9(es,ea):es,ec=t9(el,eu),ed=null,eh=null,(c=t8(ec,function(e){if(ed&&(clearTimeout(ed),ed=null),"click"===e.type)eh=e,ed=setTimeout(function(){ed=null,eh=null},500);else if(eh){var t=eh;return eh=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==Z||Z.track(ra,er("click",e.closestTrackedAncestor)))}))&&x.push(c),(ef={allObservables:a,amplitude:r}).amplitude,ep=ef.allObservables.scrollObservable,eg={maxX:0,maxY:0},em=ep.subscribe(function(){var e,t,r,n,i=N(),o=Math.floor(null!=(t=null!=(e=null==i?void 0:i.scrollX)?e:null==i?void 0:i.pageXOffset)?t:0),s=Math.floor(null!=(n=null!=(r=null==i?void 0:i.scrollY)?r:null==i?void 0:i.pageYOffset)?
22n:0);eg.maxX=Math.max(eg.maxX,o),eg.maxY=Math.max(eg.maxY,s)}),d={unsubscribe:function(){em.unsubscribe()},getState:function(){return eg},reset:function(){eg.maxX=0,eg.maxY=0}},x.push(d),h={},f=N(),g=function(e){e&&n||(setTimeout(function(){n=!1},100),n=!0,function(e){var t,r,n,i,o=e.amplitude,s=e.scrollTracker,a=e.currentElementExposed,l=e.elementExposedForPage,u=e.exposureTracker,c=e.isPageEnd,d=e.lastScroll,h=s.getState(),f=N(),p=null!=(r=null==f?void 0:f.innerWidth)?r:0,g=null!=(n=null==f?void 0:f.innerHeight)?n:0,m=((t={})[rc]=null==(i=null==f?void 0:f.location)?void 0:i.href,t["[Amplitude] Max Page X"]=h.maxX+p,t["[Amplitude] Max Page Y"]=h.maxY+g,t[rd]=g,t[rh]=p,t["[Amplitude] Element Exposed"]=Array.from(a),t),v=rx();if(v&&(m[rf]=v),0===a.size&&h.maxX===d.maxX&&h.maxY===d.maxY){c&&(s.reset(),l.clear(),null==u||u.reset());return}null==o||o.track("[Amplitude] Viewport Content Updated",m),d.maxX=h.maxX,d.maxY=h.maxY,a.clear(),c&&(s.reset(),l.clear(),null==u||u.reset())}({amplitude:r,scrollTracker:d,currentElementExposed:O,elementExposedForPage:_,exposureTracker:h.exposure,isPageEnd:e,lastScroll:i}))},y=function(e){!_.has(e)&&(_.add(e),O.add(e),JSON.stringify(Array.from(O)).length>=18e3&&g(!1))},w&&(ey=(ev={allObservables:a,onExposure:y,dataExtractor:C,exposureDuration:S}).allObservables,eb=ev.onExposure,ew=ev.dataExtractor,ek=void 0===(eS=ev.exposureDuration)?150:eS,ex=new Map,eE=new Map,eC=ey.exposureObservable.subscribe(function(e){var t=e.target;if(e.isIntersecting){if(!ex.get(t)){var r=setTimeout(function(){ex.set(t,!0),eb(ew.getElementPath(t)),eE.set(t,null)},ek);eE.set(t,r)}}else if(!e.isIntersecting&&e.intersectionRatio<1){var r=eE.get(t);r&&(clearTimeout(r),eE.set(t,null))}}),h.exposure={unsubscribe:function(){eC.unsubscribe()},reset:function(){eE.forEach(function(e){e&&clearTimeout(e)}),eE.clear(),ex.clear()}},h.exposure&&x.push(h.exposure),T=function(){g(!0)},null==f||f.addEventListener("beforeunload",T),p=function(){null==f||f.removeEventListener("beforeunload",T)},x.push({unsubscribe:function(){return p()}}),(R=a[v.NavigateObservable])?x.push(R.subscribe(function(){g(!0)})):f&&(M=function(){g(!0)},f.addEventListener("popstate",M),D=f.history.pushState,f.history&&D&&(f.history.pushState=new Proxy(D,{apply:function(e,t,r){var n=(0,E.zs)(r,3),i=n[0],o=n[1],s=n[2];e.apply(t,[i,o,s]),g(!0)}})),x.push({unsubscribe:function(){f.removeEventListener("popstate",M),f.history&&D&&(f.history.pushState=D)}}))),null==(F=null==t?void 0:t.loggerProvider)||F.log("".concat(k," has been successfully added.")),window.opener&&b.enabled&&(L=e.cssSelectorAllowlist,U=e.actionClickAllowlist,!function(e,t){if(!0!==e[r_]){e[r_]=!0;var r=t.dataExtractor,n=t.isElementSelectable,i=t.cssSelectorAllowlist,o=t.actionClickAllowlist,s=null,a=function(t){e.notify({action:"element-selected",data:t})},l=function(t,r){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:r}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:r})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var u;s=null==(u=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:u.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!n||n((null==t?void 0:t.actionType)||"click",e)},onTrack:l,onSelect:a,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:i,actionClickAllowlist:o,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:rs}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null==(e=null==s?void 0:s.close)||e.call(s)})}}(j=function(e){var t=N(),r=null==t?void 0:t[rn];if("object"==typeof r&&null!==r&&rr in r&&!0===r[rr])return r;var n=new ri(void 0);return t&&(t[rn]=n),n}(),{dataExtractor:C,isElementSelectable:rw(e,(0,E.fX)((0,E.fX)([],(0,E.zs)(L),!1),(0,E.zs)(U),!1)),cssSelectorAllowlist:L,actionClickAllowlist:U}),!function(e,t){if(!0!==e[ro]){e[ro]=!0;var r="https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.3.js.gz",n=null,i=function(t,r){var n,i;"background-capture-complete"===t&&(null==(i=null==(n=e.logger)?void 0:n.debug)||i.call(n,"Backgroun
22d capture complete"),e.notify({action:"background-capture-complete",data:r}))};e.registerActionHandler("initialize-background-capture",function(){null==(o=null==(t=e.logger)?void 0:t.debug)||o.call(t,"Initializing background capture (external script)");var t,o,s=new URL(r,e.endpoint).toString();e.loadScriptOnce(s).then(function(){var t,r,o;null==(r=null==(t=e.logger)?void 0:t.debug)||r.call(t,"Background capture script loaded (external)"),n=null==(o=null==window?void 0:window.amplitudeBackgroundCapture)?void 0:o.call(window,{messenger:e,onBackgroundCapture:i}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null==(e=null==n?void 0:n.close)||e.call(n),n=null})}}(j),j.setup((0,E.Cl)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:rt[t.serverZone]}))),[2])})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,E.YH)(this,function(i){try{for(t=(e=(0,E.Ju)(x)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}},r1=(0,E.fX)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,E.zs)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),r2=["*"],r3=["mutation","navigate"];function r4(e,t){var r,n,i,o,s=t.event,a=s.pageX,l=s.pageY;e.yMin=Math.min(null!=(r=e.yMin)?r:l,l),e.yMax=Math.max(null!=(n=e.yMax)?n:l,l),e.xMin=Math.min(null!=(i=e.xMin)?i:a,a),e.xMax=Math.max(null!=(o=e.xMax)?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function r6(e){if(0===e.length)return null;var t=e[0],r=e[e.length-1];return{rageClickEvent:(0,E.Cl)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}(l=y||(y={})).INCREASING="increasing",l.DECREASING="decreasing",(u=b||(b={})).X="x",u.Y="y";var r5=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new(t5())(function(e){var r=null,n=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};if(null===r){r=o;return}o.x>r.x?(n===y.DECREASING&&e.next(b.X),n=y.INCREASING):o.x<r.x&&(n===y.INCREASING&&e.next(b.X),n=y.DECREASING),o.y>r.y?(i===y.DECREASING&&e.next(b.Y),i=y.INCREASING):o.y<r.y&&(i===y.INCREASING&&e.next(b.Y),i=y.DECREASING),r=o})})};function r8(e){var t=e.changes,r=e.changesThreshold,n=e.thresholdMs;return!(t.length<r)&&t[t.length-1]-t[0]<n}function r9(e){e.changes=[],e.startTime=void 0}function r7(e){for(var t=e.changes,r=e.thresholdMs,n=0,i=t[t.length-1];n<t.length&&!(i-t[n]<r);n++);0!==n&&(e.startTime=t[n],e.changes.splice(0,n))}var ne=function(e){var t=e.mouseDirectionChangeObservable,r=e.directionChanges,n=void 0===r?20:r,i=e.thresholdMs,o=void 0===i?2e3:i;return new(t5())(function(e){var r={changes:[],changesThreshold:n,thresholdMs:o},i={changes:[],changesThreshold:n,thresholdMs:o},s=void 0,a=null;function l(){void 0!==s&&(e.next(s),s=void 0,null!==a&&clearTimeout(a),r9(r),r9(i))}return t.subscribe(function(e){null!==a&&clearTimeout(a),t=e===b.X?r:i,n=+Date.now(),t.startTime=t.startTime||n,u=t.changes,c=t.changesThreshold,u.push(n),u.length>c&&u.shift();var t,n,u,c,d=function(e,t){var r=void 0;if(r8(e)&&(r=e.startTime),r8(t)){var n=t.startTime;n&&(!r||n<r)&&(r=n)}return r}(r,i);return d?(s=s||d,a=setTimeout(function(){l(),a=null},o)):l(),r7(r),r7(i),function(){null!==a&&(clearTimeout(a),a=null)}})})},nt=function(e){var t=e.amplitude,r=e.options,n=e.allObservables,i=e.directionChanges,o=e.thresholdMs;return ne({mouseDirectionChangeObservable:r5({allWindowObservables:n}),directionChanges:void 0===i?20:i,thresholdMs:void 0===o?2e3:o}).subscribe(function(e){rb(r)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function nr(e,t,r,n){if(!n)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:r}var nn=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-frustration-browser",n=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var o=!1!==e.deadClicks&&null!==e.deadClicks,s=!1!==e.rageClicks&&null!==e.rageClicks,a=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(a=!1);var l=nr(e,"rageClicks",r2,s),u=nr(e,"deadClicks",r1,o),c=nr(e,"errorClicks",r1,i),d=null!=(t=e.dataAttributePrefix)?t:t3,h=new rZ(e),f=(0,E.fX)([],(0,E.zs)(new Set((0,E.fX)((0,E.fX)((0,E.fX)([],(0,E.zs)(l),
22!1),(0,E.zs)(u),!1),(0,E.zs)(c),!1))),!1),p=function(){var e,t,r=t7(rL("pointerdown").map(function(e){return h.addAdditionalEventProperties(e,"click",f,d,!0)})),n=t7(rU().map(function(e){return h.addTypeAndTimestamp(e,"error")})),i=t7(rD().map(function(e){return h.addAdditionalEventProperties(e,"mutation",f,d)}));window.navigation&&(t=t7(new(t5())(function(e){var t=function(t){e.next((0,E.Cl)((0,E.Cl)({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return h.addAdditionalEventProperties(e,"navigate",f,d)})));var o=t7(new(t5())(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){var r=void 0,n=void 0;try{if(r=t.selectionStart,n=t.selectionEnd,r===n)return}catch(e){return}return e.next()}var i=window.getSelection();if(i&&!i.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),s=t7(new(t5())(function(e){var t=function(t){e.next(t)},r={capture:!0};return rN.document.addEventListener("mousemove",t,r),function(){rN.document.removeEventListener("mousemove",t,r)}}));return(e={})[v.ClickObservable]=r,e[v.MutationObservable]=i,e[v.NavigateObservable]=t,e[v.BrowserErrorObservable]=n,e[v.SelectionObservable]=o,e[v.MouseMoveObservable]=s,e};return{name:r,type:"enrichment",setup:function(t,f){return(0,E.sH)(void 0,void 0,void 0,function(){var g,v,y,b,w,S,k,x;return(0,E.YH)(this,function(C){var _,O,I,T,R,A,P,M,N,D,L,U,j,F,B,H,z,q,V,$,W,K;return"undefined"==typeof document?[2]:(g=p(),s&&(v=function(e){var t=this,r=e.amplitude,n=e.allObservables,i=e.shouldTrackRageClick,o=n.clickObservable,s=n.selectionObservable,a=[],l={},u=null;function c(e){a=[],l={},e&&(r4(l,e),a.push(e))}var d=t8(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return(0,E.sH)(t,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){var n,i,o,s;return(r4(l,e),t=null,0===a.length||(n=a).length>0&&n[n.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(o=Math.max(0,(i=a).length-4+1),s=i[o],e.timestamp-s.timestamp>=1e3)||l.isOutOfBounds)?(u&&(t=r6(a)),c(e)):a.push(e),(u&&(clearTimeout(u.timerId),u.resolve(t),u=null),a.length>=4)?[2,new Promise(function(e){u={resolve:e,timerId:setTimeout(function(){e(r6(a))},1e3)}})]:[2,null]})})}),h=null==s?void 0:s.subscribe(function(){c()}),f=d.subscribe(function(e){null!==e&&r.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){f.unsubscribe(),null==h||h.unsubscribe()}}}({allObservables:g,amplitude:f,shouldTrackRageClick:rw(e,l)}),n.push(v)),o&&(O=(_={amplitude:f,allObservables:g,getEventProperties:function(e,t){return h.getEventProperties(e,t,d)},shouldTrackDeadClick:rw(e,u)}).amplitude,I=_.allObservables,T=_.getEventProperties,R=_.shouldTrackDeadClick,A=I.clickObservable,P=I.mutationObservable,M=I.navigateObservable,N=A.filter(function(e){return rC(e)&&R("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===m.LEFT_OR_TOUCH_CONTACT}),D=M?t9(P,M):P,L=t9(N,D),U=null,y=t8(L,function(e){if(U&&r3.includes(e.type))clearTimeout(U),U=null;else if("click"===e.type)return U?Promise.resolve(null):new Promise(function(t){U=setTimeout(function(){t(e),U=null},3e3)});return Promise.resolve(null)}).subscribe(function(e){if(e){var t={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};O.track("[Amplitude] Dead Click",(0,E.Cl)((0,E.Cl)({},T("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}}),n.push(y)),i&&(F=(j={amplitude:f,allObservables:g,shouldTrackErrorClick:rw(e,c)}).amplitude,B=j.allObservables,H=j.shouldTrackErrorClick,z=B.clickObservable,q=B.browserErrorObservable,V=z.filter(function(e){return rC(e)&&H("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===m.LEFT_OR_TOUCH_CONTACT}),$=null,W=null,K=function(){null!==$&&(clearTimeout($),$=null),W=null},b=t9(V,q).subscribe(function(e){var t;if("click"===e.type){K(),W=e,$=setTimeout(K,2e3);return}"error"===e.type&&W&&(F.track("[Amplitude] Error Click",(0,E.Cl)(((t={})["[Amplitude] Kind"]=e.event.kind,t["[Amplitude] Message"]=e.event.message,t["[Amplitude] Stack"]=e.event.stack,t["[Amplitude] Filename"]=e.event.filename,t["[Amplitude] Line Number"]=e.event.lineNumber,t["[Amplitude] Column Number"]=e.event.columnNumber,t),W.targetElementProperties)),K())}),n.push(b)),a&&(w=void 0,S=void 0,"object"==typeof e.thrashedCursor&&(w=e.thrashedCursor.directionChanges,S=e.thrashedCursor.threshold,w&&w<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(w," is below the minimum of ").concat(5,", setting to ").concat(5)),w=5),S&&S>4e3&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(S," is above the maximum of ").concat(4e3,", setting to ").concat(4e3)),S=4e3)),k=nt({amplitude:f,options:e,allObservables:g,directionChanges:w,thresholdMs:S}),n.push(k)),null==(x=null==t?void 0:t.loggerProvider)||x.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,i;return(0,E.YH)(this,function(o){try{for(t=(e=(0,E.Ju)(n)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}};function ni(e,t,r){e&&function e(t){var r,n,i=t.json,o=t.targetObject,s=t.allowlist,a=t.excludelist,l=t.ancestors,u=t.parentObject,c=t.targetKey;o||(o=i);var d=Object.keys(o);try{for(var h=(0,E.Ju)(d),f=h.next();!f.done;
22f=h.next()){var p,g=f.value,m=(0,E.fX)((0,E.fX)([],(0,E.zs)(l),!1),[g],!1);(p=o[g],"string"==typeof p||"number"==typeof p||"boolean"==typeof p||null==p)?(!ns(m,s)||ns(m,a))&&delete o[g]:e({json:i,targetObject:o[g],allowlist:s,excludelist:a,ancestors:m,parentObject:o,targetKey:g})}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}0===Object.keys(o).length&&u&&c&&delete u[c]}({json:e,allowlist:t.map(no),excludelist:r.map(no),ancestors:[]})}function no(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function ns(e,t){return t.some(function(t){return function e(t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=0),i===r.length)return n===t.length;if(n===t.length){for(;i<r.length&&"**"===r[i];)i++;return i===r.length}var o=r[i];if("**"===o){if(i+1===r.length)return!0;for(var s=n;s<=t.length;s++)if(e(t,r,s,i+1))return!0;return!1}return("*"===o||o===t[n])&&e(t,r,n+1,i+1)}(e,t)})}var na=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,r,n=this.request.headers,i={};if(Array.isArray(n))n.forEach(function(e){var t=(0,E.zs)(e,2),r=t[0],n=t[1];i[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){i[t]=e});else if("object"==typeof n&&null!==n)try{for(var o=(0,E.Ju)(Object.entries(n)),s=o.next();!s.done;s=o.next()){var a=(0,E.zs)(s.value,2),l=a[0],u=a[1];i[l]=u}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return np(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=N();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=nu(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){return 0===e.length?[2,null]:[2,nh(this.body,e,t)]})})},e}(),nl=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),np(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return nu(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){return 0===e.length?[2,null]:[2,nh(this.body,e,t)]})})},e}();function nu(e,t){var r,n,i,o,s=N(),a=null==s?void 0:s.TextEncoder;if(a){if("string"==typeof e)o=e,i=new a().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new a().encode(o.toString()).length;else if(ArrayBuffer.isView(e))i=(o=e).byteLength;else if(e instanceof ArrayBuffer)i=(o=e).byteLength;else if(e instanceof FormData){var l=0,u=0;try{for(var c=(0,E.Ju)(e.entries()),d=c.next();!d.done;d=c.next()){var h=(0,E.zs)(d.value,2),f=h[0],p=h[1];if(l+=f.length,"string"==typeof p)l+=new a().encode(p).length;else{if(!(p instanceof Blob))return;l+=p.size}if(++u>=t)return}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}i=l}else if(e instanceof ReadableStream){o=e;return}return i}}var nc=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null==(t=null==r?void 0:r.forEach)||t.call(r,function(e,t){n[t]=e}),np(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,r=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n}
22,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(e){switch(e.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this.clonedResponse.text(),new Promise(function(e){return setTimeout(function(){return e(null)},500)})])];case 2:return[2,e.sent()];case 3:return e.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,E.sH)(this,void 0,void 0,function(){return(0,E.YH)(this,function(r){switch(r.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,nh(r.sent(),e,t)]}})})},e}(),nd=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){if(void 0===e&&(e=[]),!this.headersString)return{};var t,r,n={},i=this.headersString.split(`\r
23`);try{for(var o=(0,E.Ju)(i),s=o.next();!s.done;s=o.next()){var a=s.value,l=(0,E.zs)(a.split(": "),2),u=l[0],c=l[1];u&&c&&(n[u]=c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return np(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,E.sH)(this,void 0,void 0,function(){var r;return(0,E.YH)(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(ni(r,e,t),[2,r]):[2,null]})})},e}();function nh(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return ni(n,t,r),n}catch(e){return null}}(c=w||(w={})).REDACT="redact",c.REMOVE="remove";var nf="[REDACTED]",np=function(e,t){var r,n,i=t.allow,o=void 0===i?[]:i,s=t.strategy,a=void 0===s?w.REMOVE:s,l=(0,E.fX)([],(0,E.zs)(er.L),!1),u={};try{for(var c=(0,E.Ju)(Object.keys(e)),d=c.next();!d.done;d=c.next()){var h=d.value;!function(t){var r=t.toLowerCase();l.find(function(e){return e.toLowerCase()===r})?a===w.REDACT&&(u[t]=nf):o.find(function(e){return e.toLowerCase()===r})?u[t]=e[t]:a===w.REDACT&&(u[t]=nf)}(h)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return u},ng=function(){function e(e,t,r,n,i,o,s,a,l,u,c){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=s,this.duration=a,this.responseWrapper=l,this.error=u,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n;return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers((0,E.fX)([],(0,E.zs)(er.j7),!1)),requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(r=this.responseWrapper)?void 0:r.headers((0,E.fX)([],(0,E.zs)(er.j7),!1)),responseBodySize:null==(n=this.responseWrapper)?void 0:n.bodySize}).filter(function(e){var t=(0,E.zs)(e,2);return void 0!==(t[0],t[1])}))},e}(),nm=function(e,t){void 0===t&&(t=L()),this.callback=e,this.id=t};function nv(e){try{e()}catch(e){}}var ny=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=N();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=N();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,i,o,s,a,l,u,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var h=null==(i=null==(n=null==(r=this.globalScope)?void 0:r.XMLHttpRequest)?void 0:n.prototype)?void 0:i.open,f=null==(a=null==(s=null==(o=this.globalScope)?void 0:o.XMLHttpRequest)?void 0:s.prototype)?void 0:a.send,p=null==(c=null==(u=null==(l=this.globalScope)?void 0:l.XMLHttpRequest)?void 0:u.prototype)?void 0:c.setRequestHeader;h&&f&&p&&this.observeXhr(h,f,p);var g=null==(d=this.globalScope)?void 0:d.fetch;g&&this.observeFetch(g),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){try{r.callback(e)}catch(e){nv(function(){var r;null==(r=t.logger)||r.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,i,o,s){if
23(void 0!==o&&void 0!==s){var a,l,u,c,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(l=t.url,d=t.method):l=null==(a=null==t?void 0:t.toString)?void 0:a.call(t),l)try{var h=new URL(l);l="".concat(h.protocol,"//").concat(h.host).concat(h.pathname).concat(h.search).concat(h.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(u=n.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},u=0);var f=Math.floor(performance.now()-s),p=Math.floor(o+f),g=new ng(e,d,o,o,l,r,u,f,n,c,p);this.triggerEventCallbacks(g)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(r,n){return(0,E.sH)(t,void 0,void 0,function(){var t,i,o,s=this;return(0,E.YH)(this,function(a){switch(a.label){case 0:try{t=this.getTimestamps()}catch(e){nv(function(){var t;return null==(t=s.logger)?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e(r,n)];case 2:return i=a.sent(),[3,4];case 3:return o=a.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new na(n):void 0,i?new nc(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){nv(function(){var t;return null==(t=s.logger)?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var r;try{if("json"===e.responseType){if(null==(r=t.globalScope)?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){r instanceof Error&&"InvalidStateError"===r.name&&nv(function(){var r;return null==(r=t.logger)?void 0:r.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))})}return null}},e.prototype.observeXhr=function(t,r,n){if(this.globalScope&&t&&r){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=(0,E.zs)(r,2),s=i[0],a=i[1];try{this.$$AmplitudeAnalyticsEvent=(0,E.Cl)({method:s,url:null==(e=null==a?void 0:a.toString)?void 0:e.call(a),headers:{}},o.getTimestamps())}catch(e){nv(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,r)},i.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,s=e.createXhrJsonParser(this,o),a=t[0],l=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),r=new nd(i.status,e,t?parseInt(t,10):void 0,s),n=i.$$AmplitudeAnalyticsEvent.headers,u=new nl(a,n);l.status=i.status,o.handleNetworkRequestEvent("xhr",{url:l.url,method:l.method},u,r,void 0,l.startTime,l.durationStart)}catch(e){nv(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),r.apply(i,t)},i.setRequestHeader=function(e,t){try{var r=this.$$AmplitudeAnalyticsEvent;r&&(r.headers[e]=t)}catch(e){nv(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}n.apply(this,[e,t])}}},e}()),nb="[Amplitude] Network Request",nw="500-599";function nS(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function nk(e,t){var r,n,i=t.split(",");try{for(var o=(0,E.Ju)(i),s=o.next();!s.done;s=o.next()){var a=s.value,l=(0,E.zs)(a.split("-").map(Number),2),u=l[0],c=l[1];if(e===u&&void 0===c||e>=u&&e<=c)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function nx(e){var t;if(e)try{var r=null==(t=N())?void 0:t.location.href,n=new URL(e,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),s=n.href,a=n.host;n.hash="",n.search="";var l=n.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:l,host:a}}catch(e){return}}function nE(e){return"object"!=typeof e||null===e?e?(0,E.fX)([],(0,E.zs)(er.j7),!1):void 0:0!==e.length?e:void 0}function nC(e){var t,r;return!(null==(t=null==e?void 0:e.allowlist)?void 0:t.length)&&!(null==(r=null==e?void 0:e.blocklist)?void 0:r.length)}(S||(S={})).NetworkObservable="networkObservable";var n_=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-network-capture-browser",n=function(){var e,r=new(t5())(function(e){var r=new nm(function(t){var r={event:t,timestamp:Date.now(),type:"network"};e.next(r)});return ny.subscribe(r,t),function(){ny.unsubscribe(r)}});return(e={})[S.NetworkObservable]=r,e};return{name:r,type:"enrichment",setup:function(i,o){return(0,E.sH)(void 0,void 0,void 0,function(){var s;return(0,E.YH)(this,function(a){var l,u,c,d,h;return"undefined"==typeof document?[2]:(s=n(),t=null==i?void 0:i.loggerProvider,u=(l={allObservables:s,networkTrackingOptions:e,amplitude:o,loggerProvider:t}).allObservables,c=l.networkTrackingOptions,d=l.amplitude,h=l.loggerProvider,k=u.networkObservable.filter(function(e){return function(e,t){void 0===t&&(t={});var r,n,i=nx(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(nS(o,"*.amplitude.com")||nS(o,"amplitude.com"))||(null==(r=t.ignoreHosts)?void 0:r.find(function(e){return nS(o,e)})))&&(!!t.captureRules||void 0===e.status||!!nk(e.status,nw))&&(!t.captureRules||((0,E.fX)([],(0,E.zs)(t.captureRules),!1).reverse().find(function(t){if(n=function(e,t,r,n,i){if((!e.hosts||e.hosts.find(function(e){return nS(t,e)}))&&(!n||!e.urls||rg(n,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return(!r&&0!==r||!!nk(r,e.statusCodeRange||nw))&&!0}(t,o,e.status,e.url,e.method)){var r=nE(t.responseHeaders);if(e.responseWrapper&&r){var i=e.responseWrapper.headers(r);i&&(e.responseHeaders=i)}var s=nE(t.requestHeaders);if(e.requestWrapper&&s){var a=e.requestWrapper.headers(s);a&&(e.requestHeaders=a)}e.responseWrapper&&t.responseBody&&!nC(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!nC(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==n}),!!n))&&!(e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===nb}))return!0}catch(e){}return!1}(o,e.requestWrapper))}(e.event,c)}).subscribe(function(e){var t,r,n,i=e.event,o=nx(i.url);if(o){var s=null==(r=i.responseWrapper)?void 0:r.bodySize,a=null==(n=i.requestWrapper)?void 0:n.bodySize;!function(e,t,r,n){(0,E.sH)(this,void 0,void 0,function(){var i,o,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(o=(i=E.zs.apply(void 0,[a.sent(),2]))[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==n||n.debug("Failed to stringify request body",e)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch(e){null==n||n.debug("Failed to stringify response body")}a.label=2;case 2:return null==r||r.track(nb,e),[2]}})})}(((t={})["[Amplitude] URL"]=o.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=o.query,t["[Amplitude] URL Fragment"]=o.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=a,t["[Amplitude] Response Body Size"]=s,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,d,h)}}),null==t||t.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(e){return k.unsubscribe(),[2]})})}}},nO=r(85609);function nI(e){var t,r;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((r=(null==(t=e.entries[0])?void 0:t.startTime)||0,performance.timeOrigin+r)),navigationStart:Math.floor(performance.timeOrigin)}}var nT=function(){var e=null,t=N(),r=null==t?void 0:t.document,n=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return(0,E.sH)(void 0,void 0,void 0,function(){var o,s;return(0,E.YH)(this,function(a){return void 0===r||(o=rm((null==n?void 0:n.href)||"",t.loggerProvider),s={"[Amplitude] Page Domain":(null==n?void 0:n.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":rm((null==n?void 0:n.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":rm(o.split("?")[0],t.loggerProvider)},(0,nO.fK)(function(e){s["[Amplitude] LCP"]=nI(e)}),(0,nO.zB)(function(e){s["[Amplitude] FCP"]=nI(e)}),(0,nO.rH)(function(e){s["[Amplitude] INP"]=nI(e)}),(0,nO.IN)(function(e){s["[Amplitude] CLS"]=nI(e)}),(0,nO.Ck)(function(e){s["[Amplitude] TTFB"]=nI(e)}),e=function(){"hidden"===r.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",s),r.removeEventListener("visibilitychange",e),e=null)},r.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(t){return e&&(null==r||r.removeEventListener("visibilitychange",e)),[2]})})}}},nR=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),[er.r,t,e.substring(0,r)].filter(
23Boolean).join("_")},nA=function(){function e(e,t){var r;this.shouldTrackNewCampaign=!1,this.options=(0,E.Cl)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:tE((null==(r=t.cookieOptions)?void 0:r.domain)||t.topLevelDomain),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=nR(t.apiKey,"MKTG"),this.webExpStorageKey=nR(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=er.F3,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,E.sH)(this,void 0,void 0,function(){var e,t;return(0,E.YH)(this,function(r){switch(r.label){case 0:if(this.options.optOut)return[2];return[4,this.fetchCampaign()];case 1:if(t=E.zs.apply(void 0,[r.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eE(this.sessionTimeout,this.lastEventTime),!tS(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,E.sH)(this,void 0,void 0,function(){var e;return(0,E.YH)(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:if(!(e=t.sent()))return[3,3];return[4,this.storage.remove(this.webExpStorageKey)];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new tH().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,r,n=(t=this.currentCampaign,r=this.options,eb(Object.entries((0,E.Cl)((0,E.Cl)({},er.F3),t)).reduce(function(e,t){var n,i=(0,E.zs)(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!=(n=null!=s?s:r.initialEmptyValue)?n:"EMPTY"),s)?e.set(o,s):e.unset(o)},new ev.T$)));return e&&(n.event_id=e),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),nP="AMP_CURRENT_PAGE",nM="AMP_PREVIOUS_PAGE",nN="AMP_URL_INFO";(d=x||(x={})).Direct="direct",d.Internal="internal",d.External="external";var nD=new Set([ey.S.IDENTIFY,ey.S.GROUP_IDENTIFY,ey.S.REVENUE]),nL=function(e){var t=(void 0===e?{}:e).internalDomains,r=void 0===t?[]:t,n=N(),i=void 0,o=!1,s=void 0,a=!1,l=!1,u=function(e){var t;try{var r=rm(e,s);t=new URL(r).hostname}catch(e){null==s||s.error("Could not parse URL: ",e)}return t},c=function(e){var t="undefined"!=typeof location&&location.hostname||"",n=e?u(e):void 0;if(!n)return x.Direct;var i=r.some(function(e){return -1!==t.indexOf(e)}),o=r.some(function(e){return -1!==n.indexOf(e)});return t===n||o&&i?x.Internal:x.External},d=function(){(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,n,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:if(!(i&&o))return[3,3];return[4,i.get(nN)];case 1:return e=a.sent(),t=rm("undefined"!=typeof location&&location.href||""),r=(null==e?void 0:e[nP])||"",n=void 0,n=t===r?(null==e?void 0:e[nM])||"":r||document.referrer||"",[4,i.set(nN,((s={})[nP]=t,s[nM]=n,s))];case 2:a.sent(),a.label=3;case 3:return[2]}})})};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return(0,E.sH)(void 0,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:if((s=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),l=!0,!n)return[3,2];try{i=new e3(n.sessionStorage)}catch(e){null==s||s.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:o=null!=(t=r.sent())&&t,n.addEventListener("popstate",d),a||(n.history.pushState=new Proxy(n.history.pushState,{apply:function(e,t,r){var n=(0,E.zs)(r,3),i=n[0],o=n[1],s=n[2];e.apply(t,[i,o,s]),l&&d()}}),n.history.replaceState=new Proxy(n.history.replaceState,{apply:function(e,t,r){var n=(0,E.zs)(r,3),i=n[0],o=n[1],s=n[2];e.apply(t,[i,o,s]),l&&d()}}),a=!0),r.label=2;case 2:return[2]}})})},execute:function(e){return(0,E.sH)(void 0,void 0,void 0,function(){var t,r,n,s,a;return(0,E.YH)(this,function(l){switch(l.label){case 0:if(t=rm("undefined"!=typeof location&&location.href||""),!(i&&o))return[3,5];return[4,i.get(nN)];case 1:if(null==(r=l.sent())?void 0:r[nP])return[3,3];return[4,i.set(nN,((a={})[nP]=t,a[nM]=document.referrer||"",a))];case 2:l.sent(),l.label=3;case 3:return[4,i.get(nN)];case 4:if(n=l.sent(),s="",n&&(s=n[nM]||""),nD.has(e.event_type))return[2,e];e.event_properties=(0,E.Cl)((0,E.Cl)({},e.event_properties||{}),{"[Amplitude] Page Domain":nU(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":nU(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":nU(e,"[Amplitude] Page Path","undefined"!=typeof location&&rm(location.pathname)||""),"[Amplitude] Page Title":nU(e,"[Amplitude] Page Title",tB(tF)),"[Amplitude] Page URL":nU(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":s,"[Amplitude] Previous Page Type":c(s)}),l.label=5;case 5:return[2,e]}})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(e){switch(e.label){case 0:if(n&&(n.removeEventListener("popstate",d),l=!1),!(i&&o))return[3,2];return[4,i.set(nN,{})];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};function nU(e,t,r){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?r:e.event_properties[t]}var nj=function(){var e,t,r;function n(t){if(t)try{var r=Function("return "+t)();if("function"==typeof r)return r;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}return{name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return(0,E.sH)(void 0,void 0,void 0,function(){var o,s;return(0,E.YH)(this,function(a){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null==(s=i.remoteConfig)?void 0:s.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){r=e&&"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body?n(e.body||""):n("")}),t=function(){var e;return null==(e=i.remoteConfigClient)?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return(0,E.sH)(void 0,void 0,void 0,function(){var n;return(0,E.YH)(this,function(i){if(r)try{return[2,null!=(n=r(t))?n:null]}catch(t){null==e||e.error("Could not execute custom enrichment function",t)}return[2,t]})})},teardown:function(){return(0,E.sH)(void 0,void 0,void 0,function(){return(0,E.YH)(this,function(e){return t&&t(),[2]})})}}},nF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t._enableRequestBodyCompressionExperimentalValue=!1,t}return(0,E.C6)(t,e),t.prototype.init=function(e,t,r){var n,i;return void 0===e&&(e=""),arguments.length>2?(n=t,i=r):"string"==typeof t?(n=t,i=void 0):(n=null==t?void 0:t.userId,i=t),R(this._init((0,E.Cl)((0,E.Cl)({},i),{userId:n,apiKey:e})))},t.prototype._init=function(t){var r,n,i,o,s,a,l,u;return(0,E.sH)(this,void 0,void 0,function(){var c,d,f,p,g,m,v,y,b,w,S,k,x,C,_=this;return(0,E.YH)(this,function(O){var I,T,R,A,M,N,D;switch(O.label){case 0:if(this.initializing)return[2];if(this.initializing=!0,c=tP(t),d=null!=(r=t.loggerProvider)?r:new P,t.loggerProvider||d.enable(null!=(n=t.logLevel)?n:h.Warn),f=null!=(i=t.serverZone)?i:"US",g=this._diagnosticsSampleRate,m=null==(o=t.enableDiagnostics)||o,!c)return[3,2];return p=new U(t.apiKey,d,f,null==(s=t.remoteConfig)?void 0:s.serverUrl),[4,new Promise(function(e){null==p||p.subscribe("configs.diagnostics.browserSDK","all",function(t,r,n){if(d.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(g=i);var o=t.enabled;"boolean"==typeof o&&(m=o)}e()})})];case 1:O.sent(),O.label=2;case 2:return(v=new Q(t.apiKey,d,f,{enabled:m,sampleRate:g})).setTag("library","".concat(eK,"/").concat(eW)),"undefined"!=typeof navigator&&v.setTag("user_agent",navigator.userAgent),[4,(I=t.apiKey,T=t,R=this,A=v,M={loggerProvider:d,serverZone:f,enableDiagnostics:m,diagnosticsSampleRate:g},void 0===T&&(T={}),(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,C,_,O,P,N,D,U,j,F,B,H,z,q,V,$,W,K,J,Y,G,X,Q,ee,et,en,ei,eo;return(0,E.YH)(this,function(es){var ea,el,eu,ec;switch(es.label){case 0:if(e=T.identityStorage||ty,t="",!(e===ty&&!(null==(S=T.cookieOptions)?void 0:S.domain)&&(null==(k=T.cookieOptions)?void 0:k.domain)!==""))return[3,2];return[4,(ea=void 0,el=A,(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s;return(0,E.YH)(this,function(a){switch(a.label){case 0:return[4,new eX(void 0,{diagnosticsClient:el}).isEnabled()];case 1:if(!a.sent()||!ea&&("undefined"==typeof location||!location.hostname)||1===(t=(e=null!=ea?ea:location.hostname).split(".")).length)return[2,""];for(r=[],n=1,tO.find(function(t){return e.endsWith(".".concat(t))})&&(n=2),i=t.length-n-1;i>=0;--i)r.push(t.slice(i).join("."));i=0,a.label=2;case 2:if(!(i<r.length))return[3,7];o=r[i],a.label=3;
23case 3:return a.trys.push([3,5,,6]),[4,eX.isDomainWritable(o)];case 4:if(a.sent())return[2,"."+o];return[3,6];case 5:return s=a.sent(),el&&el.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(o),error:s instanceof Error?s.message:String(s)}),[3,6];case 6:return i++,[3,2];case 7:return el&&el.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(e)}),[2,""]}})}))];case 1:t=es.sent(),es.label=2;case 2:return r=(0,E.Cl)({domain:null!=(C=null==(x=T.cookieOptions)?void 0:x.domain)?C:t,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},T.cookieOptions),n={duplicateResolverFn:function(e){var t=e0(e);return!!t&&e1(JSON.parse(t).cookieDomain,r.domain)},diagnosticsClient:A},[4,(eu=i=tA(T.identityStorage,r,n),void 0===(ec=null==(O=null==(_=T.cookieOptions)?void 0:_.upgrade)||O)&&(ec=!0),(0,E.sH)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,a,l;return(0,E.YH)(this,function(u){switch(u.label){case 0:return e="".concat(er.r.toLowerCase(),"_").concat(I.substring(0,6)),[4,eu.getRaw(e)];case 1:if(!(t=u.sent()))return[2,{optOut:!1}];if(!ec)return[3,3];
23return[4,eu.remove(e)];case 2:u.sent(),u.label=3;case 3:return n=(r=(0,E.zs)(t.split("."),6))[0],i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],[2,{deviceId:n,userId:tn(i),sessionId:tr(s),lastEventId:tr(l),lastEventTime:tr(a),optOut:!!o}]}})}))];case 3:return o=es.sent(),[4,i.get(e2(I))];case 4:return s=es.sent(),u=!(l=(a=Z()).ampTimestamp?Number(a.ampTimestamp):void 0)||Date.now()<l,c=null!=(j=null!=(U=null!=(D=null!=(P=T.deviceId)?P:u?null!=(N=a.ampDeviceId)?N:a.deviceId:void 0)?D:null==s?void 0:s.deviceId)?U:o.deviceId)?j:L(),d=null!=(F=null==s?void 0:s.lastEventId)?F:o.lastEventId,h=null!=(B=null==s?void 0:s.lastEventTime)?B:o.lastEventTime,f=null!=(z=null!=(H=T.optOut)?H:null==s?void 0:s.optOut)?z:o.optOut,p=null!=(q=null==s?void 0:s.sessionId)?q:o.sessionId,g=null==s?void 0:s.deferredSessionId,m=null!=($=null!=(V=T.userId)?V:null==s?void 0:s.userId)?$:o.userId,R.previousSessionDeviceId=null!=(W=null==s?void 0:s.deviceId)?W:o.deviceId,R.previousSessionUserId=null!=(K=null==s?void 0:s.userId)?K:o.userId,v={ipAddress:null==(Y=null==(J=T.trackingOptions)?void 0:J.ipAddress)||Y,language:null==(X=null==(G=T.trackingOptions)?void 0:G.language)||X,platform:null==(ee=null==(Q=T.trackingOptions)?void 0:Q.platform)||ee},y=null==s?void 0:s.pageCounter,b=null==s?void 0:s.debugLogsEnabled,void 0!==T.autocapture&&(T.defaultTracking=T.autocapture),[4,(w=new tR(I,T.appVersion,i,r,T.defaultTracking,T.autocapture,c,T.flushIntervalMillis,T.flushMaxRetries,T.flushQueueSize,e,T.ingestionMetadata,T.instanceName,d,h,null!=(et=null==M?void 0:M.loggerProvider)?et:T.loggerProvider,T.logLevel,T.minIdLength,T.offline,f,T.partnerId,T.plan,T.serverUrl,null!=(en=null==M?void 0:M.serverZone)?en:T.serverZone,p,g,T.sessionTimeout,T.storageProvider,v,T.transport,T.useBatch,T.fetchRemoteConfig,m,y,b,T.networkTrackingOptions,T.identify,null!=(ei=null==M?void 0:M.enableDiagnostics)?ei:T.enableDiagnostics,null!=(eo=null==M?void 0:M.diagnosticsSampleRate)?eo:R._diagnosticsSampleRate,A,T.remoteConfig,t,T.enableRequestBodyCompression,R._enableRequestBodyCompressionExperimentalValue,T.customEnrichment)).storageProvider.isEnabled()];case 5:return es.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new eY),[2,w]}})}))];case 3:if(y=O.sent(),!(c&&p))return[3,5];return[4,new Promise(function(e){null==p||p.subscribe("configs.analyticsSDK.browserSDK","all",function(t,r,n){y.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t&&function(e,t){if(e){!function e(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){var r,n,i,o,s,a,l,u,c,d,h,f,p=Object.keys(t);try{for(var g=(0,E.Ju)(p),m=g.next();!m.done;m=g.next()){var v=m.value;try{var y=t[v];"boolean"==typeof(null==y?void 0:y.enabled)&&(y.enabled?(delete y.enabled,0===Object.keys(y).length&&(t[v]=!0)):t[v]=!1),e(y)}catch(e){}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}try{if(null==(c=null==(u=null==(l=t.autocapture)?void 0:l.networkTracking)?void 0:u.captureRules)?void 0:c.length)try{for(var b=(0,E.Ju)(t.autocapture.networkTracking.captureRules),w=b.next();!w.done;w=b.next()){var S=w.value;try{for(var k=(s=void 0,(0,E.Ju)(["responseHeaders","requestHeaders"])),x=k.next();!x.done;x=k.next()){var C=x.value,_=null!=(d=S[C])?d:{},O=_.captureSafeHeaders,I=_.allowlist;if(O||I){if(void 0!==I&&!Array.isArray(I)){delete S[C];continue}S[C]=(0,E.fX)((0,E.fX)([],(0,E.zs)(O?er.j7:[]),!1),(0,E.zs)(null!=I?I:[]),!1)}}}catch(e){s={error:e}}finally{try{x&&!x.done&&(a=k.return)&&a.call(k)}finally{if(s)throw s.error}}}}catch(e){i={error:e}}
23finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}catch(e){}var T=null==(h=t.autocapture)?void 0:h.frustrationInteractions;T&&(T.rageClick&&(T.rageClicks=T.rageClick,delete T.rageClick),T.deadClick&&(T.deadClicks=T.deadClick,delete T.deadClick));try{var R=null==(f=t.autocapture)?void 0:f.elementInteractions;if(R&&"object"==typeof R&&(!0===R.viewportContentUpdated&&(R.viewportContentUpdated={}),!1===R.viewportContentUpdated&&(R.viewportContentUpdated={enabled:!1}),void 0!==R.exposureDuration)){var A=R.viewportContentUpdated;void 0===A?R.viewportContentUpdated={exposureDuration:R.exposureDuration}:"object"==typeof A&&void 0===A.exposureDuration&&!1!==A.enabled&&(A.exposureDuration=R.exposureDuration),delete R.exposureDuration}}catch(e){}}}(e);try{var r,n,i,o,s,a,l;if(t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e)),e&&"autocapture"in e){if("boolean"==typeof e.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture&&null!==e.autocapture){var u=(0,E.Cl)({},e.autocapture);if(void 0===t.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture.elementInteractions&&null!==e.autocapture.elementInteractions&&(null==(i=e.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:i.length)){u.elementInteractions=(0,E.Cl)({},e.autocapture.elementInteractions);var c=u.elementInteractions,d=null!=(o=c.pageUrlAllowlist)?o:[],h=e.autocapture.elementInteractions.pageUrlAllowlistRegex;c.pageUrlAllowlist=t1(d,h,t),delete c.pageUrlAllowlistRegex}if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null==(s=e.autocapture.networkTracking.captureRules)?void 0:s.length)){u.networkTracking=(0,E.Cl)({},e.autocapture.networkTracking);var f=null!=(a=u.networkTracking.captureRules)?a:[];try{for(var p=(0,E.Ju)(f),g=p.next();!g.done;g=p.next()){var m=g.value;m.urls=t1(null!=(l=m.urls)?l:[],m.urlsRegex,t),delete m.urlsRegex}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,E.Cl)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},u)),"object"==typeof t.autocapture&&(t.autocapture=(0,E.Cl)((0,E.Cl)({},t.autocapture),u))}t.defaultTracking=t.autocapture}"customEnrichment"in e&&null!==e.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=e.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}(t,y),e()})})];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,y)];case 6:if(O.sent(),this.logBrowserOptions(y),this.config.remoteConfigClient=p,!eR(this.config.defaultTracking))return[3,8];return this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,E.sH)(_,void 0,void 0,function(){var t;return(0,E.YH)(this,function(r){switch(r.label){case 0:if(e)return[3,2];return t=eH(this.config),this.webAttribution=new nA(t,this.config),[4,this.webAttribution.init()];case 1:r.sent(),r.label=2;case 2:return[2]}})})}),b=eH(this.config),this.webAttribution=new nA(b,this.config),[4,this.webAttribution.init()];case 7:O.sent(),O.label=8;case 8:if(k=!(!(S=(w=Z()).ampTimestamp?Number(w.ampTimestamp):void 0)||Date.now()<S)||Number.isNaN(Number(w.ampSessionId))?void 0:Number(w.ampSessionId),-1!==(x=this.config.deferredSessionId)||this.config.optOut||(x=Date.now()),this.setSessionId(null!=(u=null!=(l=null!=(a=t.sessionId)?a:k)?l:x)?u:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,E.sH)(_,void 0,void 0,function(){return(0,E.YH)(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(C=en(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,10];return[4,this.add(t0()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new eg({diagnosticsClient:v})).promise];case 11:return O.sent(),[4,this.add(new eJ).promise];case 12:return O.sent(),[4,this.add(new em).promise];case 13:if(O.sent(),tZ(this.config),!eT(this.config.defaultTracking,"fileDownloads"))return[3,15];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tX()).promise];case 14:O.sent(),O.label=15;case 15:if(!eA(this.config.defaultTracking))return[3,17];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(tJ()).promise];case 16:O.sent(),O.label=17;case 17:if(!eP(this.config.defaultTracking))return[3,20];if(this.config.optOut)return[3,19];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(tV(eB(this.config))).promise];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return(0,E.sH)(_,void 0,void 0,function(){return(0,E.YH)(this,function(t){switch(t.label){case 0:if(e)return[2];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(tV(eB(this.config))).promise];case 1:return t.sent(),[2]}})})}),O.label=20;case 20:if(!eD(this.config.autocapture))return[3,22];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(r0(eU(this.config),{diagnosticsClient:v})).promise];case 21:O.sent(),O.label=22;case 22:if(!eL(this.config.autocapture))return[3,24];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(nn(ej(this.config))).promise];case 23:O.sent(),O.label=24;case 24:if(!eN(this.config.autocapture))return[3,26];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(n_(eF(this.config))).promise];case 25:O.sent(),O.label=26;case 26:if(!("boolean"==typeof(N=this.config.autocapture)?N:"object"==typeof N&&!0===N.webVitals))return[3,28];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(nT()).promise];
23case 27:O.sent(),O.label=28;case 28:if(!eT(this.config.autocapture,"pageUrlEnrichment"))return[3,30];return this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(nL()).promise];case 29:O.sent(),O.label=30;case 30:if(!("boolean"==typeof(D=this.config.customEnrichment)?D:"object"==typeof D&&null!==D&&!1!==D.enabled))return[3,32];return this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(nj()).promise];case 31:O.sent(),O.label=32;case 32:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 33:return O.sent(),C.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},r=t.time,n=(0,E.Tt)(t,["time"]);_.track(e.eventType,n,"number"==typeof r?{time:r}:void 0)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config)return void this.q.push(this.setUserId.bind(this,e));this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),ei(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config)return void this.q.push(this.setDeviceId.bind(this,e));this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),eo(e,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(L()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null==(e=this.config)?void 0:e.deviceId,userId:null==(t=this.config)?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var t,r,n,i=new ev.T$,o=null!=(n=e.userProperties)?n:{};try{for(var s=(0,E.Ju)(Object.entries(o)),a=s.next();!a.done;a=s.next()){var l=(0,E.zs)(a.value,2),u=l[0],c=l[1];i.set(u,c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null==(e=this.config)?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),R(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,R(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return R(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var n=this.getSessionId();n!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,eM(this.config.defaultTracking)&&(n&&i&&r.push(this.track(tu,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:n,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,r);return this.config.identify&&r.push(this.track(eb(this.config.identify)).promise),eM(this.config.defaultTracking)&&r.push(this.track(tl,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,R(Promise.all(r))},t.prototype.extendSession=function(){if(!this.config)return void this.q.push(this.extendSession.bind(this));this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config)return void this.q.push(this.setTransport.bind(this,e));this.config.transportProvider=tM(e)},t.prototype.identify=function(t,r){if(eV(t)){var n=t._q;t._q=[],t=eq(new ev.T$,n)}return(null==r?void 0:r.user_id)&&this.setUserId(r.user_id),(null==r?void 0:r.device_id)&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,t,r)},t.prototype.groupIdentify=function(t,r,n,i){if(eV(n)){var o=n._q;n._q=[],n=eq(new ev.T$,o)}return e.prototype.groupIdentify.call(this,t,r,n,i)},t.prototype.revenue=function(t,r){if(eV(t)){var n=t._q;t._q=[],t=eq(new ex,n)}return e.prototype.revenue.call(this,t,r)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(e);
23return t?t.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,E.sH)(this,void 0,void 0,function(){var r,n,i;return(0,E.YH)(this,function(o){return r=Date.now(),n=eE(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==tl&&t.event_type!==tu&&(!t.session_id||t.session_id===this.getSessionId())&&(n||i?(this.setSessionId(r),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):n||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,E.Cl)((0,E.Cl)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",e_(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1)&&!(e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t.prototype._enableRequestBodyCompressionExperimental=function(e){if(!this.config){this._enableRequestBodyCompressionExperimentalValue=e;return}},t}(eI),nB=function(){var e=new nF;return{init:T(e.init.bind(e),"init",_(e),I(e,["config"])),add:T(e.add.bind(e),"add",_(e),I(e,["config.apiKey","timeline.plugins"])),remove:T(e.remove.bind(e),"remove",_(e),I(e,["config.apiKey","timeline.plugins"])),track:T(e.track.bind(e),"track",_(e),I(e,["config.apiKey","timeline.queue.length"])),logEvent:T(e.logEvent.bind(e),"logEvent",_(e),I(e,["config.apiKey","timeline.queue.length"])),identify:T(e.identify.bind(e),"identify",_(e),I(e,["config.apiKey","timeline.queue.length"])),groupIdentify:T(e.groupIdentify.bind(e),"groupIdentify",_(e),I(e,["config.apiKey","timeline.queue.length"])),setGroup:T(e.setGroup.bind(e),"setGroup",_(e),I(e,["config.apiKey","timeline.queue.length"])),revenue:T(e.revenue.bind(e),"revenue",_(e),I(e,["config.apiKey","timeline.queue.length"])),flush:T(e.flush.bind(e),"flush",_(e),I(e,["config.apiKey","timeline.queue.length"])),getUserId:T(e.getUserId.bind(e),"getUserId",_(e),I(e,["config","config.userId"])),setUserId:T(e.setUserId.bind(e),"setUserId",_(e),I(e,["config","config.userId"])),getDeviceId:T(e.getDeviceId.bind(e),"getDeviceId",_(e),I(e,["config","config.deviceId"])),setDeviceId:T(e.setDeviceId.bind(e),"setDeviceId",_(e),I(e,["config","config.deviceId"])),reset:T(e.reset.bind(e),"reset",_(e),I(e,["config","config.userId","config.deviceId"])),getSessionId:T(e.getSessionId.bind(e),"getSessionId",_(e),I(e,["config"])),setSessionId:T(e.setSessionId.bind(e),"setSessionId",_(e),I(e,["config"])),extendSession:T(e.extendSession.bind(e),"extendSession",_(e),I(e,["config"])),setOptOut:T(e.setOptOut.bind(e),"setOptOut",_(e),I(e,["config"])),setTransport:T(e.setTransport.bind(e),"setTransport",_(e),I(e,["config"])),getIdentity:T(e.getIdentity.bind(e),"getIdentity",_(e),I(e,["config"])),setIdentity:T(e.setIdentity.bind(e),"setIdentity",_(e),I(e,["config","config.userId","config.deviceId"])),getOptOut:T(e.getOptOut.bind(e),"getOptOut",_(e),I(e,["config"])),_setDiagnosticsSampleRate:T(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",_(e),I(e,["config"])),_enableRequestBodyCompressionExperimental:T(e._enableRequestBodyCompressionExperimental.bind(e),"_enableRequestBodyCompressionExperimental",_(e),I(e,["config"]))}};nB()},50140(e){e.exports=function(e){return null===e}},51658(e,t,r){var n=r(64809),i=r(3342),o=r(60961),s=Object.prototype,a=Function.prototype.toString,l=s.hasOwnProperty,u=a.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==u}},52295(e,t,r){"use strict";let n,i,o,s,a,l;r.r(t),r.d(t,{record:()=>iu});var u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E,C,_,O,I,T,R,A,P,M,N,D,L,U,j,F,B,H,z,q,V,$,W,K,J,Y,G,X,Q,Z,ee,et,er,en,ei,eo,es,ea,el,eu,ec,ed,eh,ef,ep,eg,em,ev,ey,eb,ew,eS,ek,ex,eE,eC,e_,eO,eI,eT,eR,eA,eP,eM,eN,eD,eL,eU,ej,eF,eB,eH,ez,eq,eV,e$,eW,eK,eJ,eY,eG,eX,eQ,eZ,e0,e1,e2,e3,e4,e6,e5,e8,e9,e7,te,tt,tr,tn,ti,to,ts,ta,tl,tu,tc,td,th,tf,tp,tg,tm=Object.defineProperty,tv=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?tm(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},ty=Object.defineProperty,tb=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?ty(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},tw=((u=tw||{})[u.Document=0]="Document",u[u.DocumentType=1]="DocumentType",u[u.Element=2]="Element",u[u.Text=3]="Text",u[u.CDATA=4]="CDATA",u[u.Comment=5]="Comment",u);
23let tS={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tx={};function tE(e){if(tx[e])return tx[e];let t=function(e){var t,r;let n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in tS?tS[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in tk?tk[e]:void 0,s=!!(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return tx[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let o=i[e].prototype;if(document.body.removeChild(n),!o)return r;return tx[e]=o}catch{return r}}let tC={};function t_(e,t,r){var n;let i=`${e}.${String(r)}`;if(tC[i])return tC[i].call(t);let o=null==(n=Object.getOwnPropertyDescriptor(tE(e),r))?void 0:n.get;return o?(tC[i]=o,o.call(t)):t[r]}let tO=function(e){return t_("Node",e,"childNodes")},tI=function(e){return t_("Node",e,"parentNode")},tT=function(e){return t_("Node",e,"parentElement")},tR=function(e){return t_("Node",e,"textContent")},tA=function(e){return e&&"shadowRoot"in e?t_("Element",e,"shadowRoot"):null};function tP(e){return e.nodeType===e.ELEMENT_NODE}function tM(e){var t;let r=e&&"host"in e&&"mode"in e&&((t=e)&&"host"in t?t_("ShadowRoot",t,"host"):null)||null;return!!(r&&"shadowRoot"in r&&tA(r)===e)}function tN(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function tD(e){try{var t;let r=e.rules||e.cssRules;if(!r)return null;let n=e.href;return!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href),(t=Array.from(r,e=>tL(e,n)).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}}function tL(e,t){if("styleSheet"in e){let t;try{t=tD(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?tK(t,e.styleSheet.href):t}{let r=e.cssText;return("selectorText"in e&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t)?tK(r,t):r}}class tU{constructor(){tb(this,"idNodeMap",new Map),tb(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function tj({element:e,maskInputOptions:t,tagName:r,type:n,value:i,maskInputFn:o}){let s=i||"",a=n&&tF(n);return(t[r.toLowerCase()]||a&&t[a])&&(s=o?o(s,e):"*".repeat(s.length)),s}function tF(e){return e.toLowerCase()}let tB="__rrweb_original__";function tH(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?tF(t):null}function tz(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==n?void 0:n[1])??null}let tq=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,tV=/^(?:[a-z+]+:)?\/\//i,t$=/^www\..*/i,tW=/^(data:)([^,]*),(.*)/i;function tK(e,t){return(e||"").replace(tq,(e,r,n,i,o,s)=>{let a=n||o||s,l=r||i||"";if(!a)return e;if(tV.test(a)||t$.test(a)||tW.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))if("."===e)continue;else".."===e?u.pop():u.push(e);return`url(${l}${u.join("/")}${l})`})}function tJ(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let tY=1,tG=RegExp("[^a-z0-9-_:]");function tX(){return tY++}let tQ=/^[^ \t\n\r\u000c]+/,tZ=/^[, \t\n\r\u000c]+/,t0=new WeakMap;function t1(e,t){return t&&""!==t.trim()?t2(e,t):t}function t2(e,t){let r=t0.get(e);if(r||(r=e.createElement("a"),t0.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function t3(e,t,r,n){if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0])return t1(e,n
23);if("background"===r&&("table"===t||"td"===t||"th"===t))return t1(e,n);if("srcset"===r)return function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}let i=[];for(;n(tZ),!(r>=t.length);){let o=n(tQ);if(","===o.slice(-1))o=t1(e,o.substring(0,o.length-1)),i.push(o);else{let n="";o=t1(e,o);let s=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((o+n).trim());break}if(s)")"===e&&(s=!1);else if(","===e){r+=1,i.push((o+n).trim());break}else"("===e&&(s=!0);n+=e,r+=1}}}return i.join(", ")}(e,n);if("style"===r)return tK(n,t2(e));else if("object"===t&&"data"===r)return t1(e,n);return n}function t4(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function t6(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&t6(tI(e),t,r);for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!!r&&t6(tI(e),t,r)}function t5(e,t,r,n){let i;if(tP(e)){if(!tO(i=e).length)return!1}else{if(null===tT(e))return!1;i=tT(e)}try{if("string"==typeof t){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(t6(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(e){}return!1}function t8(e){return null==e?"":e.toLowerCase()}function t9(e,t){let r,{doc:o,mirror:s,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:c,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:p,maskInputFn:g,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:w=!1,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:x=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:O=!1,cssCaptured:I=!1,applyBackgroundColorToBlockedElements:T=!1}=t,{needsMask:R}=t,{preserveWhiteSpace:A=!0}=t;R||(R=t5(e,u,c,void 0===R));let P=function(e,t){let{doc:r,mirror:o,blockClass:s,blockSelector:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:d,maskInputFn:h,maskAttributeFn:f,dataURLOptions:p={},inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y=!1,cssCaptured:b=!1,applyBackgroundColorToBlockedElements:w=!1}=t,S=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:tw.Document,childNodes:[],compatMode:e.compatMode};return{type:tw.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:tw.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return function(e,t){let r,{doc:o,blockClass:s,blockSelector:a,inlineStylesheet:l,maskInputOptions:u={},maskInputFn:c,maskAttributeFn:d,dataURLOptions:h={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:v,applyBackgroundColorToBlockedElements:y=!1}=t,b=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,a),w=function(e){if(e instanceof HTMLFormElement)return"form";let t=tF(e.tagName);return tG.test(t)?"div":t}(e),S={},k=e.attributes.length;for(let t=0;t<k;t++){let r=e.attributes[t];if(!t4(w,r.name,r.value)){let t=t3(o,w,tF(r.name),r.value);if(d&&null!==t){let n=d(r.name,t,e);null!==n&&(S[r.name]=n)}else S[r.name]=t}}if("link"===w&&l){let t=Array.from(o.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=tD(t)),r&&(delete S.rel,delete S.href,S._cssText=r)}if("style"===w&&e.sheet){let t=tD(e.sheet);t&&(e.childNodes.length>1&&(t=(function(e,t,r=!1){let n=Array.from(t.childNodes),i=[],o=0;if(n.length>1&&e&&"string"==typeof e){let t=tJ(e,r),s=t.length/e.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&"string"==typeof n[a].textContent){let l=tJ(n[a].textContent,r),u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let c=l.substring(0,u),d=t.split(c),h=-1;if(2===d.length)h=d[0].length;else if(d.length>2&&""===d[0]&&""!==n[a-1].textContent)h=t.indexOf(c,1);else if(1===d.length){if(c=c.substring(0,c.length-1),(d=t.split(c)).length<=1)return i.push(e),i;u=101}else u===l.length-1&&(h=t.indexOf(c));if(d.length>=2&&u>100){let e=n[a-1].textContent;if(e&&"string"==typeof e){let r=tJ(e).length;h=t.indexOf(c,r)}-1===h&&(h=d[0].length)}if(-1!==h){let a=Math.floor(h/s);for(;a>0&&a<e.length;){if((o+=1)>50*n.length)return i.push(e),i;let l=tJ(e.substring(0,a),r);
23if(l.length===h){i.push(e.substring(0,a)),e=e.substring(a),t=t.substring(h);break}l.length<h?a+=Math.max(1,Math.floor((h-l.length)/s)):a-=Math.max(1,Math.floor((l.length-h)*s))}break}}}}return i.push(e),i})(t,e).join("/* rr_split */")),S._cssText=t)}if("input"===w||"textarea"===w||"select"===w){let t=e.value,r=e.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&t?S.value=tj({element:e,type:tH(e),tagName:w,value:t,maskInputOptions:u,maskInputFn:c}):r&&(S.checked=r)}if("option"===w&&(e.selected&&!u.select?S.selected=!0:delete S.selected),"dialog"===w&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===w&&p){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let i=t.getImageData;if(new Uint32Array((tB in i?i[tB]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(S.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let t=e.toDataURL(h.type,h.quality),r=o.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(h.type,h.quality)&&(S.rr_dataURL=t)}}if("img"===w&&f){n||(i=(n=o.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",r=e.crossOrigin,s=()=>{e.removeEventListener("load",s);try{n.width=e.naturalWidth,n.height=e.naturalHeight,i.drawImage(e,0,0),S.rr_dataURL=n.toDataURL(h.type,h.quality)}catch(r){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s);return}console.warn(`Cannot inline img src=${t}! Error: ${r}`)}"anonymous"===e.crossOrigin&&(r?S.crossOrigin=r:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}if("audio"===w||"video"===w){let t=S;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(!m&&(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),b){let{width:t,height:r}=e.getBoundingClientRect();S={class:S.class,rr_width:`${t}px`,rr_height:`${r}px`,...y?{rr_background_color:"lightgrey"}:{}}}"iframe"!==w||g(S.src)||(e.contentDocument||(S.rr_src=S.src),delete S.src);try{customElements.get(w)&&(r=!0)}catch(e){}return{type:tw.Element,tagName:w,attributes:S,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:b,rootId:v,isCustom:r}}(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,maskAttributeFn:f,dataURLOptions:p,inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y,rootId:S,applyBackgroundColorToBlockedElements:w});case e.TEXT_NODE:return function(e,t){let{needsMask:r,maskTextFn:n,rootId:i,cssCaptured:o}=t,s=tI(e),a=s&&s.tagName,l="",u="STYLE"===a||void 0,c="SCRIPT"===a||void 0;return c?l="SCRIPT_PLACEHOLDER":!o&&(l=tR(e),u&&l&&(l=tK(l,t2(t.doc)))),!u&&!c&&l&&r&&(l=n?n(l,tT(e)):l.replace(/[\S]/g,"*")),{type:tw.Text,textContent:l||"",rootId:i}}(e,{doc:r,needsMask:l,maskTextFn:d,rootId:S,cssCaptured:b});case e.CDATA_SECTION_NODE:return{type:tw.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:tw.Comment,textContent:tR(e)||"",rootId:S};default:return!1}}(e,{doc:o,mirror:s,blockClass:a,blockSelector:l,needsMask:R,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:g,maskAttributeFn:m,dataURLOptions:y,inlineImages:b,recordCanvas:w,keepIframeSrcFn:_,newlyAddedElement:O,cssCaptured:I,applyBackgroundColorToBlockedElements:T});if(!P)return console.warn(e,"not serialized"),null;r=s.hasNode(e)?s.getId(e):!function(e,t){if(t.comment&&e.type===tw.Comment)return!0;if(e.type===tw.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===tz(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(t8(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===t8(e.attributes.name)||"icon"===t8(e.attributes.rel)||"apple-touch-icon"===t8(e.attributes.rel)||"shortcut icon"===t8(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&t8(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(t8(e.attributes.property).match(/^(og|twitter|fb):/)||t8(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===t8(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===t8(e.attributes.name)||"googlebot"===t8(e.attributes.name)||"bingbot"===t8(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===t8(e.attributes.name)||"generator"===t8(e.attributes.name)||"framework"===t8(e.attributes.name)||"publisher"===t8(e.attributes.name)||"progid"===t8(e.attributes.name)||t8(e.attributes.property).match(/^article:/)||t8(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===t8(e.attributes.name)||"yandex-verification"===t8(e.attributes.name)||"csrf-token"===t8(e.attributes.name)||"p:domain_verify"===t8(e.attributes.name)||"verify-v1"===t8(e.attributes.name)||"verification"===t8(e.attributes.name)||"shopify-checkout-api-token"===t8(e.attributes.name)))return!0}}return!1}(P,v)&&(A||P.type!==tw.Text||P.textContent.replace(/^\s+|\s+$/gm,"").length)?tX():-2;let M=Object.assign(P,{id:r});if(s.add(e,M),-2===r)return null;S&&S(e);let N=!d;if(M.type===tw.Element){N=N&&!M.needBlock,delete M.needBlock;let t=tA(e);t&&tN(t)&&(M.isShadowHost=!0)}if((M.type===tw.Document||M.type===tw.Element)&&N){v.headWhitespace&&M.type===tw.Element&&"head"===M.tagName&&(A=!1);let t={doc:o,mirror:s,blockClass:a,blockSelector:l,needsMask:R,maskTextClass:u,maskTextSelector:c,skipChild:d,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:g,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:_,cssCaptured:!1,applyBackgroun
23dColorToBlockedElements:T};if(M.type===tw.Element&&"textarea"===M.tagName&&void 0!==M.attributes.value);else for(let r of(M.type===tw.Element&&void 0!==M.attributes._cssText&&"string"==typeof M.attributes._cssText&&(t.cssCaptured=!0),Array.from(tO(e)))){let e=t9(r,t);e&&M.childNodes.push(e)}let r=null;if(tP(e)&&(r=tA(e)))for(let e of Array.from(tO(r))){let n=t9(e,t);n&&(tN(r)&&(n.isShadow=!0),M.childNodes.push(n))}}let D=tI(e);return D&&tM(D)&&tN(D)&&(M.isShadow=!0),M.type===tw.Element&&"iframe"===M.tagName&&function(e,t,r){let n,i=e.contentWindow;if(!i)return;let o=!1;try{n=i.document.readyState}catch(e){return}if("complete"!==n){let n=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),o=!0,t()});return}let s="about:blank";if(i.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&k){let r=t9(t,{doc:t,mirror:s,blockClass:a,blockSelector:l,needsMask:R,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:g,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:_});r&&k(e,r)}},x),M.type===tw.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===tz(M.attributes.href))&&function(e,t,r){let n,i=!1;try{n=e.sheet}catch(e){return}if(n)return;let o=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),i=!0,t()})}(e,()=>{if(E){let t=t9(e,{doc:o,mirror:s,blockClass:a,blockSelector:l,needsMask:R,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:g,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:_});t&&E(e,t)}},C),M}var t7={exports:{}};let re=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function rt(){if(x)return k;x=1;let e=function(){if(S)return t7.exports;S=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return t7.exports=t(),t7.exports.createColors=t,t7.exports}();class t extends Error{constructor(e,r,n,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){let r,n;if(!this.source)return"";let i=this.source;null==t&&(t=e.isColorSupported),re&&t&&(i=re(i));let o=i.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(t){let{bold:t,gray:i,red:o}=e.createColors(!0);r=e=>t(o(e)),n=e=>i(e)}else r=n=e=>e;return o.slice(s,a).map((e,t)=>{let i=s+1+t,o=" "+(" "+i).slice(-l)+" | ";if(i===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+`
24 `+t+r("^")}return" "+n(o)+e}).join(`
25`)}toString(){let e=this.showSourceCode();return e&&(e=`
26
27`+e+`
28`),this.name+": "+this.message+e}}return k=t,t.default=t,k}var rr={};function rn(){return E||(E=1,rr.isClean=Symbol("isClean"),rr.my=Symbol("my")),rr}function ri(){if(_)return C;_=1;let e={after:`
29`,beforeClose:`
30`,beforeComment:`
31`,beforeDecl:`
32`,beforeOpen:" ",beforeRule:`
33`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class t{constructor(e){this.builder=e}
33atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes(`
34`)){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let i;if(n||(n=r),r&&void 0!==(i=t.raws[r]))return i;let o=t.parent;if("before"===n&&(!o||"root"===o.type&&o.first===t||o&&"document"===o.type))return"";if(!o)return e[n];let s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[n])return s.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{var a;let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?i=this[e](s,t):s.walk(e=>{if(void 0!==(i=e.raws[r]))return!1})}return void 0===i&&(i=e[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes(`
35`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
36`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
37`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes(`
38`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(`
39`);return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return C=t,t.default=t,C}function ro(){if(I)return O;I=1;let e=ri();function t(t,r){new e(r).stringify(t)}return O=t,t.default=t,O}function rs(){if(R)return T;R=1;let{isClean:e,my:t}=rn(),r=rt(),n=ri(),i=ro();class o{constructor(r={}){for(let n in this.raws={},this[e]=!1,this[t]=!0,r)if("nodes"===n)for(let e of(this.nodes=[],r[n]))"function"==typeof e.clone?this.append(e.clone()):this.append(e);else this[n]=r[n]}
39addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let o=t[i],s=typeof o;"parent"===i&&"object"===s?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(t=>e(t,n)):("object"===s&&null!==o&&(o=e(o)),n[i]=o)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}
39markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)`
40`===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new n().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return T=o,o.default=o,T}function ra(){if(P)return A;P=1;let e=rs();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return A=t,t.default=t,A}function rl(){if(L)return D;L=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=re,{existsSync:r,readFileSync:n}=re,{dirname:i,join:o}=re;class s{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=i(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n)if("string"==typeof n)return n;else if("function"==typeof n){let e=n(r);if(e){let t=this.loadFile(e);
40if(!t)throw Error("Unable to load previous source map: "+e.toString());return t}}else if(n instanceof e)return t.fromSourceMap(n).toString();else if(n instanceof t)return n.toString();else if(this.isMap(n))return JSON.stringify(n);else throw Error("Unsupported previous source map format: "+n.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return r&&(e=o(i(r),e)),this.loadFile(e)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return D=s,s.default=s,D}function ru(){if(j)return U;j=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=re,{fileURLToPath:r,pathToFileURL:n}=re,{isAbsolute:i,resolve:o}=re,{nanoid:s}=N?M:(N=1,M={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
40),a=rt(),l=rl(),u=Symbol("fromOffsetCache"),c=!!(e&&t),d=!!(o&&i);class h{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=o(t.from)),d&&c){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,s,l;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,l=e.col}else s=n.line,l=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,s,l);return(o=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):new a(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:l,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:l,endLine:s,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split(`
41`);r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,s){let a,l;if(!this.map)return!1;let u=this.map.consumer(),c=u.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=u.originalPositionFor({column:s,line:o})),l=i(c.source)?n(c.source):new URL(c.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:l.toString()};if("file:"===l.protocol)if(r)d.file=r(l);else throw Error("file: protocol is not available in this PostCSS build");let h=u.sourceContentFor(c.source);return h&&(d.source=h),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return U=h,h.default=h,re&&re.registerInput&&re.registerInput(h),U}function rc(){if(B)return F;B=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=re,{dirname:r,relative:n,resolve:i,sep:o}=re,{pathToFileURL:s}=re,a=ru(),l=!!(e&&t),u=!!(r&&i&&n&&o);return F=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t=`
42`;this.css.includes(`\r
43`)&&(t=`\r
44`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,i=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,i,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,r;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,i=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(s.generated.line=n,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1):(s.source=o,s.original.line=1,s.original.column=0),this.map.addMapping(s)),(e=t.match(/\n/g))?(n+=e.length,r=t.lastIndexOf(`
45`),i=t.length-r):i+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=n,s.generated.column=i-2):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1),this.map.addMapping(s))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(i(o,this.mapOpts.annotation)));let s=n(o,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(s){let t=s(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function rd(){if(z)return H;z=1;let e=rs();class t extends e{constructor(e){super(e),this.type="comment"}}return H=t,t.default=t,H}function rh(){let e,t,r,n;if(V)return q;V=1;let{isClean:i,my:o}=rn(),s=ra(),a=rd(),l=rs();class u extends l{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
45e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n))for(let e of n=n.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===n.type&&"document"!==this.type)for(let e of n=n.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else if(n.text)n=[new a(n)];else throw Error("Unknown node type in node creation");return n.map(e=>(e[o]||u.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[i]&&function e(t){if(t[i]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return u.registerParse=t=>{e=t},u.registerRule=e=>{t=e},u.registerAtRule=e=>{r=e},u.registerRoot=e=>{n=e},q=u,u.default=u,u.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEac
45h(e=>{u.rebuild(e)})},q}function rf(){let e,t;if(W)return $;W=1;let r=rh();class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},$=n,n.default=n,$}function rp(){if(J)return K;J=1;let e={};return K=function(t){!e[t]&&(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function rg(){if(G)return Y;G=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Y=e,e.default=e,Y}function rm(){if(Q)return X;Q=1;let e=rg();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){!r.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return X=t,t.default=t,X}function rv(){if(er)return et;er=1;let e=rh();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return et=t,t.default=t,e.registerAtRule(t),et}function ry(){let e,t;if(ei)return en;ei=1;let r=rh();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},en=n,n.default=n,r.registerRoot(n),en}function rb(){if(es)return eo;es=1;let e={comma:t=>e.split(t,[","],!0),space(t){let r=[" ",`
46`,"	"];return e.split(t,r)},split(e,t,r){let n=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};return eo=e,e.default=e,eo}function rw(){if(el)return ea;el=1;let e=rh(),t=rb();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return ea=r,r.default=r,e.registerRule(r),ea}function rS(){if(eh)return ed;eh=1;let e=rh(),t=function(){if(ec)return eu;ec=1;let e=ra(),t=function(){if(ee)return Z;ee=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,n=/[\da-f]/i;return Z=function(i,o={}){let s,a,l,u,c,d,h,f,p,g,m=i.css.valueOf(),v=o.ignoreErrors,y=m.length,b=0,w=[],S=[];function k(e){throw i.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=y},nextToken:function(i){if(S.length)return S.pop();if(b>=y)return;let o=!!i&&i.ignoreUnclosed;switch(s=m.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:a=b;do a+=1,s=m.charCodeAt(a);while(32===s||10===s||9===s||13===s||12===s)g=["space",m.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(s);g=[e,e,b];break}case 40:if(f=w.length?w.pop()[1]:"",p=m.charCodeAt(b+1),"url"===f&&39!==p&&34!==p&&32!==p&&10!==p&&9!==p&&12!==p&&13!==p){a=b;do{if(d=!1,-1===(a=m.indexOf(")",a+1)))if(v||o){a=b;break}else k("bracket");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["brackets",m.slice(b,a+1),b,a],b=a}else a=m.indexOf(")",b+1),u=m.slice(b,a+1),-1===a||r.test(u)?g=["(","(",b]:(g=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===s?"'":'"',a=b;do{if(d=!1,-1===(a=m.indexOf(l,a+1)))if(v||o){a=b+1;break}
46else k("string");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["string",m.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(m),a=0===e.lastIndex?m.length-1:e.lastIndex-2,g=["at-word",m.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,c=!0;92===m.charCodeAt(a+1);)a+=1,c=!c;if(s=m.charCodeAt(a+1),c&&47!==s&&32!==s&&10!==s&&9!==s&&13!==s&&12!==s&&(a+=1,n.test(m.charAt(a)))){for(;n.test(m.charAt(a+1));)a+=1;32===m.charCodeAt(a+1)&&(a+=1)}g=["word",m.slice(b,a+1),b,a],b=a;break;default:47===s&&42===m.charCodeAt(b+1)?(0===(a=m.indexOf("*/",b+2)+1)&&(v||o?a=m.length:k("comment")),g=["comment",m.slice(b,a+1),b,a]):(t.lastIndex=b+1,t.test(m),a=0===t.lastIndex?m.length-1:t.lastIndex-2,g=["word",m.slice(b,a+1),b,a],w.push(g)),b=a}return b++,g},position:function(){return b}}}}(),r=rd(),n=rv(),i=ry(),o=rw(),s={empty:!0,space:!0};return eu=class{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let s=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){a=!0;break}else if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,o]of e.entries()){if("("===(t=o[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(o);r=o}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n,i,o=new e;this.init(o,t[0][2]);let s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),o.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;o.prop+=t.shift()[1]}for(o.raws.between="";t.length;){if(":"===(n=t.shift())[0]){o.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),o.raws.between+=n[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if("!important"===(n=t[e])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(t,e);" !important"!==(r=this.spacesFromEnd(t)+r)&&(o.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(o,"value",a.concat(t),r),o.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}
46if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,a,l,u=r.length,c="",d=!0;for(let e=0;e<u;e+=1)"space"!==(o=(i=r[e])[0])||e!==u-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",s[l]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=ru();function n(e,n){let i=new t(new r(e,n));try{i.parse()}catch(e){throw e}return i.root}return ed=n,n.default=n,e.registerParse(n),ed}function rk(){if(ep)return ef;ep=1;let{isClean:e,my:t}=rn(),r=rc(),n=ro(),i=rh(),o=rf();rp();let s=rm(),a=rS(),l=ry(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function h(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function p(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let m={};class v{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=g(r);else if(r instanceof v||r instanceof s)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&i.rebuild(o)}this.result=new s(e,o,n),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
46. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(h(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[p(t)];for(;r.length>0;){let e=this.visitTick(r);if(h(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(h(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new r(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:i}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&r.visitorIndex<i.length){let[e,t]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let i,o=r.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[e]){i[e]=!0,t.push(p(i));return}r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t){n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator());return}if(this.listeners[t]){r.visitors=this.listeners[t];return}}t.pop()}walkSync(t){for(let r of(t[e]=!0,f(t)))if(0===r)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=e=>{m=e},ef=v,v.default=v,l.registerLazyResult(v),o.registerLazyResult(v),ef}let rx=(c=function(){if(ek)return eS;ek=1;let e=rt(),t=ra(),r=rk(),n=rh(),i=function(){if(ey)return ev;ey=1;let e=function(){if(em)return eg;em=1;let e=rc(),t=ro();rp();let r=rS(),n=rm();class i{constructor(r,i,o){let s;i=i.toString(),this.stringified=!1,this._processor=r,this._css=i,this._opts=o,this._map=void 0,this.result=new n(this._processor,s,this._opts),this.result.css=i;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(t,s,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}
46async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=r(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}}return eg=i,i.default=i,eg}(),t=rk(),r=rf(),n=ry();class i{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return ev=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),ev}(),o=ro(),s=function(){if(ew)return eb;ew=1;let e=ra(),t=rl(),r=rd(),n=rv(),i=ru(),o=ry(),s=rw();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:c,...d}=l;if(c)for(let e of(u=[],c)){let r={...e,__proto__:i.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}if(d.nodes&&(d.nodes=l.nodes.map(e=>a(e,u))),d.source){let{inputId:e,...t}=d.source;d.source=t,null!=e&&(d.source.input=u[e])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new n(d);else throw Error("Unknown node type: "+l.type)}return eb=a,a.default=a,eb}(),a=rf(),l=rg(),u=rd(),c=rv(),d=rm(),h=ru(),f=rS(),p=rb(),g=rw(),m=ry(),v=rs();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
47https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new i().version,s}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=f,y.fromJSON=s,y.list=p,y.comment=e=>new u(e),y.atRule=e=>new c(e),y.decl=e=>new t(e),y.rule=e=>new g(e),y.root=e=>new m(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=i,y.Document=a,y.Comment=u,y.Warning=l,y.AtRule=c,y.Result=d,y.Input=h,y.Rule=g,y.Root=m,y.Node=v,r.registerPostcss(y),eS=y,y.default=y,eS}())&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;rx.stringify,rx.fromJSON,rx.plugin,rx.parse,rx.list,rx.document,rx.comment,rx.atRule,rx.rule,rx.decl,rx.root,rx.CssSyntaxError,rx.Declaration,rx.Container,rx.Processor,rx.Document,rx.Comment,rx.Warning,rx.AtRule,rx.Result,rx.Input,rx.Rule,rx.Root,rx.Node;var rE=Object.defineProperty,rC=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?rE(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},r_={exports:{}};let rO=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function rI(){if(eC)return eE;eC=1;let e=function(){if(ex)return r_.exports;ex=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return r_.exports=t(),r_.exports.createColors=t,r_.exports}();
47class t extends Error{constructor(e,r,n,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){let r,n;if(!this.source)return"";let i=this.source;null==t&&(t=e.isColorSupported),rO&&t&&(i=rO(i));let o=i.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(t){let{bold:t,gray:i,red:o}=e.createColors(!0);r=e=>t(o(e)),n=e=>i(e)}else r=n=e=>e;return o.slice(s,a).map((e,t)=>{let i=s+1+t,o=" "+(" "+i).slice(-l)+" | ";if(i===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+`
48 `+t+r("^")}return" "+n(o)+e}).join(`
49`)}toString(){let e=this.showSourceCode();return e&&(e=`
50
51`+e+`
52`),this.name+": "+this.message+e}}return eE=t,t.default=t,eE}var rT={};function rR(){return e_||(e_=1,rT.isClean=Symbol("isClean"),rT.my=Symbol("my")),rT}function rA(){if(eI)return eO;eI=1;let e={after:`
53`,beforeClose:`
54`,beforeComment:`
55`,beforeDecl:`
56`,beforeOpen:" ",beforeRule:`
57`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes(`
58`)){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let i;if(n||(n=r),r&&void 0!==(i=t.raws[r]))return i;let o=t.parent;if("before"===n&&(!o||"root"===o.type&&o.first===t||o&&"document"===o.type))return"";if(!o)return e[n];let s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[n])return s.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{var a;let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?i=this[e](s,t):s.walk(e=>{if(void 0!==(i=e.raws[r]))return!1})}return void 0===i&&(i=e[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes(`
59`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
60`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
61`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes(`
62`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(`
63`);return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return eO=t,t.default=t,eO}function rP(){if(eR)return eT;eR=1;let e=rA();function t(t,r){new e(r).stringify(t)}return eT=t,t.default=t,eT}function rM(){if(eP)return eA;eP=1;let{isClean:e,my:t}=rR(),r=rI(),n=rA(),i=rP();class o{constructor(r={}){for(let n in this.raws={},this[e]=!1,this[t]=!0,r)if("nodes"===n)for(let e of(this.nodes=[],r[n]))"function"==typeof e.clone?this.append(e.clone()):this.append(e);else this[n]=r[n]}
63addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let o=t[i],s=typeof o;"parent"===i&&"object"===s?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(t=>e(t,n)):("object"===s&&null!==o&&(o=e(o)),n[i]=o)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}
63markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)`
64`===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new n().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return eA=o,o.default=o,eA}function rN(){if(eN)return eM;eN=1;let e=rM();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return eM=t,t.default=t,eM}function rD(){if(ej)return eU;ej=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=rO,{existsSync:r,readFileSync:n}=rO,{dirname:i,join:o}=rO;class s{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=i(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n)if("string"==typeof n)return n;else if("function"==typeof n){let e=n(r);if(e){let t=this.loadFile(e);
64if(!t)throw Error("Unable to load previous source map: "+e.toString());return t}}else if(n instanceof e)return t.fromSourceMap(n).toString();else if(n instanceof t)return n.toString();else if(this.isMap(n))return JSON.stringify(n);else throw Error("Unsupported previous source map format: "+n.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return r&&(e=o(i(r),e)),this.loadFile(e)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return eU=s,s.default=s,eU}function rL(){if(eB)return eF;eB=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=rO,{fileURLToPath:r,pathToFileURL:n}=rO,{isAbsolute:i,resolve:o}=rO,{nanoid:s}=eL?eD:(eL=1,eD={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
64),a=rI(),l=rD(),u=Symbol("fromOffsetCache"),c=!!(e&&t),d=!!(o&&i);class h{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=o(t.from)),d&&c){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,s,l;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,l=e.col}else s=n.line,l=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,s,l);return(o=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):new a(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:l,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:l,endLine:s,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split(`
65`);r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,s){let a,l;if(!this.map)return!1;let u=this.map.consumer(),c=u.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=u.originalPositionFor({column:s,line:o})),l=i(c.source)?n(c.source):new URL(c.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:l.toString()};if("file:"===l.protocol)if(r)d.file=r(l);else throw Error("file: protocol is not available in this PostCSS build");let h=u.sourceContentFor(c.source);return h&&(d.source=h),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return eF=h,h.default=h,rO&&rO.registerInput&&rO.registerInput(h),eF}function rU(){if(ez)return eH;ez=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=rO,{dirname:r,relative:n,resolve:i,sep:o}=rO,{pathToFileURL:s}=rO,a=rL(),l=!!(e&&t),u=!!(r&&i&&n&&o);return eH=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t=`
66`;this.css.includes(`\r
67`)&&(t=`\r
68`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,i=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,i,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,r;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,i=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(s.generated.line=n,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1):(s.source=o,s.original.line=1,s.original.column=0),this.map.addMapping(s)),(e=t.match(/\n/g))?(n+=e.length,r=t.lastIndexOf(`
69`),i=t.length-r):i+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=n,s.generated.column=i-2):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1),this.map.addMapping(s))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(i(o,this.mapOpts.annotation)));let s=n(o,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(s){let t=s(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function rj(){if(eV)return eq;eV=1;let e=rM();class t extends e{constructor(e){super(e),this.type="comment"}}return eq=t,t.default=t,eq}function rF(){let e,t,r,n;if(eW)return e$;eW=1;let{isClean:i,my:o}=rR(),s=rN(),a=rj(),l=rM();class u extends l{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
69e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n))for(let e of n=n.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===n.type&&"document"!==this.type)for(let e of n=n.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else if(n.text)n=[new a(n)];else throw Error("Unknown node type in node creation");return n.map(e=>(e[o]||u.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[i]&&function e(t){if(t[i]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return u.registerParse=t=>{e=t},u.registerRule=e=>{t=e},u.registerAtRule=e=>{r=e},u.registerRoot=e=>{n=e},e$=u,u.default=u,u.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEac
69h(e=>{u.rebuild(e)})},e$}function rB(){let e,t;if(eJ)return eK;eJ=1;let r=rF();class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},eK=n,n.default=n,eK}function rH(){if(eG)return eY;eG=1;let e={};return eY=function(t){!e[t]&&(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function rz(){if(eQ)return eX;eQ=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return eX=e,e.default=e,eX}function rq(){if(e0)return eZ;e0=1;let e=rz();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){!r.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return eZ=t,t.default=t,eZ}function rV(){if(e4)return e3;e4=1;let e=rF();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return e3=t,t.default=t,e.registerAtRule(t),e3}function r$(){let e,t;if(e5)return e6;e5=1;let r=rF();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},e6=n,n.default=n,r.registerRoot(n),e6}function rW(){if(e9)return e8;e9=1;let e={comma:t=>e.split(t,[","],!0),space(t){let r=[" ",`
70`,"	"];return e.split(t,r)},split(e,t,r){let n=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};return e8=e,e.default=e,e8}function rK(){if(te)return e7;te=1;let e=rF(),t=rW();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return e7=r,r.default=r,e.registerRule(r),e7}function rJ(){if(ti)return tn;ti=1;let e=rF(),t=function(){if(tr)return tt;tr=1;let e=rN(),t=function(){if(e2)return e1;e2=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,n=/[\da-f]/i;return e1=function(i,o={}){let s,a,l,u,c,d,h,f,p,g,m=i.css.valueOf(),v=o.ignoreErrors,y=m.length,b=0,w=[],S=[];function k(e){throw i.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=y},nextToken:function(i){if(S.length)return S.pop();if(b>=y)return;let o=!!i&&i.ignoreUnclosed;switch(s=m.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:a=b;do a+=1,s=m.charCodeAt(a);while(32===s||10===s||9===s||13===s||12===s)g=["space",m.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(s);g=[e,e,b];break}case 40:if(f=w.length?w.pop()[1]:"",p=m.charCodeAt(b+1),"url"===f&&39!==p&&34!==p&&32!==p&&10!==p&&9!==p&&12!==p&&13!==p){a=b;do{if(d=!1,-1===(a=m.indexOf(")",a+1)))if(v||o){a=b;break}else k("bracket");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["brackets",m.slice(b,a+1),b,a],b=a}else a=m.indexOf(")",b+1),u=m.slice(b,a+1),-1===a||r.test(u)?g=["(","(",b]:(g=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===s?"'":'"',a=b;do{if(d=!1,-1===(a=m.indexOf(l,a+1)))if(v||o){a=b+1;break}
70else k("string");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["string",m.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(m),a=0===e.lastIndex?m.length-1:e.lastIndex-2,g=["at-word",m.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,c=!0;92===m.charCodeAt(a+1);)a+=1,c=!c;if(s=m.charCodeAt(a+1),c&&47!==s&&32!==s&&10!==s&&9!==s&&13!==s&&12!==s&&(a+=1,n.test(m.charAt(a)))){for(;n.test(m.charAt(a+1));)a+=1;32===m.charCodeAt(a+1)&&(a+=1)}g=["word",m.slice(b,a+1),b,a],b=a;break;default:47===s&&42===m.charCodeAt(b+1)?(0===(a=m.indexOf("*/",b+2)+1)&&(v||o?a=m.length:k("comment")),g=["comment",m.slice(b,a+1),b,a]):(t.lastIndex=b+1,t.test(m),a=0===t.lastIndex?m.length-1:t.lastIndex-2,g=["word",m.slice(b,a+1),b,a],w.push(g)),b=a}return b++,g},position:function(){return b}}}}(),r=rj(),n=rV(),i=r$(),o=rK(),s={empty:!0,space:!0};return tt=class{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let s=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){a=!0;break}else if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,o]of e.entries()){if("("===(t=o[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(o);r=o}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n,i,o=new e;this.init(o,t[0][2]);let s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),o.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;o.prop+=t.shift()[1]}for(o.raws.between="";t.length;){if(":"===(n=t.shift())[0]){o.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),o.raws.between+=n[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if("!important"===(n=t[e])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(t,e);" !important"!==(r=this.spacesFromEnd(t)+r)&&(o.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(o,"value",a.concat(t),r),o.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}
70if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,a,l,u=r.length,c="",d=!0;for(let e=0;e<u;e+=1)"space"!==(o=(i=r[e])[0])||e!==u-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",s[l]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=rL();function n(e,n){let i=new t(new r(e,n));try{i.parse()}catch(e){throw e}return i.root}return tn=n,n.default=n,e.registerParse(n),tn}function rY(){if(ts)return to;ts=1;let{isClean:e,my:t}=rR(),r=rU(),n=rP(),i=rF(),o=rB();rH();let s=rq(),a=rJ(),l=r$(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function h(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function p(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let m={};class v{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=g(r);else if(r instanceof v||r instanceof s)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&i.rebuild(o)}this.result=new s(e,o,n),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
70. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(h(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[p(t)];for(;r.length>0;){let e=this.visitTick(r);if(h(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(h(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new r(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:i}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&r.visitorIndex<i.length){let[e,t]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let i,o=r.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[e]){i[e]=!0,t.push(p(i));return}r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t){n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator());return}if(this.listeners[t]){r.visitors=this.listeners[t];return}}t.pop()}walkSync(t){for(let r of(t[e]=!0,f(t)))if(0===r)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=e=>{m=e},to=v,v.default=v,l.registerLazyResult(v),o.registerLazyResult(v),to}let rG=(d=function(){if(tp)return tf;tp=1;let e=rI(),t=rN(),r=rY(),n=rF(),i=function(){if(tc)return tu;tc=1;let e=function(){if(tl)return ta;tl=1;let e=rU(),t=rP();rH();let r=rJ(),n=rq();class i{constructor(r,i,o){let s;i=i.toString(),this.stringified=!1,this._processor=r,this._css=i,this._opts=o,this._map=void 0,this.result=new n(this._processor,s,this._opts),this.result.css=i;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(t,s,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}
70async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=r(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}}return ta=i,i.default=i,ta}(),t=rY(),r=rB(),n=r$();class i{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return tu=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),tu}(),o=rP(),s=function(){if(th)return td;th=1;let e=rN(),t=rD(),r=rj(),n=rV(),i=rL(),o=r$(),s=rK();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:c,...d}=l;if(c)for(let e of(u=[],c)){let r={...e,__proto__:i.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}if(d.nodes&&(d.nodes=l.nodes.map(e=>a(e,u))),d.source){let{inputId:e,...t}=d.source;d.source=t,null!=e&&(d.source.input=u[e])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new n(d);else throw Error("Unknown node type: "+l.type)}return td=a,a.default=a,td}(),a=rB(),l=rz(),u=rj(),c=rV(),d=rq(),h=rL(),f=rJ(),p=rW(),g=rK(),m=r$(),v=rM();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
71https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new i().version,s}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=f,y.fromJSON=s,y.list=p,y.comment=e=>new u(e),y.atRule=e=>new c(e),y.decl=e=>new t(e),y.rule=e=>new g(e),y.root=e=>new m(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=i,y.Document=a,y.Comment=u,y.Warning=l,y.AtRule=c,y.Result=d,y.Input=h,y.Rule=g,y.Root=m,y.Node=v,r.registerPostcss(y),tf=y,y.default=y,tf}())&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;rG.stringify,rG.fromJSON,rG.plugin,rG.parse,rG.list,rG.document,rG.comment,rG.atRule,rG.rule,rG.decl,rG.root,rG.CssSyntaxError,rG.Declaration,rG.Container,rG.Processor,rG.Document,rG.Comment,rG.Warning,rG.AtRule,rG.Result,rG.Input,rG.Rule,rG.Root,rG.Node;class rX{constructor(...e){rC(this,"parentElement",null),rC(this,"parentNode",null),rC(this,"ownerDocument"),rC(this,"firstChild",null),rC(this,"lastChild",null),rC(this,"previousSibling",null),rC(this,"nextSibling",null),rC(this,"ELEMENT_NODE",1),rC(this,"TEXT_NODE",3),rC(this,"nodeType"),rC(this,"nodeName"),rC(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof rX)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}let rQ={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},rZ={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},r0={};function r1(e){if(r0[e])return r0[e];let t=function(e){var t,r;let n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in rQ?rQ[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in rZ?rZ[e]:void 0,s=!!(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return r0[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let o=i[e].prototype;if(document.body.removeChild(n),!o)return r;return r0[e]=o}catch{return r}}let r2={};function r3(e,t,r){var n;let i=`${e}.${String(r)}`;if(r2[i])return r2[i].call(t);let o=null==(n=Object.getOwnPropertyDescriptor(r1(e),r))?void 0:n.get;return o?(r2[i]=o,o.call(t)):t[r]}let r4={};function r6(e,t,r){let n=`${e}.${String(r)}`;if(r4[n])return r4[n].bind(t);let i=r1(e)[r];return"function"!=typeof i?t[r]:(r4[n]=i,i.bind(t))}let r5=function(e){return r3("Node",e,"childNodes")},r8=function(e){return r3("Node",e,"parentNode")},r9=function(e){return r3("Node",e,"parentElement")},r7=function(e){return r3("Node",e,"textContent")},ne=function(e,t){return r6("Node",e,"contains")(t)},nt=function(e){return r6("Node",e,"getRootNode")()},nr=function(e){return e&&"host"in e?r3("ShadowRoot",e,"host"):null},nn=function(e){return e&&"shadowRoot"in e?r3("Element",e,"shadowRoot"):null};function ni(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let no=`Please stop import mirror directly. Instead of that,\r
72now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
73or you can use record.mirror to access the mirror instance during recording.`,ns={map:{},getId:()=>(console.error(no),-1),getNode:()=>(console.error(no),null),removeNodeFromMap(){console.error(no)},has:()=>(console.error(no),!1),reset(){console.error(no)}};function na(e,t,r={}){let n=null,i=0;return function(...o){let s=Date.now();i||!1!==r.leading||(i=s);let a=t-(s-i),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):n||!1===r.trailing||(n=setTimeout(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(l,o)},a))}}function nl(e,t,r,n,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>nl(e,t,o||{},!0)}function nu(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ns=new Proxy(ns,{get:(e,t,r)=>("map"===t&&console.error(no),Reflect.get(e,t,r))}));let nc=Date.now;function nd(e){var t,r,n,i;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=r9(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=r9(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function nh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nf(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function np(e){return e?e.nodeType===e.ELEMENT_NODE?e:r9(e):null}function ng(e,t,r,n){if(!e)return!1;let i=np(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t)||n&&null!==i.closest("."+t))return!0}else if(t6(i,t,n))return!0}catch(e){}return!!(r&&(i.matches(r)||n&&null!==i.closest(r)))||!1}function nm(e,t,r){return"TITLE"===e.tagName&&!!r.headTitleMutations||-2===t.getId(e)}function nv(e){return!!e.changedTouches}function ny(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function nb(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function nw(e){return!!e&&(e instanceof rX&&"shadowRoot"in e?!!e.shadowRoot:!!nn(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(nc=()=>new Date().getTime());class nS{constructor(){tv(this,"id",1),tv(this,"styleIDMap",new WeakMap),tv(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function nk(e){var t;let r=null;return"getRootNode"in e&&(null==(t=nt(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&nr(nt(e))&&(r=nr(nt(e))),r}function nx(e){let t=e.ownerDocument;return!!t&&(ne(t,e)||function(e){let t=e.ownerDocument;return!!t&&ne(t,function(e){let t,r=e;for(;t=nk(r);)r=t;return r}(e))}(e))}var nE=((h=nE||{})[h.DomContentLoaded=0]="DomContentLoaded",h[h.Load=1]="Load",h[h.FullSnapshot=2]="FullSnapshot",h[h.IncrementalSnapshot=3]="IncrementalSnapshot",h[h.Meta=4]="Meta",h[h.Custom=5]="Custom",h[h.Plugin=6]="Plugin",h),nC=((f=nC||{})[f.Mutation=0]="Mutation",f[f.MouseMove=1]="MouseMove",f[f.MouseInteraction=2]="MouseInteraction",f[f.Scroll=3]="Scroll",f[f.ViewportResize=4]="ViewportResize",f[f.Input=5]="Input",f[f.TouchMove=6]="TouchMove",f[f.MediaInteraction=7]="MediaInteraction",f[f.StyleSheetRule=8]="StyleSheetRule",f[f.CanvasMutation=9]="CanvasMutation",f[f.Font=10]="Font",f[f.Log=11]="Log",f[f.Drag=12]="Drag",f[f.StyleDeclaration=13]="StyleDeclaration",f[f.Selection=14]="Selection",f[f.AdoptedStyleSheet=15]="AdoptedStyleSheet",f[f.CustomElement=16]="CustomElement",f),n_=((p=n_||{})[p.MouseUp=0]="MouseUp",p[p.MouseDown=1]="MouseDown",p[p.Click=2]="Click",p[p.ContextMenu=3]="ContextMenu",p[p.DblClick=4]="DblClick",p[p.Focus=5]="Focus",p[p.Blur=6]="Blur",p[p.TouchStart=7]="TouchStart",p[p.TouchMove_Departed=8]="TouchMove_Departed",p[p.TouchEnd=9]="TouchEnd",p[p.TouchCancel=10]="TouchCancel",p),nO=((g=nO||{})[g.Mouse=0]="Mouse",g[g.Pen=1]="Pen",g[g.Touch=2]="Touch",g),nI=((m=nI||{})[m["2D"]=0]="2D",m[m.WebGL=1]="WebGL",m[m.WebGL2=2]="WebGL2",m),nT=((v=nT||{})[v.Play=0]="Play",v[v.Pause=1]="Pause",v[v.Seeked=2]="Seeked",v[v.VolumeChange=3]="VolumeChange",v[v.RateChange=4]="RateChange",v),nR=((y=nR||{})[y.Document=0]="Document",y[y.DocumentType=1]="DocumentType",y[y.Element=2]="Element",y[y.Text=3]="Text",y[y.
73CDATA=4]="CDATA",y[y.Comment=5]="Comment",y);class nA{constructor(){tv(this,"length",0),tv(this,"head",null),tv(this,"tail",null)}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let nP=(e,t)=>`${e}@${t}`;class nM{constructor(){tv(this,"frozen",!1),tv(this,"locked",!1),tv(this,"texts",[]),tv(this,"attributes",[]),tv(this,"attributeMap",new WeakMap),tv(this,"removes",[]),tv(this,"mapRemoves",[]),tv(this,"movedMap",{}),tv(this,"addedSet",new Set),tv(this,"movedSet",new Set),tv(this,"droppedSet",new Set),tv(this,"removesSubTreeCache",new Set),tv(this,"mutationCb"),tv(this,"blockClass"),tv(this,"blockSelector"),tv(this,"maskTextClass"),tv(this,"maskTextSelector"),tv(this,"inlineStylesheet"),tv(this,"maskInputOptions"),tv(this,"maskTextFn"),tv(this,"maskInputFn"),tv(this,"maskAttributeFn"),tv(this,"keepIframeSrcFn"),tv(this,"recordCanvas"),tv(this,"inlineImages"),tv(this,"slimDOMOptions"),tv(this,"dataURLOptions"),tv(this,"doc"),tv(this,"mirror"),tv(this,"iframeManager"),tv(this,"stylesheetManager"),tv(this,"shadowDomManager"),tv(this,"canvasManager"),tv(this,"processedNodeManager"),tv(this,"unattachedDoc"),tv(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),tv(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new nA,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{let o=r8(i);if(!o||!nx(i))return;let s=!1;if(i.nodeType===Node.TEXT_NODE){let e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(s=!0)}let a=tM(o)?this.mirror.getId(nk(i)):this.mirror.getId(o),l=n(i);if(-1===a||-1===l)return r.addNode(i);let u=t9(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{ny(e,this.mirror)&&this.iframeManager.addIframe(e),nb(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),nw(i)&&this.shadowDomManager.addShadowRoot(nn(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:s});u&&(e.push({parentId:a,nextId:l,node:u}),t.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!nD(this.removesSubTreeCache,e,this.mirror)||this.movedSet.has(r8(e)))&&i(e);for(let e of this.addedSet)nL(this.droppedSet,e)||nD(this.removesSubTreeCache,e,this.mirror)?nL(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let o=null;for(;r.length;){let e=null;if(o){let t=this.mirror.getId(r8(o.value)),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r8(r.value));if(-1===n(r.value))continue;if(-1!==t){e=r;break}{let t=r8(r.value);if(t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=nr(t);if(-1!==this.mirror.getId(n)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),i(e.value)}let s={texts:this.texts.map(e=>{let t=e.node,r=r8(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}
73return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(s))}),tv(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(r5(e),e=>r7(e)||"").join("");t.attributes.value=tj({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:tH(e),value:r,maskInputFn:this.maskInputFn})}),tv(this,"processMutation",e=>{if(!nm(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=r7(e.target);ng(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:t5(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,np(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let e=tH(t);n=tj({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(ng(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n))if(t.contentDocument)return;else r="rr_src";if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
73,this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!t4(t.tagName,r)){if(i.attributes[r]=t3(this.doc,tF(t.tagName),tF(r),n),this.maskAttributeFn&&"string"==typeof i.attributes[r]){let e=this.maskAttributeFn(r,i.attributes[r],t);null!==e?i.attributes[r]=e:delete i.attributes[r]}if("style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let n of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(n),o=t.style.getPropertyPriority(n);e!==r.style.getPropertyValue(n)||o!==r.style.getPropertyPriority(n)?""===o?i.styleDiff[n]=e:i.styleDiff[n]=[e,o]:i._unchangedStyles[n]=[e,o]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal")}break}case"childList":if(ng(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=tM(e.target)?this.mirror.getId(nr(e.target)):this.mirror.getId(e.target);ng(e.target,this.blockClass,this.blockSelector,!1)||nm(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(nN(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(tM(t))return!1;let n=r.getId(t);if(!r.has(n))return!0;let i=r8(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[nP(r,n)]?nN(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!!(tM(e.target)&&tN(e.target))||void 0}),function(e,t){let r=[e];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),r5(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),tv(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(nm(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[nP(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!ng(e,this.blockClass,this.blockSelector,!1)&&(r5(e).forEach(e=>this.genAdds(e)),nw(e)&&r5(nn(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function nN(e,t){e.delete(t),r5(t).forEach(t=>nN(e,t))}function nD(e,t,r){return 0!==e.size&&function(e,t,r){let n=r8(t);return!!n&&e.has(n)}(e,t)}function nL(e,t){return 0!==e.size&&function e(t,r){let n=r8(r);return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let nU=e=>o?(...t)=>{try{return e(...t)}catch(e){if(o&&!0===o(e))return;throw e}}:e;function nj(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}let nF=[];function nB(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function nH(e,t){let r=new nM;nF.push(r),r.init(e);let n=new(r1("MutationObserver")).constructor(nU(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function nz({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){return ni("scroll",nU(na(nU(o=>{let s=nB(o);if(!s||ng(s,n,i,!0))return;let a=r.getId(s);if(s===t&&t.defaultView){let r=nd(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}let nq=["INPUT","TEXTAREA","SELECT"],nV=new WeakMap;function n$(e){var t=[];if(nY("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||nY("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||nY("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||nY("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}function nW(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function nK({mirror:e,stylesheetManager:t},r){var n,i,o;let s=null;s="#document"===r.nodeName?e.getId(r):e.getId(nr(r));let a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(o=null==(i=r.ownerDocument)?void 0:i.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;let n=null==(r=l.set)?void 0:r.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return n}}),nU(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function nJ(e,t={}){let r,n=e.doc.defaultView;if(!n)return()=>{};
73let{mutationCb:i,mousemoveCb:o,mouseInteractionCb:s,scrollCb:a,viewportResizeCb:l,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:d,styleDeclarationCb:h,canvasMutationCb:f,fontCb:p,selectionCb:g,customElementCb:m}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),i(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),o(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),s(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),a(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),l(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),u(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),d(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),f(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),g(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),m(...e)},e.recordDOM&&(r=nH(e,e.doc));let v=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let i;if(!1===t.mousemove)return()=>{};let o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=na(nU(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),s),u=nU(na(nU(e=>{let t=nB(e),{clientX:r,clientY:o}=nv(e)?e.changedTouches[0]:e;i||(i=nc()),a.push({x:r,y:o,id:n.getId(t),timeOffset:nc()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?nC.Drag:e instanceof MouseEvent?nC.MouseMove:nC.TouchMove)}),o,{trailing:!1})),c=[ni("mousemove",u,r),ni("touchmove",u,r),ni("drag",u,r)];return nU(()=>{c.forEach(e=>e())})}(e),y=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[],l=null;return Object.keys(n_).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(o=>{let s=tF(o),u=t=>{let s=nB(t);if(ng(s,n,i,!0))return;let a=null,u=o;if("pointerType"in t){switch(t.pointerType){case"mouse":a=nO.Mouse;break;case"touch":a=nO.Touch;break;case"pen":a=nO.Pen}a===nO.Touch?n_[o]===n_.MouseDown?u="TouchStart":n_[o]===n_.MouseUp&&(u="TouchEnd"):nO.Pen}else nv(t)&&(a=nO.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===nO.Touch||u.startsWith("Mouse")&&a===nO.Mouse)&&(a=null)):n_[o]===n_.Click&&(a=l,l=null);let c=nv(t)?t.changedTouches[0]:t;if(!c)return;let d=r.getId(s),{clientX:h,clientY:f}=c;nU(e)({type:n_[u],id:d,x:h,y:f,...null!==a&&{pointerType:a}})};if(window.PointerEvent)switch(n_[o]){case n_.MouseDown:case n_.MouseUp:s=s.replace("mouse","pointer");break;case n_.TouchStart:case n_.TouchEnd:return}a.push(ni(s,u,t))}),nU(()=>{a.forEach(e=>e())})}(e),b=nz(e),w=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return ni("resize",nU(na(nU(()=>{let t=nh(),i=nf();(r!==t||n!==i)&&(e({width:Number(i),height:Number(t)}),r=t,n=i)}),200)),t)}(e,{win:n}),S=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function d(e){let r=nB(e),u=e.isTrusted,d=r&&r.tagName;if(r&&"OPTION"===d&&(r=r9(r)),!r||!d||0>nq.indexOf(d)||ng(r,n,i,!0)||r.classList.contains(o)||s&&r.matches(s))return;let f=r.value,p=!1,g=tH(r)||"";"radio"===g||"checkbox"===g?p=r.checked:(a[d.toLowerCase()]||a[g])&&(f=tj({element:r,maskInputOptions:a,tagName:d,type:g,value:f,maskInputFn:l})),h(r,c?{text:f,isChecked:p,userTriggered:u}:{text:f,isChecked:p});let m=r.name;"radio"===g&&m&&p&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach(e=>{if(e!==r){let t=e.value;h(e,c?{text:t,isChecked:!p,userTriggered:!1}:{text:t,isChecked:!p})}})}function h(t,n){let i=nV.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){nV.set(t,n);let i=r.getId(t);nU(e)({...n,id:i})}}let f=("last"===u.input?["change"]:["input","change"]).map(e=>ni(e,nU(d),t)),p=t.defaultView;if(!p)return()=>
73{f.forEach(e=>e())};let g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),m=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&f.push(...m.map(e=>nl(e[0],e[1],{set(){nU(d)({target:this,isTrusted:!1})}},!1,p))),nU(()=>{f.forEach(e=>e())})}(e),k=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:o}){let s=nU(o=>na(nU(i=>{let s=nB(i);if(!s||ng(s,t,r,!0))return;let{currentTime:a,volume:l,muted:u,playbackRate:c,loop:d}=s;e({type:o,id:n.getId(s),currentTime:a,volume:l,muted:u,playbackRate:c,loop:d})}),i.media||500)),a=[ni("play",s(nT.Play),o),ni("pause",s(nT.Pause),o),ni("seeked",s(nT.Seeked),o),ni("volumechange",s(nT.VolumeChange),o),ni("ratechange",s(nT.RateChange),o)];return nU(()=>{a.forEach(e=>e())})}(e),x=()=>{},E=()=>{},C=()=>{},_=()=>{};e.recordDOM&&(x=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let i,o;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:nU((n,i,o)=>{let[s,a]=o,{id:l,styleId:u}=nW(i,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:s,index:a}]}),nj(()=>n.apply(i,o))()})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){let i=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:nU((n,i,o)=>{let[s]=o,{id:a,styleId:l}=nW(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:s}]}),nj(()=>n.apply(i,o))()})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:nU((n,i,o)=>{let[s]=o,{id:a,styleId:l}=nW(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:s}),n.apply(i,o)})})),n.CSSStyleSheet.prototype.replaceSync&&(o=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:nU((n,i,o)=>{let[s]=o,{id:a,styleId:l}=nW(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:s}),n.apply(i,o)})}));let l={};nG("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(nG("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),nG("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),nG("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(l).forEach(([n,i])=>{u[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[n].insertRule,{apply:nU((n,i,o)=>{let[s,a]=o,{id:l,styleId:u}=nW(i.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:s,index:[...n$(i),a||0]}]}),n.apply(i,o)})}),i.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:nU((n,i,o)=>{let[s]=o,{id:a,styleId:l}=nW(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...n$(i),s]}]}),n.apply(i,o)})})}),nU(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),o&&(n.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),E=nK(e,e.doc),C=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nU((i,s,a)=>{var l;let[u,c,d]=a;if(r.has(u))return o.apply(s,[u,c,d]);let{id:h,styleId:f}=nW(null==(l=s.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(h&&-1!==h||f&&-1!==f)&&e({id:h,styleId:f,set:{property:u,value:c,priority:d},index:n$(s.parentRule)}),i.apply(s,a)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nU((i,o,a)=>{var l;let[u]=a;if(r.has(u))return s.apply(o,[u]);let{id:c,styleId:d}=nW(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,remove:{property:u},index:n$(o.parentRule)}),i.apply(o,a)})}),nU(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}(e,{win:n}),e.collectFonts&&(_=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){let n=new o(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let s=nu(t.fonts,"add",function(t){return function(r){return setTimeout(nU(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=o}),n.push(s),nU(()=>
73{n.forEach(e=>e())})}(e)));let O=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,s=!0,a=nU(()=>{let e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);ng(o,n,i,!0)||ng(l,n,i,!0)||a.push({start:r.getId(o),startOffset:s,end:r.getId(l),endOffset:u})}o({ranges:a})});return a(),ni("selectionchange",a)}(e),I=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?nu(r.customElements,"define",function(e){return function(r,n,i){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,n,i])}}):()=>{}}(e),T=[];for(let t of e.plugins)T.push(t.observer(t.callback,n,t.options));return nU(()=>{nF.forEach(e=>e.reset()),null==r||r.disconnect(),v(),y(),b(),w(),S(),k(),x(),E(),C(),_(),O(),I(),T.forEach(e=>e())})}function nY(e){return void 0!==window[e]}function nG(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class nX{constructor(e){tv(this,"iframeIdToRemoteIdMap",new WeakMap),tv(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class nQ{constructor(e){tv(this,"iframes",new WeakMap),tv(this,"crossOriginIframeMap",new WeakMap),tv(this,"crossOriginIframeMirror",new nX(tX)),tv(this,"crossOriginIframeStyleMirror"),tv(this,"crossOriginIframeRootIdMap",new WeakMap),tv(this,"mirror"),tv(this,"mutationCb"),tv(this,"wrappedEmit"),tv(this,"loadListener"),tv(this,"stylesheetManager"),tv(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new nX(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case nE.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:nE.IncrementalSnapshot,data:{source:nC.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case nE.Meta:case nE.Load:case nE.DomContentLoaded:break;case nE.Plugin:return t;case nE.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case nE.IncrementalSnapshot:switch(t.data.source){case nC.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}
73),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case nC.Drag:case nC.TouchMove:case nC.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case nC.ViewportResize:return!1;case nC.MediaInteraction:case nC.MouseInteraction:case nC.Scroll:case nC.CanvasMutation:case nC.Input:return this.replaceIds(t.data,e,["id"]),t;case nC.StyleSheetRule:case nC.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case nC.Font:return t;case nC.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case nC.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(let i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===nR.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class nZ{constructor(e){tv(this,"shadowDoms",new WeakSet),tv(this,"mutationCb"),tv(this,"scrollCb"),tv(this,"bypassOptions"),tv(this,"mirror"),tv(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!tN(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=nH({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(nz({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(nr(e))),this.restoreHandlers.push(nK({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(nu(e.prototype,"attachShadow",function(e){return function(n){let i=e.call(this,n),o=nn(this);return o&&nx(this)&&r.addShadowRoot(o,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var n0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n1="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n2=0;n2<n0.length;n2++)n1[n0.charCodeAt(n2)]=n2;var n3=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=n0[r[t]>>2],i+=n0[(3&r[t])<<4|r[t+1]>>4],i+=n0[(15&r[t+1])<<2|r[t+2]>>6],i+=n0[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let n4=new Map,n6=(e,t,r)=>{let n;if(!e||!(n8(e,t)||"object"==typeof e))return;let i=e.constructor.name,o=((n=n4.get(r))||(n=new Map,n4.set(r,n)),n.has(i)||n.set(i,[]),n.get(i)),s=o.indexOf(e);return -1===s&&(s=o.length,o.push(e)),s},n5=(e,t,r)=>e.map(e=>(function e(t,r,n){if(t instanceof Array)return t.map(t=>e(t,r,n));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:n3(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,r,n),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:r}=t;return{rr_type:e,src:r}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,r,n),t.width,t.height]};else if(n8(t,r)||"object"==typeof t)return{rr_type:t.constructor.name,index:n6(t,r,n)};return t})(e,t,r)),n8=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function n9(e,t,r,n){let i=[];try{let o=nu(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i,...o){if(!ng(this,t,r,!0)){let e="experimental-webgl"===i?"webgl":i;if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){let e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i,...o])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
73{i.forEach(e=>e())}}function n7(e,t,r,n,i,o){let s=[];for(let a of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])continue;let l=nu(e,a,function(e){return function(...s){let l=e.apply(this,s);if(n6(l,o,this),"tagName"in this.canvas&&!ng(this.canvas,n,i,!0)){let e=n5(s,o,this),n={type:t,property:a,args:e};r(this.canvas,n)}return l}});s.push(l)}catch{let n=nl(e,a,{set(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});s.push(n)}return s}let ie=`(function() {
74  "use strict";
75  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
76  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
77  for (var i = 0; i < chars.length; i++) {
78    lookup[chars.charCodeAt(i)] = i;
79  }
80  var encode = function(arraybuffer) {
81    var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
82    for (i2 = 0; i2 < len; i2 += 3) {
83      base64 += chars[bytes[i2] >> 2];
84      base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
85      base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
86      base64 += chars[bytes[i2 + 2] & 63];
87    }
88    if (len % 3 === 2) {
89      base64 = base64.substring(0, base64.length - 1) + "=";
90    } else if (len % 3 === 1) {
91      base64 = base64.substring(0, base64.length - 2) + "==";
92    }
93    return base64;
94  };
95  const lastBlobMap = /* @__PURE__ */ new Map();
96  const transparentBlobMap = /* @__PURE__ */ new Map();
97  async function getTransparentBlobFor(width, height, dataURLOptions) {
98    const id = \`\${width}-\${height}\`;
99    if ("OffscreenCanvas" in globalThis) {
100      if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
101      const offscreen = new OffscreenCanvas(width, height);
102      offscreen.getContext("2d");
103      const blob = await offscreen.convertToBlob(dataURLOptions);
104      const arrayBuffer = await blob.arrayBuffer();
105      const base64 = encode(arrayBuffer);
106      transparentBlobMap.set(id, base64);
107      return base64;
108    } else {
109      return "";
110    }
111  }
112  const worker = self;
113  worker.onmessage = async function(e) {
114    if ("OffscreenCanvas" in globalThis) {
115      const { id, bitmap, width, height, dataURLOptions } = e.data;
116      const transparentBase64 = getTransparentBlobFor(
117        width,
118        height,
119        dataURLOptions
120      );
121      const offscreen = new OffscreenCanvas(width, height);
122      const ctx = offscreen.getContext("2d");
123      ctx.drawImage(bitmap, 0, 0);
124      bitmap.close();
125      const blob = await offscreen.convertToBlob(dataURLOptions);
126      const type = blob.type;
127      const arrayBuffer = await blob.arrayBuffer();
128      const base64 = encode(arrayBuffer);
129      if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
130        lastBlobMap.set(id, base64);
131        return worker.postMessage({ id });
132      }
133      if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
134      worker.postMessage({
135        id,
136        type,
137        base64,
138        width,
139        height
140      });
141      lastBlobMap.set(id, base64);
142    } else {
143      return worker.postMessage({ id: e.data.id });
144    }
145  };
146})();
147//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
148`,it="undefined"!=typeof self&&self.Blob&&new Blob([ie],{type:"text/javascript;charset=utf-8"});function ir(e){let t;try{if(!(t=it&&(self.URL||self.webkitURL).createObjectURL(it)))throw"";let r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ie),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class ii{constructor(e){tv(this,"pendingCanvasMutations",new Map),tv(this,"rafStamps",{latestId:0,invokeId:null}),tv(this,"mirror"),tv(this,"mutationCb"),tv(this,"resetObservers"),tv(this,"frozen",!1),tv(this,"locked",!1),tv(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,i){let o,s=n9(t,r,n,!0),a=new Map,l=new ir;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:nI["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};let u=1e3/e,c=0,d=e=>{if(c&&e-c<u){o=requestAnimationFrame(d);return}c=e,(()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{ng(t,r,n,!0)||e.push(t)}),e}
148)().forEach(async e=>{var t;let r=this.mirror.getId(e);if(a.get(r)||0===e.width||0===e.height)return;if(a.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)===!1&&r.clear(r.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);l.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),o=requestAnimationFrame(d)};o=requestAnimationFrame(d),this.resetObservers=()=>{s(),cancelAnimationFrame(o)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=n9(e,t,r,!1),i=function(e,t,r,n){let i=[];for(let o of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;let s=nu(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...s){return ng(this.canvas,r,n,!0)||setTimeout(()=>{let r=n5(s,t,this);e(this.canvas,{type:nI["2D"],property:o,args:r})},0),i.apply(this,s)}});i.push(s)}catch{let r=nl(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:nI["2D"],property:o,args:[t],setter:!0})}});i.push(r)}return()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,n){let i=[];return i.push(...n7(t.WebGLRenderingContext.prototype,nI.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&i.push(...n7(t.WebGL2RenderingContext.prototype,nI.WebGL2,e,r,n,t)),()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let n=r.map(e=>{let{type:t,...r}=e;return r}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e)}}class io{constructor(e){tv(this,"trackedLinkElements",new WeakSet),tv(this,"mutationCb"),tv(this,"adoptedStyleSheetCb"),tv(this,"styleMirror",new nS),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:tL(e,t.href),index:r}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class is{constructor(){tv(this,"nodeMap",new WeakMap),tv(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ia=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(w=e.contentWindow)?void 0:w.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let il=new tU;function iu(e={}){let t,{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:u="rr-block",blockSelector:c=null,ignoreClass:d="rr-ignore",ignoreSelector:h=null,maskTextClass:f="rr-mask",maskTextSelector:p=null,inlineStylesheet:g=!0,maskAllInputs:m,maskInputOptions:v,slimDOMOptions:y,maskInputFn:b,maskTextFn:w,maskAttributeFn:S,hooks:k,packFn:x,sampling:E={},dataURLOptions:C={},mousemoveWait:_,recordDOM:O=!0,recordCanvas:I=!1,recordCrossOriginIframes:T=!1,recordAfter:R="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:P=!1,inlineImages:M=!1,plugins:N,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:U,applyBackgroun
148dColorToBlockedElements:j=!1}=e;o=U;let F=!T||window.parent===window,B=!1;if(!F)try{window.parent.document&&(B=!1)}catch(e){B=!0}if(F&&!r)throw Error("emit function is required");if(!F&&!B)return()=>{};void 0!==_&&void 0===E.mousemove&&(E.mousemove=_),il.reset();let H=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==v?v:{password:!0},z=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y,headTitleMutations:"all"===y}:y||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let q=0,V=e=>{for(let t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return x&&!B&&(e=x(e)),e};s=(e,o)=>{var s;if(e.timestamp=nc(),(null==(s=nF[0])?void 0:s.isFrozen())&&e.type!==nE.FullSnapshot&&(e.type!==nE.IncrementalSnapshot||e.data.source!==nC.Mutation)&&nF.forEach(e=>e.unfreeze()),F)null==r||r(V(e),o);else if(B){let t={type:"rrweb",event:V(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===nE.FullSnapshot)t=e,q=0;else if(e.type===nE.IncrementalSnapshot){if(e.data.source===nC.Mutation&&e.data.isAttachIframe)return;q++;let r=i&&q>=i,o=n&&e.timestamp-t.timestamp>n;(r||o)&&a(!0)}};let $=e=>{s({type:nE.IncrementalSnapshot,data:{source:nC.Mutation,...e}})},W=e=>s({type:nE.IncrementalSnapshot,data:{source:nC.Scroll,...e}}),K=e=>s({type:nE.IncrementalSnapshot,data:{source:nC.CanvasMutation,...e}}),J=new io({mutationCb:$,adoptedStyleSheetCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.AdoptedStyleSheet,...e}})}),Y=new nQ({mirror:il,mutationCb:$,stylesheetManager:J,recordCrossOriginIframes:T,wrappedEmit:s});for(let e of N||[])e.getMirror&&e.getMirror({nodeMirror:il,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});let G=new is;l=new ii({recordCanvas:I,mutationCb:K,win:window,blockClass:u,blockSelector:c,mirror:il,sampling:E.canvas,dataURLOptions:C});let X=new nZ({mutationCb:$,scrollCb:W,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:f,maskTextSelector:p,inlineStylesheet:g,maskInputOptions:H,dataURLOptions:C,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,recordCanvas:I,inlineImages:M,sampling:E,slimDOMOptions:z,iframeManager:Y,stylesheetManager:J,canvasManager:l,keepIframeSrcFn:D,processedNodeManager:G},mirror:il});a=(e=!1)=>{if(!O)return;s({type:nE.Meta,data:{href:window.location.href,width:nf(),height:nh()}},e),J.reset(),X.init(),nF.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new tU,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,maskAttributeFn:f,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:k=()=>!1,applyBackgroundColorToBlockedElements:x=!1}=t||{};return t9(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,maskAttributeFn:f,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:g,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:k,newlyAddedElement:!1,applyBackgroun
148dColorToBlockedElements:x})}(document,{mirror:il,blockClass:u,blockSelector:c,maskTextClass:f,maskTextSelector:p,inlineStylesheet:g,maskAllInputs:H,maskTextFn:w,maskInputFn:b,maskAttributeFn:S,slimDOM:z,dataURLOptions:C,recordCanvas:I,inlineImages:M,applyBackgroundColorToBlockedElements:j,onSerialize:e=>{ny(e,il)&&Y.addIframe(e),nb(e,il)&&J.trackLinkElement(e),nw(e)&&X.addShadowRoot(nn(e),document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),X.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{J.attachLinkElement(e,t)},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");s({type:nE.FullSnapshot,data:{node:t,initialOffset:nd(window)}},e),nF.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,il.getId(document))};try{let e=[],t=e=>{var t;return nU(nJ)({mutationCb:$,mousemoveCb:(e,t)=>s({type:nE.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.MouseInteraction,...e}}),scrollCb:W,viewportResizeCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.ViewportResize,...e}}),inputCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.Input,...e}}),mediaInteractionCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.MediaInteraction,...e}}),styleSheetRuleCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.StyleSheetRule,...e}}),styleDeclarationCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.StyleDeclaration,...e}}),canvasMutationCb:K,fontCb:e=>s({type:nE.IncrementalSnapshot,data:{source:nC.Font,...e}}),selectionCb:e=>{s({type:nE.IncrementalSnapshot,data:{source:nC.Selection,...e}})},customElementCb:e=>{s({type:nE.IncrementalSnapshot,data:{source:nC.CustomElement,...e}})},blockClass:u,ignoreClass:d,ignoreSelector:h,maskTextClass:f,maskTextSelector:p,maskInputOptions:H,inlineStylesheet:g,sampling:E,recordDOM:O,recordCanvas:I,inlineImages:M,userTriggeredOnInput:A,collectFonts:P,doc:e,maskInputFn:b,maskTextFn:w,maskAttributeFn:S,keepIframeSrcFn:D,blockSelector:c,slimDOMOptions:z,dataURLOptions:C,mirror:il,iframeManager:Y,stylesheetManager:J,shadowDomManager:X,processedNodeManager:G,canvasManager:l,ignoreCSSAttributes:L,plugins:(null==(t=null==N?void 0:N.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>s({type:nE.Plugin,data:{plugin:e.name,payload:t}})})))||[]},k)};Y.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{a(),e.push(t(document)),ia=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(ni("DOMContentLoaded",()=>{s({type:nE.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&r()})),e.push(ni("load",()=>{s({type:nE.Load,data:{}}),"load"===R&&r()},window))),()=>{e.forEach(e=>e()),G.destroy(),ia=!1,o=void 0}}catch(e){console.warn(e)}}iu.addCustomEvent=(e,t)=>{if(!ia)throw Error("please add custom event after start recording");s({type:nE.Custom,data:{tag:e,payload:t}})},iu.freezePage=()=>{nF.forEach(e=>e.freeze())},iu.takeFullSnapshot=e=>{if(!ia)throw Error("please take full snapshot after start recording");a(e)},iu.mirror=il,(b=tg||(tg={}))[b.NotStarted=0]="NotStarted",b[b.Running=1]="Running",b[b.Stopped=2]="Stopped";let{addCustomEvent:ic}=iu,{freezePage:id}=iu,{takeFullSnapshot:ih}=iu},52550(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},55665(e,t,r){e.exports=r(95421).Symbol},58463(e){e.exports=function(){var e,t=["navigation","request","process","log","user","state","error","manual"],r=function(e,t,r){for(var n=r,i=0,o=e.length;i<o;i++)n=t(n,e[i],i,e);return n},n=function(e,t){return r(e,function(e,r,n,i){return t(r,n,i)?e.concat(r):e},[])},i=function(e,t){return r(e,function(e,r,n,i){return!0===e||r===t},!1)},o=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=!({toString:null}).propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);if(!s)return r;for(var n=0,i=a.length;n<i;n++)Object.prototype.hasOwnProperty.call(e,a[n])&&r.push(a[n]);return r},u=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1/0),function(r){return"number"==typeof r&&parseInt(""+r,10)===r&&r>=e&&r<=t}},c=function(e){return"function"==typeof e||o(e)&&n(e,function(e){return"function"==typeof e}).length===e.length},d=function(e){return"string"==typeof e&&!!e.length},h={},f=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};h.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:d},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||d(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||d(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return f()}
148,message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=l(e),r=l(f());return!(n(t,function(e){return i(r,e)}).length<t.length)&&!(n(l(e),function(t){return"boolean"!=typeof e[t]}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},endpoints:{defaultValue:function(e){return void 0===e?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&d(e.notify)&&d(e.sessions)&&0===n(l(e),function(e){return!i(["notify","sessions"],e)}).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||o(e)&&n(e,function(e){return"string"==typeof e}).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return u(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return t},message:"should be null or a list of available breadcrumb types ("+t.join(",")+")",validate:function(e){return null===e||o(e)&&r(e,function(e,r){return!1===e?e:i(t,r)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&r(l(e),function(e,t){return e&&i(["id","email","name"],t)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&r(["debug","info","warn","error"],function(t,r){return t&&"function"==typeof e[r]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return o(e)&&e.length===n(e,function(e){return"string"==typeof e||e&&"function"==typeof e.test}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return o(e)&&e.length===n(e,function(e){return e&&"object"==typeof e&&"function"==typeof e.load}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return o(e)&&e.length===n(e,function(e){return e&&"object"==typeof e&&"string"==typeof e.name}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}}};var p=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g=function(e,t){return r(e,function(e,r,n,i){return e.concat(t(r,n,i))},[])};function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var v=h.schema,y={releaseStage:p({},v.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:m({},v.appType,{defaultValue:function(){return"browser"}}),logger:p({},v.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?b():void 0}})},b=function(){var e={},t=console.log;return g(["debug","info","warn","error"],function(r){var n=console[r];e[r]="function"==typeof n?n.bind(console,"[bugsnag]"):t.bind(console,"[bugsnag]")}),e},w=function(){function e(e,t,r,n){void 0===n&&(n=new Date),this.type=r,this.message=e,this.metadata=t,this.timestamp=n}
148return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),S={};!function(t,r){"use strict";"function"==typeof e&&e.amd?e("stackframe",[],r):"object"==typeof S?S=r():t.StackFrame=r()}(this,function(){"use strict";function e(e){return e.charAt(0).toUpperCase()+e.substring(1)}function t(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],i=["fileName","functionName","source"],o=r.concat(n,i,["args"],["evalOrigin"]);function s(t){if(t)for(var r=0;r<o.length;r++)void 0!==t[o[r]]&&this["set"+e(o[r])](t[o[r]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new s(e);else throw TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+r+")":"[eval]:"+t+":"+r:n?n+" ("+e+":"+t+":"+r+")":e+":"+t+":"+r}},s.fromString=function(e){var t=e.indexOf("("),r=e.lastIndexOf(")"),n=e.substring(0,t),i=e.substring(t+1,r).split(","),o=e.substring(r+1);if(0===o.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),l=a[1],u=a[2],c=a[3];return new s({functionName:n,args:i||void 0,fileName:l,lineNumber:u||void 0,columnNumber:c||void 0})};for(var a=0;a<r.length;a++)s.prototype["get"+e(r[a])]=t(r[a]),s.prototype["set"+e(r[a])]=function(e){return function(t){this[e]=!!t}}(r[a]);for(var l=0;l<n.length;l++)s.prototype["get"+e(n[l])]=t(n[l]),s.prototype["set"+e(n[l])]=function(e){return function(t){if(!(!isNaN(parseFloat(t))&&isFinite(t)))throw TypeError(e+" must be a Number");this[e]=Number(t)}}(n[l]);for(var u=0;u<i.length;u++)s.prototype["get"+e(i[u])]=t(i[u]),s.prototype["set"+e(i[u])]=function(e){return function(t){this[e]=String(t)}}(i[u]);return s});var k={};!function(t,r){"use strict";"function"==typeof e&&e.amd?e("stack-generator",["stackframe"],r):"object"==typeof k?k=r(S):t.StackGenerator=r(t.StackFrame)}(this,function(e){return{backtrace:function(t){var r=[],n=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(n=t.maxStackSize);for(var i=arguments.callee;i&&r.length<n&&i.arguments;){for(var o=Array(i.arguments.length),s=0;s<o.length;++s)o[s]=i.arguments[s];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?r.push(new e({functionName:RegExp.$1||void 0,args:o})):r.push(new e({args:o}));try{i=i.caller}catch(e){break}}return r}}});var x={};!function(t,r){"use strict";"function"==typeof e&&e.amd?e("error-stack-parser",["stackframe"],r):"object"==typeof x?x=r(S):t.ErrorStackParser=r(t.StackFrame)}(this,function(e){"use strict";var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(r))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split(`
149`).filter(function(e){return!!e.match(r)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:i.pop());return new e({functionName:i.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split(`
150`).filter(function(e){return!e.match(n)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),i=n&&n[1]?n[1]:void 0,o=this.extractLocation(t.replace(r,""));return new e({functionName:i,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
151`)>-1&&e.message.split(`
152`).length>e.stacktrace.split(`
153`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split(`
154`),i=[],o=2,s=n.length;o<s;o+=2){var a=r.exec(n[o]);a&&i.push(new e({fileName:a[2],lineNumber:a[1],source:n[o]}))}return i},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split(`
155`),i=[],o=0,s=n.length;o<s;o+=2){var a=r.exec(n[o]);a&&i.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:n[o]}))}return i},parseOpera11:function(r){return r.stack.split(`
156`).filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var r,n=t.split("@"),i=this.extractLocation(n.pop()),o=n.shift()||"",s=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return o.match(/\(([^)]*)\)/)&&(r=o.replace(/^[^(]+\(([^)]*)\)$/,"$1")),new e({functionName:s,args:void 0===r||"[arguments not available]"===r?void 0:r.split(","),fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})},this)}}});var E=x,C=function(e,t,r,n){var i,o,s,a,l;return JSON.stringify((i=e,o=n&&n.redactedKeys?n.redactedKeys:[],s=n&&n.redactedPaths?n.redactedPaths:[],a=[],l=0,function e(t,r){function n(){return r.length>8&&l>25e3}if(l++,r.length>20||n())return"...";if(null===t||"object"!=typeof t)return t;if(function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return!0;return!1}(a,t))return"[Circular]";if(a.push(t),"function"==typeof t.toJSON)try{l--;var i=e(t.toJSON(),r);return a.pop(),i}catch(e){return _(e)}if(t instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(t))){l--;var u=e({name:t.name,message:t.message},r);return a.pop(),u}if("[object Array]"===Object.prototype.toString.call(t)){for(var c=[],d=0,h=t.length;d<h;d++){if(n()){c.push("...");break}c.push(e(t[d],r.concat("[]")))}return a.pop(),c}var f={};try{for(var p in t)if(Object.prototype.hasOwnProperty.call(t,p)){if
156(function(e,t){for(var r=0,n=e.length;r<n;r++)if(0===t.indexOf(e[r]))return!0;return!1}(s,r.join("."))&&function(e,t){for(var r=0,n=e.length;r<n;r++)if("string"==typeof e[r]&&e[r].toLowerCase()===t.toLowerCase()||e[r]&&"function"==typeof e[r].test&&e[r].test(t))return!0;return!1}(o,p)){f[p]="[REDACTED]";continue}if(n()){f[p]="...";break}f[p]=e(function(e,t){try{return e[t]}catch(e){return _(e)}}(t,p),r.concat(p))}}catch(e){}return a.pop(),f}(i,[])),t,r)};function _(e){return"[Throws: "+(e?e.message:"?")+"]"}function O(e,t,r,n){if("string"==typeof r){void 0===n?n=null:null!==n&&"string"!=typeof n&&(n=C(n));var i=t[r];if("number"==typeof i){e[i]={name:r,variant:n};return}e.push({name:r,variant:n}),t[r]=e.length-1}}var I=function(e,t,r){var n=t[r];"number"==typeof n&&(e[n]=null,delete t[r])},T=function(e,t,r){if(o(t)){for(var n=0;n<t.length;++n){var i=t[n];null!==i&&"object"==typeof i&&O(e,r,i.name,i.variant)}return e}},R=function(e){return!!e&&(!!e.stack||!!e.stacktrace||!!e["opera#sourceloc"])&&"string"==typeof(e.stack||e.stacktrace||e["opera#sourceloc"])&&e.stack!==e.name+": "+e.message},A=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},P=function(e,t,r){if("string"==typeof t){if(!r)return void delete e[t];"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&e[t]&&delete e[t][r]}},M=function(e,t,r,n){var i,o;if(t){if(null===r)return P(e,t);"object"==typeof r&&(o=r),"string"==typeof r&&((i={})[r]=n,o=i),o&&"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]||(e[t]={}),e[t]=p({},e[t],o))}},N=function(e,t,r){if("string"==typeof t){if(!r)return e[t];if(e[t])return e[t][r]}};function D(){return(D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var L=function(){function e(t,r,n,i,o){void 0===n&&(n=[]),void 0===i&&(i=F()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=o,this._handledState=i,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this._groupingDiscriminator=void 0,this.errors=[H(t,r,e.__type,n)]}var t=e.prototype;return t.addMetadata=function(e,t,r){return M(this._metadata,e,t,r)},t.setTraceCorrelation=function(e,t){"string"==typeof e&&(this._correlation=D({traceId:e},"string"==typeof t?{spanId:t}:{}))},t.getGroupingDiscriminator=function(){return this._groupingDiscriminator},t.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return("string"==typeof e||null==e)&&(this._groupingDiscriminator=e),t},t.getMetadata=function(e,t){return N(this._metadata,e,t)},t.clearMetadata=function(e,t){return P(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),O(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){T(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return g(n(this._features,Boolean),function(e){var t=e.name,r=e.variant,n={featureFlag:t};return"string"==typeof r&&(n.variant=r),n})},t.clearFeatureFlag=function(e){I(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getUser=function(){return this._user},t.setUser=function(e,t,r){this._user={id:e,email:t,name:r}},t.toJSON=function(){return{payloadVersion:"4",exceptions:g(this.errors,function(e){return p({},e,{message:e.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,groupingDiscriminator:this._groupingDiscriminator,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},e}(),U=function(e){var t={file:e.fileName,method:j(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return!(t.lineNumber>-1)||t.file||t.method||(t.file="global code"),t},j=function(e){return/^global code$/i.test(e)?"global code":e},F=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},B=function(e){return"string"==typeof e?e:""};function H(e,t,n,i){return{errorClass:B(e),errorMessage:B(t),type:n,stacktrace:r(i,function(e,t){var r=U(t);try{if("{}"===JSON.stringify(r))return e;return e.concat(r)}catch(t){return e}},[])}}L.getStacktrace=function(e,t,r){if(R(e))return E.parse(e).slice(t);try{return n(k.backtrace(),function(e){return -1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+r)}catch(e){return[]}},L.create=function(e,t,r,n,i,o){void 0===i&&(i=0);var s=q(e,t,n,o),a=s[0],l=s[1];try{var u=L.getStacktrace(a,l>0?1+l+i:0,1+i);c=new L(a.name,a.message,u,r,e)}catch(t){c=new L(a.name,a.message,[],r,e)}if("InvalidError"===a.name&&c.addMetadata(""+n,"non-error parameter",z(e)),a.cause){var c,d,h=g((function e(t){return t.cause?[t].concat(e(t.cause)):[t]})(a).slice(1),function(e){var t=A(e)&&R(e)?E.parse(e):[],r=q(e,!0,"error cause")[0];return"InvalidError"===r.name&&c.addMetadata("error cause",z(e)),H(r.name,r.message,L.__type,t)});(d=c.errors).push.apply(d,h)}return c};var z=function(e){return null===e?"null":void 0===e?"undefined":e},q=function(e,t,r,n){var i,o=0,s=function(e){var t="error cause"===r?"was":"received";n&&n.warn(r+" "+t+' a non-error: "'+e+'"');var i=Error(r+" "+t+' a non-error. See "'+r+'" tab for more detail.');return i.name="InvalidError",i};if(t)switch(typeof e){case"string":case"number":case"boolean":i=Error(String(e)),o+=1;break;case"function":i=s("function"),o+=2;break;case"object":null!==e&&A(e)?i=e:null!==e&&V(e)?((i=Error(e.message||e.errorMessage)).name=e.name||e.errorClass,o+=1):(i=s(null===e?"null":"unsupported object"),o+=2);break;default:i=s("nothing"),o+=2}else A(e)?i=e:(i=s(typeof e),o+=2);if(!R(i))try{throw i}catch(e){R(e)&&(i=e,o=1)}return[i,o]};L.__type="browserjs";var V=function(e){return("string"==typeof e.name||"string"==typeof e.errorClass)&&("string"==typeof e.message||"string"==typeof e.errorMessage)},$=function(e,t,r){var n=0,i=function(){if(n>=e.length)return r(null,!0);t(e[n],function(e,t){return e?r(e):!1===t?r(null,!1):void(n++,i())})};i()},W=function(e,t,r,n){$(e,function(e,n){if("function"!=typeof e)return n(null);try{if(2!==e.length){var i=e(t);if(i&&"function"==typeof i.then)return i.then(function(e){return setTimeout(function(){return n(null,e)})},function(e){setTimeout(function(){return r(e),n(null,!0)})});return n(null,i)}e(t,function(e,t){if(e)return r(e),n(null);n(null,t)})}catch(e){r(e),n(null)}},n)},K=function(e,t,r,n){for(var i=!1,o=e.slice();!i&&o.length;)try{i=!1===o.pop()(t)}catch(e){n.error("Error occurred in "+r+" callback, continuing anyway…"),n.error(e)}return i},J=function(e,t){var r="000000000"+e;return r.substr(r.length-t)},Y="object"==typeof window?window:self,G=0;for(var X in Y)Object.hasOwnProperty.call(Y,X)&&G++;var Q=J(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+G.toString(36),4),Z=function(){return Q},ee=0;function et(){return J((1679616*Math.random()|0).toString(36),4)}function er(){return"c"+new Date().getTime().toString(36)+J((ee=ee<1679616?ee:0,++ee-1).toString(36),4)+Z()+(et()+et())}
156er.fingerprint=Z,er.isCuid=function(e){return"string"==typeof e&&/^c[a-z0-9]{20,32}$/.test(e)};var en=function(){function e(){this.id=er(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,r){this._user={id:e,email:t,name:r}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),ei=function(){},eo=function(){function e(t,r,n,i){var o=this;void 0===r&&(r=h.schema),void 0===n&&(n=[]),this._notifier=i,this._config={},this._schema=r,this._delivery={sendSession:ei,sendEvent:ei},this._logger={debug:ei,info:ei,warn:ei,error:ei},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._groupingDiscriminator=void 0,this._cbs={e:[],s:[],sp:[],b:[]},this.Client=e,this.Event=L,this.Breadcrumb=w,this.Session=en,this._config=this._configure(t,n),g(n.concat(this._config.plugins),function(e){e&&o._loadPlugin(e)}),this._depth=1;var s=this,a=this.notify;this.notify=function(){return a.apply(s,arguments)}}var o=e.prototype;return o.addMetadata=function(e,t,r){return M(this._metadata,e,t,r)},o.getMetadata=function(e,t){return N(this._metadata,e,t)},o.clearMetadata=function(e,t){return P(this._metadata,e,t)},o.addFeatureFlag=function(e,t){void 0===t&&(t=null),O(this._features,this._featuresIndex,e,t)},o.addFeatureFlags=function(e){T(this._features,e,this._featuresIndex)},o.clearFeatureFlag=function(e){I(this._features,this._featuresIndex,e)},o.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},o.getContext=function(){return this._context},o.setContext=function(e){this._context=e},o.getGroupingDiscriminator=function(){return this._groupingDiscriminator},o.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return("string"==typeof e||null==e)&&(this._groupingDiscriminator=e),t},o._configure=function(e,t){var n=r(t,function(e,t){return t&&t.configSchema?p({},e,t.configSchema):e},this._schema);e.endpoints||(e.sendPayloadChecksums=!("sendPayloadChecksums"in e)||e.sendPayloadChecksums);var i=r(l(n),function(t,r){var i=n[r].defaultValue(e[r]);return void 0!==e[r]?n[r].validate(e[r])?n[r].allowPartialObject?t.config[r]=p(i,e[r]):t.config[r]=e[r]:(t.errors[r]=n[r].message,t.config[r]=i):t.config[r]=i,t},{errors:{},config:{}}),o=i.errors,s=i.config;if(n.apiKey){if(!s.apiKey)throw Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(s.apiKey)||(o.apiKey="should be a string of 32 hexadecimal characters"),void 0===e.endpoints&&s.apiKey.startsWith("00000")&&(s.endpoints={notify:"https://notify.insighthub.smartbear.com",sessions:"https://sessions.insighthub.smartbear.com"})}return this._metadata=p({},s.metadata),T(this._features,s.featureFlags,this._featuresIndex),this._user=p({},s.user),this._context=s.context,s.logger&&(this._logger=s.logger),s.onError&&(this._cbs.e=this._cbs.e.concat(s.onError)),s.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(s.onBreadcrumb)),s.onSession&&(this._cbs.s=this._cbs.s.concat(s.onSession)),l(o).length&&this._logger.warn(es(o,e)),s},o.getUser=function(){return this._user},o.setUser=function(e,t,r){this._user={id:e,email:t,name:r}},o._loadPlugin=function(e){var t=e.load(this);e.name&&(this._plugins["~"+e.name+"~"]=t)},o.getPlugin=function(e){return this._plugins["~"+e+"~"]},o._setDelivery=function(e){this._delivery=e(this)},o.startSession=function(){var e=new en;return(e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=p({},this._user),K(this._cbs.s,e,"onSession",this._logger))?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},o.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},o.removeOnError=function(e){this._cbs.e=n(this._cbs.e,function(t){return t!==e})},o._addOnSessionPayload=function(e){this._cbs.sp.push(e)},o.addOnSession=function(e){this._cbs.s.push(e)},o.removeOnSession=function(e){this._cbs.s=n(this._cbs.s,function(t){return t!==e})},o.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},o.removeOnBreadcrumb=function(e){this._cbs.b=n(this._cbs.b,function(t){return t!==e})},o.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},o.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},o.leaveBreadcrumb=function(e,r,n){if(e="string"==typeof e?e:"",n="string"==typeof n&&i(t,n)?n:"manual",r="object"==typeof r&&null!==r?r:{},e){var o=new w(e,r,n);if(K(this._cbs.b,o,"onBreadcrumb",this._logger))return void this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");this._breadcrumbs.push(o),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},o._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||i(t,e)},o.notify=function(e,t,r){void 0===r&&(r=ei);var n=L.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(n,t,r)},o._notify=function(t,r,n){var o=this;if(void 0===n&&(n=ei),t.app=p({},t.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),t.context=t.context||this._context,t._metadata=p({},t._metadata,this._metadata),t._user=p({},t._user,this._user),t.breadcrumbs=this._breadcrumbs.slice(),t.setGroupingDiscriminator(this._groupingDiscriminator),T(t._features,this._features,t._featuresIndex),null!==this._config.enabledReleaseStages&&!i(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),n(null,t);var s=t.severity,a=function(e){o._logger.error("Error occurred in onError callback, continuing anyway…"),o._logger.error(e)};W([].concat(this._cbs.e).concat(r),t,a,function(r,i){if(r&&a(r),!i)return o._logger.debug("Event not sent due to onError callback"),n(null,t);o._isBreadcrumbTypeEnabled("error")&&e.prototype.leaveBreadcrumb.call(o,t.errors[0].errorClass,{errorClass:t.errors[0].errorClass,errorMessage:t.errors[0].errorMessage,severity:t.severity},"error"),s!==t.severity&&(t._handledState.severityReason={type:"userCallbackSetSeverity"}),t.unhandled!==t._handledState.unhandled&&(t._handledState.severityReason.unhandledOverrid
156den=!0,t._handledState.unhandled=t.unhandled),o._session&&(o._session._track(t),t._session=o._session),o._delivery.sendEvent({apiKey:t.apiKey||o._config.apiKey,notifier:o._notifier,events:[t]},function(e){return n(e,t)})})},e}(),es=function(e,t){return Error(`Invalid configuration
157`+g(l(e),function(r){return"  - "+r+" "+e[r]+", got "+ea(t[r])}).join(`
158
159`))},ea=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},el={},eu=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];el.event=function(e,t){var r=C(e,null,null,{redactedPaths:eu,redactedKeys:t});return r.length>1e6&&(e.events[0]._metadata={notifier:`WARNING!
160Serialized payload was `+r.length/1e6+`MB (limit = 1MB)
161metadata was removed`},r=C(e,null,null,{redactedPaths:eu,redactedKeys:t})),r},el.session=function(e,t){return C(e,null,null)};var ec={},ed=function(e,t,r,n){var i=JSON.parse(JSON.stringify(new Date));return eh(e.endpoints[t],n.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+r+"&sentAt="+encodeURIComponent(i)},eh=(ec=function(e,t){return void 0===t&&(t=window),{sendEvent:function(r,n){if(void 0===n&&(n=function(){}),null===e._config.endpoints.notify){var i=Error("Event not sent due to incomplete endpoint configuration");return n(i)}var o=ed(e._config,"notify","4",t),s=el.event(r,e._config.redactedKeys),a=new t.XDomainRequest;a.onload=function(){n(null)},a.onerror=function(){var t=Error("Event failed to send");e._logger.error("Event failed to send…",t),s.length>1e6&&e._logger.warn("Event oversized ("+(s.length/1e6).toFixed(2)+" MB)"),n(t)},a.open("POST",o),setTimeout(function(){try{a.send(s)}catch(t){e._logger.error(t),n(t)}},0)},sendSession:function(r,n){if(void 0===n&&(n=function(){}),null===e._config.endpoints.sessions){var i=Error("Session not sent due to incomplete endpoint configuration");return n(i)}var o=ed(e._config,"sessions","1",t),s=new t.XDomainRequest;s.onload=function(){n(null)},s.open("POST",o),setTimeout(function(){try{s.send(el.session(r,e._config.redactedKeys))}catch(t){e._logger.error(t),n(t)}},0)}}})._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e};function ef(e,t){if(e.isSecureContext&&e.crypto&&e.crypto.subtle&&e.crypto.subtle.digest&&"function"==typeof TextEncoder){var r=new TextEncoder().encode(t);return e.crypto.subtle.digest("SHA-1",r).then(function(e){return"sha1 "+Array.from(new Uint8Array(e)).map(function(e){return e.toString(16).padStart(2,"0")}).join("")})}return Promise.resolve()}var ep=function(e,t){return void 0===t&&(t=window),{sendEvent:function(r,n){void 0===n&&(n=function(){});try{var i=e._config.endpoints.notify;if(null===i){var o=Error("Event not sent due to incomplete endpoint configuration");return n(o)}var s=new t.XMLHttpRequest,a=el.event(r,e._config.redactedKeys);s.onreadystatechange=function(){if(s.readyState===t.XMLHttpRequest.DONE){var r=s.status;if(0===r||r>=400){var i=Error("Request failed with status "+r);e._logger.error("Event failed to send…",i),a.length>1e6&&e._logger.warn("Event oversized ("+(a.length/1e6).toFixed(2)+" MB)"),n(i)}else n(null)}},s.open("POST",i),s.setRequestHeader("Content-Type","application/json"),s.setRequestHeader("Bugsnag-Api-Key",r.apiKey||e._config.apiKey),s.setRequestHeader("Bugsnag-Payload-Version","4"),s.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),e._config.sendPayloadChecksums&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?ef(t,a).then(function(e){e&&s.setRequestHeader("Bugsnag-Integrity",e),s.send(a)}).catch(function(t){e._logger.error(t),s.send(a)}):s.send(a)}catch(t){e._logger.error(t)}},sendSession:function(r,n){void 0===n&&(n=function(){});try{var i=e._config.endpoints.sessions;if(null===i){var o=Error("Session not sent due to incomplete endpoint configuration");return n(o)}var s=new t.XMLHttpRequest,a=el.session(r,e._config.redactedKeys);s.onreadystatechange=function(){if(s.readyState===t.XMLHttpRequest.DONE){var r=s.status;if(0===r||r>=400){var i=Error("Request failed with status "+r);e._logger.error("Session failed to send…",i),n(i)}else n(null)}},s.open("POST",i),s.setRequestHeader("Content-Type","application/json"),s.setRequestHeader("Bugsnag-Api-Key",e._config.apiKey),s.setRequestHeader("Bugsnag-Payload-Version","1"),s.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),e._config.sendPayloadChecksums&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?ef(t,a).then(function(e){e&&s.setRequestHeader("Bugsnag-Integrity",e),s.send(a)}).catch(function(t){e._logger.error(t),s.send(a)}):s.send(a)}catch(t){e._logger.error(t)}}}},eg=new Date,em=function(){eg=new Date},ev={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-eg},!0),{reset:em}}},ey="bugsnag-anonymous-id",eb=function(e){try{var t=e.localStorage,r=t.getItem(ey);if(r&&/^c[a-z0-9]{20,32}$/.test(r))return r;return r=er(),t.setItem(ey,r),r}catch(e){}},ew=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},eS={load:function(e){e._sessionDelegate=ek}},ek={startSession:function(e,t){return(e._session=t,e._pausedSession=null,null===e._config.enabledReleaseStages||i(e._config.enabledReleaseStages,e._config.releaseStage))?e._delivery.sendSession({notifier:e._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}):e._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),e},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},ex={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&void 0===e._user.id&&delete e._user.id,e._user=p({id:"[REDACTED]"},e._user),e.request=p({clientIp:"[REDACTED]"},e.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}},eE={};
161eE.load=function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&g(eC,function(t){var n=console[t];console[t]=function(){for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];e.leaveBreadcrumb("Console output",r(o,function(e,t,r){var n="[Unknown value]";try{n=String(t)}catch(e){}if("[object Object]"===n)try{n=JSON.stringify(t)}catch(e){}return e["["+r+"]"]=n,e},{severity:0===t.indexOf("group")?"log":t}),"log"),n.apply(console,o)},console[t]._restore=function(){console[t]=n}})};var eC=n(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]});function e_(e,t,r){var n=e[t];if(!n)return n;var i=r(n);return e[t]=i,n}function eO(e){var t=!!e[1]&&"function"==typeof e[1].handleEvent;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(r){t?e[1].handleEvent=r:e[1]=r}}}var eI=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/,eT={};eT=function(e){return void 0===e&&(e=window),{load:function(t){if("addEventListener"in e&&t._isBreadcrumbTypeEnabled("navigation")){var r=function(e){return function(){return t.leaveBreadcrumb(e,{},"navigation")}};e.addEventListener("pagehide",r("Page hidden"),!0),e.addEventListener("pageshow",r("Page shown"),!0),e.addEventListener("load",r("Page loaded"),!0),e.document.addEventListener("DOMContentLoaded",r("DOMContentLoaded"),!0),e.addEventListener("load",function(){return e.addEventListener("popstate",r("Navigated back"),!0)}),e.addEventListener("hashchange",function(r){var n=r.oldURL?{from:eR(r.oldURL,e),to:eR(r.newURL,e),state:eM(e)}:{to:eR(e.location.href,e)};t.leaveBreadcrumb("Hash changed",n,"navigation")},!0),e.history.pushState&&eP(t,e.history,"pushState",e,!0),e.history.replaceState&&eP(t,e.history,"replaceState",e)}}}};var eR=function(e,t){var r=t.document.createElement("A");return r.href=e,""+r.pathname+r.search+r.hash},eA=function(e,t,r,n){var i=eR(e.location.href,e);return{title:r,state:t,prevState:eM(e),to:n||i,from:i}},eP=function(e,t,r,n,i){void 0===i&&(i=!1);var o=t[r];t[r]=function(s,a,l){e.leaveBreadcrumb("History "+r,eA(n,s,a,l),"navigation"),i&&"function"==typeof e.resetEventCount&&e.resetEventCount(),o.apply(t,[s,a].concat(void 0!==l?l:[]))}},eM=function(e){try{return e.history.state}catch(e){}},eN="request",eD=function(e){return e&&new Date-e},eL={load:function(e){var t=0;e.addOnError(function(r){if(t>=e._config.maxEvents)return e._logger.warn("Cancelling event send due to maxEvents per session limit of "+e._config.maxEvents+" being reached"),!1;t++}),e.resetEventCount=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return u(1,100)(e)}}}},eU={},ej=(eU={load:function(e){e.addOnError(function(e){g(r(e.errors,function(e,t){return e.concat(t.stacktrace)},[]),function(e){e.file=ej(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},eF=function(e,t,r,n){e[0]||e.push({});var i=e[0];i.file||"string"!=typeof t||(i.file=t),!i.lineNumber&&eB(r)&&(i.lineNumber=r),!i.columnNumber&&(eB(n)?i.columnNumber=n:window.event&&eB(window.event.errorCharacter)&&(i.columnNumber=window.event.errorCharacter))},eB=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},eH={},ez=p({},h.schema,y),eq={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t,o,s,a,l,u,c,d,h,f,m,v,y=new eo(e,ez,[ev,(void 0===t&&(t=navigator),void 0===o&&(o=window),{load:function(e){var r={locale:t.browserLanguage||t.systemLanguage||t.userLanguage||t.language,userAgent:t.userAgent};o&&o.screen&&o.screen.orientation&&o.screen.orientation.type?r.orientation=o.screen.orientation.type:o&&o.document&&(r.orientation=o.document.documentElement.clientWidth>o.document.documentElement.clientHeight?"landscape":"portrait"),e._config.generateAnonymousId&&(r.id=eb(o)),e.addOnSession(function(t){t.device=p({},t.device,r),e._config.collectUserIp||ew(t)}),e.addOnError(function(t){t.device=p({},t.device,r,{time:new Date}),e._config.collectUserIp||ew(t)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}),(void 0===s&&(s=window),{load:function(e){e.addOnError(function(e){void 0===e.context&&(e.context=s.location.pathname)},!0)}}),(void 0===a&&(a=window),{load:function(e){e.addOnError(function(e){e.request&&e.request.url||(e.request=p({},e.request,{url:a.location.href}))},!0)}}),eL,eS,ex,eU,(void 0===l&&(l=window),void 0===u&&(u="window onerror"),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledExceptions){var t=l.onerror;
161l.onerror=function(r,n,i,o,s){if(0===i&&/Script error\.?/.test(r))e._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var a,l={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(s)eF((a=e.Event.create(s,!0,l,u,1)).errors[0].stacktrace,n,i,o);else if("object"!=typeof r||null===r||n&&"string"==typeof n||i||o||s)eF((a=e.Event.create(r,!0,l,u,1)).errors[0].stacktrace,n,i,o);else{var c=r.type?"Event: "+r.type:"Error",d=r.message||r.detail||"";(a=e.Event.create({name:c,message:d},!0,l,u,1)).originalError=r,a.addMetadata(u,{event:r,extraParameters:n})}e._notify(a)}try{t.apply(this,arguments)}catch(e){}}}}}),(void 0===c&&(c=window),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledRejections){var t=function(t){var r,n=t.reason,i=!1;try{t.detail&&t.detail.reason&&(n=t.detail.reason,i=!0)}catch(e){}var o=!e._config.reportUnhandledPromiseRejectionsAsHandled,s=e.Event.create(n,!1,{severity:"error",unhandled:o,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,e._logger);i&&g(s.errors[0].stacktrace,(r=n,function(e){e.file!==r.toString()&&e.method&&(e.method=e.method.replace(/^\s+/,""))})),e._notify(s,function(e){if(A(e.originalError)&&!e.originalError.stack){var t;e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))}})};"addEventListener"in c?c.addEventListener("unhandledrejection",t):c.onunhandledrejection=function(e,r){t({detail
161:{reason:e,promise:r}})}}}}),eT(),(void 0===d&&(d=window),{load:function(e){"addEventListener"in d&&e._isBreadcrumbTypeEnabled("user")&&d.addEventListener("click",function(t){var r,n,i,o;try{(o=(i=t.target).textContent||i.innerText||"")||"submit"!==i.type&&"button"!==i.type||(o=i.value),r=(o=o.replace(eI,"$1")).length>140?o.slice(0,135)+"(...)":o,n=function e(t,r){var n=[t.tagName];if(t.id&&n.push("#"+t.id),t.className&&t.className.length&&n.push("."+t.className.split(" ").join(".")),!r.document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===r.document.querySelectorAll(n.join("")).length)return n.join("")}catch(e){return n.join("")}if(t.parentNode.childNodes.length>1){var i=Array.prototype.indexOf.call(t.parentNode.childNodes,t)+1;n.push(":nth-child("+i+")")}return 1===r.document.querySelectorAll(n.join("")).length?n.join(""):t.parentNode?e(t.parentNode,r)+" > "+n.join(""):n.join("")}(t.target,d)}catch(t){r="[hidden]",n="[hidden]",e._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}e.leaveBreadcrumb("UI click",{targetText:r,targetSelector:n},"user")},!0)}}),(void 0===h&&(h=[]),void 0===f&&(f=window),{load:function(e){if(e._isBreadcrumbTypeEnabled("request")){var t=[e._config.endpoints.notify,e._config.endpoints.sessions].concat(h);(function(){if("addEventListener"in f.XMLHttpRequest.prototype&&"WeakMap"in f){var r=new WeakMap,n=new WeakMap,o=f.XMLHttpRequest.prototype.open;f.XMLHttpRequest.prototype.open=function(e,t){this&&r.set(this,{method:e,url:t}),o.apply(this,arguments)};var s=f.XMLHttpRequest.prototype.send;f.XMLHttpRequest.prototype.send=function(o){var a=this,l=r.get(this);if(l){var u=n.get(this);u&&(this.removeEventListener("load",u.load),this.removeEventListener("error",u.error));var c=new Date,d=function(){return function(r,n,o){if(void 0===n)return void e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");"string"==typeof n&&i(t,n.replace(/\?.*$/,""))||e.leaveBreadcrumb("XMLHttpRequest error",{method:String(r),url:String(n),duration:o},eN)}(l.method,l.url,eD(c))},h=function(){return function(r,n,o,s){if(void 0===n)return void e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");if(!("string"==typeof n&&i(t,n.replace(/\?.*$/,"")))){var a={status:o,method:String(r),url:String(n),duration:s};o>=400?e.leaveBreadcrumb("XMLHttpRequest failed",a,eN):e.leaveBreadcrumb("XMLHttpRequest succeeded",a,eN)}}(l.method,l.url,a.status,eD(c))};this.addEventListener("load",h),this.addEventListener("error",d),this&&n.set(this,{load:h,error:d})}s.apply(this,arguments)}}})(),function(){if("fetch"in f&&!f.fetch.polyfill){var e=f.fetch;f.fetch=function(){var t,i=arguments,o=arguments[0],s=arguments[1],a=null;return o&&"object"==typeof o?(a=o.url,s&&"method"in s?t=s.method:o&&"method"in o&&(t=o.method)):(a=o,s&&"method"in s&&(t=s.method)),void 0===t&&(t="GET"),new Promise(function(o,s){var l=new Date;e.apply(void 0,i).then(function(e){r(e,t,a,eD(l)),o(e)}).catch(function(e){n(t,a,eD(l)),s(e)})})}}}();var r=function(t,r,n,i){var o={method:String(r),status:t.status,url:String(n),duration:i};t.status>=400?e.leaveBreadcrumb("fetch() failed",o,eN):e.leaveBreadcrumb("fetch() succeeded",o,eN)},n=function(t,r,n){e.leaveBreadcrumb("fetch() error",{method:String(t),url:String(r),duration:n},eN)}}}}),eE,(void 0===m&&(m=document),void 0===v&&(v=window),{load:function(e){if(e._config.trackInlineScripts){var t=v.location.href,i="",o=m.attachEvent?"complete"===m.readyState:"loading"!==m.readyState,s=function(){return m.documentElement.outerHTML};i=s();var a=m.onreadystatechange;m.onreadystatechange=function(){"interactive"===m.readyState&&(i=s(),o=!0);try{a.apply(this,arguments)}catch(e){}};var l=null,u=function(e){l=e},c=function(){var e=m.currentScript||l;if(!e&&!o){var t=m.scripts||m.getElementsByTagName("script");e=t[t.length-1]}return e},d=function(e){o&&i||(i=s());var t=["\x3c!-- DOC START --\x3e"].concat(i.split(`
162`)),n=e-1,a=Math.max(n-3,0),l=Math.min(n+3,t.length);return r(t.slice(a,l),function(e,t,r){return e[a+1+r]=t.length<=200?t:t.substr(0,200),e},{})};e.addOnError(function(e){e.errors[0].stacktrace=n(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var r=e.errors[0].stacktrace[0],i=function(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!r||!r.file||i(r.file)===i(t)){var o=c();if(o){var s=o.innerHTML;e.addMetadata("script","content",s.length<=5e5?s:s.substr(0,5e5)),r&&r.lineNumber&&(r.code=d(r.lineNumber))}}},!0);var h=g(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return e_(v,e,function(e){return f(e,function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}})})})[0];g(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],function(e){v[e]&&v[e].prototype&&Object.prototype.hasOwnProperty.call(v[e].prototype,"addEventListener")&&(e_(v[e].prototype,"addEventListener",function(e){return f(e,eO)}),e_(v[e].prototype,"removeEventListener",function(e){return f(e,eO,!0)}))})}function f(e,t,r){return void 0===r&&(r=!1),function(){var n=[].slice.call(arguments);try{var i=t(n),o=i.get();if(r&&e.apply(this,n),"function"!=typeof o)return e.apply(this,n);if(o.__trace__)i.replace(o.__trace__);else{var s=c();o.__trace__=function(){u(s),h(function(){u(null)},0);var e=o.apply(this,arguments);return u(null),e},o.__trace__.__trace__=o.__trace__,i.replace(o.__trace__)}}catch(e){}if(e.apply)return e.apply(this,n);switch(n.length){case 1:return e(n[0]);case 2:return e(n[0],n[1]);default:return e()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}})],{name:"Bugsnag JavaScript",version:"8.6.0",url:"https://github.com/bugsnag/bugsnag-js"});return y._setDelivery(window.XDomainRequest?ec:ep),y._logger.debug("Loaded!"),y.leaveBreadcrumb("Bugsnag loaded",{},"state"),y._config.autoTrackSessions?y.startSession():y},start:function(e){return eq._client?eq._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."):eq._client=eq.createClient(e),eq._client},isStarted:function(){return null!=eq._client}};return g(["resetEventCount"].concat(l(eo.prototype)),function(e){/^_/.test(e)||(eq[e]=function(){if(!eq._client)return console.log("Bugsnag."+e+"() was called before Bugsnag.start()");eq._client._depth+=1;var t=eq._client[e].apply(eq._client,arguments);return eq._client._depth-=1,t})}),(eH=eq).Client=eo,eH.Event=L,eH.Session=en,eH.Breadcrumb=w,eH.default=eq,eH}()},58780(e){e.exports=function(e,t){return function(r){return e(t(r))}}},60457(e,t,r){"use strict";r.r(t),r.d(t,{compressionScript:()=>n,trackDestinationScript:()=>i});var n=`var WebWorker=function(e){"use strict";onmessage=function(e){var s="string"==typeof e.data?JSON.parse(e.data):e.data,t=s.event,a=s.sessionId,n=t.type,r=t.timestamp,i=t.delay,o=t.data,d=null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o});postMessage({compressedEvent:d,sessionId:a})};var s=onmessage;
162return e.compressionOnMessage=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
163`,i=`var WebWorker=function(e){"use strict";var t,n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))(function(s,o){function a(e){try{i(r.next(e))}catch(e){o(e)}}function c(e){try{i(r.throw(e))}catch(e){o(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,c)}i((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(i){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&c[0]?r.return:c[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;switch(r=0,s&&(c=[2&c[0],s.value]),c[0]){case 0:case 1:s=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!s||c[1]>s[0]&&c[1]<s[3])){o.label=c[1];break}if(6===c[0]&&o.label<s[1]){o.label=s[1],s=c;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(c);break}s[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=s=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(t||(t={})),t.US;var o;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision"}(o||(o={}));function a(e,t){return r(this,void 0,void 0,function(){var n,o,a,c,i,u,l,d,f,p,h,v,y,b,g=this;return s(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),n=t.CompressionStream,o=new n("gzip"),a=o.writable.getWriter(),c=o.readable.getReader(),i=[],u=r(g,void 0,void 0,function(){var e,t,n;return s(this,function(r){switch(r.label){case 0:return[4,c.read()];case 1:if(e=r.sent(),t=e.done,n=e.value,t)return[3,3];i.push(n),r.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,a.write((new TextEncoder).encode(e))];case 1:return m.sent(),[4,a.close()];case 2:return m.sent(),[4,u];case 3:m.sent(),l=i.reduce(function(e,t){return e+t.length},0),d=new Uint8Array(l),f=0;try{for(p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),h=p.next();!h.done;h=p.next())v=h.value,d.set(v,f),f+=v.length}catch(e){y={error:e}}finally{try{h&&!h.done&&(b=p.return)&&b.call(p)}finally{if(y)throw y.error}}return[2,d];case 4:return m.sent(),[2,null];case 5:return[2]}})})}function c(e,t){return r(this,void 0,void 0,function(){var r,o,c,i,u,l,d,f,p,h,v,y,b;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),"CompressionStream"in self?[4,a(e,self)]:[3,2];case 1:return o=s.sent(),[3,3];case 2:o=null,s.label=3;case 3:return r=o,c="".concat(null!==(v=null===(h=t.version)||void 0===h?void 0:h.type)&&void 0!==v?v:"standalone","/").concat(null!==(b=null===(y=t.version)||void 0===y?void 0:y.version)&&void 0!==b?b:t.sdkVersion),i=new URLSearchParams({device_id:t.deviceId,session_id:"".concat(t.sessionId),type:t.eventType}),u="".concat((g=t.serverZone,m=t.trackServerUrl,m||("STAGING"===g?"https://api-sr.stag2.amplitude.com/sessions/v2/track":"EU"===g?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")),"?").concat(i.toString()),l=n({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t.apiKey),"X-Client-Version":t.sdkVersion,"X-Client-Library":c,"X-Client-Url":t.currentUrl.substring(0,1e3),"X-Client-Sample-Rate":"".concat(t.sampleRate),"X-Sampling-Hash-Alg":"xxhash32"},r?{"Content-Encoding":"gzip"}:{}),[4,fetch(u,{method:"POST",headers:l,body:null!=r?r:e})];case 4:return null===(d=s.sent())?[2,{shouldRetry:!1,success:!1,message:"Unexpected error occurred"}]:d.status>=200&&d.status<300?(f=Math.round(new Blob(t.events).size/1024),[2,{shouldRetry:!1,success:!0,message:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(f," KB")}]):d.status>=500||408===d.status||429===d.status||499===d.status?[2,{shouldRetry:!0,success:!1,message:"HTTP ".concat(d.status)}]:[2,{shouldRetry:!1,success:!1,message:"Network error occurred, event batch rejected"}];case 5:return p=s.sent(),[2,{shouldRetry:!1,success:!1,message:String(p)}];case 6:return[2]}var g,m})})}function i(e,t,n,o){return r(this,void 0,void 0,function(){var r,a,i;return s(this,function(s){switch(s.label){case 0:r=1,s.label=1;case 1:return[4,c(t,n)];case 2:return(a=s.sent()).success?(postMessage({type:"log",id:e,message:a.message}),postMessage({type:"complete",id:e}),[2]):o&&a.shouldRetry&&r<n.flushMaxRetries?[4,new Promise(function(e){return setTimeout(e,Math.random()*r*1e3)})]:[3,4];case 3:return s.sent(),r++,[3,5];case 4:return i=r>=n.flushMaxRetries?"Session replay event batch rejected due to exceeded retry count":a.message,postMessage({type:"warn",id:e,message:i}),postMessage({type:"complete",id:e}),[2];case 5:return[3,1];case 6:return[2]}})})}onmessage=function(e){return r(void 0,void 0,void 0,function(){var t,n,r,o,a,c,u;return s(this,function(s){switch(s.label){case 0:return t=e.data,n=t.type,r=t.id,o=t.payload,a=t.context,c=t.useRetry,"send"!==n?[3,2]:(u=JSON.stringify(o),[4,i(r,u,a,c)]);case 1:s.sent(),s.label=2;case 2:return[2]}})})};var u=onmessage;return e.trackDestinationOnMessage=u,Object.defineProperty(e,"__esMo
163dule",{value:!0}),e}({});
164`},60961(e){e.exports=function(e){return null!=e&&"object"==typeof e}},61143(e,t,r){var n=r(35256),i=r(21610);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},63731(e,t,r){"use strict";let n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w;r.d(t,{L:()=>iQ});let S={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},k=console,x={};Object.keys(S).forEach(e=>{x[e]=k[e]});let E="Datadog Browser SDK:",C={debug:x.debug.bind(k,E),log:x.log.bind(k,E),info:x.info.bind(k,E),warn:x.warn.bind(k,E),error:x.error.bind(k,E)},_="https://docs.datadoghq.com",O=`${_}/real_user_monitoring/browser/troubleshooting`,I="More details:";function T(e,t){return(...r)=>{try{return e(...r)}catch(e){C.error(t,e)}}}let R=!1;function A(e){R=e}function P(e){return function(...t){return M(e,this,t)}}function M(e,t,r){try{return e.apply(t,r)}catch(e){N(e)}}function N(e){if(D(e),n)try{n(e)}catch(e){D(e)}}function D(...e){R&&C.error("[MONITOR]",...e)}function L(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}let U=L(),j="WorkerGlobalScope"in U;function F(e){var t;let r=null==(t=U.queueMicrotask)?void 0:t.bind(U);"function"==typeof r?r(P(e)):Promise.resolve().then(P(e))}class B{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function H(...e){return new B(t=>{let r=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>r.forEach(e=>e.unsubscribe())})}class z extends B{constructor(e){super(),this.maxBufferSize=e,this.buffer=[]}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(e)}subscribe(e){let t=!1;return F(()=>{for(let r of this.buffer){if(t)return;e(r)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){F(()=>{this.maxBufferSize=this.buffer.length=0})}}let q={GRANTED:"granted",NOT_GRANTED:"not-granted"};function V(e,t){let r,n=L();return n.Zone&&"function"==typeof n.Zone.__symbol__&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}function $(e,t){return V(L(),"setTimeout")(P(e),t)}function W(e){V(L(),"clearTimeout")(e)}function K(e,t){return V(L(),"setInterval")(P(e),t)}function J(e){V(L(),"clearInterval")(e)}function Y(e,t,r){let n,i,o=!r||void 0===r.leading||r.leading,s=!r||void 0===r.trailing||r.trailing,a=!1;return{throttled:(...r)=>{if(a){n=r;return}o?e(...r):n=r,a=!0,i=$(()=>{s&&n&&e(...n),a=!1,n=void 0},t)},cancel:()=>{W(i),a=!1,n=void 0}}}function G(){}function X(e){var t,r;let n=[],o=es(e,"stack"),s=String(e);if(o&&o.startsWith(s)&&(o=o.slice(s.length)),o&&o.split(`
165`).forEach(e=>{let t=function(e){let t=ee.exec(e);if(!t)return;let r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),i=et.exec(t[2]);return n&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}(e)||function(e){let t=er.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:"?",line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){let t=en.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:+t[3],url:t[2]}}(e)||function(e){let t=ei.exec(e);if(!t)return;let r=t[3]&&t[3].indexOf(" > eval")>-1,n=eo.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||"?",line:t[4]?+t[4]:void 0,url:t[3]}}(e);t&&(!t.func&&t.line&&(t.func="?"),n.push(t))}),n.length>0&&function(){if(void 0!==i)return i;let[e,t]=[class extends Error{constructor(){super(),this.name="Error"}},Error].map(e=>new e);return i=el(Object.getPrototypeOf(e))&&t.stack!==e.stack}()&&e instanceof Error){let i=[],o=e;for(;
165(o=Object.getPrototypeOf(o))&&el(o);){let e=(null==(t=o.constructor)?void 0:t.name)||"?";i.push(e)}for(let e=i.length-1;e>=0&&(null==(r=n[0])?void 0:r.func)===i[e];e--)n.shift()}return{message:es(e,"message"),name:es(e,"name"),stack:n}}let Q="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Z="(?::(\\d+))",ee=RegExp(`^\\s*at (.*?) ?\\(${Q}${Z}?${Z}?\\)?\\s*$`,"i"),et=RegExp(`\\((\\S*)${Z}${Z}\\)`),er=RegExp(`^\\s*at ?${Q}${Z}?${Z}??\\s*$`,"i"),en=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ei=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,eo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function es(e,t){if("object"!=typeof e||!e||!(t in e))return;let r=e[t];return"string"==typeof r?r:void 0}let ea=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function el(e){return String(e.constructor).startsWith("class ")}function eu(e){let t,r=Error(e);return r.name="HandlingStack",M(()=>{let e=X(r);e.stack=e.stack.slice(2),t=ec(e)}),t}function ec(e){let t=ed(e);return e.stack.forEach(e=>{let r="?"===e.func?"<anonymous>":e.func,n=e.args&&e.args.length>0?`(${e.args.join(", ")})`:"",i=e.line?`:${e.line}`:"",o=e.line&&e.column?`:${e.column}`:"";t+=`
166  at ${r}${n} @ ${e.url}${i}${o}`}),t}function ed(e){return`${e.name||"Error"}: ${e.message}`}function eh(e,t,r,{computeHandlingStack:n}={}){let i=e[t];if("function"!=typeof i)if(!(t in e&&"string"==typeof t&&t.startsWith("on")))return{stop:G};else i=G;let o=!1,s=function(){let e;if(o)return i.apply(this,arguments);let t=Array.from(arguments);M(r,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:n?eu("instrumented method"):void 0}]);let s=i.apply(this,t);return e&&M(e,null,[s]),s};return e[t]=s,{stop:()=>{o=!0,e[t]===s&&(e[t]=i)}}}function ef(e){return 0!==e&&100*Math.random()<=e}function ep(e,t){return+e.toFixed(t)}function eg(e){return"number"==typeof e}let em=31536e6;function ev(e){return{relative:e,timeStamp:function(e){var t;let r=eb()-performance.now();return r>eE()?Math.round(function(e,t){return e+t}(r,e)):(t=e,Math.round(eE()+t))}(e)}}function ey(e){return eg(e)?ep(1e6*e,0):e}function eb(){return new Date().getTime()}function ew(){return eb()}function eS(){return performance.now()}function ek(){return{relative:eS(),timeStamp:ew()}}function ex(){return{relative:0,timeStamp:eE()}}function eE(){var e,t;return void 0===o&&(o=null!=(t=null==(e=performance.timing)?void 0:e.navigationStart)?t:performance.timeOrigin),o}let eC=/[^\u0000-\u007F]/;function e_(e){return eC.test(e)?void 0!==window.TextEncoder?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function eO(e,t,r){if("object"!=typeof e||null===e)return JSON.stringify(e);let n=eI(Object.prototype),i=eI(Array.prototype),o=eI(Object.getPrototypeOf(e)),s=eI(e);try{return JSON.stringify(e,t,r)}catch(e){return"<error: unable to serialize object>"}finally{n(),i(),o(),s()}}function eI(e){let t=e.toJSON;return t?(delete e.toJSON,()=>{e.toJSON=t}):G}function eT(e,t=225280){let r=eI(Object.prototype),n=eI(Array.prototype),i=[],o=new WeakMap,s=eR(e,"$",void 0,i,o),a=JSON.stringify(s),l=a?a.length:0;if(l>t)return void eA(t,"discarded",e);for(;i.length>0&&l<t;){let r=i.shift(),n=0;if(Array.isArray(r.source))for(let s=0;s<r.source.length;s++){let a=eR(r.source[s],r.path,s,i,o);if(void 0!==a?l+=JSON.stringify(a).length:l+=4,l+=n,n=1,l>t){eA(t,"truncated",e);break}r.target[s]=a}else for(let s in r.source)if(Object.prototype.hasOwnProperty.call(r.source,s)){let a=eR(r.source[s],r.path,s,i,o);if(void 0!==a&&(l+=JSON.stringify(a).length+n+s.length+3,n=1),l>t){eA(t,"truncated",e);break}r.target[s]=a}}return r(),n(),s}function eR(e,t,r,n,i){let o=function(e){if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(e){}return e}(e);if(!o||"object"!=typeof o){var s;return"bigint"==typeof(s=o)?`[BigInt] ${s.toString()}`:"function"==typeof s?`[Function] ${s.name||"unknown"}`:"symbol"==typeof s?`[Symbol] ${s.description||s.toString()}`:s}let a=function e(t){try{if(t instanceof Event){var r;return{type:(r=t).type,isTrusted:r.isTrusted,currentTarget:r.currentTarget?e(r.currentTarget):null,target:r.target?e(r.target):null}}if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;let n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(e){}return"[Unserializable]"}(o);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;
166if(i.has(e))return`[Reference seen at ${i.get(e)}]`;let l=void 0!==r?`${t}.${r}`:t,u=Array.isArray(o)?[]:{};return i.set(e,l),n.push({source:o,target:u,path:l}),u}function eA(e,t,r){C.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}let eP="No stack, consider using an instance of Error";function eM({originalError:e,stackTrace:t,source:r,useFallbackStack:n=!0,nonErrorPrefix:i}){var o,s,a,l;let u=eD(e);return!t&&u&&(t=X(e)),{source:r,type:t?t.name:void 0,message:(o=t,s=u,a=i,l=e,(null==o?void 0:o.message)&&(null==o?void 0:o.name)?o.message:s?"Empty message":a?`${a} ${eO(eT(l))}`:eO(eT(l))),stack:t?ec(t):n?eP:void 0}}function eN({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:i,nonErrorPrefix:o,useFallbackStack:s=!0,source:a,handling:l}){var u;let c=eM({originalError:t,stackTrace:e,source:a,useFallbackStack:s,nonErrorPrefix:o});return{startClocks:i,handling:l,handlingStack:r,componentStack:n,originalError:t,...c,causes:eD(t)?function(e,t){let r=[],n=e.cause;for(;null!=n&&r.length<10;){let e=eM({originalError:n,source:t,useFallbackStack:!1});r.push(e),n=eD(n)?n.cause:void 0}return r.length?r:void 0}(t,a):void 0,fingerprint:eD(u=t)&&"dd_fingerprint"in u?String(u.dd_fingerprint):void 0,context:function(e){if(null!==e&&"object"==typeof e&&"dd_context"in e)return e.dd_context}(t)}}function eD(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}let eL="agent";function eU(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,n){let i=e_(r);t+=i,e+=r,n&&n(i)},finish(e){e(this.finishSync())},finishSync(){let r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount:e=>e.length}}function ej(e,t){return Object.keys(e).some(r=>e[r]===t)}function eF(e){return 0===Object.keys(e).length}function eB(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n]);return r}(i1=iZ||(iZ={})).TRACK_INTAKE_REQUESTS="track_intake_requests",i1.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",i1.FEATURE_OPERATION_VITAL="feature_operation_vital",i1.SHORT_SESSION_INVESTIGATION="short_session_investigation",i1.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive";let eH=new Set;function ez(e){return eH.has(e)}function eq(e){let{env:t,service:r,version:n,datacenter:i,sdkVersion:o,variant:s}=e,a=[eV("sdk_version",null!=o?o:"6.25.1")];return t&&a.push(eV("env",t)),r&&a.push(eV("service",r)),n&&a.push(eV("version",n)),i&&a.push(eV("datacenter",i)),s&&a.push(eV("variant",s)),a}function eV(e,t){var r;let n=t?`${e}:${t}`:e;return(n.length>200||(r=n,function(){try{return RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}()&&RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(r)))&&C.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${I} ${_}/getting_started/tagging/#defining-tags`),n.replace(/,/g,"_")}let e$="datad0g.com",eW="datadoghq.com",eK=["ddsource","dd-api-key","dd-request-id"];function eJ(e,t){let r=U.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function eY(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function eG(e,t,r=function(){if("undefined"!=typeof WeakSet){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let r=e.has(t);return r||e.add(t),r}}}let e=[];return{hasAlreadyBeenSeen(t){let r=e.indexOf(t)>=0;return r||e.push(t),r}}}()){if(void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,e)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let n=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)n[e]=eG(n[e],t[e],r);return n}let n="object"===eY(e)?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=eG(n[e],t[e],r));return n}function eX(e){return eG(void 0,e)}function eQ(...e){let t;for(let r of e)null!=r&&(t=eG(t,r));return t}function eZ(){var e;let t=U.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null==(e=t.connection)?void 0:e.effectiveType}}function e0(){let e=L().DatadogEventBridge;if(e)return{getCapabilities(){var t;return JSON.parse((null==(t=e.getCapabilities)?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return null==(t=e.getPrivacyLevel)?void 0:t.call(e)},getAllowedWebViewHosts:()=>JSON.parse(e.getAllowedWebViewHosts()),send(t,r,n){e.send(JSON.stringify({eventType:t,event:r,view:n?{id:n}:void 0}))}}}function e1(e){var t;void 0===e&&(e=null==(t=L().location)?void 0:t.hostname);let r=e0();return!!r&&r.getAllowedWebViewHosts().some(t=>e===t||e.endsWith(`.${t}`))}function e2(e,t){for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(t(n,r,e))return n}}function e3(e){return Object.values(e)}function e4(e){return Object.entries(e)}function e6(e,t,r,n,i){return e5(e,t,[r],n,i)}function e5(e,t,r,n,{once:i,capture:o,passive:s}={}){let a=P(t=>{(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(i&&d(),n(t))}),l=s?{capture:o,passive:s}:o,u=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,c=V(u,"addEventListener");function d(){let e=V(u,"removeEventListener");r.forEach(r=>e.call(t,r,a,l))}
166return r.forEach(e=>c.call(t,e,a,l)),{stop:d}}let e8={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function e9({encoder:e,request:t,flushController:r}){let n={},i=r.flushObservable.subscribe(r=>(function(r){var i;let o=e3(n).join(`
167`);n={};let s=(i=r.reason,e3(e8).includes(i)),a=s?t.sendOnExit:t.send;if(s&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&a(e7(t));let r=[t.pendingData,o].filter(Boolean).join(`
168`);r&&a({data:r,bytesCount:e_(r)})}else o&&e.write(e.isEmpty?o:`
169${o}`),e.finish(e=>{a(e7(e))})})(r));function o(t,i){let o=eO(t),s=e.estimateEncodedBytesCount(o);if(s>=262144)return void C.warn(`Discarded a message whose size was bigger than the maximum allowed size ${256}KiB. ${I} ${O}/#technical-limitations`);void 0!==i&&void 0!==n[i]&&function(t){let i=n[t];delete n[t];let o=e.estimateEncodedBytesCount(i);r.notifyAfterRemoveMessage(o)}(i),r.notifyBeforeAddMessage(s),void 0!==i?(n[i]=o,r.notifyAfterAddMessage()):e.write(e.isEmpty?o:`
170${o}`,e=>{r.notifyAfterAddMessage(e-s)})}return{flushController:r,add:o,upsert:o,stop:i.unsubscribe}}function e7(e){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),bytesCount:e.outputBytesCount,encoding:e.encoding}}let te=0x1400000;function tt(e,t,r,n,i,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?tr(e,t,r,o,{onSuccess:()=>tn(0,t,r,n,i,o),onFailure:()=>{t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),function e(t,r,n,i,o){2===t.transportStatus&&$(()=>{tr(t.queuedPayloads.first(),t,r,o,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=1e3,tn(1,t,r,n,i,o)},onFailure:()=>{t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),e(t,r,n,i,o)}})},t.currentBackoffTime)}(t,r,n,i,o)}}):t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function tr(e,t,r,n,{onSuccess:i,onFailure:o}){t.bandwidthMonitor.add(e),r(e,r=>{var s;t.bandwidthMonitor.remove(e),"opaque"!==(s=r).type&&(0===s.status&&!navigator.onLine||408===s.status||429===s.status||s.status>=500)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:r.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function tn(e,t,r,n,i,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${n} events size queued for upload: ${te/1048576}MiB`,source:eL,startClocks:ek()}),t.queueFullReported=!0);let s=t.queuedPayloads;for(t.queuedPayloads=ti();s.size()>0;)tt(s.dequeue(),t,r,n,i,o)}function ti(){let e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first:()=>e[0],dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=te}}}function to(e,t,r=16384){let n=new B,i={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:ti(),queueFullReported:!1};return{observable:n,send:o=>{for(let s of e)tt(o,i,(e,t)=>{ez(iZ.AVOID_FETCH_KEEPALIVE)?ta(s,e,t):function(e,t,r,n){(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}})()&&r.bytesCount<t?fetch(e.build("fetch-keepalive",r),{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(P(e=>null==n?void 0:n({status:e.status,type:e.type}))).catch(P(()=>ta(e,r,n))):ta(e,r,n)}(s,r,e,t)},s.trackType,t,n)},sendOnExit:t=>{for(let n of e)!function(e,t,r){if(navigator.sendBeacon&&r.bytesCount<t)try{let t=e.build("beacon",r);if(navigator.sendBeacon(t,r.data))return}catch(e){var n;n=e,ts||(ts=!0,N(n))}ta(e,r)}(n,r,t)}}}let ts=!1;function ta(e,t,r){fetch(e.build("fetch",t),{method:"POST",body:t.data,mode:"cors"}).then(P(e=>null==r?void 0:r({status:e.status,type:e.type}))).catch(P(()=>null==r?void 0:r({status:0})))}let tl=j?1:50;
170function tu({pageMayExitObservable:e,sessionExpireObservable:t}){let r,n=e.subscribe(e=>l(e.reason)),i=t.subscribe(()=>l("session_expire")),o=new B(()=>()=>{n.unsubscribe(),i.unsubscribe()}),s=0,a=0;function l(e){if(0===a)return;let t=a,r=s;a=0,s=0,u(),o.notify({reason:e,messagesCount:t,bytesCount:r})}function u(){W(r),r=void 0}return{flushObservable:o,get messagesCount(){return a},notifyBeforeAddMessage(e){s+e>=16384&&l("bytes_limit"),a+=1,s+=e,void 0===r&&(r=$(()=>{l("duration_limit")},3e4))},notifyAfterAddMessage(e=0){s+=e,a>=tl?l("messages_limit"):s>=16384&&l("bytes_limit")},notifyAfterRemoveMessage(e){s-=e,0==(a-=1)&&u()}}}let tc="DISCARDED",td="SKIPPED",th="configuration",tf="usage",tp=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],tg=["ddog-gov.com"];function tm(){return s||(s=new z(100)),s}function tv(e,t){D(S.debug,e,t),tm().notify({rawEvent:{type:"log",message:e,status:"debug",...t}})}function ty(e,t){tm().notify({rawEvent:{type:"log",status:"error",...function(e){if(eD(e)){var t;let r=X(e);return{error:{kind:r.name,stack:ec(((t=r).stack=t.stack.filter(e=>!e.url||tp.some(t=>e.url.startsWith(t))),t))},message:r.message}}return{error:{stack:eP},message:`Uncaught ${eO(e)}`}}(e),...t}})}function tb(e,t){tm().notify({rawEvent:{type:"log",message:e,status:"debug",...t},metricName:e})}function tw(e){tm().notify({rawEvent:{type:tf,usage:e}})}function tS(e,t,r,n){return P((...i)=>(n&&tw({feature:n}),e()[t][r](...i)))}let tk="userContext",tx="globalContext",tE="accountContext",tC="getContext",t_="setContext",tO="setContextProperty",tI="removeContextProperty",tT="clearContext";function tR(e,t){t.silentMultipleInit||C.error(`${e} is already initialized.`)}let tA="action",tP="error",tM="long_task",tN="view",tD="resource",tL="vital",tU="initial_load",tj="route_change",tF="bf_cache",tB="custom",tH="error_click",tz="dead_click",tq="duration";function tV(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,tV)}let t$=/([\w-]+)\s*=\s*([^;]+)/g;function tW(e,t){for(t$.lastIndex=0;;){let r=t$.exec(e);if(r){if(r[1]===t)return r[2]}else break}}function tK(e,t,r=""){let n=e.charCodeAt(t-1),i=n>=55296&&n<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${r}`}function tJ({vitalsByName:e,vitalsByReference:t},r,n={}){let i={name:r,startClocks:ek(),...n},o={__dd_vital_reference:!0};return e.set(r,i),t.set(o,i),o}function tY(e,{vitalsByName:t,vitalsByReference:r},n,i={}){var o,s,a,l,u,c;let d="string"==typeof n?t.get(n):r.get(n);d&&(e((o=d,s=d.startClocks,a=i,l=ek(),{name:o.name,type:tq,startClocks:s,duration:(c=s.timeStamp,l.timeStamp-c),context:eQ(o.context,a.context),description:null!=(u=a.description)?u:o.description})),"string"==typeof n?t.delete(n):r.delete(n))}function tG(e){let{startClocks:t,type:r,name:n,description:i,context:o}=e,s={id:tV(),type:r,name:n,description:i,...r===tq?{duration:ey(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:tL,context:o},startTime:t.relative,duration:r===tq?e.duration:void 0,domainContext:{}}}function tX(e,t,r){if(e)for(let n of e){let e=n[t];e&&e(r)}}function tQ(e,t){let r=e.indexOf(t);r>=0&&e.splice(r,1)}function tZ(e){return Array.isArray(e)&&e.length>0}let t0=[];function t1(e,t,r,n){var i,o;let s=(i=r,o=n,`_dd_c_${i}_${o}`);t0.push(e6(e,window,"storage",({key:e})=>{s===e&&t.setContext(l())})),t.changeObservable.subscribe(function(){localStorage.setItem(s,JSON.stringify(t.getContext()))});let a=eQ(l(),t.getContext());function l(){let e=localStorage.getItem(s);return e?JSON.parse(e):{}}eF(a)||t.setContext(a)}function t2(e,t,r){let n={...e};for(let[e,{required:i,type:o}]of Object.entries(t))"string"!==o||t3(n[e])||(n[e]=String(n[e])),i&&t3(n[e])&&C.warn(`The property ${e} of ${r} is required; context will not be sent to the intake.`);return n}function t3(e){return null==e||""===e}function t4(e="",{propertiesConfig:t={}}={}){let r={},n=new B,i={getContext:()=>eX(r),setContext:o=>{!function(e){let t="object"===eY(e);return t||C.error("Unsupported context:",e),t}(o)?i.clearContext():r=eT(t2(o,t,e)),n.notify()},setContextProperty:(i,o)=>{r=eT(t2({...r,[i]:o},t,e)),n.notify()},removeContextProperty:i=>{delete r[i],t2(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return i}function t6(){return t4("global context")}function t5(){return t4("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function t8(){return t4("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function t9(e){return t7(e,location.href).href}function t7(e,t){let{URL:r}=function(){if(!a){let e,t;try{(e=document.createElement("iframe")).style.display="none",document.body.appendChild(e),t=e.contentWindow}catch(e){t=U}a={URL:t.URL},null==e||e.remove()}return a}();try{return void 0!==t?new r(e,t):new r(e)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}async function re(e,t){let r=e.getReader(),n=[];for(;;){let e=await r.read();if(e.done)break;t.collectStreamBody&&n.push(e.value)}return r.cancel().catch(G),t.collectStreamBody?function(e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>
170e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(n):void 0}let rt=[];function rr({responseBodyAction:e}={}){return e&&rt.push(e),l||(l=new B(e=>{if(!U.fetch)return;let{stop:t}=eh(U,"fetch",t=>(function({parameters:e,onPostCall:t,handlingStack:r},n){let[i,o]=e,s=o&&o.method;void 0===s&&i instanceof Request&&(s=i.method);let a=void 0!==s?String(s).toUpperCase():"GET",l=i instanceof Request?i.url:t9(String(i)),u={state:"start",init:o,input:i,method:a,startClocks:ek(),url:l,handlingStack:r};n.notify(u),e[0]=u.input,e[1]=u.init,t(e=>{rn(n,e,u).catch(N)})})(t,e),{computeHandlingStack:!0});return t})),l}async function rn(e,t,r){var n,i;let o;r.state="resolve";try{o=await t}catch(t){r.status=0,r.isAborted=(null==(i=null==(n=r.init)?void 0:n.signal)?void 0:i.aborted)||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t,e.notify(r);return}r.response=o,r.status=o.status,r.responseType=o.type,r.isAborted=!1;let s=rt.reduce((e,t)=>Math.max(e,t(r)),0);if(0!==s){let e=function(e){try{return e.clone()}catch(e){return}}(o);if(e&&e.body)try{let t=await re(e.body,{collectStreamBody:2===s});r.responseBody=t&&new TextDecoder().decode(t)}catch(e){}}e.notify(r)}function ri(e,t,r=0,n){let i=new Date;i.setTime(i.getTime()+r);let o=`expires=${i.toUTCString()}`,s=n&&n.crossSite?"none":"strict",a=n&&n.domain?`;domain=${n.domain}`:"",l=n&&n.secure?";secure":"",u=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${s}${a}${l}${u}`}function ro(e){return tW(document.cookie,e)}function rs(e){return u||(u=function(e){let t=new Map;for(t$.lastIndex=0;;){let r=t$.exec(e);if(r)t.set(r[1],r[2]);else break}return t}(document.cookie)),u.get(e)}function ra(e=location.hostname,t=document.referrer){if(void 0===c){let r=function(e,t){try{return e||t7(t).hostname}catch(e){}}(e,t);if(r){let e=`dd_site_test_${tV()}`,t=r.split("."),n=t.pop();for(;t.length&&!ro(e);)ri(e,"test",1e3,{domain:n=`${t.pop()}.${n}`});ri(e,"",0,{domain:n}),c=n}}return c}function rl(){return!j&&!!(U._DATADOG_SYNTHETICS_INJECTS_RUM||rs("datadog-synthetics-injects-rum"))}function ru(){let e=window._DATADOG_SYNTHETICS_PUBLIC_ID||rs("datadog-synthetics-public-id");return"string"==typeof e?e:void 0}function rc(){let e=window._DATADOG_SYNTHETICS_RESULT_ID||rs("datadog-synthetics-result-id");return"string"==typeof e?e:void 0}function rd(){return!!(ru()&&rc())}let rh="_dd_s",rf=144e5,rp=9e5,rg="cookie",rm="local-storage",rv=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function ry(e,t){let r={isExpired:"1"};return t.trackAnonymousUser&&(null==e?void 0:e.anonymousId)&&(r.anonymousId=null==e?void 0:e.anonymousId),r}function rb(e){var t;return void 0!==e.isExpired||!((void 0===(t=e).created||eb()-Number(t.created)<rf)&&(void 0===t.expire||eb()<Number(t.expire)))}function rw(e){e.expire=String(eb()+rp)}function rS(e){return e4(e).map(([e,t])=>"anonymousId"===e?`aid=${t}`:`${e}=${t}`).join("&")}function rk(e){let t={};return e&&(-1!==e.indexOf("&")||rv.test(e))&&e.split("&").forEach(e=>{let r=rv.exec(e);if(null!==r){let[,e,n]=r;"aid"===e?t.anonymousId=n:t[e]=n}}),t}function rx(e){let t=function(e){let t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=ra();if(!e)return;t.domain=e}return t}(e);return t&&function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{let t=`dd_cookie_test_${tV()}`,r="test";ri(t,r,6e4,e);let n=ro(t)===r;return ri(t,"",0,e),n}catch(e){return C.error(e),!1}}(t)?{type:rg,cookieOptions:t}:void 0}function rE(e,t,r,n){let i=rS(r);t.betaEncodeCookieOptions&&(i=rS({...r,...!eF(r)?{c:r_(e)}:{}})),ri(rh,i,t.trackAnonymousUser?em:n,e)}function rC(e,t){return t.betaEncodeCookieOptions?function(e){let t,r=(function(e){let t=new Map;for(t$.lastIndex=0;;){let r=t$.exec(e);if(r){let e=r[1],n=r[2];t.has(e)?t.get(e).push(n):t.set(e,[n])}else break}return t})(document.cookie).get(rh)||[],n=r_(e);for(let e of r.reverse())if((t=rk(e)).c===n)break;return null==t||delete t.c,null!=t?t:{}}(e):rk(ro(rh))}function r_(e){return((e.domain?e.domain.split(".").length-1:0)<<1|!!e.crossSite).toString(16)}function rO(){try{let e=tV(),t=`_dd_test_${e}`;localStorage.setItem(t,e);let r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:rm}:void 0}catch(e){return}}function rI(e){localStorage.setItem(rh,rS(e))}function rT(){return rk(localStorage.getItem(rh))}let rR=[];function rA(e,t,r=0){var n;let i,{isLockEnabled:o,persistSession:s,expireSession:a}=t,l=e=>s({...e,lock:i}),u=()=>{let{lock:e,...r}=t.retrieveSession();return{session:r,lock:e&&!function(e){var t;let[,r]=e.split("--");return!r||(t=Number(r),ew()-t>1e3)}(e)?e:void 0}};if(h||(h=e),e!==h)return void rR.push(e);if(o&&r>=100)return void rM(t);let c=u();if(o&&(c.lock||(i=tV()+"--"+ew(),l(c.session),(c=u()).lock!==i)))return void rP(e,t,r);let d=e.process(c.session);if(o&&(c=u()).lock!==i)return void rP(e,t,r);if(d&&(rb(d)?a(d):(rw(d),o?l(d):s(d))),o&&!(d&&rb(d))){if((c=u()).lock!==i)return void rP(e,t,r);s(c.session),d=c.session}null==(n=e.after)||n.call(e,d||c.session),rM(t)}function rP(e,t,r){$(()=>{rA(e,t,r+1)},10)}function rM(e){h=void 0;let t=rR.shift();t&&rA(t,e)}function rN(e){let t=eY(e);return"string"===t||"function"===t||e instanceof RegExp}function rD(e,t,r=!1){return e.some(e=>{try{if("function"==typeof e)return e(t);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return r?t.startsWith(e):e===t}catch(e){C.error(e)}return!1})}let rL=["chrome-extension://","moz-extension://"];function rU(e){return rL.some(t=>e.includes(t))}function rj(e,t,r){let n=function(e,t){let r=`/api/v2/${t}`,n=e.proxy;if("string"==typeof n){let e=t9(n);return t=>`${e}?ddforward=${encodeURIComponent(`${r}?${t}`)}`}if("function"==typeof n)return e=>n({path:r,parameters:e});let i=rF(t,e);return e=>`https://${i}${r}?${e}`}(e,t);return{build:(i,o)=>n(function({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},n,i,{retry:o,encoding:s},a=[]){let l=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.25.1")}`,"dd-evp-origin=browser",`dd-request-id=${tV()}`].concat(a);return s&&l.push(`dd-evp-encoding=${s}`),"rum"===n&&(l.push(`batch_time=${ew()}`,`_dd.api=${i}`),o&&l.push(`_dd.retry_count=${o.count}`,`_dd.retry_after=${o.lastFailureStatus}`)),t&&l.reverse(),l.join("&")}(e,t,i,o,r)),trackType:t}}function rF(e,t){let{site:r=eW,internalAnalyticsSubdomain:n}=t;if("logs"===e&&t.usePciIntake&&r===eW)return"pci.browser-intake-datadoghq.com";if(n&&r===eW)return`${n}.${eW}`;if("dd0g-gov.com"===r)return`http-intake.logs.${r}`;let i=r.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}let rB={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},rH={ALL:"all",SAMPLED:"sampled"};function rz(e,t){return null==e||"string"==typeof e||(C.error(`${t} must be defined as a string`),!1)}function rq(e,t){return void 0===e||!!(eg(e)&&e>=0&&e<=100)||(C.error(`${t} Sample Rate should be a number between 0 and 100`),!1)}let rV=new Map;function r$(e){let t=crypto.getRandomValues(new Uint32Array(2));return 63===e&&(t[t.length-1]>>>=1),{toString(e=10){let r=t[1],n=t[0],i="";do{let t=r%e*0x100000000+n;r=Math.floor(r/e),n=Math.floor(t/e),i=(t%e).toString(e)+i}while(r||n)return i}}}function rW(e){return e.toString(16).padStart(16,"0")}function rK(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function rJ(e,t,r,n,i,o){let s=r.findTrackedSession();if(!s)return;let a=e.allowedTracingUrls.find(e=>rD([e.match],t.url,!0));if(!a)return;let l=function(e,t){let r;if(100===t)return!0;
170if(0===t)return!1;let n=rV.get(t);return n&&e===n.sessionId?n.decision:(r=window.BigInt?function(e,t){let r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000");return Number(e*r%n)<=t/100*Number(n)}(BigInt(`0x${e.split("-")[4]}`),t):ef(t),rV.set(t,{sessionId:e,decision:r}),r)}(s.id,e.traceSampleRate);(l||e.traceContextInjection===rH.ALL)&&(t.traceSampled=l,t.traceId=r$(64),t.spanId=r$(63),o(function(e,t,r,n,i,o,s,a){let l={};if(i.forEach(n=>{switch(n){case"datadog":Object.assign(l,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break;case"tracecontext":Object.assign(l,{traceparent:`00-0000000000000000${rW(e)}-${rW(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break;case"b3":Object.assign(l,{b3:`${rW(e)}-${rW(t)}-${r?"1":"0"}`});break;case"b3multi":Object.assign(l,{"X-B3-TraceId":rW(e),"X-B3-SpanId":rW(t),"X-B3-Sampled":r?"1":"0"})}}),a.propagateTraceBaggage){let e={"session.id":n},t=o.getContext().id;"string"==typeof t&&(e["user.id"]=t);let r=s.getContext().id;"string"==typeof r&&(e["account.id"]=r);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(",");i&&(l.baggage=i)}return l}(t.traceId,t.spanId,t.traceSampled,s.id,a.propagatorTypes,n,i,e)))}let rY=["tracecontext","datadog"],rG=/[a-zA-Z_$]/,rX=/[a-zA-Z0-9_$]/,rQ=/[0-9]/,rZ=/[a-fA-F0-9]/,r0={0:()=>!1,1:()=>!1,2:e=>rG.test(e),3:e=>rX.test(e),4:e=>"."===e,5:e=>"["===e,6:e=>"]"===e,7:e=>rQ.test(e),8:e=>"'\"".includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>"\\"===e,12:(e,t)=>void 0===t.escapeSequence?`${t.quote}/\\bfnrtu`.includes(e):!!t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5&&rZ.test(e)},r1={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},r2=[2,3,7,10],r3=[4,5,6],r4={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
171`,r:"\r",t:"	"},r6=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function r5(e,t){let r,n=function(){let e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}(),i=await r9(e);return i.ok?(n.increment("fetch","success"),r=function(e,t,r,n){let i={...e};return r6.forEach(e=>{e in t&&(i[e]=o(t[e]))}),Object.keys(r).forEach(e=>{var n;void 0!==t[e]&&(n=r[e],t[e].forEach(({key:e,value:t})=>{n.setContextProperty(e,o(t))}))}),i;function o(e){if(Array.isArray(e))return e.map(o);if("object"==typeof(t=e)&&null!==t){if("rcSerializedType"in e){let i=e.rcSerializedType;switch(i){case"string":return e.value;case"regex":return r8(e.value);case"dynamic":let o;var t,r=e;let s=r.strategy;switch(s){case"cookie":o=function({name:e}){let t=ro(e);return n.increment("cookie",void 0!==t?"success":"missing"),t}(r);break;case"dom":o=function({selector:e,attribute:t}){var r,i;let o;try{o=document.querySelector(e)}catch(t){C.error(`Invalid selector in the remote configuration: '${e}'`),n.increment("dom","failure");return}if(!o)return void n.increment("dom","missing");if(r=o,i=t,"password"===r.getAttribute("type")&&"value"===i){C.error(`Forbidden element selected by the remote configuration: '${e}'`),n.increment("dom","failure");return}let s=void 0!==t?o.getAttribute(t):o.textContent;return null===s?void n.increment("dom","missing"):(n.increment("dom","success"),s)}(r);break;case"js":o=function({path:e}){let t=window,r=function(e){let t,r=[],n=0,i={quote:void 0,escapeSequence:void 0},o="";for(let l of e){if(!(t=r1[n].find(e=>r0[e](l,i))))return[];if(void 0!==i.escapeSequence&&12!==t){var s,a;if(s=i.escapeSequence,!("\"'/\\bfnrt".includes(s)||s.startsWith("u")&&5===s.length))return[];o+=(a=i.escapeSequence).startsWith("u")?String.fromCharCode(parseInt(a.slice(1),16)):r4[a],i.escapeSequence=void 0}r2.includes(t)?o+=l:r3.includes(t)&&""!==o?(r.push(o),o=""):12===t?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${l}`:l:8===t?i.quote=l:9===t&&(i.quote=void 0),n=t}return r1[n].includes(1)?(""!==o&&r.push(o),r):[]}(e);if(0===r.length){C.error(`Invalid JSON path in the remote configuration: '${e}'`),n.increment("js","failure");return}for(let i of r){if(!(i in t))return void n.increment("js","missing");try{t=t[i]}catch(t){C.error(`Error accessing: '${e}'`,t),n.increment("js","failure");return}}return n.increment("js","success"),t}(r);break;default:C.error(`Unsupported remote configuration: "strategy": "${s}"`);return}let a=r.extractor;return void 0!==a&&"string"==typeof o?function(e,t){let r=r8(e.value);if(void 0===r)return;let n=r.exec(t);if(null===n)return;let[i,o]=n;return o||i}(a,o):o;default:C.error(`Unsupported remote configuration: "rcSerializedType": "${i}"`);return}}return eB(e,o)}return e}}(e,i.value,t,n)):(n.increment("fetch","failure"),C.error(i.error)),tb("remote configuration metrics",{metrics:n.get()}),r}function r8(e){try{return new RegExp(e)}catch(t){C.error(`Invalid regex in the remote configuration: '${e}'`)}}async function r9(e){let t;try{var r;t=await fetch((r=e).remoteConfigurationProxy?r.remoteConfigurationProxy:`https://sdk-configuration.${rF("rum",r)}/v1/${encodeURIComponent(r.remoteConfigurationId)}.json`)}catch(e){t=void 0}if(!t||!t.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};let n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error("No remote configuration for RUM.")}}function r7(e,t,r){e.changeObservable.subscribe(()=>{let n=e.getContext();r.add(e=>e[t].setContext(n))})}let ne=class{constructor(){this.callbacks={}}notify(e,t){let r=this.callbacks[e];
171r&&r.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},nt=1/0,nr=null,nn=new Set;function ni({expireDelay:e,maxEntries:t}){let r=[];nr||(nr=K(()=>void nn.forEach(e=>e()),6e4));let n=()=>{let t=eS()-e;for(;r.length>0&&r[r.length-1].endTime<t;)r.pop()};return nn.add(n),{add:function(e,n){let i={value:e,startTime:n,endTime:nt,remove:()=>{tQ(r,i)},close:e=>{i.endTime=e}};return t&&r.length>=t&&r.pop(),r.unshift(i),i},find:function(e=nt,t={returnInactive:!1}){for(let n of r)if(n.startTime<=e){if(t.returnInactive||e<=n.endTime)return n.value;break}},closeActive:function(e){let t=r[0];t&&t.endTime===nt&&t.close(e)},findAll:function(e=nt,t=0){let n=e+t;return r.filter(t=>t.startTime<=n&&e<=t.endTime).map(e=>e.value)},reset:function(){r=[]},stop:function(){nn.delete(n),0===nn.size&&nr&&(J(nr),nr=null)}}}let no=new WeakMap;function ns({target:e,parameters:[t,r]}){no.set(e,{state:"open",method:String(t).toUpperCase(),url:t9(String(r))})}function na({target:e}){let t=no.get(e);t&&(t.isAborted=!0)}let nl="fetch",nu="other",nc="initial_document",nd=[["document",e=>nc===e],["xhr",e=>"xmlhttprequest"===e],[nl,e=>"fetch"===e],["beacon",e=>"beacon"===e],["css",(e,t)=>/\.css$/i.test(t)],["js",(e,t)=>/\.js$/i.test(t)],["image",(e,t)=>["image","img","icon"].includes(e)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)],["font",(e,t)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(t)],["media",(e,t)=>["audio","video"].includes(e)||null!==/\.(mp3|mp4)$/i.exec(t)]];function nh(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function nf(e){return"xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType}function np(e){return e.duration>=0}function ng(e){var t;let r=nh(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!((t=e).redirectEnd>t.startTime)||nh(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return r&&n}function nm(e,t,r){if(e<=t&&t<=r)return{duration:ey(r-t),start:ey(t-e)}}function nv(e){return e&&(!eK.every(t=>e.includes(t))||ez(iZ.TRACK_INTAKE_REQUESTS))}let ny=/data:(.+)?(;base64)?,/g;function nb(e,t){return t.allowedGraphQlUrls.find(t=>rD([t.match],e))}let nw=1;function nS(){let e=nw;return nw+=1,e}function nk(e){return eg(e)&&e<0?void 0:e}function nx({lifeCycle:e,isChildEvent:t,onChange:r=G}){let n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,e=>{var i;if("view"!==e.type&&"vital"!==e.type&&t(e))switch(e.type){case tP:n.errorCount+=1,r();break;case tA:n.actionCount+=1,e.action.frustration&&(n.frustrationCount+=e.action.frustration.type.length),r();break;case tM:n.longTaskCount+=1,r();break;case tD:(null==(i=e._dd)?void 0:i.discarded)||(n.resourceCount+=1,r())}});return{stop:()=>{i.unsubscribe()},eventCounts:n}}function nE(e,t){return new B(r=>{var n;let i,o;if(!window.PerformanceObserver)return;let s=e=>{let t=e.filter(e=>{var t;return!((t=e).entryType===i0.RESOURCE&&(!nv(t.name)||!np(t)))});t.length>0&&r.notify(t)},a=!0,l=new PerformanceObserver(P(e=>{a?i=$(()=>s(e.getEntries())):s(e.getEntries())}));try{l.observe(t)}catch(e){if([i0.RESOURCE,i0.NAVIGATION,i0.LONG_TASK,i0.PAINT].includes(t.type)){t.buffered&&(i=$(()=>s(performance.getEntriesByType(t.type))));try{l.observe({entryTypes:[t.type]})}catch(e){return}}}return a=!1,n=e,!p&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(p=e6(n,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),nC(i0.FIRST_INPUT)||t.type!==i0.FIRST_INPUT||({stop:o}=function(e,t){let r=eb(),n=!1,{stop:i}=e5(e,window,["click","mousedown","keydown","touchstart","pointerdown"],t=>{var r,n;if(!t.cancelable)return;let i={entryType:"first-input",processingStart:eS(),processingEnd:eS(),startTime:t.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};"pointerdown"===t.type?(r=e,n=i,e5(r,window,["pointerup","pointercancel"],e=>{"pointerup"===e.type&&o(n)},{once:!0})):o(i)},{passive:!0,capture:!0});return{stop:i};function o(e){if(!n){n=!0,i();let o=e.processingStart-e.startTime;o>=0&&o<eb()-r&&t(e)}}}(e,e=>{s([e])}
171)),()=>{l.disconnect(),o&&o(),W(i)}})}function nC(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(e)}function n_(e){return e.nodeType===Node.TEXT_NODE}function nO(e){return e.nodeType===Node.ELEMENT_NODE}(i2=i0||(i0={})).EVENT="event",i2.FIRST_INPUT="first-input",i2.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",i2.LAYOUT_SHIFT="layout-shift",i2.LONG_TASK="longtask",i2.LONG_ANIMATION_FRAME="long-animation-frame",i2.NAVIGATION="navigation",i2.PAINT="paint",i2.RESOURCE="resource",i2.VISIBILITY_STATE="visibility-state";let nI="data-dd-excluded-activity-mutations";function nT(e,t,r){let n,i=!1,o=$(P(()=>u({hadActivity:!1})),100),s=void 0!==r?$(P(()=>u({hadActivity:!0,end:ew()})),r):void 0,a=e.subscribe(({isBusy:e})=>{W(o),W(n);let t=ew();e||(n=$(P(()=>u({hadActivity:!0,end:t})),100))}),l=()=>{i=!0,W(o),W(n),W(s),a.unsubscribe()};function u(e){i||(l(),t(e))}return{stop:l}}function nR(e,t,r,n){return new B(i=>{let o,s=[],a=0;return s.push(t.subscribe(e=>{e.every(nP)||l()}),r.subscribe(l),nE(n,{type:i0.RESOURCE}).subscribe(e=>{e.some(e=>!nA(n,e.name))&&l()}),e.subscribe(7,e=>{nA(n,e.url)||(void 0===o&&(o=e.requestIndex),a+=1,l())}),e.subscribe(8,e=>{nA(n,e.url)||void 0===o||e.requestIndex<o||(a-=1,l())})),()=>{s.forEach(e=>e.unsubscribe())};function l(){i.notify({isBusy:a>0})}})}function nA(e,t){return rD(e.excludedActivityUrls,t)}function nP(e){let t="characterData"===e.type?e.target.parentElement:e.target;return!!(t&&nO(t)&&t.matches(`[${nI}], [${nI}] *`))}let nM="data-dd-action-name",nN="Masked Element",nD=[nM,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],nL=[nB,function(e){if(e.id&&!nF(e.id))return`#${CSS.escape(e.id)}`}],nU=[nB,function(e){if("BODY"===e.tagName)return;let t=e.classList;for(let r=0;r<t.length;r+=1){let n=t[r];if(!nF(n))return`${CSS.escape(e.tagName)}.${CSS.escape(n)}`}},function(e){return CSS.escape(e.tagName)}];function nj(e,t){let r;if(!e.isConnected)return;let n=e;for(;n&&"HTML"!==n.nodeName;){let e=nH(n,nL,nz,t,r);if(e)return e;r=nH(n,nU,nq,t,r)||nV(function(e){let t=e.parentElement.firstElementChild,r=1;for(;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${r})`}(n),r),n=n.parentElement}return r}function nF(e){return/[0-9]/.test(e)}function nB(e,t){if(t){let e=r(t);if(e)return e}for(let e of nD){let t=r(e);if(t)return t}function r(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}[${t}="${CSS.escape(e.getAttribute(t))}"]`}}function nH(e,t,r,n,i){for(let o of t){let t=o(e,n);if(t&&r(e,t,i))return nV(t,i)}}function nz(e,t,r){return 1===e.ownerDocument.querySelectorAll(nV(t,r)).length}function nq(e,t,r){let n;if(void 0===r)n=e=>e.matches(t);else{let e=nV(`${t}:scope`,r);n=t=>null!==t.querySelector(e)}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&n(i))return!1;i=i.nextElementSibling}return!0}function nV(e,t){return t?`${e}>${t}`:e}let n$={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:rB.ALLOW,MASK:rB.MASK,MASK_USER_INPUT:rB.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:rB.MASK_UNLESS_ALLOWLISTED},nW="data-dd-privacy",nK={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function nJ(e){return`[${nW}="${e}"], .dd-privacy-${e}`}function nY(e,t,r){if(r&&r.has(e))return r.get(e);let n=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&nO(e.host)?e.host:e.parentNode,i=n?nY(n,t,r):t,o=function(e,t){switch(t){case n$.HIDDEN:case n$.IGNORE:return t}switch(e){case n$.ALLOW:case n$.MASK:case n$.MASK_USER_INPUT:case n$.MASK_UNLESS_ALLOWLISTED:case n$.HIDDEN:case n$.IGNORE:return e;default:return t}}(function(e){if(nO(e)){if("BASE"===e.tagName)return n$.ALLOW;if("INPUT"===e.tagName){if("password"===e.type||"email"===e.type||"tel"===e.type||"hidden"===e.type)return n$.MASK;let t=e.getAttribute("autocomplete");if(t&&(t.startsWith("cc-")||t.endsWith("-password")))return n$.MASK}if(e.matches(nJ(n$.HIDDEN)))return n$.HIDDEN;if(e.matches(nJ(n$.MASK)))return n$.MASK;if(e.matches(nJ(n$.MASK_UNLESS_ALLOWLISTED)))return n$.MASK_UNLESS_ALLOWLISTED;if(e.matches(nJ(n$.MASK_USER_INPUT)))return n$.MASK_USER_INPUT;if(e.matches(nJ(n$.ALLOW)))return n$.ALLOW;if(function(e){if("SCRIPT"===e.nodeName)return!0;
171if("LINK"===e.nodeName){let e=t("rel");return/preload|prefetch/i.test(e)&&"script"===t("as")||"shortcut icon"===e||"icon"===e}if("META"===e.nodeName){let r=t("name"),n=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(r)||"application-name"===r||"icon"===n||"apple-touch-icon"===n||"shortcut icon"===n||"keywords"===r||"description"===r||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(r)||"pinterest"===r||"robots"===r||"googlebot"===r||"bingbot"===r||e.hasAttribute("http-equiv")||"author"===r||"generator"===r||"framework"===r||"publisher"===r||"progid"===r||/^article:/.test(i)||/^product:/.test(i)||"google-site-verification"===r||"yandex-verification"===r||"csrf-token"===r||"p:domain_verify"===r||"verify-v1"===r||"verification"===r||"shopify-checkout-api-token"===r}function t(t){return(e.getAttribute(t)||"").toLowerCase()}return!1}(e))return n$.IGNORE}}(e),i);return r&&r.set(e,o),o}function nG(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!nK[e.tagName]}function nX(e){var t;return!(e&&e.trim())||(null==(t=window.$DD_ALLOW)?void 0:t.has(e.toLocaleLowerCase()))||!1}function nQ(e,t){let r=e.closest(`[${t}]`);if(r)return n3(n2(r.getAttribute(t).trim()))}let nZ=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return n6(e.labels[0],t,r)},e=>{if("INPUT"===e.nodeName){let t=e.getAttribute("type");if("button"===t||"submit"===t||"reset"===t)return{name:e.value,nameSource:"text_content"}}},(e,t,r)=>{if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return n6(e,t,r)},(e,t,r)=>n4(e,"aria-label",t,r),(e,t,r)=>{let n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(t=>{var r,n;return r=e,n=t,r.ownerDocument?r.ownerDocument.getElementById(n):null}).filter(e=>!!e).map(e=>n5(e,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>n4(e,"alt",t,r),(e,t,r)=>n4(e,"name",t,r),(e,t,r)=>n4(e,"title",t,r),(e,t,r)=>n4(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return n6(e.options[0],t,r)}],n0=[(e,t,r)=>n6(e,t,r)];function n1(e,t,r,n){let i=e,o=0;for(;o<=10&&i&&"BODY"!==i.nodeName&&"HTML"!==i.nodeName&&"HEAD"!==i.nodeName;){for(let e of t){let t=e(i,r,n);if(t){let{name:e,nameSource:r}=t,n=e&&e.trim();if(n)return{name:n3(n2(n)),nameSource:r}}}if("FORM"===i.nodeName)break;i=i.parentElement,o+=1}}function n2(e){return e.replace(/\s+/g," ")}function n3(e){return e.length>100?`${tK(e,100)} [...]`:e}function n4(e,t,r,n){let{enablePrivacyForActionName:i,defaultPrivacyLevel:o}=r,s=e.getAttribute(t);if(s&&i){var a,l;let i=nY(e,o,n);(function(e,t,r,n,i){if(n!==n$.MASK&&n!==n$.MASK_UNLESS_ALLOWLISTED||t===nW||nD.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!("A"===e&&"href"===t||"IFRAME"===e&&"srcdoc"===t||r&&t.startsWith("data-"))||("IMG"===e||"SOURCE"===e)&&("src"===t||"srcset"===t)})(e.tagName,t,s,i,r)&&(a=s,l=nN,s=nX(a)?a:l||a.replace(/\S/g,"x"))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function n6(e,t,r){return{name:n5(e,t,r)||"",nameSource:"text_content"}}function n5(e,t,r){if(e.isContentEditable)return;let{enablePrivacyForActionName:n,actionNameAttribute:i,defaultPrivacyLevel:o}=t;if(ez(iZ.USE_TREE_WALKER_FOR_ACTION_NAME)){var s=e,a=i,l=n,u=o,c=r;let t=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(e){let t=nY(e,u,c);if(l&&t&&function(e,t){switch(t){case n$.MASK:case n$.HIDDEN:case n$.IGNORE:return!0;case n$.MASK_UNLESS_ALLOWLISTED:if(n_(e))return!!nG(e.parentNode)||!nX(e.textContent||"");return nG(e);case n$.MASK_USER_INPUT:return n_(e)?nG(e.parentNode):nG(e);default:return!1}}(e,t))return NodeFilter.FILTER_REJECT;if(nO(e)){if(e.hasAttribute(nM)||a&&e.hasAttribute(a))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if("visible"!==t.visibility||"none"===t.display||t.contentVisibility&&"visible"!==t.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}),d="";for(;t.nextNode();){let e=t.currentNode;if(nO(e)){("BR"===e.nodeName||"P"===e.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(e).display))&&(d+=" ");continue}d+=e.textContent||""}return d.replace(/\s+/g," ").trim()}if("innerText"in e){let t=e.innerText,r=r=>{let n=e.querySelectorAll(r);for(let e=0;e<n.length;e+=1){let r=n[e];if("innerText"in r){let e=r.innerText;e&&e.trim().length>0&&(t=t.replace(e,""))}}};return r(`[${nM}]`),i&&r(`[${i}]`),n&&r(`${nJ(n$.HIDDEN)}, ${nJ(n$.MASK)}`),t}return e.textContent}function n8(){let e=window.getSelection();return!e||e.isCollapsed}function n9(e){return e.target instanceof Element&&!1!==e.isPrimary}function n7(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return"LABEL"===t.tagName&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches('input
171:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}let ie=new Map;function it(e,t){ie.set(e,t),ie.forEach((e,t)=>{eS()-t>1e4&&ie.delete(t)})}let ir=3e5;function ii(e){let t=io(e)?{action:{id:e.id,loading_time:nk(ey(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context},r=eQ({action:{id:tV(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:tA},t),n=io(e)?e.duration:void 0,i=io(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:r,duration:n,startTime:e.startClocks.relative,domainContext:i}}function io(e){return e.type!==tB}let is={},ia="csp_violation";function il(e){return{startClocks:ek(),source:"report",handling:"unhandled",...e}}function iu(e,t,r,n,i){return r?ec({name:e,message:t,stack:[{func:"?",url:r,line:null!=n?n:void 0,column:null!=i?i:void 0}]}):void 0}let ic=new WeakSet;function id(e){return e.startTime+e.duration}function ih(e,t,r){return document.readyState===t||"complete"===document.readyState?(r(),{stop:G}):e6(e,window,"complete"===t?"load":"DOMContentLoaded",r,{once:!0})}let ip=12e4;function ig(e,t){let r=t&&Number(t);if(e&&r)return{traceId:e,traceTime:r}}function im(e){if(e&&e.nodeType===Node.COMMENT_NODE){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function iv(){if(nC(i0.NAVIGATION)){let e=performance.getEntriesByType(i0.NAVIGATION)[0];if(e)return e}let e=function(){let e={},t=performance.timing;for(let r in t)if(eg(t[r])){let n=t[r];e[r]=0===n?0:n-eE()}return e}(),t={entryType:i0.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function iy(e,t,r,n){let i=nf(e)&&n?n.getMatchingRequest(e):void 0;return ib(e,i,r,t)}function ib(e,t,r,n){var i,o,s,a;if(!e&&!t)return;let l=t?function(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}(t,n):function(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:r$(63).toString(),rule_psr:t.rulePsr}}}(e,n);if(!n.trackResources&&!l)return;let u=e?ev(e.startTime):t.startClocks,c=e?function(e){let{duration:t,startTime:r,responseEnd:n}=e;return 0===t&&r<n?n-r:t}(e):(i=r,o=u,s=t.duration,i.wasInPageStateDuringPeriod("frozen",o.relative,s)?void 0:s),d=t&&function(e,t){let r=nb(e.url,t);if(r){let t=function(e,t=!1){let r,n,i,o;if(!e||"string"!=typeof e)return;try{r=JSON.parse(e)}catch(e){return}if(!r)return;if(r.query){var s;let e=r.query.trim();n=null==(s=e.match(/^\s*(query|mutation|subscription)\b/i))?void 0:s[1],t&&(i=tK(e,32768,"..."))}let a=r.operationName;return r.variables&&(o=JSON.stringify(r.variables)),{operationType:n,operationName:a,variables:o,payload:i}}(e.requestBody,r.trackPayload);if(t){if(r.trackResponseErrors&&e.responseBody){let r=function(e){let t;try{t=JSON.parse(e)}catch(e){return}if(!t||"object"!=typeof t)return;let r=t;if(tZ(r.errors))return r.errors.map(e=>{var t;return{message:e.message,path:e.path,locations:e.locations,code:null==(t=e.extensions)?void 0:t.code}})}(e.responseBody);r&&(t.error_count=r.length,t.errors=r)}return t}return}}(t,n),h=eQ({date:u.timeStamp,resource:{id:tV(),duration:ey(c),type:t?"xhr"===t.type?"xhr":nl:function(e){let t=e.name;if(!function(e){try{return!!t7(e)}catch(e){return!1}}(t))return nu;let r=function(e){let t=t7(e).pathname;return"/"===t[0]?t:`/${t}`}(t);for(let[t,n]of nd)if(n(e.initiatorType,r))return t;return nu}(e),method:t?t.method:void 0,status_code:t?t.status:0===(a=e.responseStatus)?void 0:a,url:t?function(e,t=24e3){if(e.length<=t||!e.startsWith("data:"))return e;let r=e.substring(0,100).match(ny);return r?`${r[0]}[...]`:e}(t.url):e.name,protocol:e&&(""===e.nextHopProtocol?void 0:e.nextHopProtocol),delivery_type:e&&(""===e.deliveryType?"other":e.deliveryType),graphql:d},type:tD,_dd:{discarded:!n.trackResources}},l,e&&function(e){let{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...function(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:r,transferSize:n}=e;return{size:r,encoded_body_size:t,decoded_body_size:r,transfer_size:n}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}(e),...function(e){if(!ng(e))return;let{startTime:t,fetchStart:r,workerStart:n,redirectStart:i,redirectEnd:o,domainLookupStart:s,domainLookupEnd:a,connectStart:l,secureConnectionStart:u,connectEnd:c,requestStart:d,responseStart:h,responseEnd:f}=e,p={download:nm(t,h,f),first_byte:nm(t,d,h)};return 0<n&&n<r&&(p.worker=nm(t,n,r)),r<c&&(p.connect=nm(t,l,c),l<=u&&u<=c&&(p.ssl=nm(t,u,c))),r<a&&(p.dns=nm(t,s,a)),t<o&&(p.redirect=nm(t,i,o)),p}(e)}}}(e));return{startTime:u.relative,duration:c,rawRumEvent:h,domainContext:function(e,t){if(t){let r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return"xhr"===t.type?{xhr:t.xhr,...r}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...r}}return{performanceEntry:e}}(e,t)}}let iw=6e5,iS=6e5;function ik(e,t,r=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:G};if(nC(i0.VISIBILITY_STATE)){let e=performance.getEntriesByType(i0.VISIBILITY_STATE).filter(e=>"hidden"===e.name).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:G}}let n=1/0,{stop:i}=e5(e,r,["pagehide","visibilitychange"],e=>{("pagehide"===e.type||"hidden"===document.visibilityState)&&(n=e.timeStamp,i())},{capture:!0});return{get timeStamp(){return n},stop:i}}let ix=e=>{let t=e.previousRect.width*e.previousRect.height;return t+e.currentRect.width*e.currentRect.height-((e,t)=>{let r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return r>=i||n>=o?0:(i-r)*(o-n)})(e.previousRect,e.currentRect)};function iE({x:e,y:t,width:r,height:n}){return{x:e,y:t,width:r,height:n}}let iC=0,i_=1/0,iO=0,iI=()=>g?iC:window.performance.interactionCount||0,iT=6e4;
171function iR(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}let iA=3e5,iP=3e5;function iM(e){let t=e.indexOf("?");return t<0?e:e.slice(0,t)}let iN=[];async function iD(e){let t,r,n=e.sessionStoreStrategyType;n&&(n.type===rg?(t=rC(n.cookieOptions,e),r={cookie:await iL(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):t=rT(),tv("Unexpected session state",{sessionStoreStrategyType:n.type,session:t,isSyntheticsTest:rd(),createdTimestamp:null==t?void 0:t.created,expireTimestamp:null==t?void 0:t.expire,...r}))}async function iL(){let e;return{count:(e="cookieStore"in window?await window.cookieStore.getAll(rh):document.cookie.split(/\s*;\s*/).filter(e=>e.startsWith(rh))).length,domain:ra()||"undefined",...e}}function iU(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}function ij(){0!==v.batchCount&&(tb("Customer data measures",v),iH())}function iF(){return{min:1/0,max:0,sum:0}}function iB(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function iH(){v={batchCount:0,batchBytesCount:iF(),batchMessagesCount:iF()}}function iz(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function iq(e,t){let r=tW(document.cookie,e),n=K(()=>{let n=tW(document.cookie,e);n!==r&&t(n)},1e3);return()=>{J(n)}}let iV="datadog-ci-visibility-test-execution-id";function i$(e,t,r=3e3){let n=0,i=!1;return{isLimitReached(){if(0===n&&$(()=>{n=0},6e4),(n+=1)<=r||i)return i=!1,!1;if(n===r+1){i=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:eL,startClocks:ek()})}finally{i=!1}}return!0}}}function iW(e){return"object"===eY(e)}let iK={"view.name":"string","view.url":"string","view.referrer":"string"},iJ={context:"object"},iY={service:"string",version:"string"},iG=function(){let e={};return{register:(t,r)=>(e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(e=>e!==r)}}),triggerHook(t,r){let n=e[t]||[],i=[];for(let e of n){let t=e(r);if(t===tc)return tc;t!==td&&i.push(t)}return eQ(...i)}}},iX=[tA,tP,tM,tD,tL],iQ=function(e,t,r,n={}){let i=function(e){let t=new B;return{tryToInit(t){e||(e=t)},update(r){e=r,t.notify()},isGranted:()=>e===q.GRANTED,observable:t}}(),o={vitalsByName:new Map,vitalsByReference:new WeakMap},s=function(e=function(){return new B(e=>{var t,r;let n=(t,r)=>{let n=eN({stackTrace:r,originalError:t,startClocks:ek(),nonErrorPrefix:"Uncaught",source:"source",handling:"unhandled"});e.notify(n)},{stop:i}=(t=n,eh(L(),"onerror",({parameters:[e,r,n,i,o]})=>{let s;eD(o)||(s=function(e,t,r,n){var i;let o,s;if(void 0===t)return;let{name:a,message:l}=(i=e,"[object String]"===({}).toString.call(i)&&([,o,s]=ea.exec(i)),{name:o,message:s});return{name:a,message:l,stack:[{url:t,column:n,line:r}]}}(e,r,n,i)),t(null!=o?o:e,s)})),{stop:o}=(r=n,eh(L(),"onunhandledrejection",({parameters:[e]})=>{r(e.reason||"Empty reason")}));return()=>{i(),o()}})}){let t=new z(500),r=e().subscribe(e=>{t.notify({type:0,error:e})});return{observable:t,stop:()=>{r.unsubscribe()}}}().observable,a=function({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,i){let o,s,a,l,u=function(){let e=[];return{add:t=>{e.push(t)>500&&e.splice(0,1)},remove:t=>{tQ(e,t)},drain:t=>{e.forEach(e=>e(t)),e.length=0}}}(),c=t6();r7(c,tx,u);let d=t5();r7(d,tk,u);let h=t8();r7(h,tE,u);let f=r.observable.subscribe(g),p={};function g(){let e;if(!a||!l||!r.isGranted())return;if(f.unsubscribe(),l.trackViewsManually){if(!o)return;u.remove(o.callback),e=o.options}let t=i(l,s,e);u.drain(t)}function m(e,n){var i,o,u,c;let d=e1();if(d&&(e={...o=e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!=(u=o.defaultPrivacyLevel)?u:null==(c=e0())?void 0:c.getPrivacyLevel()}),a=e,i=function(e){var t,r,n;let i={session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackA
171nonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant};return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:tZ(e.allowedTracingUrls),use_allowed_graph_ql_urls:tZ(e.allowedGraphQlUrls),use_track_graph_ql_payload:tZ(r=e.allowedGraphQlUrls)&&r.some(e=>"object"==typeof e&&"trackPayload"in e&&!!e.trackPayload),use_track_graph_ql_response_errors:tZ(n=e.allowedGraphQlUrls)&&n.some(e=>"object"==typeof e&&"trackResponseErrors"in e&&!!e.trackResponseErrors),selected_tracing_propagators:function(e){let t=new Set;return tZ(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{rN(e)?rY.forEach(e=>t.add(e)):"object"===eY(e)&&Array.isArray(e.propagatorTypes)&&e.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:tZ(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:null==(t=e.plugins)?void 0:t.map(e=>{var t;return{name:e.name,...null==(t=e.getConfigurationTelemetry)?void 0:t.call(e)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,...i}}(e),tm().notify({rawEvent:{type:th,configuration:i}}),l)return void tR("DD_RUM",e);let h=function(e,t){var r,n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S;if(void 0===e.trackFeatureFlagsForEvents||Array.isArray(e.trackFeatureFlagsForEvents)||C.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId)return void C.error("Application ID is not configured, no RUM data will be collected.");if(!rq(e.sessionReplaySampleRate,"Session Replay")||!rq(e.traceSampleRate,"Trace"))return;if(void 0!==e.excludedActivityUrls&&!Array.isArray(e.excludedActivityUrls))return void C.error("Excluded Activity Urls should be an array");let k=function(e){if(void 0===e.allowedTracingUrls)return[];if(!Array.isArray(e.allowedTracingUrls))return void C.error("Allowed Tracing URLs should be an array");if(0!==e.allowedTracingUrls.length&&void 0===e.service)return void C.error("Service needs to be configured when tracing is enabled");let t=[];return e.allowedTracingUrls.forEach(e=>{if(rN(e))t.push({match:e,propagatorTypes:rY});else"object"===eY(e)&&rN(e.match)&&Array.isArray(e.propagatorTypes)?t.push(e):C.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",e)}),t}(e);if(!k)return;let x=(u=e,c=t,u&&u.clientToken?void 0===u.allowedTrackingOrigins||Array.isArray(u.allowedTrackingOrigins)?(!(S=u.site)||"string"!=typeof S||/(datadog|ddog|datad0g|dd0g)/.test(S)||(C.error(`Site should be a valid Datadog site. ${I} ${_}/getting_started/site/.`),0))&&rq(u.sessionSampleRate,"Session")&&rq(u.telemetrySampleRate,"Telemetry")&&rq(u.telemetryConfigurationSampleRate,"Telemetry Configuration")&&rq(u.telemetryUsageSampleRate,"Telemetry Usage")&&rz(u.version,"Version")&&rz(u.env,"Env")&&rz(u.service,"Service")&&function(e,t,r="undefined"!=typeof location?location.origin:""){let n=e.allowedTrackingOrigins;if(!n)return!function(e,t=""){return!rU(e)&&rU(t.split(`
172`).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||"")}(r,t)||(C.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);let i=rD(n,r);return i||C.error("SDK initialized on a non-allowed domain."),i}(u,null!=c?c:"")?void 0===u.trackingConsent||ej(q,u.trackingConsent)?{beforeSend:u.beforeSend&&T(u.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:j?void 0:function(e){switch(e.sessionPersistence){case rg:return rx(e);case rm:return rO();case void 0:{let t=rx(e);return!t&&e.allowFallbackToLocalStorage&&(t=rO()),t}default:C.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}(u),sessionSampleRate:null!=(d=u.sessionSampleRate)?d:100,telemetrySampleRate:null!=(h=u.telemetrySampleRate)?h:20,telemetryConfigurationSampleRate:null!=(f=u.telemetryConfigurationSampleRate)?f:5,telemetryUsageSampleRate:null!=(p=u.telemetryUsageSampleRate)?p:5,service:null!=(g=u.service)?g:void 0,env:null!=(m=u.env)?m:void 0,version:null!=(v=u.version)?v:void 0,datacenter:null!=(y=u.datacenter)?y:void 0,silentMultipleInit:!!u.silentMultipleInit,allowUntrustedEvents:!!u.allowUntrustedEvents,trackingConsent:null!=(b=u.trackingConsent)?b:q.GRANTED,trackAnonymousUser:null==(w=u.trackA
172nonymousUser)||w,storeContextsAcrossPages:!!u.storeContextsAcrossPages,betaEncodeCookieOptions:!!u.betaEncodeCookieOptions,variant:u.variant,sdkVersion:u.sdkVersion,...function(e){var t,r;let n=e.site||eW,i="flutter"===(t=e.source)||"unity"===t?t:"browser",o={logsEndpointBuilder:rj(r={...e,site:n,source:i},"logs"),rumEndpointBuilder:rj(r,"rum"),profilingEndpointBuilder:rj(r,"profile"),sessionReplayEndpointBuilder:rj(r,"replay"),exposuresEndpointBuilder:rj(r,"exposures"),flagEvaluationEndpointBuilder:rj(r,"flagevaluation")};return{replica:function(e){if(!e.replica)return;let t={...e,site:eW,clientToken:e.replica.clientToken};return{logsEndpointBuilder:rj(t,"logs"),rumEndpointBuilder:rj(t,"rum",[`application.id=${e.replica.applicationId}`])}}({...e,site:n,source:i}),site:n,source:i,...o}}(u)}:void C.error('Tracking Consent should be either "granted" or "not-granted"'):void 0:void C.error("Allowed Tracking Origins must be an array"):void C.error("Client Token is not configured, we will not send any data.")),E=function(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return C.warn("allowedGraphQlUrls should be an array"),[];let t=[];
172return e.allowedGraphQlUrls.forEach(e=>{rN(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):e&&"object"==typeof e&&"match"in e&&rN(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}(e);if(!x)return;let O=null!=(r=e.sessionReplaySampleRate)?r:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:O,startSessionReplayRecordingManually:void 0!==e.startSessionReplayRecordingManually?!!e.startSessionReplayRecordingManually:0===O,traceSampleRate:null!=(n=e.traceSampleRate)?n:100,rulePsr:eg(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:k,excludedActivityUrls:null!=(i=e.excludedActivityUrls)?i:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(null==(o=e.trackUserInteractions)||o),trackViewsManually:!!e.trackViewsManually,trackResources:!!(null==(s=e.trackResources)||s),trackLongTasks:!!(null==(a=e.trackLongTasks)||a),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:ej(rB,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:rB.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:ej(rH,e.traceContextInjection)?e.traceContextInjection:rH.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:null!=(l=e.profilingSampleRate)?l:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:E,...x}}(e,n);if(h){if(!d&&!h.sessionStoreStrategyType)return void C.warn("No storage available for session. We will not send any data.");if(h.compressIntakeRequests&&!d&&t&&!(s=t(h,"Datadog RUM",G)))return;l=h,rr().subscribe(G),r.tryToInit(h.trackingConsent),g()}}let v=e=>{u.add(t=>t.addDurationVital(e))};return{init(t,r,n){var i;if(!t)return void C.error("Missing configuration");Array.isArray(i=t.enableExperimentalFeatures)&&i.filter(e=>ej(iZ,e)).forEach(e=>{eH.add(e)}),a=t,e&&rl()||(tX(t.plugins,"onInit",{initConfiguration:t,publicApi:r}),t.remoteConfigurationId?r5(t,{user:d,context:c}).then(e=>{e&&m(e,n)}).catch(N):m(t,n))},get initConfiguration(){return a},getInternalContext:G,stopSession:G,addTiming(e,t=ew()){u.add(r=>r.addTiming(e,t))},startView(e,t=ek()){let r=r=>{r.startView(e,t)};u.add(r),o||(o={options:e,callback:r},g())},setViewName(e){u.add(t=>t.setViewName(e))},setViewContext(e){u.add(t=>t.setViewContext(e))},setViewContextProperty(e,t){u.add(r=>r.setViewContextProperty(e,t))},getViewContext:()=>p,globalContext:c,userContext:d,accountContext:h,addAction(e){u.add(t=>t.addAction(e))},addError(e){u.add(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){u.add(r=>r.addFeatureFlagEvaluation(e,t))},startDurationVital:(e,t)=>tJ(n,e,t),stopDurationVital(e,t){tY(v,n,e,t)},addDurationVital:v,addOperationStepVital:(e,t,r,n)=>{u.add(i=>i.addOperationStepVital(eT(e),t,eT(r),eT(n)))}}}(n,i,o,(l,u,c)=>{var d,h;let f=u&&n.createDeflateEncoder?e=>n.createDeflateEncoder(l,u,e):eU,p=e(l,t,r,c,f,i,o,s,n.sdkName);return t.onRumStart(p.lifeCycle,l,p.session,p.viewHistory,u,p.telemetry),r.onRumStart(p.lifeCycle,p.hooks,l,p.session,p.viewHistory,p.longTaskContexts,f),d=a,h=p,a={init:e=>{tR("DD_RUM",e)},initConfiguration:d.initConfiguration,...h},tX(l.plugins,"onRumStart",{strategy:a,addEvent:p.addEvent}),p}),l=()=>a,u=P(e=>{a.startView("object"==typeof e?e:{name:e}),tw({feature:"start-view"})}),c=function(e){let t={version:"6.25.1",onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get:()=>A,enumerable:!1}),t}({init:e=>{let t=Error().stack;M(()=>a.init(e,c,t))},setTrackingConsent:P(e=>{i.update(e),tw({feature:"set-tracking-consent",tracking_consent:e})}),setViewName:P(e=>{a.setViewName(e),tw({feature:"set-view-name"})}),setViewContext:P(e=>{a.setViewContext(e),tw({feature:"set-view-context"})}),setViewContextProperty:P((e,t)=>{a.setViewContextProperty(e,t),tw({feature:"set-view-context-property"})}),getViewContext:P(()=>(tw({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:P(e=>a.getInternalContext(e)),getInitConfiguration:P(()=>eX(a.initConfiguration)),addAction:(e,t)=>{let r=eu("action");M(()=>{a.addAction({name:eT(e),context:eT(t),startClocks:ek(),type:tB,handlingStack:r}),tw({feature:"add-action"})})},addError:(e,t)=>
172{let r=eu("error");M(()=>{a.addError({error:e,handlingStack:r,context:eT(t),startClocks:ek()}),tw({feature:"add-error"})})},addTiming:P((e,t)=>{a.addTiming(eT(e),t)}),setGlobalContext:tS(l,tx,t_,"set-global-context"),getGlobalContext:tS(l,tx,tC,"get-global-context"),setGlobalContextProperty:tS(l,tx,tO,"set-global-context-property"),removeGlobalContextProperty:tS(l,tx,tI,"remove-global-context-property"),clearGlobalContext:tS(l,tx,tT,"clear-global-context"),setUser:tS(l,tk,t_,"set-user"),getUser:tS(l,tk,tC,"get-user"),setUserProperty:tS(l,tk,tO,"set-user-property"),removeUserProperty:tS(l,tk,tI,"remove-user-property"),clearUser:tS(l,tk,tT,"clear-user"),setAccount:tS(l,tE,t_,"set-account"),getAccount:tS(l,tE,tC,"get-account"),setAccountProperty:tS(l,tE,tO,"set-account-property"),removeAccountProperty:tS(l,tE,tI,"remove-account-property"),clearAccount:tS(l,tE,tT,"clear-account"),startView:u,stopSession:P(()=>{a.stopSession(),tw({feature:"stop-session"})}),addFeatureFlagEvaluation:P((e,t)=>{a.addFeatureFlagEvaluation(eT(e),eT(t)),tw({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:P(()=>t.getSessionReplayLink()),startSessionReplayRecording:P(e=>{t.start(e),tw({feature:"start-session-replay-recording",force:e&&e.force})}),stopSessionReplayRecording:P(()=>t.stop()),addDurationVital:P((e,t)=>{var r;tw({feature:"add-duration-vital"}),a.addDurationVital({name:eT(e),type:tq,startClocks:{relative:(r=t.startTime)-eE(),timeStamp:r},duration:t.duration,context:eT(t&&t.context),description:eT(t&&t.description)})}),startDurationVital:P((e,t)=>(tw({feature:"start-duration-vital"}),a.startDurationVital(eT(e),{context:eT(t&&t.context),description:eT(t&&t.description)}))),stopDurationVital:P((e,t)=>{tw({feature:"stop-duration-vital"}),a.stopDurationVital("string"==typeof e?eT(e):e,{context:eT(t&&t.context),description:eT(t&&t.description)})}),startFeatureOperation:P((e,t)=>{tw({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(e,"start",t)}),succeedFeatureOperation:P((e,t)=>{tw({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(e,"end",t)}),failFeatureOperation:P((e,t,r)=>{tw({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(e,"end",r,t)})});return c}(function(e,t,r,i,o,s,a,l,u){let c=[],h=new ne,p=iG();h.subscribe(13,e=>eJ("rum",e));let w=e=>{h.notify(14,{error:e}),tv("Error reported to customer",{"error.message":e.message})},x=new B(t=>{let{stop:r}=e5(e,window,["visibilitychange","freeze"],e=>{"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:e8.HIDDEN}):"freeze"===e.type&&t.notify({reason:e8.FROZEN})},{capture:!0}),n=e6(e,window,"beforeunload",()=>{t.notify({reason:e8.UNLOADING})}).stop;return()=>{r(),n()}}),E=x.subscribe(e=>{h.notify(11,e)});c.push(()=>E.unsubscribe());let _=function(e,t,r,i,o,s){let a=new B,{stop:l}=function(e,t,r,n,i){let o=[];if(e1()){let e=e0(),t=i.subscribe(t=>e.send("internal_telemetry",t));o.push(t.unsubscribe)}else{let s=[e.rumEndpointBuilder];e.replica&&e.site===e$&&s.push(e.replica.rumEndpointBuilder);let a=e9({encoder:n(4),request:to(s,t),flushController:tu({pageMayExitObservable:r,sessionExpireObservable:new B})});o.push(a.stop);let l=i.subscribe(a.add);o.push(l.unsubscribe)}return{stop:()=>o.forEach(e=>e())}}(t,i,o,s,a),{enabled:u,metricsEnabled:c}=function(e,t,r,i,o=1,s=15){var a;let l={},u=!tg.includes(t.site)&&ef(t.telemetrySampleRate),c={log:u,[th]:u&&ef(t.telemetryConfigurationSampleRate),[tf]:u&&ef(t.telemetryUsageSampleRate),metric:u&&ef(o)},d={is_local_file:(null==(a=U.location)?void 0:a.protocol)==="file:",is_worker:j},h=tm();return h.subscribe(({rawEvent:n,metricName:o})=>{if(o&&!c.metric||!c[n.type])return;let a=o||n.status||n.type,u=l[a];if(u||(u=l[a]=new Set),u.size>=s)return;let h=eO(n);if(u.has(h))return;let f=r.triggerHook(1,{startTime:ek().relative});if(f===tc)return;let p=function(e,r,n,i){let o={type:"telemetry",date:ek().timeStamp,service:r,version:"6.25.1",source:"browser",_dd:{format_version:2},telemetry:eQ(n,{runtime_env:i,connectivity:eZ(),sdk_setup:"npm"}),ddtags:eq(t).join(","),experimental_features:Array.from(eH)};return eQ(o,e)}(f,e,n,d);i.notify(p),eJ("telemetry",p),u.add(h)}),h.unbuffer(),n=ty,{enabled:u,metricsEnabled:c.metric}}(e,t,r,a);return{stop:l,enabled:u,metricsEnabled:c}}("browser-rum-sdk",e,p,w,x,o);c.push(_.stop);
172let O=e1()?function(){let e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:+!!function(e){let t=e0();return!!t&&t.getCapabilities().includes(e)}("records")};return{findTrackedSession:()=>e,expire:G,expireObservable:new B,setForcedReplay:G}}():function(e,t,r){let n=function(e,t,r,n){let i=new B,o=new B,s=function(e,t,r,n,i=function(e,t){return e.type===rg?function(e,t){let r={isLockEnabled:0===(null!=d?d:d=function(e=window){var t;let r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:(null==(t=e.navigator.vendor)?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}()),persistSession:r=>rE(t,e,r,rp),retrieveSession:()=>rC(t,e),expireSession:r=>rE(t,e,ry(r,e),rf)};if(!rs(rh)){let e=rs("_dd"),t=rs("_dd_r"),n=rs("_dd_l"),i={};e&&(i.id=e),n&&/^[01]$/.test(n)&&(i.logs=n),t&&/^[012]$/.test(t)&&(i.rum=t),eF(i)||(rw(i),r.persistSession(i))}return r}(t,e.cookieOptions):{isLockEnabled:!1,persistSession:rI,retrieveSession:rT,expireSession:e=>(function(e,t){rI(ry(e,t))})(e,t)}}(e,t)){let o,s=new B,a=new B,l=new B,u=K(function(){let e=i.retrieveSession();rb(e)?rA({process:e=>rb(e)?ry(e,t):void 0,after:f},i):f(e)},1e3);p();let{throttled:c,cancel:h}=Y(()=>{rA({process:e=>{if(eF(e))return;let t=f(e);return function(e){if(eF(e))return;let t=n(e.rum);e[r]=t,delete e.isExpired,"0"===t||e.id||(e.id=tV(),e.created=String(eb()))}(t),t},after:e=>{eF(e)||g()||(o=e,s.notify()),o=e}},i)},1e3);function f(e){var n;return rb(e)&&(e=ry(e,t)),g()&&((n=e,o.id!==n.id||o[r]!==n[r])?(o=ry(o,t),a.notify()):(l.notify({previousState:o,newState:e}),o=e)),e}function p(){rA({process:e=>{if(eF(e))return e.anonymousId=tV(),ry(e,t)},after:e=>{o=e}},i)}function g(){return(null==o?void 0:o[r])!==void 0}return{expandOrRenewSession:c,expandSession:function(){rA({process:e=>g()?f(e):void 0},i)},getSession:()=>o,renewObservable:s,expireObservable:a,sessionStateUpdateObservable:l,restartSession:p,expire:e=>{h(),!1===e&&o&&delete o.anonymousId,i.expireSession(o),f(ry(o,t))},stop:()=>{J(u)},updateSessionState:function(e){rA({process:t=>({...t,...e}),after:f},i)}}}(e.sessionStoreStrategyType,e,"rum",r);iN.push(()=>s.stop());let a=ni({expireDelay:rf});if(iN.push(()=>a.stop()),s.renewObservable.subscribe(()=>{a.add(l(),eS()),i.notify()}),s.expireObservable.subscribe(()=>{o.notify(),a.closeActive(eS())}),s.expandOrRenewSession(),a.add(l(),ex().relative),ez(iZ.SHORT_SESSION_INVESTIGATION)){let t=s.getSession();t&&function(e,t){if(!window.cookieStore||!t.created)return;let r=Number(t.created),n=eb(),{stop:i}=e6(e,cookieStore,"change",function(e){let o=e2(e.changed,e=>e.name===rh);if(!o)return;let s=eb()-r;if(s>84e4)i();else{let e=rk(o.value);if(e.id&&e.id!==t.id){i();let r=eb()-n;iL().then(n=>{tv("Session cookie changed",{time:r,session_age:s,old:t,new:e,cookie:n})}).catch(N)}}});iN.push(i)}(e,t)}function l(){let t=s.getSession();return t?{id:t.id,trackingType:t.rum,isReplayForced:!!t.forcedReplay,anonymousId:t.anonymousId}:(iD(e).catch(()=>void 0),{id:"invalid",trackingType:"0",isReplayForced:!1,anonymousId:void 0})}return n.observable.subscribe(()=>{n.isGranted()?s.expandOrRenewSession():s.expire(!1)}),function(e,t){let{stop:r}=e5(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0});iN.push(r)}(e,()=>{n.isGranted()&&s.expandOrRenewSession()}),function(e,t){let r=()=>{"visible"===document.visibilityState&&t()},{stop:n}=e6(e,document,"visibilitychange",r);iN.push(n);let i=K(r,6e4);iN.push(()=>{J(i)})}(e,()=>s.expandSession()),function(e,t){let{stop:r}=e6(e,window,"resume",t,{capture:!0});iN.push(r)}(e,()=>s.restartSession()),{findSession:(e,t)=>a.find(e,t),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}(e,"rum",t=>{var r,n,i;return r=e,"0"===(i=n=t)||"1"===i||"2"===i?n:ef(r.sessionSampleRate)?ef(r.sessionReplaySampleRate)?"1":"2":"0"},r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:e,newState:t})=>{if(!e.forcedReplay&&t.forcedReplay){let e=n.findSession();e&&(e.isReplayForced=!0)}}),{findTrackedSession:e=>{let t=n.findSession(e);if(t&&"0"!==t.trackingType)return{id:t.id,sessionReplay:"1"===t.trackingType?1:2*!!t.isReplayForced,anonymousId:t.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}(e,h,s);if(e1()){var I;let e=e0();h.subscribe(13,t=>{e.send("rum",t)})}else{let t=function(e,t,r,n,i,o){let s=[e.rumEndpointBuilder];e.replica&&s.push(e.replica.rumEndpointBuilder);let a=e9({encoder:o(2),request:to(s,r),flushController:tu({pageMayExitObservable:n,sessionExpireOb
172servable:i})});return t.subscribe(13,e=>{e.type===tN?a.upsert(e,e.view.id):a.add(e)}),a}(e,h,w,x,O.expireObservable,o);c.push(()=>t.stop()),I=t.flushController.flushObservable,_.metricsEnabled&&(iH(),y=!1,h.subscribe(13,()=>{y=!0}),I.subscribe(({bytesCount:e,messagesCount:t})=>{y&&(y=!1,v.batchCount+=1,iB(v.batchBytesCount,e),iB(v.batchMessagesCount,t))}),K(ij,1e4))}p.register(1,()=>s.isGranted()?td:tc);let{stop:T}=function(e,t){if(!t.metricsEnabled)return{stop:G};let{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:e})=>{var t,n;e.largestContentfulPaint&&e.navigationTimings&&(tb("Initial view metrics",{metrics:(t=e.largestContentfulPaint,n=e.navigationTimings,{lcp:{value:t.value},navigation:{domComplete:n.domComplete,domContentLoaded:n.domContentLoaded,domInteractive:n.domInteractive,firstByte:n.firstByte,loadEvent:n.loadEvent}})}),r())});return{stop:r}}(h,_);c.push(T);let{stop:R,...A}=function(e,t,r,n,i,o,s,a,l,u){var c,d,h,p,v,y;let w,x=[],E=function(){let e=function(){let e,t=window;if(t.Zone&&(e=V(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){let r=V(new t.MutationObserver(G),"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}();return new B(t=>{if(!e)return;let r=new e(P(e=>t.notify(e)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}(),_=(c=r,w={...d=location},new B(e=>{let{stop:t}=function(e,t){let{stop:r}=eh(iU("pushState"),"pushState",({onPostCall:e})=>{e(t)}),{stop:n}=eh(iU("replaceState"),"replaceState",({onPostCall:e})=>{e(t)}),{stop:i}=e6(e,window,"popstate",t);return{stop:()=>{r(),n(),i()}}}(c,n),{stop:r}=e6(c,window,"hashchange",n);function n(){if(w.href===d.href)return;let t={...d};e.notify({newLocation:t,oldLocation:w}),w=t}return()=>{t(),r()}})),{observable:O,stop:I}=function(){let e=new B,{stop:t}=eh(window,"open",()=>e.notify());return{observable:e,stop:t}}();x.push(I),t.register(0,({eventType:e})=>{var t;let n=r.source;return{type:e,_dd:{format_version:2,drift:Math.round(eb()-(t=eE(),t+performance.now())),configuration:{session_sample_rate:ep(r.sessionSampleRate,3),session_replay_sample_rate:ep(r.sessionReplaySampleRate,3),profiling_sample_rate:ep(r.profilingSampleRate,3),trace_sample_rate:ep(r.traceSampleRate,3),beta_encode_cookie_options:r.betaEncodeCookieOptions},browser_sdk_version:e1()?"6.25.1":void 0,sdk_name:l},application:{id:r.applicationId},date:ew(),source:n}}),t.register(1,()=>({application:{id:r.applicationId}}));let T=function(e,t,r=500){let n,i=ni({expireDelay:rf,maxEntries:4e3});nC(i0.VISIBILITY_STATE)&&performance.getEntriesByType(i0.VISIBILITY_STATE).forEach(e=>{s("hidden"===e.name?"hidden":"active",e.startTime)}),s(iz(),eS());let{stop:o}=e5(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],e=>{var t;s("freeze"===(t=e).type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":iz(),e.timeStamp)},{capture:!0});function s(e,t=eS()){e!==n&&(n=e,i.closeActive(t),i.add({state:n,startTime:t},t))}function a(e,t,r){return i.findAll(t,r).some(t=>t.state===e)}return e.register(0,({startTime:e,duration:t=0,eventType:n})=>n===tN?{type:n,_dd:{page_states:function(e,t,r){if(0!==e.length)return e.slice(-r).reverse().map(({state:e,startTime:r})=>({state:e,start:ey(r-t)}))}(i.findAll(e,t),e,r)}}:n===tA||n===tP?{type:n,view:{in_foreground:a("active",e,0)}}:td),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{o(),i.stop()}}}(t,r);x.push(()=>T.stop());let R=function(e){let t=ni({expireDelay:rf});return e.subscribe(1,e=>{var r;t.add({service:(r=e).service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks},e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let r=t.find(e.startClocks.relative);r&&(e.name&&(r.name=e.name),e.context&&(r.context=e.context),r.sessionIsActive=e.sessionIsActive)}),e.subscribe(10,()=>{t.reset()}),{findView:e=>t.find(e),stop:()=>{t.stop()}}}(e);x.push(()=>R.stop());let A=function(e,t,r,n){let i,o=ni({expireDelay:rf});e.subscribe(1,({startClocks:e})=>{let t=n.href;o.add(a({url:t,referrer:i||document.referrer}),e.relative),i=t}),e.subscribe(6,({endClocks:e})=>{o.closeActive(e.relative)});let s=r.subscribe(({newLocation:e})=>
172{let t=o.find();if(t){let r=eS();o.closeActive(r),o.add(a({url:e.href,referrer:t.referrer}),r)}});function a({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(0,({startTime:e,eventType:t})=>{let r=o.find(e);return r?{type:t,view:{url:r.url,referrer:r.referrer}}:tc}),{findUrl:e=>o.find(e),stop:()=>{s.unsubscribe(),o.stop()}}}(e,t,_,location);x.push(()=>A.stop());let N=function(e,t,r){let n=ni({expireDelay:rf});return e.subscribe(1,({startClocks:e})=>{n.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{n.closeActive(e.relative)}),t.register(0,({startTime:e,eventType:t})=>{if(!r.trackFeatureFlagsForEvents.concat([tN,tP]).includes(t))return td;let i=n.find(e);return!i||eF(i)?td:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let r=n.find();r&&(r[e]=t)}}}(e,t,r);t.register(0,({eventType:e,startTime:t})=>{let r,o,s,a=n.findTrackedSession(t),l=R.findView(t);return a&&l?(e===tN?(r=!!i.getReplayStats(l.id)||void 0,o=1===a.sessionReplay,s=!!l.sessionIsActive&&void 0):r=!!i.isRecording()||void 0,{type:e,session:{id:a.id,type:"user",has_replay:r,sampled_for_replay:o,is_active:s}}):tc}),t.register(1,({startTime:e})=>{let t=n.findTrackedSession(e);return t?{session:{id:t.id}}:td}),t.register(0,({eventType:e})=>({type:e,connectivity:eZ()}));let D=function(e,t,r,n){let i=t6();return t.storeContextsAcrossPages&&t1(t,i,"rum",2),e.register(0,()=>{let e=i.getContext();return n?{context:e}:e}),i}(t,r,0,!0),L=function(e,t,r,n){let i=t5();return t.storeContextsAcrossPages&&t1(t,i,"rum",1),e.register(0,({eventType:e,startTime:n})=>{let o=i.getContext(),s=r.findTrackedSession(n);return(s&&s.anonymousId&&!o.anonymous_id&&t.trackAnonymousUser&&(o.anonymous_id=s.anonymousId),eF(o))?td:{type:e,usr:o}}),e.register(1,({startTime:e})=>{var t;return{anonymous_id:null==(t=r.findTrackedSession(e))?void 0:t.anonymousId}}),i}(t,r,n,0),U=function(e,t,r){let n=t8();return t.storeContextsAcrossPages&&t1(t,n,"rum",4),e.register(0,()=>{let e=n.getContext();return eF(e)||!e.id?td:{account:e}}),n}(t,r,0),j=function(e,t,r,n,i){let{unsubscribe:o}=e.subscribe(0,t=>{e.notify(12,ii(t))});t.register(0,({startTime:e,eventType:t})=>{if(t!==tP&&t!==tD&&t!==tM)return td;let r=s.findActionId(e);return r?{type:t,action:{id:r}}:td}),t.register(1,({startTime:e})=>({action:{id:s.findActionId(e)}}));let s={findActionId:G},a=G;return i.trackUserInteractions&&({actionContexts:s,stop:a}=function(e,t,r,n){let i,o=ni({expireDelay:ir}),s=new B;e.subscribe(10,()=>{o.reset()}),e.subscribe(5,u),e.subscribe(11,e=>{e.reason===e8.UNLOADING&&u()});let{stop:a}=function(e,{onPointerDown:t,onPointerUp:r}){let n,i,o={selection:!1,input:!1,scroll:!1},s=[e6(e,window,"pointerdown",e=>{n9(e)&&(n=n8(),o={selection:!1,input:!1,scroll:!1},i=t(e))},{capture:!0}),e6(e,window,"selectionchange",()=>{n&&n8()||(o.selection=!0)},{capture:!0}),e6(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),e6(e,window,"pointerup",e=>{if(n9(e)&&i){let t=o;r(i,e,()=>t),i=void 0}},{capture:!0}),e6(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{s.forEach(e=>e.stop())}}}(n,{onPointerDown:i=>(function(e,t,r,n,i){var o;let s;if((s=e.enablePrivacyForActionName?nY(n.target,e.defaultPrivacyLevel):n$.ALLOW)===n$.HIDDEN)return;let a=function(e,t,r){let n=e.target.getBoundingClientRect(),i=nj(e.target,r.actionNameAttribute);i&&it(e.timeStamp,i);let{name:o,nameSource:s}=function(e,t,r=n$.ALLOW){let n=new Map,{actionNameAttribute:i}=t,o=nQ(e,nM)||i&&nQ(e,i);return o?{name:o,nameSource:"custom_attribute"}:r===n$.MASK?{name:nN,nameSource:"mask_placeholder"}:n1(e,nZ,t,n)||n1(e,n0,t,n)||{name:"",nameSource:"blank"}}(e.target,r,t);return{type:"click",target:{width:Math.round(n.width),height:Math.round(n.height),selector:i},position:{x:Math.round(e.clientX-n.left),y:Math.round(e.clientY-n.top)},name:o,nameSource:s}}(n,s,e),l=!1;return o=e=>{l=e.hadActivity},nT(nR(t,r,i,e),o,100),{clickActionBase:a,hadActivityOnPointerDown:()=>l}})(n,e,t,i,r),onPointerUp:({clickActionBase:i,hadActivityOnPointerDown:a},u,c)=>{!function(e,t,r,n,i,o,s,a,l,u,c){var d,h;let f=function e(t,r,n,i,o){let s,a=tV(),l=ev(o.timeStamp),u=r.add(a,l.relative),c=nx({lifeCycle:t,isChildEvent:e=>void 0!==e.action&&(Array.isArray(e.action.id)?e.action.id.includes(a):e.action.id===a)}),d=0,h=[],f=new B;function p(e){0===d&&((d=1,s=e)?u.close(s-eE()):u.remove(),c.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==s},getUserActivity:n,addFrustration:e=>{h.push(e)},startClocks:l,isStopped:()=>1===d||2===d,clone:()=>e(t,r,n,i,o),validate:e=>{var r;if(p(),1!==d)return;let{resourceCount:n,errorCount:u,longTaskCount:f}=c.eventCounts,g={duration:s&&(r=l.timeStamp,s-r),startClocks:l,id:a,frustrationTypes:h,counts:{resourceCount:n,errorCount:u,longTaskCount:f},events:null!=e?e:[o],event:o,...i};t.notify(0,g),d=2},discard:()=>{p(),d=2}}}(t,i,u,a,l);s(f);let p=null==(d=null==a?void 0:a.target)?void 0:d.selector;p&&it(l.timeStamp,p);let{stop:g}=(h=e=>{e.hadActivity&&e.end<f.startClocks.timeStamp?f.discard():e.hadActivity?f.stop(e.end):c()?f.stop(f.startClocks.timeStamp):f.stop()},nT(nR(t,r,n,e),h,1e4)),m=t.subscribe(5,({endClocks:e})=>{f.stop(e.timeStamp)}),v=o.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{m.unsubscribe(),g(),v.unsubscribe()})}(n,e,t,r,o,s,l,i,u,c,a)}});return{stop:()=>{u(),s.notify(),a()},actionContexts:{findActionId:e=>o.findAll(e)}};function l(e){if(!i||!i.tryAppend(e)){let t=e.clone();i=function(e,t){let r,n=[],i=0;function o(e){e.stopObservable.subscribe(s),n.push(e),W(r),r=$(a,1e3)}function s(){1===i&&n.every(e=>e.isStopped())&&(i=2,t(n))}function a(){W(r),0===i&&(i=1,s())}return o(e),{tryAppend:e=>{var t,r,s,l;return 0===i&&(!(n.length>0)||(t=n[n.length-1].event,r=e.event,t.target===r.target&&100>=(s=t,l=r,Math.sqrt(Math.pow(s.clientX-l.clientX,2)+Math.pow(s.clientY-l.clientY,2)))&&t.timeStamp-r.timeStamp<=1e3)?(o(e),
172!0):(a(),!1))},stop:()=>{a()}}}(e,e=>{(function(e,t){let{isRage:r}=function(e,t){if(function(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+3-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}(e))return t.addFrustration("rage_click"),e.some(n7)&&t.addFrustration(tz),t.hasError&&t.addFrustration(tH),{isRage:!0};let r=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(tH),n7(e)&&!r&&e.addFrustration(tz)}),{isRage:!1}}(e,t);r?(e.forEach(e=>e.discard()),t.stop(ew()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))})(e,t),i=void 0})}}function u(){i&&i.stop()}}(e,r,n,i)),{addAction:t=>{e.notify(12,ii(t))},actionContexts:s,stop:()=>{o(),a()}}}(e,t,E,O,r);x.push(j.stop);let F={addEvent:(t,r,n,i)=>{iX.includes(r.type)&&e.notify(12,{startTime:t,rawRumEvent:r,domainContext:n,duration:i})}},z=function(e,t){var r;let n,i=requestAnimationFrame(P(()=>{n=iR()})),o=(!m&&(r=t,m=new B(e=>{let{throttled:t}=Y(()=>{e.notify(iR())},200);return e6(r,window,"resize",t,{capture:!0,passive:!0}).stop})),m).subscribe(e=>{n=e}).unsubscribe;return e.register(0,({eventType:e})=>({type:e,display:n?{viewport:n}:void 0})),{stop:()=>{o(),i&&cancelAnimationFrame(i)}}}(t,r);x.push(z.stop);let q=function(e,t,r=function(e,t){let r=window.cookieStore?function(e){return(t,r)=>e6(e,window.cookieStore,"change",e=>{let n=e.changed.find(e=>e.name===t)||e.deleted.find(e=>e.name===t);n&&r(n.value)}).stop}(e):iq;return new B(e=>r(t,t=>e.notify(t)))}(e,iV)){var n;let i=rs(iV)||(null==(n=window.Cypress)?void 0:n.env("traceId")),o=r.subscribe(e=>{i=e});return t.register(0,({eventType:e})=>"string"!=typeof i?td:{type:e,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop:()=>{o.unsubscribe()}}}(r,t);x.push(q.stop),t.register(0,({eventType:e})=>rd()?{type:e,session:{type:"synthetics"},synthetics:{test_id:ru(),result_id:rc(),injected:rl()}}:td),b={[tN]:{"view.performance.lcp.resource_url":"string",...iJ,...iK,...iY},[tP]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...iJ,...iK,...iY},[tD]:{"resource.url":"string","resource.graphql.variables":"string",...iJ,...iK,...iY},[tA]:{"action.target.name":"string",...iJ,...iK,...iY},[tM]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...iJ,...iK,...iY},[tL]:{...iJ,...iK,...iY}};let Q={[tP]:i$(tP,u,void 0),[tA]:i$(tA,u,y),[tL]:i$(tL,u,y)};e.subscribe(12,({startTime:n,duration:i,rawRumEvent:o,domainContext:s})=>{let a=t.triggerHook(0,{eventType:o.type,startTime:n,duration:i});if(a===tc)return;let l=eQ(a,o,{ddtags:eq(r).join(",")});(function(e,t,r,n){var i;if(t){let n=function(e,t,r){let n=eX(e),i=r(n);return e4(t).forEach(([t,r])=>(function e(t,r,n,i){let[o,...s]=n;if("[]"===o){Array.isArray(t)&&Array.isArray(r)&&t.forEach((t,n)=>e(t,r[n],s,i));return}if(iW(t)&&iW(r)){if(s.length>0)return e(t[o],r[o],s,i);var a=t,l=o,u=r[o],c=i;let n=eY(u);n===c?a[l]=eT(u):"object"===c&&("undefined"===n||"null"===n)&&(a[l]={})}})(e,n,t.split(/\.|(?=\[\])/),r)),i}(e,b[e.type],e=>t(e,r));if(!1===n&&e.type!==tN)return!1;!1===n&&C.warn("Can't dismiss view events using beforeSend!")}return!(null==(i=n[e.type])?void 0:i.isLimitReached())}
172)(l,r.beforeSend,s,Q)&&(eF(l.context)&&delete l.context,e.notify(13,l))});let{addTiming:Z,startView:ee,setViewName:et,setViewContext:er,setViewContextProperty:en,getViewContext:ei,stop:eo}=(h=location,e.subscribe(4,t=>e.notify(12,function(e,t,r){var n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w;let S=r.getReplayStats(e.id),k=null==(i=null==(n=e.commonViewMetrics)?void 0:n.cumulativeLayoutShift)?void 0:i.devicePixelRatio,x={_dd:{document_version:e.documentVersion,replay_stats:S,cls:k?{device_pixel_ratio:k}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:tN,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:null==(o=e.commonViewMetrics.cumulativeLayoutShift)?void 0:o.value,cumulative_layout_shift_time:ey(null==(s=e.commonViewMetrics.cumulativeLayoutShift)?void 0:s.time),cumulative_layout_shift_target_selector:null==(a=e.commonViewMetrics.cumulativeLayoutShift)?void 0:a.targetSelector,first_byte:ey(null==(l=e.initialViewMetrics.navigationTimings)?void 0:l.firstByte),dom_complete:ey(null==(u=e.initialViewMetrics.navigationTimings)?void 0:u.domComplete),dom_content_loaded:ey(null==(c=e.initialViewMetrics.navigationTimings)?void 0:c.domContentLoaded),dom_interactive:ey(null==(d=e.initialViewMetrics.navigationTimings)?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:ey(e.initialViewMetrics.firstContentfulPaint),first_input_delay:ey(null==(h=e.initialViewMetrics.firstInput)?void 0:h.delay),first_input_time:ey(null==(f=e.initialViewMetrics.firstInput)?void 0:f.time),first_input_target_selector:null==(p=e.initialViewMetrics.firstInput)?void 0:p.targetSelector,interaction_to_next_paint:ey(null==(g=e.commonViewMetrics.interactionToNextPaint)?void 0:g.value),interaction_to_next_paint_time:ey(null==(m=e.commonViewMetrics.interactionToNextPaint)?void 0:m.time),interaction_to_next_paint_target_selector:null==(v=e.commonViewMetrics.interactionToNextPaint)?void 0:v.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:ey(null==(y=e.initialViewMetrics.largestContentfulPaint)?void 0:y.value),largest_contentful_paint_target_selector:null==(b=e.initialViewMetrics.largestContentfulPaint)?void 0:b.targetSelector,load_event:ey(null==(w=e.initialViewMetrics.navigationTimings)?void 0:w.loadEvent),loading_time:nk(ey(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:function({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:ey(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:ey(r)},fid:n&&{duration:ey(n.delay),timestamp:ey(n.time),target_selector:n.targetSelector},inp:t&&{duration:ey(t.value),timestamp:ey(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:ey(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl}}}(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:ey(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:ey(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:function(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}()}};return eF(e.customTimings)||(x.view.custom_timings=eB(e.customTimings,ey)),{rawRumEvent:x,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}(t,r,i))),t.register(0,({startTime:e,eventType:t})=>{let r=R.findView(e);return r?{type:t,service:r.service,version:r.version,context:r.context,view:{id:r.id,name:r.name}}:tc}),t.register(1,({startTime:e})=>{var t;return{view:{id:null==(t=R.findView(e))?void 0:t.id}}}),function(e,t,r,n,i,o,s,a){let l,u,c=new Set,d=h(tU,ex(),a);function h(o,s,a){let l=function(e,t,r,n,i,o,s=ek(),a){var l;let u,c=tV(),d=new B,h={},f=0,p={...i},m=t4(),v=!0,y=null==a?void 0:a.name,b=(null==a?void 0:a.service)||n.service,w=(null==a?void 0:a.version)||n.version,S=null==a?void 0:a.context;S&&m.setContext(S);let k={id:c,name:y,startClocks:s,service:b,version:w,context:S};e.notify(1,k),e.notify(2,k);let{throttled:x,cancel:E}=Y(H,3e3,{leading:!1}),{setLoadEvent:_,setViewEnd:O,stop:I,stopINPTracking:T,getCommonViewMetrics:R}=function(e,t,r,n,i,o,s){let a={},{stop:l,setLoadEvent:u}=function(e,t,r,n,i,o,s){var a;let l=i===tU,u=!0,c=[],d=ik(n,o);function h(){if(!u&&!l&&c.length>0){let e=Math.max(...c);e<d.timeStamp-o.relative&&s(e)}}let{stop:f}=(a=e=>{if(u){var t;u=!1,e.hadActivity&&c.push((t=o.timeStamp,e.end-t)),h()}},nT(nR(e,t,r,n),a,void 0));return{stop:()=>{f(),d.stop()}
172,setLoadEvent:e=>{l&&(l=!1,c.push(e),h())}}}(e,t,r,n,o,s,e=>{a.loadingTime=e,i()}),{stop:c}=function(e,t,r,n=function(e,t=1e3){return new B(r=>{if(window.ResizeObserver){let n=Y(function(){r.notify(function(){let e=function(){let e=window.visualViewport;return Math.round(e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0)}(),{height:t}=iR();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}())},t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver(P(n.throttled));i&&o.observe(i);let s=e6(e,window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),o.disconnect(),s.stop()}}})}(e)){let i=0,o=0,s=0,a=n.subscribe(({scrollDepth:e,scrollTop:n,scrollHeight:a})=>{let l=!1;(e>i&&(i=e,l=!0),a>o)&&(o=a,s=eS()-t.relative,l=!0);l&&r({maxDepth:Math.min(i,o),maxDepthScrollTop:n,maxScrollHeight:o,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}(n,s,e=>{a.scroll=e}),{stop:d}=function(e,t,r){let n,i,o,s,a;if(!(nC(i0.LAYOUT_SHIFT)&&"WeakRef"in window))return{stop:G};let l=0;r({value:0});let u=(s=0,a=0,{update:e=>{let t;return void 0===i||e.startTime-o>=1e3||e.startTime-i>=5e3?(i=o=e.startTime,a=s=e.value,t=!0):(s+=e.value,o=e.startTime,(t=e.value>a)&&(a=e.value)),{cumulatedValue:s,isMaxValue:t}}}),c=nE(e,{type:i0.LAYOUT_SHIFT,buffered:!0}).subscribe(i=>{var o;for(let s of i){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:i,isMaxValue:a}=u.update(s);if(a){let e=function(e){let t;for(let r of e)if(r.node&&nO(r.node)){let e=ix(r);(!t||ix(t)<e)&&(t=r)}return t}(s.sources);n={target:(null==e?void 0:e.node)?new WeakRef(e.node):void 0,time:s.startTime-t,previousRect:null==e?void 0:e.previousRect,currentRect:null==e?void 0:e.currentRect,devicePixelRatio:window.devicePixelRatio}}if(i>l){l=i;let t=null==(o=null==n?void 0:n.target)?void 0:o.deref();r({value:ep(l,4),targetSelector:t&&nj(t,e.actionNameAttribute),time:null==n?void 0:n.time,previousRect:(null==n?void 0:n.previousRect)?iE(n.previousRect):void 0,currentRect:(null==n?void 0:n.currentRect)?iE(n.currentRect):void 0,devicePixelRatio:null==n?void 0:n.devicePixelRatio})}}});return{stop:()=>{c.unsubscribe()}}}(n,s.relative,e=>{a.cumulativeLayoutShift=e,i()}),{stop:h,getInteractionToNextPaint:f,setViewEnd:p}=function(e,t,r){let n,i;if(!(nC(i0.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>void 0,setViewEnd:G,stop:G};let{getViewInteractionCount:o,stopViewInteractionCount:s}=function(e){"interactionCount"in performance||g||(g=new window.PerformanceObserver(P(e=>{e.getEntries().forEach(e=>{e.interactionId&&(i_=Math.min(i_,e.interactionId),iC=((iO=Math.max(iO,e.interactionId))-i_)/7+1)})}))).observe({type:"event",buffered:!0,durationThreshold:0});let t=e===tU?0:iI(),r={stopped:!1};return{getViewInteractionCount:()=>r.stopped?r.interactionCount:iI()-t,stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:iI()-t}}}}(r),a=1/0,l=function(e){let t=[];function r(){t.sort((e,t)=>t.duration-e.duration).splice(10)}return{process(e){let n=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];-1!==n?e.duration>t[n].duration&&(t[n]=e,r()):(t.length<10||e.duration>i.duration)&&(t.push(e),r())},estimateP98Interaction(){let r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}(o),u=-1;function c(r){for(let e of r)e.interactionId&&e.startTime>=t&&e.startTime<=a&&l.process(e);let o=l.estimateP98Interaction();o&&o.duration!==u&&(u=o.duration,i=o.startTime-t,!(n=function(e){let t=ie.get(e);return ie.delete(e),t}(o.startTime))&&o.target&&nO(o.target)&&(n=nj(o.target,e.actionNameAttribute)))}let d=nE(e,{type:i0.FIRST_INPUT,buffered:!0}).subscribe(c),h=nE(e,{type:i0.EVENT,durationThreshold:40,buffered:!0}).subscribe(c);return{getInteractionToNextPaint:()=>u>=0?{value:Math.min(u,iT),targetSelector:n,time:i}:o()?{value:0}:void 0,setViewEnd:e=>{a=e,s()},stop:()=>{h.unsubscribe(),d.unsubscribe()}}}(n,s.relative,o);return{stop:()=>
172{l(),d(),c()},stopINPTracking:h,setLoadEvent:u,setViewEnd:p,getCommonViewMetrics:()=>(a.interactionToNextPaint=f(),a)}}(e,t,r,n,F,o,s),{stop:A,initialViewMetrics:M}=o===tU?function(e,t,r,n){var i;let o={},{stop:s}=function(e,t,r=iv){let n;var i=e,o=()=>{var e;let n=r();n.loadEventEnd<=0||t({domComplete:(e=n).domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=eS()?e.responseStart:void 0})};let{stop:s}=ih(i,"complete",()=>{n=$(()=>o())});return{stop:()=>{s(),W(n)}}}(e,e=>{r(e.loadEvent),o.navigationTimings=e,n()}),a=ik(e,t),{stop:l}=(i=e=>{o.firstContentfulPaint=e,n()},{stop:nE(e,{type:i0.PAINT,buffered:!0}).subscribe(e=>{let t=e.find(e=>"first-contentful-paint"===e.name&&e.startTime<a.timeStamp&&e.startTime<iw);t&&i(t.startTime)}).unsubscribe}),{stop:u}=function(e,t,r,n){let i=1/0,{stop:o}=e5(e,r,["pointerdown","keydown"],e=>{i=e.timeStamp},{capture:!0,once:!0}),s=0,a=nE(e,{type:i0.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(r=>{let o=e2(r,e=>e.entryType===i0.LARGEST_CONTENTFUL_PAINT&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<iS&&e.size>s);if(o){var a;let t;o.element&&(t=nj(o.element,e.actionNameAttribute)),n({value:o.startTime,targetSelector:t,resourceUrl:""===(a=o).url?void 0:a.url}),s=o.size}}
172);return{stop:()=>{o(),a.unsubscribe()}}}(e,a,window,e=>{o.largestContentfulPaint=e,n()}),{stop:c}=function(e,t,r){let n=nE(e,{type:i0.FIRST_INPUT,buffered:!0}).subscribe(n=>{let i=n.find(e=>e.startTime<t.timeStamp);if(i){var o;let t,n=(o=i.startTime,i.processingStart-o);i.target&&nO(i.target)&&(t=nj(i.target,e.actionNameAttribute)),r({delay:n>=0?n:0,time:i.startTime,targetSelector:t})}});return{stop:()=>{n.unsubscribe()}}}(e,a,e=>{o.firstInput=e,n()});return{stop:function(){s(),l(),u(),c(),a.stop()},initialViewMetrics:o}}(n,s,_,F):{stop:G,initialViewMetrics:{}};o===tF&&(l=s.relative,requestAnimationFrame(()=>{requestAnimationFrame(()=>{(e=>{M.firstContentfulPaint=e,M.largestContentfulPaint={value:e},F()})(eS()-l)})}));let{stop:N,eventCounts:D}=function(e,t,r){let{stop:n,eventCounts:i}=nx({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:r});return{stop:n,eventCounts:i}}(e,c,F),L=K(H,iA),U=e.subscribe(11,e=>{e.reason===e8.UNLOADING&&H()});function j(){e.notify(3,{id:c,name:y,context:m.getContext(),startClocks:s,sessionIsActive:v})}function F(){j(),x()}function H(){E(),j(),f+=1;let t=void 0===u?ew():u.timeStamp;e.notify(4,{customTimings:h,documentVersion:f,id:c,name:y,service:b,version:w,context:m.getContext(),loadingType:o,location:p,startClocks:s,commonViewMetrics:R(),initialViewMetrics:M,duration:t-s.timeStamp,isActive:void 0===u,sessionIsActive:v,eventCounts:D})}return H(),m.changeObservable.subscribe(F),{get name(){return y},service:b,version:w,contextManager:m,stopObservable:d,end(t={}){var r,n;u||(u=null!=(r=t.endClocks)?r:ek(),v=null==(n=t.sessionIsActive)||n,e.notify(5,{endClocks:u}),e.notify(6,{endClocks:u}),J(L),O(u.relative),I(),U.unsubscribe(),H(),$(()=>{this.stop()},iP))},stop(){A(),N(),T(),d.notify()},addTiming(e,t){if(u)return;let r=t<em?t:t-s.timeStamp;h[function(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&C.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}(e)]=r,F()},setViewName(e){y=e,H()}}}(t,r,n,i,e,o,s,a);return c.add(l),l.stopObservable.subscribe(()=>{c.delete(l)}),l}return t.subscribe(10,()=>{d=h(tj,void 0,{name:d.name,service:d.service,version:d.version,context:d.contextManager.getContext()})}),t.subscribe(9,()=>{d.end({sessionIsActive:!1})}),s&&(u=o.subscribe(({oldLocation:e,newLocation:t})=>{var r,n;r=e,n=t,(r.pathname!==n.pathname||!function(e){let t=e.substring(1);return""!==t&&!!document.getElementById(t)}(n.hash)&&iM(n.hash)!==iM(r.hash))&&(d.end(),d=h(tj))}),i.trackBfcacheViews&&(l=function(e,t){let{stop:r}=e6(e,window,"pageshow",e=>{e.persisted&&t(e)},{capture:!0});return r}(i,e=>{d.end(),d=h(tF,ev(e.timeStamp),void 0)}))),{addTiming:(e,t=ew())=>{d.addTiming(e,t)},startView:(e,t)=>{d.end({endClocks:t}),d=h(tj,t,e)},setViewContext:e=>{d.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{d.contextManager.setContextProperty(e,t)},setViewName:e=>{d.setViewName(e)},getViewContext:()=>d.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l&&l(),d.end(),c.forEach(e=>e.stop())}}}(h,e,E,O,r,_,!r.trackViewsManually,o));x.push(eo);let{stop:es}=function(e,t,r,n=function(){let e=[];function t(t){let n;if(t.didTimeout){let e=performance.now();n=()=>30-(performance.now()-e)}else n=t.timeRemaining.bind(t);for(;n()>0&&e.length;)e.shift()();e.length&&r()}function r(){!function(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let r=window.requestIdleCallback(P(e),t);return()=>window.cancelIdleCallback(r)}!function(e){let t=eb(),r=$(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(eb()-t))})}
172,0)}(e)}(t,{timeout:1e3})}return{push(t){1===e.push(t)&&r()},stop(){e.length=0}}}(),i=function(e,t,r=iv){ih(e,"interactive",()=>{let e=r(),n=Object.assign(e.toJSON(),{entryType:i0.RESOURCE,initiatorType:nc,duration:e.responseEnd,traceId:function(e){let t=function(e){let t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return ig(t&&t.content,r&&r.content)}(e)||function(e){let t=function(e){for(let t=0;t<e.childNodes.length;t+=1){let r=im(e.childNodes[t]);if(r)return r}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){let r=e.body.childNodes[t],n=im(r);if(n)return n;if(!n_(r))break}}(e);if(t)return ig(tW(t,"trace-id"),tW(t,"trace-time"))}(e);if(!(!t||t.traceTime<=eb()-ip))return t.traceId}(document),toJSON:()=>({...n,toJSON:void 0})});t(n)})}){let o,s=t.trackEarlyRequests;s?o=function(e){let t=new Set,r=e.subscribe(8,e=>{t.add(e),t.size>1e3&&(tv("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(e){let r,n=1/0;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){r.unsubscribe()}}}(e):e.subscribe(8,e=>{l(()=>{var n,i,o;return n=e,i=t,o=r,ib(function(e){if(!performance||!("getEntriesByName"in performance))return;let t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;let r=t.filter(e=>!ic.has(e)).filter(e=>np(e)&&ng(e)).filter(t=>{var r,n,i;return r=t,n=e.startClocks.relative,i=id({startTime:e.startClocks.relative,duration:e.duration}),r.startTime>=n-1&&id(r)<=i+1});if(1===r.length)return ic.add(r[0]),r[0].toJSON()}(n),n,o,i)})});let a=nE(t,{type:i0.RESOURCE,buffered:!0}).subscribe(e=>{for(let n of e)(s||!nf(n))&&l(()=>iy(n,t,r,o))});function l(t){n.push(()=>{let r=t();r&&e.notify(12,r)})}return i(t,e=>{l(()=>iy(e,t,r,o))}),{stop:()=>{n.stop(),a.unsubscribe()}}}(e,r,T);x.push(es);let{stop:ea,longTaskContexts:el}=function(e,t){let r=ni({expireDelay:rf}),n=nC(i0.LONG_ANIMATION_FRAME)?i0.LONG_ANIMATION_FRAME:i0.LONG_TASK,i=nE(t,{type:n,buffered:!0}).subscribe(i=>{for(let o of i){if(!t.trackLongTasks)break;let i=ev(o.startTime),s=tV(),a=function(e,t,r){let n={date:t.timeStamp,type:tM,_dd:{discarded:!1}};return e.entryType===i0.LONG_TASK?{...n,long_task:{id:r,entry_type:"long-task",duration:ey(e.duration)}}:{...n,long_task:{id:r,entry_type:"long-animation-frame",duration:ey(e.duration),blocking_duration:ey(e.blockingDuration),first_ui_event_timestamp:ey(e.firstUIEventTimestamp),render_start:ey(e.renderStart),style_and_layout_start:ey(e.styleAndLayoutStart),start_time:ey(e.startTime),scripts:e.scripts.map(e=>({duration:ey(e.duration),pause_duration:ey(e.pauseDuration),forced_style_and_layout_duration:ey(e.forcedStyleAndLayoutDuration),start_time:ey(e.startTime),execution_start:ey(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}(o,i,s);e.notify(12,{rawRumEvent:a,startTime:i.relative,duration:o.duration,domainContext:{performanceEntry:o}}),r.add({id:s,startClocks:i,duration:o.duration,entryType:n},i.relative),r.closeActive(i.relative+o.duration)}});return{stop:()=>{i.unsubscribe(),r.stop()},longTaskContexts:{findLongTasks:e=>r.findAll(e)}}}(e,r);x.push(ea);let{addError:ec}=function(e,t,r){var n,i,o,s;let a=new B;return r.subscribe(e=>{0===e.type&&a.notify(e.error)}),n=a,H(...[S.error].map(e=>{var t;return is[e]||(is[e]=(t=e,new B(e=>{let r=k[t];return k[t]=(...n)=>{r.apply(console,n);let i=eu("console error");M(()=>{e.notify(function(e,t,r){let n=e.map(e=>{var t;
172return"string"==typeof(t=e)?eT(t):eD(t)?ed(X(t)):eO(eT(t),void 0,2)}).join(" ");if(t===S.error){let i=eN({originalError:e.find(eD),handlingStack:r,startClocks:ek(),source:"console",handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=n,{api:t,message:n,handlingStack:r,error:i}}return{api:t,message:n,error:void 0,handlingStack:r}}(n,t,i))})},()=>{k[t]=r}}))),is[e]})).subscribe(e=>n.notify(e.error)),i=t,o=a,(function(e,t){var r,n;let i=[];t.includes(ia)&&i.push((r=e,new B(e=>{let{stop:t}=e6(r,document,"securitypolicyviolation",t=>{e.notify(function(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return il({type:e.effectiveDirective,message:`${ia}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:iu(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${tK(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))});return t})));let o=t.filter(e=>e!==ia);return o.length&&i.push((n=o,new B(e=>{if(!window.ReportingObserver)return;let t=P((t,r)=>t.forEach(t=>e.notify(function(e){let{type:t,body:r}=e;return il({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:iu(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}(t)))),r=new window.ReportingObserver(t,{types:n,buffered:!0});return r.observe(),()=>{r.disconnect()}}))),H(...i)})(i,[ia,"intervention"]).subscribe(e=>o.notify(e)),a.subscribe(t=>e.notify(14,{error:t})),(s=e).subscribe(14,({error:e})=>{s.notify(12,function(e){let t={date:e.startClocks.timeStamp,error:{id:tV(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:tP,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:r}}(e))}),{addError:({error:e,handlingStack:t,componentStack:r,startClocks:n,context:i})=>{let o=eN({originalError:e,handlingStack:t,componentStack:r,startClocks:n,nonErrorPrefix:"Provided",source:"custom",handling:"handled"});o.context=eQ(o.context,i),s.notify(14,{error:o})}}}(e,r,a);!function(e,t,r,n,i){var o,s,a;let l={clearTracingIfNeeded:rK,traceFetch:e=>rJ(t,e,r,n,i,t=>{var r;if(e.input instanceof Request&&!(null==(r=e.init)?void 0:r.headers))e.input=new Request(e.input),Object.keys(t).forEach(r=>{e.input.headers.append(r,t[r])});else{e.init={...e.init};let r=[];e.init.headers instanceof Headers?e.init.headers.forEach((e,t)=>{r.push([t,e])}):Array.isArray(e.init.headers)?e.init.headers.forEach(e=>{r.push(e)}):e.init.headers&&Object.keys(e.init.headers).forEach(t=>{r.push([t,e.init.headers[t]])}),e.init.headers=r.concat(e4(t))}}),traceXhr:(e,o)=>rJ(t,e,r,n,i,e=>{Object.keys(e).forEach(t=>{o.setRequestHeader(t,e[t])})})};(function(e,t,r){var n;(!f&&(n=t,f=new B(e=>{let{stop:t}=eh(XMLHttpRequest.prototype,"open",ns),{stop:r}=eh(XMLHttpRequest.prototype,"send",t=>{!function({target:e,parameters:[t],handlingStack:r},n,i){let o=no.get(e);if(!o)return;o.state="start",o.startClocks=ek(),o.isAborted=!1,o.xhr=e,o.handlingStack=r,o.requestBody=t;let s=!1,{stop:a}=eh(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&l()}),l=()=>{var t;u(),a(),s||(s=!0,o.state="complete",t=o.startClocks.timeStamp,o.duration=ew()-t,o.status=e.status,"string"==typeof e.response&&(o.responseBody=e.response),i.notify({...o}))},{stop:u}=e6(n,e,"loadend",l);i.notify(o)}(t,n,e)},{computeHandlingStack:!0}),{stop:i}=eh(XMLHttpRequest.prototype,"abort",na);return()=>{t(),r(),i()}})),f).subscribe(t=>{if(nv(t.url))switch(t.state){case"start":r.traceXhr(t,t.xhr),t.requestIndex=nS(),e.notify(7,{requestIndex:t.requestIndex,url:t.url});break;case"complete":r.clearTracingIfNeeded(t),e.notify(8,{duration:t.duration,method:t.method,requestIndex:t.requestIndex,spanId:t.spanId,startClocks:t.startClocks,status:t.status,traceId:t.traceId,traceSampled:t.traceSampled,type:"xhr",url:t.url,xhr:t.xhr,isAborted:t.isAborted,handlingStack:t.handlingStack,requestBody:t.requestBody,responseBody:t.responseBody})}})})(e,t,l),o=e,s=t,a=l,rr({responseBodyAction:e=>{var t;return(null==(t=nb(e.url,s))?void 0:t.trackResponseErrors)?2:1}}).subscribe(e=>{var t,r;if(nv(e.url))switch(e.state){case"start":a.traceFetch(e),e.requestIndex=nS(),o.notify(7,{requestIndex:e.requestIndex,url:e.url});break;case"resolve":a.clearTracingIfNeeded(e),o.notify(8,{duration:(r=e.startClocks.timeStamp,ew()-r),method:e.method,requestIndex:e.requestIndex,responseType:e.responseType,spanId:e.spanId,startClocks:e.startClocks,status:e.status,traceId:e.traceId,traceSampled:e.traceSampled,type:nl,url:e.url,response:e.response,init:e.init,input:e.input,isAborted:e.isAborted,handlingStack:e.handlingStack,requestBody:null==(t=e.init)?void 0:t.body,responseBody:e.responseBody})}})}(e,r,n,L,U);let ef=function(e,t,r){function n(r){t.wasInPageStateDuringPeriod("frozen",r.startClocks.relative,r.duration)||e.notify(12,tG(r))}return{addOperationStepVital:function(t,r,n,i){if(!ez(iZ.FEATURE_OPERATION_VITAL))return;let{operationKey:o,context:s,description:a}=n||{},l={name:t,type:"operation_step",operationKey:o,failureReason:i,stepType:r,startClocks:ek(),context:eT(s),description:a};e.notify(12,tG(l))},addDurationVital:n,startDurationVital:(e,t={})=>tJ(r,e,t),stopDurationVital:(e,t={})=>{tY(n,r,e,t)}}}(e,T,s),eg=(p=r.applicationId,v=j.actionContexts,{get:e=>{let t=R.findView(e),r=A.findUrl(e),i=n.findTrackedSession(e);if(i&&t&&r){let n=v.findActionId(e);return{application_id:p,session_id:i.id,user_action:n?{id:n}:void 0,view:{id:t.id,name:t.name,referrer:r.referrer,url:r.url}}}}});return{addAction:j.addAction,addEvent:F.addEvent,addError:ec,addTiming:Z,addFeatureFlagEvaluation:N.addFeatureFlagEvaluation,startView:ee,setViewContext:er,setViewContextProperty:en,getViewContext:ei,setVie
172wName:et,viewHistory:R,getInternalContext:eg.get,startDurationVital:ef.startDurationVital,stopDurationVital:ef.stopDurationVital,addDurationVital:ef.addDurationVital,addOperationStepVital:ef.addOperationStepVital,globalContext:D,userContext:L,accountContext:U,longTaskContexts:el,stop:()=>x.forEach(e=>e())}}(h,p,e,O,t,i,a,l,u,w);return c.push(R),l.unbuffer(),c.push(()=>r.stop()),{...A,lifeCycle:h,session:O,stopSession:()=>O.expire(),telemetry:_,stop:()=>{c.forEach(e=>e())},hooks:p}},(w=G,{start:G,stop:G,onRumStart(e,t){w=()=>(function(e,{session:t,viewContext:r,errorType:n}){let i=t?t.id:"no-session-id",o=[];void 0!==n&&o.push(`error-type=${n}`),r&&(o.push(`seed=${r.id}`),o.push(`from=${r.startClocks.timeStamp}`));let s=function(e){let t=e.site,r=e.subdomain||function(e){switch(e.site){case eW:case"datadoghq.eu":return"app";case e$:return"dd";default:return}}(e);return`https://${r?`${r}.`:""}${t}`}(e),a=`/rum/replay/sessions/${i}`;return`${s}${a}?${o.join("&")}`})(t,{errorType:"slim-package"})},isRecording:()=>!1,getReplayStats:()=>void 0,getSessionReplayLink:()=>w()}),{onRumStart:G,stop:G},{sdkName:"rum-slim"});var iZ,i0,i1,i2,i3=L(),i4="DD_RUM";let i6=i3[i4];i6&&!i6.q&&i6.version&&C.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),i3[i4]=iQ,i6&&i6.q&&i6.q.forEach(e=>T(e,"onReady callback threw an error:")())},63962(e,t,r){var n=r(35256),i=r(21610);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},64417(e,t,r){var n=r(64809),i=r(60961);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==n(e)}},64544(e,t,r){var n=r(49128),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},64809(e,t,r){var n=r(4236),i=r(13088),o=r(20519),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},67518(e,t,r){var n=r(64544),i=r(1005),o=r(63962),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?s:+e}},67743(e,t,r){"use strict";r.r(t),r.d(t,{PLUGIN_NAME:()=>rU,getRecordConsolePlugin:()=>rj});var n,i,o,s,a,l,u,c,d,h,f,p,g,m,v,y,b,w,S,k,x,E,C,_,O,I,T,R,A,P,M,N,D,L,U,j,F,B,H,z,q,V,$,W,K,J,Y,G,X,Q,Z,ee,et,er,en,ei,eo,es,ea,el,eu,ec,ed,eh,ef,ep,eg,em,ev,ey,eb,ew,eS,ek,ex,eE,eC,e_,eO,eI,eT,eR,eA,eP,eM,eN,eD,eL,eU,ej,eF,eB,eH,ez,eq,eV,e$,eW,eK,eJ,eY,eG,eX,eQ,eZ,e0,e1,e2,e3,e4,e6,e5,e8,e9,e7,te,tt,tr=Object.defineProperty,tn=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?tr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},ti=Object.defineProperty,to=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?ti(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},ts=Object.defineProperty,ta=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?ts(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r};let tl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tc={};function td(e){if(tc[e])return tc[e];let t=function(e){var t,r;let n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in tl?tl[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in tu?tu[e]:void 0,s=!!(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return tc[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let o=i[e].prototype;if(document.body.removeChild(n),!o)return r;return tc[e]=o}catch{return r}}let th={};function tf(e,t,r){var n;let i=`${e}.${String(r)}`;if(th[i])return th[i].call(t);let o=null==(n=Object.getOwnPropertyDescriptor(td(e),r))?void 0:n.get;return o?(th[i]=o,o.call(t)):t[r]}let tp=function(e){return tf("Node",e,"parentNode")};var tg={exports:{}};let tm=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esMo
172dule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function tv(){if(u)return l;u=1;let e=function(){if(a)return tg.exports;a=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return tg.exports=t(),tg.exports.createColors=t,tg.exports}();class t extends Error{constructor(e,r,n,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){let r,n;if(!this.source)return"";let i=this.source;null==t&&(t=e.isColorSupported),tm&&t&&(i=tm(i));let o=i.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(t){let{bold:t,gray:i,red:o}=e.createColors(!0);r=e=>t(o(e)),n=e=>i(e)}else r=n=e=>e;return o.slice(s,a).map((e,t)=>{let i=s+1+t,o=" "+(" "+i).slice(-l)+" | ";if(i===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+`
173 `+t+r("^")}return" "+n(o)+e}).join(`
174`)}toString(){let e=this.showSourceCode();return e&&(e=`
175
176`+e+`
177`),this.name+": "+this.message+e}}return l=t,t.default=t,l}var ty={};function tb(){return c||(c=1,ty.isClean=Symbol("isClean"),ty.my=Symbol("my")),ty}function tw(){if(h)return d;h=1;let e={after:`
178`,beforeClose:`
179`,beforeComment:`
180`,beforeDecl:`
181`,beforeOpen:" ",beforeRule:`
182`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes(`
183`)){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let i;if(n||(n=r),r&&void 0!==(i=t.raws[r]))return i;let o=t.parent;if("before"===n&&(!o||"root"===o.type&&o.first===t||o&&"document"===o.type))return"";if(!o)return e[n];let s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[n])return s.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{var a;let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?i=this[e](s,t):s.walk(e=>{if(void 0!==(i=e.raws[r]))return!1})}return void 0===i&&(i=e[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes(`
184`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
185`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
186`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes(`
187`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(`
188`);return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return d=t,t.default=t,d}function tS(){if(p)return f;p=1;let e=tw();function t(t,r){new e(r).stringify(t)}return f=t,t.default=t,f}function tk(){if(m)return g;m=1;let{isClean:e,my:t}
188=tb(),r=tv(),n=tw(),i=tS();class o{constructor(r={}){for(let n in this.raws={},this[e]=!1,this[t]=!0,r)if("nodes"===n)for(let e of(this.nodes=[],r[n]))"function"==typeof e.clone?this.append(e.clone()):this.append(e);else this[n]=r[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let o=t[i],s=typeof o;"parent"===i&&"object"===s?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(t=>e(t,n)):("object"===s&&null!==o&&(o=e(o)),n[i]=o)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}
188markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)`
189`===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new n().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return g=o,o.default=o,g}function tx(){if(y)return v;y=1;let e=tk();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return v=t,t.default=t,v}function tE(){if(k)return S;k=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tm,{existsSync:r,readFileSync:n}=tm,{dirname:i,join:o}=tm;class s{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=i(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n)if("string"==typeof n)return n;else if("function"==typeof n){let e=n(r);if(e){let t=this.loadFile(e);
189if(!t)throw Error("Unable to load previous source map: "+e.toString());return t}}else if(n instanceof e)return t.fromSourceMap(n).toString();else if(n instanceof t)return n.toString();else if(this.isMap(n))return JSON.stringify(n);else throw Error("Unsupported previous source map format: "+n.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return r&&(e=o(i(r),e)),this.loadFile(e)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return S=s,s.default=s,S}function tC(){if(E)return x;E=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tm,{fileURLToPath:r,pathToFileURL:n}=tm,{isAbsolute:i,resolve:o}=tm,{nanoid:s}=w?b:(w=1,b={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
189),a=tv(),l=tE(),u=Symbol("fromOffsetCache"),c=!!(e&&t),d=!!(o&&i);class h{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=o(t.from)),d&&c){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,s,l;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,l=e.col}else s=n.line,l=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,s,l);return(o=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):new a(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:l,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:l,endLine:s,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split(`
190`);r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,s){let a,l;if(!this.map)return!1;let u=this.map.consumer(),c=u.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=u.originalPositionFor({column:s,line:o})),l=i(c.source)?n(c.source):new URL(c.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:l.toString()};if("file:"===l.protocol)if(r)d.file=r(l);else throw Error("file: protocol is not available in this PostCSS build");let h=u.sourceContentFor(c.source);return h&&(d.source=h),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return x=h,h.default=h,tm&&tm.registerInput&&tm.registerInput(h),x}function t_(){if(_)return C;_=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tm,{dirname:r,relative:n,resolve:i,sep:o}=tm,{pathToFileURL:s}=tm,a=tC(),l=!!(e&&t),u=!!(r&&i&&n&&o);return C=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t=`
191`;this.css.includes(`\r
192`)&&(t=`\r
193`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,i=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,i,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,r;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,i=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(s.generated.line=n,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1):(s.source=o,s.original.line=1,s.original.column=0),this.map.addMapping(s)),(e=t.match(/\n/g))?(n+=e.length,r=t.lastIndexOf(`
194`),i=t.length-r):i+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=n,s.generated.column=i-2):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1),this.map.addMapping(s))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(i(o,this.mapOpts.annotation)));let s=n(o,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(s){let t=s(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function tO(){if(I)return O;I=1;let e=tk();class t extends e{constructor(e){super(e),this.type="comment"}}return O=t,t.default=t,O}function tI(){let e,t,r,n;if(R)return T;R=1;let{isClean:i,my:o}=tb(),s=tx(),a=tO(),l=tk();class u extends l{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
194e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n))for(let e of n=n.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===n.type&&"document"!==this.type)for(let e of n=n.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else if(n.text)n=[new a(n)];else throw Error("Unknown node type in node creation");return n.map(e=>(e[o]||u.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[i]&&function e(t){if(t[i]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return u.registerParse=t=>{e=t},u.registerRule=e=>{t=e},u.registerAtRule=e=>{r=e},u.registerRoot=e=>{n=e},T=u,u.default=u,u.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEac
194h(e=>{u.rebuild(e)})},T}function tT(){let e,t;if(P)return A;P=1;let r=tI();class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},A=n,n.default=n,A}function tR(){if(N)return M;N=1;let e={};return M=function(t){!e[t]&&(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function tA(){if(L)return D;L=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return D=e,e.default=e,D}function tP(){if(j)return U;j=1;let e=tA();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){!r.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return U=t,t.default=t,U}function tM(){if(z)return H;z=1;let e=tI();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return H=t,t.default=t,e.registerAtRule(t),H}function tN(){let e,t;if(V)return q;V=1;let r=tI();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},q=n,n.default=n,r.registerRoot(n),q}function tD(){if(W)return $;W=1;let e={comma:t=>e.split(t,[","],!0),space(t){let r=[" ",`
195`,"	"];return e.split(t,r)},split(e,t,r){let n=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};return $=e,e.default=e,$}function tL(){if(J)return K;J=1;let e=tI(),t=tD();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return K=r,r.default=r,e.registerRule(r),K}function tU(){if(Q)return X;Q=1;let e=tI(),t=function(){if(G)return Y;G=1;let e=tx(),t=function(){if(B)return F;B=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,n=/[\da-f]/i;return F=function(i,o={}){let s,a,l,u,c,d,h,f,p,g,m=i.css.valueOf(),v=o.ignoreErrors,y=m.length,b=0,w=[],S=[];function k(e){throw i.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=y},nextToken:function(i){if(S.length)return S.pop();if(b>=y)return;let o=!!i&&i.ignoreUnclosed;switch(s=m.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:a=b;do a+=1,s=m.charCodeAt(a);while(32===s||10===s||9===s||13===s||12===s)g=["space",m.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(s);g=[e,e,b];break}case 40:if(f=w.length?w.pop()[1]:"",p=m.charCodeAt(b+1),"url"===f&&39!==p&&34!==p&&32!==p&&10!==p&&9!==p&&12!==p&&13!==p){a=b;do{if(d=!1,-1===(a=m.indexOf(")",a+1)))if(v||o){a=b;break}else k("bracket");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["brackets",m.slice(b,a+1),b,a],b=a}else a=m.indexOf(")",b+1),u=m.slice(b,a+1),-1===a||r.test(u)?g=["(","(",b]:(g=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===s?"'":'"',a=b;do{if(d=!1,-1===(a=m.indexOf(l,a+1)))if(v||o){a=b+1;break}
195else k("string");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["string",m.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(m),a=0===e.lastIndex?m.length-1:e.lastIndex-2,g=["at-word",m.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,c=!0;92===m.charCodeAt(a+1);)a+=1,c=!c;if(s=m.charCodeAt(a+1),c&&47!==s&&32!==s&&10!==s&&9!==s&&13!==s&&12!==s&&(a+=1,n.test(m.charAt(a)))){for(;n.test(m.charAt(a+1));)a+=1;32===m.charCodeAt(a+1)&&(a+=1)}g=["word",m.slice(b,a+1),b,a],b=a;break;default:47===s&&42===m.charCodeAt(b+1)?(0===(a=m.indexOf("*/",b+2)+1)&&(v||o?a=m.length:k("comment")),g=["comment",m.slice(b,a+1),b,a]):(t.lastIndex=b+1,t.test(m),a=0===t.lastIndex?m.length-1:t.lastIndex-2,g=["word",m.slice(b,a+1),b,a],w.push(g)),b=a}return b++,g},position:function(){return b}}}}(),r=tO(),n=tM(),i=tN(),o=tL(),s={empty:!0,space:!0};return Y=class{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let s=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){a=!0;break}else if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,o]of e.entries()){if("("===(t=o[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(o);r=o}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n,i,o=new e;this.init(o,t[0][2]);let s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),o.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;o.prop+=t.shift()[1]}for(o.raws.between="";t.length;){if(":"===(n=t.shift())[0]){o.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),o.raws.between+=n[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if("!important"===(n=t[e])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(t,e);" !important"!==(r=this.spacesFromEnd(t)+r)&&(o.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(o,"value",a.concat(t),r),o.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}
195if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,a,l,u=r.length,c="",d=!0;for(let e=0;e<u;e+=1)"space"!==(o=(i=r[e])[0])||e!==u-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",s[l]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=tC();function n(e,n){let i=new t(new r(e,n));try{i.parse()}catch(e){throw e}return i.root}return X=n,n.default=n,e.registerParse(n),X}function tj(){if(ee)return Z;ee=1;let{isClean:e,my:t}=tb(),r=t_(),n=tS(),i=tI(),o=tT();tR();let s=tP(),a=tU(),l=tN(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function h(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function p(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let m={};class v{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=g(r);else if(r instanceof v||r instanceof s)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&i.rebuild(o)}this.result=new s(e,o,n),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
195. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(h(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[p(t)];for(;r.length>0;){let e=this.visitTick(r);if(h(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(h(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new r(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:i}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&r.visitorIndex<i.length){let[e,t]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let i,o=r.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[e]){i[e]=!0,t.push(p(i));return}r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t){n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator());return}if(this.listeners[t]){r.visitors=this.listeners[t];return}}t.pop()}walkSync(t){for(let r of(t[e]=!0,f(t)))if(0===r)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=e=>{m=e},Z=v,v.default=v,l.registerLazyResult(v),o.registerLazyResult(v),Z}let tF=(n=function(){if(el)return ea;el=1;let e=tv(),t=tx(),r=tj(),n=tI(),i=function(){if(ei)return en;ei=1;let e=function(){if(er)return et;er=1;let e=t_(),t=tS();tR();let r=tU(),n=tP();class i{constructor(r,i,o){let s;i=i.toString(),this.stringified=!1,this._processor=r,this._css=i,this._opts=o,this._map=void 0,this.result=new n(this._processor,s,this._opts),this.result.css=i;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(t,s,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}
195async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=r(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}}return et=i,i.default=i,et}(),t=tj(),r=tT(),n=tN();class i{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return en=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),en}(),o=tS(),s=function(){if(es)return eo;es=1;let e=tx(),t=tE(),r=tO(),n=tM(),i=tC(),o=tN(),s=tL();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:c,...d}=l;if(c)for(let e of(u=[],c)){let r={...e,__proto__:i.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}if(d.nodes&&(d.nodes=l.nodes.map(e=>a(e,u))),d.source){let{inputId:e,...t}=d.source;d.source=t,null!=e&&(d.source.input=u[e])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new n(d);else throw Error("Unknown node type: "+l.type)}return eo=a,a.default=a,eo}(),a=tT(),l=tA(),u=tO(),c=tM(),d=tP(),h=tC(),f=tU(),p=tD(),g=tL(),m=tN(),v=tk();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
196https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new i().version,s}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=f,y.fromJSON=s,y.list=p,y.comment=e=>new u(e),y.atRule=e=>new c(e),y.decl=e=>new t(e),y.rule=e=>new g(e),y.root=e=>new m(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=i,y.Document=a,y.Comment=u,y.Warning=l,y.AtRule=c,y.Result=d,y.Input=h,y.Rule=g,y.Root=m,y.Node=v,r.registerPostcss(y),ea=y,y.default=y,ea}())&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;tF.stringify,tF.fromJSON,tF.plugin,tF.parse,tF.list,tF.document,tF.comment,tF.atRule,tF.rule,tF.decl,tF.root,tF.CssSyntaxError,tF.Declaration,tF.Container,tF.Processor,tF.Document,tF.Comment,tF.Warning,tF.AtRule,tF.Result,tF.Input,tF.Rule,tF.Root,tF.Node;var tB=Object.defineProperty,tH=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?tB(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},tz={exports:{}};let tq=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function tV(){if(ed)return ec;ed=1;let e=function(){if(eu)return tz.exports;eu=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return tz.exports=t(),tz.exports.createColors=t,tz.exports}();
196class t extends Error{constructor(e,r,n,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){let r,n;if(!this.source)return"";let i=this.source;null==t&&(t=e.isColorSupported),tq&&t&&(i=tq(i));let o=i.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(t){let{bold:t,gray:i,red:o}=e.createColors(!0);r=e=>t(o(e)),n=e=>i(e)}else r=n=e=>e;return o.slice(s,a).map((e,t)=>{let i=s+1+t,o=" "+(" "+i).slice(-l)+" | ";if(i===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+`
197 `+t+r("^")}return" "+n(o)+e}).join(`
198`)}toString(){let e=this.showSourceCode();return e&&(e=`
199
200`+e+`
201`),this.name+": "+this.message+e}}return ec=t,t.default=t,ec}var t$={};function tW(){return eh||(eh=1,t$.isClean=Symbol("isClean"),t$.my=Symbol("my")),t$}function tK(){if(ep)return ef;ep=1;let e={after:`
202`,beforeClose:`
203`,beforeComment:`
204`,beforeDecl:`
205`,beforeOpen:" ",beforeRule:`
206`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes(`
207`)){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let i;if(n||(n=r),r&&void 0!==(i=t.raws[r]))return i;let o=t.parent;if("before"===n&&(!o||"root"===o.type&&o.first===t||o&&"document"===o.type))return"";if(!o)return e[n];let s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[n])return s.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{var a;let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?i=this[e](s,t):s.walk(e=>{if(void 0!==(i=e.raws[r]))return!1})}return void 0===i&&(i=e[n]),s.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes(`
208`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
209`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
210`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes(`
211`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(`
212`);return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return ef=t,t.default=t,ef}function tJ(){if(em)return eg;em=1;let e=tK();function t(t,r){new e(r).stringify(t)}return eg=t,t.default=t,eg}function tY(){if(ey)return ev;ey=1;let{isClean:e,my:t}
212=tW(),r=tV(),n=tK(),i=tJ();class o{constructor(r={}){for(let n in this.raws={},this[e]=!1,this[t]=!0,r)if("nodes"===n)for(let e of(this.nodes=[],r[n]))"function"==typeof e.clone?this.append(e.clone()):this.append(e);else this[n]=r[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let o=t[i],s=typeof o;"parent"===i&&"object"===s?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(t=>e(t,n)):("object"===s&&null!==o&&(o=e(o)),n[i]=o)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}
212markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)`
213`===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new n().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return ev=o,o.default=o,ev}function tG(){if(ew)return eb;ew=1;let e=tY();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return eb=t,t.default=t,eb}function tX(){if(eE)return ex;eE=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tq,{existsSync:r,readFileSync:n}=tq,{dirname:i,join:o}=tq;class s{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=i(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n)if("string"==typeof n)return n;else if("function"==typeof n){let e=n(r);if(e){let t=this.loadFile(e);
213if(!t)throw Error("Unable to load previous source map: "+e.toString());return t}}else if(n instanceof e)return t.fromSourceMap(n).toString();else if(n instanceof t)return n.toString();else if(this.isMap(n))return JSON.stringify(n);else throw Error("Unsupported previous source map format: "+n.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return r&&(e=o(i(r),e)),this.loadFile(e)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ex=s,s.default=s,ex}function tQ(){if(e_)return eC;e_=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tq,{fileURLToPath:r,pathToFileURL:n}=tq,{isAbsolute:i,resolve:o}=tq,{nanoid:s}=ek?eS:(ek=1,eS={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
213),a=tV(),l=tX(),u=Symbol("fromOffsetCache"),c=!!(e&&t),d=!!(o&&i);class h{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=o(t.from)),d&&c){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,s,l;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,l=e.col}else s=n.line,l=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,s,l);return(o=u?new a(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):new a(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:l,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:l,endLine:s,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split(`
214`);r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,s){let a,l;if(!this.map)return!1;let u=this.map.consumer(),c=u.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=u.originalPositionFor({column:s,line:o})),l=i(c.source)?n(c.source):new URL(c.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:l.toString()};if("file:"===l.protocol)if(r)d.file=r(l);else throw Error("file: protocol is not available in this PostCSS build");let h=u.sourceContentFor(c.source);return h&&(d.source=h),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return eC=h,h.default=h,tq&&tq.registerInput&&tq.registerInput(h),eC}function tZ(){if(eI)return eO;eI=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=tq,{dirname:r,relative:n,resolve:i,sep:o}=tq,{pathToFileURL:s}=tq,a=tQ(),l=!!(e&&t),u=!!(r&&i&&n&&o);return eO=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t=`
215`;this.css.includes(`\r
216`)&&(t=`\r
217`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,i=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,i,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,r;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,i=1,o="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(s.generated.line=n,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1):(s.source=o,s.original.line=1,s.original.column=0),this.map.addMapping(s)),(e=t.match(/\n/g))?(n+=e.length,r=t.lastIndexOf(`
218`),i=t.length-r):i+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=n,s.generated.column=i-2):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1),this.map.addMapping(s))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(i(o,this.mapOpts.annotation)));let s=n(o,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(s){let t=s(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function t0(){if(eR)return eT;eR=1;let e=tY();class t extends e{constructor(e){super(e),this.type="comment"}}return eT=t,t.default=t,eT}function t1(){let e,t,r,n;if(eP)return eA;eP=1;let{isClean:i,my:o}=tW(),s=tG(),a=t0(),l=tY();class u extends l{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
218e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n))for(let e of n=n.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===n.type&&"document"!==this.type)for(let e of n=n.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else if(n.text)n=[new a(n)];else throw Error("Unknown node type in node creation");return n.map(e=>(e[o]||u.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[i]&&function e(t){if(t[i]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return u.registerParse=t=>{e=t},u.registerRule=e=>{t=e},u.registerAtRule=e=>{r=e},u.registerRoot=e=>{n=e},eA=u,u.default=u,u.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEac
218h(e=>{u.rebuild(e)})},eA}function t2(){let e,t;if(eN)return eM;eN=1;let r=t1();class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},eM=n,n.default=n,eM}function t3(){if(eL)return eD;eL=1;let e={};return eD=function(t){!e[t]&&(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function t4(){if(ej)return eU;ej=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return eU=e,e.default=e,eU}function t6(){if(eB)return eF;eB=1;let e=t4();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){!r.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return eF=t,t.default=t,eF}function t5(){if(eV)return eq;eV=1;let e=t1();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return eq=t,t.default=t,e.registerAtRule(t),eq}function t8(){let e,t;if(eW)return e$;eW=1;let r=t1();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},e$=n,n.default=n,r.registerRoot(n),e$}function t9(){if(eJ)return eK;eJ=1;let e={comma:t=>e.split(t,[","],!0),space(t){let r=[" ",`
219`,"	"];return e.split(t,r)},split(e,t,r){let n=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};return eK=e,e.default=e,eK}function t7(){if(eG)return eY;eG=1;let e=t1(),t=t9();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return eY=r,r.default=r,e.registerRule(r),eY}function re(){if(e0)return eZ;e0=1;let e=t1(),t=function(){if(eQ)return eX;eQ=1;let e=tG(),t=function(){if(ez)return eH;ez=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,n=/[\da-f]/i;return eH=function(i,o={}){let s,a,l,u,c,d,h,f,p,g,m=i.css.valueOf(),v=o.ignoreErrors,y=m.length,b=0,w=[],S=[];function k(e){throw i.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=y},nextToken:function(i){if(S.length)return S.pop();if(b>=y)return;let o=!!i&&i.ignoreUnclosed;switch(s=m.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:a=b;do a+=1,s=m.charCodeAt(a);while(32===s||10===s||9===s||13===s||12===s)g=["space",m.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(s);g=[e,e,b];break}case 40:if(f=w.length?w.pop()[1]:"",p=m.charCodeAt(b+1),"url"===f&&39!==p&&34!==p&&32!==p&&10!==p&&9!==p&&12!==p&&13!==p){a=b;do{if(d=!1,-1===(a=m.indexOf(")",a+1)))if(v||o){a=b;break}else k("bracket");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["brackets",m.slice(b,a+1),b,a],b=a}else a=m.indexOf(")",b+1),u=m.slice(b,a+1),-1===a||r.test(u)?g=["(","(",b]:(g=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===s?"'":'"',a=b;do{if(d=!1,-1===(a=m.indexOf(l,a+1)))if(v||o){a=b+1;break}
219else k("string");for(h=a;92===m.charCodeAt(h-1);)h-=1,d=!d}while(d)g=["string",m.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(m),a=0===e.lastIndex?m.length-1:e.lastIndex-2,g=["at-word",m.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,c=!0;92===m.charCodeAt(a+1);)a+=1,c=!c;if(s=m.charCodeAt(a+1),c&&47!==s&&32!==s&&10!==s&&9!==s&&13!==s&&12!==s&&(a+=1,n.test(m.charAt(a)))){for(;n.test(m.charAt(a+1));)a+=1;32===m.charCodeAt(a+1)&&(a+=1)}g=["word",m.slice(b,a+1),b,a],b=a;break;default:47===s&&42===m.charCodeAt(b+1)?(0===(a=m.indexOf("*/",b+2)+1)&&(v||o?a=m.length:k("comment")),g=["comment",m.slice(b,a+1),b,a]):(t.lastIndex=b+1,t.test(m),a=0===t.lastIndex?m.length-1:t.lastIndex-2,g=["word",m.slice(b,a+1),b,a],w.push(g)),b=a}return b++,g},position:function(){return b}}}}(),r=t0(),n=t5(),i=t8(),o=t7(),s={empty:!0,space:!0};return eX=class{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let s=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){a=!0;break}else if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,o]of e.entries()){if("("===(t=o[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(o);r=o}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n,i,o=new e;this.init(o,t[0][2]);let s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),o.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;o.prop+=t.shift()[1]}for(o.raws.between="";t.length;){if(":"===(n=t.shift())[0]){o.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),o.raws.between+=n[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if("!important"===(n=t[e])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(t,e);" !important"!==(r=this.spacesFromEnd(t)+r)&&(o.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(o,"value",a.concat(t),r),o.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}
219if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,a,l,u=r.length,c="",d=!0;for(let e=0;e<u;e+=1)"space"!==(o=(i=r[e])[0])||e!==u-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",s[l]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=tQ();function n(e,n){let i=new t(new r(e,n));try{i.parse()}catch(e){throw e}return i.root}return eZ=n,n.default=n,e.registerParse(n),eZ}function rt(){if(e2)return e1;e2=1;let{isClean:e,my:t}=tW(),r=tZ(),n=tJ(),i=t1(),o=t2();t3();let s=t6(),a=re(),l=t8(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function h(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function p(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let m={};class v{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=g(r);else if(r instanceof v||r instanceof s)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=a;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&i.rebuild(o)}this.result=new s(e,o,n),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!c[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
219. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(h(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[p(t)];for(;r.length>0;){let e=this.visitTick(r);if(h(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(h(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new r(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:i}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(i.length>0&&r.visitorIndex<i.length){let[e,t]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let i,o=r.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[e]){i[e]=!0,t.push(p(i));return}r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t){n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator());return}if(this.listeners[t]){r.visitors=this.listeners[t];return}}t.pop()}walkSync(t){for(let r of(t[e]=!0,f(t)))if(0===r)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=e=>{m=e},e1=v,v.default=v,l.registerLazyResult(v),o.registerLazyResult(v),e1}let rr=(i=function(){if(te)return e7;te=1;let e=tV(),t=tG(),r=rt(),n=t1(),i=function(){if(e5)return e6;e5=1;let e=function(){if(e4)return e3;e4=1;let e=tZ(),t=tJ();t3();let r=re(),n=t6();class i{constructor(r,i,o){let s;i=i.toString(),this.stringified=!1,this._processor=r,this._css=i,this._opts=o,this._map=void 0,this.result=new n(this._processor,s,this._opts),this.result.css=i;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(t,s,this._opts,i);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}
219async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=r(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}}return e3=i,i.default=i,e3}(),t=rt(),r=t2(),n=t8();class i{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return e6=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),e6}(),o=tJ(),s=function(){if(e9)return e8;e9=1;let e=tG(),t=tX(),r=t0(),n=t5(),i=tQ(),o=t8(),s=t7();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:c,...d}=l;if(c)for(let e of(u=[],c)){let r={...e,__proto__:i.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}if(d.nodes&&(d.nodes=l.nodes.map(e=>a(e,u))),d.source){let{inputId:e,...t}=d.source;d.source=t,null!=e&&(d.source.input=u[e])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new r(d);if("atrule"===d.type)return new n(d);else throw Error("Unknown node type: "+l.type)}return e8=a,a.default=a,e8}(),a=t2(),l=t4(),u=t0(),c=t5(),d=t6(),h=tQ(),f=re(),p=t9(),g=t7(),m=t8(),v=tY();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
220https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new i().version,s}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=f,y.fromJSON=s,y.list=p,y.comment=e=>new u(e),y.atRule=e=>new c(e),y.decl=e=>new t(e),y.rule=e=>new g(e),y.root=e=>new m(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=i,y.Document=a,y.Comment=u,y.Warning=l,y.AtRule=c,y.Result=d,y.Input=h,y.Rule=g,y.Root=m,y.Node=v,r.registerPostcss(y),e7=y,y.default=y,e7}())&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;rr.stringify,rr.fromJSON,rr.plugin,rr.parse,rr.list,rr.document,rr.comment,rr.atRule,rr.rule,rr.decl,rr.root,rr.CssSyntaxError,rr.Declaration,rr.Container,rr.Processor,rr.Document,rr.Comment,rr.Warning,rr.AtRule,rr.Result,rr.Input,rr.Rule,rr.Root,rr.Node;class rn{constructor(...e){tH(this,"parentElement",null),tH(this,"parentNode",null),tH(this,"ownerDocument"),tH(this,"firstChild",null),tH(this,"lastChild",null),tH(this,"previousSibling",null),tH(this,"nextSibling",null),tH(this,"ELEMENT_NODE",1),tH(this,"TEXT_NODE",3),tH(this,"nodeType"),tH(this,"nodeName"),tH(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof rn)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}
220let ri={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ro={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rs={};function ra(e){if(rs[e])return rs[e];let t=function(e){var t,r;let n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in ri?ri[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in ro?ro[e]:void 0,s=!!(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return rs[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let o=i[e].prototype;if(document.body.removeChild(n),!o)return r;return rs[e]=o}catch{return r}}let rl={};function ru(e,t,r){var n;let i=`${e}.${String(r)}`;if(rl[i])return rl[i].call(t);let o=null==(n=Object.getOwnPropertyDescriptor(ra(e),r))?void 0:n.get;return o?(rl[i]=o,o.call(t)):t[r]}let rc={};function rd(e,t,r){let n=`${e}.${String(r)}`;if(rc[n])return rc[n].bind(t);let i=ra(e)[r];return"function"!=typeof i?t[r]:(rc[n]=i,i.bind(t))}let rh=function(e){return ru("Node",e,"parentElement")},rf=function(e,t){return rd("Node",e,"contains")(t)},rp=function(e){return rd("Node",e,"getRootNode")()},rg=function(e){return e&&"host"in e?ru("ShadowRoot",e,"host"):null},rm=`Please stop import mirror directly. Instead of that,\r
221now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
222or you can use record.mirror to access the mirror instance during recording.`,rv={map:{},getId:()=>(console.error(rm),-1),getNode:()=>(console.error(rm),null),removeNodeFromMap(){console.error(rm)},has:()=>(console.error(rm),!1),reset(){console.error(rm)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(rv=new Proxy(rv,{get:(e,t,r)=>("map"===t&&console.error(rm),Reflect.get(e,t,r))}));let ry=Date.now;function rb(e){return e?e.nodeType===e.ELEMENT_NODE?e:rh(e):null}function rw(e){var t;let r=null;return"getRootNode"in e&&(null==(t=rp(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rg(rp(e))&&(r=rg(rp(e))),r}function rS(e){let t,r=e;for(;t=rw(r);)r=t;return r}function rk(e){let t=e.ownerDocument;return!!t&&rf(t,rS(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ry=()=>new Date().getTime());let rx=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){to(this,"id",1),to(this,"styleIDMap",new WeakMap),to(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return rv},closestElementOfNode:rb,getBaseDimension:function e(t,r){var n,i;let o=null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};let s=o.getBoundingClientRect(),a=e(o,r),l=s.height/o.clientHeight;return{x:s.x*a.relativeScale+a.x,y:s.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){let n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){let t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:rS,getShadowHost:rw,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,i;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=rh(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=rh(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){var t;return!!e&&(e instanceof rn&&"shadowRoot"in e?!!e.shadowRoot:!!((t=e)&&"shadowRoot"in t?ru("Element",t,"shadowRoot"):null))},hookSetter:function e(t,r,n,i,o=window){let s=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,i?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>e(t,r,s||{},!0)},inDom:function(e){let t=e.ownerDocument;return!!t&&(rf(t,e)||rk(e))},isAncestorRemoved:function e(t,r){if(function(e){var t,r;let n=e&&"host"in e&&"mode"in e&&((t=e)&&"host"in t?tf("ShadowRoot",t,"host"):null)||null;return!!(n&&"shadowRoot"in n&&((r=n)&&"shadowRoot"in r?tf("Element",r,"shadowRoot"):null)===e)}(t))return!1;let n=r.getId(t);if(!r.has(n))return!0;let i=ru("Node",t,"parentNode");return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))},isBlocked:function(e,t,r,n){if(!e)return!1;let i=rb(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t)||n&&null!==i.closest("."+t))return!0}else if(function e(t,r,n){if(!t)return!1;
222if(t.nodeType!==t.ELEMENT_NODE)return!!n&&e(tp(t),r,n);for(let e=t.classList.length;e--;){let n=t.classList[e];if(r.test(n))return!0}return!!n&&e(tp(t),r,n)}(i,t,n))return!0}catch(e){}return!!(r&&(i.matches(r)||n&&null!==i.closest(r)))||!1},isIgnored:function(e,t,r){return"TITLE"===e.tagName&&!!r.headTitleMutations||-2===t.getId(e)},isSerialized:function(e,t){return -1!==t.getId(e)},isSerializedIframe:function(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return!!e.changedTouches},get nowTimestamp(){return ry},on:function(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}},polyfill:function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){let t={},r=(e,r)=>{let n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(let i of e){let{nextId:e,parentId:o}=i;if(e&&e in t){let o=t[e];if(o.parent){let e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(i,o.parent))}else{let e=n.indexOf(o);n.splice(e,0,r(i,null))}continue}if(o in t){let e=t[o];
222e.children.push(r(i,e));continue}n.push(r(i,null))}return n},shadowHostInDom:rk,throttle:function(e,t,r={}){let n=null,i=0;return function(...o){let s=Date.now();i||!1!==r.leading||(i=s);let a=t-(s-i),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):n||!1===r.trailing||(n=setTimeout(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(l,o)},a))}},uniqueTextMutations:function(e){let t=new Set,r=[];for(let n=e.length;n--;){let i=e[n];t.has(i.id)||(r.push(i),t.add(i.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var rE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rC="undefined"==typeof Uint8Array?[]:new Uint8Array(256),r_=0;r_<rE.length;r_++)rC[rE.charCodeAt(r_)]=r_;let rO=`(function() {
223  "use strict";
224  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
225  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
226  for (var i = 0; i < chars.length; i++) {
227    lookup[chars.charCodeAt(i)] = i;
228  }
229  var encode = function(arraybuffer) {
230    var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
231    for (i2 = 0; i2 < len; i2 += 3) {
232      base64 += chars[bytes[i2] >> 2];
233      base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
234      base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
235      base64 += chars[bytes[i2 + 2] & 63];
236    }
237    if (len % 3 === 2) {
238      base64 = base64.substring(0, base64.length - 1) + "=";
239    } else if (len % 3 === 1) {
240      base64 = base64.substring(0, base64.length - 2) + "==";
241    }
242    return base64;
243  };
244  const lastBlobMap = /* @__PURE__ */ new Map();
245  const transparentBlobMap = /* @__PURE__ */ new Map();
246  async function getTransparentBlobFor(width, height, dataURLOptions) {
247    const id = \`\${width}-\${height}\`;
248    if ("OffscreenCanvas" in globalThis) {
249      if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
250      const offscreen = new OffscreenCanvas(width, height);
251      offscreen.getContext("2d");
252      const blob = await offscreen.convertToBlob(dataURLOptions);
253      const arrayBuffer = await blob.arrayBuffer();
254      const base64 = encode(arrayBuffer);
255      transparentBlobMap.set(id, base64);
256      return base64;
257    } else {
258      return "";
259    }
260  }
261  const worker = self;
262  worker.onmessage = async function(e) {
263    if ("OffscreenCanvas" in globalThis) {
264      const { id, bitmap, width, height, dataURLOptions } = e.data;
265      const transparentBase64 = getTransparentBlobFor(
266        width,
267        height,
268        dataURLOptions
269      );
270      const offscreen = new OffscreenCanvas(width, height);
271      const ctx = offscreen.getContext("2d");
272      ctx.drawImage(bitmap, 0, 0);
273      bitmap.close();
274      const blob = await offscreen.convertToBlob(dataURLOptions);
275      const type = blob.type;
276      const arrayBuffer = await blob.arrayBuffer();
277      const base64 = encode(arrayBuffer);
278      if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
279        lastBlobMap.set(id, base64);
280        return worker.postMessage({ id });
281      }
282      if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
283      worker.postMessage({
284        id,
285        type,
286        base64,
287        width,
288        height
289      });
290      lastBlobMap.set(id, base64);
291    } else {
292      return worker.postMessage({ id: e.data.id });
293    }
294  };
295})();
296//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
297`;"undefined"!=typeof self&&self.Blob&&new Blob([rO],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(s=e.contentWindow)?void 0:s.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}new class e{constructor(){ta(this,"idNodeMap",new Map),ta(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
297this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},(o=tt||(tt={}))[o.NotStarted=0]="NotStarted",o[o.Running=1]="Running",o[o.Stopped=2]="Stopped";class rI{constructor(e){tn(this,"fileName"),tn(this,"functionName"),tn(this,"lineNumber"),tn(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){let e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}let rT=/(^|@)\S+:\d+/,rR=/^\s*at .*(\S+:\d+|\(native\))/m,rA=/^(eval@)?(\[native code])?$/,rP={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(rR)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
298`).filter(function(e){return!!e.match(rR)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:n.pop());return new rI({functionName:n.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(`
299`).filter(function(e){return!e.match(rA)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new rI({functionName:e});{let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(t,""));return new rI({functionName:n,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
300`)>-1&&e.message.split(`
301`).length>e.stacktrace.split(`
302`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split(`
303`),n=[];for(let e=2,i=r.length;e<i;e+=2){let i=t.exec(r[e]);i&&n.push(new rI({fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split(`
304`),n=[];for(let e=0,i=r.length;e<i;e+=2){let i=t.exec(r[e]);i&&n.push(new rI({functionName:i[3]||void 0,fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera11:function(e){return e.stack.split(`
305`).filter(function(e){return!!e.match(rT)&&!e.match(/^Error created at/)},this).map(function(e){let t=e.split("@"),r=this.extractLocation(t.pop());return new rI({functionName:(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function rM(e){return"[object Object]"===Object.prototype.toString.call(e)}function rN(e,t){let r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);let n=[],i=[];return JSON.stringify(e,function(e,t){var o;if(n.length>0){let r=n.indexOf(this);~r?n.splice(r+1):n.push(this),~r?i.splice(r,1/0,e):i.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(rM(o=t)&&Object.keys(o).length>r.numOfKeysLimit||"function"==typeof o||rM(o)&&function e(t,r){if(0===r)return!0;for(let n of Object.keys(t))if(rM(t[n])&&e(t[n],r-1))return!0;return!1}(o,r.depthOfLimit)){let e;return e=t.toString(),r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=`${e.slice(0,r.stringLengthLimit)}...`),e}if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){let e={};for(let r in t){let n=t[r];Array.isArray(n)?e[r]=function(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(let e=0;e<n.children.length;e++){let t=n.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&i.push(t)}i.length>1&&(r+=`:eq(${i.indexOf(e)})`),t=r+(t?">"+t:""),e=n}return t}(n.length?n[0]:null):e[r]=n}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+`
306End of stack for Error object`:t.name+": "+t.message:t})}let rD={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","t
306ime","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function rL(e,t,r){let n,i=r?Object.assign({},rD,r):rD,o=i.logger;if(!o)return()=>{};n="string"==typeof o?t[o]:o;let s=0,a=!1,l=[];if(i.level.includes("error")){let r=t=>{let r=t.message,n=t.error;e({level:"error",trace:rP.parse(n).map(e=>e.toString()),payload:[rN(r,i.stringifyOptions)]})};t.addEventListener("error",r),l.push(()=>{t.removeEventListener("error",r)});let n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[rN(`Uncaught (in promise) ${r.name}: ${r.message}`,i.stringifyOptions)]):(r=Error(),n=[rN("Uncaught (in promise)",i.stringifyOptions),rN(t.reason,i.stringifyOptions)]),e({level:"error",trace:rP.parse(r).map(e=>e.toString()),payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(let t of i.level)l.push(function(t,r){return t[r]?rx.patch(t,r,t=>(...n)=>{if((t.apply(this,n),"assert"!==r||!n[0])&&!a){a=!0;try{let t=rP.parse(Error()).map(e=>e.toString()).splice(1),o=("assert"===r?n.slice(1):n).map(e=>rN(e,i.stringifyOptions));++s<i.lengthThreshold?e({level:r,trace:t,payload:o}):s===i.lengthThreshold&&e({level:"warn",trace:[],payload:[rN("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}
306}}):()=>{}}(n,t));return()=>{l.forEach(e=>e())}}let rU="rrweb/console@1",rj=e=>({name:rU,observer:rL,options:e})},68515(e,t,r){var n=r(55665),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},70556(e,t,r){"use strict";r.d(t,{m:()=>n});var n=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0}},76459(e,t,r){"use strict";r.d(t,{i:()=>h});var n=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:i(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),i=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},o=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var u=function(e,t){var r,n,i=typeof e;if(i!==typeof t)return!1;try{for(var o=a(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var l=Array.isArray(e),c=Array.isArray(t);if(l!==c)return!1;if(l&&c){for(var d=0;d<e.length;d++)if(!u(e[d],t[d]))return!1}else{if(!u(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var h=!0;return Object.keys(e).forEach(function(r){u(e[r],t[r])||(h=!1)}),h}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var c=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=s({},this.identity.userProperties),r=s(s({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,i,o,s,u,c=r.userProperties||{};try{for(var d=a(Object.entries(e)),h=d.next();!h.done;h=d.next()){var f=l(h.value,2),p=f[0],g=f[1];switch(p){case"$set":try{for(var m=(i=void 0,a(Object.entries(g))),v=m.next();!v.done;v=m.next()){var y=l(v.value,2),b=y[0],w=y[1];c[b]=w}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}break;case"$unset":try{for(var S=(s=void 0,a(Object.keys(g))),k=S.next();!k.done;k=S.next()){var b=k.value;delete c[b]}}catch(e){s={error:e}}finally{try{k&&!k.done&&(u=S.return)&&u.call(S)}finally{if(s)throw s.error}}break;case"$clearAll":c={}}}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return r.userProperties=c,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return s({},this.identity)},e.prototype.setIdentity=function(e){var t=s({},this.identity);this.identity=s({}
306,e),u(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),d="undefined"!=typeof globalThis?globalThis:void 0!==r.g?r.g:self,h=function(){function e(){this.identityStore=new c,this.eventBridge=new o,this.applicationContextProvider=new n}return e.getInstance=function(t){return d.analyticsConnectorInstances||(d.analyticsConnectorInstances={}),d.analyticsConnectorInstances[t]||(d.analyticsConnectorInstances[t]=new e),d.analyticsConnectorInstances[t]},e}()},77373(e,t,r){"use strict";r.r(t),r.d(t,{NetworkObservers:()=>a});var n=r(55823),i=r(70556),o=["image/","audio/","video/","application/octet-stream","font/"];function s(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var r=0,n=Math.min(e.length,t);r<n;){var i=Math.ceil((r+n)/2);new Blob([e.slice(0,i)]).size<=t?r=i:n=i-1}return r>0&&e.charCodeAt(r-1)>=55296&&56319>=e.charCodeAt(r-1)&&(r-=1),{value:e.slice(0,r),truncated:!0}}var a=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e,t){this.eventCallback=e,this.networkConfig=t,this.observeFetch()},e.prototype.stop=function(){var e;null==(e=this.fetchObserver)||e.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(e){var t;null==(t=this.eventCallback)||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=(0,i.m)();if(t){var r=t.fetch;r&&(t.fetch=function(t,i){return(0,n.sH)(e,void 0,void 0,function(){var e,a,l,u,c,d,h,f,p,g,m,v,y=this;return(0,n.YH)(this,function(n){switch(n.label){case 0:a={timestamp:e=Date.now(),type:"fetch",method:(null==i?void 0:i.method)||"GET",url:t.toString(),requestHeaders:null==i?void 0:i.headers},(null==(l=null==(m=this.networkConfig)?void 0:m.body)?void 0:l.request)&&void 0!==(u=function(e){if(null!=e){if("string"==typeof e)return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var t=[];return e.forEach(function(e,r){t.push("".concat(r,"=").concat("string"==typeof e?e:"[File]"))}),t.join("&")}}}(null==i?void 0:i.body))&&(c=null!=(v=l.maxBodySizeBytes)?v:10240,a.requestBody=s(u,c).value),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,r(t,i)];case 2:if(d=n.sent(),h=Date.now(),a.status=d.status,a.duration=h-e,f={},d.headers.forEach(function(e,t){f[t]=e}),a.responseHeaders=f,null==l?void 0:l.response){var b;(b=f["content-type"]||null)&&o.some(function(e){return b.toLowerCase().startsWith(e)})?(a.responseBodyStatus="skipped_binary",this.notifyEvent(a)):d.clone().text().then(function(e){var t,r=s(e,null!=(t=l.maxBodySizeBytes)?t:10240),n=r.value,i=r.truncated;a.responseBody=n,a.responseBodyStatus=i?"truncated":"captured",y.notifyEvent(a)},function(){a.responseBodyStatus="error",y.notifyEvent(a)})}else this.notifyEvent(a);return[2,d];case 3:throw p=n.sent(),h=Date.now(),a.duration=h-e,g=p,a.error={name:g.name||"UnknownError",message:g.message||"An unknown error occurred"},this.notifyEvent(a),p;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=r})}},e}()},78409(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?0x1fffffffffffff:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},78977(e,t,r){var n=r(35240);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},79548(e,t,r){"use strict";r.d(t,{Cs:()=>f,Ct:()=>k,F3:()=>I,Gp:()=>_,Jn:()=>p,KY:()=>S,L:()=>R,OP:()=>c,SO:()=>O,VU:()=>g,Wx:()=>m,_9:()=>d,bu:()=>l,e5:()=>s,fL:()=>h,fS:()=>o,h2:()=>v,j7:()=>T,lT:()=>y,mG:()=>n,mJ:()=>a,pL:()=>u,q2:()=>w,qr:()=>x,r:()=>i,tt:()=>C,wX:()=>b,wu:()=>E});var n="-",i="AMP",o="".concat(i,"_unsent"),s="$default_instance",a="https://api2.amplitude.com/2/httpapi",l="https://api.eu.amplitude.com/2/httpapi",u="https://api2.amplitude.com/batch",c="https://api.eu.amplitude.com/batch",d="utm_campaign",h="utm_content",f="utm_id",p="utm_medium",g="utm_source",m="utm_term",v="dclid",y="fbclid",b="gbraid",w="gclid",S="ko_click_id",k="li_fat_id",x="msclkid",E="rdt_cid",C="ttclid",_="twclid",O="wbraid",I={utm_campaign:void 0,utm_c
306ontent:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},T=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],R=["authorization","cookie","set-cookie"]},80014(e,t,r){var n=r(3210),i=r(52550);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},81645(e,t,r){"use strict";r.d(t,{E:()=>o,a:()=>i});var n=r(55823),i=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var r=e[t];if(!o(t,r))return!1}return!0},o=function(e,t){var r,o;if("string"!=typeof e)return!1;if(Array.isArray(t)){var s=!0;try{for(var a=(0,n.Ju)(t),l=a.next();!l.done;l=a.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)s=s&&i(u);else if(!["number","string"].includes(typeof u))return!1;if(!s)return!1}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}}else if(null==t)return!1;else if("object"==typeof t)return i(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0}},81958(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},84444(e,t,r){"use strict";let n,i,o,s;r.d(t,{T:()=>P});var a,l,u,c,d,h,f,p,g,m,v,y=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:b(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),b=function(){return"u">typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},w=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),S=function(){return(S=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function k(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}var E=function(e,t){var r,n,i=typeof e;if(i!==typeof t)return!1;try{for(var o=k(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(a&&l){for(var u=0;u<e.length;u++)if(!E(e[u],t[u]))return!1}else{if(!E(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var c=!0;return Object.keys(e).forEach(function(r){E(e[r],t[r])||(c=!1)}),c}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var C=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=S({},this.identity.userProperties),r=S(S({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,i,o,s,a,l=r.userProperties||{};try{for(var u=k(Object.entries(e)),c=u.next();!c.done;c=u.next()){var d=x(c.value,2),h=d[0],f=d[1];switch(h){case"$set":try{for(var p=(i=void 0,k(Object.entries(f))),g=p.next();!g.done;g=p.next()){var m=x(g.value,2),v=m[0],y=m[1];l[v]=y}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,k(Object.keys(f))),w=b.next();!w.done;w=b.next()){var v=w.value;delete l[v]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return S({},this.identity)},e.prototype.setIdentity=function(e){var t=S({},this.identity);this.identity=S({}
306,e),E(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),_="u">typeof globalThis?globalThis:"u">typeof window?window:self,O=function(){function e(){this.identityStore=new C,this.eventBridge=new w,this.applicationContextProvider=new y}return e.getInstance=function(t){return _.analyticsConnectorInstances||(_.analyticsConnectorInstances={}),_.analyticsConnectorInstances[t]||(_.analyticsConnectorInstances[t]=new e),_.analyticsConnectorInstances[t]},e}(),I=["boot"],T=Symbol.for("amplitude-engagement-plugin-caller"),R=((n=R||{}).Local="https://local.amplitude.com:3010/",n.Staging="https://apps.stag2.amplitude.com/",n.Production="https://app.amplitude.com/",n.ProductionEU="https://app.eu.amplitude.com/",n),A=((e=>{if("u">typeof window&&window.opener)for(let t of Object.values(R))window.opener.postMessage({message:e},t)})("ENGAGEMENT_SNIPPET"),a=(e,t,r,n)=>(function(e,t,r,n){for(let i of e){let e=document.createElement("script");e.src=i,e.id="engagement-sdk-bundle",r&&e.setAttribute("nonce",r),t&&e.setAttribute("type",t),n&&(e.onerror=n),document.getElementsByTagName("head")[0].appendChild(e)}})([e||"https://cdn.amplitude.com/engagement-browser/prod/index.min.js.gz"],t,r,n),i="u">typeof window?window.engagement:void 0,o=!1,new Proxy(s={_q:null!=(l=null==i?void 0:i._q)?l:[],_configuration:{apiKey:null!=(c=null==(u=null==i?void 0:i._configuration)?void 0:u.apiKey)?c:"",serverUrl:null==(d=null==i?void 0:i._configuration)?void 0:d.serverUrl,chatUrl:null==(h=null==i?void 0:i._configuration)?void 0:h.chatUrl,mediaUrl:null==(f=null==i?void 0:i._configuration)?void 0:f.mediaUrl,serverZone:null!=(g=null==(p=null==i?void 0:i._configuration)?void 0:p.serverZone)?g:"US",autoRefreshIntervalSeconds:null==(m=null==i?void 0:i._configuration)?void 0:m.autoRefreshIntervalSeconds,options:{...null==(v=null==i?void 0:i._configuration)?void 0:v.options}},init(e,t){var r,n,i,l;let u;if(s._configuration.apiKey)return void console.log("Engagement SDK has already been initialized. Ignoring additional init call.");if(null!=t&&t.useEngagementDomain){let e=(null!=(r=t.serverZone)?r:s._configuration.serverZone)==="EU",n="amplitudeengagement.com";t.serverUrl||(t.serverUrl=e?`https://gs.eu.${n}`:`https://gs.${n}`),t.chatUrl||(t.chatUrl=e?`https://houston-chat.eu.${n}`:`https://houston-chat.${n}`),t.mediaUrl||(t.mediaUrl=e?`https://engagement-static.eu.${n}`:`https://engagement-static.${n}`),t.cdnUrl||(t.cdnUrl=e?`https://cdn.eu.${n}`:`https://cdn.${n}`)}if(s._configuration={...s._configuration,...t,apiKey:e,options:{splitting:!0,...s._configuration.options,...null==t?void 0:t.options}},null!=(i=null==(n=s._configuration)?void 0:n.options)&&i.logger&&s._configuration.options.logger.enable(null!=(l=s._configuration.options.logLevel)?l:2),null!=t&&t.cdnUrl)u=s._configuration.options.splitting?`${t.cdnUrl}/engagement-browser/prod/split/index.js`:t.cdnUrl+"/engagement-browser/prod/index.min.js.gz";else{let e="EU"===s._configuration.serverZone?"https://cdn.eu.amplitude.com":"https://cdn.amplitude.com";u=s._configuration.options.splitting?`${e}/engagement-browser/prod/split/index.js`:`${e}/engagement-browser/prod/index.min.js.gz`}let c=null,d=()=>{if(o=!0,c&&(clearTimeout(c),c=null),s._q&&s._q.length>0)for(console.warn(`Engagement SDK failed to load within ${h}ms. Resolving pending calls gracefully.`);s._q.length>0;){let e=s._q.shift();if(!e)continue;let t=e[0],r=I.includes(t);if(console.warn(`Engagement SDK method '${t}' still in queue (isAsyncMethod=${r}); attempting to resolve as no-op.`),r&&e[1]instanceof Function&&e[2]instanceof Function){let r=e[1];console.warn(`Engagement SDK method '${t}' resolved as no-op due to script loading failure`),r(void 0)}}};a(u,s._configuration.options.splitting?"module":void 0,null==t?void 0:t.nonce,d);let h=1e4;c=setTimeout(()=>{d()},1e4)},plugin(e){let t=s.init;return{name:"@amplitude/engagement-browser",type:"enrichment",async setup(r,n){var i;let o=null!=(i=r.instanceName)?i:"$default_instance",a=O.getInstance(o).identityStore;s._configuration._installedViaPlugin=!0,t(r.apiKey,{serverZone:r.serverZone,...e,options:{logLevel:r.logLevel,logger:r.loggerProvider,...null==e?void 0:e.options}});let l=[{track:e=>{n.track(e)}}];await window.engagement.boot({user:()=>{let e=a.getIdentity();return{user_id:n.getUserId(),device_id:n.getDeviceId(),user_properties:e.userProperties,getSessionId:n.getSessionId}},integrations:l},T),a.addIdentityListener(e=>{var t,r,i,o;if(!(null!=(t=window.engagement)&&t._.user)||!(null!=(r=window.engagement)&&r._analytics.hasBooted))return void console.warn("Engagement SDK not booted. Ignoring identity change.");(null==(o=null==(i=window.engagement)?void 0:i._.user)?void 0:o.user_id
306)!==e.userId?(window.engagement.shutdown(T),window.engagement.boot({user:()=>{let e=a.getIdentity();return{user_id:n.getUserId(),device_id:n.getDeviceId(),user_properties:e.userProperties,getSessionId:n.getSessionId}},integrations:l},T)):window.engagement._setUserProperties(e.userProperties)})},execute:async e=>(window.engagement.forwardEvent(e),e)}}},{get:function(e,t){return t in s?s[t]:"then"!==t?"gs"===t||"rc"===t?new Proxy({},{get:function(e,r){return function(){let e=Array.from(arguments),n=`${t}.${r}`;e.unshift(n),s._q.push(e)}}}):I.includes(t)?function(){let e=Array.prototype.slice.call(arguments);return new Promise((r,n)=>{e.unshift(t,r,n),s._q.push(e),o&&r(void 0)})}:function(){let e=Array.prototype.slice.call(arguments);e.unshift(t),s._q.push(e)}:void 0}})),P=(e,t)=>{"u">typeof window&&!window.engagement&&(window.engagement=A),A.init(e,t)}},85896(e,t,r){e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},87776(e,t,r){var n=r(14553),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||i||Function("return this")()},87810(e,t,r){var n;!function(i,o){"use strict";var s="function",a="undefined",l="object",u="string",c="model",d="name",h="type",f="vendor",p="version",g="architecture",m="console",v="mobile",y="tablet",b="smarttv",w="wearable",S="embedded",k="Amazon",x="Apple",E="ASUS",C="BlackBerry",_="Browser",O="Chrome",I="Firefox",T="Google",R="Huawei",A="Microsoft",P="Motorola",M="Opera",N="Samsung",D="Sharp",L="Sony",U="Xiaomi",j="Zebra",F="Facebook",B=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},H=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},z=function(e,t){return typeof e===u&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)},$=function(e,t){for(var r,n,i,a,u,c,d=0;d<t.length&&!u;){var h=t[d],f=t[d+1];for(r=n=0;r<h.length&&!u;)if(u=h[r++].exec(e))for(i=0;i<f.length;i++)c=u[++n],typeof(a=f[i])===l&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):o):this[a]=c||o;d+=2}},W=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(z(t[r][n],e))return"?"===r?o:r}else if(z(t[r],e))return"?"===r?o:r;return e},K={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"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[d,M]],[/(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],[d,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+_]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+_],p],[/\bfocus\/([\w\.]+)/i],[p,[d,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI "+_]],[/fxios\/([-\w\.]+)/i],[p,[d,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+_]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+_],p],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+_]],[/(chrome|omniweb|arora|[t
vendor: 4,850 bytes, line 306
306izenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,W,{"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],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,I+" 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],[d,p],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,q]],[/((?: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/,"",q]],[/(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,q]]],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],[c,[f,N],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[f,N],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[c,[f,x],[h,v]],[/(ipad\d+,\d+)/i],[c,[f,x],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[c,[f,x],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,x],[h,y]],[/(macintosh);/i],[c,[f,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[f,R],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[f,R],[h,v]],[/\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],[[c,/_/g," "],[f,U],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[f,U],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[f,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[f,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[f,"Realme"],[h,v]],[/\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],[c,[f,P],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[f,P],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[f,"LG"],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[f,"LG"],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[f,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[f,"Nokia"],[h,v]],[/(pixel c)\b/i],[c,[f,T],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[f,T],[h,v]],[/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],[c,[f,L],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[f,L],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[f,k],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[f,k],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[c,f,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[f,C],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[f,E],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[f,E],[h,v]],[/(nexus 9)/i],[c,[f,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[c,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[f,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[f,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[f,D],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 4,530 bytes, line 306
306s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,c,[h,v]],[/(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],[f,c,[h,y]],[/(surface duo)/i],[c,[f,A],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[f,"Fairphone"],[h,v]],[/(u304aa)/i],[c,[f,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[c,[f,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[c,[f,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[c,[f,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[c,[f,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[f,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[c,[f,"NuVision"],[h,y]],[/\b(k88) b/i],[c,[f,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[c,[f,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[c,[f,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[c,[f,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[c,[f,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],c,[h,y]],[/\b(ns-?\w{0,9}) b/i],[c,[f,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[f,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],c,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],c,[h,v]],[/\b(ph-1) /i],[c,[f,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[f,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[c,[f,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[c,[f,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[c,[f,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[f,c,[h,v]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,A],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,j],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,j],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,c,[h,m]],[/droid.+; (shield) bui/i],[c,[f,"Nvidia"],[h,m]],[/(playstation [345portablevi]+)/i],[c,[f,L],[h,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[f,A],[h,m]],[/smart-tv.+(samsung)/i],[f,[h,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,N],[h,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,"LG"],[h,b]],[/(apple) ?tv/i],[f,[c,x+" TV"],[h,b]],[/crkey/i],[[c,O+"cast"],[f,T],[h,b]],[/droid.+aft(\w)( bui|\))/i],[c,[f,k],[h,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[f,D],[h,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[f,L],[h,b]],[/(mitv-\w{5}) bui/i],[c,[f,U],[h,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[f,V],[c,V],[h,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,b]],[/((pebble))app/i],[f,c,[h,w]],[/droid.+; (glass) \d/i],[c,[f,T],[h,w]],[/droid.+; (wt63?0{2,3})\)/i],[c,[f,j],[h,w]],[/(quest( 2)?)/i],[c,[f,F],[h,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"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],[d,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[p,W,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[p,W,K]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,p],[/\(bb(10);/i],[p,[d,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[d,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[d,O+"
306cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[d,"Chromium OS"],p],[/(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],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,p]]},Y=function(e,t){if(typeof e===l&&(t=e,e=o),!(this instanceof Y))return new Y(e,t).getResult();var r=e||(typeof i!==a&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?B(J,t):J;return this.getBrowser=function(){var e,t={};return t[d]=o,t[p]=o,$.call(t,r,n.browser),t.major=typeof(e=t.version)===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o,t},this.getCPU=function(){var e={};return e[g]=o,$.call(e,r,n.cpu),e},this.getDevice=function(){var e={};return e[f]=o,e[c]=o,e[h]=o,$.call(e,r,n.device),e},this.getEngine=function(){var e={};return e[d]=o,e[p]=o,$.call(e,r,n.engine),e},this.getOS=function(){var e={};return e[d]=o,e[p]=o,$.call(e,r,n.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?V(e,350):e,this},this.setUA(r),this};Y.VERSION="0.7.33",Y.BROWSER=H([d,p,"major"]),Y.CPU=H([g]),Y.DEVICE=H([c,f,h,m,v,b,y,w,S]),Y.ENGINE=Y.OS=H([d,p]),typeof t!==a?(e.exports&&(t=e.exports=Y),t.UAParser=Y):r.amdO?o===(n=(function(){return Y}).call(t,r,t,e))||(e.exports=n):typeof i!==a&&(i.UAParser=Y);var G=typeof i!==a&&(i.jQuery||i.Zepto);if(G&&!G.ua){var X=new Y;G.ua=X.getResult(),G.ua.get=function(){return X.getUA()},G.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var r in t)G.ua[r]=t[r]}}}("object"==typeof window?window:this)},89463(e,t,r){var n,i,o=r(23184);n=i||(i={}),function(e){var t="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(n);function o(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===t.Reflect?t.Reflect=n:i=o(t.Reflect,i),e(i)}(function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a=({__proto__:[]})instanceof Array,l=!s&&!a,u={create:s?function(){return R(Object.create(null))}:a?function(){return R({__proto__:null})}:function(){return R({})},has:l?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:l?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),d="object"==typeof o&&o.env&&"true"===o.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=d||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();function n(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(n.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),n.prototype.has=function(e){return this._find(e,!1)>=0},n.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},n.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},n.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},n.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},n.prototype.keys=function(){return new r(this._keys,this._values,o)},n.prototype.values=function(){return new r(this._keys,this._values,s)},n.prototype.entries=function(){return new r(this._keys,this._values,a)},n.prototype["@@iterator"]=function(){return this.entries()},n.prototype[i]=function(){return this.entries()},n.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},n;function o(e,t){return e}function s(e,t){return t}function a(e,t){return[e,t]}}():Map,f=d||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}():Set,p=new(d||"function"!=typeof WeakMap?function(){var e=u.create(),r=i();function n(){this._key=i()}return n.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},n.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},n.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},n.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},n.prototype.clear=function(){this._key=i()},n;function i(){var t;do t="@@WeakMap@@"+function(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(16)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(16)):s(new Uint8Array(e),e):s(Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<16;++n){var i=t[n];(4===n||6===n||8===n)&&(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}();while(u.has(e,t))return e[t]=!0,t}function o(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function s(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}}():WeakMap);function g(e,t,r){var n=p.get(e);if(S(n)){if(!r)return;n=new h,p.set(e,n)}var i=n.get(t);if(S(i)){if(!r)return;i=new h,n.set(t,i)}return i}function m(e,t,r){var n=g(t,r,!1);return!S(n)&&!!n.has(e)}function v(e,t,r){var n=g(t,r,!1);if(!S(n))return n.get(e)}function y(e,t,r,n){g(r,n,!0).set(e,t)}function b(e,t){var r=[],n=g(e,t,!1);if(S(n))return r;for(var o=function(e){var t=I(e,i);if(!_(t))throw TypeError();var r=t.call(e);
306if(!x(r))throw TypeError();return r}(n.keys()),s=0;;){var a=function(e){var t=e.next();return!t.done&&t}(o);if(!a)return r.length=s,r;var l=a.value;try{r[s]=l}catch(e){try{!function(e){var t=e.return;t&&t.call(e)}(o)}finally{throw e}}s++}}function w(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function k(e){return null===e}function x(e){return"object"==typeof e?null!==e:"function"==typeof e}function E(e){var t=function(e,t){switch(w(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",i=I(e,n);if(void 0!==i){var o=i.call(e,r);if(x(o))throw TypeError();return o}return function(e,t){if("string"===t){var r=e.toString;if(_(r)){var n=r.call(e);if(!x(n))return n}var i=e.valueOf;if(_(i)){var n=i.call(e);if(!x(n))return n}}else{var i=e.valueOf;if(_(i)){var n=i.call(e);if(!x(n))return n}var o=e.toString;if(_(o)){var n=o.call(e);if(!x(n))return n}}throw TypeError()}(e,r)}(e,0);return"symbol"==typeof t?t:""+t}function C(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function _(e){return"function"==typeof e}function O(e){return"function"==typeof e}function I(e,t){var r=e[t];if(null!=r){if(!_(r))throw TypeError();return r}}function T(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c||t!==c)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function R(e){return e.__=void 0,delete e.__,e}e("decorate",function(e,t,r,n){if(S(r)){if(!C(e)||!O(t))throw TypeError();for(var i=e,o=t,s=i.length-1;s>=0;--s){var a=(0,i[s])(o);if(!S(a)&&!k(a)){if(!O(a))throw TypeError();o=a}}return o}if(!C(e)||!x(t)||!x(n)&&!S(n)&&!k(n))throw TypeError();return k(n)&&(n=void 0),function(e,t,r,n){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,r,n);if(!S(o)&&!k(o)){if(!x(o))throw TypeError();n=o}}return n}(e,t,r=E(r),n)}),e("metadata",function(e,t){return function(r,n){if(!x(r)||!S(n)&&!function(e){switch(w(e)){case 3:case 4:return!0;default:return!1}}(n))throw TypeError();y(e,t,r,n)}}),e("defineMetadata",function(e,t,r,n){if(!x(r))throw TypeError();return S(n)||(n=E(n)),y(e,t,r,n)}),e("hasMetadata",function(e,t,r){if(!x(t))throw TypeError();return S(r)||(r=E(r)),function e(t,r,n){if(m(t,r,n))return!0;var i=T(r);return!k(i)&&e(t,i,n)}(e,t,r)}),e("hasOwnMetadata",function(e,t,r){if(!x(t))throw TypeError();return S(r)||(r=E(r)),m(e,t,r)}),e("getMetadata",function(e,t,r){if(!x(t))throw TypeError();return S(r)||(r=E(r)),function e(t,r,n){if(m(t,r,n))return v(t,r,n);var i=T(r);if(!k(i))return e(t,i,n)}(e,t,r)}),e("getOwnMetadata",function(e,t,r){if(!x(t))throw TypeError();return S(r)||(r=E(r)),v(e,t,r)}),e("getMetadataKeys",function(e,t){if(!x(e))throw TypeError();return S(t)||(t=E(t)),function e(t,r){var n=b(t,r),i=T(t);if(null===i)return n;var o=e(i,r);if(o.length<=0)return n;if(n.length<=0)return o;for(var s=new f,a=[],l=0;l<n.length;l++){var u=n[l],c=s.has(u);c||(s.add(u),a.push(u))}for(var d=0;d<o.length;d++){var u=o[d],c=s.has(u);c||(s.add(u),a.push(u))}return a}(e,t)}),e("getOwnMetadataKeys",function(e,t){if(!x(e))throw TypeError();return S(t)||(t=E(t)),b(e,t)}),e("deleteMetadata",function(e,t,r){if(!x(t))throw TypeError();S(r)||(r=E(r));var n=g(t,r,!1);if(S(n)||!n.delete(e))return!1;if(n.size>0)return!0;var i=p.get(t);return i.delete(r),i.size>0||(p.delete(t),!0)})})},89992(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},95421(e,t,r){var n=r(85896),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||i||Function("return this")()},96708(e,t,r){var n=r(64809),i=r(76),o=r(60961);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},99895(e,t,r){e.exports=r(58463)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.