PageSourceSearch

https://app.webability.io/assets/app-vendor-nlFuy7bi.js

js webability.io collected 2026-10-02 09:58:31 UTC 389,529 bytes, 3 lines download raw bytes

1import{R as N,a as im,_ as sm,g as oe,t as am,r as pe,b as nt,c as tt,d as Yt,e as om,f as qt}from"./vendor-CXh69xiq.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"app-build-1790920293420"};var e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="89410c28-1c4f-45d4-b274-427c095d0bb0",r._sentryDebugIdIdentifier="sentry-dbid-89410c28-1c4f-45d4-b274-427c095d0bb0")}catch{}})();function um(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var E=typeof window<"u"?window:void 0,Ie=typeof globalThis<"u"?globalThis:E,qe=Ie==null?void 0:Ie.navigator,D=Ie==null?void 0:Ie.document,ge=Ie==null?void 0:Ie.location,Sl=Ie==null?void 0:Ie.fetch,Fu=Ie!=null&&Ie.XMLHttpRequest&&"withCredentials"in new Ie.XMLHttpRequest?Ie.XMLHttpRequest:void 0,uc=Ie==null?void 0:Ie.AbortController,lm=Ie==null?void 0:Ie.CompressionStream,Le=qe==null?void 0:qe.userAgent;function xv(){return!(!E||E.navigator.onLine===!1)}var Tr=typeof globalThis<"u"?globalThis:E;Tr&&typeof self>"u"&&(Tr.self=Tr),Tr&&typeof File>"u"&&(Tr.File=function(){});var B=E??{},lc="0.2.0",ee={DEBUG:!1,LIB_VERSION:lc,LIB_NAME:"browser-common",JS_SDK_VERSION:lc};function cc(r,e,t,n,i,s,a){try{var o=r[s](a),u=o.value}catch(c){return void t(c)}o.done?e(u):Promise.resolve(u).then(n,i)}function ve(r){return function(){var e=this,t=arguments;return new Promise((function(n,i){var s=r.apply(e,t);function a(u){cc(s,n,i,a,o,"next",u)}function o(u){cc(s,n,i,a,o,"throw",u)}a(void 0)}))}}function A(){return A=Object.assign?Object.assign.bind():function(r){for(var e=1;arguments.length>e;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},A.apply(null,arguments)}function Sv(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}var dc=r=>{if(typeof r!="string")return r;try{return JSON.parse(r)}catch{return r}};function fc(r){return typeof r=="string"||r}function hc(r){return typeof r=="string"?r:void 0}var Pr,cm=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],wt=(function(r){return r.AnonymousId="anonymous_id",r.DistinctId="distinct_id",r.Props="props",r.EnablePersonProcessing="enable_person_processing",r.PersonMode="person_mode",r.FeatureFlagDetails="feature_flag_details",r.FeatureFlags="feature_flags",r.FeatureFlagPayloads="feature_flag_payloads",r.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",r.BootstrapFeatureFlags="bootstrap_feature_flags",r.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",r.OverrideFeatureFlags="override_feature_flags",r.Queue="queue",r.AiQueue="ai_queue",r.LogsQueue="logs_queue",r.OptedOut="opted_out",r.SessionId="session_id",r.SessionStartTimestamp="session_start_timestamp",r.SessionLastTimestamp="session_timestamp",r.PersonProperties="person_properties",r.GroupProperties="group_properties",r.InstalledAppBuild="installed_app_build",r.InstalledAppVersion="installed_app_version",r.SessionReplay="session_replay",r.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",r.SurveyLastSeenDate="survey_last_seen_date",r.SurveysSeen="surveys_seen",r.Surveys="surveys",r.RemoteConfig="remote_config",r.FlagsEndpointWasHit="flags_endpoint_was_hit",r.DeviceId="device_id",r})({}),pc=(function(r){return r.GZipJS="gzip-js",r.Base64="base64",r})({}),dm=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],fm=["token"],Ev="NativeGzipValidationError",qu=r=>r.length>=2&&r[0]===31&&r[1]===139,vc=(r,e)=>r===pc.GZipJS||e===pc.GZipJS||e==="gzip",gc=r=>!(!r||typeof r!="object")&&("name"in r?String(r.name):"")==="NotReadableError",gn=r=>
1{var e=new Error("Native gzip produced invalid output: "+r);throw e.name=Ev,e},hm=(function(){var r=ve((function*(e,t){18>e.size&&gn("too-short");var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());qu(n)&&n[2]===8||gn("invalid-header");var i=new DataView(yield e.slice(e.size-8).arrayBuffer());i.getUint32(0,!0)!==(a=>{for(var o=(()=>{if(Pr)return Pr;Pr=[];for(var d=0;256>d;d++){for(var l=d,f=0;8>f;f++)l=1&l?3988292384^l>>>1:l>>>1;Pr[d]=l>>>0}return Pr})(),u=4294967295,c=0;a.length>c;c++)u=o[255&(u^a[c])]^u>>>8;return(4294967295^u)>>>0})(t)&&gn("invalid-crc");var s=t.length>>>0;i.getUint32(4,!0)!==s&&gn("invalid-size")}));return function(e,t){return r.apply(this,arguments)}})();function Mu(){return Mu=ve((function*(r,e,t){e===void 0&&(e=!0);try{var n=new TextEncoder().encode(r),i=new globalThis.CompressionStream("gzip"),s=i.writable.getWriter(),a=s.write(n).then((()=>s.close())).catch((function(){var c=ve((function*(d){try{yield s.abort(d)}catch{}throw d}));return function(d){return c.apply(this,arguments)}})()),o=new Response(i.readable).blob(),u=(yield Promise.all([o,a]))[0];return yield hm(u,n),u}catch(c){if(t!=null&&t.rethrow)throw c;return e&&console.error("Failed to gzip compress data",c),null}})),Mu.apply(this,arguments)}var pm=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],_c=function(r,e){if(e===void 0&&(e=[]),!r)return!1;var t=r.toLowerCase();return pm.concat(e).some((n=>{var i=n.toLowerCase();return t.indexOf(i)!==-1}))};function G(r,e){return r.indexOf(e)!==-1}var di=function(r){return r.trim()},Lu=function(r){return r.replace(/^\$/,"")};function Ov(r){var e,t=[];return(e=JSON.stringify(r,(function(n,i){if(typeof i=="bigint")return i.toString();if(typeof i!="function"&&typeof i!="symbol"){if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i&&typeof i=="object"){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(i))return"[Circular]";t.push(i)}return i}})))!==null&&e!==void 0?e:"null"}var Tv=Object.prototype,Pv=Tv.hasOwnProperty,fi=Tv.toString,J=Array.isArray||function(r){return fi.call(r)==="[object Array]"},et=r=>typeof r=="function",ue=r=>r===Object(r)&&!J(r),Ft=r=>{if(ue(r)){for(var e in r)if(Pv.call(r,e))return!1;return!0}return!1},F=r=>r===void 0,te=r=>fi.call(r)=="[object String]",Nu=r=>te(r)&&r.trim().length===0,Me=r=>r===null,W=r=>F(r)||Me(r),Te=r=>fi.call(r)=="[object Number]"&&r==r,yt=r=>Te(r)&&r>0,rt=r=>fi.call(r)==="[object Boolean]",vm=r=>r instanceof FormData,gm=r=>G(dm,r),_m=r=>G(fm,r);function Rv(r){return r===null||typeof r!="object"}function Nn(r,e){return{}.toString.call(r)==="[object "+e+"]"}function El(r){return typeof Event<"u"&&(function(e,t){try{return e instanceof t}catch{return!1}})(r,Event)}var mm=[!0,"true",1,"1","yes"],Oi=r=>G(mm,r),ym=[!1,"false",0,"0","no"];function dt(r,e,t,n,i){return e>t&&(n.warn("min cannot be greater than max."),e=t),Te(r)?r>t?(n.warn(" cannot be  greater than max: "+t+". Using max value instead."),t):e>r?(n.warn(" cannot be less than min: "+e+". Using min value instead."),e):r:(n.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+i),dt(i||t,e,t,n))}class bm{constructor(e){this.tt={},this.et=e.et,this.rt=dt(e.bucketSize,0,100,e.it),this.nt=dt(e.refillRate,0,this.rt,e.it),this.st=dt(e.refillInterval,0,864e5,e.it)}ot(e,t){var n=Math.floor((t-e.lastAccess)/this.st);n>0&&(e.tokens=Math.min(e.tokens+n*this.nt,this.rt),e.lastAccess=e.lastAccess+n*this.st)}consumeRateLimit(e){var t,n=Date.now(),i=String(e),s=this.tt[i];return s?this.ot(s,n):this.tt[i]=s={tokens:this.rt,lastAccess:n},s.tokens===0||(s.tokens--,s.tokens===0&&((t=this.et)==null||t.call(this,e)),s.tokens===0)}stop(){this.tt={}}}var ze="Mobile",Dn="iOS",Tt="Android",mr="Tablet",kv=Tt+" "+mr,Iv="iPad",Cv="Apple",Av=Cv+" Watch",Kr="Safari",yr="BlackBerry",Fv="Samsung",qv=Fv+"Browser",Mv=Fv+" Internet",Zt="Chrome",wm=Zt+" OS",Lv=Zt+" "+Dn,Ol="Internet Explorer",Nv=Ol+" "+ze,Tl="Opera",xm=Tl+" Mini",Pl="Edge",Dv="Microsoft "+Pl,gr="Firefox",jv=gr+" "+Dn,Qr="Nintendo",en="PlayStation",_r="Xbox",$v=Tt+" "+ze,Bv=ze+" "+Kr,Dr="Windows",Du=Dr+" Phone",mc="Nokia",ju="Ouya",Hv="Generic",Sm=Hv+" "+ze.toLowerCase(),Uv=Hv+" "+mr.toLowerCase(),$u="Konqueror",zv="Oculus Browser",jn="Vivaldi",Gv="Yandex",$n="Whale",Bu="DuckDuckGo",Vv="Pale Moon",Bn="Waterfox",Wr="Brave",Kv="Google Search App",de="(\\d+(\\.\\d+)?)",Ti=new RegExp("Version/"+de),Em=new RegExp(_r,"i"),Om=new RegExp(en+" \\w+","i"),Tm=new RegExp(Qr+" \\w+","i"),Rl=new RegExp(yr+"|PlayBook|BB10","i"),Pm={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},Wv=function(r,e,t,n){e=e||"";var i=(function(s){return s!=null&&s.brave?Wr:null})(t);
1return i||(n!=null&&n.detectGoogleSearchApp&&G(r,"GSA/")?Kv:G(r," OPR/")&&G(r,"Mini")?xm:G(r," OPR/")?Tl:Rl.test(r)?yr:G(r,"IE"+ze)||G(r,"WPDesktop")?Nv:G(r,"OculusBrowser")?zv:G(r,qv)?Mv:G(r,Pl)||G(r,"Edg/")?Dv:G(r,jn+"/")?jn:G(r,"YaBrowser/")?Gv:G(r,$n+"/")?$n:G(r,Bu+"/")||G(r,"Ddg/")?Bu:G(r,"FBIOS")?"Facebook "+ze:G(r,"UCWEB")||G(r,"UCBrowser")?"UC Browser":G(r,"CriOS")?Lv:G(r,"CrMo")||G(r,Zt)?Zt:G(r,Tt)&&G(r,Kr)?$v:G(r,"FxiOS")?jv:G(r.toLowerCase(),$u.toLowerCase())?$u:G(r,Wr+"/")?Wr:((s,a)=>a&&G(a,Cv)||(function(o){return G(o,Kr)&&!G(o,Zt)&&!G(o,Tt)})(s))(r,e)?G(r,ze)?Bv:Kr:G(r,"PaleMoon/")?Vv:G(r,Bn+"/")?Bn:G(r,gr)?gr:G(r,"MSIE")||G(r,"Trident/")?Ol:G(r,"Gecko")?gr:"")},Rm={[Nv]:[new RegExp("rv:"+de)],[Dv]:[new RegExp(Pl+"?\\/"+de)],[Zt]:[new RegExp("("+Zt+"|CrMo)\\/"+de)],[Lv]:[new RegExp("CriOS\\/"+de)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+de)],[Kr]:[Ti],[Bv]:[Ti],[Tl]:[new RegExp("(Opera|OPR)\\/"+de)],[gr]:[new RegExp(gr+"\\/"+de)],[jv]:[new RegExp("FxiOS\\/"+de)],[$u]:[new RegExp("Konqueror[:/]?"+de,"i")],[yr]:[new RegExp(yr+" "+de),Ti],[$v]:[new RegExp("android\\s"+de,"i")],[Mv]:[new RegExp(qv+"\\/"+de)],[zv]:[new RegExp("OculusBrowser\\/"+de)],[jn]:[new RegExp(jn+"\\/"+de)],[Gv]:[new RegExp("YaBrowser\\/"+de)],[$n]:[new RegExp($n+"\\/"+de)],[Wr]:[new RegExp(Wr+"\\/"+de)],[Bu]:[new RegExp("(DuckDuckGo|Ddg)\\/"+de)],[Vv]:[new RegExp("PaleMoon\\/"+de)],[Bn]:[new RegExp(Bn+"\\/"+de)],[Kv]:[new RegExp("GSA\\/"+de)],[Ol]:[new RegExp("(rv:|MSIE )"+de)],Mozilla:[new RegExp("rv:"+de)]},km=function(r,e,t,n){var i=Wv(r,e,t,n),s=Rm[i];if(F(s))return null;for(var a=0;s.length>a;a++){var o=r.match(s[a]);if(o)return parseFloat(o[o.length-2])}return null},yc=[[new RegExp(_r+"; "+_r+" (.*?)[);]","i"),r=>[_r,r&&r[1]||""]],[new RegExp(Qr,"i"),[Qr,""]],[new RegExp(en,"i"),[en,""]],[Rl,[yr,""]],[new RegExp(Dr,"i"),(r,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Du,""];if(new RegExp(ze).test(e)&&!/IEMobile\b/.test(e))return[Dr+" "+ze,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var n=Pm[t[1]]||"";return/arm/i.test(e)&&(n="RT"),[Dr,n]}return[Dr,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,r=>r&&r[3]?[Dn,[r[3],r[4],r[5]||"0"].join(".")]:[Dn,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,r=>{var e="";return r&&r.length>=3&&(e=F(r[2])?r[3]:r[2]),["watchOS",e]}],[new RegExp("("+Tt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Tt+")","i"),r=>r&&r[2]?[Tt,[r[2],r[3],r[4]||"0"].join(".")]:[Tt,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,r=>{var e=["Mac OS X",""];return r&&r[1]&&(e[1]=[r[1],r[2],r[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[wm,""]],[/Linux|debian/i,["Linux",""]]],bc=function(r){return Tm.test(r)?Qr:Om.test(r)?en:Em.test(r)?_r:new RegExp(ju,"i").test(r)?ju:new RegExp("("+Du+"|WPDesktop)","i").test(r)?Du:/iPad/.test(r)?Iv:/iPod/.test(r)?"iPod Touch":/iPhone/.test(r)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(r)?Av:Rl.test(r)?yr:/(kobo)\s(ereader|touch)/i.test(r)?"Kobo":new RegExp(mc,"i").test(r)?mc:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(r)||/(kf[a-z]+)( bui|\)).+silk\//i.test(r)?"Kindle Fire":/(Android|ZTE)/i.test(r)?new RegExp(ze).test(r)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(r)||/pixel[\daxl ]{1,6}/i.test(r)&&!/pixel c/i.test(r)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(r)||/lmy47v/i.test(r)&&!/QTAQZ3/i.test(r)?Tt:kv:new RegExp("(pda|"+ze+")","i").test(r)?Sm:new RegExp(mr,"i").test(r)&&!new RegExp(mr+" pc","i").test(r)?Uv:""},Im=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function wc(r,e){return typeof(t=r)=="string"&&Im.test(t)?r:e();var t}function Mt(r){return r&&r.split("#")[0]}function kn(r,e){var t=setTimeout(r,e);return t!=null&&t.unref&&(t==null||t.unref()),t}var Cm=r=>r instanceof Error,Jv={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},Am=Jv.info;function Yv(r){if(rt(r))return{boolValue:r};if(typeof r=="number")return Number.isFinite(r)?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:{stringValue:String(r)};if(typeof r=="string")return{stringValue:r};if(J(r))return{arrayValue:{values:r.map((e=>Yv(e)))}};try{return{stringValue:JSON.stringify(r)}}catch{return{stringValue:String(r)}}}function Hn(r){var e=[];for(var t in r){var n=r[t];Me(n)||F(n)||e.push({key:t,value:Yv(n)})}return e}function Fm(r,e){var t=Jv[r.level||"info"]||Am,n=t.text,i=t.number,s=String(Date.now())+"000000",a={};e.distinctId&&(a.posthogDistinctId=e.distinctId),e.sessionId&&(a.sessionId=e.sessionId),e.windowId&&(a["window.id"]=e.windowId),W(e.sessionStartTimestamp)||(a.sessionStartTimestamp=String(e.sessionStartTimestamp)),W(e.lastActivityTimestamp)||(a.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(a["url.full"]=e.currentUrl),e.screenName&&(a["screen.name"]=e.screenName),e.a
1ppState&&(a["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(a.feature_flags=e.activeFeatureFlags);var o=A({},a,r.attributes||{}),u={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:i,severityText:n,body:{stringValue:r.body},attributes:Hn(o)};return r.trace_id&&(u.traceId=r.trace_id),r.span_id&&(u.spanId=r.span_id),F(r.trace_flags)||(u.flags=r.trace_flags),u}function Xv(r,e,t){return A({},r.resourceAttributes,{"service.name":r.serviceName||"unknown_service"},r.environment&&{"deployment.environment":r.environment},r.serviceVersion&&{"service.version":r.serviceVersion},{"telemetry.sdk.name":e,"telemetry.sdk.version":t})}function Zv(r,e,t,n){return{resourceLogs:[{resource:{attributes:Hn(e)},scopeLogs:[{scope:{name:t,version:n},logRecords:r}]}]}}let qm=class{constructor(r,e,t,n,i,s,a){var o;s===void 0&&(s=()=>Promise.resolve()),this._instance=r,this.Te=e,this.it=t,this.ut=n,this.ht=i,this.dt=s,this.ct=a,this.vt=null,this.ft=0,this.yt=0,this.bt=0,this._t=0,this.wt=!1,this.xt=e.maxBufferSize,this.kt=Math.max((o=e.maxQueueSize)!==null&&o!==void 0?o:e.maxBufferSize,e.maxBufferSize),this.St=e.flushIntervalMs,this.Ct=e.maxBatchRecordsPerPost,this.It=e.rateCapWindowMs,this.Tt=e.maxLogsPerInterval}reset(){this.Mt(),this.vt=null,this.bt=0,this._t=0,this.wt=!1,this.ft=0,this.yt=0,this.Ct=this.Te.maxBatchRecordsPerPost}onReconnect(){this.yt=0,this.Et()}captureLog(r){if(!this._instance.isDisabled&&!this._instance.optedOut&&r!=null&&r.body){var e=this.Rt(r);if(e!==null)if(e.body){if(this.Pt()){var t={record:Fm(e,this.ut())};this.ht((()=>this.Ot(t)))}}else this.it.info("Log was rejected in beforeSend function")}}Rt(r){var e=this.Te.beforeSend;if(!e)return r;var t=J(e)?e:[e],n=r;for(var i of t)try{var s=i(n);if(!s)return this.it.info("Log was rejected in beforeSend function"),null;n=s}catch(a){return this.it.error("Error in beforeSend function for log:",a),null}return n}Pt(){if(this.Tt===void 0)return!0;var r=Date.now(),e=r-this.bt;return this.It>e&&e>=0||(this.bt=r,this._t=0,this.wt=!1),this.Tt>this._t?(this._t++,!0):(this.wt||(this.it.warn("captureLog dropping logs: exceeded "+this.Tt+" logs per "+this.It+"ms"),this.wt=!0),!1)}flush(){var r=this;return ve((function*(){if(!r._instance.isDisabled)return r.vt||(r.vt=r.Ft().finally((()=>{r.vt=null}))),r.vt}))()}Ft(){var r=this;return ve((function*(){var e;r.Mt();var t=(e=r._instance.getPersistedProperty(wt.LogsQueue))!==null&&e!==void 0?e:[];if(t.length!==0)for(var n=t.length,i=0;t.length>0&&n>i;){var s,a;r.ft=0;var o=Math.min(t.length,r.Ct),u=t.slice(0,o),c=Zv(u.map((l=>l.record)),r.Lt(),(s=r.ct)!==null&&s!==void 0?s:r._instance.getLibraryId(),r._instance.getLibraryVersion()),d=yield r._instance.$t(c);if(d.kind==="too-large"&&u.length>1)r.Ct=Math.max(1,Math.floor(u.length/2)),r.it.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+r.Ct);else if(d.kind==="retry-later"||(d.kind==="too-large"?r.it.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):d.kind==="ok"&&r.Te.maxBatchRecordsPerPost>r.Ct&&(r.Ct=Math.min(r.Te.maxBatchRecordsPerPost,r.Ct+1)),yield r.At(u.length),t=(a=r._instance.getPersistedProperty(wt.LogsQueue))!==null&&a!==void 0?a:[],i+=u.length,d.kind==="fatal"))throw d.error}}))()}At(r){var e=this;return ve((function*(){var t,n=Math.max(0,r-e.ft),i=(t=e._instance.getPersistedProperty(wt.LogsQueue))!==null&&t!==void 0?t:[];e._instance.setPersistedProperty(wt.LogsQueue,i.slice(n)),yield e.dt()}))()}Lt(){return Xv(this.Te,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ot(r){var e;if(!this._instance.optedOut){var t=(e=this._instance.getPersistedProperty(wt.LogsQueue))!==null&&e!==void 0?e:[];this.kt>t.length||(t.shift(),this.ft++,this.it.info("Logs queue is full, dropping oldest record.")),t.push(r),this._instance.setPersistedProperty(wt.LogsQueue,t),this.xt>t.length?this.Nt():this.Et()}}Nt(r){r===void 0&&(r=this.St),this.Dt||(this.Dt=kn((()=>{this.Dt=void 0,this.Et()}),r))}qt(){var r=Math.min(Math.max(0,this.yt-1),6);return this.St*Math.pow(2,r)}jt(){var r=this._instance.getPersistedProperty(wt.LogsQueue);return!!r&&r.length>0}shutdown(r){var e=this;return ve((function*(){e.Mt();var t=e.flush().catch((()=>{}));r!==void 0?yield Promise.race([t,new Promise((n=>kn(n,r)))]):yield t}))()}flushWithTimeout(r){var e=this;return ve((function*(){var t=!1,n=e.flush(),i=new Promise((s=>kn((()=>{t=!0,s()}),r)));try{yield Promise.race([n,i])}finally{t&&n.catch((()=>{}))}}))()}Et(){this.flush().then((()=>{this.yt=0}),(r=>{this.yt++,this.it.error("PostHog logs flush failed:",r)})).finally((()=>{!this._instance.isDisabled&&this.jt()&&this.Nt(this.qt())}))}Mt(){this.Dt&&(clearTimeout(this.Dt),this.Dt=void 0)}};var Pi=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function xc(r){return String(r)+"000000"}function Sc(r,e,t,n){var i="";return n&&(i=Object.keys(n).sort().map((s=>JSON.stringify(s)+":"+JSON.stringify(n[s]))).join(",")),r+"\0"+e+"\0"+(t??"")+"\0"+i}let Mm=class{constructor(r,e,t){this._instance=r,this.Te=e,this.it=t,this.Ht=new Map,this.vt=null,this.Bt=!1,this.Ut=new Map,this.zt=new Set,this.Vt=0}count(r,e,t){e===void 0&&(e=1),this.Wt({name:r,type:"count",value:e,unit:t==null?void 0:t.unit,attributes:t==null?void 0:t.attributes})}
1gauge(r,e,t){this.Wt({name:r,type:"gauge",value:e,unit:t==null?void 0:t.unit,attributes:t==null?void 0:t.attributes})}histogram(r,e,t){this.Wt({name:r,type:"histogram",value:e,unit:t==null?void 0:t.unit,attributes:t==null?void 0:t.attributes})}flush(){var r=this,e=this.vt,t=(function(){var i=ve((function*(){e&&(yield e.catch((()=>{}))),yield r.Zt()}));return function(){return i.apply(this,arguments)}})(),n=t().finally((()=>{this.vt===n&&(this.vt=null)}));return this.vt=n,n}drainWindow(){if(this.Ht.size===0)return null;var r=this.Ht;return this.Ht=new Map,this.Bt=!1,this.Ut=new Map,this.zt=new Set,this.Gt(r)}reset(){this.Vt++,this.Mt(),this.Ht=new Map,this.vt=null,this.Bt=!1,this.Ut=new Map,this.zt=new Set}Wt(r){if(!this._instance.isDisabled&&!this._instance.optedOut){var e=this.Rt(r);if(e!==null)if(e.name&&typeof e.name=="string")if(typeof e.value=="number"&&Number.isFinite(e.value))if(e.type==="count"&&0>e.value)this.it.warn("Dropping count '"+e.name+"': counters are monotonic, value must be >= 0");else{var t,n;try{t=e.attributes?A({},e.attributes):void 0,n=Sc(e.type,e.name,e.unit,t)}catch(a){return void this.it.warn("Dropping metric '"+e.name+"': attributes could not be serialized",a)}var i=this.Ht.get(n);if(!i){if(!this.Qt())return;i={name:e.name,type:e.type,unit:e.unit,attributes:t,windowStartMs:Date.now()},this.Ht.set(n,i)}var s=this.Ut.get(e.name);s===void 0?this.Ut.set(e.name,e.type):s===e.type||this.zt.has(e.name)||(this.zt.add(e.name),this.it.warn("Metric name '"+e.name+"' is already used as a "+s+"; recording it as a "+e.type+" too will blend both series in charts. Use a distinct name.")),this.Jt(i,e.value),this.Nt()}else this.it.warn("Dropping metric '"+e.name+"': value must be a finite number");else this.it.warn("Dropping metric with empty name")}}Qt(){return this.Te.maxSeriesPerFlush>this.Ht.size||(this.Bt||(this.Bt=!0,this.it.warn("Metric series cap reached ("+this.Te.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Jt(r,e){var t;switch(r.type){case"count":r.total=((t=r.total)!==null&&t!==void 0?t:0)+e;break;case"gauge":r.last=e;break;case"histogram":r.hist||(r.hist={count:0,sum:0,min:e,max:e,bucketCounts:new Array(Pi.length+1).fill(0)});var n=r.hist;n.count+=1,n.sum+=e,n.min=Math.min(n.min,e),n.max=Math.max(n.max,e),n.bucketCounts[(function(i,s){for(var a=0;s.length>a;a++)if(s[a]>=i)return a;return s.length})(e,Pi)]+=1}}Rt(r){var e=this.Te.beforeSend;if(!e)return r;var t=J(e)?e:[e],n=r;for(var i of t)try{var s=i(n);if(!s)return this.it.info("Metric was rejected in beforeSend function"),null;n=s}catch(a){return this.it.error("Error in beforeSend function for metric:",a),null}return n}Nt(){this.Dt||(this.Dt=kn((()=>{this.Dt=void 0,this.flush().catch((r=>{this.it.error("Metrics flush failed:",r)}))}),this.Te.flushIntervalMs))}Mt(){this.Dt&&(clearTimeout(this.Dt),this.Dt=void 0)}Zt(){var r=this;return ve((function*(){if(r.Ht.size!==0){var e=r.Ht;r.Ht=new Map,r.Bt=!1,r.Ut=new Map,r.zt=new Set;var t=r.Vt,n=yield r._instance.Kt(r.Gt(e));if(t===r.Vt)switch(n.kind){case"ok":return;case"retry-later":return r.Yt(e),void r.Nt();case"too-large":return void r.it.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void r.it.error("Failed to send metrics batch:",n.error)}}}))()}
1Gt(r){return e=this.Xt(r),t=(function(s,a,o){return A({},s.resourceAttributes,{"service.name":s.serviceName||"unknown_service"},s.environment&&{"deployment.environment":s.environment},s.serviceVersion&&{"service.version":s.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":o})})(this.Te,this._instance.getLibraryId(),this._instance.getLibraryVersion()),n=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:Hn(t)},scopeMetrics:[{scope:{name:n,version:i},metrics:e}]}]};var e,t,n,i}Xt(r){var e=xc(Date.now()),t=new Map;for(var n of r.values()){var i,s=Sc(n.type,n.name,n.unit,void 0),a=t.get(s);a||(a=A({name:n.name},n.unit&&{unit:n.unit}),n.type==="count"?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:n.type==="gauge"?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},t.set(s,a));var o=Hn((i=n.attributes)!==null&&i!==void 0?i:{}),u=xc(n.windowStartMs);if(n.type==="count"){var c,d={attributes:o,startTimeUnixNano:u,timeUnixNano:e,asDouble:(c=n.total)!==null&&c!==void 0?c:0};a.sum.dataPoints.push(d)}else if(n.type==="gauge"){var l,f={attributes:o,timeUnixNano:e,asDouble:(l=n.last)!==null&&l!==void 0?l:0};a.gauge.dataPoints.push(f)}else n.hist&&a.histogram.dataPoints.push({attributes:o,startTimeUnixNano:u,timeUnixNano:e,count:n.hist.count,sum:n.hist.sum,min:n.hist.min,max:n.hist.max,bucketCounts:n.hist.bucketCounts,explicitBounds:Pi})}return Array.from(t.values())}Yt(r){var e,t;for(var n of r){var i=n[0],s=n[1],a=this.Ht.get(i);if(a)switch(a.windowStartMs=Math.min(a.windowStartMs,s.windowStartMs),a.type){case"count":a.total=((e=a.total)!==null&&e!==void 0?e:0)+((t=s.total)!==null&&t!==void 0?t:0);break;case"gauge":break;case"histogram":if(s.hist)if(a.hist){a.hist.count+=s.hist.count,a.hist.sum+=s.hist.sum,a.hist.min=Math.min(a.hist.min,s.hist.min),a.hist.max=Math.max(a.hist.max,s.hist.max);for(var o=0;a.hist.bucketCounts.length>o;o++)a.hist.bucketCounts[o]+=s.hist.bucketCounts[o]}else a.hist=s.hist}else this.Qt()&&this.Ht.set(i,s)}}};var _n,Ec,Ri;function Lm(r){var e=globalThis._posthogChunkIds;if(e){var t=Object.keys(e);return Ri&&t.length===Ec||(Ec=t.length,Ri=t.reduce(((n,i)=>{_n||(_n={});var s=_n[i];if(s)n[s[0]]=s[1];else for(var a=r(i),o=a.length-1;o>=0;o--){var u=a[o],c=u==null?void 0:u.filename,d=e[i];if(c&&d){n[c]=d,_n[i]=[c,d];break}}return n}),{})),Ri}}class Nm{constructor(e,t,n){n===void 0&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){t===void 0&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(n,t,0).apply(e),s=this.buildParsingContext(t),a=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:"error"}}modifyFrames(e){var t=this;return ve((function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&J(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)==null?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,i;return e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),A({},e,{cause:n,stack:i})}applyChunkIds(e,t){return e.map((n=>(n.filename&&t&&(n.chunk_id=t[n.filename]),n)))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return ve((function*(){var n=e;for(var i of t.modifiers)n=yield i(n);return n}))()}convertToExceptionList(e,t){var n,i,s,a={type:e.type,value:e.value,mechanism:{type:(n=t.type)!==null&&n!==void 0?n:"generic",handled:(i=t.handled)===null||i===void 0||i,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var o=[a];return e.cause!=null&&o.push(...this.convertToExceptionList(e.cause,A({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:Lm(this.stackParser),skipFirstLines:(t=e.skipFirstLines)!==null&&t!==void 0?t:1}}buildCoercingContext(e,t,n){n===void 0&&(n=0);var i=(s,a)=>
1{if(4>=a){var o=this.buildCoercingContext(e,t,a);return this.applyCoercers(s,o)}};return A({},t,{syntheticException:n==0?t.syntheticException:void 0,mechanism:e,apply:s=>i(s,n),next:s=>i(s,n+1)})}}var br="?";function Hu(r,e,t,n,i){var s={platform:r,filename:e,function:t==="<anonymous>"?br:t,in_app:!0};return F(n)||(s.lineno=n),F(i)||(s.colno=i),s}var Qv=(r,e)=>{var t=r.indexOf("safari-extension")!==-1,n=r.indexOf("safari-web-extension")!==-1;return t||n?[r.indexOf("@")!==-1?r.split("@")[0]:br,t?"safari-extension:"+e:"safari-web-extension:"+e]:[r,e]},Dm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,jm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,$m=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bm=(r,e)=>{var t=Dm.exec(r);if(t)return Hu(e,t[1],br,+t[2],+t[3]);var n=jm.exec(r);if(n){if(n[2]&&n[2].indexOf("eval")===0){var i=$m.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}var s=Qv(n[1]||br,n[2]);return Hu(e,s[1],s[0],n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Hm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Um=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,zm=(r,e)=>{var t=Hm.exec(r);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Um.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var i=t[3],s=t[1]||br,a=Qv(s,i);return Hu(e,i=a[1],s=a[0],t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Oc=/\(error: (.*)\)/;class Gm{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=te(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Nn(e,"DOMException")}isDOMError(e){return Nn(e,"DOMError")}}class Vm{match(e){return(t=>t instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&typeof n.error.message=="string"?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}}class Km{constructor(){}match(e){return Nn(e,"ErrorEvent")&&e.error!=null}coerce(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var Wm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Jm{match(e){return typeof e=="string"}coerce(e,t){var n,i=this.getInfos(e),s=i[0],a=i[1];return{type:s??"Error",value:a??e,stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(e){var t="Error",n=e,i=e.match(Wm);return i&&(t=i[1],n=i[2]),[t,n]}}var Ym=["fatal","error","warning","log","info","debug"];function eg(r,e){e===void 0&&(e=40);var t=Object.keys(r);if(t.sort(),!t.length)return"[object has no keys]";for(var n=t.length;n>0;n--){var i=t.slice(0,n).join(", ");if(e>=i.length)return n===t.length?i:i.length>e?i.slice(0,e)+"...":i}return""}class Xm{match(e){return typeof e=="object"&&e!==null}coerce(e,t){var n,i=this.getErrorPropertyFromObject(e);return i?t.apply(i):{type:this.getType(e),value:this.getValue(e),stack:(n=t.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return El(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var t="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&typeof e.message=="string")return e.message;var n=this.getObjectClassName(e);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+eg(e)}isSeverityLevel(e){return te(e)&&!Nu(e)&&Ym.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(Cm(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}}class Zm{match(e){return El(e)}coerce(e,t){var n,i=e.constructor.name;return{type:i,value:i+" captured as exception with keys: "+eg(e),stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class Qm{match(e){return Rv(e)}coerce(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class ey{match(e){return Nn(e,"PromiseRejectionEvent")||this.isCu
1stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!El(e))return!1;try{var t=e.detail;return t!=null&&typeof t=="object"&&"reason"in t}catch{return!1}}coerce(e,t){var n,i=this.getUnhandledRejectionReason(e);return Rv(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}:t.apply(i)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var Un="$message",zn="$timestamp",ty=new Set([Un,zn]),ki={enabled:!0,max_bytes:32768};function Gn(r){var e;return r?{enabled:(e=r.enabled)!==null&&e!==void 0?e:ki.enabled,max_bytes:ny(r.max_bytes,ki.max_bytes)}:A({},ki)}class ry{constructor(e){this.$e=[],this.ze=0,this.Te=Gn(e)}setConfig(e){this.Te=Gn(e),this.Ze()}add(e){var t=(function(i){var s;try{s=Ov(i)}catch{return}try{var a=JSON.parse(s);if(!ue(a))return;var o=a,u=o[Un],c=o[zn];return!te(u)||u.trim().length===0||!te(c)&&!Te(c)?void 0:{step:o,json:s}}catch{return}})(e);if(t){var n=(function(i){if(typeof TextEncoder<"u")return new TextEncoder().encode(i).length;for(var s=encodeURIComponent(i),a=0,o=0;s.length>o;o++)s[o]==="%"?(a+=1,o+=2):a+=1;return a})(t.json);n>this.Te.max_bytes||(this.$e.push({step:t.step,bytes:n}),this.ze+=n,this.Ze())}}getAttachable(){return this.$e.map((e=>e.step))}clear(){this.$e=[],this.ze=0}size(){return this.$e.length}Ze(){for(;this.ze>this.Te.max_bytes&&this.$e.length>0;){var e=this.$e.shift();e&&(this.ze-=e.bytes)}}}function ny(r,e){if(!Te(r)||r===1/0||r===-1/0)return e;var t=Math.floor(r);return 0>t?e:t}var tg=function(r,e){var t=(e===void 0?{}:e).debugEnabled,n={k(i){if(E&&(ee.DEBUG||E.POSTHOG_DEBUG||t)&&!F(E.console)&&E.console){for(var s=("__rrweb_original__"in E.console[i])?E.console[i].__rrweb_original__:E.console[i],a=arguments.length,o=new Array(a>1?a-1:0),u=1;a>u;u++)o[u-1]=arguments[u];s(r,...o)}},debug(){for(var i=arguments.length,s=new Array(i),a=0;i>a;a++)s[a]=arguments[a];n.k("debug",...s)},info(){for(var i=arguments.length,s=new Array(i),a=0;i>a;a++)s[a]=arguments[a];n.k("log",...s)},warn(){for(var i=arguments.length,s=new Array(i),a=0;i>a;a++)s[a]=arguments[a];n.k("warn",...s)},error(){for(var i=arguments.length,s=new Array(i),a=0;i>a;a++)s[a]=arguments[a];n.k("error",...s)},critical(){for(var i=arguments.length,s=new Array(i),a=0;i>a;a++)s[a]=arguments[a];console.error(r,...s)},uninitializedWarning(i){n.error("You must initialize PostHog before calling "+i)},createLogger:(i,s)=>tg(r+" "+i,s)};return n},q=tg("[PostHog.js]"),ce=q.createLogger,iy=ce("[ExternalScriptsLoader]"),Ii=(r,e,t)=>{if(r.config.disable_external_dependency_loading)return iy.warn(e+" was requested but loading of external scripts is disabled."),t("Loading of external scripts is disabled");var n=D==null?void 0:D.querySelectorAll("script");if(n){for(var i,s=function(){if(n[a].src===e){var u=n[a];return u.__posthog_loading_callback_fired?{v:t()}:(u.addEventListener("load",(c=>{u.__posthog_loading_callback_fired=!0,t(void 0,c)})),u.onerror=c=>t(c),{v:void 0})}},a=0;n.length>a;a++)if(i=s())return i.v}var o=()=>{if(!D)return t("document not found");var u=D.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=e,u.onload=l=>{u.__posthog_loading_callback_fired=!0,t(void 0,l)},u.onerror=l=>t(l),r.config.prepare_external_dependency_script&&(u=r.config.prepare_external_dependency_script(u)),!u)return t("prepare_external_dependency_script returned null");if(r.config.external_scripts_inject_target==="head")D.head.appendChild(u);else{var c,d=D.querySelectorAll("body > script");d.length>0?(c=d[0].parentNode)==null||c.insertBefore(u,d[0]):D.body.appendChild(u)}};D!=null&&D.body?o():D==null||D.addEventListener("DOMContentLoaded",o)};B.__PosthogExtensions__=B.__PosthogExtensions__||{},B.__PosthogExtensions__.loadExternalDependency=(r,e,t)=>{if(e!=="remote-config"){var n;if(r.config.strict_script_versioning)n=r.requestRouter.endpointFor("assets","/static/"+r.version+"/"+e+".js");else{var i="/static/"+e+".js?v="+r.version;if(e==="toolbar"){var s=3e5;i=i+"&t="+Math.floor(Date.now()/s)*s}
1n=r.requestRouter.endpointFor("assets",i)}Ii(r,n,t)}else{var a=r.requestRouter.endpointFor("assets","/array/"+r.config.token+"/config.js");Ii(r,a,t)}},B.__PosthogExtensions__.loadSiteApp=(r,e,t)=>{var n=r.requestRouter.endpointFor("api",e);Ii(r,n,t)};var Tc="1.407.1";ee.DEBUG=!1,ee.LIB_VERSION=Tc,ee.LIB_NAME="web",ee.JS_SDK_VERSION=Tc;var rg="$people_distinct_id",Vn="$device_id",Ci="$device_model",jr="__alias",$r="__timers",Uu="$autocapture_disabled_server_side",zu="$heatmaps_enabled_server_side",Gu="$exception_capture_enabled_server_side",Vu="$error_tracking_suppression_rules",Ku="$error_tracking_capture_extension_exceptions",Wu="$web_vitals_enabled_server_side",kl="$dead_clicks_enabled_server_side",Il="$product_tours_enabled_server_side",Ju="$web_vitals_allowed_metrics",Xt="$session_recording_remote_config",ng="$replay_sample_rate",ig="$replay_override_sampling",sg="$replay_override_linked_flag",ag="$replay_override_url_trigger",og="$replay_override_event_trigger",pr="$sesid",Cl="$session_is_sampled",Jt="$enabled_feature_flags",In="$active_feature_flags",Br="$early_access_features",Yu="$feature_flag_details",Cn="$feature_flag_payloads",Xu="$feature_flag_request_id",Kn="$minimal_flag_called_events",bt="$override_feature_flags",dr="$override_feature_flag_payloads",Vt="$stored_person_properties",Kt="$stored_group_properties",Zu="$surveys",Wn="$surveys_loaded_at",Qu="$surveys_activated",An="$surveys_activated_session",Hr="ph_product_tours",Jr="$flag_call_reported",el="$flag_call_reported_session_id",tl="$feature_flag_errors",tn="$feature_flag_evaluated_at",Qe="$user_state",rl="$client_session_props",nl="$capture_rate_limit",il="$initial_campaign_params",sl="$initial_referrer_info",Jn="$initial_person_info",Yn="$epp",mn="$posthog_cookieless",ug="$cookieless_mode",lg="$sdk_debug_extensions_init_method",cg="$sdk_debug_extensions_init_time_ms",dg="$sdk_debug_recording_script_not_loaded",Al="PostHog loadExternalDependency extension not found.",Wt="on_reject",St="always",ir="anonymous",sr="identified",al="identified_only",Xn="visibilitychange",Zn="beforeunload",fr="$pageview",Ai="$pageleave",Fi="$identify",Pc="$groupidentify";function yn(r,e){J(r)&&r.forEach(e)}function re(r,e){if(!W(r))if(J(r))r.forEach(e);else if(vm(r))r.forEach(((n,i)=>e(n,i)));else for(var t in r)Pv.call(r,t)&&e(r[t],t)}var ae=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;e>n;n++)t[n-1]=arguments[n];for(var i of t)for(var s in i)i[s]!==void 0&&(r[s]=i[s]);return r};function Fn(r){for(var e=Object.keys(r),t=e.length,n=new Array(t);t--;)n[t]=[e[t],r[e[t]]];return n}var Rc=function(r){try{return r()}catch{return}},sy=function(r){return function(){try{for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(this,t)}catch(i){q.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),q.critical(i)}}},Fl=function(r){var e={};return re(r,(function(t,n){(te(t)&&t.length>0||Te(t))&&(e[n]=t)})),e},ay=["herokuapp.com","vercel.app","netlify.app"];function oy(r){var e=r==null?void 0:r.hostname;if(!te(e))return!1;var t=e.split(".").slice(-2).join(".");for(var n of ay)if(t===n)return!1;return!0}function fe(r,e,t,n){var i=n??{},s=i.capture,a=i.passive;r==null||r.addEventListener(e,t,{capture:s!==void 0&&s,passive:a===void 0||a})}function fg(r){return r.name==="ph_toolbar_internal"}var hg=r=>{if(D){try{for(var e=r+"=",t=D.cookie.split(";").filter((s=>s.length)),n=0;t.length>n;n++){for(var i=t[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(r){return 0>r?Math.ceil(r):Math.floor(r)}),Number.isInteger||(Number.isInteger=function(r){return Te(r)&&isFinite(r)&&Math.floor(r)===r});class Qn{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,n,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(i)||0>e||0>t||0>n||0>i||e>0xffffffffffff||t>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/256,s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new Qn(s)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Qn(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}}class uy{generate(){var e=this.generateOrAbort();if(!F(e))return e;this.S=0;var t=this.generateOrAbort();if(F(t))throw new Error("Could not generate UUID after timestamp reset");return t}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.C();else{if(this.S>=e+1e4)return;this.I++,this.I>4398046511103&&(this.S++,this.C())}return Qn.fromFieldsV7(this.S,Math.trunc(this.I/Math.pow(2,30)),this.I&Math.pow(2,30)-1,this.M.nextUint32())}C(){this.I=1024*this.M.nextUint32()+(1023&this.M.nextUint32())}constructor(){this.S=0,this.I=0,this.M=new ly}}var kc,pg=r=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;r.length>e;
1e++)r[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return r};E&&!F(E.crypto)&&crypto.getRandomValues&&(pg=r=>crypto.getRandomValues(r));class ly{nextUint32(){return this.R.length>this.O||(pg(this.R),this.O=0),this.R[this.O++]}constructor(){this.R=new Uint32Array(8),this.O=1/0}}var xt=()=>cy().toString(),cy=()=>(kc||(kc=new uy)).generate(),Rr="",dy=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Et={N:()=>!!D,D(r){q.error("cookieStore error: "+r)},A:hg,F(r){var e;try{e=JSON.parse(Et.A(r))||{}}catch{}return e},q(r,e,t,n,i){if(!D)return!1;try{var s="",a="",o=(function(d,l){if(l){var f=(function(p,v){if(v===void 0&&(v=D),Rr)return Rr;if(!v||["localhost","127.0.0.1"].includes(p))return"";for(var g=p.split("."),_=Math.min(g.length,8),m="dmn_chk_"+xt();!Rr&&_--;){var b=g.slice(_).join("."),w=m+"=1;domain=."+b+";path=/";v.cookie=w+";max-age=3",v.cookie.includes(m)&&(v.cookie=w+";max-age=0",Rr=b)}return Rr})(d);if(!f){var h=(p=>{var v=p.match(dy);return v?v[0]:""})(d);h!==f&&q.info("Warning: cookie subdomain discovery mismatch",h,f),f=h}return f?"; domain=."+f:""}return""})(D.location.hostname,n);if(t){var u=new Date;u.setTime(u.getTime()+864e5*t),s="; expires="+u.toUTCString()}i&&(a="; secure");var c=r+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+o+a;return c.length>3686.4&&q.warn("cookieStore warning: large cookie, len="+c.length),D.cookie=c,!0}catch{return!1}},P(r,e){if(D!=null&&D.cookie)try{Et.q(r,"",-1,e)}catch{return}}},qi=null,ie={N(){if(!Me(qi))return qi;var r=!0;if(F(E))r=!1;else try{var e="__mplssupport__";ie.q(e,"xyz"),ie.A(e)!=='"xyz"'&&(r=!1),ie.P(e)}catch{r=!1}return r||q.error("localStorage unsupported; falling back to cookie store"),qi=r,r},D(r){q.error("localStorage error: "+r)},A(r){try{return E==null?void 0:E.localStorage.getItem(r)}catch(e){ie.D(e)}return null},F(r){try{return JSON.parse(ie.A(r))||{}}catch{}return null},q(r,e){try{return E==null||E.localStorage.setItem(r,JSON.stringify(e)),!0}catch(t){ie.D(t)}return!1},P(r){try{E==null||E.localStorage.removeItem(r)}catch(e){ie.D(e)}}},fy=[Vn,"distinct_id",pr,Cl,Yn,Jn,Qe],bn={},hy={N:()=>!0,D(r){q.error("memoryStorage error: "+r)},A:r=>bn[r]||null,F:r=>bn[r]||null,q:(r,e)=>(bn[r]=e,!0),P(r){delete bn[r]}},Bt=null,Oe={N(){if(!Me(Bt))return Bt;if(Bt=!0,F(E))Bt=!1;else try{var r="__support__";Oe.q(r,"xyz"),Oe.A(r)!=='"xyz"'&&(Bt=!1),Oe.P(r)}catch{Bt=!1}return Bt},D(r){q.error("sessionStorage error: ",r)},A(r){try{return E==null?void 0:E.sessionStorage.getItem(r)}catch(e){Oe.D(e)}return null},F(r){try{return JSON.parse(Oe.A(r))||null}catch{}return null},q(r,e){try{return E==null||E.sessionStorage.setItem(r,JSON.stringify(e)),!0}catch(t){Oe.D(t)}return!1},P(r){try{E==null||E.sessionStorage.removeItem(r)}catch(e){Oe.D(e)}}};class py{constructor(e){this._instance=e}get Te(){return this._instance.config}get consent(){return this.Ge()?0:this.Qe}isOptedOut(){return this.Te.cookieless_mode===St||this.isRejected()||this.consent===-1&&this.Te.cookieless_mode===Wt}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Te.opt_out_capturing_by_default}optInOut(e){this.Je.q(this.Ke,e?1:0,this.Te.cookie_expiration,this.Te.cross_subdomain_cookie,this.Te.secure_cookie)}reset(){this.Je.P(this.Ke,this.Te.cross_subdomain_cookie)}get Ke(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(n?n+t:"__ph_opt_in_out_"+t)}get Qe(){var e=this.Je.A(this.Ke);return Oi(e)?1:G(ym,e)?0:-1}get Je(){var e=this.Te.opt_out_capturing_persistence_type,t=e==="localStorage"?ie:Et;if(!this.Ye||this.Ye!==t){this.Ye=t;var n=e==="localStorage"?Et:ie;n.A(this.Ke)&&(this.Ye.A(this.Ke)||this.optInOut(Oi(n.A(this.Ke))),n.P(this.Ke,this.Te.cross_subdomain_cookie))}return this.Ye}Ge(){return!!this.Te.respect_dnt&&[qe==null?void 0:qe.doNotTrack,qe==null?void 0:qe.msDoNotTrack,B.doNotTrack].some((e=>Oi(e)))}}function vg(r,e){var t,n=r==null||(t=r.config)==null?void 0:t.get_current_url;if(!et(n))return e;try{var i=n(e);return te(i)&&i?i:e}catch(s){return q.error("Error in get_current_url, falling back to window.location.href",s),e}}var gg="__POSTHOG_TOOLBAR__",vy=1,gy=3,_y=11;function Ic(r){return r instanceof Element&&(r.id===gg||!(r.closest==null||!r.closest(".toolbar-global-fade-container")))}function Lt(r){return!!r&&r.nodeType===vy}function Ue(r,e){return!!r&&!!r.tagName&&r.tagName.toLowerCase()===e.toLowerCase()}function _g(r){return!!r&&r.nodeType===gy}function mg(r){return!!r&&r.nodeType===_y&&Lt(r.host)}var yg=1e3;function ql(r){return r?di(r).split(/\s+/):[]}function Cc(r,e){var t=(function(n){var i,s=E==null||(i=E.location)==null?void 0:i.href;return F(s)?void 0:vg(n,s)})(e);return!!(t&&r&&r.some((n=>t.match(n))))}function ei(r){var e="";switch(typeof r.className){case"string":e=r.className;break;case"object":e=(r.className&&"baseVal"in r.className?r.className.baseVal:null)||r.getAttribute("class")||"";break;default:e=""}return ql(e)}function bg(r){return W(r)?null:di(r).split(/(\s+)/).filter((e=>Yr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function rn(r){var e="";return ul(r)&&!Eg(r)&&r.childNodes&&r.childNodes.length&&re(r.childNodes,(function(t){var n;_g(t)&&t.textContent&&(e+=(n=bg(t.textContent))!==null&&n!==void 0?n:"")})),di(e)}function Mi(r){var e;return F(r.target)?r.srcElement||null:(e=r.target)!=null&&e.shadowRoot?r.composedPath()[0]||null:r.target||null}var Ml=["a","button","form","input","select","textarea","label"];function ol(r,e){if(F(e))return!0;var t,n=function(s){if(e.some((a=>(function(o,u){var c=o.matches||o.matchesSelector||o.msMatchesSelector||o.mozMatchesSelector||o.webkitMatchesSelector||o.oMatchesSelector;try{return!!c&&c.call(o,u)}catch{return!1}})(s,a))))return{v:!0}};for(var i of r)if(t=n(i))return t.v;return!1}function wg(r){var e=r.parentNode;return!(!e||!Lt(e))&&e}var my=[".ph-no-autocapture","[data-ph-no-autocapture]"],xg=["next","previous","prev",">","<"],yy=[...xg,"+","-","−","–"],Ac=(r,e)=>/[a-z0-9]/i.test(e)?r.includes(e):r===e,Fc=[".ph-no-rageclick",".ph-no-capture"],by=["","text","search","email","password","url","tel","number"];function qc(r,e){if(!E||Ll(r))return!1;var t,n,i,s,a;if(rt(e)?(t=!!e&&Fc,n=void 0,i=!1):(t=(s=e==null?void 0:e.css_selector_ignorelist)!==null&&s!==void 0?s:Fc,n=e==null?void 0:e.content_ignorelist,i=(a=e==null?void 0:e.ignore_text_selection)!==null&&a!==void 0&&a),t===!1||i&&(function(u){return!(!u||!Lt(u))&&(!!Ue(u,"textarea")||(Ue(u,"input")?G(by,(u.getAttribute("type")||"").toLowerCase()):(function(c){if(c.isContentEditable)return!0;var d=c.getAttribute==null?void 0:c.getAttribute("contenteditable");return d==="true"||d===""})(u)))})(r))return!1;var o=Sg(r,!1).targetElementList;
1return!(function(u,c){if(u===!1||F(u))return!1;var d;if(u===!0)d=xg;else{if(!J(u))return!1;if(u.length>10)return q.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;d=u.map((l=>l.toLowerCase()))}return c.some((l=>{var f=l.safeText,h=l.ariaLabel;return d.some((p=>Ac(f,p)||Ac(h,p)))}))})(n,o.map((u=>{var c;return{safeText:rn(u).toLowerCase(),ariaLabel:((c=u.getAttribute("aria-label"))==null?void 0:c.toLowerCase().trim())||""}})))&&!ol(o,t)}var Ll=r=>!r||Ue(r,"html")||!Lt(r),Sg=(r,e)=>{if(!E||Ll(r))return{parentIsUsefulElement:!1,targetElementList:[]};for(var t=!1,n=[r],i=r;i.parentNode&&!Ue(i,"body");)if(mg(i.parentNode))n.push(i.parentNode.host),i=i.parentNode.host;else{var s=wg(i);if(!s)break;if(e||Ml.indexOf(s.tagName.toLowerCase())>-1)t=!0;else try{var a=E.getComputedStyle(s);a&&a.getPropertyValue("cursor")==="pointer"&&(t=!0)}catch{}n.push(s),i=s}return{parentIsUsefulElement:t,targetElementList:n}};function ul(r){for(var e=new Set,t=0,n=r;n.parentNode&&!Ue(n,"body");n=n.parentNode){if(t++>=yg||e.has(n))return!1;e.add(n);var i=ei(n);if(G(i,"ph-sensitive")||G(i,"ph-no-capture"))return!1}if(G(ei(r),"ph-include"))return!0;var s=r.type||"";if(te(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var a=r.name||r.id||"";return!te(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function Eg(r){return!!(Ue(r,"input")&&!["button","checkbox","submit","reset"].includes(r.type)||Ue(r,"select")||Ue(r,"textarea")||r.getAttribute("contenteditable")==="true")}var Og="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",wy=new RegExp("^(?:"+Og+")$"),xy=new RegExp(Og),Tg="\\d{3}-?\\d{2}-?\\d{4}",Sy=new RegExp("^("+Tg+")$"),Ey=new RegExp("("+Tg+")");function Yr(r,e){return e===void 0&&(e=!0),!(W(r)||te(r)&&(r=di(r),(e?wy:xy).test((r||"").replace(/[- ]/g,""))||(e?Sy:Ey).test(r)))}function Mc(r){var e=rn(r);return Yr(e=(e+" "+Pg(r)).trim())?e:""}function Pg(r){var e="";return r&&r.childNodes&&r.childNodes.length&&re(r.childNodes,(function(t){var n;if(t&&((n=t.tagName)==null?void 0:n.toLowerCase())==="span")try{var i=rn(t);e=(e+" "+i).trim(),t.childNodes&&t.childNodes.length&&(e=(e+" "+Pg(t)).trim())}catch(s){q.error("[AutoCapture]",s)}})),e}function Lc(r){return r.replace(/"|\\"/g,'\\"')}function Oy(r){var e=r.attr__class;if(e)return J(e)?e:ql(e)}var wn=ce("[Dead Clicks]"),Ty=()=>!0,Py=r=>{var e,t=!((e=r.instance.persistence)==null||!e.get_property(kl)),n=r.instance.config.capture_dead_clicks;return rt(n)?n:!!ue(n)||t};class Nc{get lazyLoadedDeadClicksAutocapture(){return this.Xe}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var t=e.config;"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[kl]:t.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.tr((()=>{this.er()})):this.stop()}tr(e){var t,n;(t=B.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture?e():(n=B.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(i=>{i?wn.error("failed to load script",i):e()}))}er(){var e;if(D){if(!this.Xe&&(e=B.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=ue(this.instance.config.capture_dead_clicks)?A({},this.instance.config.capture_dead_clicks):{};t.__onCapture=this.onCapture,this.onCapture&&(t.capture_dead_swipes=!1),this.Xe=B.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.Xe.start(D),wn.info("starting...")}}else wn.error("`document` not found. Cannot start.")}stop(){this.Xe&&(this.Xe.stop(),this.Xe=void 0,wn.info("stopping..."))}}var Li=ce("[SegmentIntegration]"),Rg="posthog-js";function kg(r,e){var t=e===void 0?{}:e,n=t.organization,i=t.projectId,s=t.prefix,a=t.severityAllowList,o=a===void 0?["error"]:a,u=t.sendExceptionsToPostHog,c=u===void 0||u;return d=>{var l,f,h,p,v;if(o!=="*"&&!o.includes(d.level)||!r.__loaded)return d;d.tags||(d.tags={});var g=r.requestRouter.endpointFor("ui","/project/"+r.config.token+"/pers
1on/"+r.get_distinct_id());d.tags["PostHog Person URL"]=g,r.sessionRecordingStarted()&&(d.tags["PostHog Recording URL"]=r.get_session_replay_url({withTimestamp:!0}));var _,m=((l=d.exception)==null?void 0:l.values)||[],b=m.map((S=>A({},S,{stacktrace:S.stacktrace?A({},S.stacktrace,{type:"raw",frames:(S.stacktrace.frames||[]).map((O=>A({},O,{platform:"web:javascript"})))}):void 0}))),w={$exception_message:((f=m[0])==null?void 0:f.value)||d.message,$exception_type:(h=m[0])==null?void 0:h.type,$exception_level:d.level,$exception_list:b,$sentry_event_id:d.event_id,$sentry_exception:d.exception,$sentry_exception_message:((p=m[0])==null?void 0:p.value)||d.message,$sentry_exception_type:(v=m[0])==null?void 0:v.type,$sentry_tags:d.tags};return n&&i&&(w.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+i+"&query="+d.event_id),c&&((_=r.exceptions)==null||_.sendExceptionEvent(w)),d}}class Ry{constructor(e,t,n,i,s,a){this.name=Rg,this.setupOnce=function(o){o(kg(e,{organization:t,projectId:n,prefix:i,severityAllowList:s,sendExceptionsToPostHog:a==null||a}))}}}class Dc{constructor(e){this.rr=(t,n,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(q.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:t,changeReason:i}),this.ir=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.nr()}nr(){var e;this.sr=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.rr)}destroy(){var e;(e=this.sr)==null||e.call(this),this.sr=void 0}doPageView(e,t){var n,i=this.ar(e,t);return this.ir={pathname:(n=E==null?void 0:E.location.pathname)!==null&&n!==void 0?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var t;return this.ar(e,(t=this.ir)==null?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.ir)==null?void 0:e.pageViewId}}ar(e,t){var n=this.ir;if(!n)return{$pageview_id:t};var i={$pageview_id:t,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var a=s.maxScrollHeight,o=s.lastScrollY,u=s.maxScrollY,c=s.maxContentHeight,d=s.lastContentY,l=s.maxContentY;if(!(F(a)||F(o)||F(u)||F(c)||F(d)||F(l))){a=Math.ceil(a),o=Math.ceil(o),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d),l=Math.ceil(l);var f=a>1?dt(o/a,0,1,q):1,h=a>1?dt(u/a,0,1,q):1,p=c>1?dt(d/c,0,1,q):1,v=c>1?dt(l/c,0,1,q):1;i=ae(i,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:d,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:l,$prev_pageview_max_content_percentage:v})}}return n.pathname&&(i.$prev_pageview_pathname=n.pathname),n.timestamp&&(i.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),i}}var Ni=["flags","surveys"],ky={[rg]:{exposure:"hidden"},[jr]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[$r]:{exposure:"hidden"},[Uu]:{exposure:"event"},[zu]:{exposure:"hidden"},[Gu]:{exposure:"event"},[Vu]:{exposure:"hidden"},[Ku]:{exposure:"event"},[Wu]:{exposure:"event"},[kl]:{exposure:"event"},[Il]:{exposure:"hidden"},[Ju]:{exposure:"event"},[Xt]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[pr]:{exposure:"hidden"},[Cl]:{exposure:"event"},[ng]:{exposure:"event",shouldSkipFromEventProperties:r=>Me(r)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[Jt]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(r,e)=>e(),transformToEventProperties(r){if(!ue(r))return{};for(var e={},t=Object.keys(r),n=0;t.length>n;n++)e["$feature/"+t[n]]=r[t[n]];return e}},[In]:{exposure:"event",storageGroup:"flags"},[Br]:{exposure:"hidden"},[Yu]:{exposure:"hidden",storageGroup:"flags"},[Cn]:{exposure:"event",storageGroup:"flags"},[Xu]:{exposure:"event",storageGroup:"flags",volatile:!0},[Kn]:{exposure:"hidden",storageGroup:"flags"},[bt]:{exposure:"event"},[dr]:{exposure:"hidden"},[Vt]:{exposure:"hidden"},[Kt]:{exposure:"hidden"},[Zu]:{exposure:"hidden",storageGroup:"surveys"},[Wn]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[Qu]:{exposure:"event"}
1,[An]:{exposure:"hidden"},[Hr]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Jr]:{exposure:"hidden"},[el]:{exposure:"hidden"},[tl]:{exposure:"hidden"},[tn]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Qe]:{exposure:"hidden"},[rl]:{exposure:"hidden"},[nl]:{exposure:"hidden"},[il]:{exposure:"hidden"},[sl]:{exposure:"hidden"},[Jn]:{exposure:"hidden"},[Yn]:{exposure:"hidden"},[ig]:{exposure:"event"},[sg]:{exposure:"event"},[ag]:{exposure:"event"},[og]:{exposure:"event"},[lg]:{exposure:"event"},[cg]:{exposure:"event"},[dg]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},Iy=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Ht=r=>{var e=ky[r];if(e)return e;for(var t of Iy){var n=t[1];if(r.indexOf(t[0])===0)return n}},vr=(r,e)=>{try{return JSON.stringify(r,((t,n)=>typeof n=="bigint"?n.toString():n),e)}catch{return Ov(r)}},nn=r=>{var e=D==null?void 0:D.createElement("a");return F(e)?null:(e.href=r,e)},wr=function(r,e){for(var t,n=((r.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;n.length>i;i++){var s=n[i].split("=");if(s[0]===e){t=s;break}}if(!J(t)||2>t.length)return"";var a=t[1];try{a=decodeURIComponent(a)}catch{q.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},sn=function(r,e,t){if(!r||!e||!e.length)return r;for(var n=r.split("#"),i=n[1],s=(n[0]||"").split("?"),a=s[1],o=s[0],u=(a||"").split("&"),c=[],d=0;u.length>d;d++){var l=u[d].split("=");J(l)&&(e.includes(l[0])?c.push(l[0]+"="+t):c.push(u[d]))}var f=o;return a!=null&&(f+="?"+c.join("&")),i!=null&&(f+="#"+i),f},ti=function(r,e){var t=r.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Ig=(r,e)=>r>=e&&xv(),Cg=(r,e,t,n)=>{if(r===0){if(xv()){var i=e+1;return i===t&&n(),i}return e}return 0},xn="https?://(.*)",xr=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Cy=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...xr],an="<masked>",Ay=["li_fat_id"];function Ag(r,e,t){if(!D)return{};var n,i=e?[...xr,...t||[]]:[],s=Fg(sn(D.URL,i,an),r),a=(n={},re(Ay,(function(o){var u=hg(o);n[o]=u||null})),n);return ae(a,s)}function Fg(r,e){var t=Cy.concat(e||[]),n={};return re(t,(function(i){var s=wr(r,i);n[i]=s||null})),n}function qg(r){var e=(function(s){return s?s.search(xn+"google.([^/?]*)")===0?"google":s.search(xn+"bing.com")===0?"bing":s.search(xn+"yahoo.com")===0?"yahoo":s.search(xn+"duckduckgo.com")===0?"duckduckgo":null:null})(r),t=e!="yahoo"?"q":"p",n={};if(!Me(e)){n.$search_engine=e;var i=D?wr(D.referrer,t):"";i.length&&(n.ph_keyword=i)}return n}function jc(){return navigator.language||navigator.userLanguage}var ri="$direct";function Mg(){return(D==null?void 0:D.referrer)||ri}function Lg(r,e,t){t===void 0&&(t=!1);var n=r?[...xr,...e||[]]:[],i=t?Mt(ge==null?void 0:ge.href):ge==null?void 0:ge.href,s=i==null?void 0:i.substring(0,1e3);return{r:Mg().substring(0,1e3),u:s?sn(s,n,an):void 0}}function Ng(r,e){var t;e===void 0&&(e=!1);var n=r.r,i=r.u,s=e?Mt(i):i,a={$referrer:n,$referring_domain:n==null?void 0:n==ri?ri:(t=nn(n))==null?void 0:t.host};if(s){a.$current_url=s;var o=nn(s);a.$host=o==null?void 0:o.host,a.$pathname=o==null?void 0:o.pathname;var u=Fg(s);ae(a,u)}if(n){var c=qg(n);ae(a,c)}return a}function Dg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Fy(){try{return new Date().getTimezoneOffset()}catch{return}}var qy={flags:tn,surveys:Wn},My=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ar="main";class Di{constructor(e,t,n){if(n===void 0&&(n=!0),this.lr={},this.ur=!1,this.hr=!1,this.Te=e,this.dr=n,this.props={},this.cr=!1,this.vr=(s=>{var a="";return s.token&&(a=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+a+"_posthog"})(e),this.Je=this.pr(e),this.hr=this.gr(e),this.load(),e.debug&&q.info("Persistence loaded",e.persistence,A({},this.props)),this.update_config(e,e,t),this.save(),E){var i=()=>this.flush();fe(E,"beforeunload",i,{capture:!1}),fe(E,"pagehide",i,{capture:!1})}}mr(){var e,t=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return Te(t)&&t>0?t:0}isDisabled(){return!!this.yr}pr(e){My.indexOf(e.persistence.toLowerCase())===-1&&(q.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,n=(function(a,o){a===void 0&&(a=[]),o===void 0&&(o=!1);var u=[...fy,...a];return A({},ie,{F(c){try{var d={};try{d=Et.F(c)||{}}catch{}var l,f=JSON.parse(ie.A(c)||"{}");if(o){var h={};for(var p in d){var v=d[p];Me(v)||v===""||(h[p]=v)}l=ae(f,h)}else l=ae(d,f);return ie.q(c,l),l}catch{}return null},q(c,d,l,f,h,p){var v=ie.q(c,d,void 0,void 0,p);try{var g={};u.forEach((_=>{d[_]&&(g[_]=d[_])})),Object.keys(g).length&&Et.q(c,g,l,f,h,p)}catch(_){ie.D(_)}return v},P(c,d){try{E==null||E.localStorage.removeItem(c),Et.P(c,d)}catch(l){ie.D(l)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),i=!1,s=e.persistence.toLowerCase();return s==="localstorage"&&ie.N()?(t=ie,i=!0):s==="localstorage+cookie"&&n.N()?(t=n,i=!0):s==="sessionstorage"&&Oe.N()?t=Oe:s==="memory"?t=hy:s==="cookie"?t=Et:n.N()?(t=n,i=!0):t=Et,this.ur=i,t}br(e){return this.vr+"__"+e}gr(e){return this.ur&&!!e.split_storage}_r(e){var t=e??this.Te.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[tn];return!n||typeof n!="number"||Date.now()-n>t}properties(){var e={};return re(this.props,((t,n)=>{var i=Ht(n);if((i==null?void 0:i.exposure)==="derived"){if(i.shouldSkipFromEventProperties!=null&&i.shouldSkipFromEventProperties(t,n===Jt?()=>this._r():()=>!1))return;i.transformToEventProperties&&ae(e,i.transformToEventProperties(t))}else if(!i||i.exposure==="event"){if(i!=null&&i.shouldSkipFromEventProperties!=null&&i.shouldSkipFromEventProperties(t,(()=>!1)))return;e[n]=t}})),e}load(){if(!this.yr){var e=this.Je.F(this.vr);e&&(this.props=ae({},e)),this.hr&&this.wr()}}wr(){for(var e of Ni){var t=ie.F(this.br(e));if(t&&!Ft(t)){var n=this.kr(e);n.persisted=!0,this.Sr(e)||(n.fingerprint=this.Cr(t,e)),this.Ir(e,t)||ae(this.props,t)}}}Sr(e){return Object.keys(this.props).some((t=>{var n;return((n=Ht(t))==null?void 0:n.storageGroup)===e}))}Ir(e,t){var n=qy[e];if(!n)return!1;var i=t[n],s=this.props[n];return Te(i)&&Te(s)&&s>i}refreshKey(e){var t;
1if(!this.yr){var n=this.hr?(t=Ht(e))==null?void 0:t.storageGroup:void 0,i=n?ie.F(this.br(n)):this.Je.F(this.vr);if(i&&e in i)this.Tr(e,i[e]);else{if(n){var s=this.Je.F(this.vr);if(s&&e in s)return void this.Tr(e,s[e])}this.Mr(e)}}}save(){if(!this.yr){var e=this.mr();e>0?F(this.Er)&&(this.Er=setTimeout((()=>{this.Er=void 0,this.Rr()}),e)):this.Rr()}}flush(){F(this.Er)||(clearTimeout(this.Er),this.Er=void 0,this.Rr())}Rr(){this.yr||(this.hr?this.Pr():this.Or(this.Je,this.vr,this.props,ar))}Pr(){var e=this.Fr(),t=e.main,n=e.groups;for(var i of(this.Or(this.Je,this.vr,t,ar),Ni)){var s,a=n[i];(!Ft(a)||(s=this.lr[i])!=null&&s.persisted)&&this.Or(ie,this.br(i),a,i)}}Fr(){var e={},t={flags:{},surveys:{}};return re(this.props,((n,i)=>{var s,a=(s=Ht(i))==null?void 0:s.storageGroup;a?t[a][i]=n:e[i]=n})),{main:e,groups:t}}Cr(e,t){if(t===ar)return JSON.stringify(e)+"|"+this.Lr+"|"+this.$r+"|"+this.Ar;var n={};return re(e,((i,s)=>{var a;n[s]=(a=Ht(s))!=null&&a.volatile?"__volatile__":i})),JSON.stringify(n)}Or(e,t,n,i){var s=this.kr(i);if(i===ar||s.dirty||F(s.fingerprint)){var a;try{if((a=this.Cr(n,i))===s.fingerprint)return void(s.dirty=!1)}catch{a=void 0}e.q(t,n,this.Lr,this.$r,this.Ar,this.Te.debug)?(s.dirty=!1,i!==ar&&(s.persisted=!0),F(a)||(s.fingerprint=a)):this.Te.debug&&q.warn('failed to persist storage entry "'+t+'"; will retry on next save')}}remove(e){var t=(e===void 0?{}:e).keepGroupEntries,n=t!==void 0&&t;if(F(this.Er)||(clearTimeout(this.Er),this.Er=void 0),this.Je.P(this.vr,!1),this.Je.P(this.vr,!0),!n&&this.dr)for(var i of Ni)ie.P(this.br(i));n?delete this.lr[ar]:this.lr={}}clear(){this.remove(),this.props={}}register_once(e,t,n){if(ue(e)){F(t)&&(t="None"),this.Lr=F(n)?this.Nr:n;var i=!1;if(re(e,((s,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==t||(this.Tr(a,s),i=!0)})),i)return this.save(),!0}return!1}register(e,t){if(ue(e)){this.Lr=F(t)?this.Nr:t;var n=!1;if(re(e,((i,s)=>{e.hasOwnProperty(s)&&this.props[s]!==i&&(this.Tr(s,i),n=!0)})),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Mr(e),this.save())}update_campaign_params(){if(!this.cr){var e=Ag(this.Te.custom_campaign_params,this.Te.mask_personal_data_properties,this.Te.custom_personal_data_properties);Ft(Fl(e))||this.register(e),this.cr=!0}}update_search_keyword(){var e;this.register((e=D==null?void 0:D.referrer)?qg(e):{})}update_referrer_info(){var e;this.register_once({$referrer:Mg(),$referring_domain:D!=null&&D.referrer&&((e=nn(D.referrer))==null?void 0:e.host)||ri},void 0)}set_initial_person_info(){this.props[il]||this.props[sl]||this.register_once({[Jn]:Lg(this.Te.mask_personal_data_properties,this.Te.custom_personal_data_properties,this.Te.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};re([sl,il],(i=>{var s=this.props[i];s&&re(s,(function(a,o){e["$initial_"+Lu(o)]=a}))}));var t=this.props[Jn];if(t){var n=(function(i,s){s===void 0&&(s=!1);var a=Ng(i,s),o={};return re(a,(function(u,c){o["$initial_"+Lu(c)]=u})),o})(t,this.Te.disable_capture_url_hashes);ae(e,n)}return e}safe_merge(e){return re(this.props,(function(t,n){n in e||(e[n]=t)})),e}
1update_config(e,t,n){this.Nr=this.Lr=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var i=e.persistence!==t.persistence||!((u,c)=>{if(u.length!==c.length)return!1;var d=[...u].sort(),l=[...c].sort();return d.every(((f,h)=>f===l[h]))})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),s=i?this.pr(e):this.Je,a=this.gr(e);if(i||a!==this.hr){var o=this.props;this.clear(),this.Je=s,this.hr=a,this.props=o,this.save()}}set_disabled(e){this.yr=e,this.yr?this.remove():this.save()}set_cross_subdomain(e){e!==this.$r&&(this.$r=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Ar&&(this.Ar=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var n=this.props[$r]||{};n[e]=t,this.Tr($r,n),this.save()}remove_event_timer(e){var t=this.props[$r]||{},n=t[e];return F(n)||(delete t[e],this.Tr($r,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Tr(e,t),this.save()}Tr(e,t){var n;this.props[e]=t,(n=Ht(e))!=null&&n.volatile||this.Dr(e)}Mr(e){delete this.props[e],this.Dr(e)}Dr(e){var t,n=(t=Ht(e))==null?void 0:t.storageGroup;n&&(this.kr(n).dirty=!0)}kr(e){return this.lr[e]||(this.lr[e]={})}}var kr={Activation:"events",Cancellation:"cancelEvents"},ji={Popover:"popover",API:"api",Widget:"widget"},Ot={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},$i={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},ll={Popover:"popover",Inline:"inline"},Ly={SHOWN:"product tour shown"},$c={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},Bc=ce("[RateLimiter]");class Ny{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=t=>{var n=t.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach((i=>{Bc.info((i||"events")+" is quota limited."),this.serverLimits[i]=new Date().getTime()+6e4}))}catch(i){return void Bc.warn('could not rate limit - continuing. Error: "'+(i==null?void 0:i.message)+'"',{text:n})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,n,i;e===void 0&&(e=!1);var s=this.captureEventsBurstLimit,a=this.captureEventsPerSecond,o=new Date().getTime(),u=(t=(n=this.instance.persistence)==null?void 0:n.get_property(nl))!==null&&t!==void 0?t:{tokens:s,last:o};u.tokens+=(o-u.last)/1e3*a,u.last=o,u.tokens>s&&(u.tokens=s);var c=1>u.tokens;return c||e||(u.tokens=Math.max(0,u.tokens-1)),!c||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(i=this.instance.persistence)==null||i.set_property(nl,u),{isRateLimited:c,remainingTokens:u.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}}var Ir=ce("[RemoteConfig]");class jg{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=B._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}qr(e){var t,n;(t=B.__PosthogExtensions__)!=null&&t.loadExternalDependency?(n=B.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}jr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return Ir.info("Using preloaded remote config",this.remoteConfig),this.Hr(this.remoteConfig),void this.Br();if(this._instance.Ur())return void Ir.warn("Remote config is disabled. Falling back to local config.");this.qr((e=>{if(!e)return Ir.info("No config found after loading remote JS config. Falling back to JSON."),void this.jr((t=>{this.Hr(t),this.Br()}));this.Hr(e),this.Br()}))}catch(e){Ir.error("Error loading remote config",e)}}stop(){this.zr&&(clearInterval(this.zr),this.zr=void 0)}refresh(){!this._instance.Ur()&&D&&D.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Br(){var e;if(!this.zr){var t=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;t!==0&&(this.zr=setInterval((()=>{this.refresh()}),t))}}Hr(e){var t;e||Ir.error("Failed to fetch remote config from PostHog."),this._instance.Hr(e?{ok:!0,config:e}:{ok:!1}),(e==null?void 0:e.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(t=this._instance.featureFlags)==null||t.ensureFlagsLoaded())}}var Fe={GZipJS:"gzip-js",Base64:"base64"},Je=Uint8Array,De=Uint16Array,Sr=Uint32Array,Nl=new Je([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Dl=new Je([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Hc=new Je([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$g=function(r,e){for(var t=new De(31),n=0;31>n;++n)t[n]=e+=1<<r[n-1];var i=new Sr(t[30]);for(n=1;30>n;++n)for(var s=t[n];t[n+1]>s;++s)i[s]=s-t[n]<<5|n;return[t,i]},Bg=$g(Nl,2),cl=Bg[1];Bg[0][28]=258,cl[258]=28;for(var Uc=$g(Dl,0)[1],Hg=new De(32768),le=0;32768>le;++le){var or=(43690&le)>>>1|(21845&le)<<1;Hg[le]=((65280&(or=(61680&(or=(52428&or)>>>2|(13107&or)<<2))>>>4|(3855&or)<<4))>>>8|(255&or)<<8)>>>1}var Xr=function(r,e,t){for(var n=r.length,i=0,s=new De(e);n>i;++i)++s[r[i]-1];var a,o=new De(e);for(i=0;e>i;++i)o[i]=o[i-1]+s[i-1]<<1;for(a=new De(n),i=0;n>i;++i)a[i]=Hg[o[r[i]-1]++]>>>15-r[i];return a},Qt=new Je(288);for(le=0;144>le;++le)Qt[le]=8;for(le=144;256>le;++le)Qt[le]=9;for(le=256;280>le;++le)Qt[le]=7;for(le=280;288>le;++le)Qt[le]=8;var ni=new Je(32);for(le=0;32>le;++le)ni[le]=5;var Dy=Xr(Qt,9),jy=Xr(ni,5),Ug=function(r){return(r/8>>0)+(7&r&&1)},zg=function(r,e,t){(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof De?De:r instanceof Sr?Sr:Je)(t-e);return n.set(r.subarray(e,t)),n}
1,gt=function(r,e,t){var n=e/8>>0;r[n]|=t<<=7&e,r[n+1]|=t>>>8},Cr=function(r,e,t){var n=e/8>>0;r[n]|=t<<=7&e,r[n+1]|=t>>>8,r[n+2]|=t>>>16},Bi=function(r,e){for(var t=[],n=0;r.length>n;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,s=t.slice();if(!i)return[new Je(0),0];if(i==1){var a=new Je(t[0].s+1);return a[t[0].s]=1,[a,1]}t.sort((function(S,O){return S.f-O.f})),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,d=1,l=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};d!=i-1;)o=t[t[l].f>t[c].f?c++:l++],u=t[c!=d&&t[l].f>t[c].f?c++:l++],t[d++]={s:-1,f:o.f+u.f,l:o,r:u};var f=s[0].s;for(n=1;i>n;++n)s[n].s>f&&(f=s[n].s);var h=new De(f+1),p=dl(t[d-1],h,0);if(p>e){n=0;var v=0,g=p-e,_=1<<g;for(s.sort((function(S,O){return h[O.s]-h[S.s]||S.f-O.f}));i>n;++n){var m=s[n].s;if(e>=h[m])break;v+=_-(1<<p-h[m]),h[m]=e}for(v>>>=g;v>0;){var b=s[n].s;e>h[b]?v-=1<<e-h[b]++-1:++n}for(;n>=0&&v;--n){var w=s[n].s;h[w]==e&&(--h[w],++v)}p=e}return[new Je(h),p]},dl=function(r,e,t){return r.s==-1?Math.max(dl(r.l,e,t+1),dl(r.r,e,t+1)):e[r.s]=t},zc=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new De(++e),n=0,i=r[0],s=1,a=function(u){t[n++]=u},o=1;e>=o;++o)if(r[o]==i&&o!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=r[o]}return[t.subarray(0,n),e]},Ar=function(r,e){for(var t=0,n=0;e.length>n;++n)t+=r[n]*e[n];return t},fl=function(r,e,t){var n=t.length,i=Ug(e+2);r[i]=255&n,r[i+1]=n>>>8,r[i+2]=255^r[i],r[i+3]=255^r[i+1];for(var s=0;n>s;++s)r[i+s+4]=t[s];return 8*(i+4+n)},Gc=function(r,e,t,n,i,s,a,o,u,c,d){gt(e,d++,t),++i[256];for(var l=Bi(i,15),f=l[0],h=l[1],p=Bi(s,15),v=p[0],g=p[1],_=zc(f),m=_[0],b=_[1],w=zc(v),S=w[0],O=w[1],I=new De(19),x=0;m.length>x;++x)I[31&m[x]]++;for(x=0;S.length>x;++x)I[31&S[x]]++;for(var P=Bi(I,7),C=P[0],R=P[1],M=19;M>4&&!C[Hc[M-1]];--M);var L,y,T,k,j=c+5<<3,U=Ar(i,Qt)+Ar(s,ni)+a,$=Ar(i,f)+Ar(s,v)+a+14+3*M+Ar(I,C)+(2*I[16]+3*I[17]+7*I[18]);if(U>=j&&$>=j)return fl(e,d,r.subarray(u,u+c));if(gt(e,d,1+(U>$)),d+=2,U>$){L=Xr(f,h),y=f,T=Xr(v,g),k=v;var ne=Xr(C,R);for(gt(e,d,b-257),gt(e,d+5,O-1),gt(e,d+10,M-4),d+=14,x=0;M>x;++x)gt(e,d+3*x,C[Hc[x]]);d+=3*M;for(var H=[m,S],K=0;2>K;++K){var z=H[K];for(x=0;z.length>x;++x)gt(e,d,ne[X=31&z[x]]),d+=C[X],X>15&&(gt(e,d,z[x]>>>5&127),d+=z[x]>>>12)}}else L=Dy,y=Qt,T=jy,k=ni;for(x=0;o>x;++x)if(n[x]>255){var X;Cr(e,d,L[257+(X=n[x]>>>18&31)]),d+=y[X+257],X>7&&(gt(e,d,n[x]>>>23&31),d+=Nl[X]);var Z=31&n[x];Cr(e,d,T[Z]),d+=k[Z],Z>3&&(Cr(e,d,n[x]>>>5&8191),d+=Dl[Z])}else Cr(e,d,L[n[x]]),d+=y[n[x]];return Cr(e,d,L[256]),d+y[256]},$y=new Sr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=(function(){for(var r=new Sr(256),e=0;256>e;++e){for(var t=e,n=9;--n;)t=(1&t&&3988292384)^t>>>1;r[e]=t}return r})(),Hi=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8};function Hy(r,e){e===void 0&&(e={});var t=(function(){var l=4294967295;return{p(f){for(var h=l,p=0;f.length>p;++p)h=By[255&h^f[p]]^h>>>8;l=h},d(){return 4294967295^l}}})(),n=r.length;t.p(r);var i,s,a,o,u,c=(o=10+((i=e).filename&&i.filename.length+1||0),u=8,(function(l,f,h,p,v,g){var _=l.length,m=new Je(p+_+5*(1+Math.floor(_/7e3))+v),b=m.subarray(p,m.length-v),w=0;if(!f||8>_)for(var S=0;_>=S;S+=65535){var O=S+65535;_>O?w=fl(b,w,l.subarray(S,O)):(b[S]=!0,w=fl(b,w,l.subarray(S,_)))}else{for(var I=$y[f-1],x=I>>>13,P=8191&I,C=(1<<h)-1,R=new De(32768),M=new De(C+1),L=Math.ceil(h/3),y=2*L,T=function(ot){return(l[ot]^l[ot+1]<<L^l[ot+2]<<y)&C},k=new Sr(25e3),j=new De(288),U=new De(32),$=0,ne=0,H=(S=0,0),K=0,z=0;_>S;++S){var X=T(S),Z=32767&S,V=M[X];if(R[Z]=V,M[X]=Z,S>=K){var ye=_-S;if(($>7e3||H>24576)&&ye>423){w=Gc(l,b,0,k,j,U,ne,H,z,S-z,w),H=$=ne=0,z=S;for(var se=0;286>se;++se)j[se]=0;for(se=0;30>se;++se)U[se]=0}var _e=2,we=0,he=P,xe=Z-V&32767;if(ye>2&&X==T(S-xe))for(var vt=Math.min(x,ye)-1,Ge=Math.min(32767,S),tr=Math.min(258,ye);Ge>=xe&&--he&&Z!=V;){if(l[S+_e]==l[S+_e-xe]){for(var Ce=0;tr>Ce&&l[S+Ce]==l[S+Ce-xe];++Ce);if(Ce>_e){if(_e=Ce,we=xe,Ce>vt)break;var at=Math.min(xe,Ce-2),It=0;for(se=0;at>se;++se){var Be=S-xe+se+32768&32767,dn=Be-R[Be]+32768&32767;dn>It&&(It=dn,V=Be)}}}xe+=(Z=V)-(V=R[Z])+32768&32767}if(we){k[H++]=268435456|cl[_e]<<18|Uc[we];var fn=31&cl[_e],Pe=31&Uc[we];ne+=Nl[fn]+Dl[Pe],++j[257+fn],++U[Pe],K=S+_e,++$}else k[H++]=l[S],++j[l[S]]}}w=Gc(l,b,!0,k,j,U,ne,H,z,S-z,w)}return zg(m,0,p+Ug(w)+v)})(s=r,(a=e).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+a.mem,o,u)),d=c.length;return(function(l,f){var h=f.filename;if(l[0]=31,l[1]=139,l[2]=8,l[8]=2>f.level?4:f.level==9?2:0,l[9]=3,f.mtime!=0&&Hi(l,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),h){l[3]=8;for(var p=0;h.length>=p;
1++p)l[p+10]=h.charCodeAt(p)}})(c,e),Hi(c,d-8,t.d()),Hi(c,d-4,n),c}var Uy=!!Fu||!!Sl,Gg="text/plain",qn=!1,hl=(r,e)=>{var t=r.split("#"),n=t[1],i=t[0].split("?"),s=i[0],a=i[1];if(!a)return r;var o=a.split("&").filter((u=>u.split("=")[0]!==e)).join("&");return s+(o?"?"+o:"")+(n?"#"+n:"")},jl=function(r,e,t){var n;t===void 0&&(t=!0);var i=r.split("?"),s=i[0],a=i[1],o=A({},e),u=(n=a==null?void 0:a.split("&").map((d=>{var l,f=d.split("="),h=f[0],p=t&&(l=o[h])!==null&&l!==void 0?l:f[1];return delete o[h],h+"="+p})))!==null&&n!==void 0?n:[],c=(function(d,l){var f,h;l===void 0&&(l="&");var p=[];return re(d,(function(v,g){F(v)||F(g)||g==="undefined"||(f=encodeURIComponent((_=>_ instanceof File)(v)?v.name:v.toString()),h=encodeURIComponent(g),p[p.length]=h+"="+f)})),p.join(l)})(o);return c&&u.push(c),u.length>0?s+"?"+u.join("&"):s},Ui=r=>{if(r.Vr)return r.Vr;var e=r.data,t=r.compression;if(e){if(t===Fe.GZipJS){var n=Hy((function(o,u){var c=o.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(o);for(var d=new Je(o.length+(o.length>>>1)),l=0,f=function(g){d[l++]=g},h=0;c>h;++h){if(l+5>d.length){var p=new Je(l+8+(c-h<<1));p.set(d),d=p}var v=o.charCodeAt(h);128>v?f(v):2048>v?(f(192|v>>>6),f(128|63&v)):v>55295&&57344>v?(f(240|(v=65536+(1047552&v)|1023&o.charCodeAt(++h))>>>18),f(128|v>>>12&63),f(128|v>>>6&63),f(128|63&v)):(f(224|v>>>12),f(128|v>>>6&63),f(128|63&v))}return zg(d,0,l)})(vr(e)),{mtime:0});return{contentType:Gg,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(t===Fe.Base64){var i=(function(o){return o&&btoa(encodeURIComponent(o).replace(/%([0-9A-F]{2})/g,((u,c)=>String.fromCharCode(parseInt(c,16)))))})(vr(e)),s=(o=>"data="+encodeURIComponent(typeof o=="string"?o:vr(o)))(i);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=vr(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Vg=r=>{var e,t,n=()=>r.transport==="sendBeacon"?{url:jl(r.url,{compression:Fe.Base64}),encodedBody:Ui(A({},r,{compression:Fe.Base64,Vr:void 0}))}:{url:hl(r.url,"compression"),encodedBody:Ui(A({},r,{compression:void 0,Vr:void 0}))};try{e=Ui(r)}catch(i){if(vc(r.compression,wr(r.url,"compression")))return q.error("Failed to gzip request body, sending uncompressed payload",i),n();throw i}return e&&vc(r.compression,wr(r.url,"compression"))&&!((t=e.body)instanceof ArrayBuffer?qu(new Uint8Array(t)):ArrayBuffer.isView(t)&&qu(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?(qn=!0,n()):{url:r.url,encodedBody:e}},Kg=r=>{try{return Vg(r)}catch(e){return q.error(e),void(r.callback==null||r.callback({statusCode:0,error:e}))}},zy=(function(){var r=ve((function*(e){var t=vr(e.data),n=yield(function(s,a,o){return Mu.apply(this,arguments)})(t,ee.DEBUG,{rethrow:!0});if(!n)return e;var i=yield n.arrayBuffer();return A({},e,{Vr:{contentType:Gg,body:i,estimatedSize:i.byteLength}})}));return function(e){return r.apply(this,arguments)}})(),Gy=/Failed to fetch|NetworkError|Load failed/i,Wg=r=>{var e=Kg(r);if(e){var t=e.url,n=e.encodedBody,i=n??{},s=i.contentType,a=i.body,o=i.estimatedSize,u=new Headers;re(r.headers,(function(p,v){u.append(v,p)})),s&&u.append("Content-Type",s);var c=null,d=!1;if(uc){var l=new uc;c={signal:l.signal,timeout:setTimeout((()=>{var p,v;d=!0,l.abort((p=r.timeout,(v=new Error("PostHog request timed out"+(p?" after "+p+"ms":""))).name="AbortError",v))}),r.timeout)}}var f=p=>{d&&(p==null?void 0:p.name)==="AbortError"||(v=>(v==null?void 0:v.name)==="TypeError"&&Gy.test((v==null?void 0:v.message)||""))(p)?q.warn(p):q.error(p),r.callback==null||r.callback({statusCode:0,error:p})};try{var h;Sl(t,A({method:(r==null?void 0:r.method)||"GET",headers:u,keepalive:r.method==="POST"&&!r.Wr&&52428.8>(o||0),body:a,signal:(h=c)==null?void 0:h.signal},r.fetchOptions)).then((p=>p.text().then((v=>{var g={statusCode:p.status,text:v};if(p.status===200)try{g.json=JSON.parse(v)}catch(_){q.error(_)}r.callback==null||r.callback(g)})))).catch(f).finally((()=>c?clearTimeout(c.timeout):null))}catch(p){c&&clearTimeout(c.timeout),f(p)}}},pl=r=>{try{var e=Vg(r),t=e.url,n=e.encodedBody,i=n??{},s=i.body,a=i.estimatedSize;if(!s)return;var o=s instanceof Blob?s:new Blob([s],{type:i.contentType});if(qe.sendBeacon(t,o))return;if(J(r.data)&&r.data.length>1&&(a??0)>16384){var u=Math.ceil(r.data.length/2);return pl(A({},r,{data:r.data.slice(0,u)})),void pl(A({},r,{data:r.data.slice(u)}))}q.warn("Beacon of ~"+(a??0)+" bytes was rejected by the browser, falling back to fetch"),Wg(A({},r,{Wr:!0}))}catch(c){q.warn("Beacon send failed",c)}},Vy=["/e/","/s/"],Vc=(r,e,t,n)=>{var i=(o=>{var u=(c=>{var d=nn(c),l=(d==null?void 0:d.pathname)||c.split(/[?#]/)[0];return l?l[0]==="/"?l:"/"+l:"/"})(o);return Vy.some((c=>((d,l)=>d.slice(d.length-l.length)===l)(u,c)))})(r),s=i?hl(r,"ver"):r,a=n==="query"?e==="POST"?"sent_at":"_":void 0;return jl(t===Fe.GZipJS?hl(s,"compression"):s,A({},a?{[a]:Date.now().toString()}:{},i?{}:{ver:ee.JS_SDK_VERSION},t===Fe.GZipJS?{}:{compression:t}))},Mn=[];Sl&&Mn.push({transport:"fetch",method:Wg}),Fu&&Mn.push({transport:"XHR",method(r){var e=Kg(r);if(e){var t=new Fu,n=e.encodedBody;t.open(r.method||"GET",e.url,!0);var i=n??{},s=i.contentType,a=i.body;re(r.headers,(function(o,u){t.setRequestHeader(u,o)})),s&&t.setRequestHeader("Content-Type",s),r.timeout&&(t.timeout=r.timeout),t.onreadystatechange=()=>{if(t.readyState===4){var o={statusCode:t.status,text:t.responseText};if(t.status===200)try{o.json=JSON.parse(t.responseText)}catch{}r.callback==null||r.callback(o)}},t.send(a)}}}),qe!=null&&qe.sendBeacon&&Mn.push({transport:"sendBeacon",method:pl});var vl=3e3;class Ky{constructor(e,t){this.Zr=!0,this.Gr=[],this.Qr=dt((t==null?void 0:t.flush_interval_ms)||vl,250,5e3,q.createLogger("flush interval"),vl),this.Jr=e}enqueue(e){this.Gr.push(e),this.Kr||this.Yr()}
1unload(){this.Xr();var e=this.Gr.length>0?this.ti():{},t=Object.values(e);[...t.filter((n=>n.url.indexOf("/e")===0)),...t.filter((n=>n.url.indexOf("/e")!==0))].map((n=>{this.ei(A({},n,{transport:"sendBeacon"}))}))}enable(){this.Zr=!1,this.Yr()}Yr(){var e=this;this.Zr||(this.Kr=setTimeout((()=>{if(this.Xr(),this.Gr.length>0){var t=this.ti(),n=function(){var s=t[i],a=new Date().getTime();s.data&&J(s.data)&&re(s.data,(o=>{o.offset=Math.abs(o.timestamp-a),delete o.timestamp})),e.ei(s)};for(var i in t)n()}}),this.Qr))}ei(e){try{this.Jr(e)}catch(t){q.error(t)}}Xr(){clearTimeout(this.Kr),this.Kr=void 0}ti(){var e={};return re(this.Gr,(t=>{var n,i=t,s=(i?i.batchKey:null)||i.url;F(e[s])&&(e[s]=A({},i,{data:[]})),(n=e[s].data)==null||n.push(i.data)})),this.Gr=[],e}}var Wy=["retriesPerformedSoFar"];class Jy{constructor(e){this.ri=!1,this.ii=3e3,this.Gr=[],this._instance=e,this.Gr=[],this.ni=!0,!F(E)&&"onLine"in E.navigator&&(this.ni=E.navigator.onLine,this.si=()=>{this.ni=!0,this.oi()},this.ai=()=>{this.ni=!1},fe(E,"online",this.si),fe(E,"offline",this.ai))}get length(){return this.Gr.length}retriableRequest(e){var t=e.retriesPerformedSoFar,n=Sv(e,Wy);yt(t)&&(n.url=jl(n.url,{retry_count:t})),this._instance._send_request(A({},n,{callback:i=>{if(i.statusCode!==200&&(400>i.statusCode||i.statusCode>=500)){if((i.statusCode===0?3:10)>(t??0))return void this.Ot(A({retriesPerformedSoFar:t},n));i.statusCode===0&&q.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(t??0)+" retries.")}n.callback==null||n.callback(i)}}))}Ot(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=(function(a){var o=3e3*Math.pow(2,a),u=o/2,c=Math.min(18e5,o),d=Math.random()-.5;return Math.ceil(c+d*(c-u))})(t),i=Date.now()+n;this.Gr.push({retryAt:i,requestOptions:e});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),q.warn(s),this.ri||(this.ri=!0,this.li())}li(){if(this.ui&&clearTimeout(this.ui),this.Gr.length===0)return this.ri=!1,void(this.ui=void 0);this.ui=setTimeout((()=>{this.ni&&this.Gr.length>0&&this.oi(),this.li()}),this.ii)}oi(){var e=Date.now(),t=[],n=this.Gr.filter((s=>e>s.retryAt||(t.push(s),!1)));if(this.Gr=t,n.length>0)for(var i of n)this.retriableRequest(i.requestOptions)}unload(){for(var e of(this.ui&&(clearTimeout(this.ui),this.ui=void 0),this.ri=!1,F(E)||(this.si&&(E.removeEventListener("online",this.si),this.si=void 0),this.ai&&(E.removeEventListener("offline",this.ai),this.ai=void 0)),this.Gr)){var t=e.requestOptions;try{this._instance._send_request(A({},t,{transport:"sendBeacon"}))}catch(n){q.error(n)}}this.Gr=[]}}class Yy{constructor(e){this.hi=()=>{var t,n,i,s;this.di||(this.di={});var a=this.scrollElement(),o=this.scrollY(),u=a?Math.max(0,a.scrollHeight-a.clientHeight):0,c=o+((a==null?void 0:a.clientHeight)||0),d=(a==null?void 0:a.scrollHeight)||0;this.di.lastScrollY=Math.ceil(o),this.di.maxScrollY=Math.max(o,(t=this.di.maxScrollY)!==null&&t!==void 0?t:0),this.di.maxScrollHeight=Math.max(u,(n=this.di.maxScrollHeight)!==null&&n!==void 0?n:0),this.di.lastContentY=c,this.di.maxContentY=Math.max(c,(i=this.di.maxContentY)!==null&&i!==void 0?i:0),this.di.maxContentHeight=Math.max(d,(s=this.di.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}get ci(){return this._instance.config.scroll_root_selector}getContext(){return this.di}resetContext(){var e=this.di;return setTimeout(this.hi,0),e}startMeasuringScrollPosition(){fe(E,"scroll",this.hi,{capture:!0}),fe(E,"scrollend",this.hi,{capture:!0}),fe(E,"resize",this.hi)}scrollElement(){if(!this.ci)return E==null?void 0:E.document.documentElement;var e=J(this.ci)?this.ci:[this.ci];for(var t of e){var n=E==null?void 0:E.document.querySelector(t);if(n)return n}}vi(e){var t=e==="y"?"scrollTop":"scrollLeft";if(this.ci){var n=this.scrollElement();return n&&n[t]||0}return E?e==="y"?E.scrollY||E.pageYOffset||E.document.documentElement.scrollTop||0:E.scrollX||E.pageXOffset||E.document.documentElement.scrollLeft||0:0}scrollY(){return this.vi("y")}scrollX(){return this.vi("x")}}var Xy=r=>Lg(r==null?void 0:r.config.mask_personal_data_properties,r==null?void 0:r.config.custom_personal_data_properties,r==null?void 0:r.config.disable_capture_url_hashes
1);class Kc{constructor(e,t,n,i){this.fi=s=>{var a=this.pi();if(!a||a.sessionId!==s){var o={sessionId:s,props:this.gi(this._instance)};this.mi.register({[rl]:o})}},this._instance=e,this.yi=t,this.mi=n,this.gi=i||Xy,this.yi.onSessionId(this.fi)}pi(){return this.mi.props[rl]}getSetOnceProps(){var e,t=(e=this.pi())==null?void 0:e.props;return t?"r"in t?Ng(t,this._instance.config.disable_capture_url_hashes):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return re(Fl(this.getSetOnceProps()),((t,n)=>{n==="$current_url"&&(n="url"),e["$session_entry_"+Lu(n)]=t})),e}}class $l{on(e,t){return this.bi[e]||(this.bi[e]=[]),this.bi[e].push(t),()=>{this.bi[e]=this.bi[e].filter((n=>n!==t))}}emit(e,t){for(var n of this.bi[e]||[])n(t);for(var i of this.bi["*"]||[])i(e,t)}constructor(){this.bi={}}}var Fr=ce("[SessionId]");class Wc{on(e,t){return this.wi.on(e,t)}constructor(e,t,n){var i;if(this.xi=null,this.ki=[],this.Si=void 0,this.Ci=!1,this.wi=new $l,this.Ii=(c,d)=>!(!yt(c)||!yt(d))&&Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===St)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Te=e.config,this.mi=e.persistence,this.Ti=void 0,this.Mi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Ei=t||xt,this.Ri=n||xt;var s=this.Te.persistence_name||this.Te.token;if(this._sessionTimeoutMs=1e3*dt(this.Te.session_idle_timeout_seconds||1800,60,36e3,Fr.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Pi(),this.Oi="ph_"+s+"_window_id",this.Fi="ph_"+s+"_primary_window_exists",this.Li()){var a=Oe.F(this.Oi),o=Oe.F(this.Fi);a&&!o?this.Ti=a:Oe.P(this.Oi),Oe.q(this.Fi,!0)}if((i=this.Te.bootstrap)!=null&&i.sessionID)try{var u=(c=>{var d=this.Te.bootstrap.sessionID.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})();this.$i(this.Te.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Fr.error("Invalid sessionID in bootstrap",c)}this.Ai()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return F(this.ki)&&(this.ki=[]),this.ki.push(e),this.Mi&&e(this.Mi,this.Ti),()=>{this.ki=this.ki.filter((t=>t!==e))}}Li(){return this.Te.persistence!=="memory"&&!this.mi.yr&&Oe.N()}Ni(e){e!==this.Ti&&(this.Ti=e,this.Li()&&Oe.q(this.Oi,e))}Di(){return this.Ti?this.Ti:this.Li()?Oe.F(this.Oi):null}qi(e){var t=this.xi;return!Me(t)&&!Me(e)&&5e3>Math.abs(e-t)}
1$i(e,t,n){var i=t!==this._sessionActivityTimestamp,s=!(e!==this.Mi||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.Mi=e,s&&!i||s&&this.qi(t)||(this.xi=t,this.mi.register({[pr]:[t,e,n]}))}ji(){var e,t=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return yt(t)&&t>0}Hi(){this.ji()?this.mi.refreshKey(pr):(this.mi.flush(),this.mi.load())}Bi(){var e;if(!Me(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.xi){this.Hi();var t=this.Ui();t[1]===this.Mi&&t[2]===this._sessionStartTimestamp&&(this.xi=this._sessionActivityTimestamp,this.mi.register({[pr]:[this._sessionActivityTimestamp,(e=this.Mi)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.mi.flush())}}zi(){var e=this.Ui()[0],t=yt(e)?e:0,n=yt(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}Vi(e){return this.Hi(),this.Ii(e,this.zi())}Ui(){var e=this.mi.props[pr];return J(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.xi=null,clearTimeout(this.Wi),this.Wi=void 0,this.$i(null,null,null)}destroy(){this.Ci=!0,this.Bi(),clearTimeout(this.Wi),this.Wi=void 0,this.Si&&E&&(E.removeEventListener(Zn,this.Si,{capture:!1}),this.Si=void 0),this.ki=[]}Ai(){this.Si=()=>{this.Bi(),this.Li()&&Oe.P(this.Fi)},fe(E,Zn,this.Si,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.Te.cookieless_mode===St)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||new Date().getTime(),i=this.Ui(),s=i[1],a=i[2],o=this.zi(),u=this.Di(),c=yt(a)&&Math.abs(n-a)>864e5,d=!1,l=!1,f=!s,h=s,p=!f&&!e&&this.Ii(n,o);if(p){(p=this.Vi(n))||Fr.info("cross-tab refresh kept the session alive",{sessionId:s});var v=this.Ui();s=v[1],a=v[2]}f||p||c?(s=this.Ei(),u=this.Ri(),Fr.info("new session ID generated",{sessionId:s,windowId:u,changeReason:{noSessionId:f,activityTimeout:p,sessionPastMaximumLength:c}}),a=n,d=!0):(u||(u=this.Ri(),d=!0),(l=s!==h)&&(Fr.info("adopted cross-tab session id",{sessionId:s,windowId:u}),d=!0));var g=yt(o)&&e&&!c?o:n,_=yt(a)?a:new Date().getTime();this.Ni(u),this.$i(s,g,_),e||this.Pi();var m={noSessionId:f,activityTimeout:p,sessionPastMaximumLength:c,crossTabAdoption:l};return d&&this.ki.forEach((b=>b(s,u,m))),{sessionId:s,windowId:u,sessionStartTimestamp:_,changeReason:d?m:void 0,lastActivityTimestamp:o}}Pi(){this.Ci||(clearTimeout(this.Wi),this.Wi=setTimeout((()=>{if(!this.Ci)if(this.Vi(new Date().getTime())){var e=this.Mi;this.resetSessionId(),this.wi.emit("forcedIdleReset",{idleSessionId:e})}else this.Pi()}),1.1*this.sessionTimeoutMs))}}var Jg=function(r,e){if(!r)return!1;var t=r.userAgent;if(t&&_c(t,e))return!0;try{var n=r==null?void 0:r.userAgentData;if(n!=null&&n.brands&&n.brands.some((i=>_c(i==null?void 0:i.brand,e))))return!0}catch{}return!!r.webdriver};function Yg(){return(Yg=ve((function*(){var r=qe==null?void 0:qe.userAgentData;if(r!=null&&r.getHighEntropyValues)try{var e=yield r.getHighEntropyValues(["model"]),t=e==null?void 0:e.model;return te(t)&&t.length>0?t:void 0}catch(n){return void q.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",n)}}))).apply(this,arguments)}var ii=function(r,e){if(!(function(t){try{new RegExp(t)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(r)}catch{return!1}};function Jc(r,e,t){return vr({distinct_id:r,userPropertiesToSet:e,userPropertiesToSetOnce:t})}var Xg={exact:(r,e)=>e.some((t=>r.some((n=>t===n)))),is_not:(r,e)=>e.every((t=>r.every((n=>t!==n)))),regex:(r,e)=>e.some((t=>r.some((n=>ii(t,n))))),not_regex:(r,e)=>e.every((t=>r.every((n=>!ii(t,n))))),icontains:(r,e)=>e.map(Sn).some((t=>r.map(Sn).some((n=>t.includes(n))))),not_icontains:(r,e)=>e.map(Sn).every((t=>r.map(Sn).every((n=>!t.includes(n))))),gt:(r,e)=>e.some((t=>{var n=parseFloat(t);return!isNaN(n)&&r.some((i=>n>parseFloat(i)))})),lt:(r,e)=>e.some((t=>{var n=parseFloat(t);return!isNaN(n)&&r.some((i=>n<parseFloat(i)))}))},Sn=r=>r.toLowerCase();function Zg(r,e){return!r||Object.entries(r).every((t=>{var n=t[1],i=e==null?void 0:e[t[0]];if(F(i)||Me(i))return!1;var s=[String(i)],a=Xg[n.operator];return!!a&&a(n.values,s)}))}var gl="custom",Yc="i.posthog.com",Zy=/^\/static\//;class Qy{constructor(e){this.Zi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Yc,".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this.Zi[this.apiHost]||(this.Zi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":gl),this.Zi[this.apiHost]}Gi(e){if(Zy.test(e)){var t=this.instance.config.asset_host;if(typeof t=="string")return t.trim().replace(/\/$/,"")||void 0}}endpointFor(e,t){if(t===void 0&&(t=""),t&&(t=t[0]==="/"?t:"/"+t),e==="ui")return this.uiHost+t;if(e==="flags")return this.flagsApiHost+t;if(e==="assets"){var n=this.Gi(t);if(n)return""+n+t}if(this.region===gl)return this.apiHost+t;var i=Yc+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}function Qg(r){var e;return!((e=r.conditions)==null||(e=e.events)==null||(e=e.values)==null||!e.length)}var Q=ce("[Surveys]"),e_="seenSurvey_",t_=r=>{try{var e=(t=>((n,i)=>""+e_+(function(s){return s.current_iteration&&s.current_iteration>0?s.id+"_"+s.current_iteration:s.id})(i))(0,t))(r);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(t){Q.error("Failed to persist survey seen state",t)}},eb=[ji.Popover,ji.Widget,ji.API],tb={ignoreConditions:!1,ignoreDelay:!1,displayType:ll.Popover}
1,rb=ce("[PostHog ExternalIntegrations]"),nb={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ib{constructor(e){this._instance=e}tr(e,t){var n;(n=B.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,e,(i=>{if(i)return rb.error("failed to load script",i);t()}))}startIfEnabledOrStop(){var e=this,t=function(){var s,a,o,u=n[0],c=n[1];!c||(s=B.__PosthogExtensions__)!=null&&(s=s.integrations)!=null&&s[u]||e.tr(nb[u],(()=>{var d;(d=B.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[u])==null||d.start(e._instance)})),!c&&(a=B.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[u]&&((o=B.__PosthogExtensions__)==null||(o=o.integrations)==null||(o=o[u])==null||o.stop())};for(var n of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;t()}}}var Zr={},zi=0,si=()=>{},Xc='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',qr="Surveys module not available",Zc="sanitize_properties is deprecated. Use before_send instead",r_="Invalid value for property_denylist config: ",sb=["token","distinct_id",ug],hr="posthog",n_=!Uy&&(Le==null?void 0:Le.indexOf("MSIE"))===-1&&(Le==null?void 0:Le.indexOf("Mozilla"))===-1,Gi=r=>{var e;return A({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:oy(D==null?void 0:D.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:si,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:r??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:ge&&te(ge==null?void 0:ge.search)&&ge.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(E==null||(e=E.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(t){q.error("Bad HTTP status: "+t.statusCode+" "+t.text)},get_device_id:t=>t,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:al,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:vl},error_tracking:{},_onCapture:si},(t=>({rageclick:t&&t>="2026-05-30"?{content_ignorelist:yy,ignore_text_selection:!0}
1:!t||"2025-11-30">t||{content_ignorelist:!0},capture_pageview:!t||"2025-05-24">t||"history_change",session_recording:t&&t>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:t&&t>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:t&&t>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:t&&t>="2026-01-30"?"head":"body",internal_or_test_user_hostname:t&&t>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:t&&t>="2026-05-30"?250:0,split_storage:!(!t||"2026-05-30">t),detect_google_search_app:!(!t||"2026-05-30">t),disable_capture_url_hashes:!(!t||"2026-06-25">t)}))(r))},ab=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],Qc=r=>{var e={};for(var t of ab){var n=t[0],i=t[1];F(r[n])||(e[i]=r[n])}var s=ae({},e,r),a=r.__preview_external_dependency_versioned_paths;return F(a)||(F(r.strict_script_versioning)&&(s.strict_script_versioning=!!a),te(a)&&F(r.asset_host)&&(s.asset_host=a)),J(r.property_blacklist)&&(F(r.property_denylist)?s.property_denylist=r.property_blacklist:J(r.property_denylist)?s.property_denylist=[...r.property_blacklist,...r.property_denylist]:q.error(r_+r.property_denylist)),s};class ob{constructor(){this.__forceAllowLocalhost=!1}get Qi(){return this.__forceAllowLocalhost}set Qi(e){q.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class We{Ji(e,t){if(e){var n=this.Ki.indexOf(e);n!==-1&&this.Ki.splice(n,1)}return this.Ki.push(t),t.initialize==null||t.initialize(),t}Yi(){return this.config.cookieless_mode===St||this.config.cookieless_mode===Wt&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new ob,this.Xi=!1,this.version=ee.LIB_VERSION,this.tn=new $l,this.Ki=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Gi(),this.SentryIntegration=Ry,this.sentryIntegration=n=>(function(i,s){var a=kg(i,s);return{name:Rg,processEvent:o=>a(o)}})(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.en=!1,this.rn=null,this.nn=null,this.sn=null,this.scrollManager=new Yy(this),this.pageViewManager=new Dc(this),this.rateLimiter=new Ny(this),this.requestRouter=new Qy(this),this.consent=new py(this),this.externalIntegrations=new ib(this);var t=(e=We.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(n,i,s)=>{var a=te(n)?{[n]:i}:n;this.setPersonProperties(a),s==null||s({})},set_once:(n,i,s)=>{var a=te(n)?{[n]:i}:n;this.setPersonProperties(void 0,a),s==null||s({})}},this.on("eventCaptured",(n=>q.info('send "'+(n==null?void 0:n.event)+'"',n)))}init(e,t,n){if(n&&n!==hr){var i,s=(i=Zr[n])!==null&&i!==void 0?i:new We;return s._init(e,t,n),Zr[n]=s,Zr[hr][n]=s,s}return this._init(e,t,n)}_init(e,t,n){var i,s;t===void 0&&(t={});var a=te(e)?e.trim():"";if(!a)return q.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=Gi(t.defaults),t.debug=this.an(t.debug),this.ln=t,this.un=[],t.person_profiles?this.nn=t.person_profiles:t.process_person&&(this.nn=t.process_person);var o=Gi(t.defaults),u=Qc(t),c=ae({},o,u,{name:n,token:a});ue(o.rageclick)&&ue(u.rageclick)&&(c.rageclick=ae({},o.rageclick,u.rageclick)),ue(o.session_recording)&&ue(u.session_recording)&&(c.session_recording=ae({},o.session_recording,u.session_recording)),this.set_config(c),this.config.on_xhr_error&&q.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:Fe.GZipJS;var d=this.hn();this.persistence=new Di(this.config,d),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Di(A({},this.config,{persistence:"sessionStorage"}),d,!1);var l=A({},this.persistence.props),f=A({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.dn=new Ky((w=>this.cn(w)),this.config.request_queue_config),this.vn=new Jy(this),this.__request_queue=[];var h=this.Yi();if(h||(this.sessionManager=new Wc(this),this.sessionPropsManager=new Kc(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(q.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.fn(h)}),0)):(q.info("Initializing extensions synchronously"),this.fn(h)),ee.DEBUG=ee.DEBUG||this.config.debug,ee.DEBUG&&q.info("Starting in debug mode",{this:this,config:t,thisC:A({},this.config),p:l,s:f}),!this.config.identity_distinct_id||(i=t.bootstrap)!=null&&i.distinctID||(t.bootstrap=A({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=t.bootstrap)==null?void 0:s.distinctID)!==void 0){var p=t.bootstrap.distinctID,v=this.get_distinct_id(),g=this.persistence.get_property(Qe);if(t.bootstrap.isIdentifiedID&&v!=null&&v!==p&&g===ir)this.identify(p);else if(t.bootstrap.isIdentifiedID&&v!=null&&v!==p&&g===sr)q.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var _=this.config.get_device_id(xt()),m=t.bootstrap.isIdentifiedID?_:p;this.persistence.set_property(Qe,t.bootstrap.isIdentifiedID?sr:ir),this.register({distinct_id:p,$device_id:m})}}if(h)this.register_once({distinct_id:mn,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(xt());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(Qe,ir)}return fe(E,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?(function(w,S){var O=w.config.segment;if(!O)return S();(function(I,x){var P=I.config.segment;if(!P)return x();var C=M=>{var L=()=>M.anonymousId()||xt();I.config.get_device_id=L,M.id()&&(I.register({distinct_id:M.id(),$device_id:L()}),I.persistence.set_property(Qe,sr)),x()},R=P.user();"then"in R&&et(R.then)?R.then(C):C(R)})(w,(()=>{O.register((I=>{typeof Promise<"u"&&Promise.resolve||Li.warn("This browser does not have Promise support, and can not use the segment integration");var x=(P,C)=>{if(!C)return P;P.event.userId||P.event.anonymousId===I.get_distinct_id()||(Li.info("No userId set, resetting PostHog"),I.reset()),P.event.userId&&P.event.userId!==I.get_distinct_id()&&(Li.info("UserId set, identifying with PostHog"),I.identify(P.event.userId)
1);var R=I.calculateEventProperties(C,P.event.properties);return P.event.properties=Object.assign({},R,P.event.properties),P};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:P=>x(P,P.event.event),page:P=>x(P,fr),identify:P=>x(P,Fi),screen:P=>x(P,"$screen")}})(w)).then((()=>{S()}))}))})(this,(()=>this.pn())):this.pn(),et(this.config._onCapture)&&this.config._onCapture!==si&&(q.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(w=>this.config._onCapture(w.event,w)))),this.config.ip&&q.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return Yg.apply(this,arguments)})().then((w=>{w&&this.register({[Ci]:w})})).catch(si),this}fn(e){var t,n,i,s,a,o,u,c,d=performance.now(),l=A({},We.__defaultExtensionClasses,this.config.__extensionClasses),f=[];l.featureFlags&&this.Ki.push(this.featureFlags=(t=this.featureFlags)!==null&&t!==void 0?t:new l.featureFlags(this)),l.exceptions&&this.Ki.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new l.exceptions(this)),l.historyAutocapture&&this.Ki.push(this.historyAutocapture=new l.historyAutocapture(this)),l.tracingHeaders&&this.Ki.push(this.tracingHeaders=new l.tracingHeaders(this)),l.siteApps&&this.Ki.push(this.siteApps=new l.siteApps(this)),l.sessionRecording&&!e&&this.Ki.push(this.sessionRecording=new l.sessionRecording(this)),this.config.disable_scroll_properties||f.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),l.autocapture&&this.Ki.push(this.autocapture=new l.autocapture(this)),l.surveys&&this.Ki.push(this.surveys=(i=this.surveys)!==null&&i!==void 0?i:new l.surveys(this)),l.logs&&this.Ki.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new l.logs(this)),l.metrics&&this.Ki.push(this.metrics=(a=this.metrics)!==null&&a!==void 0?a:new l.metrics(this)),l.conversations&&this.Ki.push(this.conversations=(o=this.conversations)!==null&&o!==void 0?o:new l.conversations(this)),l.productTours&&this.Ki.push(this.productTours=new l.productTours(this)),l.heatmaps&&this.Ki.push(this.heatmaps=new l.heatmaps(this)),l.webVitalsAutocapture&&this.Ki.push(this.webVitalsAutocapture=new l.webVitalsAutocapture(this)),l.exceptionObserver&&this.Ki.push(this.exceptionObserver=new l.exceptionObserver(this)),l.deadClicksAutocapture&&this.Ki.push(this.deadClicksAutocapture=new l.deadClicksAutocapture(this,Py)),l.toolbar&&this.Ki.push(this.toolbar=(u=this.toolbar)!==null&&u!==void 0?u:new l.toolbar(this)),l.experiments&&this.Ki.push(this.experiments=(c=this.experiments)!==null&&c!==void 0?c:new l.experiments(this)),this.Ki.forEach((h=>{h.initialize&&f.push((()=>{h.initialize==null||h.initialize()}))})),f.push((()=>{if(this.gn){var h=this.gn;this.gn=void 0,this.Hr(h)}})),this.mn(f,d)}mn(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.mn(e,t)}),0);var n=e.shift();if(n)try{n()}catch(s){q.error("Error initializing extension:",s)}}var i=Math.round(performance.now()-t);this.register_for_session({[lg]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[cg]:i}),this.config.__preview_deferred_init_extensions&&q.info("PostHog extensions initialized ("+i+"ms)")}Hr(e){if(!D||!D.body)return q.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Hr(e)}),500);if(this.config.__preview_deferred_init_extensions&&(this.gn=e),this.yn=e,this.compression=void 0,e.ok){var t,n=e.config;n.supportedCompression&&!this.config.disable_compression&&(this.compression=G(n.supportedCompression,Fe.GZipJS)?Fe.GZipJS:G(n.supportedCompression,Fe.Base64)?Fe.Base64:void 0),(t=n.analytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=n.analytics.endpoint)}this.set_config({person_profiles:this.nn?this.nn:al}),this.Ki.forEach((i=>i.onRemoteConfig==null?void 0:i.onRemoteConfig(e)))}pn(){try{this.config.loaded(this)}catch(n){q.critical("`loaded` function failed",n)}if(this.bn(),this.config.internal_or_test_user_hostname&&ge!=null&&ge.hostname){var e=ge.hostname,t=this.config.internal_or_test_user_hostname;(typeof t=="string"?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Yi())&&this._n()}),1),this.wn=new jg(this),this.wn.load()}bn(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.dn)==null||e.enable())}_dom_loaded(){this.is_capturing()&&yn(this.__request_queue,(e=>this.cn(e))),this.__request_queue=[],this.bn()}_handle_unload(){var e,t,n,i,s;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),(t=this.metrics)==null||t.flush("sendBeacon"),this.config.request_batching?(this.xn()&&this.capture(Ai),(n=this.logs)==null||n.flushLogs("sendBeacon"),(i=this.dn)==null||i.unload(),(s=this.vn)==null||s.unload()):this.xn()&&this.capture(Ai,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?n_?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=A({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(F(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
1(t=>{var n,i,s,a=A({},t);a.timeout=a.timeout||6e4;var o=(n=a.transport)!==null&&n!==void 0?n:"fetch";o==="sendBeacon"&&F(a.compression)&&a.data&&(a.compression=Fe.Base64),a.timestampMode==="body"&&a.method==="POST"&&a.data&&!J(a.data)&&(a.data=A({},a.data,{sent_at:new Date().toISOString()})),a.url=Vc(a.url,a.method,a.compression,a.timestampMode);var u=Mn.filter((d=>!a.disableTransport||!d.transport||!a.disableTransport.includes(d.transport))),c=(i=(s=(function(d,l){for(var f=0;d.length>f;f++)if(d[f].transport===o)return d[f]})(u))==null?void 0:s.method)!==null&&i!==void 0?i:u[0].method;if(!c)throw new Error("No available transport method");o!=="sendBeacon"&&a.data&&a.compression===Fe.GZipJS&&lm&&typeof Promise<"u"&&!qn?zy(a).then((d=>{c(d)})).catch((d=>{if(gc(d))return qn=!0,void c(A({},a,{compression:void 0,url:Vc(t.url,t.method,void 0,t.timestampMode)}));(l=>{if(!l||typeof l!="object")return!1;var f="name"in l?String(l.name):"";return gc(l)||f===Ev})(d)&&(qn=!0),c(a)})):c(a)})(A({},e,{callback:t=>{var n,i;this.rateLimiter.checkForLimiting(t),400>t.statusCode||(n=(i=this.config).on_request_error)==null||n.call(i,t),e.callback==null||e.callback(t)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}
1cn(e){this.vn?this.vn.retriableRequest(e):this._send_request(e)}_execute_array(e){zi++;try{var t,n=[],i=[],s=[];yn(e,(o=>{if(o)if(J(t=o[0]))s.push(o);else if(et(o))try{o.call(this)}catch(u){q.error("Error executing queued PostHog call",o,u)}else J(o)&&t==="alias"?n.push(o):J(o)&&t.indexOf("capture")!==-1&&et(this[t])?s.push(o):i.push(o)}));var a=function(o,u){yn(o,(function(c){try{if(J(c[0])){var d=u;re(c,(function(l){d=d[l[0]].apply(d,l.slice(1))}))}else u[c[0]].apply(u,c.slice(1))}catch(l){q.error("Error executing queued PostHog call",c,l)}}))};a(n,this),a(i,this),a(s,this)}finally{zi--}}push(e){if(zi>0&&J(e)&&te(e[0])){var t=We.prototype[e[0]];et(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,n){var i,s,a,o,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.dn){if(this.is_capturing())if(!F(e)&&te(e)){var c=!this.config.opt_out_useragent_filter&&this._is_bot();if(!c||this.config.__preview_capture_bot_pageviews){var d=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(d==null||!d.isRateLimited){t!=null&&t.$current_url&&!te(t==null?void 0:t.$current_url)&&(q.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!=="$exception"||n!=null&&n.kn||q.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var l=new Date,f=(n==null?void 0:n.timestamp)||l,h=wc(n==null?void 0:n.uuid,xt),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},f,h)};e===fr&&this.config.__preview_capture_bot_pageviews&&c&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),d&&(p.properties.$lib_rate_limit_remaining_tokens=d.remainingTokens);var v=e==="$feature_flag_called"&&p.properties.$feature_flag_has_experiment===!1&&this.get_property(Kn)===!0;n!=null&&n.$set&&!v&&(p.$set=n==null?void 0:n.$set);var g=n==null?void 0:n.$unset;g&&(p.$unset=g);var _,m,b,w=v?void 0:this.Sn(n==null?void 0:n.$set_once,e!==Pc,e===Fi);if(w&&(p.$set_once=w),n!=null&&n._noTruncate||(s=this.config.properties_string_max_length,a=p,o=R=>te(R)?R.slice(0,s):R,u=new Set,p=(function R(M,L){if(M!==Object(M))return o?o(M):M;if(!u.has(M)){var y;if(u.add(M),J(M))y=[],yn(M,(k=>{y.push(R(k))}));else{var T={};re(M,((k,j)=>{u.has(k)||(T[j]=R(k))})),y=T}return y}})(a)),p.timestamp=f,F(n==null?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=l),v&&(p.properties=(function(R,M){M===void 0&&(M=[]);var L={},y=T=>{R[T]!==void 0&&(L[T]=R[T])};return cm.forEach(y),M.forEach(y),L})(p.properties,sb)),e===Ot.DISMISSED||e===Ot.SENT){var S=t==null?void 0:t[$i.SURVEY_ID],O=t==null?void 0:t[$i.SURVEY_ITERATION];t_({id:S,current_iteration:O}),p.$set=A({},p.$set,{[(_={id:S,current_iteration:O},m=e===Ot.SENT?"responded":"dismissed",b="$survey_"+m+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(b="$survey_"+m+"/"+_.id+"/"+_.current_iteration),b)]:!0})}else e===Ot.SHOWN&&(p.$set=A({},p.$set,{[$i.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===Ly.SHOWN){var I=t==null?void 0:t[$c.TOUR_TYPE];I&&(p.$set=A({},p.$set,{[$c.TOUR_LAST_SEEN_DATE+"/"+I]:new Date().toISOString()}))}var x=A({},p.properties.$set,p.$set);if(Ft(x)||this.setPersonPropertiesForFlags(x),!W(this.config.before_send)){var P=this.Rt(p);if(!P)return;(p=P).uuid=wc(p.uuid,xt)}this.tn.emit("eventCaptured",p);var C={method:"POST",url:(i=n==null?void 0:n._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",timestampMode:"query",batchKey:n==null?void 0:n._batchKey,transport:n==null?void 0:n.transport};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.cn(C):this.dn.enqueue(C),p}q.critical("This capture call is ignored due to client rate limiting.")}}else q.error("No event name provided to posthog.capture")}else q.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(t=>e(t.event,t)))}calculateEventProperties(e,t,n,i,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var a=s?void 0:this.persistence.remove_event_timer(e),o=A({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,this.Yi()&&(o[ug]=!0),e==="$snapshot"){var u=A({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=u.distinct_id,(!te(o.distinct_id)&&!Te(o.distinct_id)||Nu(o.distinct_id))&&q.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var c,d=(function(b,w,S,O){var I,x,P,C;if(O===void 0&&(O=!1),!Le)return{};var R,M=b?[...xr,...w||[]]:[],L=(function(vt){for(var Ge=0;yc.length>Ge;Ge++){var tr=yc[Ge],Ce=tr[1],at=tr[0].exec(vt),It=at&&(et(Ce)?Ce(at,vt):Ce);if(It)return It}return["",""]})(Le),y=L[0],T=L[1],k=(R=typeof navigator<"u"?navigator:void 0)!=null&&R.brave?{brave:!0}:{},j={};F(S)||(j.detectGoogleSearchApp=S);var U={},$=(I=navigator)==null||(I=I.userAgentData)==null?void 0:I.platform,ne=(x=navigator)==null?void 0:x.maxTouchPoints,H=E==null||(P=E.screen)==null?void 0:P.width,K=E==null||(C=E.screen)==null?void 0:C.height,z=E==null?void 0:E.devicePixelRatio;F($)||(U.userAgentDataPlatform=$),F(ne)||(U.maxTouchPoints=ne),F(H)||(U.screenWidth=H),F(K)||(U.screenHeight=K),F(z)||(U.devicePixelRatio=z);var X,Z,V,ye,se,_e,we,he,xe=ae(Fl({$os:y,$os_version:T,$browser:Wv(Le,navigator.vendor,k,j),$device:bc(Le),$device_type:(Z=Le,V=U,he=bc(
1Z),he===Iv||he===kv||he==="Kobo"||he==="Kindle Fire"||he===Uv?mr:he===Qr||he===_r||he===en||he===ju?"Console":he===Av?"Wearable":he?ze:(V==null?void 0:V.userAgentDataPlatform)==="Android"&&((ye=V==null?void 0:V.maxTouchPoints)!==null&&ye!==void 0?ye:0)>0?600>Math.min((se=V==null?void 0:V.screenWidth)!==null&&se!==void 0?se:0,(_e=V==null?void 0:V.screenHeight)!==null&&_e!==void 0?_e:0)/((we=V==null?void 0:V.devicePixelRatio)!==null&&we!==void 0?we:1)?ze:mr:"Desktop"),$timezone:Dg(),$timezone_offset:Fy()}),{$current_url:sn(O?Mt(ge==null?void 0:ge.href):ge==null?void 0:ge.href,M,an),$host:ge==null?void 0:ge.host,$pathname:ge==null?void 0:ge.pathname,$raw_user_agent:Le.length>1e3?Le.substring(0,997)+"...":Le,$browser_version:km(Le,navigator.vendor,k,j),$browser_language:jc(),$browser_language_prefix:(X=jc(),typeof X=="string"?X.split("-")[0]:void 0),$screen_height:E==null?void 0:E.screen.height,$screen_width:E==null?void 0:E.screen.width,$viewport_height:E==null?void 0:E.innerHeight,$viewport_width:E==null?void 0:E.innerWidth,$lib:ee.LIB_NAME,$lib_version:ee.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return ee.SDK_DIST_CHANNEL&&(xe.$sdk_dist_channel=ee.SDK_DIST_CHANNEL),xe})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var l=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime()),f=l.windowId;o.$session_id=l.sessionId,o.$window_id=f}this.sessionPropsManager&&ae(o,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&ae(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=(h=this.vn)==null?void 0:h.length}catch(b){o.$sdk_debug_error_capturing_properties=String(b)}if(this.requestRouter.region===gl&&(o.$lib_custom_api_host=this.config.api_host),c=e!==fr||s?e!==Ai||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,i),o=ae(o,c),e===fr&&D&&(o.title=D.title),!F(a)){var p=n.getTime()-a;o.$duration=parseFloat((p/1e3).toFixed(3))}Le&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser");var v=this.persistence.properties(),g=this.sessionPersistence.properties();re(["$referrer","$referring_domain"],(b=>{b in v&&delete g[b]})),(o=ae({},d,v,g,o)).$is_identified=this._isIdentified(),J(this.config.property_denylist)?re(this.config.property_denylist,(function(b){delete o[b]})):q.error(r_+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var _=this.config.sanitize_properties;_&&(q.error(Zc),o=_(o,e));var m=this.Cn();return o.$process_person_profile=m,m&&!s&&this.In("_calculate_event_properties"),o}Sn(e,t,n){var i;if(t===void 0&&(t=!0),n===void 0&&(n=!1),!this.persistence||!this.Cn()||this.Xi&&!n)return e;var s=this.persistence.get_initial_props(),a=(i=this.sessionPropsManager)==null?void 0:i.getSetOnceProps(),o=ae({},s,a||{},e||{}),u=this.config.sanitize_properties;return u&&(q.error(Zc),o=u(o,"$set_once")),t&&(this.Xi=!0),Ft(o)?void 0:o}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var i;(i=this.persistence)==null||i.register_once(e,t,n)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}Tn(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return(t=this.featureFlags)==null?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(e,t)}getAllFeatureFlags(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,t){var n,i;return(n=(i=this.featureFlags)==null?void 0:i.isFeatureEnabled(e,t))!==null&&n!==void 0?n:t==null?void 0:t.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}
1updateFlags(e,t,n){var i;(i=this.featureFlags)==null||i.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var i;(i=this.featureFlags)==null||i.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){var i;return t===void 0&&(t=!1),(i=this.featureFlags)==null?void 0:i.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.tn.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:qr}),()=>{})}onSessionId(e){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:qr})}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:qr})}renderSurvey(e,t){var n;(n=this.surveys)==null||n.renderSurvey(e,t)}displaySurvey(e,t){var n;t===void 0&&(t=tb),(n=this.surveys)==null||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,n;return(t=(n=this.surveys)==null?void 0:n.canRenderSurvey(e))!==null&&t!==void 0?t:{visible:!1,disabledReason:qr}}canRenderSurveyAsync(e,t){var n,i;return t===void 0&&(t=!1),(n=(i=this.surveys)==null?void 0:i.canRenderSurveyAsync(e,t))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:qr})}Mn(e){return!e||Nu(e)?(q.critical("Unique user id has not been set in posthog.identify"),!1):e===mn?(q.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(q.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return q.uninitializedWarning("posthog.identify");if(Te(e)&&(e=e.toString(),q.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Mn(e)&&this.In("posthog.identify")){var i=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Vn)||this.register_once({$had_persisted_distinct_id:!0,$device_id:i},""),e!==i&&e!==this.get_property(jr)&&(this.unregister(jr),this.register({distinct_id:e}));var s,a=(this.persistence.get_property(Qe)||ir)===ir;e!==i&&a?(this.persistence.set_property(Qe,sr),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(Fi,{distinct_id:e,$anon_distinct_id:i},{$set:t||{},$set_once:n||{}}),this.sn=Jc(e,t,n),(s=this.featureFlags)==null||s.setAnonymousDistinctId(i)):(t||n)&&this.setPersonProperties(t,n),e!==i&&(this.reloadFeatureFlags(),this.unregister(Jr))}}setPersonProperties(e,t){if((e||t)&&this.In("posthog.setPersonProperties")){var n=Jc(this.get_distinct_id(),e,t);this.sn!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.sn=n):q.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var t,n=(J(e)?e:[e]).filter((i=>te(i)&&i.length>0));n.length!==0&&this.In("posthog.unsetPersonProperties")&&((t=this.featureFlags)==null||t.unsetPersonPropertiesForFlags(n,!0),this.capture("$set",{$unset:n}),this.sn=null)}group(e,t,n){if(e&&t){var i=this.getGroups(),s=i[e]!==t;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:A({},i,{[e]:t})}),s||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture(Pc,a)}n&&this.setGroupPropertiesForFlags({[e]:n}),s&&!n&&this.reloadFeatureFlags()}else q.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;e===void 0&&(e=!0),(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),this.In("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){var t,n,i,s,a,o,u,c,d,l;if(q.info("reset"),!this.__loaded)return q.uninitializedWarning("posthog.reset");var f,h=this.get_property(Vn),p=this.get_property(Ci),v=this.get_property(Xt);if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(n=this.sessionPersistence)==null||n.clear(),F(v)||(f=this.persistence)==null||f.register({[Xt]:v}),(i=this.surveys)==null||i.reset(),(s=this.wn)==null||s.stop(),(a=this.featureFlags)==null||a.reset(),(o=this.conversations)==null||o.reset(),(u=this.logs)==null||u.reset(),(c=this.metrics)==null||c.reset(),(d=this.persistence)==null||d.set_property(Qe,ir),(l=this.sessionManager)==null||l.resetSessionId(),this.sn=null,this.config.cookieless_mode===St)this.register_once({distinct_id:mn,$device_id:null},"");else{var g=this.config.get_device_id(xt());this.register_once({distinct_id:g,$device_id:e?g:h},""),e||F(p)||this.register({[Ci]:p})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var t=this;return ve((function*(){var n,i,s,a,o;t.__loaded?((n=t.logs)==null||n.flushLogs("sendBeacon"),(i=t.metrics)==null||i.flush("sendBeacon"),(s=t.dn)==null||s.unload(),(a=t.vn)==null||a.unload(),(o=t.featureFlags)==null||o.destroy()):q.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(n=this.conversations)==null||n.En()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.Rn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)==null?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionStartTimestamp,i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t.sessionId);if(e!=null&&e.withTimestamp&&n){var s,a=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return i;
1i+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-a,0)}return i}alias(e,t){return e===this.get_property(rg)?(q.critical("Attempting to create alias for existing People user - aborting."),-2):this.In("posthog.alias")?(F(t)&&(t=this.get_distinct_id()),e!==t?(this.Tn(jr,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(q.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=A({},this.config);if(ue(e)){var n,i,s,a,o,u,c,d,l,f,h;ae(this.config,Qc(e));var p=this.hn();(n=this.persistence)==null||n.update_config(this.config,t,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Di(A({},this.config,{persistence:"sessionStorage"}),p,!1);var v=this.an(this.config.debug);rt(v)&&(this.config.debug=v),rt(this.config.debug)&&(this.config.debug?(ee.DEBUG=!0,ie.N()&&ie.q("ph_debug",!0),q.info("set_config",{config:e,oldConfig:t,newConfig:A({},this.config)})):(ee.DEBUG=!1,ie.N()&&ie.P("ph_debug"))),(i=this.exceptionObserver)==null||i.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(o=this.tracingHeaders)==null||o.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(c=this.heatmaps)==null||c.startIfEnabled(),(d=this.exceptionObserver)==null||d.startIfEnabledOrStop(),(l=this.deadClicksAutocapture)==null||l.startIfEnabledOrStop(),(f=this.surveys)==null||f.loadIfEnabled(),this.Pn(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){ee.LIB_NAME=e,ee.LIB_VERSION=t}startSessionRecording(e){var t,n,i,s,a,o=e===!0,u={sampling:o||!(e==null||!e.sampling),linked_flag:o||!(e==null||!e.linked_flag),url_trigger:o||!(e==null||!e.url_trigger),event_trigger:o||!(e==null||!e.event_trigger)};Object.values(u).some(Boolean)&&((t=this.sessionManager)==null||t.checkAndGetSessionAndWindowId(),u.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),u.linked_flag&&((i=this.sessionRecording)==null||i.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(A({},i,t))}}addExceptionStep(e,t){var n;(n=this.exceptions)==null||n.addExceptionStep(e,t)}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){var e,t;return(e=(t=this.logs)==null?void 0:t.logger)!==null&&e!==void 0?e:We.On}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,n;return(t=(n=this.toolbar)==null?void 0:n.loadToolbar(e))!==null&&t!==void 0&&t}get_property(e){var t;return(t=this.persistence)==null?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)==null?void 0:t.props[e]}toString(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:hr;return t!==hr&&(t=hr+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)==null?void 0:e.get_property(Qe))===sr||((t=this.sessionPersistence)==null?void 0:t.get_property(Qe))===sr}Cn(){var e,t;return!(this.config.person_profiles==="never"||this.config.person_profiles===al&&!this._isIdentified()&&Ft(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[jr])&&((t=this.persistence)==null||(t=t.props)==null||!t[Yn]))}xn(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Cn()||this.In("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.In("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}In(e){return this.config.person_profiles==="never"?(q.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Tn(Yn,!0),!0)}hn(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Wt)}Pn(){var e,t,n,i,s=this.hn();return((e=this.persistence)==null?void 0:e.yr)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((t=this.sessionPersistence)==null?void 0:t.yr)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==St){if(this.Yi()){var n,i,s,a,o;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(i=this.pageViewM
1anager)==null||i.destroy(),this.sessionManager=new Wc(this),this.pageViewManager=new Dc(this),this.persistence&&(this.sessionPropsManager=new Kc(this,this.sessionManager,this.persistence));var u,c=(s=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&s!==void 0?s:(o=We.__defaultExtensionClasses)==null?void 0:o.sessionRecording;c&&(this.sessionRecording=this.Ji(this.sessionRecording,new c(this)),this.yn&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.yn)))}var d,l;this.consent.optInOut(!0),this.Pn(),this.bn(),(t=this.sessionRecording)==null||t.startIfEnabledOrStop(),this.config.cookieless_mode==Wt&&((d=this.surveys)==null||d.loadIfEnabled()),(F(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((l=e==null?void 0:e.captureEventName)!==null&&l!==void 0?l:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._n()}else q.warn(Xc)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode!==St?(this.config.cookieless_mode===Wt&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Pn(),this.config.cookieless_mode===Wt&&(this.register({distinct_id:mn,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this._n(),this.bn())):q.warn(Xc)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===St||(this.config.cookieless_mode===Wt?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Pn()}_is_bot(){return qe?Jg(qe,this.config.custom_blocked_useragents):void 0}_n(){D&&(D.visibilityState==="visible"?this.en||(this.en=!0,this.capture(fr,{title:D.title},{send_instantly:!0}),this.rn&&(D.removeEventListener(Xn,this.rn),this.rn=null)):this.rn||(this.rn=this._n.bind(this),fe(D,Xn,this.rn)))}debug(e){e===!1?(E==null||E.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(E==null||E.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Ur(){var e=this.ln||{};return"advanced_disable_flags"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(q.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(function(t,n,i,s,a){var o=n in t&&!W(t[n]),u=i in t&&!W(t[i]);return o?t[n]:!!u&&(a&&a.warn("Config field '"+i+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[i])})(e,"advanced_disable_flags","advanced_disable_decide",0,q)}Rt(e){var t;if(W(this.config.before_send))return e;var n=Object.keys((t=e.properties)!==null&&t!==void 0?t:{}).filter(_m),i=J(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var a of i){if(s=a(s),W(s)){var o="Event '"+e.event+"' was rejected in beforeSend function";return gm(e.event)?q.warn(o+". This can cause unexpected behavior."):q.info(o),null}s.properties&&!Ft(s.properties)||q.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var u of n)if(s.properties&&W(s.properties[u]))return q.warn("Event '"+e.event+"' had its '"+u+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var e;return(e=this.pageViewManager.ir)==null?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}an(e){var t=rt(e)&&!e,n=ie.N()&&ie.A("ph_debug")==="true";return!t&&(!!n||e)}}We.__defaultExtensionClasses={},We.On=(()=>{var r=()=>{};return{trace:r,debug:r,info:r,warn:r,error:r,fatal:r}})(),(function(r,e){for(var t=0;e.length>t;t++)r.prototype[e[t]]=sy(r.prototype[e[t]])})(We,["identify"]);class ed{constructor(e){this.disabled=e===!1;var t=ue(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(t-i.y)<this.thresholdPx&&this.timeoutMs>n-i.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}var Vi="$copy_autocapture",Ki=ce("[AutoCapture]");function Wi(r,e){return e.length>r?e.slice(0,r)+"...":e}function ub(r){if(r.previousElementSibling)return r.previousElementSibling;var e=r;do e=e.previousSibling;while(e&&!Lt(e));return e}function lb(r,e){var t,n,i=e.e,s=e.maskAllElementAttributes,a=e.maskAllText,o=e.elementAttributeIgnoreList,u=e.elementsC
1hainAsString,c=e.disableCaptureUrlHashes;if(!Lt(r))return{props:{}};for(var d=[r],l=new Set([r]),f=r;f.parentNode&&!Ue(f,"body")&&yg>d.length;)if(mg(f.parentNode)){var h=f.parentNode.host;if(l.has(h))break;l.add(h),d.push(h),f=h}else{if(!Lt(f.parentNode)||l.has(f.parentNode))break;l.add(f.parentNode),d.push(f.parentNode),f=f.parentNode}var p,v,g=[],_={},m=!1,b=!1;if(re(d,(x=>{var P=ul(x);if(Ue(x,"a")){var C=x.getAttribute("href");m=!!(P&&C&&Yr(C))&&(c?Mt(C):C)}G(ei(x),"ph-no-capture")&&(b=!0),g.push((function(M,L,y,T,k){k===void 0&&(k=!1);var j=M.tagName.toLowerCase(),U={tag_name:j};Ml.indexOf(j)>-1&&!y&&(U.$el_text=j.toLowerCase()==="a"||j.toLowerCase()==="button"?Wi(1024,Mc(M)):Wi(1024,rn(M)));var $=ei(M);$.length>0&&(U.classes=$.filter((function(z){return z!==""}))),re(M.attributes,(function(z){var X;if((!Eg(M)||["name","id","class","aria-label"].indexOf(z.name)!==-1)&&(T==null||!T.includes(z.name))&&!L&&Yr(z.value)&&(!te(X=z.name)||X.substring(0,10)!=="_ngcontent"&&X.substring(0,7)!=="_nghost")){var Z=z.value;z.name==="class"&&(Z=ql(Z).join(" ")),U["attr__"+z.name]=Wi(1024,z.name==="href"&&k?Mt(Z):Z)}}));for(var ne=1,H=1,K=M;K=ub(K);)ne++,K.tagName===M.tagName&&H++;return U.nth_child=ne,U.nth_of_type=H,U})(x,s,a,o,c));var R=(function(M){if(!ul(M))return{};var L={};return re(M.attributes,(function(y){if(y.name&&y.name.indexOf("data-ph-capture-attribute")===0){var T=y.name.replace("data-ph-capture-attribute-",""),k=y.value;T&&k&&Yr(k)&&(L[T]=k)}})),L})(x);ae(_,R)})),b)return{props:{},explicitNoCapture:b};if(a||(g[0].$el_text=Ue(r,"a")||Ue(r,"button")?Mc(r):rn(r)),m){var w,S;g[0].attr__href=m;var O=(w=nn(m))==null?void 0:w.host,I=E==null||(S=E.location)==null?void 0:S.host;O&&I&&O!==I&&(p=m)}return{props:ae({$event_type:i.type,$ce_version:1},u?{}:{$elements:g},{$elements_chain:(v=g,(function(x){return x.map((P=>{var C,R,M="";if(P.tag_name&&(M+=P.tag_name),P.attr_class)for(var L of(P.attr_class.sort(),P.attr_class))M+="."+L.replace(/"/g,"");var y=A({},P.text?{text:P.text}:{},{"nth-child":(C=P.nth_child)!==null&&C!==void 0?C:0,"nth-of-type":(R=P.nth_of_type)!==null&&R!==void 0?R:0},P.href?{href:P.href}:{},P.attr_id?{attr_id:P.attr_id}:{},P.attributes),T={};return Fn(y).sort(((k,j)=>k[0].localeCompare(j[0]))).forEach((k=>{var j=k[1];return T[Lc(k[0].toString())]=Lc(j.toString())})),(M+=":")+Fn(T).map((k=>k[0]+'="'+k[1]+'"')).join("")})).join(";")})((function(x){return x.map((P=>{var C,R,M={text:(C=P.$el_text)==null?void 0:C.slice(0,400),tag_name:P.tag_name,href:(R=P.attr__href)==null?void 0:R.slice(0,2048),attr_class:Oy(P),attr_id:P.attr__id,nth_child:P.nth_child,nth_of_type:P.nth_of_type,attributes:{}};return Fn(P).filter((L=>L[0].indexOf("attr__")===0)).forEach((L=>M.attributes[L[0]]=L[1])),M}))})(v)))},(t=g[0])!=null&&t.$el_text?{$el_text:(n=g[0])==null?void 0:n.$el_text}:{},p&&i.type==="click"?{$external_click_url:p}:{},_)}}var Mr=ce("[ExceptionAutocapture]"),td=()=>{},cb=ce("[TracingHeaders]"),Ut=ce("[Web Vitals]"),rd=9e5,nd="disabled",id="lazy_loading",Lr="awaiting_config",En="missing_config";ce("[SessionRecording]"),ce("[SessionRecording]");var _l="[SessionRecording]",_t=ce(_l),db=ce("[Heatmaps]");function Ji(r){return ue(r)&&"clientX"in r&&"clientY"in r&&Te(r.clientX)&&Te(r.clientY)}var Yi=ce("[Product Tours]"),Xi=r=>{var e;return!r.config.disable_product_tours&&!((e=r.persistence)==null||!e.get_property(Il))},fb=["$set_once","$set"],ut=ce("[SiteApps]"),sd="Error while initializing PostHog app with config id ";function ur(r,e,t){if(W(r))return!1;switch(t){case"exact":return r===e;case"contains":var n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(r);case"regex":try{return new RegExp(e).test(r)}catch{return!1}default:return!1}}class hb{constructor(e){this.Fn=new $l,this.Ln=(t,n)=>this.$n(t,n)&&this.An(t,n)&&this.Nn(t,n)&&this.Dn(t,n),this.$n=(t,n)=>n==null||!n.event||(t==null?void 0:t.event)===(n==null?void 0:n.event),this._instance=e,this.qn=new Set,this.jn=new Set}init(){var e,t;F((e=this._instance)==null?void 0:e._addCaptureHook)||(t=this._instance)==null||t._addCaptureHook(((n,i)=>{this.on(n,i)}))}register(e){var t,n;if(!F((t=this._instance)==null?void 0:t._addCaptureHook)&&(e.forEach((a=>{var o,u;(o=this.jn)==null||o.add(a),(u=a.steps)==null||u.forEach((c=>{var d;(d=this.qn)==null||d.add((c==null?void 0:c.event)||"")}))})),(n=this._instance)!=null&&n.autocapture)){var i,s=new Set;e.forEach((a=>{var o;(o=a.steps)==null||o.forEach((u=>{u!=null&&u.selector&&s.add(u==null?void 0:u.selector)}))}
1)),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(e,t){var n;t!=null&&e.length!=0&&(this.qn.has(e)||this.qn.has(t.event))&&this.jn&&((n=this.jn)==null?void 0:n.size)>0&&this.jn.forEach((i=>{this.Hn(t,i)&&this.Fn.emit("actionCaptured",i.name)}))}Bn(e){this.onAction("actionCaptured",(t=>e(t)))}Hn(e,t){if((t==null?void 0:t.steps)==null)return!1;for(var n of t.steps)if(this.Ln(e,n))return!0;return!1}onAction(e,t){return this.Fn.on(e,t)}An(e,t){if(t!=null&&t.url){var n,i=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!i||typeof i!="string"||!ur(i,t.url,t.url_matching||"contains"))return!1}return!0}Nn(e,t){return!!this.Un(e,t)&&!!this.zn(e,t)&&!!this.Vn(e,t)}Un(e,t){var n;if(t==null||!t.href)return!0;var i=this.Wn(e);if(i.length>0)return i.some((o=>ur(o.href,t.href,t.href_matching||"exact")));var s,a=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||"";return!!a&&ur((s=a.match(/(?::|")href="(.*?)"/))?s[1]:"",t.href,t.href_matching||"exact")}zn(e,t){var n;if(t==null||!t.text)return!0;var i=this.Wn(e);if(i.length>0)return i.some((c=>ur(c.text,t.text,t.text_matching||"exact")||ur(c.$el_text,t.text,t.text_matching||"exact")));var s,a,o,u=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||"";return!!u&&(s=(function(c){for(var d,l=[],f=/(?::|")text="(.*?)"/g;!W(d=f.exec(c));)l.includes(d[1])||l.push(d[1]);return l})(u),a=t.text,o=t.text_matching||"exact",s.some((c=>ur(c,a,o))))}Vn(e,t){var n,i;if(t==null||!t.selector)return!0;var s=e==null||(n=e.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(t.selector))return!0;var a=(e==null||(i=e.properties)==null?void 0:i.$elements_chain)||"";if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch{return!1}return!1}Wn(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e==null?void 0:e.properties.$elements}Dn(e,t){return t==null||!t.properties||t.properties.length===0||Zg(t.properties.reduce(((n,i)=>{var s=J(i.value)?i.value.map(String):i.value!=null?[String(i.value)]:[];return n[i.key]={values:s,operator:i.operator||"exact"},n}),{}),e==null?void 0:e.properties)}}class pb{constructor(e){var t;this.Zn=[],this._instance=e,this.Gn=new Map,this.Qn=new Map,this.Jn=new Map,(t=this._instance)==null||t.onSessionId==null||t.onSessionId((n=>this.Kn(n)))}Yn(e,t){return!!e&&Zg(e.propertyFilters,t==null?void 0:t.properties)}Xn(e,t){var n=new Map;return e.forEach((i=>{var s;(s=i.conditions)==null||(s=s[t])==null||(s=s.values)==null||s.forEach((a=>{if(a!=null&&a.name){var o=n.get(a.name)||[];o.push(i.id),n.set(a.name,o)}}))})),n}ts(e,t,n){var i=(n===kr.Activation?this.Gn:this.Qn).get(e),s=[];return this.es((a=>{s=a.filter((o=>i==null?void 0:i.includes(o.id)))})),s.filter((a=>{var o,u=(o=a.conditions)==null||(o=o[n])==null||(o=o.values)==null?void 0:o.find((c=>c.name===e));return this.Yn(u,t)}))}register(e){var t;F((t=this._instance)==null?void 0:t._addCaptureHook)||(this.rs(e),this.ns(e))}ns(e){var t=e.filter((n=>{var i,s;return((i=n.conditions)==null?void 0:i.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));t.length!==0&&(this.ss==null&&(this.ss=new hb(this._instance),this.ss.init(),this.ss.Bn((n=>{this.onAction(n)}))),t.forEach((n=>{var i,s,a,o,u;n.conditions&&(i=n.conditions)!=null&&i.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((a=n.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((o=this.ss)==null||o.register(n.conditions.actions.values),(u=n.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((c=>{if(c&&c.name){var d=this.Jn.get(c.name);d&&d.push(n.id),this.Jn.set(c.name,d||[n.id])}})))})))}rs(e){var t,n=e.filter((s=>{var a,o;return((a=s.conditions)==null?void 0:a.events)&&((o=s.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})),i=e.filter((s=>{var a,o;return((a=s.conditions)==null?void 0:a.cancelEvents)&&((o=s.conditions)==null||(o=o.cancelEvents)==null||(o=o.values)==null?void 0:o.length)>0}));n.length===0&&i.length===0||((t=this._instance)==null||t._addCaptureHook(((s,a)=>{this.onEvent(s,a)})),this.Gn=this.Xn(e,kr.Activation),this.Qn=this.Xn(e,kr.Cancellation))}onEvent(e,t){var n,i,s=this.os(),a=(t==null||(n=t.properties)==null?void 0:n.$survey_id)||(t==null||(i=t.properties)==null?void 0:i.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var o=this.ls(e,a);if(o==="consume")return s.info("event consumed activated item, remov
1ing it",{event:e,itemId:a}),void this.us([a]);if(o==="persist")return s.info("shown item promoted to persisted activation",{event:e,itemId:a}),void this.hs(a)}if(this.Qn.has(e)){var u=this.ts(e,t,kr.Cancellation);u.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:u.map((d=>d.id))}),this.us(u.map((d=>d.id))),u.forEach((d=>this.ds(d.id))))}if(this.Gn.has(e)){s.info("event name matched",{event:e,eventPayload:t,items:this.Gn.get(e)});var c=this.ts(e,t,kr.Activation);this.cs(c.map((d=>d.id)))}}onAction(e){this.Jn.has(e)&&this.cs(this.Jn.get(e)||[])}cs(e){e.length!==0&&(this.Zn=[...new Set([...this.Zn,...e])],this.os().info("updating activated items",{activatedItems:this.getActivatedIds()}))}hs(e){this.Zn=this.Zn.filter((n=>n!==e));var t=this.vs();t.includes(e)||(this.fs([...t,e]),this.ps())}us(e){var t=new Set(e);this.Zn=this.Zn.filter((s=>!t.has(s)));var n=this.gs(),i=n.filter((s=>!t.has(s)));i.length!==n.length&&(this.fs(i),i.length===0&&this.ys())}gs(){var e,t=this.bs();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}vs(){var e,t,n=this.gs();if(n.length===0)return[];var i=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this._s()],s=(t=this._instance)==null||t.get_session_id==null?void 0:t.get_session_id();return s&&i===s?n:[]}ps(){var e,t=(e=this._instance)==null||e.get_session_id==null?void 0:e.get_session_id();t&&this.ws(t)}ys(){this.xs()}Kn(e){var t,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[this._s()];n&&n!==e&&(this.gs().length>0&&this.fs([]),this.ys())}getActivatedIds(){return[...new Set([...this.vs(),...this.Zn])].filter((e=>!this.ks(e)))}reset(){this.Zn=[],this.gs().length>0&&this.fs([]),this.ys()}getEventToItemsMap(){return this.Gn}Ss(){return this.ss}}class vb extends pb{constructor(e){super(e)}bs(){return Qu}_s(){return An}Cs(){return Ot.SHOWN}es(e){var t;(t=this._instance)==null||t.getSurveys(e)}ds(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}os(){return Q}fs(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[Qu]:e})}ws(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[An]:e})}xs(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(An)}ks(){return!1}ls(e,t){var n;this.es((s=>{n=s.find((a=>a.id===t))}));var i=!n||(function(s){var a;return Qg(s)&&!((a=s.conditions)==null||(a=a.events)==null||!a.repeatedActivation)||s.schedule==="always"})(n);return i?e===Ot.SHOWN?"consume":"ignore":e===Ot.SHOWN?"persist":e===Ot.DISMISSED||e===Ot.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Zi="SDK is not enabled or survey functionality is not yet loaded",ad="Disabled. Not loading surveys.",gb=E!=null&&E.location?ti(E.location.hash,"__posthog")||ti(location.hash,"state"):null,od="_postHogToolbarParams",ud=ce("[Toolbar]"),me=ce("[FeatureFlags]"),zt=ce("[FeatureFlags]",{debugEnabled:!0}),Qi=`" failed. Feature flags didn't load in time.`,ld=r=>{for(var e={},t=0;r.length>t;t++)e[r[t]]=!0;return e},cd=r=>{var e={};for(var t of Fn(r||{})){var n=t[1];n&&(e[t[0]]=n)}return e},mt=ce("[Error tracking]"),dd="Refusing to render web experiment since the viewer is a likely bot",_b={icontains:(r,e)=>e.toLowerCase().indexOf(r.toLowerCase())>-1,not_icontains:(r,e)=>e.toLowerCase().indexOf(r.toLowerCase())===-1,regex:(r,e)=>ii(e,r),not_regex:(r,e)=>!ii(e,r),exact:(r,e)=>e===r,is_not:(r,e)=>e!==r};class ke{get Te(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),t.getWebExperiments((i=>{ke.Is("retrieved web experiments from the server"),t.Ts=new Map,i.forEach((s=>{if(s.feature_flag_key){var a;t.Ts&&(ke.Is("setting flag key ",s.feature_flag_key," to web experiment ",s),(a=t.Ts)==null||a.set(s.feature_flag_key,s));var o=t._instance.getFeatureFlag(s.feature_flag_key);te(o)&&s.variants[o]&&t.Ms(s.name,o,s.variants[o].transforms)}else if(s.variants)for(var u in s.variants){var c=s.variants[u];ke.Es(c,t._instance)&&t.Ms(s.name,u,c.transforms)}}))}),n)},this._instance=e,this._instance.onFeatureFlags((n=>{this.onFeatureFlags(n)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())ke.Is(dd);else if(!this.Te.disable_web_experiments){if(W(this.Ts))return this.Ts=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ke.Is("applying feature flags",e),e.forEach((t=>{var n;if(this.Ts&&(n=this.Ts)!=null&&n.has(t)){var i,s=this._instance.getFeatureFlag(t),a=(i=this.Ts)==null?void 0:i.get(t);s&&a!=null&&a.variants[s]&&this.Ms(a.name,s,a.variants[s].transforms)}}))}}previewWebExperiment(){var e=ke.getWindowLocation();if(e!=null&&e.search){var t=wr(e==null?void 0:e.search,"__experiment_id"),n=wr(e==null?void 0:e.search,"__experiment_variant");t&&n&&(ke.Is("previewing web experiments "+t+" && "+n),this.getWebExperiments((i=>{this.Rs(parseInt(t),n,i)}),!1,!0))}}loadIfEnabled(){this.Te.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}
1getWebExperiments(e,t,n){if(this.Te.disable_web_experiments&&!n)return e([]);var i=this._instance.get_property("$web_experiments");if(i&&!t)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Te.token),method:"GET",timestampMode:"query",callback:s=>e(s.statusCode===200&&s.json&&s.json.experiments||[])})}Rs(e,t,n){var i=n.filter((s=>s.id===e));i&&i.length>0&&(ke.Is("Previewing web experiment ["+i[0].name+"] with variant ["+t+"]"),this.Ms(i[0].name,t,i[0].variants[t].transforms))}static Es(e,t){return!W(e.conditions)&&ke.Ps(e,t)&&ke.Os(e)}static Ps(e,t){var n;if(W(e.conditions)||W((n=e.conditions)==null?void 0:n.url))return!0;var i=ke.getWindowLocation();if(i){var s,a,o,u=vg(t,i.href);return(s=e.conditions)==null||!s.url||_b[(a=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&a!==void 0?a:"icontains"](e.conditions.url,u)}return!1}static getWindowLocation(){return E==null?void 0:E.location}static Os(e){var t;if(W(e.conditions)||W((t=e.conditions)==null?void 0:t.utm))return!0;var n=Ag();if(n.utm_source){var i,s,a,o,u,c,d,l,f=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,h=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_source||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_source)==n.utm_source,p=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_medium||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==n.utm_medium,v=(d=e.conditions)==null||(d=d.utm)==null||!d.utm_term||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_term)==n.utm_term;return f&&p&&v&&h}return!1}static Is(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];q.info("[WebExperiments] "+e,n)}Ms(e,t,n){this._is_bot()?ke.Is(dd):t!=="control"?n.forEach((i=>{if(i.selector){var s;ke.Is("applying transform of variant "+t+" for experiment "+e+" ",i);var a=(s=document)==null?void 0:s.querySelectorAll(i.selector);a==null||a.forEach((o=>{var u=o;i.html&&(u.innerHTML=i.html),i.css&&u.setAttribute("style",i.css)}))}})):ke.Is("Control variants leave the page unmodified.")}_is_bot(){return qe&&this._instance?Jg(qe,this.Te.custom_blocked_useragents):void 0}}var Ke=ce("[Conversations]"),Gt="Conversations not available yet.",fd="console",hi={featureFlags:class{constructor(r){this.Fs=!1,this.Ls=!1,this.$s=!1,this.As=!1,this.Ns=!1,this.Ds=!1,this.qs=!1,this.js=!1,this.Hs=0,this.Bs=()=>{var e=this.Us();this.Hs=0,e&&this.reloadFeatureFlags()},this._instance=r,this.featureFlagEventHandlers=[],E&&fe(E,"online",this.Bs)}destroy(){E==null||E.removeEventListener("online",this.Bs)}get Te(){return this._instance.config}get mi(){return this._instance.persistence}zs(r){return this._instance.get_property(r)}Vs(){var r,e;return(r=(e=this.mi)==null?void 0:e._r(this.Te.feature_flag_cache_ttl_ms))!==null&&r!==void 0&&r}Ws(){return!!this.Vs()&&(this.js||this.$s||(this.js=!0,me.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Zs(){var r,e=(r=this.Te.evaluation_contexts)!==null&&r!==void 0?r:this.Te.evaluation_environments;return!this.Te.evaluation_environments||this.Te.evaluation_contexts||this.qs||(me.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.qs=!0),e!=null&&e.length?e.filter((t=>{var n=t&&typeof t=="string"&&t.trim().length>0;return n||me.error("Invalid evaluation context found:",t,"Expected non-empty string"),n})):[]}Gs(){return this.Zs().length>0}Qs(){var r=this.Te.flag_keys;if(!F(r)){if(J(r))return r.filter((e=>{var t=e&&typeof e=="string"&&e.trim().length>0;return t||me.error("Invalid flag key found:",e,"Expected non-empty string"),t}));me.error("Invalid flag_keys found:",r,"Expected array of non-empty strings")}}initialize(){var r,e,t=this._instance.config,n=(r=(e=t.bootstrap)==null?void 0:e.featureFlags)!==null&&r!==void 0?r:{};if(Object.keys(n).length){var i,s,a=(i=(s=t.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&i!==void 0?i:{},o=Object.keys(n).filter((c=>!!n[c])).reduce(((c,d)=>(c[d]=n[d]||!1,c)),{}),u=Object.keys(a).filter((c=>o[c])).reduce(((c,d)=>(a[d]&&(c[d]=a[d]),c)),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:u})}}updateFlags(r,e,t){var n,i,s=t!=null&&t.merge&&(n=this.zs(Jt))!==null&&n!==void 0?n:{},a=t!=null&&t.merge&&(i=this.zs(Cn))!==null&&i!==void 0?i:{},o=A({},s,r),u=A({},a,e),c={};for(var d of Object.entries(o)){var l=d[0],f=d[1];c[l]={key:l,enabled:fc(f),variant:hc(f),reason:void 0,metadata:F(u==null?void 0:u[l])?void 0:{id:0,version:void 0,description:void 0,payload:u[l]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Ls}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var r=this.zs(Yu),e=this.zs(bt),t=this.zs(dr);if(!t&&!e)return r||{};var n=ae({},r||{}),i=[...new Set([...Object.keys(t||{}),...Object.keys(e||{})])];for(var s of i){var a,o,u=n[s],c=e==null?void 0:e[s],d=F(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,l=F(c)?u.variant:typeof c=="string"?c:void 0,f=t==null?void 0:t[s],h=A({},u,{enabled:d,variant:d?l??(u==null?void 0:u.variant):void 0});d!==(u==null?void 0:u.enabled)&&(h.original_enabled=u==null?void 0:u.enabled),l!==(u==null?void 0:u.variant)&&(h.original_variant=u==null?void 0:u.variant),f&&(h.metadata=A({},u==null?void 0:u.metadata,{payload:f,original_payload:u==null||(o=u.metadata)==null?void 0:o.payload})),n[s]=h}return this.Fs||(me.warn(" Overriding feature flag details!",{flagDetails:r,overriddenPayloads:t,finalDetails:n}),this.Fs=!0),n}getAllFeatureFlags(){var r=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(r).map((t=>{var n=r[t];return{key:t,enabled:fc(n),variant:hc(n),payload:dc(e[t])}}))}getFlagVariants(){var r=this.zs(Jt),e=this.zs(bt);
1if(!e)return r||{};for(var t=ae({},r),n=Object.keys(e),i=0;n.length>i;i++)t[n[i]]=e[n[i]];return this.Fs||(me.warn(" Overriding feature flags!",{enabledFlags:r,overriddenFlags:e,finalFlags:t}),this.Fs=!0),t}getFlagPayloads(){var r=this.zs(Cn),e=this.zs(dr);if(!e)return r||{};for(var t=ae({},r||{}),n=Object.keys(e),i=0;n.length>i;i++)t[n[i]]=e[n[i]];return this.Fs||(me.warn(" Overriding feature flag payloads!",{flagPayloads:r,overriddenPayloads:e,finalPayloads:t}),this.Fs=!0),t}reloadFeatureFlags(){this.As||this.Te.advanced_disable_feature_flags||this.Us()||this.Js||(this._instance.tn.emit("featureFlagsReloading",!0),this.Js=setTimeout((()=>{this.Ks()}),5))}Ys(){clearTimeout(this.Js),this.Js=void 0}ensureFlagsLoaded(){this.Ls||this.$s||this.Js||this.reloadFeatureFlags()}setAnonymousDistinctId(r){this.$anon_distinct_id=r}setReloadingPaused(r){this.As=r}Ks(r){var e;if(this.Ys(),!this._instance.Ur()&&!this.Us())if(this.$s)this.Ns=!0;else{var t=this.Te.token,n=this.zs(Vn),i={token:t,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:A({},((e=this.mi)==null?void 0:e.get_initial_props())||{},this.zs(Vt)||{}),group_properties:this.zs(Kt),timezone:Dg()};Me(n)||F(n)||(i.$device_id=n),(r!=null&&r.disableFlags||this.Te.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.Gs()&&(i.evaluation_contexts=this.Zs());var s=this.Qs();F(s)||(i.flag_keys=s);var a=!!this.Te.advanced_only_evaluate_survey_feature_flags,o=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Te.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.$s=!0,this._instance._send_request({method:"POST",url:o,data:i,compression:this.Te.disable_compression?void 0:Fe.Base64,timestampMode:"body",timeout:this.Te.feature_flag_request_timeout_ms,callback:u=>{var c,d,l,f=!0;if(this.Xs(u.statusCode),u.statusCode===200&&(this.Ns||(this.$anon_distinct_id=void 0),f=!1),this.$s=!1,!i.disable_flags||this.Ns){this.Ds=!f;var h=[];u.error?u.error instanceof Error?h.push(u.error.name==="AbortError"?"timeout":"connection_error"):h.push("unknown_error"):u.statusCode!==200&&h.push("api_error_"+u.statusCode),(c=u.json)!=null&&c.errorsWhileComputingFlags&&h.push("errors_while_computing_flags");var p,v=!((d=u.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));v&&h.push("quota_limited"),(l=this.mi)==null||l.register({[tl]:h}),v?me.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags((p=u.json)!==null&&p!==void 0?p:{},f,{partialResponse:a}),this.Ns&&(this.Ns=!1,this.Ks()))}}})}}Us(){return Ig(this.Hs,3)}Xs(r){this.Hs=Cg(r,this.Hs,3,(()=>me.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.")))}getFeatureFlag(r,e){var t;if(e===void 0&&(e={}),!e.fresh||this.Ds)if(this.Ls||this.getFlags()&&this.getFlags().length>0){if(!this.Ws()){var n=this.getFeatureFlagResult(r,e);return(t=n==null?void 0:n.variant)!==null&&t!==void 0?t:n==null?void 0:n.enabled}}else me.warn('getFeatureFlag for key "'+r+Qi)}getFeatureFlagDetails(r){return this.getFlagsWithDetails()[r]}getFeatureFlagPayload(r){var e=this.getFeatureFlagResult(r,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(r,e){if(e===void 0&&(e={}),!e.fresh||this.Ds)if(this.Ls||this.getFlags()&&this.getFlags().length>0){if(!this.Ws()){var t=this.getFlagVariants(),n=r in t,i=t[r],s=this.getFlagPayloads()[r],a=String(i),o=this.zs(Xu)||void 0,u=this.zs(tn)||void 0,c=this.zs(Jr)||{};if(this.Te.advanced_feature_flags_dedup_per_session){var d,l=this._instance.get_session_id(),f=this.zs(el);l&&l!==f&&(c={},(d=this.mi)==null||d.register({[Jr]:c,[el]:l}))}if((e.send_event||!("send_event"in e))&&(!(r in c)||!c[r].includes(a))){var h,p,v,g,_,m,b,w,S,O,I;J(c[r])?c[r].push(a):c[r]=[a],(h=this.mi)==null||h.register({[Jr]:c});var x=this.getFeatureFlagDetails(r),P=[...(p=this.zs(tl))!==null&&p!==void 0?p:[]];F(i)&&P.push("flag_missing");var C={$feature_flag:r,$feature_flag_response:i,$feature_flag_payload:s||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((v=this.Te.bootstrap)==null||(v=v.featureFlags)==null?void 0:v[r])||null,$feature_flag_bootstrapped_payload:((g=this.Te.bootstrap)==null||(g=g.featureFlagPayloads)==null?void 0:g[r])||null,$used_bootstrap_value:!this.Ds};F(x==null||(_=x.metadata)==null?void 0:_.has_experiment)||(C.$feature_flag_has_experiment=x.metadata.has_experiment),F(x==null||(m=x.metadata)==null?void 0:m.version)||(C.$feature_flag_version=x.metadata.version);var R,M=(b=x==null||(w=x.reason)==null?void 0:w.description)!==null&&b!==void 0?b:x==null||(S=x.reason)==null?void 0:S.code;M&&(C.$feature_flag_reason=M),x!=null&&(O=x.metadata)!=null&&O.id&&(C.$feature_flag_id=x.metadata.id),F(x==null?void 0:x.original_variant)&&F(x==null?void 0:x.original_enabled)||(C.$feature_flag_original_response=F(x.original_variant)?x.original_enabled:x.original_variant),x!=null&&(I=x.metadata)!=null&&I.original_payload&&(C.$feature_flag_original_payload=x==null||(R=x.metadata)==null?void 0:R.original_payload),P.length&&(C.$feature_flag_error=P.join(",")),this._instance.capture("$feature_flag_called",C)}if(n)return{key:r,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:dc(s)}}}else me.warn('getFeatureFlagResult for key "'+r+Qi)}getRemoteConfigPayload(r,e){var t=this.Te.token,n={distinct_id:this._instance.get_distinct_id(),token:t};this.Gs()&&(n.evaluation_contexts=this.Zs());var i=this.Qs();F(i)||(n.flag_keys=i),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.Te.disable_compression?void 0:Fe.Base64,timestampMode:"body",timeout:this.Te.feature_flag_request_timeout_ms,callback(s){var a,o=(a=s.json)==null?void 0:a.featureFlagPayloads;e((o==null?void 0:o[r])||void 0)}})}isFeatureEnabled(r,e){if(e===void 0&&(e={}),e.fresh&&!this.Ds)return e.defaultValue;if(!(this.Ls||this.getFlags()&&this.getFlags().length>0))return me.warn('isFeatureEnabled for key "'+r+Qi),e.defaultValue;var t=this.getFeatureFlag(r,e);return F(t)?e.defaultValue:!!t}addFeatureFlagsHandler(r){this.featureFlagEventHandlers.push(r)}removeFeatureFlagsHandler(r){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==r))}receivedFeatureFlags(r,e,t){if(this.mi){this.Ls=!0;var n=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(a,o,u,c,d,l){u===void 0&&(u={}),c===void 0&&(c={}),d===void 0&&(d={});var f=(x=>{var P=x.flags;return P?(x.featureFlags=Object.fromEntries(Object.keys(P).map((C=>{var R;return[C,(R=P[C].variant)!==null&&R!==void 0?R:P[C].enabled]}))),x.featureFlagPayloads=Object.fromEntries(Object.keys(P).filter((C=>P[C].enabled)).filter((C=>{var R;return(R=P[C].metadata)==null?void 0:R.payload})).map((C=>{var R;return[C,(R=P[C].metadata)==null?void 0:R.payload]})))):x.featureFlags&&me.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),x})(a),h=f.flags,p=f.featureFlags,v=f.featureFlagPayloads;if(p){var g=a.requestId,_=a.evaluatedAt;if(J(p)){me.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var m={};if(p)for(var b=0;p.length>b;b++)m[p[b]]=!0;o&&o.register({[In]:p,[Jt]:m,[Kn]:!1})}else{var w=p,S=v,O=h;if(l!=null&&l.partialResponse)w=A({},u,w),S=A({},c,S),O=A({},d,O);else if(a.errorsWhileComputingFlags)if(h){var I=new Set(Object.keys(h).filter((x=>{var P;return!((P=h[x])!=null&&P.failed)})));w=A({},u,Object.fromEntries(Object.entries(w).filter((x=>I.has(x[0]))))),S=A({},c,Object.fromEntries(Object.entries(S||{}).filter((x=>I.has(x[0]))))),O=A({},d,Object.fromEntries(Object.entries(O||{}).filter((x=>I.has(x[0])))))}else w=A({},u,w),S=A({},c,S),O=A({},d,O);o&&o.register(A({[In]:Object.keys(cd(w)),[Jt]:w||{},[Cn]:S||{},[Yu]:O||{},[Kn]:a.minimalFlagCalledEvents===!0},g?{[Xu]:g}:{},_?{[tn]:_}:{}))}}})(r,this.mi,n,i,s,t),e||(this.js=!1),this.eo(e)}}override(r,e){e===void 0&&(e=!1),me.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:r,suppressWarning:e})}overrideFeatureFlags(r){if(!this._instance.__loaded||!this.mi)return me.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(r===!1)return this.mi.unregister(bt),this.mi.unregister(dr),this.eo(),zt.info("All overrides cleared");if(J(r)){var e=ld(r);return this.mi.register({[bt]:e}),this.eo(),zt.info("Flag overrides set",{flags:r})}if(r&&typeof r=="object"&&("flags"in r||"payloads"in r)){var t,n=r;if(this.Fs=!!((t=n.suppressWarning)!==null&&t!==void 0&&t),"flags"in n){if(n.flags===!1)this.mi.unregister(bt),zt.info("Flag overrides cleared");else if(n.flags){if(J(n.flags)){var i=ld(n.flags);this.mi.register({[bt]:i})}else this.mi.register({[bt]:n.flags});zt.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this.mi.unregister(dr),zt.info("Payload overrides cleared")):n.payloads&&(this.mi.register({[dr]:n.payloads}),zt.info("Payload overrides set",{payloads:n.payloads}))),void this.eo()}if(r&&typeof r=="object")return this.mi.register({[bt]:r}),this.eo(),zt.info("Flag overrides set",{flags:r});me.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:r})}onFeatureFlags(r){if(this.addFeatureFlagsHandler(r),this.Ls){var e=this.ro(),t=e.flags,n=e.flagVariants;try{r(t,n)}catch(i){me.error("Error while running feature flags callback",i)}}return()=>this.removeFeatureFlagsHandler(r)}updateEarlyAccessFeatureEnrollment(r,e,t){var n,i=(this.zs(Br)||[]).find((u=>u.flagKey===r)),s={["$feature_enrollment/"+r]:e},a={$feature_flag:r,$feature_enrollment:e,$set:s};i&&(a.$early_access_feature_name=i.name),t&&(a.$feature_enrollment_stage=t),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(s,!1);var o=A({},this.getFlagVariants(),{[r]:e});(n=this.mi)==null||n.register({[In]:Object.keys(cd(o)),[Jt]:o}),this.eo()}getEarlyAccessFeatures(r,e,t){e===void 0&&(e=!1);var n=this.zs(Br),i=t?"&"+t.map((s=>"stage="+s)).join("&"):"";if(n&&!e)return r(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Te.token+i),method:"GET",timestampMode:"query",callback:s=>{var a,o;if(s.json){var u=s.json.earlyAccessFeatures;return(a=this.mi)==null||a.unregister(Br),(o=this.mi)==null||o.register({[Br]:u}),r(u)}}})}ro(){var r=this.getFlags(),e=this.getFlagVariants();return{flags:r.filter((t=>e[t])),flagVariants:Object.keys(e).filter((t=>e[t])).reduce(((t,n)=>(t[n]=e[n],t)),{})}}eo(r){var e=this.ro(),t=e.flags,n=e.flagVariants;
1this.featureFlagEventHandlers.forEach((i=>{try{i(t,n,{errorsLoading:r})}catch(s){me.error("Error while running feature flags callback",s)}}))}setPersonPropertiesForFlags(r,e){e===void 0&&(e=!0);var t=this.zs(Vt)||{},n=(r==null?void 0:r.$set)||(r!=null&&r.$set_once?{}:r),i=r==null?void 0:r.$set_once,s={};if(i)for(var a in i)({}).hasOwnProperty.call(i,a)&&(a in t||(s[a]=i[a]));this._instance.register({[Vt]:A({},t,s,n)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(r,e){e===void 0&&(e=!0);var t=A({},this.zs(Vt)||{});r.forEach((n=>{delete t[n]})),this._instance.register({[Vt]:t}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(r){r===void 0&&(r=!0),this._instance.unregister(Vt),r&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(r,e){e===void 0&&(e=!0);var t=this.zs(Kt)||{};Object.keys(t).length!==0&&Object.keys(t).forEach((n=>{t[n]=A({},t[n],r[n]),delete r[n]})),this._instance.register({[Kt]:A({},t,r)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(r){if(r){var e=this.zs(Kt)||{};this._instance.register({[Kt]:A({},e,{[r]:{}})})}else this._instance.unregister(Kt)}reset(){this.Ls=!1,this.$s=!1,this.As=!1,this.Ns=!1,this.Ds=!1,this.$anon_distinct_id=void 0,this.Ys(),this.Fs=!1,this.Hs=0}}},mb={sessionRecording:class{get Te(){return this._instance.config}get mi(){return this._instance.persistence}get started(){var r;return!((r=this.io)==null||!r.isStarted)}get status(){var r,e;return this.no===Lr||this.no===En?this.no:(r=(e=this.io)==null?void 0:e.status)!==null&&r!==void 0?r:this.no}constructor(r){if(this._forceAllowLocalhostNetworkCapture=!1,this.no=nd,this.so=void 0,this._instance=r,!this._instance.sessionManager)throw _t.error("started without valid sessionManager"),new Error(_l+" started without valid sessionManager. This is a bug.");if(this.Te.cookieless_mode===St)throw new Error(_l+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get oo(){var r,e=!((r=this._instance.get_property(Xt))==null||!r.enabled),t=!this.Te.disable_session_recording,n=this.Te.disable_session_recording||this._instance.consent.isOptedOut();return E&&e&&t&&!n}startIfEnabledOrStop(r){var e;if(!this.oo||(e=this.io)==null||!e.isStarted){var t=!F(Object.assign)&&!F(Array.from);this.oo&&t?(this.ao(r),_t.info("starting")):(this.no=nd,this.stopRecording())}}ao(r){var e,t,n;this.oo&&(this.no!==Lr&&this.no!==En&&(this.no=id),B!=null&&(e=B.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(t=B.__PosthogExtensions__)!=null&&t.initSessionRecording?this.lo(r):(n=B.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.uo,(i=>{if(i)return _t.error("could not load recorder",i);this.lo(r)})))}stopRecording(){var r,e;(r=this.so)==null||r.call(this),this.so=void 0,(e=this.io)==null||e.stop()}ho(){var r,e;(r=this.so)==null||r.call(this),this.so=void 0,(e=this.io)==null||e.discard()}do(){var r,e;(r=this.mi)==null||r.unregister(Cl),(e=this.mi)==null||e.unregister(ng)}co(r,e){if(W(r))return null;var t,n=Te(r)?r:parseFloat(r);return typeof(t=n)!="number"||!Number.isFinite(t)||0>t||t>1?(_t.warn(e+" must be between 0 and 1. Ignoring invalid value:",r),null):n}vo(r){if(this.mi){var e,t,n=this.mi,i=()=>{var s,a=r.sessionRecording===!1?void 0:r.sessionRecording,o=this.co((s=this.Te.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.co(a==null?void 0:a.sampleRate,"remote config sampleRate"),c=o??u;W(c)&&this.do();var d=a==null?void 0:a.minimumDurationMilliseconds;n.register({[Xt]:A({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:A({capturePerformance:r.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:c,minimumDurationMilliseconds:F(d)?null:d,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};i(),(e=this.so)==null||e.call(this),this.so=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(i)}}onRemoteConfig(r){var e=r.ok?r.config:void 0;return e&&"sessionRecording"in e?e.sessionRecording===!1?(this.vo(e),void this.ho()):(this.vo(e),void this.startIfEnabledOrStop()):(this.no===Lr&&(this.no=En,_t.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(r,e){var t;e===void 0&&(e="log"),(t=this.io)!=null&&t.log?this.io.log(r,e):_t.warn("log called before recorder was ready")}get uo(){var r,e,t=(r=this._instance)==null||(r=r.persistence)==null?void 0:r.get_property(Xt);return(t==null||(e=t.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}fo(){var r,e,t=this._instance.get_property(Xt);if(!t)return!1;try{e=typeof t=="object"?t:JSON.parse(t)}catch(i){return _t.warn("persisted remote config for session recording is invali
1d and will be ignored",i),!1}var n=(r=e.cache_timestamp)!==null&&r!==void 0?r:Date.now();return 36e5>=Date.now()-n}lo(r){var e,t;if((e=B.__PosthogExtensions__)==null||!e.initSessionRecording)return _t.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[dg]:!0});if(this.io||(this.io=(t=B.__PosthogExtensions__)==null?void 0:t.initSessionRecording(this._instance),this.io._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.fo())return this.no===En||this.no===Lr?void 0:(this.no=Lr,_t.info("persisted remote config is stale, requesting fresh config before starting"),void new jg(this._instance).load());this.no=id,this.io.start(r)}onRRwebEmit(r){var e;(e=this.io)==null||e.onRRwebEmit==null||e.onRRwebEmit(r)}overrideLinkedFlag(){var r,e;this.io||(e=this.mi)==null||e.register({[sg]:!0}),(r=this.io)==null||r.overrideLinkedFlag()}overrideSampling(){var r,e;this.io||(e=this.mi)==null||e.register({[ig]:!0}),(r=this.io)==null||r.overrideSampling()}overrideTrigger(r){var e,t;this.io||(t=this.mi)==null||t.register({[r==="url"?ag:og]:!0}),(e=this.io)==null||e.overrideTrigger(r)}get sdkDebugProperties(){var r;return((r=this.io)==null?void 0:r.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(r,e){var t;return!((t=this.io)==null||!t.tryAddCustomEvent(r,e))}}},yb={autocapture:class{constructor(r){this.po=!1,this.mo=null,this.yo=!1,this.bo=!1,this.instance=r,this.rageclicks=new ed(r.config.rageclick),this._o=null}initialize(){this.startIfEnabled()}get Te(){var r,e,t=ue(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=(r=t.url_allowlist)==null?void 0:r.map((n=>new RegExp(n))),t.url_ignorelist=(e=t.url_ignorelist)==null?void 0:e.map((n=>new RegExp(n))),t}wo(){if(this.isBrowserSupported()){if(E&&D){var r=t=>{t=t||(E==null?void 0:E.event);try{this.xo(t)}catch(n){Ki.error("Failed to capture event",n)}};if(fe(D,"submit",r,{capture:!0}),fe(D,"change",r,{capture:!0}),fe(D,"click",r,{capture:!0}),this.Te.capture_copied_text){var e=t=>{t=t||(E==null?void 0:E.event);try{this.xo(t,Vi)}catch(n){Ki.error("Failed to capture copy/cut event",n)}};fe(D,"copy",e,{capture:!0}),fe(D,"cut",e,{capture:!0})}}}else Ki.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.po&&(this.wo(),this.po=!0)}onRemoteConfig(r){if(this.yo=!0,r.ok){var e=r.config;e.elementsChainAsString&&(this.bo=e.elementsChainAsString);var t=e.autocapture_opt_out;rt(t)&&(this.instance.persistence&&this.instance.persistence.register({[Uu]:t}),this.mo=t),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(r){this._o=r}getElementSelectors(r){var e,t=[];return(e=this._o)==null||e.forEach((n=>{var i=D==null?void 0:D.querySelectorAll(n);i==null||i.forEach((s=>{r===s&&t.push(n)}))})),t}get isEnabled(){var r,e,t=(r=this.instance.persistence)==null?void 0:r.props[Uu],n=this.mo,i=this.instance.Ur()&&!this.yo;if(Me(n)&&!rt(t)&&!i)return!1;var s=(e=this.mo)!==null&&e!==void 0?e:!!t;return!!this.instance.config.autocapture&&!s}xo(r,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var t,n=Mi(r);_g(n)&&(n=n.parentNode||null),e==="$autocapture"&&r.type==="click"&&r instanceof MouseEvent&&this.instance.config.rageclick&&(t=this.rageclicks)!=null&&t.isRageClick(r.clientX,r.clientY,r.timeStamp||new Date().getTime())&&qc(n,this.instance.config.rageclick)&&this.xo(r,"$rageclick");var i=e===Vi;if(n&&(function(l,f,h,p,v,g){var _;if(!E||Ll(l)||h!=null&&h.url_allowlist&&!Cc(h.url_allowlist,g)||h!=null&&h.url_ignorelist&&Cc(h.url_ignorelist,g))return!1;if(h!=null&&h.dom_event_allowlist){var m=h.dom_event_allowlist;if(m&&!m.some((x=>f.type===x)))return!1}var b=Sg(l,p),w=b.parentIsUsefulElement,S=b.targetElementList;if(!(function(x,P){var C=P==null?void 0:P.element_allowlist;if(F(C))return!0;var R,M=function(y){if(C.some((T=>y.tagName.toLowerCase()===T)))return{v:!0}};for(var L of x)if(R=M(L))return R.v;return!1})(S,h)||!ol(S,h==null?void 0:h.css_selector_allowlist)||ol(S,(_=h==null?void 0:h.css_selector_ignorelist)!==null&&_!==void 0?_:my))return!1;try{var O=E.getComputedStyle(l);
1if(O&&O.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0}catch{}var I=l.tagName.toLowerCase();switch(I){case"html":return!1;case"form":return(v||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(v||["change","click"]).indexOf(f.type)>=0;default:return w?(v||["click"]).indexOf(f.type)>=0:(v||["click"]).indexOf(f.type)>=0&&(Ml.indexOf(I)>-1||l.getAttribute("contenteditable")==="true")}})(n,r,this.Te,i,i?["copy","cut"]:void 0,this.instance)){var s=lb(n,{e:r,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Te.element_attribute_ignorelist,elementsChainAsString:this.bo,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),a=s.props;if(s.explicitNoCapture)return!1;var o=this.getElementSelectors(n);if(o&&o.length>0&&(a.$element_selectors=o),e===Vi){var u,c=bg(E==null||(u=E.getSelection())==null?void 0:u.toString()),d=r.type||"clipboard";if(!c)return!1;a.$selected_content=c,a.$copy_type=d}return this.instance.capture(e,a),!0}}}isBrowserSupported(){return et(D==null?void 0:D.querySelectorAll)}},historyAutocapture:class{constructor(r){var e;this._instance=r,this.ko=(E==null||(e=E.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(q.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.So&&this.So(),this.So=void 0,q.info("History API monitoring stopped")}monitorHistoryChanges(){E&&E.history&&(this.Co("pushState"),this.Co("replaceState"),this.Io())}Co(r){var e;if(E&&((e=E.history[r])==null||!e.__posthog_wrapped__)){var t=this;(function(n,i,s){try{if(!(i in n))return td;var a={next:n[i]},o=s((function(){for(var u=arguments.length,c=new Array(u),d=0;u>d;d++)c[d]=arguments[d];return a.next.apply(this,c)}));return et(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:a}})),n[i]=o,()=>{if(n[i]!==o)for(var u=n[i];et(u)&&u.__posthog_layer__;){var c=u.__posthog_layer__;if(c.next===o)return void(c.next=a.next);u=c.next}else n[i]=a.next}}catch{return td}})(E.history,r,(n=>function(i,s,a){n.call(this,i,s,a),t.To(r)}))}}To(r){try{var e,t=E==null||(e=E.location)==null?void 0:e.pathname;if(!t)return;t!==this.ko&&this.isEnabled&&this._instance.capture(fr,{navigation_type:r}),this.ko=t}catch(n){q.error("Error capturing "+r+" pageview",n)}}Io(){if(!this.So){var r=()=>{this.To("popstate")};fe(E,"popstate",r),this.So=()=>{E&&E.removeEventListener("popstate",r)}}}},heatmaps:class{get Te(){return this.instance.config}constructor(r){var e;this.Mo=!1,this.po=!1,this.Eo=null,this.instance=r,this.Mo=!((e=this.instance.persistence)==null||!e.props[zu]),this.rageclicks=new ed(r.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var r=5e3;return ue(this.Te.capture_heatmaps)&&this.Te.capture_heatmaps.flush_interval_milliseconds&&(r=this.Te.capture_heatmaps.flush_interval_milliseconds),r}get isEnabled(){return W(this.Te.capture_heatmaps)?W(this.Te.enable_heatmaps)?this.Mo:this.Te.enable_heatmaps:this.Te.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.po)return;db.info("starting..."),this.Ro(),this.ke()}else{var r;clearInterval((r=this.Eo)!==null&&r!==void 0?r:void 0),this.Po(),this.getAndClearBuffer()}}onRemoteConfig(r){if(r.ok){var e=r.config;if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[zu]:t}),this.Mo=t,this.startIfEnabled()}}}getAndClearBuffer(){var r=this.R;return this.R=void 0,r}Oo(r){Ji(r.originalEvent)&&this.pe(r.originalEvent,"deadclick")}ke(){this.Eo&&clearInterval(this.Eo),this.Eo=(D==null?void 0:D.visibilityState)==="visible"?setInterval(this.oi.bind(this),this.flushIntervalMilliseconds):null}Ro(){E&&D&&(this.Fo=this.oi.bind(this),fe(E,Zn,this.Fo),this.Lo=r=>this.pe(r||(E==null?void 0:E.event)),fe(D,"click",this.Lo,{capture:!0}),this.$o=r=>this.Ao(r||(E==null?void 0:E.event)),fe(D,"mousemove",this.$o,{capture:!0}),this.No=new Nc(this.instance,Ty,this.Oo.bind(this)),this.No.startIfEnabledOrStop(),this.Do=this.ke.bind(this),fe(D,Xn,this.Do),this.po=!0)}Po(){var r;E&&D&&(this.Fo&&E.removeEventListener(Zn,this.Fo),this.Lo&&D.removeEventListener("click",this.Lo,{capture:!0}),this.$o&&D.removeEventListener("mousemove",this.$o,{capture:!0}),this.Do&&D.removeEventListener(Xn,this.Do),clearTimeout(this.qo),(r=this.No)==null||r.stop(),this.po=!1)}jo(r,e){var t=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=(function(a,o,u){for(var c=a;c&&Lt(c)&&!Ue(c,"body");){if(c===u)return!1;var d=void 0;try{var l,f,h;d=(l=(f=(h=c.ownerDocument)==null?void 0:h.defaultView)!==null&&f!==void 0?f:E)==null?void 0:l.getComputedStyle(c).position}catch{return!1}if(G(o,d))return!0;c=wg(c)}return!1})(Mi(r),["fixed","sticky"],i);return{x:r.clientX+(s?0:n),y:r.clientY+(s?0:t),target_fixed:s,type:e}}pe(r,e){var t;if(e===void 0&&(e="click"),!Ic(r.target)&&Ji(r)){var n=this.jo(r,e);(t=this.rageclicks)!=null&&t.isRageClick(r.clientX,r.clientY,new Date().getTime())&&qc(Mi(r),this.instance.config.rageclick)&&this.Wt(A({}
1,n,{type:"rageclick"})),this.Wt(n)}}Ao(r){!Ic(r.target)&&Ji(r)&&(clearTimeout(this.qo),this.qo=setTimeout((()=>{this.Wt(this.jo(r,"mousemove"))}),500))}Wt(r){if(E){var e=this.Te.disable_capture_url_hashes?Mt(E.location.href):E.location.href,t=this.Te.custom_personal_data_properties,n=this.Te.mask_personal_data_properties?[...xr,...t||[]]:[],i=sn(e,n,an);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(r)}}oi(){this.R&&!Ft(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Nc,webVitalsAutocapture:class{constructor(r){var e;this.Mo=!1,this.po=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Ho=()=>{clearTimeout(this.Bo),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((t,n)=>A({},t,{["$web_vitals_"+n.name+"_event"]:A({},n),["$web_vitals_"+n.name+"_value"]:n.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Uo=t=>{var n;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.zo();if(!F(i))if(W(t==null?void 0:t.name)||W(t==null?void 0:t.value))Ut.error("Invalid metric received",t);else if(!this.Vo||this.Vo>t.value){this.R.url!==i&&(this.Ho(),this.Bo=setTimeout(this.Ho,this.flushToCaptureTimeoutMs)),F(this.R.url)&&(this.R.url=i),this.R.firstMetricTimestamp=F(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,t.attribution&&t.attribution.interactionTargetElement&&(t.attribution.interactionTargetElement=void 0);var s=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0),a=A({},t,{$current_url:i,timestamp:Date.now()});F(s)||(a.$session_id=s.sessionId,a.$window_id=s.windowId),this.R.metrics.push(a),this.R.metrics.length===this.allowedMetrics.length&&this.Ho()}else Ut.error("Ignoring metric with value >= "+this.Vo,t)},this.Wo=()=>{if(!this.po){var t,n,i,s,a=B.__PosthogExtensions__;if(!F(a)&&!F(a.postHogWebVitalsCallbacks)){var o=a.postHogWebVitalsCallbacks;t=o.onLCP,n=o.onCLS,i=o.onFCP,s=o.onINP}t&&n&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&t(this.Uo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this.Uo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Uo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.Uo.bind(this)),this.po=!0):Ut.error("web vitals callbacks not loaded - not starting")}},this._instance=r,this.Mo=!((e=this._instance.persistence)==null||!e.props[Wu]),this.startIfEnabled()}get Zo(){return this._instance.config.capture_performance}get allowedMetrics(){var r,e,t=ue(this.Zo)?(r=this.Zo)==null?void 0:r.web_vitals_allowed_metrics:void 0;return W(t)?((e=this._instance.persistence)==null?void 0:e.props[Ju])||["CLS","FCP","INP","LCP"]:t}get flushToCaptureTimeoutMs(){return(ue(this.Zo)?this.Zo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var r=ue(this.Zo)?this.Zo.web_vitals_attribution:void 0;return r!=null&&r}get Vo(){var r=ue(this.Zo)&&Te(this.Zo.__web_vitals_max_value)?this.Zo.__web_vitals_max_value:rd;return r>0&&6e4>=r?rd:r}get isEnabled(){var r=ge==null?void 0:ge.protocol;if(r!=="http:"&&r!=="https:")return Ut.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=ue(this.Zo)?this.Zo.web_vitals:rt(this.Zo)?this.Zo:void 0;return rt(e)?e:this.Mo}startIfEnabled(){this.isEnabled&&!this.po&&(Ut.info("enabled, starting..."),this.tr(this.Wo))}onRemoteConfig(r){if(r.ok){var e=r.config;if("capturePerformance"in e){var t=ue(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=ue(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Wu]:t}),this._instance.persistence.register({[Ju]:n})),this.Mo=t,this.startIfEnabled()}}}tr(r){var e,t;(e=B.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?r():(t=B.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(n=>{n?Ut.error("failed to load script",n):r()}))}zo(){var r=E?this._instance.config.disable_capture_url_hashes?Mt(E.location.href):E.location.href:void 0;if(r){var e=this._instance.config.custom_personal_data_properties,t=this._instance.config.mask_personal_data_properties?[...xr,...e||[]]:[];return sn(r,t,an)}Ut.error("Could not determine current URL")}}},bb={exceptionObserver:class{constructor(r){var e;this.Wo=()=>{var t;if(E&&this.isEnabled&&(t=B.__PosthogExtensions__)!=null&&t.errorWrappingFunctions){var n=B.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=B.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=B.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Go&&this.Te.capture_unhandled_errors&&(this.Go=n(this.captureException.bind(this))),!this.Qo&&this.Te.capture_unhandled_rejections&&(this.Qo=i(this.captureException.bind(this))),!this.Jo&&this.Te.capture_console_errors&&(this.Jo=s(this.captureException.bind(this)))}catch(a){Mr.error("failed to start",a),this.Ko()}}},this._instance=r,this.Yo=!((e=this._instance.persistence)==null||!e.props[Gu]),this.Xo=new bm(A({},(function(t){var n,i,s,a;return t===void 0&&(t={}),{refillRate:(n=(i=t.exceptionRateLimiterRefillRate)!==null&&i!==void 0?i:t.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(s=(a=t.exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:t.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10}})(this._instance.config.error_tracking),{refillInterval:1e4,it:Mr})),this.Te=this.ta(),this.startIfEnabledOrStop()}ta(){var r=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return ue(r)?e=A({},e,r):(F(r)?this.Yo:r)&&(e=A({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Te.capture_console_errors||this.Te.capture_unhandled_errors||this.Te.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Mr.info("enabled"),this.Ko(),this.tr(this.Wo)):this.Ko()}tr(r){var e,t;(e=B.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?r():(t=B.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"exception-autocapture",(n=>{if(n)return Mr.error("failed to load script",n);r()}))}Ko(){var r,e,t;(r=this.Go)==null||r.call(this),this.Go=void 0,(e=this.Qo)==null||e.call(this),this.Qo=void 0,(t=this.Jo)==null||t.call(this),this.Jo=void 0}onRemoteConfig(r){if(r.ok){var e=r.config;"autocaptureExceptions"in e&&(this.Yo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[Gu]:this.Yo}),this.Te=this.ta(),this.startIfEnabledOrStop())}}onConfigChange(){this.Te=this.ta()}captureException(r){var e,t,n,i=(e=r==null||(t=r.$exception_list)==null||(t=t[0])==null?void 0:t.type)!==null&&e!==void 0?e:"Exception";this.Xo.consumeRateLimit(i)?Mr.info("Skipping exception capture because of client rate limiting.",{exception:i}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(r)}},exceptions:class{constructor(r){var e,t;this.ea=[],this.ra=new Nm([new Gm,new ey,new Km,new Vm,new Zm,new Xm,new Jm,new Qm],(function(n){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;i>a;a++)s[a-1]=arguments[a];return function(o,u){u===void 0&&(u=0);for(var c=[],d=o.split(`
2`),l=u;d.length>l;l++){var f=d[l];if(1024>=f.length){var h=Oc.test(f)?f.replace(Oc,"$1"):f;if(!h.match(/\S*Error: /)){for(var p of s){var v=p(h,n);if(v){c.push(v);break}}if(c.length>=50)break}}}return(function(g){if(!g.length)return[];var _=Array.from(g);return _.reverse(),_.slice(0,50).map((m=>{return A({},m,{filename:m.filename||(b=_,b[b.length-1]||{}).filename,function:m.function||br});var b}))})(c)}})("web:javascript",Bm,zm)),this._instance=r,this.ea=(e=(t=this._instance.persistence)==null?void 0:t.get_property(Vu))!==null&&e!==void 0?e:[],this.ia=Gn(this.na()),this.sa=new ry(this.ia)}onConfigChange(){this.ia=Gn(this.na()),this.sa.setConfig(this.ia)}onRemoteConfig(r){var e,t,n;if(r.ok){var i=r.config;if("errorTracking"in i){var s=(e=(t=i.errorTracking)==null?void 0:t.suppressionRules)!==null&&e!==void 0?e:[],a=(n=i.errorTracking)==null?void 0:n.captureExtensionExceptions;this.ea=s,this._instance.persistence&&this._instance.persistence.register({[Vu]:this.ea,[Ku]:a})}}}get oa(){var r,e=!!this._instance.get_property(Ku),t=this._instance.config.error_tracking.captureExtensionExceptions;return(r=t??e)!==null&&r!==void 0&&r}buildProperties(r,e){return this.ra.buildFromUnknown(r,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}addExceptionStep(r,e){if(this.ia.enabled)try{if(!te(r)||r.trim().length===0)return void mt.warn("Ignoring exception step because message must be a non-empty string");var t=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var a=[];return{sanitizedProperties:Object.keys(s).reduce(((o,u)=>ty.has(u)?(a.push(u),o):(o[u]=s[u],o)),{}),droppedKeys:a}})(this.aa(e)),n=t.sanitizedProperties,i=t.droppedKeys;i.length>0&&mt.warn("Ignoring reserved exception step fields",{droppedKeys:i}),this.sa.add(A({[Un]:r,[zn]:new Date().toISOString()},n))}catch(s){mt.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(r){try{var e=r.$exception_list;
2if(this.la(e)){if(this.ua(e))return this.ha("Exception dropped: matched a suppression rule"),void mt.info("Skipping exception capture because a suppression rule matched");if(!this.oa&&this.da(e))return this.ha("Exception dropped: thrown by a browser extension"),void mt.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ca(e))return this.ha("Exception dropped: thrown by the PostHog SDK"),void mt.info("Skipping exception capture because it was thrown by the PostHog SDK")}var t=this.ia.enabled&&W(r.$exception_steps)?this.va(r):r;try{var n=this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",kn:!0});return n&&this.sa.clear(),n}catch(i){return mt.error("Failed to capture exception event. Dropping this exception.",i),void this.sa.clear()}}catch(i){return void mt.error("Failed to process exception event. Ignoring this exception.",i)}}va(r){try{var e=this.sa.getAttachable();return e.length===0?r:A({},r,{$exception_steps:e})}catch(t){return mt.error("Failed to read buffered exception steps. Capturing exception without steps.",t),r}}ha(r){this.ia.enabled&&this.sa.add({[Un]:r,[zn]:new Date().toISOString()})}aa(r){return ue(r)?A({},r):{}}na(){var r,e;return(r=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&r!==void 0?r:{}}ua(r){if(r.length===0)return!1;var e=r.reduce(((t,n)=>{var i=n.type,s=n.value;return te(i)&&i.length>0&&t.$exception_types.push(i),te(s)&&s.length>0&&t.$exception_values.push(s),t}),{$exception_types:[],$exception_values:[]});return this.ea.some((t=>{var n=t.values.map((i=>{var s,a=Xg[i.operator],o=J(i.value)?i.value:[i.value],u=(s=e[i.key])!==null&&s!==void 0?s:[];return o.length>0&&a(o,u)}));return t.type==="OR"?n.some(Boolean):n.every(Boolean)}))}da(r){return r.flatMap((e=>{var t,n;return(t=(n=e.stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}ca(r){if(r.length>0){var e,t,n,i,s=(e=(t=r[0].stacktrace)==null?void 0:t.frames)!==null&&e!==void 0?e:[],a=s[s.length-1];return(n=a==null||(i=a.filename)==null?void 0:i.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}la(r){return!W(r)&&J(r)}}},wb=A({productTours:class{get mi(){return this._instance.persistence}constructor(r){this.fa=null,this.pa=null,this._instance=r}initialize(){this.loadIfEnabled()}onRemoteConfig(r){if(r.ok){var e=r.config;if("productTours"in e){var t,n;if(this.mi&&this.mi.register({[Il]:!!e.productTours}),!Xi(this._instance))return!this.fa&&W((t=this.mi)==null?void 0:t.props[Hr])||Yi.info("product tours disabled; stopping and clearing cached tours"),(n=this.fa)==null||n.stop(),this.fa=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.fa&&Xi(this._instance)&&this.tr((()=>this.ga()))}tr(r){var e,t;(e=B.__PosthogExtensions__)!=null&&e.generateProductTours?r():(t=B.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"product-tours",(n=>{n?Yi.error("Could not load product tours script",n):r()}))}ga(){var r;!this.fa&&(r=B.__PosthogExtensions__)!=null&&r.generateProductTours&&(this.fa=B.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(r,e){if(e===void 0&&(e=!1),!J(this.pa)||e){var t=this.mi;if(t){var n=t.props[Hr];if(J(n)&&!e)return this.pa=n,void r(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",timestampMode:"query",callback:i=>{if(Xi(this._instance)){var s=i.statusCode;if(s!==200||!i.json){var a="Product Tours API could not be loaded, status: "+s;return Yi.error(a),void r([],{isLoaded:!1,error:a})}var o=J(i.json.product_tours)?i.json.product_tours:[];this.pa=o,t&&t.register({[Hr]:o}),r(o,{isLoaded:!0})}else r([],{isLoaded:!0})}})}else r(this.pa,{isLoaded:!0})}getActiveProductTours(r){W(this.fa)?r([],{isLoaded:!1,error:"Product tours not loaded"}):this.fa.getActiveProductTours(r)}showProductTour(r){var e;(e=this.fa)==null||e.showTourById(r)}previewTour(r){this.fa?this.fa.previewTour(r):this.tr((()=>{var e;this.ga(),(e=this.fa)==null||e.previewTour(r)}))}dismissProductTour(){var r;(r=this.fa)==null||r.dismissTour("user_clicked_skip")}nextStep(){var r;(r=this.fa)==null||r.nextStep()}previousStep(){var r;(r=this.fa)==null||r.previousStep()}clearCache(){var r;this.pa=null,(r=this.mi)==null||r.unregister(Hr)}resetTour(r){var e;(e=this.fa)==null||e.resetTour(r)}resetAllTours(){var r;(r=this.fa)==null||r.resetAllTours()}cancelPendingTour(r){var e;(e=this.fa)==null||e.cancelPendingTour(r)}}},hi),xb={siteApps:class{constructor(r){this.ma=0,this._instance=r,this.ya=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ba(r,e){if(e){var t=this.globalsForEvent(e);this.ya.push(t),this.ya.length>1e3&&(this.ya=this.ya.slice(10))}}get siteAppLoaders(){var r;return(r=B._POSTHOG_REMOTE_CONFIG)==null||(r=r[this._instance.config.token])==null?void 0:r.siteApps}initialize(){if(this.isEnabled){var r=this._instance._addCaptureHook(this.ba.bind(this));this._a=()=>{r(),this.ya=[],this._a=void 0}}}globalsForEvent(r){var e,t,n,i,s,a,o;if(!r)throw new Error("Event payload is required");var u={},c=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var l of Object.entries(d)){var f=l[0];u[f]={id:c[f],type:f,properties:l[1]}}var h=r.$set_once,p=r.$set;return{event:A({},Sv(r,fb),{properties:A({},r.properties,p?{$set:A({},(e=(t=r.properties)==null?void 0:t.$set)!==null&&e!==void 0?e:{},p)}:{},h?{$set_once:A({},(n=(i=r.properties)==null?void 0:i.$set_once)!==null&&n!==void 0?n:{},h)}:{}),elements_chain:(s=(a=r.properties)==null?void 0:a.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(o=r.properties)==null?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}wa(r){var e,t=(e=r.tagName)==null?void 0:e.toLowerCase();return t==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(r)||(ut.error("prepare_external_dependency_stylesheet returned null"),null):t==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(r)||(ut.error("prepare_external_dependency_script returned null"),null):r}xa(){var r,e,t,n,i,s,a,o;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var u=D==null?void 0:D.defaultView,c=u==null||(r=u.Node)==null?void 0:r.prototype;if(!u||!c)return()=>{};if(this.ma++,this.ka)return this.Sa();var d=[],l=this,f=new WeakSet,h=(g,_,m)=>{if(g!=null&&g[_]){var b=g[_];g[_]=m(b),d.push((()=>{g[_]=b}))}},p=g=>{if(f.has(g))return g;var _=l.wa(g);return _&&f.add(_),_},v=g=>g.map((_=>typeof _=="string"?_:p(_))).filter((_=>!Me(_)));return h(c,"appendChild",(g=>function(_){var m=p(_);return m?g.call(this,m):_})),h(c,"insertBefore",(g=>function(_,m){var b=p(_);return b?g.call(this,b,m):_})),h(c,"replaceChild",(g=>function(_,m){var b=p(_);return b?g.call(this,b,m):m})),[(e=u.Element)==null?void 0:e.prototype,(t=u.Document)==null?void 0:t.prototype,(n=u.DocumentFragment)==null?void 0:n.prototype].forEach((g=>{h(g,"append",(_=>function(){for(var m=arguments.length,b=new Array(m),w=0;m>w;w++)b[w]=arguments[w];return _.apply(this,v(b))}
2)),h(g,"prepend",(_=>function(){for(var m=arguments.length,b=new Array(m),w=0;m>w;w++)b[w]=arguments[w];return _.apply(this,v(b))}))})),[(i=u.Element)==null?void 0:i.prototype,(s=u.CharacterData)==null?void 0:s.prototype,(a=u.DocumentType)==null?void 0:a.prototype].forEach((g=>{h(g,"before",(_=>function(){for(var m=arguments.length,b=new Array(m),w=0;m>w;w++)b[w]=arguments[w];return _.apply(this,v(b))})),h(g,"after",(_=>function(){for(var m=arguments.length,b=new Array(m),w=0;m>w;w++)b[w]=arguments[w];return _.apply(this,v(b))})),h(g,"replaceWith",(_=>function(){for(var m=arguments.length,b=new Array(m),w=0;m>w;w++)b[w]=arguments[w];var S=v(b);return b.length&&!S.length?void 0:_.apply(this,S)}))})),h((o=u.Element)==null?void 0:o.prototype,"insertAdjacentElement",(g=>function(_,m){var b=p(m);return b?g.call(this,_,b):null})),this.ka=()=>{d.forEach((g=>g())),this.ka=void 0},this.Sa()}Sa(){var r=!1;return()=>{var e;r||(r=!0,this.ma--,this.ma===0&&((e=this.ka)==null||e.call(this)))}}Ca(r,e){e===void 0&&(e=!0);var t=this.xa();try{var n=r(t);return e&&t(),n}catch(i){throw t(),i}}setupSiteApp(r){var e=this.apps[r.id],t=()=>{var a;!e.errored&&this.ya.length&&(ut.info("Processing "+this.ya.length+" events for site app with id "+r.id),this.ya.forEach((o=>this.Ca((()=>e.processEvent==null?void 0:e.processEvent(o))))),e.processedBuffer=!0),Object.values(this.apps).every((o=>o.processedBuffer||o.errored))&&((a=this._a)==null||a.call(this))},n=!1,i=a=>{e.errored=!a,e.loaded=!0,ut.info("Site app with id "+r.id+" "+(a?"loaded":"errored")),n&&t()};try{var s=this.Ca((a=>r.init({posthog:this._instance,callback(o){a(),i(o)}})),!1).processEvent;s&&(e.processEvent=s),n=!0}catch(a){ut.error(sd+r.id,a),i(!1)}if(n&&e.loaded)try{t()}catch(a){ut.error("Error while processing buffered events PostHog app with config id "+r.id,a),e.errored=!0}}Ia(){var r=this.siteAppLoaders||[];for(var e of r)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var t of r)this.setupSiteApp(t)}Ta(r){var e=this;if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(r),n=function(s){try{e.Ca((()=>s.processEvent==null?void 0:s.processEvent(t)))}catch(a){ut.error("Error while processing event "+r.event+" for site app "+s.id,a)}};for(var i of Object.values(this.apps))n(i)}}onRemoteConfig(r){var e,t,n,i=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Ia(),void this._instance.on("eventCaptured",(u=>this.Ta(u)))):void ut.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((t=this._a)==null||t.call(this),r.ok){var s=r.config;if((n=s.siteApps)!=null&&n.length)if(this.isEnabled){var a=function(){var u,c=o.id,d=o.url;B["__$$ph_site_app_"+c]=i._instance,(u=B.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(i._instance,d,(l=>{if(l)return ut.error(sd+c,l)}))};for(var o of s.siteApps)a()}else ut.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},Sb={tracingHeaders:class{constructor(r){this.Ma=void 0,this.Ea=void 0,this.Ra=void 0,this.Wo=()=>{var e,t,n=this.Pa();n?(F(this.Ma)&&(this.Ma=(e=B.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),F(this.Ea)&&(this.Ea=(t=B.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchFetch(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Ko()},this._instance=r}initialize(){this.startIfEnabledOrStop()}tr(r){var e,t;(e=B.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?r():(t=B.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"tracing-headers",(n=>{if(n)return cb.error("failed to load script",n);r()}))}Oa(){var r,e;return(r=(e=this._instance.config.tracing_headers)!==null&&e!==void 0?e:this._instance.config.addTracingHeaders)!==null&&r!==void 0?r:this._instance.config.__add_tracing_headers}Pa(){var r=this.Oa();return J(r)?(J(this.Ra)?this.Ra.splice(0,this.Ra.length,...r):this.Ra=[...r],r.length>0?this.Ra:void 0):(J(this.Ra)&&this.Ra.splice(0),this.Ra=r||void 0,this.Ra)}Ko(){var r,e;(r=this.Ma)==null||r.call(this),(e=this.Ea)==null||e.call(this),this.Ma=void 0,this.Ea=void 0}startIfEnabledOrStop(){this.Pa()?this.tr(this.Wo):this.Ko()}}},Eb=A({surveys:class{get Te(){return this._instance.config}constructor(r){this.Fa=void 0,this._surveyManager=null,this.La=!1,this.$a=[],this.Aa=null,this.Na=null,this._instance=r,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(r){if(!this.Te.disable_surveys){if(!r.ok)return Q.warn("Remote config unavailable. Not loading surveys.");var e=r.config.surveys;if(W(e))return Q.warn("Flags not loaded yet. Not loading surveys.");var t=J(e);this.Fa=t?e.length>0:e,Q.info("flags response received, isSurveysEnabled: "+this.Fa),this.loadIfEnabled()}}reset(){try{var r;(r=this._surveyEventReceiver)==null||r.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(e_)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach((i=>localStorage.removeItem(i)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.La)Q.info("Already initializing surveys, skipping...");else if(this.Te.disable_surveys)Q.info(ad);else if(this.Te.cookieless_mode&&this._instance.consent.isOptedOut())Q.info("Not loading surveys in cookieless mode without consent.");else{var r=B==null?void 0:B.__PosthogExtensions__;if(r){if(!F(this.Fa)||this.Te.advanced_enable_surveys){var e=this.Fa||this.Te.advanced_enable_surveys;this.La=!0;try{var t=r.generateSurveys;if(t)return void this.Da(t,e);var n=r.loadExternalDependency;if(!n)return void this.qa(Al);n(this._instance,"surveys",(i=>{i||!r.generateSurveys?this.qa("Could not load surveys script",i):this.Da(r.generateSurveys,e)}))}catch(i){throw this.qa("Error initializing surveys",i),i}finally{this.La=!1}}}else Q.error("PostHog Extensions not found.")}}Da(r,e){this._surveyManager=r(this._instance,e),this._surveyEventReceiver=new vb(this._instance),Q.info("Surveys loaded successfully"),this.ja({isLoaded:!0})}qa(r,e){Q.error(r,e),this.ja({isLoaded:!1,error:r})}onSurveysLoaded(r){return this.$a.push(r),this._surveyManager&&this.ja({isLoaded:!0}),()=>{this.$a=this.$a.filter((e=>e!==r))}}getSurveys(r,e){if(e===void 0&&(e=!1),this.Te.disable_surveys)return Q.info(ad),r([]);var t,n=this._instance.get_property(Zu);if(n&&!e)return r(n,{isLoaded:!0}
2),void(this.Ha()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.Aa?this.Aa.then((i=>r(i.surveys,i.context))):(typeof Promise<"u"&&(this.Aa=new Promise((i=>{t=i}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Te.token),method:"GET",timestampMode:"query",timeout:this.Te.surveys_request_timeout_ms,callback:i=>{var s;this.Aa=null;var a=i.statusCode;if(a!==200||!i.json){var o="Surveys API could not be loaded, status: "+a;Q.error(o),this.Na=Date.now();var u={isLoaded:!1,error:o};return r([],u),void(t==null||t({surveys:[],context:u}))}this.Na=null;var c,d=i.json.surveys||[],l=d.filter((h=>(function(p){return!(!p.start_date||p.end_date)})(h)&&(Qg(h)||(function(p){var v;return!((v=p.conditions)==null||(v=v.actions)==null||(v=v.values)==null||!v.length)})(h))));l.length>0&&((c=this._surveyEventReceiver)==null||c.register(l)),(s=this._instance.persistence)==null||s.register({[Zu]:d,[Wn]:Date.now()});var f={isLoaded:!0};r(d,f),t==null||t({surveys:d,context:f})}}))}Ha(){return this.Ba()&&!this.Aa&&!this.Ua()}Ba(){var r=this._instance.get_property(Wn);return Te(r)&&Date.now()-r>3e5}Ua(){return Te(this.Na)&&3e5>Date.now()-this.Na}markSurveyAsSeen(r,e){var t,n={id:r,current_iteration:(t=e==null?void 0:e.iteration)!==null&&t!==void 0?t:null};t_(n);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}ja(r){for(var e of this.$a)try{if(!r.isLoaded)return e([],r);this.getSurveys(e)}catch(t){Q.error("Error in survey callback",t)}}getActiveMatchingSurveys(r,e){if(e===void 0&&(e=!1),!W(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(r,e);Q.warn("init was not called")}za(r){var e=null;return this.getSurveys((t=>{var n;e=(n=t.find((i=>i.id===r)))!==null&&n!==void 0?n:null})),e}Va(r){if(W(this._surveyManager))return{eligible:!1,reason:Zi};var e=typeof r=="string"?this.za(r):r;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(r){if(W(this._surveyManager))return Q.warn("init was not called"),{visible:!1,disabledReason:Zi};var e=this.Va(r);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(r,e){return W(this._surveyManager)?(Q.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Zi})):new Promise((t=>{this.getSurveys((n=>{var i,s=(i=n.find((o=>o.id===r)))!==null&&i!==void 0?i:null;if(s){var a=this.Va(s);t({visible:a.eligible,disabledReason:a.reason})}else t({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(r,e,t){var n;if(W(this._surveyManager))Q.warn("init was not called");else{var i=typeof r=="string"?this.za(r):r;if(i!=null&&i.id)if(eb.includes(i.type)){var s=D==null?void 0:D.querySelector(e);if(s)return(n=i.appearance)!=null&&n.surveyPopupDelaySeconds?(Q.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,o;Q.info("Rendering survey "+i.id+" with delay of "+((a=i.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(o=this._surveyManager)==null||o.renderSurvey(i,s,t),Q.info("Survey "+i.id+" rendered")}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s,t);Q.warn("Survey element not found")}else Q.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Q.warn("Survey not found")}}displaySurvey(r,e){var t;if(W(this._surveyManager))Q.warn("init was not called");else{var n=this.za(r);if(n){var i=n;if((t=n.appearance)!=null&&t.surveyPopupDelaySeconds&&e.ignoreDelay&&(i=A({},n,{appearance:A({},n.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==ll.Popover&&e.initialResponses&&Q.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var s=this.canRenderSurvey(n);if(!s.visible)return void Q.warn("Survey is not eligible to be displayed: ",s.disabledReason)}e.displayType!==ll.Inline?this._surveyManager.handlePopoverSurvey(i,e):this.renderSurvey(i,e.selector,e.properties)}else Q.warn("Survey not found")}}cancelPendingSurvey(r){W(this._surveyManager)?Q.warn("init was not called"):this._surveyManager.cancelSurvey(r)}handlePageUnload(){var r;(r=this._surveyManager)==null||r.handlePageUnload==null||r.handlePageUnload()}}},hi),Ob={toolbar:class{constructor(r){this.instance=r}Wa(r){B.ph_toolbar_state=r}Za(){var r;return(r=B.ph_toolbar_state)!==null&&r!==void 0?r:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(r,e,t){if(r===void 0&&(r=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),fg(this.instance.config)||!E||!D)return!1;r=r??E.location,t=t??E.history;try{if(!e){try{E.localStorage.setItem("test","test"),E.localStorage.removeItem("test")}catch{return!1}e=E==null?void 0:E.localStorage}var n,i=gb||ti(r.hash,"__posthog")||ti(r.hash,"state"),s=i?Rc((()=>JSON.parse(atob(decodeURIComponent(i)))))||Rc((()=>JSON.parse(decodeURIComponent(i)))):null;return s&&s.action==="ph_authorize"?((n=s).source="url",n&&Object.keys(n).length>0&&(s.desiredHash?r.hash=s.desiredHash:t?t.replaceState(t.state,"",r.pathname+r.search):r.hash="")):((n=JSON.parse(e.getItem(od)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch{return!1}}Ga(r){var e=B.ph_load_toolbar||B.ph_load_editor;!W(e)&&et(e)?e(r,this.instance):ud.warn("No toolbar load function found")}loadToolbar(r){var e=!(D==null||!D.getElementById(gg));if(!E||e)return!1;var t=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=A({token:this.instance.config.token},r,{apiURL:this.instance.requestRouter.endpointFor("ui")},t?{instrument:!1}:{});if(E.localStorage.setItem(od,JSON.stringify(A({},n,{source:void 0}))),this.Za()===2)this.Ga(n);else if(this.Za()===0){var i;this.Wa(1),(i=B.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return ud.error("[Toolbar] Failed to load",s),void this.Wa(0);this.Wa(2),this.Ga(n)})),fe(E,"turbolinks:load",(()=>{this.Wa(0),this.loadToolbar(n)}))}return!0}Qa(r){return this.loadToolbar(r)}maybeLoadEditor(r,e,t){return r===void 0&&(r=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),this.maybeLoadToolbar(r,e,t)}}},Tb=A({experiments:ke},hi),Pb={conversations:class{constructor(r){this.Ja=void 0,this._conversationsManager=null,this.Ka=!1,this.Ya=null,this._instance=r}initialize(){this.loadIfEnabled()}onRemoteConfig(r){if(!this._instance.config.disable_conversations&&r.ok){var e=r.config.conversations;W(e)||(rt(e)?this.Ja=e:(this.Ja=e.enabled,this.Ya=e),this.loadIfEnabled())}}reset(){var r;(r=this._conversationsManager)==null||r.reset(),this._conversationsManager=null,this.Ja=void 0,this.Ya=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ka||this._instance.config.disable_conversations||fg(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var r=B==null?void 0:B.__PosthogExtensions__;if(r&&!F(this.Ja)&&this.Ja)if(this.Ya&&this.Ya.token){this.Ka=!0;try{var e=r.initConversations;if(e)return this.Xa(e),void(this.Ka=!1);var t=r.loadExternalDependency;if(!t)return void this.tl(Al);t(this._instance,"conversations",(n=>{n||!r.initConversations?this.tl("Could not load conversations script",n):this.Xa(r.initConversations),this.Ka=!1}))}catch(n){this.tl("Error initializing conversations",n),this.Ka=!1}}else Ke.error("Conversations enabled but missing token in remote config.")}}Xa(r){if(this.Ya)try{this._conversationsManager=r(this.Ya,this._instance),Ke.info("Conversations loaded successfully")}catch(e){this.tl("Error completing conversations initialization",e)}else Ke.error("Cannot complete initialization: remote config is null")}tl(r,e){Ke.error(r,e),this._conversationsManager=null,this.Ka=!1}show(){this._conversationsManager?this._conversationsManager.show():Ke.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ja===!0&&!Me(this._conversationsManager)}isVisible(){var r,e;return(r=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&r!==void 0&&r}sendMessage(r,e,t){var n=this;return ve((function*(){return n._conversationsManager?n._conversationsManager.sendMessage(r,e,t):(Ke.warn(Gt),null)}))()}getMessages(r,e){var t=this;return ve((function*(){return t._conversationsManager?t._conversationsManager.getMessages(r,e):(Ke.warn(Gt),null)}))()}markAsRead(r){var e=this;return ve((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(r):(Ke.warn(Gt),null)}))()}getTickets(r){var e=this;return ve((function*(){return e._conversationsManager?e._conversationsManager.getTickets(r):(Ke.warn(Gt),null)}))()}requestRestoreLink(r){var e=this;return ve((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(r):(Ke.warn(Gt),null)}))()}restoreFromToken(r){var e=this;return ve((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(r):(Ke.warn(Gt),null)}))()}restoreFromUrlToken(){var r=this;return ve((function*(){return r._conversationsManager?r._conversationsManager.restoreFromUrlToken():(Ke.warn(Gt),null)}))()}getCurrentTicketId(){var r,e;return(r=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&r!==void 0?r:null}getWidgetSessionId(){var r,e;return(r=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&r!==void 0?r:null}En(){var r;(r=this._conversationsManager)==null||r.setIdentity()}Rn(){var r;(r=this._conversationsManager)==null||r.clearIdentity()}}},Rb={logs:class{constructor(r){var e;this.el=!1,this.rl=!1,this.it=ce("[logs]"),this.Gr=[],this.il=[],this.Hs=0,this.nl=()=>{var t,n;this.Hs=0,(t=this.sl)==null||t.onReconnect(),(n=this.ol)==null||n.onReconnect()},this._instance=r,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.el=!0),E&&fe(E,"online",this.nl)}al(r,e,t,n){var i,s=(function(a,o){var u,c,d,l,f,h,p,v=(u=a==null?void 0:a.flushIntervalMs)!==null&&u!==void 0?u:3e3,g=(c=a==null?void 0:a.maxBufferSize)!==null&&c!==void 0?c:100,_=o!=null&&o.consoleCapture?void 0:(d=a==null?void 0:a.maxLogsPerInterval)!==null&&d!==void 0?d:1e3,m=F(_)?Math.max(g,2048):Math.max(g,_),b=a==null?void 0:a.resourceAttributes;return{serviceName:(l=(f=b==null?void 0:b["service.name"])!==null&&f!==void 0?f:a==null?void 0:a.serviceName)!==null&&l!==void 0?l:o==null?void 0:o.serviceNameDefault,serviceVersion:(h=b==null?void 0:b["service.version"])!==null&&h!==void 0?h:a==null?void 0:a.serviceVersion,environment:(p=b==null?void 0:b["deployment.environment"])!==null&&p!==void 0?p:a==null?void 0:a.environment,resourceAttributes:b,beforeSend:a==null?void 0:a.beforeSend,flushIntervalMs:v,max
2BufferSize:g,maxQueueSize:m,maxBatchRecordsPerPost:100,rateCapWindowMs:v,maxLogsPerInterval:_,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((i=this._instance)==null||(i=i.config)==null?void 0:i.logs,t);return[new qm(this.ll(r,e),s,this.it,(()=>this.ul()),(a=>a()),void 0,n),s]}hl(){var r,e=(r=this._instance)==null||(r=r.config)==null?void 0:r.logs;if(!this.sl||this.dl!==e){var t;(t=this.sl)==null||t.reset(),this.dl=e;var n=this.al((()=>this.Gr),(i=>{this.Gr=i}));this.sl=n[0],this.cl=n[1]}return this.sl}vl(){var r,e=(r=this._instance)==null||(r=r.config)==null?void 0:r.logs;if(!this.ol||this.fl!==e){var t;(t=this.ol)==null||t.reset(),this.fl=e;var n=this.al((()=>this.il),(i=>{this.il=i}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},fd);this.ol=n[0],this.pl=n[1]}return this.ol}initialize(){this.loadIfEnabled()}onRemoteConfig(r){var e;if(r.ok){var t=(e=r.config.logs)==null?void 0:e.captureConsoleLogs;!W(t)&&t&&(this.el=!0,this.loadIfEnabled())}}reset(){var r,e;this.Gr=[],(r=this.sl)==null||r.reset(),this.il=[],(e=this.ol)==null||e.reset(),this.Hs=0}captureLog(r){this.hl().captureLog(r)}le(r){this.vl().captureLog(r)}get logger(){return this.gl||(this.gl={trace:(r,e)=>this.captureLog({body:r,level:"trace",attributes:e}),debug:(r,e)=>this.captureLog({body:r,level:"debug",attributes:e}),info:(r,e)=>this.captureLog({body:r,level:"info",attributes:e}),warn:(r,e)=>this.captureLog({body:r,level:"warn",attributes:e}),error:(r,e)=>this.captureLog({body:r,level:"error",attributes:e}),fatal:(r,e)=>this.captureLog({body:r,level:"fatal",attributes:e})}),this.gl}flushLogs(r){r?this.ml(r):(this.sl&&this.sl.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))),this.ol&&this.ol.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))))}loadIfEnabled(){if(this.el&&!this.rl){var r=B==null?void 0:B.__PosthogExtensions__;if(r){var e=r.loadExternalDependency;e?e(this._instance,"logs",(t=>{var n;t||(n=r.logs)==null||!n.initializeLogs?this.it.error("Could not load logs script",t):(r.logs.initializeLogs(this._instance),this.rl=!0)})):this.it.error(Al)}else this.it.error("PostHog Extensions not found.")}}ll(r,e){var t=this._instance;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},getPersistedProperty:n=>n===wt.LogsQueue?r():void 0,setPersistedProperty(n,i){var s;n===wt.LogsQueue&&e((s=i)!==null&&s!==void 0?s:[])},$t:n=>this.$t(n),getLibraryId:()=>ee.LIB_NAME,getLibraryVersion:()=>ee.LIB_VERSION}}$t(r){return new Promise((e=>{if(Ig(this.Hs,3))e({kind:"fatal",error:new Error("logs endpoint is unreachable, dropping batch")});else{var t=!1,n=s=>{t||(t=!0,clearTimeout(i),e(s))},i=setTimeout((()=>n({kind:"retry-later",error:new Error("logs request timed out")})),9e4);this._instance._send_request({method:"POST",url:this.yl(),data:r,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:s=>{var a=s.statusCode;if(this.bl(a),a>=200&&300>a)n({kind:"ok"});else if(a===413)n({kind:"too-large"});else if(a!==0&&a!==429&&500>a)n({kind:"fatal",error:new Error("logs request failed with status "+a)});else{var o;n({kind:"retry-later",error:(o=s.error)!==null&&o!==void 0?o:new Error("logs request failed with status "+a)})}}})}}))}bl(r){(r!==0||this._instance.__loaded)&&(this.Hs=Cg(r,this.Hs,3,(()=>this.it.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes."))))}ml(r){this.Gr.length>0&&this._l(r,this.Gr,this.cl,ee.LIB_NAME,(e=>{this.Gr=e})),this.il.length>0&&this._l(r,this.il,this.pl,fd,(e=>{this.il=e}))}_l(r,e,t,n,i){if(e.length!==0){var s=e.map((o=>o.record));i([]);var a=Zv(s,Xv(t,ee.LIB_NAME,ee.LIB_VERSION),n,ee.LIB_VERSION);this._instance._send_request({method:"POST",url:this.yl(),data:a,compression:"best-available",batchKey:"logs",transport:r})}}yl(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}ul(){var r,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var t=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.windowId,i=t.sessionStartTimestamp,s=t.lastActivityTimestamp;e.sessionId=t.sessionId,e.windowId=n,W(i)||(e.sessionStartTimestamp=i),W(s)||(e.lastActivityTimestamp=s)}if(B!=null&&(r=B.location)!=null&&r.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?Mt(B.location.href):B.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(e.activeFeatureFlags=a)}return e}}},kb={metrics:class{constructor(r){this.it=ce("[metrics]"),this._instance=r}initialize(){}hl(){var r,e,t=(r=this._instance)==null||(r=r.config)==null?void 0:r.metrics;return this.sl&&this.dl===t||((e=this.sl)==null||e.reset(),this.dl=t,this.sl=new Mm(this.ll(),(function(n){var i,s,a,o,u,c=n==null?void 0:n.resourceAttributes;return{serviceName:(i=c==null?void 0:c["service.name"])!==null&&i!==void 0?i:n==null?void 0:n.serviceName,serviceVersion:(s=c==null?void 0:c["service.version"])!==null&&s!==void 0?s:n==null?void 0:n.serviceVersion,environment:(a=c==null?void 0:c["deployment.environment"])!==null&&a!==void 0?a:n==null?void 0:n.environment,resourceAttributes:c,beforeSend:n==null?void 0:n.beforeSend,flushIntervalMs:(o=n==null?void 0:n.flushIntervalMs)!==null&&o!==void 0?o:1e4,maxSeriesPerFlush:(u=n==null?void 0:n.maxSeriesPerFlush)!==null&&u!==void 0?u:1e3}})(t),this.it)),this.sl}count(r,e,t){e===void 0&&(e=1),this.hl().count(r,e,t)}gauge(r,e,t){this.hl().gauge(r,e,t)}histogram(r,e,t){this.hl().histogram(r,e,t)}flush(r){if(!this.sl)return Promise.resolve();if(r){var e=this.sl.drainWindow();return e&&this.Kt(e,r),Promise.resolve()}return this.sl.flush().catch((t=>this.it.error("PostHog metrics flush failed:",t)))}reset(){var r;(r=this.sl)==null||r.reset()}ll(){var r=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!r.is_capturing()},Kt:t=>e.Kt(t),getLibraryId:()=>ee.LIB_NAME,getLibraryVersion:()=>ee.LIB_VERSION}}Kt(r,e){return new Promise((t=>{var n=!1,i=a=>{n||(n=!0,clearTimeout(s),t(a))},s=setTimeout((()=>i({kind:"retry-later",error:new Error("metrics request timed out")})),9e4);this._instance._send_request(A({method:"POST",url:this.wl(),data:r,compression:"best-available",batchKey:"metrics"},e&&{transport:e},{fireCallbackOnDrop:!0,callback(a){var o=a.statusCode;if(o>=200&&300>o)i({kind:"ok"});else if(o===413)i({kind:"too-large"});else if(o!==0&&o!==429&&500>o)i({kind:"fatal",error:new Error("metrics request failed with status "+o)});else{var u;i({kind:"retry-later",error:(u=a.error)!==null&&u!==void 0?u:new Error("metrics request failed with status "+o)})}}}))}))}wl(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},Ib=A({},hi,mb,yb,bb,wb,xb,Eb,Sb,Ob,Tb,Pb,Rb,kb);We.__defaultExtensionClasses=A({},Ib);var mS=(function(){ee.SDK_DIST_CHANNEL="npm";var r=Zr[hr]=new We;return(function(){function e(){e.done||(e.done=!0,n_=!1,re(Zr,(function(t){t._dom_loaded()})))}D!=null&&D.addEventListener?D.readyState==="complete"?e():fe(D,"DOMContentLoaded",e,{capture:!1}):E&&q.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),r})();function Cb(r){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}const Ab=r=>{switch(r){case"success":return Mb;case"info":return Nb;case"warning":return Lb;case"error":return Db;default:return null}},Fb=Array(12).fill(0),qb=({visible:r,className:e})=>N.createElement("div",{className:["sonner-loading-wrapper",e].filter(
vendor: 6,067 bytes, line 2
2Boolean).join(" "),"data-visible":r},N.createElement("div",{className:"sonner-spinner"},Fb.map((t,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Mb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Lb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Nb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Db=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),jb=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),$b=()=>{const[r,e]=N.useState(document.hidden);return N.useEffect(()=>{const t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),r};let ml=1;class Bb{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...i}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:ml++,a=this.toasts.find(u=>u.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...e,id:s,title:n}),{...u,...e,id:s,dismissible:o,title:n}):u):this.addToast({title:n,...i,dismissible:o,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,a;const o=i.then(async c=>{if(a=["resolve",c],N.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(Ub(c)&&!c.ok){s=!1;const l=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description,p=typeof l=="object"&&!N.isValidElement(l)?l:{message:l};this.create({id:n,type:"error",description:f,...p})}else if(c instanceof Error){s=!1;const l=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description,p=typeof l=="object"&&!N.isValidElement(l)?l:{message:l};this.create({id:n,type:"error",description:f,...p})}else if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description,p=typeof l=="object"&&!N.isValidElement(l)?l:{message:l};this.create({id:n,type:"success",description:f,...p})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){s=!1;const d=typeof t.error=="function"?await t.error(c):t.error,l=typeof t.description=="function"?await t.description(c):t.description,h=typeof d=="object"&&!N.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:l,...h})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),u=()=>new Promise((c,d)=>o.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{const n=(t==null?void 0:t.id)||ml++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ne=new Bb,Hb=(r,e)=>{const t=(e==null?void 0:e.id)||ml++;return Ne.addToast({title:r,...e,id:t}),t},Ub=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",zb=Hb,Gb=()=>Ne.toasts,Vb=()=>Ne.getActiveToasts(),yS=Object.assign(zb,{success:Ne.success,info:Ne.info,warning:Ne.warning,error:Ne.error,custom:Ne.custom,message:Ne.message,promise:Ne.promise,dismiss:Ne.dismiss,loading:Ne.loading},{getHistory:Gb,getToasts:Vb});Cb
vendor: 14,873 bytes, line 2
2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 1,302 bytes, line 2
2On(r){return r.label!==void 0}const Kb=3,Wb="24px",Jb="16px",hd=4e3,Yb=356,Xb=14,Zb=45,Qb=200;function lt(...r){return r.filter(Boolean).join(" ")}function e0(r){const[e,t]=r.split("-"),n=[];return e&&n.push(e),t&&n.push(t),n}const t0=r=>{var e,t,n,i,s,a,o,u,c;const{invert:d,toast:l,unstyled:f,interacting:h,setHeights:p,visibleToasts:v,heights:g,index:_,toasts:m,expanded:b,removeToast:w,defaultRichColors:S,closeButton:O,style:I,cancelButtonStyle:x,actionButtonStyle:P,className:C="",descriptionClassName:R="",duration:M,position:L,gap:y,expandByDefault:T,classNames:k,icons:j,closeButtonAriaLabel:U="Close toast"}=r,[$,ne]=N.useState(null),[H,K]=N.useState(null),[z,X]=N.useState(!1),[Z,V]=N.useState(!1),[ye,se]=N.useState(!1),[_e,we]=N.useState(!1),[he,xe]=N.useState(!1),[vt,Ge]=N.useState(0),[tr,Ce]=N.useState(0),at=N.useRef(l.duration||M||hd),It=N.useRef(null),Be=N.useRef(null),dn=_===0,fn=_+1<=v,Pe=l.type,ot=l.dismissible!==!1,Y_=l.className||"",X_=l.descriptionClassName||"",hn=N.useMemo(()=>g.findIndex(Y=>Y.toastId===l.id)||0,[g,l.id]),Z_=N.useMemo(()=>{var Y;return(Y=l.closeButton)!=null?Y:O},[l.closeButton,O]),tc=N.useMemo(()=>l.duration||M||hd,[l.duration,M]),Si=N.useRef(0),rr=N.useRef(0),rc=N.useRef(0),nr=N.useRef(null),[Q_,em]=L.split("-"),nc=N.useMemo(()=>g.reduce((Y,Se,Re)=>
vendor: 5,381 bytes, line 2
2Re>=hn?Y:Y+Se.height,0),[g,hn]),ic=$b(),tm=l.invert||d,Ei=Pe==="loading";rr.current=N.useMemo(()=>hn*y+nc,[hn,nc]),N.useEffect(()=>{at.current=tc},[tc]),N.useEffect(()=>{X(!0)},[]),N.useEffect(()=>{const Y=Be.current;if(Y){const Se=Y.getBoundingClientRect().height;return Ce(Se),p(Re=>[{toastId:l.id,height:Se,position:l.position},...Re]),()=>p(Re=>Re.filter(He=>He.toastId!==l.id))}},[p,l.id]),N.useLayoutEffect(()=>{if(!z)return;const Y=Be.current,Se=Y.style.height;Y.style.height="auto";const Re=Y.getBoundingClientRect().height;Y.style.height=Se,Ce(Re),p(He=>He.find(Ee=>Ee.toastId===l.id)?He.map(Ee=>Ee.toastId===l.id?{...Ee,height:Re}:Ee):[{toastId:l.id,height:Re,position:l.position},...He])},[z,l.title,l.description,p,l.id,l.jsx,l.action,l.cancel]);const Ct=N.useCallback(()=>{V(!0),Ge(rr.current),p(Y=>Y.filter(Se=>Se.toastId!==l.id)),setTimeout(()=>{w(l)},Qb)},[l,w,p,rr]);N.useEffect(()=>{if(l.promise&&Pe==="loading"||l.duration===1/0||l.type==="loading")return;let Y;return b||h||ic?(()=>{if(rc.current<Si.current){const He=new Date().getTime()-Si.current;at.current=at.current-He}rc.current=new Date().getTime()})():(()=>{at.current!==1/0&&(Si.current=new Date().getTime(),Y=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),Ct()},at.current))})(),()=>clearTimeout(Y)},[b,h,l,Pe,ic,Ct]),N.useEffect(()=>{l.delete&&(Ct(),l.onDismiss==null||l.onDismiss.call(l,l))},[Ct,l.delete]);function rm(){var Y;if(j!=null&&j.loading){var Se;return N.createElement("div",{className:lt(k==null?void 0:k.loader,l==null||(Se=l.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":Pe==="loading"},j.loading)}return N.createElement(qb,{className:lt(k==null?void 0:k.loader,l==null||(Y=l.classNames)==null?void 0:Y.loader),visible:Pe==="loading"})}const nm=l.icon||(j==null?void 0:j[Pe])||Ab(Pe);var sc,ac;return N.createElement("li",{tabIndex:0,ref:Be,className:lt(C,Y_,k==null?void 0:k.toast,l==null||(e=l.classNames)==null?void 0:e.toast,k==null?void 0:k.default,k==null?void 0:k[Pe],l==null||(t=l.classNames)==null?void 0:t[Pe]),"data-sonner-toast":"","data-rich-colors":(sc=l.richColors)!=null?sc:S,"data-styled":!(l.jsx||l.unstyled||f),"data-mounted":z,"data-promise":!!l.promise,"data-swiped":he,"data-removed":Z,"data-visible":fn,"data-y-position":Q_,"data-x-position":em,"data-index":_,"data-front":dn,"data-swiping":ye,"data-dismissible":ot,"data-type":Pe,"data-invert":tm,"data-swipe-out":_e,"data-swipe-direction":H,"data-expanded":!!(b||T&&z),style:{"--index":_,"--toasts-before":_,"--z-index":m.length-_,"--offset":`${Z?vt:rr.current}px`,"--initial-height":T?"auto":`${tr}px`,...I,...l.style},onDragEnd:()=>{se(!1),ne(null),nr.current=null},onPointerDown:Y=>{Ei||!ot||(It.current=new Date,Ge(rr.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(se(!0),nr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Se,Re;if(_e||!ot)return;nr.current=null;const He=Number(((Y=Be.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pn=Number(((Se=Be.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ee=new Date().getTime()-((Re=It.current)==null?void 0:Re.getTime()),Ve=$==="x"?He:pn,vn=Math.abs(Ve)/Ee;if(Math.abs(Ve)>=Zb||vn>.11){Ge(rr.current),l.onDismiss==null||l.onDismiss.call(l,l),K($==="x"?He>0?"right":"left":pn>0?"down":"up"),Ct(),we(!0);return}else{var Ye,Xe;(Ye=Be.current)==null||Ye.style.setProperty("--swipe-amount-x","0px"),(Xe=Be.current)==null||Xe.style.setProperty("--swipe-amount-y","0px")}xe(!1),se(!1),ne(null)},onPointerMove:Y=>{var Se,Re,He;if(!nr.current||!ot||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;const Ee=Y.clientY-nr.current.y,Ve=Y.clientX-nr.current.x;var vn;const Ye=(vn=r.swipeDirections)!=null?vn:e0(L);!$&&(Math.abs(Ve)>1||Math.abs(Ee)>1)&&ne(Math.abs(Ve)>Math.abs(Ee)?"x":"y");let Xe={x:0,y:0};const oc=$t=>1/(1.5+Math.abs($t)/20);if($==="y"){if(Ye.includes("top")||Ye.includes("bottom"))if(Ye.includes("top")&&Ee<0||Ye.includes("bottom")&&Ee>0)Xe.y=Ee;else{const $t=Ee*oc(Ee);Xe.y=Math.abs($t)<Math.abs(Ee)?$t:Ee}}else if($==="x"&&(Ye.includes("left")||Ye.includes("right")))if(Ye.includes("left")&&Ve<0||Ye.includes("right")&&Ve>0)Xe.x=Ve;else{const $t=Ve*oc(Ve);Xe.x=Math.abs($t)<Math.abs(Ve)?$t:Ve}(Math.abs(Xe.x)>0||Math.abs(Xe.y)>0)&&xe(!0),(Re=Be.current)==null||Re.style.setProperty("--swipe-amount-x",`${Xe.x}px`),(He=Be.current)==null||He.style.setProperty("--swipe-amount-y",`${Xe.y}px`)}},Z_&&!l.jsx&&Pe!=="loading"?N.createElement("button",{"aria-label":U,"data-disabled":Ei,"data-close-button":!0,onClick:Ei||!ot?()=>{}:()=>{Ct(),l.onDismiss==null||l.onDismiss.call(l,l)},className:lt(k==null?void 0:k.closeButton,l==null||(n=l.classNames)==null?void 0:n.closeButton)},(ac=j==null?void 0:j.close)!=null?ac:jb):null,(Pe||l.icon||l.promise)&&l.icon!==null&&((j==null?void 0:j[Pe])!==null||l.icon)?N.createElement("div",{"data-icon":"",className:lt(k==null?void 0:k.icon,l==null||(i=l.classNames)==null?void 0:i.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||rm():null,l.type!=="loading"?nm:null):null,N.createElement("div",{"data-content":"",className:lt(k==null?void 0:k.content,l==null||(s=l.classNames)==null?void 0:s.content)},N.createElement("div",{"data-title":"",className:lt(k==null?void 0:k.title,l==null||(a=l.classNames)==null?void 0:a.title)}
2,l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?N.createElement("div",{"data-description":"",className:lt(R,X_,k==null?void 0:k.description,l==null||(o=l.classNames)==null?void 0:o.description)},typeof l.description=="function"?l.description():l.description):null),N.isValidElement(l.cancel)?l.cancel:l.cancel&&On(l.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||x,onClick:Y=>{On(l.cancel)&&ot&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,Y),Ct())},className:lt(k==null?void 0:k.cancelButton,l==null||(u=l.classNames)==null?void 0:u.cancelButton)},l.cancel.label):null,N.isValidElement(l.action)?l.action:l.action&&On(l.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||P,onClick:Y=>{On(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,Y),!Y.defaultPrevented&&Ct())},className:lt(k==null?void 0:k.actionButton,l==null||(c=l.classNames)==null?void 0:c.actionButton)},l.action.label):null)};function pd(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function r0(r,e){const t={};return[r,e].forEach((n,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",o=s?Jb:Wb;function u(c){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?u(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?t[`${a}-${c}`]=o:t[`${a}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):u(o)}),t}const bS=N.forwardRef(function(e,t){const{invert:n,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:o,className:u,offset:c,mobileOffset:d,theme:l="light",richColors:f,duration:h,style:p,visibleToasts:v=Kb,toastOptions:g,dir:_=pd(),gap:m=Xb,icons:b,containerAriaLabel:w="Notifications"}=e,[S,O]=N.useState([]),I=N.useMemo(()=>Array.from(new Set([i].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,i]),[x,P]=N.useState([]),[C,R]=N.useState(!1),[M,L]=N.useState(!1),[y,T]=N.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=N.useRef(null),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=N.useRef(null),$=N.useRef(!1),ne=N.useCallback(H=>{O(K=>{var z;return(z=K.find(X=>X.id===H.id))!=null&&z.delete||Ne.dismiss(H.id),K.filter(({id:X})=>X!==H.id)})},[]);return N.useEffect(()=>Ne.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{O(K=>K.map(z=>z.id===H.id?{...z,delete:!0}:z))});return}setTimeout(()=>{im.flushSync(()=>{O(K=>{const z=K.findIndex(X=>X.id===H.id);return z!==-1?[...K.slice(0,z),{...K[z],...H},...K.slice(z+1)]:[H,...K]})})})}),[S]),N.useEffect(()=>{if(l!=="system"){T(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?T("dark"):T("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:K})=>{T(K?"dark":"light")})}catch{H.addListener(({matches:z})=>{try{T(z?"dark":"light")}catch(X){console.error(X)}})}},[l]),N.useEffect(()=>{S.length<=1&&R(!1)},[S]),N.useEffect(()=>{const H=K=>{var z;if(s.every(V=>K[V]||K.code===V)){var Z;R(!0),(Z=k.current)==null||Z.focus()}K.code==="Escape"&&(document.activeElement===k.current||(z=k.current)!=null&&z.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),N.useEffect(()=>{if(k.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,$.current=!1)}},[k.current]),N.createElement("section",{ref:t,"aria-label":`${w} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((H,K)=>{var z;const[X,Z]=H.split("-");return S.length?N.createElement("ol",{key:H,dir:_==="auto"?pd():_,tabIndex:-1,ref:k,className:u,"data-sonner-toaster":!0,"data-sonner-theme":y,"data-y-position":X,"data-x-position":Z,style:{"--front-toast-height":`${((z=x[0])==null?void 0:z.height)||0}px`,"--width":`${Yb}px`,"--gap":`${m}px`,...p,...r0(c,d)},onBlur:V=>{$.current&&!V.currentTarget.contains(V.relatedTarget)&&($.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||$.current||($.current=!0,U.current=V.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{M||R(!1)},onDragEnd:()=>R(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},S.filter(V=>!V.position&&K===0||V.position===H).map((V,ye)=>{var se,_e;return N.createElement(t0,{key:V.id,icons:b,index:ye,toast:V,defaultRichColors:f,duration:(se=g==null?void 0:g.duration)!=null?se:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(_e=g==null?void 0:g.closeButton)!=null?_e:o,interacting:M,position:H,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:ne,toasts:S.filter(we=>we.position==V.position),heights:x.filter(we=>we.position==V.position),setHeights:P,expandByDefault:a,gap:m,expanded:C,swipeDirections:e.swipeDirections})})):null}))});function i_(r,e){if(r==null)return{};var t,n,i=sm(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}var es,vd;function n0(){return vd||(vd=1,es={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),es}var i0=n0();const s0=oe(i0);var a0=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function gd(r){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=r.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(s0[t[1]]||r.charAt(r.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=r.indexOf("-->");return{type:"comment",comment:n!==-1?r.slice(4,n):""}}for(var i=new RegExp(a0),s=null;(s=i.exec(r))!==null;)if(s[0].trim())if(s[1]){var a=s[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],i.lastIndex--}else s[2]&&(e.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return e}var o0=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,u0=/^\s*$/,l0=Object.create(null);function s_(r,e){switch(e.type){case"text":return r+e.content;case"tag":return r+="<"+e.name+(e.attrs?(function(t){var n=[];for(var i in t)n.push(i+'="'+t[i]+'"');return n.length?" "+n.join(" "):""})(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?r:r+e.children.reduce(s_,"")+"</"+e.name+">";
2case"comment":return r+"<!--"+e.comment+"-->"}}var c0={parse:function(r,e){e||(e={}),e.components||(e.components=l0);var t,n=[],i=[],s=-1,a=!1;if(r.indexOf("<")!==0){var o=r.indexOf("<");n.push({type:"text",content:o===-1?r:r.substring(0,o)})}return r.replace(o0,function(u,c){if(a){if(u!=="</"+t.name+">")return;a=!1}var d,l=u.charAt(1)!=="/",f=u.startsWith("<!--"),h=c+u.length,p=r.charAt(h);if(f){var v=gd(u);return s<0?(n.push(v),n):((d=i[s]).children.push(v),n)}if(l&&(s++,(t=gd(u)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!p||p==="<"||t.children.push({type:"text",content:r.slice(h,r.indexOf("<",h))}),s===0&&n.push(t),(d=i[s-1])&&d.children.push(t),i[s]=t),(!l||t.voidElement)&&(s>-1&&(t.voidElement||t.name===u.slice(2,-1))&&(s--,t=s===-1?n:i[s]),!a&&p!=="<"&&p)){d=s===-1?n:i[s].children;var g=r.indexOf("<",h),_=r.slice(h,g===-1?void 0:g);u0.test(_)&&(_=" "),(g>-1&&s+d.length>=0||_!==" ")&&d.push({type:"text",content:_})}}),n},stringify:function(r){return r.reduce(function(e,t){return e+s_("",t)},"")}};function it(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function _d(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,am(n.key),n)}}function st(r,e,t){return e&&_d(r.prototype,e),t&&_d(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}var d0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f0={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},h0=function(e){return f0[e]},p0=function(e){return e.replace(d0,h0)};function md(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function yd(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?md(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):md(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var yl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:p0},a_,o_=pe.createContext();function v0(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yl=yd(yd({},yl),r)}function u_(){return yl}var g0=(function(){function r(){it(this,r),this.usedNamespaces={}}return st(r,[{key:"addUsedNamespaces",value:function(t){var n=this;t.forEach(function(i){n.usedNamespaces[i]||(n.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),r})();function _0(r){a_=r}function l_(){return a_}var wS={type:"3rdParty",init:function(e){v0(e.options.react),_0(e)}};function Ln(){if(console&&console.warn){for(var r,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]="react-i18next:: ".concat(t[0])),(r=console).warn.apply(r,t)}}var bd={};function ai(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];typeof e[0]=="string"&&bd[e[0]]||(typeof e[0]=="string"&&(bd[e[0]]=new Date),Ln.apply(void 0,e))}function wd(r,e,t){r.loadNamespaces(e,function(){if(r.isInitialized)t();else{var n=function i(){setTimeout(function(){r.off("initialized",i)},0),t()};r.on("initialized",n)}})}function m0(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(u,c){var d=e.services.backendConnector.state["".concat(u,"|").concat(c)];return d===-1||d===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,r)?!1:!!(e.hasResourceBundle(n,r)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(n,r)&&(!i||a(s,r)))}function y0(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
2if(!e.languages||!e.languages.length)return ai("i18n.languages were undefined or empty",e.languages),!0;var n=e.options.ignoreJSONStructure!==void 0;return n?e.hasLoadedNamespace(r,{precheck:function(s,a){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}):m0(r,e,t)}var b0=["format"],w0=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function xd(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function be(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xd(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xd(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ts(r,e){if(!r)return!1;var t=r.props?r.props.children:r.children;return e?t.length>0:!!t}function rs(r){return r?r.props?r.props.children:r.children:[]}function x0(r){return Object.prototype.toString.call(r)!=="[object Array]"?!1:r.every(function(e){return pe.isValidElement(e)})}function Ur(r){return Array.isArray(r)?r:[r]}function S0(r,e){var t=be({},e);return t.props=Object.assign(r.props,e.props),t}function c_(r,e){if(!r)return"";var t="",n=Ur(r),i=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return n.forEach(function(s,a){if(typeof s=="string")t+="".concat(s);else if(pe.isValidElement(s)){var o=Object.keys(s.props).length,u=i.indexOf(s.type)>-1,c=s.props.children;if(!c&&u&&o===0)t+="<".concat(s.type,"/>");else if(!c&&(!u||o!==0))t+="<".concat(a,"></").concat(a,">");else if(s.props.i18nIsDynamicList)t+="<".concat(a,"></").concat(a,">");else if(u&&o===1&&typeof c=="string")t+="<".concat(s.type,">").concat(c,"</").concat(s.type,">");else{var d=c_(c,e);t+="<".concat(a,">").concat(d,"</").concat(a,">")}}else if(s===null)Ln("Trans: the passed in value is invalid - seems you passed in a null child.");else if(tt(s)==="object"){var l=s.format,f=i_(s,b0),h=Object.keys(f);if(h.length===1){var p=l?"".concat(h[0],", ").concat(l):h[0];t+="{{".concat(p,"}}")}else Ln("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",s)}else Ln("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",s)}),t}function E0(r,e,t,n,i,s){if(e==="")return[];var a=n.transKeepBasicHtmlNodesFor||[],o=e&&new RegExp(a.join("|")).test(e);if(!r&&!o)return[e];var u={};function c(g){var _=Ur(g);_.forEach(function(m){typeof m!="string"&&(ts(m)?c(rs(m)):tt(m)==="object"&&!pe.isValidElement(m)&&Object.assign(u,m))})}c(r);var d=c0.parse("<0>".concat(e,"</0>")),l=be(be({},u),i);function f(g,_,m){var b=rs(g),w=p(b,_.children,m);return x0(b)&&w.length===0?b:w}function h(g,_,m,b,w){g.dummy&&(g.children=_),m.push(pe.cloneElement(g,be(be({},g.props),{},{key:b}),w?void 0:_))}function p(g,_,m){var b=Ur(g),w=Ur(_);return w.reduce(function(S,O,I){var x=O.children&&O.children[0]&&O.children[0].content&&t.services.interpolator.interpolate(O.children[0].content,l,t.language);if(O.type==="tag"){var P=b[parseInt(O.name,10)];!P&&m.length===1&&m[0][O.name]&&(P=m[0][O.name]),P||(P={});var C=Object.keys(O.attrs).length!==0?S0({props:O.attrs},P):P,R=pe.isValidElement(C),M=R&&ts(O,!0)&&!O.voidElement,L=o&&tt(C)==="object"&&C.dummy&&!R,y=tt(r)==="object"&&r!==null&&Object.hasOwnProperty.call(r,O.name);if(typeof C=="string"){var T=t.services.interpolator.interpolate(C,l,t.language);S.push(T)}else if(ts(C)||M){var k=f(C,O,m);h(C,k,S,I)}else if(L){var j=p(b,O.children,m);S.push(pe.cloneElement(C,be(be({},C.props),{},{key:I}),j))}else if(Number.isNaN(parseFloat(O.name)))if(y){var U=f(C,O,m);h(C,U,S,I,O.voidElement)}else if(n.transSupportBasicHtmlNodes&&a.indexOf(O.name)>-1)if(O.voidElement)S.push(pe.createElement(O.name,{key:"".concat(O.name,"-").concat(I
2)}));else{var $=p(b,O.children,m);S.push(pe.createElement(O.name,{key:"".concat(O.name,"-").concat(I)},$))}else if(O.voidElement)S.push("<".concat(O.name," />"));else{var ne=p(b,O.children,m);S.push("<".concat(O.name,">").concat(ne,"</").concat(O.name,">"))}else if(tt(C)==="object"&&!R){var H=O.children[0]?x:null;H&&S.push(H)}else O.children.length===1&&x?S.push(pe.cloneElement(C,be(be({},C.props),{},{key:I}),x)):S.push(pe.cloneElement(C,be(be({},C.props),{},{key:I})))}else if(O.type==="text"){var K=n.transWrapTextNodes,z=s?n.unescape(t.services.interpolator.interpolate(O.content,l,t.language)):t.services.interpolator.interpolate(O.content,l,t.language);K?S.push(pe.createElement(K,{key:"".concat(O.name,"-").concat(I)},z)):S.push(z)}return S},[])}var v=p([{dummy:!0,children:r||[]}],d,Ur(r||[]));return rs(v[0])}function xS(r){var e=r.children,t=r.count,n=r.parent,i=r.i18nKey,s=r.context,a=r.tOptions,o=a===void 0?{}:a,u=r.values,c=r.defaults,d=r.components,l=r.ns,f=r.i18n,h=r.t,p=r.shouldUnescape,v=i_(r,w0),g=pe.useContext(o_)||{},_=g.i18n,m=g.defaultNS,b=f||_||l_();if(!b)return ai("You will need to pass in an i18next instance by using i18nextReactModule"),e;var w=h||b.t.bind(b)||function(T){return T};s&&(o.context=s);var S=be(be({},u_()),b.options&&b.options.react),O=l||w.ns||m||b.options&&b.options.defaultNS;O=typeof O=="string"?[O]:O||["translation"];var I=c||c_(e,S)||S.transEmptyNodeValue||i,x=S.hashTransKey,P=i||(x?x(I):I),C=u?o.interpolation:{interpolation:be(be({},o.interpolation),{},{prefix:"#$?",suffix:"?$#"})},R=be(be(be(be({},o),{},{count:t},u),C),{},{defaultValue:I,ns:O}),M=P?w(P,R):I,L=E0(d||e,M,b,S,R,p),y=n!==void 0?n:S.defaultTransParent;return y?pe.createElement(y,v,L):L}function d_(r){if(Array.isArray(r))return r}function O0(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,o=[],u=!0,c=!1;try{if(s=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=s.call(t)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(d){c=!0,i=d}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function Sd(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function f_(r,e){if(r){if(typeof r=="string")return Sd(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Sd(r,e):void 0}}function h_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T0(r,e){return d_(r)||O0(r,e)||f_(r,e)||h_()}function Ed(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ns(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ed(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ed(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var P0=function(e,t){var n=pe.useRef();return pe.useEffect(function(){n.current=e},[e,t]),n.current};function SS(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.i18n,n=pe.useContext(o_)||{},i=n.i18n,s=n.defaultNS,a=t||i||l_();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new g0),!a){ai("You will need to pass in an i18next instance by using initReactI18next");var o=function(P){return Array.isArray(P)?P[P.length-1]:P},u=[o,{},!1];return u.t=o,u.i18n={},u.ready=!1,u}a.options.react&&a.options.react.wait!==void 0&&ai("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=ns(ns(ns({},u_()),a.options.react),e),d=c.useSuspense,l=c.keyPrefix,f=s||a.options&&a.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var h=(a.isInitialized||a.initializedStoreOnce)&&f.every(function(x){return y0(x,a,c)});function p(){return a.getFixedT(null,c.nsMode==="fallback"?f:f[0],l)}var v=pe.useState(p),g=T0(v,2),_=g[0],m=g[1],b=f.join(),w=P0(b),S=pe.useRef(!0);pe.useEffect(function(){var x=c.bindI18n,P=c.bindI18nStore;S.current=!0,!h&&!d&&wd(a,f,function(){S.current&&m(p)}),h&&w&&w!==b&&S.current&&m(p);function C(){S.current&&m(p)}return x&&a&&a.on(x,C),P&&a&&a.store.on(P,C),function(){S.current=!1,x&&a&&x.split(" ").forEach(function(R){return a.off(R,C)}),P&&a&&P.split(" ").forEach(function(R){return a.store.off(R,C)})}},[a,b]);var O=pe.useRef(!0);pe.useEffect(function(){S.current&&!O.current&&m(p),O.current=!1},[a,l]);var I=[_,a,h];if(I.t=_,I.i18n=a,I.ready=h,h||!h&&!d)return I;throw new Promise(function(x){wd(a,f,function(){x()})})}var is,Od;function je(){if(Od)return is;Od=1;var r=Array.isArray;return is=r,is}var ss,Td;function p_(){if(Td)return ss;Td=1;var r=typeof Yt=="object"&&Yt&&Yt.Object===Object&&Yt;return ss=r,ss}var as,Pd;function pt(){if(Pd)return as;Pd=1;var r=p_(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=r||e||Function("return this")();return as=t,as}var os,Rd;function un(){if(Rd)return os;Rd=1;var r=pt(),e=r.Symbol;return os=e,os}var us,kd;function R0(){if(kd)return us;kd=1;var r=un(),e=Object.prototype,t=e.hasOwnProperty,n=e.toString,i=r?r.toStringTag:void 0;function s(a){var o=t.call(a,i),u=a[i];try{a[i]=void 0;var c=!0}catch{}var d=n.call(a);return c&&(o?a[i]=u:delete a[i]),d}return us=s,us}var ls,Id;function k0(){if(Id)return ls;Id=1;var r=Object.prototype,e=r.toString;function t(n){return e.call(n)}return ls=t,ls}var cs,Cd;function Rt(){if(Cd)return cs;Cd=1;
vendor: 7,095 bytes, line 3
3var r=un(),e=R0(),t=k0(),n="[object Null]",i="[object Undefined]",s=r?r.toStringTag:void 0;function a(o){return o==null?o===void 0?i:n:s&&s in Object(o)?e(o):t(o)}return cs=a,cs}var ds,Ad;function kt(){if(Ad)return ds;Ad=1;function r(e){return e!=null&&typeof e=="object"}return ds=r,ds}var fs,Fd;function Er(){if(Fd)return fs;Fd=1;var r=Rt(),e=kt(),t="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&r(i)==t}return fs=n,fs}var hs,qd;function Bl(){if(qd)return hs;qd=1;var r=je(),e=Er(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(s,a){if(r(s))return!1;var o=typeof s;return o=="number"||o=="symbol"||o=="boolean"||s==null||e(s)?!0:n.test(s)||!t.test(s)||a!=null&&s in Object(a)}return hs=i,hs}var ps,Md;function Dt(){if(Md)return ps;Md=1;function r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return ps=r,ps}var vs,Ld;function Hl(){if(Ld)return vs;Ld=1;var r=Rt(),e=Dt(),t="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function a(o){if(!e(o))return!1;var u=r(o);return u==n||u==i||u==t||u==s}return vs=a,vs}var gs,Nd;function I0(){if(Nd)return gs;Nd=1;var r=pt(),e=r["__core-js_shared__"];return gs=e,gs}var _s,Dd;function C0(){if(Dd)return _s;Dd=1;var r=I0(),e=(function(){var n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function t(n){return!!e&&e in n}return _s=t,_s}var ms,jd;function v_(){if(jd)return ms;jd=1;var r=Function.prototype,e=r.toString;function t(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return ms=t,ms}var ys,$d;function A0(){if($d)return ys;$d=1;var r=Hl(),e=C0(),t=Dt(),n=v_(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,u=a.toString,c=o.hasOwnProperty,d=RegExp("^"+u.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(f){if(!t(f)||e(f))return!1;var h=r(f)?d:s;return h.test(n(f))}return ys=l,ys}var bs,Bd;function F0(){if(Bd)return bs;Bd=1;function r(e,t){return e==null?void 0:e[t]}return bs=r,bs}var ws,Hd;function er(){if(Hd)return ws;Hd=1;var r=A0(),e=F0();function t(n,i){var s=e(n,i);return r(s)?s:void 0}return ws=t,ws}var xs,Ud;function pi(){if(Ud)return xs;Ud=1;var r=er(),e=r(Object,"create");return xs=e,xs}var Ss,zd;function q0(){if(zd)return Ss;zd=1;var r=pi();function e(){this.__data__=r?r(null):{},this.size=0}return Ss=e,Ss}var Es,Gd;function M0(){if(Gd)return Es;Gd=1;function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return Es=r,Es}var Os,Vd;function L0(){if(Vd)return Os;Vd=1;var r=pi(),e="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function i(s){var a=this.__data__;if(r){var o=a[s];return o===e?void 0:o}return n.call(a,s)?a[s]:void 0}return Os=i,Os}var Ts,Kd;function N0(){if(Kd)return Ts;Kd=1;var r=pi(),e=Object.prototype,t=e.hasOwnProperty;function n(i){var s=this.__data__;return r?s[i]!==void 0:t.call(s,i)}return Ts=n,Ts}var Ps,Wd;function D0(){if(Wd)return Ps;Wd=1;var r=pi(),e="__lodash_hash_undefined__";function t(n,i){var s=this.__data__;return this.size+=this.has(n)?0:1,s[n]=r&&i===void 0?e:i,this}return Ps=t,Ps}var Rs,Jd;function j0(){if(Jd)return Rs;Jd=1;var r=q0(),e=M0(),t=L0(),n=N0(),i=D0();function s(a){var o=-1,u=a==null?0:a.length;for(this.clear();++o<u;){var c=a[o];this.set(c[0],c[1])}}return s.prototype.clear=r,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=n,s.prototype.set=i,Rs=s,Rs}var ks,Yd;function $0(){if(Yd)return ks;Yd=1;function r(){this.__data__=[],this.size=0}return ks=r,ks}var Is,Xd;function Ul(){if(Xd)return Is;Xd=1;function r(e,t){return e===t||e!==e&&t!==t}return Is=r,Is}var Cs,Zd;function vi(){if(Zd)return Cs;Zd=1;var r=Ul();function e(t,n){for(var i=t.length;i--;)if(r(t[i][0],n))return i;return-1}return Cs=e,Cs}var As,Qd;function B0(){if(Qd)return As;Qd=1;var r=vi(),e=Array.prototype,t=e.splice;function n(i){var s=this.__data__,a=r(s,i);if(a<0)return!1;var o=s.length-1;return a==o?s.pop():t.call(s,a,1),--this.size,!0}return As=n,As}var Fs,ef;function H0(){if(ef)return Fs;ef=1;var r=vi();function e(t){var n=this.__data__,i=r(n,t);return i<0?void 0:n[i][1]}return Fs=e,Fs}var qs,tf;function U0(){if(tf)return qs;tf=1;var r=vi();function e(t){return r(this.__data__,t)>-1}return qs=e,qs}var Ms,rf;function z0(){if(rf)return Ms;rf=1;var r=vi();function e(t,n){var i=this.__data__,s=r(i,t);return s<0?(++this.size,i.push([t,n])):i[s][1]=n,this}return Ms=e,Ms}var Ls,nf;function gi(){if(nf)return Ls;nf=1;var r=$0(),e=B0(),t=H0(),n=U0(),i=z0();function s(a){var o=-1,u=a==null?0:a.length;for(this.clear();++o<u;){var c=a[o];this.set(c[0],c[1])}}return s.prototype.clear=r,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=n,s.prototype.set=i,Ls=s,Ls}var Ns,sf;function zl(){if(sf)return Ns;sf=1;var r=er(),e=pt(),t=r(e,"Map");return Ns=t,Ns}var Ds,af;function G0(){if(af)return Ds;af=1;var r=j0(),e=gi(),t=zl();function n(){this.size=0,this.__data__={hash:new r,map:new(t||e),string:new r}}return Ds=n,Ds}var js,of;function V0(){if(of)return js;of=1;function r(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return js=r,js}var $s,uf;function _i(){if(uf)return $s;uf=1;var r=V0();function e(t,n){var i=t.__data__;return r(n)?i[typeof n=="string"?"string":"hash"]:i.map}return $s=e,$s}var Bs,lf;function K0(){if(lf)return Bs;lf=1;var r=_i();function e(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}return Bs=e,Bs}var Hs,cf;function W0(){if(cf)return Hs;cf=1;var r=_i();function e(t){return r(this,t).get(t)}return Hs=e,Hs}var Us,df;function J0(){if(df)return Us;df=1;var r=_i();function e(t){return r(this,t).has(t)}return Us=e,Us}var zs,ff;function Y0(){if(ff)return zs;ff=1;var r=_i();function e(t,n){var i=r(this,t),s=i.size;return i.set(t,n),this.size+=i.size==s?0:1,this}return zs=e,zs}var Gs,hf;function Gl(){if(hf)return Gs;hf=1;var r=G0(),e=K0(),t=W0(),n=J0(),i=Y0();function s(a){var o=-1,u=a==null?0:a.length;for(this.clear();++o<u;){var c=a[o];this.set(c[0],c[1])}}return s.prototype.clear=r,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=n,s.prototype.set=i,Gs=s,Gs}var Vs,pf;function g_(){if(pf)return Vs;pf=1;var r=Gl(),e="Expected a function";function t(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var s=function(){var a=arguments,o=i?i.apply(this,a):a[0],u=s.cache;if(u.has(o))return u.get(o);var c=n.apply(this,a);return s.cache=u.set(o,c)||u,c};return s.cache=new(t.Cache||r),s}return t.Cache=r,Vs=t,Vs}var Ks,vf;function X0(){if(vf)return Ks;vf=1;var r=g_(),e=500;function t(n){var i=r(n,function(a){return s.size===e&&s.clear(),a}),s=i.cache;return i}return Ks=t,Ks}var Ws,gf;function Z0(){if(gf)return Ws;gf=1;var r=X0(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t=/\\(\\)?/g,n=r(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(e,function(a,o,u,c){s.push(u?c.replace(t,"$1"):o||a)}),s});return Ws=n,Ws}var Js,_f;
vendor: 8,952 bytes, line 3
3function Vl(){if(_f)return Js;_f=1;function r(e,t){for(var n=-1,i=e==null?0:e.length,s=Array(i);++n<i;)s[n]=t(e[n],n,e);return s}return Js=r,Js}var Ys,mf;function Q0(){if(mf)return Ys;mf=1;var r=un(),e=Vl(),t=je(),n=Er(),i=r?r.prototype:void 0,s=i?i.toString:void 0;function a(o){if(typeof o=="string")return o;if(t(o))return e(o,a)+"";if(n(o))return s?s.call(o):"";var u=o+"";return u=="0"&&1/o==-1/0?"-0":u}return Ys=a,Ys}var Xs,yf;function __(){if(yf)return Xs;yf=1;var r=Q0();function e(t){return t==null?"":r(t)}return Xs=e,Xs}var Zs,bf;function m_(){if(bf)return Zs;bf=1;var r=je(),e=Bl(),t=Z0(),n=__();function i(s,a){return r(s)?s:e(s,a)?[s]:t(n(s))}return Zs=i,Zs}var Qs,wf;function mi(){if(wf)return Qs;wf=1;var r=Er();function e(t){if(typeof t=="string"||r(t))return t;var n=t+"";return n=="0"&&1/t==-1/0?"-0":n}return Qs=e,Qs}var ea,xf;function Kl(){if(xf)return ea;xf=1;var r=m_(),e=mi();function t(n,i){i=r(i,n);for(var s=0,a=i.length;n!=null&&s<a;)n=n[e(i[s++])];return s&&s==a?n:void 0}return ea=t,ea}var ta,Sf;function y_(){if(Sf)return ta;Sf=1;var r=Kl();function e(t,n,i){var s=t==null?void 0:r(t,n);return s===void 0?i:s}return ta=e,ta}var ew=y_();const ES=oe(ew);var ra,Ef;function tw(){if(Ef)return ra;Ef=1;function r(e){return e==null}return ra=r,ra}var rw=tw();const OS=oe(rw);var na,Of;function nw(){if(Of)return na;Of=1;var r=Rt(),e=je(),t=kt(),n="[object String]";function i(s){return typeof s=="string"||!e(s)&&t(s)&&r(s)==n}return na=i,na}var iw=nw();const TS=oe(iw);var sw=Hl();const PS=oe(sw);var aw=Dt();const RS=oe(aw);var ia,Tf;function b_(){if(Tf)return ia;Tf=1;var r=Rt(),e=kt(),t="[object Number]";function n(i){return typeof i=="number"||e(i)&&r(i)==t}return ia=n,ia}var sa,Pf;function ow(){if(Pf)return sa;Pf=1;var r=b_();function e(t){return r(t)&&t!=+t}return sa=e,sa}var uw=ow();const kS=oe(uw);var lw=b_();const IS=oe(lw);var aa,Rf;function cw(){if(Rf)return aa;Rf=1;function r(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++i<s;)a[i]=e[i+t];return a}return aa=r,aa}var oa,kf;function dw(){if(kf)return oa;kf=1;var r=cw();function e(t,n,i){var s=t.length;return i=i===void 0?s:i,!n&&i>=s?t:r(t,n,i)}return oa=e,oa}var ua,If;function w_(){if(If)return ua;If=1;var r="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+t+n,s="\\ufe0e\\ufe0f",a="\\u200d",o=RegExp("["+a+r+i+s+"]");function u(c){return o.test(c)}return ua=u,ua}var la,Cf;function fw(){if(Cf)return la;Cf=1;function r(e){return e.split("")}return la=r,la}var ca,Af;function hw(){if(Af)return ca;Af=1;var r="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+t+n,s="\\ufe0e\\ufe0f",a="["+r+"]",o="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",c="(?:"+o+"|"+u+")",d="[^"+r+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",p=c+"?",v="["+s+"]?",g="(?:"+h+"(?:"+[d,l,f].join("|")+")"+v+p+")*",_=v+p+g,m="(?:"+[d+o+"?",o,l,f,a].join("|")+")",b=RegExp(u+"(?="+u+")|"+m+_,"g");function w(S){return S.match(b)||[]}return ca=w,ca}var da,Ff;function pw(){if(Ff)return da;Ff=1;var r=fw(),e=w_(),t=hw();function n(i){return e(i)?t(i):r(i)}return da=n,da}var fa,qf;function vw(){if(qf)return fa;qf=1;var r=dw(),e=w_(),t=pw(),n=__();function i(s){return function(a){a=n(a);var o=e(a)?t(a):void 0,u=o?o[0]:a.charAt(0),c=o?r(o,1).join(""):a.slice(1);return u[s]()+c}}return fa=i,fa}var ha,Mf;function gw(){if(Mf)return ha;Mf=1;var r=vw(),e=r("toUpperCase");return ha=e,ha}var _w=gw();const CS=oe(_w);var pa,Lf;function mw(){if(Lf)return pa;Lf=1;var r=gi();function e(){this.__data__=new r,this.size=0}return pa=e,pa}var va,Nf;function yw(){if(Nf)return va;Nf=1;function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}return va=r,va}var ga,Df;function bw(){if(Df)return ga;Df=1;function r(e){return this.__data__.get(e)}return ga=r,ga}var _a,jf;function ww(){if(jf)return _a;jf=1;function r(e){return this.__data__.has(e)}return _a=r,_a}var ma,$f;function xw(){if($f)return ma;$f=1;var r=gi(),e=zl(),t=Gl(),n=200;function i(s,a){var o=this.__data__;if(o instanceof r){var u=o.__data__;if(!e||u.length<n-1)return u.push([s,a]),this.size=++o.size,this;o=this.__data__=new t(u)}return o.set(s,a),this.size=o.size,this}return ma=i,ma}var ya,Bf;function x_(){if(Bf)return ya;Bf=1;var r=gi(),e=mw(),t=yw(),n=bw(),i=ww(),s=xw();function a(o){var u=this.__data__=new r(o);this.size=u.size}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=i,a.prototype.set=s,ya=a,ya}var ba,Hf;function Sw(){if(Hf)return ba;Hf=1;var r="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,r),this}return ba=e,ba}var wa,Uf;function Ew(){if(Uf)return wa;Uf=1;function r(e){return this.__data__.has(e)}return wa=r,wa}var xa,zf;function S_(){if(zf)return xa;zf=1;var r=Gl(),e=Sw(),t=Ew();function n(i){var s=-1,a=i==null?0:i.length;for(this.__data__=new r;++s<a;)this.add(i[s])}return n.prototype.add=n.prototype.push=e,n.prototype.has=t,xa=n,xa}var Sa,Gf;function E_(){if(Gf)return Sa;Gf=1;function r(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}return Sa=r,Sa}var Ea,Vf;function O_(){if(Vf)return Ea;Vf=1;function r(e,t){return e.has(t)}return Ea=r,Ea}var Oa,Kf;function T_(){if(Kf)return Oa;Kf=1;var r=S_(),e=E_(),t=O_(),n=1,i=2;function s(a,o,u,c,d,l){var f=u&n,h=a.length,p=o.length;if(h!=p&&!(f&&p>h))return!1;var v=l.get(a),g=l.get(o);if(v&&g)return v==o&&g==a;var _=-1,m=!0,b=u&i?new r:void 0;for(l.set(a,o),l.set(o,a);++_<h;){var w=a[_],S=o[_];if(c)var O=f?c(S,w,_,o,a,l):c(w,S,_,a,o,l);if(O!==void 0){if(O)continue;m=!1;break}if(b){if(!e(o,function(I,x){if(!t(b,x)&&(w===I||d(w,I,u,c,l)))return b.push(x)})){m=!1;break}}else if(!(w===S||d(w,S,u,c,l))){m=!1;break}}return l.delete(a),l.delete(o),m}return Oa=s,Oa}var Ta,Wf;function Ow(){if(Wf)return Ta;Wf=1;var r=pt(),e=r.Uint8Array;return Ta=e,Ta}var Pa,Jf;function Tw(){if(Jf)return Pa;Jf=1;function r(e){var t=-1,n=Array(e.size);return e.forEach(function(i,s){n[++t]=[s,i]}),n}return Pa=r,Pa}var Ra,Yf;function Wl(){if(Yf)return Ra;Yf=1;function r(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}return Ra=r,Ra}var ka,Xf;function Pw(){if(Xf)return ka;Xf=1;var r=un(),e=Ow(),t=Ul(),n=T_(),i=Tw(),s=Wl(),a=1,o=2,u="[object Boolean]",c="[object Date]",d="[object Error]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",v="[object String]",g="[object Symbol]",_="[object ArrayBuffer]",m="[object DataView]",b=r?r.prototype:void 0,w=b?b.valueOf:void 0;function S(O,I,x,P,C,R,M){switch(x){case m:if(O.byteLength!=I.byteLength||O.byteOffset!=I.byteOffset)return!1;O=O.buffer,I=I.buffer;case _:return!(O.byteLength!=I.byteLength||!R(new e(O),new e(I)));case u:case c:case f:return t(+O,+I);case d:return O.name==I.name&&O.message==I.message;case h:case v:return O==I+"";case l:var L=i;case p:var y=P&a;if(L||(L=s),O.size!=I.size&&!y)return!1;var T=M.get(O);if(T)return T==I;P|=o,M.set(O,I);var k=n(L(O),L(I),P,C,R,M);return M.delete(O),k;case g:if(w)return w.call(O)==w.call(I)}return!1}return ka=S,ka}var Ia,Zf;function P_(){if(Zf)return Ia;Zf=1;function r(e,t){for(var n=-1,i=t.length,s=e.length;++n<i;)e[s+n]=t[n];return e}return Ia=r,Ia}var Ca,Qf;function Rw(){if(Qf)return Ca;Qf=1;var r=P_(),e=je();function t(n,i,s){var a=i(n);return e(n)?a:r(a,s(n))}return Ca=t,Ca}var Aa,eh;function kw(){if(eh)return Aa;eh=1;function r(e,t){for(var n=-1,i=e==null?0:e.length,s=0,a=[];++n<i;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}return Aa=r,Aa}var Fa,th;function Iw(){if(th)return Fa;th=1;function r(){return[]}return Fa=r,Fa}var qa,rh;function Cw(){if(rh)return qa;rh=1;var r=kw(),e=Iw(),t=Object.prototype,n=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(a){return a==null?[]:(a=Object(a),r(i(a),function(o){return n.call(a,o)}))}:e;return qa=s,qa}var Ma,nh;function Aw(){if(nh)return Ma;nh=1;function r(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}return Ma=r,Ma}var La,ih;function Fw(){if(ih)return La;ih=1;var r=Rt(),e=kt(),t="[object Arguments]";function n(i){return e(i)&&r(i)==t}return La=n,La}var Na,sh;function Jl(){if(sh)return Na;sh=1;var r=Fw(),e=kt(),t=Object.prototype,n=t.hasOwnProperty,i=t.propertyIsEnumerable,s=r((function(){return arguments})())?r:function(a){return e(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Na=s,Na}var zr={exports:{}},Da,ah;function qw(){if(ah)return Da;ah=1;function r(){return!1}return Da=r,Da}zr.exports;var oh;function R_(){return oh||(oh=1,(function(r,e){var t=pt(),n=qw(),i=e&&!e.nodeType&&e,s=i&&!0&&r&&!r.nodeType&&r,a=s&&s.exports===i,o=a?t.Buffer:void 0,u=o?o.isBuffer:void 0,c=u||n;r.exports=c})(zr,zr.exports)),zr.exports}var ja,uh;function Yl(){if(uh)return ja;uh=1;var r=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(n,i){var s=typeof n;return i=i??r,!!i&&(s=="number"||s!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return ja=t,ja}var $a,lh;
vendor: 4,860 bytes, line 3
3function Xl(){if(lh)return $a;lh=1;var r=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}return $a=e,$a}var Ba,ch;function Mw(){if(ch)return Ba;ch=1;var r=Rt(),e=Xl(),t=kt(),n="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",o="[object Error]",u="[object Function]",c="[object Map]",d="[object Number]",l="[object Object]",f="[object RegExp]",h="[object Set]",p="[object String]",v="[object WeakMap]",g="[object ArrayBuffer]",_="[object DataView]",m="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",x="[object Uint8ClampedArray]",P="[object Uint16Array]",C="[object Uint32Array]",R={};R[m]=R[b]=R[w]=R[S]=R[O]=R[I]=R[x]=R[P]=R[C]=!0,R[n]=R[i]=R[g]=R[s]=R[_]=R[a]=R[o]=R[u]=R[c]=R[d]=R[l]=R[f]=R[h]=R[p]=R[v]=!1;function M(L){return t(L)&&e(L.length)&&!!R[r(L)]}return Ba=M,Ba}var Ha,dh;function k_(){if(dh)return Ha;dh=1;function r(e){return function(t){return e(t)}}return Ha=r,Ha}var Gr={exports:{}};Gr.exports;var fh;function Lw(){return fh||(fh=1,(function(r,e){var t=p_(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,s=i&&i.exports===n,a=s&&t.process,o=(function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}})();r.exports=o})(Gr,Gr.exports)),Gr.exports}var Ua,hh;function I_(){if(hh)return Ua;hh=1;var r=Mw(),e=k_(),t=Lw(),n=t&&t.isTypedArray,i=n?e(n):r;return Ua=i,Ua}var za,ph;function Nw(){if(ph)return za;ph=1;var r=Aw(),e=Jl(),t=je(),n=R_(),i=Yl(),s=I_(),a=Object.prototype,o=a.hasOwnProperty;function u(c,d){var l=t(c),f=!l&&e(c),h=!l&&!f&&n(c),p=!l&&!f&&!h&&s(c),v=l||f||h||p,g=v?r(c.length,String):[],_=g.length;for(var m in c)(d||o.call(c,m))&&!(v&&(m=="length"||h&&(m=="offset"||m=="parent")||p&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||i(m,_)))&&g.push(m);return g}return za=u,za}var Ga,vh;function Dw(){if(vh)return Ga;vh=1;var r=Object.prototype;function e(t){var n=t&&t.constructor,i=typeof n=="function"&&n.prototype||r;return t===i}return Ga=e,Ga}var Va,gh;function C_(){if(gh)return Va;gh=1;function r(e,t){return function(n){return e(t(n))}}return Va=r,Va}var Ka,_h;function jw(){if(_h)return Ka;_h=1;var r=C_(),e=r(Object.keys,Object);return Ka=e,Ka}var Wa,mh;function $w(){if(mh)return Wa;mh=1;var r=Dw(),e=jw(),t=Object.prototype,n=t.hasOwnProperty;function i(s){if(!r(s))return e(s);var a=[];for(var o in Object(s))n.call(s,o)&&o!="constructor"&&a.push(o);return a}return Wa=i,Wa}var Ja,yh;function ln(){if(yh)return Ja;yh=1;var r=Hl(),e=Xl();function t(n){return n!=null&&e(n.length)&&!r(n)}return Ja=t,Ja}var Ya,bh;function yi(){if(bh)return Ya;bh=1;var r=Nw(),e=$w(),t=ln();function n(i){return t(i)?r(i):e(i)}return Ya=n,Ya}var Xa,wh;function Bw(){if(wh)return Xa;wh=1;var r=Rw(),e=Cw(),t=yi();function n(i){return r(i,t,e)}return Xa=n,Xa}var Za,xh;function Hw(){if(xh)return Za;xh=1;var r=Bw(),e=1,t=Object.prototype,n=t.hasOwnProperty;function i(s,a,o,u,c,d){var l=o&e,f=r(s),h=f.length,p=r(a),v=p.length;if(h!=v&&!l)return!1;for(var g=h;g--;){var _=f[g];if(!(l?_ in a:n.call(a,_)))return!1}var m=d.get(s),b=d.get(a);if(m&&b)return m==a&&b==s;var w=!0;d.set(s,a),d.set(a,s);for(var S=l;++g<h;){_=f[g];var O=s[_],I=a[_];if(u)var x=l?u(I,O,_,a,s,d):u(O,I,_,s,a,d);if(!(x===void 0?O===I||c(O,I,o,u,d):x)){w=!1;break}S||(S=_=="constructor")}if(w&&!S){var P=s.constructor,C=a.constructor;P!=C&&"constructor"in s&&"constructor"in a&&!(typeof P=="function"&&P instanceof P&&typeof C=="function"&&C instanceof C)&&(w=!1)}return d.delete(s),d.delete(a),w}return Za=i,Za}var Qa,Sh;function Uw(){if(Sh)return Qa;Sh=1;var r=er(),e=pt(),t=r(e,"DataView");return Qa=t,Qa}var eo,Eh;function zw(){if(Eh)return eo;Eh=1;var r=er(),e=pt(),t=r(e,"Promise");return eo=t,eo}var to,Oh;function A_(){if(Oh)return to;Oh=1;var r=er(),e=pt(),t=r(e,"Set");return to=t,to}var ro,Th;function Gw(){if(Th)return ro;Th=1;var r=er(),e=pt(),t=r(e,"WeakMap");return ro=t,ro}var no,Ph;function Vw(){if(Ph)return no;Ph=1;var r=Uw(),e=zl(),t=zw(),n=A_(),i=Gw(),s=Rt(),a=v_(),o="[object Map]",u="[object Object]",c="[object Promise]",d="[object Set]",l="[object WeakMap]",f="[object DataView]",h=a(r),p=a(e),v=a(t),g=a(n),_=a(i),m=s;return(r&&m(new r(new ArrayBuffer(1)))!=f||e&&m(new e)!=o||t&&m(t.resolve())!=c||n&&m(new n)!=d||i&&m(new i)!=l)&&(m=function(b){var w=s(b),S=w==u?b.constructor:void 0,O=S?a(S):"";if(O)switch(O){case h:return f;case p:return o;case v:return c;case g:return d;case _:return l}return w}),no=m,no}var io,Rh;function Kw(){if(Rh)return io;Rh=1;var r=x_(),e=T_(),t=Pw(),n=Hw(),i=Vw(),s=je(),a=R_(),o=I_(),u=1,c="[object Arguments]",d="[object Array]",l="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function p(v,g,_,m,b,w){var S=s(v),O=s(g),I=S?d:i(v),x=O?d:i(g);I=I==c?l:I,x=x==c?l:x;var P=I==l,C=x==l,R=I==x;
vendor: 14,491 bytes, line 3
3if(R&&a(v)){if(!a(g))return!1;S=!0,P=!1}if(R&&!P)return w||(w=new r),S||o(v)?e(v,g,_,m,b,w):t(v,g,I,_,m,b,w);if(!(_&u)){var M=P&&h.call(v,"__wrapped__"),L=C&&h.call(g,"__wrapped__");if(M||L){var y=M?v.value():v,T=L?g.value():g;return w||(w=new r),b(y,T,_,m,w)}}return R?(w||(w=new r),n(v,g,_,m,b,w)):!1}return io=p,io}var so,kh;function Zl(){if(kh)return so;kh=1;var r=Kw(),e=kt();function t(n,i,s,a,o){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:r(n,i,s,a,t,o)}return so=t,so}var ao,Ih;function Ww(){if(Ih)return ao;Ih=1;var r=x_(),e=Zl(),t=1,n=2;function i(s,a,o,u){var c=o.length,d=c,l=!u;if(s==null)return!d;for(s=Object(s);c--;){var f=o[c];if(l&&f[2]?f[1]!==s[f[0]]:!(f[0]in s))return!1}for(;++c<d;){f=o[c];var h=f[0],p=s[h],v=f[1];if(l&&f[2]){if(p===void 0&&!(h in s))return!1}else{var g=new r;if(u)var _=u(p,v,h,s,a,g);if(!(_===void 0?e(v,p,t|n,u,g):_))return!1}}return!0}return ao=i,ao}var oo,Ch;function F_(){if(Ch)return oo;Ch=1;var r=Dt();function e(t){return t===t&&!r(t)}return oo=e,oo}var uo,Ah;function Jw(){if(Ah)return uo;Ah=1;var r=F_(),e=yi();function t(n){for(var i=e(n),s=i.length;s--;){var a=i[s],o=n[a];i[s]=[a,o,r(o)]}return i}return uo=t,uo}var lo,Fh;function q_(){if(Fh)return lo;Fh=1;function r(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}return lo=r,lo}var co,qh;function Yw(){if(qh)return co;qh=1;var r=Ww(),e=Jw(),t=q_();function n(i){var s=e(i);return s.length==1&&s[0][2]?t(s[0][0],s[0][1]):function(a){return a===i||r(a,i,s)}}return co=n,co}var fo,Mh;function Xw(){if(Mh)return fo;Mh=1;function r(e,t){return e!=null&&t in Object(e)}return fo=r,fo}var ho,Lh;function Zw(){if(Lh)return ho;Lh=1;var r=m_(),e=Jl(),t=je(),n=Yl(),i=Xl(),s=mi();function a(o,u,c){u=r(u,o);for(var d=-1,l=u.length,f=!1;++d<l;){var h=s(u[d]);if(!(f=o!=null&&c(o,h)))break;o=o[h]}return f||++d!=l?f:(l=o==null?0:o.length,!!l&&i(l)&&n(h,l)&&(t(o)||e(o)))}return ho=a,ho}var po,Nh;function Qw(){if(Nh)return po;Nh=1;var r=Xw(),e=Zw();function t(n,i){return n!=null&&e(n,i,r)}return po=t,po}var vo,Dh;function e1(){if(Dh)return vo;Dh=1;var r=Zl(),e=y_(),t=Qw(),n=Bl(),i=F_(),s=q_(),a=mi(),o=1,u=2;function c(d,l){return n(d)&&i(l)?s(a(d),l):function(f){var h=e(f,d);return h===void 0&&h===l?t(f,d):r(l,h,o|u)}}return vo=c,vo}var go,jh;function Or(){if(jh)return go;jh=1;function r(e){return e}return go=r,go}var _o,$h;function t1(){if($h)return _o;$h=1;function r(e){return function(t){return t==null?void 0:t[e]}}return _o=r,_o}var mo,Bh;function r1(){if(Bh)return mo;Bh=1;var r=Kl();function e(t){return function(n){return r(n,t)}}return mo=e,mo}var yo,Hh;function n1(){if(Hh)return yo;Hh=1;var r=t1(),e=r1(),t=Bl(),n=mi();function i(s){return t(s)?r(n(s)):e(s)}return yo=i,yo}var bo,Uh;function jt(){if(Uh)return bo;Uh=1;var r=Yw(),e=e1(),t=Or(),n=je(),i=n1();function s(a){return typeof a=="function"?a:a==null?t:typeof a=="object"?n(a)?e(a[0],a[1]):r(a):i(a)}return bo=s,bo}var wo,zh;function M_(){if(zh)return wo;zh=1;function r(e,t,n,i){for(var s=e.length,a=n+(i?1:-1);i?a--:++a<s;)if(t(e[a],a,e))return a;return-1}return wo=r,wo}var xo,Gh;function i1(){if(Gh)return xo;Gh=1;function r(e){return e!==e}return xo=r,xo}var So,Vh;function s1(){if(Vh)return So;Vh=1;function r(e,t,n){for(var i=n-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}return So=r,So}var Eo,Kh;function a1(){if(Kh)return Eo;Kh=1;var r=M_(),e=i1(),t=s1();function n(i,s,a){return s===s?t(i,s,a):r(i,e,a)}return Eo=n,Eo}var Oo,Wh;function o1(){if(Wh)return Oo;Wh=1;var r=a1();function e(t,n){var i=t==null?0:t.length;return!!i&&r(t,n,0)>-1}return Oo=e,Oo}var To,Jh;function u1(){if(Jh)return To;Jh=1;function r(e,t,n){for(var i=-1,s=e==null?0:e.length;++i<s;)if(n(t,e[i]))return!0;return!1}return To=r,To}var Po,Yh;function l1(){if(Yh)return Po;Yh=1;function r(){}return Po=r,Po}var Ro,Xh;function c1(){if(Xh)return Ro;Xh=1;var r=A_(),e=l1(),t=Wl(),n=1/0,i=r&&1/t(new r([,-0]))[1]==n?function(s){return new r(s)}:e;return Ro=i,Ro}var ko,Zh;function d1(){if(Zh)return ko;Zh=1;var r=S_(),e=o1(),t=u1(),n=O_(),i=c1(),s=Wl(),a=200;function o(u,c,d){var l=-1,f=e,h=u.length,p=!0,v=[],g=v;if(d)p=!1,f=t;else if(h>=a){var _=c?null:i(u);if(_)return s(_);p=!1,f=n,g=new r}else g=c?[]:v;e:for(;++l<h;){var m=u[l],b=c?c(m):m;if(m=d||m!==0?m:0,p&&b===b){for(var w=g.length;w--;)if(g[w]===b)continue e;c&&g.push(b),v.push(m)}else f(g,b,d)||(g!==v&&g.push(b),v.push(m))}return v}return ko=o,ko}var Io,Qh;function f1(){if(Qh)return Io;Qh=1;var r=jt(),e=d1();function t(n,i){return n&&n.length?e(n,r(i,2)):[]}return Io=t,Io}var h1=f1();const AS=oe(h1);var Co,ep;function p1(){if(ep)return Co;ep=1;var r=un(),e=Jl(),t=je(),n=r?r.isConcatSpreadable:void 0;function i(s){return t(s)||e(s)||!!(n&&s&&s[n])}return Co=i,Co}var Ao,tp;function L_(){if(tp)return Ao;tp=1;var r=P_(),e=p1();function t(n,i,s,a,o){var u=-1,c=n.length;for(s||(s=e),o||(o=[]);++u<c;){var d=n[u];i>0&&s(d)?i>1?t(d,i-1,s,a,o):r(o,d):a||(o[o.length]=d)}return o}return Ao=t,Ao}var Fo,rp;function v1(){if(rp)return Fo;rp=1;function r(e){return function(t,n,i){for(var s=-1,a=Object(t),o=i(t),u=o.length;u--;){var c=o[e?u:++s];if(n(a[c],c,a)===!1)break}return t}}return Fo=r,Fo}var qo,np;function g1(){if(np)return qo;np=1;var r=v1(),e=r();return qo=e,qo}var Mo,ip;function N_(){if(ip)return Mo;ip=1;var r=g1(),e=yi();function t(n,i){return n&&r(n,i,e)}return Mo=t,Mo}var Lo,sp;function _1(){if(sp)return Lo;sp=1;var r=ln();function e(t,n){return function(i,s){if(i==null)return i;if(!r(i))return t(i,s);for(var a=i.length,o=n?a:-1,u=Object(i);(n?o--:++o<a)&&s(u[o],o,u)!==!1;);return i}}return Lo=e,Lo}var No,ap;function Ql(){if(ap)return No;ap=1;var r=N_(),e=_1(),t=e(r);return No=t,No}var Do,op;function D_(){if(op)return Do;op=1;var r=Ql(),e=ln();function t(n,i){var s=-1,a=e(n)?Array(n.length):[];return r(n,function(o,u,c){a[++s]=i(o,u,c)}),a}return Do=t,Do}var jo,up;function m1(){if(up)return jo;up=1;function r(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}return jo=r,jo}var $o,lp;function y1(){if(lp)return $o;lp=1;var r=Er();function e(t,n){if(t!==n){var i=t!==void 0,s=t===null,a=t===t,o=r(t),u=n!==void 0,c=n===null,d=n===n,l=r(n);if(!c&&!l&&!o&&t>n||o&&u&&d&&!c&&!l||s&&u&&d||!i&&d||!a)return 1;if(!s&&!o&&!l&&t<n||l&&i&&a&&!s&&!o||c&&i&&a||!u&&a||!d)return-1}return 0}return $o=e,$o}var Bo,cp;function b1(){if(cp)return Bo;cp=1;var r=y1();function e(t,n,i){for(var s=-1,a=t.criteria,o=n.criteria,u=a.length,c=i.length;++s<u;){var d=r(a[s],o[s]);if(d){if(s>=c)return d;var l=i[s];return d*(l=="desc"?-1:1)}}return t.index-n.index}return Bo=e,Bo}var Ho,dp;function w1(){if(dp)return Ho;dp=1;var r=Vl(),e=Kl(),t=jt(),n=D_(),i=m1(),s=k_(),a=b1(),o=Or(),u=je();function c(d,l,f){l.length?l=r(l,function(v){return u(v)?function(g){return e(g,v.length===1?v[0]:v)}:v}):l=[o];var h=-1;l=r(l,s(t));var p=n(d,function(v,g,_){var m=r(l,function(b){return b(v)});return{criteria:m,index:++h,value:v}});return i(p,function(v,g){return a(v,g,f)})}return Ho=c,Ho}var Uo,fp;function x1(){if(fp)return Uo;fp=1;function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}return Uo=r,Uo}var zo,hp;function S1(){if(hp)return zo;hp=1;var r=x1(),e=Math.max;function t(n,i,s){return i=e(i===void 0?n.length-1:i,0),function(){for(var a=arguments,o=-1,u=e(a.length-i,0),c=Array(u);++o<u;)c[o]=a[i+o];o=-1;for(var d=Array(i+1);++o<i;)d[o]=a[o];return d[i]=s(c),r(n,this,d)}}return zo=t,zo}var Go,pp;function E1(){if(pp)return Go;pp=1;function r(e){return function(){return e}}return Go=r,Go}var Vo,vp;function j_(){if(vp)return Vo;vp=1;var r=er(),e=(function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch{}})();return Vo=e,Vo}var Ko,gp;function O1(){if(gp)return Ko;gp=1;var r=E1(),e=j_(),t=Or(),n=e?function(i,s){return e(i,"toString",{configurable:!0,enumerable:!1,value:r(s),writable:!0})}:t;return Ko=n,Ko}var Wo,_p;function T1(){if(_p)return Wo;_p=1;var r=800,e=16,t=Date.now;function n(i){var s=0,a=0;return function(){var o=t(),u=e-(o-a);if(a=o,u>0){if(++s>=r)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return Wo=n,Wo}var Jo,mp;function P1(){if(mp)return Jo;mp=1;var r=O1(),e=T1(),t=e(r);return Jo=t,Jo}var Yo,yp;function R1(){if(yp)return Yo;yp=1;var r=Or(),e=S1(),t=P1();function n(i,s){return t(e(i,s,r),i+"")}return Yo=n,Yo}var Xo,bp;function bi(){if(bp)return Xo;bp=1;var r=Ul(),e=ln(),t=Yl(),n=Dt();function i(s,a,o){if(!n(o))return!1;var u=typeof a;return(u=="number"?e(o)&&t(a,o.length):u=="string"&&a in o)?r(o[a],s):!1}return Xo=i,Xo}var Zo,wp;function k1(){if(wp)return Zo;wp=1;var r=L_(),e=w1(),t=R1(),n=bi(),i=t(function(s,a){if(s==null)return[];var o=a.length;return o>1&&n(s,a[0],a[1])?a=[]:o>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),e(s,r(a,1),[])});return Zo=i,Zo}var I1=k1();const FS=oe(I1);var Qo,xp;function C1(){if(xp)return Qo;xp=1;var r=pt(),e=function(){return r.Date.now()};return Qo=e,Qo}var eu,Sp;function A1(){if(Sp)return eu;Sp=1;var r=/\s/;function e(t){for(var n=t.length;n--&&r.test(t.charAt(n)););return n}return eu=e,eu}var tu,Ep;function F1(){if(Ep)return tu;Ep=1;var r=A1(),e=/^\s+/;function t(n){return n&&n.slice(0,r(n)+1).replace(e,"")}return tu=t,tu}var ru,Op;function $_(){if(Op)return ru;Op=1;var r=F1(),e=Dt(),t=Er(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function u(c){if(typeof c=="number")return c;if(t(c))return n;if(e(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=e(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=r(c);var l=s.test(c);return l||a.test(c)?o(c.slice(2),l?2:8):i.test(c)?n:+c}return ru=u,ru}var nu,Tp;function q1(){if(Tp)return nu;Tp=1;var r=Dt(),e=C1(),t=$_(),n="Expected a function",i=Math.max,s=Math.min;function a(o,u,c){var d,l,f,h,p,v,g=0,_=!1,m=!1,b=!0;if(typeof o!="function")throw new TypeError(n);u=t(u)||0,r(c)&&(_=!!c.leading,m="maxWait"in c,f=m?i(t(c.maxWait)||0,u):f,b="trailing"in c?!!c.trailing:b);function w(L){var y=d,T=l;return d=l=void 0,g=L,h=o.apply(T,y),h}function S(L){return g=L,p=setTimeout(x,u),_?w(L):h}function O(L){var y=L-v,T=L-g,k=u-y;return m?s(k,f-T):k}function I(L){var y=L-v,T=L-g;return v===void 0||y>=u||y<0||m&&T>=f}function x(){var L=e();if(I(L))return P(L);p=setTimeout(x,O(L))}function P(L){return p=void 0,b&&d?w(L):(d=l=void 0,h)}function C(){p!==void 0&&clearTimeout(p),g=0,d=v=l=p=void 0}function R(){return p===void 0?h:P(e())}function M(){var L=e(),y=I(L);if(d=arguments,l=this,v=L,y){if(p===void 0)return S(v);if(m)return clearTimeout(p),p=setTimeout(x,u),w(v)}return p===void 0&&(p=setTimeout(x,u)),h}return M.cancel=C,M.flush=R,M}return nu=a,nu}var iu,Pp;function M1(){if(Pp)return iu;Pp=1;var r=q1(),e=Dt(),t="Expected a function";function n(i,s,a){var o=!0,u=!0;if(typeof i!="function")throw new TypeError(t);return e(a)&&(o="leading"in a?!!a.leading:o,u="trailing"in a?!!a.trailing:u),r(i,s,{leading:o,maxWait:s,trailing:u})}return iu=n,iu}var L1=M1();const qS=oe(L1);var su,Rp;function B_(){if(Rp)return su;Rp=1;var r=Er();function e(t,n,i){for(var s=-1,a=t.length;++s<a;){var o=t[s],u=n(o);if(u!=null&&(c===void 0?u===u&&!r(u):i(u,c)))var c=u,d=o}return d}return su=e,su}var au,kp;function N1(){if(kp)return au;kp=1;function r(e,t){return e>t}return au=r,au}var ou,Ip;function D1(){if(Ip)return ou;Ip=1;var r=B_(),e=N1(),t=Or();function n(i){return i&&i.length?r(i,t,e):void 0}return ou=n,ou}var j1=D1();const MS=oe(j1);var uu,Cp;function $1(){if(Cp)return uu;Cp=1;function r(e,t){return e<t}return uu=r,uu}var lu,Ap;function B1(){if(Ap)return lu;Ap=1;var r=B_(),e=$1(),t=Or();function n(i){return i&&i.length?r(i,t,e):void 0}return lu=n,lu}var H1=B1();const LS=oe(H1);var cu,Fp;function U1(){if(Fp)return cu;Fp=1;var r=Vl(),e=jt(),t=D_(),n=je();function i(s,a){var o=n(s)?r:t;return o(s,e(a,3))}return cu=i,cu}var du,qp;function z1(){if(qp)return du;qp=1;var r=L_(),e=U1();function t(n,i){return r(e(n,i),1)}return du=t,du}var G1=z1();const NS=oe(G1);var fu,Mp;function V1(){if(Mp)return fu;Mp=1;var r=Zl();function e(t,n){return r(t,n)}return fu=e,fu}var K1=V1();const DS=oe(K1);var hu,Lp;function W1(){if(Lp)return hu;Lp=1;function r(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}return hu=r,hu}var J1=W1();const jS=oe(J1);var pu,Np;function Y1(){if(Np)return pu;Np=1;var r=C_(),e=r(Object.getPrototypeOf,Object);return pu=e,pu}var vu,Dp;function X1(){if(Dp)return vu;Dp=1;var r=Rt(),e=Y1(),t=kt(),n="[object Object]",i=Function.prototype,s=Object.prototype,a=i.toString,o=s.hasOwnProperty,u=a.call(Object);function c(d){if(!t(d)||r(d)!=n)return!1;var l=e(d);if(l===null)return!0;var f=o.call(l,"constructor")&&l.constructor;return typeof f=="function"&&f instanceof f&&a.call(f)==u}return vu=c,vu}var Z1=X1();const $S=oe(Z1);var gu,jp;function Q1(){if(jp)return gu;jp=1;var r=Rt(),e=kt(),t="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&r(i)==t}return gu=n,gu}var ex=Q1();const BS=oe(ex);var _u,$p;function tx(){if($p)return _u;$p=1;var r=Math.ceil,e=Math.max;function t(n,i,s,a){for(var o=-1,u=e(r((i-n)/(s||1)),0),c=Array(u);u--;)c[a?u:++o]=n,n+=s;return c}return _u=t,_u}var mu,Bp;function H_(){if(Bp)return mu;Bp=1;var r=$_(),e=1/0,t=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=r(i),i===e||i===-e){var s=i<0?-1:1;return s*t}return i===i?i:0}return mu=n,mu}var yu,Hp;function rx(){if(Hp)return yu;Hp=1;var r=tx(),e=bi(),t=H_();function n(i){return function(s,a,o){return o&&typeof o!="number"&&e(s,a,o)&&(a=o=void 0),s=t(s),a===void 0?(a=s,s=0):a=t(a),o=o===void 0?s<a?1:-1:t(o),r(s,a,o,i)}}return yu=n,yu}var bu,Up;function nx(){if(Up)return bu;Up=1;var r=rx(),e=r();return bu=e,bu}var ix=nx();const HS=oe(ix);var wu,zp;function sx(){if(zp)return wu;zp=1;var r=Ql();function e(t,n){var i;return r(t,function(s,a,o){return i=n(s,a,o),!i}),!!i}return wu=e,wu}var xu,Gp;function ax(){if(Gp)return xu;Gp=1;var r=E_(),e=jt(),t=sx(),n=je(),i=bi();function s(a,o,u){var c=n(a)?r:t;return u&&i(a,o,u)&&(o=void 0),c(a,e(o,3))}return xu=s,xu}var ox=ax();const US=oe(ox);var Su,Vp;function ux(){if(Vp)return Su;Vp=1;var r=j_();function e(t,n,i){n=="__proto__"&&r?r(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}return Su=e,Su}var Eu,Kp;function lx(){if(Kp)return Eu;Kp=1;var r=ux(),e=N_(),t=jt();function n(i,s){var a={};return s=t(s,3),e(i,function(o,u,c){r(a,u,s(o,u,c))}),a}return Eu=n,Eu}var cx=lx();const zS=oe(cx);var Ou,Wp;function dx(){if(Wp)return Ou;Wp=1;function r(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;
3)if(!t(e[n],n,e))return!1;return!0}return Ou=r,Ou}var Tu,Jp;function fx(){if(Jp)return Tu;Jp=1;var r=Ql();function e(t,n){var i=!0;return r(t,function(s,a,o){return i=!!n(s,a,o),i}),i}return Tu=e,Tu}var Pu,Yp;function hx(){if(Yp)return Pu;Yp=1;var r=dx(),e=fx(),t=jt(),n=je(),i=bi();function s(a,o,u){var c=n(a)?r:e;return u&&i(a,o,u)&&(o=void 0),c(a,t(o,3))}return Pu=s,Pu}var px=hx();const GS=oe(px);var Ru,Xp;function vx(){if(Xp)return Ru;Xp=1;var r=jt(),e=ln(),t=yi();function n(i){return function(s,a,o){var u=Object(s);if(!e(s)){var c=r(a,3);s=t(s),a=function(l){return c(u[l],l,u)}}var d=i(s,a,o);return d>-1?u[c?s[d]:d]:void 0}}return Ru=n,Ru}var ku,Zp;function gx(){if(Zp)return ku;Zp=1;var r=H_();function e(t){var n=r(t),i=n%1;return n===n?i?n-i:n:0}return ku=e,ku}var Iu,Qp;function _x(){if(Qp)return Iu;Qp=1;var r=M_(),e=jt(),t=gx(),n=Math.max;function i(s,a,o){var u=s==null?0:s.length;if(!u)return-1;var c=o==null?0:t(o);return c<0&&(c=n(u+c,0)),r(s,e(a,3),c)}return Iu=i,Iu}var Cu,ev;function mx(){if(ev)return Cu;ev=1;var r=vx(),e=_x(),t=r(e);return Cu=t,Cu}var yx=mx();const VS=oe(yx);var bx=g_();const KS=oe(bx);function wi(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&om(r,e)}function cn(r,e){if(e&&(tt(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qt(r)}function ht(r){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(r)}function wx(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function xx(r){return d_(r)||wx(r)||f_(r)||h_()}function tv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rv(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tv(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):tv(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var Sx={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Ex=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};it(this,r),this.init(e,t)}return st(r,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Sx,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,n,i,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(i).concat(this.prefix," ").concat(t[0])),this.logger[n](t))}},{key:"create",value:function(t){return new r(this.logger,rv(rv({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new r(this.logger,t)}}]),r})(),ft=new Ex,Nt=(function(){function r(){it(this,r),this.observers={}}return st(r,[{key:"on",value:function(t,n){var i=this;return t.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(n)}),this}},{key:"off",value:function(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(function(i){return i!==n})}}},{key:"emit",value:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];if(this.observers[t]){var a=[].concat(this.observers[t]);a.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(u){u.apply(u,[t].concat(i))})}}}]),r})();function Nr(){var r,e,t=new Promise(function(n,i){r=n,e=i});return t.resolve=r,t.reject=e,t}function nv(r){return r==null?"":""+r}function Ox(r,e,t){r.forEach(function(n){e[n]&&(t[n]=e[n])})}function ec(r,e,t){function n(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!r||typeof r=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var a=n(s.shift());!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={}}return i()?{}:{obj:r,k:n(s.shift())}}function iv(r,e,t){var n=ec(r,e,Object),i=n.obj,s=n.k;i[s]=t}function Tx(r,e,t,n){var i=ec(r,e,Object),s=i.obj,a=i.k;s[a]=s[a]||[],s[a].push(t)}function oi(r,e){var t=ec(r,e),n=t.obj,i=t.k;if(n)return n[i]}function sv(r,e,t){var n=oi(r,t);return n!==void 0?n:oi(e,t)}function U_(r,e,t){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(r[n]=e[n]):U_(r[n],e[n],t):r[n]=e[n]);return r}function lr(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Px={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Rx(r){return typeof r=="string"?r.replace(/[&<>
3"'\/]/g,function(e){return Px[e]}):r}var xi=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,kx=[" ",",","?","!",";"];function Ix(r,e,t){e=e||"",t=t||"";var n=kx.filter(function(o){return e.indexOf(o)<0&&t.indexOf(o)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(o){return o==="?"?"\\?":o}).join("|"),")")),s=!i.test(r);if(!s){var a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(s=!0)}return s}function av(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Tn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?av(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):av(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Cx(r){var e=Ax();return function(){var n=ht(r),i;if(e){var s=ht(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return cn(this,i)}}function Ax(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z_(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(r){if(r[e])return r[e];for(var n=e.split(t),i=r,s=0;s<n.length;++s){if(!i||typeof i[n[s]]=="string"&&s+1<n.length)return;if(i[n[s]]===void 0){for(var a=2,o=n.slice(s,s+a).join(t),u=i[o];u===void 0&&n.length>s+a;)a++,o=n.slice(s,s+a).join(t),u=i[o];if(u===void 0)return;if(u===null)return null;if(e.endsWith(o)){if(typeof u=="string")return u;if(o&&typeof u[o]=="string")return u[o]}var c=n.slice(s+a).join(t);return c?z_(u,c,t):void 0}i=i[n[s]]}return i}}var Fx=(function(r){wi(t,r);var e=Cx(t);function t(n){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return it(this,t),i=e.call(this),xi&&Nt.call(qt(i)),i.data=n||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return st(t,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,s];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."));var l=oi(this.data,d);return l||!c||typeof a!="string"?l:z_(this.data&&this.data[i]&&this.data[i][s],a,u)}},{key:"addResource",value:function(i,s,a,o){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var d=[i,s];a&&(d=d.concat(c?a.split(c):a)),i.indexOf(".")>-1&&(d=i.split("."),o=s,s=d[1]),this.addNamespaces(s),iv(this.data,d,o),u.silent||this.emit("added",i,s,a,o)}},{key:"addResources",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in a)(typeof a[u]=="string"||Object.prototype.toString.apply(a[u])==="[object Array]")&&this.addResource(i,s,u,a[u],{silent:!0});o.silent||this.emit("added",i,s,a)}},{key:"addResourceBundle",value:function(i,s,a,o,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,s];i.indexOf(".")>-1&&(d=i.split("."),o=a,a=s,s=d[1]),this.addNamespaces(s);var l=oi(this.data,d)||{};o?U_(l,a,u):l=Tn(Tn({},l),a),iv(this.data,d,l),c.silent||this.emit("added",i,s,a)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit
3("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Tn(Tn({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),a=s&&Object.keys(s)||[];return!!a.find(function(o){return s[o]&&Object.keys(s[o]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t})(Nt),G_={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,s){var a=this;return e.forEach(function(o){a.processors[o]&&(t=a.processors[o].process(t,n,i,s))}),t}};function ov(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ae(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ov(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ov(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function qx(r){var e=Mx();return function(){var n=ht(r),i;if(e){var s=ht(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return cn(this,i)}}function Mx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var uv={},lv=(function(r){wi(t,r);var e=qx(t);function t(n){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return it(this,t),i=e.call(this),xi&&Nt.call(qt(i)),Ox(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
3i18nFormat","utils"],n,qt(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ft.create("translator"),i}return st(t,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,s);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,s){var a=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ns||this.options.defaultNS||[],c=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!Ix(i,a,o);if(c&&!d){var l=i.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:i,namespaces:u};var f=i.split(a);(a!==o||a===o&&this.options.ns.indexOf(f[0])>-1)&&(u=f.shift()),i=f.join(o)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,s,a){var o=this;if(tt(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],s),l=d.key,f=d.namespaces,h=f[f.length-1],p=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var g=s.nsSeparator||this.options.nsSeparator;return u?(_.res="".concat(h).concat(g).concat(l),_):"".concat(h).concat(g).concat(l)}return u?(_.res=l,_):l}var _=this.resolve(i,s),m=_&&_.res,b=_&&_.usedKey||l,w=_&&_.exactUsedKey||l,S=Object.prototype.toString.apply(m),O=["[object Number]","[object Function]","[object RegExp]"],I=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,P=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(x&&m&&P&&O.indexOf(S)<0&&!(typeof I=="string"&&S==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,m,Ae(Ae({},s),{},{ns:f})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return u?(_.res=C,_):C}if(c){var R=S==="[object Array]",M=R?[]:{},L=R?w:b;for(var y in m)if(Object.prototype.hasOwnProperty.call(m,y)){var T="".concat(L).concat(c).concat(y);M[y]=this.translate(T,Ae(Ae({},s),{joinArrays:!1,ns:f})),M[y]===T&&(M[y]=m[y])}m=M}}else if(x&&typeof I=="string"&&S==="[object Array]")m=m.join(I),m&&(m=this.extendTranslation(m,i,s,a));else{var k=!1,j=!1,U=s.count!==void 0&&typeof s.count!="string",$=t.hasDefaultValue(s),ne=U?this.pluralResolver.getSuffix(p,s.count,s):"",H=s["defaultValue".concat(ne)]||s.defaultValue;!this.isValidLookup(m)&&$&&(k=!0,m=H),this.isValidLookup(m)||(j=!0,m=l);var K=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,z=K&&j?void 0:m,X=$&&H!==m&&this.options.updateMissing;if(j||k||X){if(this.logger.log(X?"updateKey":"missingKey",p,h,l,X?H:m),c){var Z=this.resolve(l,Ae(Ae({},s),{},{keySeparator:!1}));Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var V=[],ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(var se=0;se<ye.length;se++)V.push(ye[se]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(s.lng||this.language):V.push(s.lng||this.language);var _e=function(he,xe,vt){var Ge=$&&vt!==m?vt:z;o.options.missingKeyHandler?o.options.missingKeyHandler(he,h,xe,Ge,X,s):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(he,h,xe,Ge,X,s),o.emit("missingKey",he,h,xe,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?V.forEac
3h(function(we){o.pluralResolver.getSuffixes(we,s).forEach(function(he){_e([we],l+he,s["defaultValue".concat(he)]||H)})}):_e(V,l,H))}m=this.extendTranslation(m,i,s,_,a),j&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(h,":").concat(l)),(j||k)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(l):l,k?m:void 0):m=this.options.parseMissingKeyHandler(m))}return u?(_.res=m,_):m}},{key:"extendTranslation",value:function(i,s,a,o,u){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Ae(Ae({},this.options.interpolation.defaultVariables),a),o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Ae(Ae({},a),{interpolation:Ae(Ae({},this.options.interpolation),a.interpolation)}));var d=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),l;if(d){var f=i.match(this.interpolator.nestingRegexp);l=f&&f.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Ae(Ae({},this.options.interpolation.defaultVariables),h)),i=this.interpolator.interpolate(i,h,a.lng||this.language,a),d){var p=i.match(this.interpolator.nestingRegexp),v=p&&p.length;l<v&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var m=arguments.length,b=new Array(m),w=0;w<m;w++)b[w]=arguments[w];return u&&u[0]===b[0]&&!a.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(b[0]," in key: ").concat(s[0])),null):c.translate.apply(c,b.concat([s]))},a)),a.interpolation&&this.interpolator.reset()}var g=a.postProcess||this.options.postProcess,_=typeof g=="string"?[g]:g;return i!=null&&_&&_.length&&a.applyPostProcessor!==!1&&(i=G_.handle(_,i,s,this.options&&this.options.postProcessPassResolved?Ae({i18nResolved:o},a):a,this)),i}},{key:"resolve",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,u,c,d,l;
3return typeof i=="string"&&(i=[i]),i.forEach(function(f){if(!s.isValidLookup(o)){var h=s.extractFromKey(f,a),p=h.key;u=p;var v=h.namespaces;s.options.fallbackNS&&(v=v.concat(s.options.fallbackNS));var g=a.count!==void 0&&typeof a.count!="string",_=g&&!a.ordinal&&a.count===0&&s.pluralResolver.shouldUseIntlApi(),m=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);v.forEach(function(w){s.isValidLookup(o)||(l=w,!uv["".concat(b[0],"-").concat(w)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(l)&&(uv["".concat(b[0],"-").concat(w)]=!0,s.logger.warn('key "'.concat(u,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(S){if(!s.isValidLookup(o)){d=S;var O=[p];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(O,p,S,w,a);else{var I;g&&(I=s.pluralResolver.getSuffix(S,a.count,a));var x="".concat(s.options.pluralSeparator,"zero");if(g&&(O.push(p+I),_&&O.push(p+x)),m){var P="".concat(p).concat(s.options.contextSeparator).concat(a.context);O.push(P),g&&(O.push(P+I),_&&O.push(P+x))}}for(var C;C=O.pop();)s.isValidLookup(o)||(c=C,o=s.getResource(S,w,C,a))}}))})}}),{res:o,usedKey:u,exactUsedKey:c,usedLng:d,usedNS:l}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,a,o):this.resourceStore.getResource(i,s,a,o)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s===a.substring(0,s.length)&&i[a]!==void 0)return!0;return!1}}]),t})(Nt);function Au(r){return r.charAt(0).toUpperCase()+r.slice(1)}var Lx=(function(){function r(e){it(this,r),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ft.create("languageUtils")}return st(r,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=t.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Au(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Au(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Au(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var n=this;if(!t)return null;var i;return t.forEach(function(s){if(!i){var a=n.formatLanguageCode(s);(!n.options.supportedLngs||n.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&t.forEach(function(s){if(!i){var a=n.getLanguagePartFromCode(s);if(n.isSupportedCode(a))return i=a;i=n.options.supportedLngs.find(function(o){if(o.indexOf(a)===0)return o}
3)}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];var i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}},{key:"toResolveHierarchy",value:function(t,n){var i=this,s=this.getFallbackCodes(n||this.options.fallbackLng||[],t),a=[],o=function(c){c&&(i.isSupportedCode(c)?a.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),s.forEach(function(u){a.indexOf(u)<0&&o(i.formatLanguageCode(u))}),a}}]),r})(),Nx=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Dx={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},jx=["v1","v2","v3"],cv={zero:0,one:1,two:2,few:3,many:4,other:5};function $x(){var r={};return Nx.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:Dx[e.fc]}})}),r}var Bx=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};it(this,r),this.languageUtils=e,this.options=t,this.logger=ft.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=$x()}return st(r,[{key:"addRule",value:function(t,n){this.rules[t]=n}},{key:"getRule",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(t,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
3return this.getSuffixes(t,i).map(function(s){return"".concat(n).concat(s)})}},{key:"getSuffixes",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(t,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(a,o){return cv[a]-cv[o]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):s.numbers.map(function(a){return n.getSuffix(t,a,i)}):[]}},{key:"getSuffix",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(t,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(n)):this.getSuffixRetroCompatible(s,n):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,n){var i=this,s=t.noAbs?t.plurals(n):t.plurals(Math.abs(n)),a=t.numbers[s];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var o=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!jx.includes(this.options.compatibilityJSON)}}]),r})();function dv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ze(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dv(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):dv(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var Hx=(function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};it(this,r),this.logger=ft.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return st(r,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=n.escape!==void 0?n.escape:Rx,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?lr(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?lr(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?lr(n.nestingPrefix):n.nestingPrefixEscaped||lr("$t("),this.nestingSuffix=n.nestingSuffix?lr(n.nestingSuffix):n.nestingSuffixEscaped||lr(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(t,n,i,s){var a=this,o,u,c,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(g){return g.replace(/\$/g,"$$$$")}var f=function(_){if(_.indexOf(a.formatSeparator)<0){var m=sv(n,d,_);return a.alwaysFormat?a.format(m,void 0,i,Ze(Ze(Ze({},s),n),{},{interpolationkey:_})):m}var b=_.split(a.formatSeparator),w=b.shift().trim(),S=b.join(a.formatSeparator).trim();return a.format(sv(n,d,w),S,i,Ze(Ze(Ze({},s),n),{},{interpolationkey:w}))};this.resetRegExp();var h=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(_){return l(_)}},{regex:this.regexp,safeValue:function(_){return a.escapeValue?l(a.escape(_)):l(_)}}];return v.forEach(function(g){for(c=0;o=g.regex.exec(t);){var _=o[1].trim();if(u=f(_),u===void 0)if(typeof h=="function"){var m=h(t,o,s);u=typeof m=="string"?m:""}else if(s&&s.hasOwnProperty(_))u="";else if(p){u=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(t)),u="";else typeof u!="string"&&!a.useRawValueToEscape&&(u=nv(u));var b=g.safeValue(u);if(t=t.replace(o[0],b),p?(g.regex.lastIndex+=u.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,c++,c>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,n){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,u=Ze({},s);u.applyPostProcessor=!1,delete u.defaultValue;function c(h,p){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var g=h.split(new RegExp("".concat(v,"[ ]*{"))),_="{".concat(g[1]);h=g[0],_=this.interpolate(_,u);var m=_.match(/'/g),b=_.match(/"/g);(m&&m.length%2===0&&!b||b.length%2!==0)&&(_=_.replace(/'/g,'"'));try{u=JSON.parse(_),p&&(u=Ze(Ze({},p),u))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),w),"".concat(h).concat(v).concat(_)}return delete u.defaultValue,h}for(;a=this.nestingRegexp.exec(t);){var d=[],l=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var f=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=f.shift(),d=f,l=!0}if(o=n(c.call(this,a[1].trim(),u),u),o&&a[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=nv(o)),o||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(t)),o=""),l&&(o=d.reduce(function(h,p){return i.format(h,p,s.lng,Ze(Ze({},s),{},{interpolationkey:a[1].trim()}))},o.trim())),t=t.replace(a[0],o),this.regexp.lastIndex=0}return t}}]),r})();function fv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function At(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};
3e%2?fv(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):fv(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ux(r){var e=r.toLowerCase().trim(),t={};if(r.indexOf("(")>-1){var n=r.split("(");e=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(e==="currency"&&i.indexOf(":")<0)t.currency||(t.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)t.range||(t.range=i.trim());else{var s=i.split(";");s.forEach(function(a){if(a){var o=a.split(":"),u=xx(o),c=u[0],d=u.slice(1),l=d.join(":").trim().replace(/^'+|'+$/g,"");t[c.trim()]||(t[c.trim()]=l),l==="false"&&(t[c.trim()]=!1),l==="true"&&(t[c.trim()]=!0),isNaN(l)||(t[c.trim()]=parseInt(l,10))}})}}return{formatName:e,formatOptions:t}}function cr(r){var e={};return function(n,i,s){var a=i+JSON.stringify(s),o=e[a];return o||(o=r(i,s),e[a]=o),o(n)}}var zx=(function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};it(this,r),this.logger=ft.create("formatter"),this.options=e,this.formats={number:cr(function(t,n){var i=new Intl.NumberFormat(t,n);return function(s){return i.format(s)}}),currency:cr(function(t,n){var i=new Intl.NumberFormat(t,At(At({},n),{},{style:"currency"}));return function(s){return i.format(s)}}),datetime:cr(function(t,n){var i=new Intl.DateTimeFormat(t,At({},n));return function(s){return i.format(s)}}),relativetime:cr(function(t,n){var i=new Intl.RelativeTimeFormat(t,At({},n));return function(s){return i.format(s,n.range||"day")}}),list:cr(function(t,n){var i=new Intl.ListFormat(t,At({},n));return function(s){return i.format(s)}})},this.init(e)}return st(r,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(t,n){this.formats[t.toLowerCase().trim()]=n}},{key:"addCached",value:function(t,n){this.formats[t.toLowerCase().trim()]=cr(n)}},{key:"format",value:function(t,n,i,s){var a=this,o=n.split(this.formatSeparator),u=o.reduce(function(c,d){var l=Ux(d),f=l.formatName,h=l.formatOptions;if(a.formats[f]){var p=c;try{var v=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},g=v.locale||v.lng||s.locale||s.lng||i;p=a.formats[f](c,g,At(At(At({},h),s),v))}catch(_){a.logger.warn(_)}return p}else a.logger.warn("there was no format function for ".concat(f));return c},t);return u}}]),r})();function hv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function pv(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hv(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):hv(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Gx(r){var e=Vx();return function(){var n=ht(r),i;if(e){var s=ht(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return cn(this,i)}}function Vx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kx(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}var Wx=(function(r){wi(t,r);var e=Gx(t);function t(n,i,s){var a,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return it(this,t),a=e.call(this),xi&&Nt.call(qt(a)),a.backend=n,a.store=i,a.services=s,a.languageUtils=s.languageUtils,a.options=o,a.logger=ft.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=o.maxParallelReads||10,a.readingCalls=0,a.maxRetries=o.maxRetries>=0?o.maxRetries:5,a.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(s,o.backend,o),a}return st(t,[{key:"queueLoad",value:function(i,s,a,o){var u=this,c={},d={},l={},f={};
3return i.forEach(function(h){var p=!0;s.forEach(function(v){var g="".concat(h,"|").concat(v);!a.reload&&u.store.hasResourceBundle(h,v)?u.state[g]=2:u.state[g]<0||(u.state[g]===1?d[g]===void 0&&(d[g]=!0):(u.state[g]=1,p=!1,d[g]===void 0&&(d[g]=!0),c[g]===void 0&&(c[g]=!0),f[v]===void 0&&(f[v]=!0)))}),p||(l[h]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(i,s,a){var o=i.split("|"),u=o[0],c=o[1];s&&this.emit("failedLoading",u,c,s),a&&this.store.addResourceBundle(u,c,a),this.state[i]=s?-1:2;var d={};this.queue.forEach(function(l){Tx(l.loaded,[u],c),Kx(l,i),s&&l.errors.push(s),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(function(f){d[f]||(d[f]={});var h=l.loaded[f];h.length&&h.forEach(function(p){d[f][p]===void 0&&(d[f][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(i,s,a){var o=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:a,tried:u,wait:c,callback:d});return}return this.readingCalls++,this.backend[a](i,s,function(l,f){if(o.readingCalls--,o.waitingReads.length>0){var h=o.waitingReads.shift();o.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(l&&f&&u<o.maxRetries){setTimeout(function(){o.read.call(o,i,s,a,u+1,c*2,d)},c);return}d(l,f)})}},{key:"prepareLoading",value:function(i,s){var a=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var c=this.queueLoad(i,s,o,u);if(!c.toLoad.length)return c.pending.length||u(),null;c.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,s,a){this.prepareLoading(i,s,{},a)}},{key:"reload",value:function(i,s,a){this.prepareLoading(i,s,{reload:!0},a)}},{key:"loadOne",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=i.split("|"),u=o[0],c=o[1];this.read(u,c,"read",void 0,void 0,function(d,l){d&&s.logger.warn("".concat(a,"loading namespace ").concat(c," for language ").concat(u," failed"),d),!d&&l&&s.logger.log("".concat(a,"loaded namespace ").concat(c," for language ").concat(u),l),s.loaded(i,d,l)})}},{key:"saveMissing",value:function(i,s,a,o,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(i,s,a,o,null,pv(pv({},c),{},{isUpdate:u})),!(!i||!i[0])&&this.store.addResource(i[0],s,a,o))}}]),t})(Nt);function Jx(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(tt(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="str
3ing"&&(t.tDescription=e[2]),tt(e[2])==="object"||tt(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(i){t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function vv(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function gv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ct(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gv(Object(t),!0).forEach(function(n){nt(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gv(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Yx(r){var e=Xx();return function(){var n=ht(r),i;if(e){var s=ht(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return cn(this,i)}}function Xx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pn(){}function Zx(r){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(r));e.forEach(function(t){typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}var ui=(function(r){wi(t,r);var e=Yx(t);function t(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(it(this,t),n=e.call(this),xi&&Nt.call(qt(n)),n.options=vv(i),n.services={},n.logger=ft,n.modules={external:[]},Zx(qt(n)),s&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,s),cn(n,qt(n));setTimeout(function(){n.init(i,s)},0)}return n}return st(t,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(a=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var o=Jx();this.options=ct(ct(ct({},o),this.options),vv(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=ct(ct({},o.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function u(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?ft.init(u(this.modules.logger),this.options):ft.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=zx);var d=new Lx(this.options);this.store=new Fx(this.options.resources,this.options);var l=this.services;l.logger=ft,l.resourceStore=this.store,l.languageUtils=d,l.pluralResolver=new Bx(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(l.formatter=u(c),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new Hx(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new Wx(u(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(_){for(var m=arguments.length,b=new Array(m>1?m-1:0),w=1;w<m;w++)b[w-1]=arguments[w];i.emit.apply(i,[_].concat(b))}),this.modules.languageDetector&&(l.languageDetector=u(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=u(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new lv(this.services,this.options),this.translator.on("*",function(_){for(var m=arguments.length,b=new Array(m>1?m-1:0),w=1;w<m;w++)b[w-1]=arguments[w];i.emit.apply(i,[_].concat(b))}),this.modules.external.forEach(function(_){_.init&&_.init(i)})}if(this.format=this.options.interpolation.format,a||(a=Pn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(_){i[_]=function(){var m;return(m=i.store)[_].apply(m,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(_){i[_]=function(){var m;return(m=i.store)[_].apply(m,arguments),i}});var v=Nr(),g=function(){var m=function(w,S){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(S),a(w,S)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return m(null,i.t.bind(i));i.changeLanguage(i.options.lng,m)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),v}},{key:"loadResources",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pn,o=a,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(o=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return o();var c=[],d=function(h){if(h){var p=s.services.languageUtils.toResolveHierarchy(h);p.forEach(function(v){c.indexOf(v)<0&&c.push(v)})}};if(u)d(u);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(f){return d(f)})}
3this.options.preload&&this.options.preload.forEach(function(f){return d(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),o(f)})}else o(null)}},{key:"reloadResources",value:function(i,s,a){var o=Nr();return i||(i=this.languages),s||(s=this.options.ns),a||(a=Pn),this.services.backendConnector.reload(i,s,function(u){o.resolve(),a(u)}),o}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&G_.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s<this.languages.length;s++){var a=this.languages[s];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,s){var a=this;this.isLanguageChangingTo=i;var o=Nr();this.emit("languageChanging",i);var u=function(f){a.language=f,a.languages=a.services.languageUtils.toResolveHierarchy(f),a.resolvedLanguage=void 0,a.setResolvedLanguage(f)},c=function(f,h){h?(u(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,o.resolve(function(){return a.t.apply(a,arguments)}),s&&s(f,function(){return a.t.apply(a,arguments)})},d=function(f){!i&&!f&&a.services.languageDetector&&(f=[]);var h=typeof f=="string"?f:a.services.languageUtils.getBestMatchFromCodes(f);h&&(a.language||u(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(p){c(p,h)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(d):d(i),o}},{key:"getFixedT",value:function(i,s,a){var o=this,u=function c(d,l){var f;if(tt(l)!=="object"){for(var h=arguments.length,p=new Array(h>2?h-2:0),v=2;v<h;v++)p[v-2]=arguments[v];f=o.options.overloadTranslationOptionHandler([d,l].concat(p))}else f=ct({},l);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||a||c.keyPrefix;var g=o.options.keySeparator||".",_=f.keyPrefix?"".concat(f.keyPrefix).concat(g).concat(d):d;return o.t(_,f)};return typeof i=="string"?u.lng=i:u.lngs=i,u.ns=s,u.keyPrefix=a,u}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
3if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var d=function(h,p){var v=s.services.backendConnector.state["".concat(h,"|").concat(p)];return v===-1||v===2};if(a.precheck){var l=a.precheck(this,d);if(l!==void 0)return l}return!!(this.hasResourceBundle(o,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(o,i)&&(!u||d(c,i)))}},{key:"loadNamespaces",value:function(i,s){var a=this,o=Nr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){a.options.ns.indexOf(u)<0&&a.options.ns.push(u)}),this.loadResources(function(u){o.resolve(),s&&s(u)}),o):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var a=Nr();typeof i=="string"&&(i=[i]);var o=this.options.preload||[],u=i.filter(function(c){return o.indexOf(c)<0});return u.length?(this.options.preload=o.concat(u),this.loadResources(function(c){a.resolve(),s&&s(c)}),a):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pn,o=ct(ct(ct({},this.options),s),{isClone:!0}),u=new t(o);(s.debug!==void 0||s.prefix!==void 0)&&(u.logger=u.logger.clone(s));var c=["store","services","language"];return c.forEach(function(d){u[d]=i[d]}),u.services=ct({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new lv(u.services,u.options),u.translator.on("*",function(d){for(var l=arguments.length,f=new Array(l>1?l-1:0),h=1;h<l;h++)f[h-1]=arguments[h];u.emit.apply(u,[d].concat(f))}),u.init(o,a),u.translator.options=u.options,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),t})(Nt);nt(ui,"createInstance",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ui(r,e)});var $e=ui.createInstance();$e.createInstance=ui.createInstance;$e.createInstance;$e.init;$e.loadResources;$e.reloadResources;$e.use;$e.changeLanguage;$e.getFixedT;$e.t;$e.exists;$e.setDefaultNamespace;$e.hasLoadedNamespace;$e.loadNamespaces;$e.loadLanguages;function bl(r){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bl(r)}var V_=[],Qx=V_.forEach,eS=V_.slice;function wl(r){return Qx.call(eS.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}function K_(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":bl(XMLHttpRequest))==="object"}function tS(r){return!!r&&typeof r.then=="function"}function rS(r){return tS(r)?r:Promise.resolve(r)}function nS(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rn={exports:{}},Vr={exports:{}},iS=Vr.exports,_v;function sS(){return _v||(_v=1,(function(r,e){var t=typeof self<"u"?self:iS,n=(function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s})();(function(s){(function(a){var o={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(y){return y&&DataView.prototype.isPrototypeOf(y)}if(o.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
3]"],d=ArrayBuffer.isView||function(y){return y&&c.indexOf(Object.prototype.toString.call(y))>-1};function l(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function f(y){return typeof y!="string"&&(y=String(y)),y}function h(y){var T={next:function(){var k=y.shift();return{done:k===void 0,value:k}}};return o.iterable&&(T[Symbol.iterator]=function(){return T}),T}function p(y){this.map={},y instanceof p?y.forEach(function(T,k){this.append(k,T)},this):Array.isArray(y)?y.forEach(function(T){this.append(T[0],T[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(T){this.append(T,y[T])},this)}p.prototype.append=function(y,T){y=l(y),T=f(T);var k=this.map[y];this.map[y]=k?k+", "+T:T},p.prototype.delete=function(y){delete this.map[l(y)]},p.prototype.get=function(y){return y=l(y),this.has(y)?this.map[y]:null},p.prototype.has=function(y){return this.map.hasOwnProperty(l(y))},p.prototype.set=function(y,T){this.map[l(y)]=f(T)},p.prototype.forEach=function(y,T){for(var k in this.map)this.map.hasOwnProperty(k)&&y.call(T,this.map[k],k,this)},p.prototype.keys=function(){var y=[];return this.forEach(function(T,k){y.push(k)}),h(y)},p.prototype.values=function(){var y=[];return this.forEach(function(T){y.push(T)}),h(y)},p.prototype.entries=function(){var y=[];return this.forEach(function(T,k){y.push([k,T])}),h(y)},o.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function v(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function g(y){return new Promise(function(T,k){y.onload=function(){T(y.result)},y.onerror=function(){k(y.error)}})}function _(y){var T=new FileReader,k=g(T);return T.readAsArrayBuffer(y),k}function m(y){var T=new FileReader,k=g(T);return T.readAsText(y),k}function b(y){for(var T=new Uint8Array(y),k=new Array(T.length),j=0;j<T.length;j++)k[j]=String.fromCharCode(T[j]);return k.join("")}function w(y){if(y.slice)return y.slice(0);var T=new Uint8Array(y.byteLength);return T.set(new Uint8Array(y)),T.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(y){this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:o.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:o.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():o.arrayBuffer&&o.blob&&u(y)?(this._bodyArrayBuffer=w(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||d(y))?this._bodyArrayBuffer=w(y):this._bodyText=y=Object.prototype.toString.call(y):this._bodyText="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var y=v(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var y=v(this);if(y)return y;if(this._bodyBlob)return m(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(b(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(P)}),this.json=function(){return this.text().then(JSON.parse)},this}var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(y){var T=y.toUpperCase();return O.indexOf(T)>-1?T:y}function x(y,T){T=T||{};var k=T.body;if(y instanceof x){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,T.headers||(this.headers=new p(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!k&&y._bodyInit!=null&&(k=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new p(T.headers)),this.method=I(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&k)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(k)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})};function P(y){var T=new FormData;return y.trim().split("&").forEach(function(k){if(k){var j=k.split("="),U=j.shift().replace(/\+/g," "),$=j.join("=").replace(/\+/g," ");T.append(decodeURIComponent(U),decodeURIComponent($))}}),T}function C(y){var T=new p,k=y.replace(/\r?\n[\t ]+/g," ");
3return k.split(/\r?\n/).forEach(function(j){var U=j.split(":"),$=U.shift().trim();if($){var ne=U.join(":").trim();T.append($,ne)}}),T}S.call(x.prototype);function R(y,T){T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in T?T.statusText:"OK",this.headers=new p(T.headers),this.url=T.url||"",this._initBody(y)}S.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},R.error=function(){var y=new R(null,{status:0,statusText:""});return y.type="error",y};var M=[301,302,303,307,308];R.redirect=function(y,T){if(M.indexOf(T)===-1)throw new RangeError("Invalid status code");return new R(null,{status:T,headers:{location:y}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(T,k){this.message=T,this.name=k;var j=Error(T);this.stack=j.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function L(y,T){return new Promise(function(k,j){var U=new x(y,T);if(U.signal&&U.signal.aborted)return j(new a.DOMException("Aborted","AbortError"));var $=new XMLHttpRequest;function ne(){$.abort()}$.onload=function(){var H={status:$.status,statusText:$.statusText,headers:C($.getAllResponseHeaders()||"")};H.url="responseURL"in $?$.responseURL:H.headers.get("X-Request-URL");var K="response"in $?$.response:$.responseText;k(new R(K,H))},$.onerror=function(){j(new TypeError("Network request failed"))},$.ontimeout=function(){j(new TypeError("Network request failed"))},$.onabort=function(){j(new a.DOMException("Aborted","AbortError"))},$.open(U.method,U.url,!0),U.credentials==="include"?$.withCredentials=!0:U.credentials==="omit"&&($.withCredentials=!1),"responseType"in $&&o.blob&&($.responseType="blob"),U.headers.forEach(function(H,K){$.setRequestHeader(K,H)}),U.signal&&(U.signal.addEventListener("abort",ne),$.onreadystatechange=function(){$.readyState===4&&U.signal.removeEventListener("abort",ne)}),$.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return L.polyfill=!0,s.fetch||(s.fetch=L,s.Headers=p,s.Request=x,s.Response=R),a.Headers=p,a.Request=x,a.Response=R,a.fetch=L,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e})(Vr,Vr.exports)),Vr.exports}var mv;function aS(){return mv||(mv=1,(function(r,e){var t;if(typeof fetch=="function"&&(typeof Yt<"u"&&Yt.fetch?t=Yt.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof nS<"u"&&(typeof window>"u"||typeof window.document>"u")){var n=t||sS();n.default&&(n=n.default),e.default=n,r.exports=e.default}})(Rn,Rn.exports)),Rn.exports}var W_=aS();const J_=oe(W_),yv=um({__proto__:null,default:J_},[W_]);function li(r){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},li(r)}var Pt;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Pt=global.fetch:typeof window<"u"&&window.fetch?Pt=window.fetch:Pt=fetch);var on;K_()&&(typeof global<"u"&&global.XMLHttpRequest?on=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(on=window.XMLHttpRequest));var ci;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?ci=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(ci=window.ActiveXObject));!Pt&&yv&&!on&&!ci&&(Pt=J_||yv);typeof Pt!="function"&&(Pt=void 0);var xl=function(e,t){if(t&&li(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},bv=function(e,t,n){Pt(e,t).then(function(i){if(!i.ok)return n(i.statusText||"Error",{status:i.status});i.text().then(function(s){n(null,{status:i.status,data:s})}).catch(n)}).catch(n)},wv=!1,oS=function(e,t,n,i){e.queryStringParams&&(t=xl(t,e.queryStringParams));var s=wl({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);n&&(s["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,o=wl({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},wv?{}:a);try{bv(t,o,i)}catch(u){if(!a||Object.keys(a).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);
3try{Object.keys(a).forEach(function(c){delete o[c]}),bv(t,o,i),wv=!0}catch(c){i(c)}}},uS=function(e,t,n,i){n&&li(n)==="object"&&(n=xl("",n).slice(1)),e.queryStringParams&&(t=xl(t,e.queryStringParams));try{var s;on?s=new on:s=new ci("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var o in a)s.setRequestHeader(o,a[o]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(u){console&&console.log(u)}},lS=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Pt&&t.indexOf("file:")!==0)return oS(e,t,n,i);if(K_()||typeof ActiveXObject=="function")return uS(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function cS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function dS(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function fS(r,e,t){return e&&dS(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function hS(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var pS=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return hS({},n,i||"")},request:lS,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},vS=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};cS(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return fS(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=wl(i,this.options||{},pS()),this.allOptions=s,this.services&&this.options.reloadInterval&&setInterval(function(){return n.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,a){var o=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,i)),u=rS(u),u.then(function(c){if(!c)return a(null,{});var d=o.services.interpolator.interpolate(c,{lng:t.join("+"),ns:i.join("+")});o.loadUrl(d,a,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var a=this;this.options.request(this.options,t,void 0,function(o,u){if(u&&(u.status>=500&&u.status<600||!u.status))return n("failed loading "+t+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return n("failed loading "+t+"; status code: "+u.status,!1);if(!u&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+o.message,!0);if(o)return n(o,!1);var c,d;try{typeof u.data=="string"?c=a.options.parse(u.data,i,s):c=u.data}catch{d="failed parsing "+t+" to json"}if(d)return n(d,!1);n(null,c)})}},{key:"create",value:function(t,n,i,s,a){var o=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(n,i,s),c=0,d=[],l=[];t.forEach(function(f){var h=o.options.addPath;typeof o.options.addPath=="function"&&(h=o.options.addPath(f,n));var p=o.services.interpolator.interpolate(h,{lng:f,ns:n});o.options.request(o.options,p,u,function(v,g){c+=1,d.push(v),l.push(g),c===t.length&&a&&a(d,l)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,a=n.logger,o=i.language;if(!(o&&o.toLowerCase()==="cimode")){var u=[],c=function(l){var f=s.toResolveHierarchy(l);f.forEach(function(h){u.indexOf(h)<0&&u.push(h)})};
3c(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return c(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(l){i.read(d,l,"read",null,null,function(f,h){f&&a.warn("loading namespace ".concat(l," for language ").concat(d," failed"),f),!f&&h&&a.log("loaded namespace ".concat(l," for language ").concat(d),h),i.loaded("".concat(d,"|").concat(l),f,h)})})})}}}]),r})();vS.type="backend";export{SS as A,bS as B,$e as C,vS as D,wS as E,i_ as F,ht as G,cn as H,Sd as I,wx as J,f_ as K,wi as L,st as M,it as N,xS as T,mS as W,T0 as _,kS as a,TS as b,nS as c,RS as d,PS as e,OS as f,ES as g,AS as h,IS as i,qS as j,NS as k,MS as l,LS as m,DS as n,jS as o,$S as p,BS as q,HS as r,FS as s,yS as t,CS as u,GS as v,zS as w,KS as x,VS as y,US as z};

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.