PageSourceSearch

https://dashboard.uptimerobot.com/_next/static/chunks/1ap0ckzcb0321.js

js uptimerobot.com collected 2026-09-24 07:03:33 UTC 266,674 bytes, 283 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="9de2c5a6-c10b-cc65-7220-3ff815cf5c99")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,199308,122057,302551,e=>{"use strict";var t=e.i(843476),i=e.i(605164),s=e.i(604570),r=e.i(271645);e.i(906641);var n=e.i(909276);let o=(0,r.createContext)(null),a=()=>(0,r.useContext)(o);e.s(["PostHogProvider",0,({children:e,bootstrap:a=null})=>{let l=(0,r.useRef)(!1);return!l.current&&n.envConfig.posthogKey&&(s.default.init(n.envConfig.posthogKey,{api_host:"/ingest",autocapture:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,person_profiles:"identified_only",...a?{bootstrap:a}:{}}),l.current=!0),(0,t.jsx)(o.Provider,{value:a,children:(0,t.jsx)(i.PostHogProvider,{client:s.default,children:e})})},"usePostHogBootstrap",0,a],122057),e.s(["useFeatureFlag",0,e=>{let t=(0,i.useFeatureFlagEnabled)(e),s=a();return t??!!s?.featureFlags?.[e]}],302551),e.s([],199308)},803722,e=>{"use strict";var t=e.i(843476),i=e.i(916112),s=e.i(662537),r=e.i(58345),n=e.i(317751),o=e.i(912598),a=e.i(307173),l=e.i(271645),u=e.i(169790);e.i(844677);var c=e.i(201161);e.i(906641);var h=e.i(909276);e.i(183645);var d=e.i(527871);e.i(199308);var p=e.i(122057);e.i(495886);var f=e.i(533791),g=e.i(632592);e.s(["AppProviders",0,function({children:e,unleashToggles:v,posthogBootstrap:_}){let m=(0,d.useToast)();(0,l.useEffect)(()=>{if("production"===h.envConfig.nodeEnv){let e=h.envConfig.gitCommitHash;window.__urVersion__=()=>console.log(`Release version: ${e}`)}},[]);let[y]=(0,l.useState)(()=>new n.QueryClient({queryCache:new r.QueryCache({onError:(e,t)=>{e instanceof u.ZodError?(console.error("Custom ZOD error:"),console.error(e.message)):"local"===h.envConfig.appEnv&&console.error(e),s.captureException(e);let i=t.meta?.skipGlobalErrorHandler;("function"==typeof i?i(e):i)||m({title:"Something went wrong",description:e?.payload?.message,status:"error"})}})}));return(0,t.jsx)(p.PostHogProvider,{bootstrap:_,children:(0,t.jsx)(f.UnleashProvider,{toggles:v,children:(0,t.jsx)(g.WebviewProvider,{children:(0,t.jsx)(i.ChakraProvider,{theme:c.theme,children:(0,t.jsxs)(o.QueryClientProvider,{client:y,children:[(0,t.jsx)(a.ReactQueryDevtools,{position:"left",initialIsOpen:!1}),e]})})})})})}])},498684,e=>{"use strict";var t=e.i(406048),i=e.i(550757),s=e.i(546945),r=e.i(503400),n=e.i(408155),o=e.i(265880);e.i(536084);let{Provider:a,useStore:l}=(0,e.i(739498).createStoreProvider)(()=>(0,n.createStore)()((0,o.immer)(e=>({selectedItems:[],excludedIds:[],actions:{selectAllItems:()=>e(e=>{e.selectedItems=[{id:0,action:"checked",recurrence:0,threshold:0}],e.excludedIds=[]}),deselectAllIds:()=>e(e=>{e.selectedItems=[],e.excludedIds=[]}),select:s=>{e(e=>{e.selectedItems.push(s),e.selectedItems=(0,r.uniqueBy)((0,i.reverse)(e.selectedItems),(0,t.prop)("id"))})},setItemRecurrence:(t,i,s="checked")=>{e(e=>{let r=e.selectedItems.find(e=>e.id===t);r?r.recurrence=i:e.selectedItems.push({id:t,action:s,recurrence:i,threshold:0})})},setItemThreshold:(t,i,s="checked")=>{e(e=>{let r=e.selectedItems.find(e=>e.id===t);r?r.threshold=i:e.selectedItems.push({id:t,action:s,threshold:i,recurrence:0})})},deselect:t=>{e(e=>{e.selectedItems=e.selectedItems.filter(e=>e.id!==t)})},exclude:t=>e(e=>{e.excludedIds.push(t),e.excludedIds=(0,s.unique)((0,i.reverse)(e.excludedIds))}),removeExcludedId:t=>e(e=>{e.excludedIds=e.excludedIds.filter(e=>e!==t)})}}))),"IncidentSortProvider");e.s(["BulkActionsAlertContactsSelectableStoreProvider",0,a,"PRESERVE_DELAY",0,{recurrence:null,threshold:null},"useBulkActionAlertContactsSelectableStore",0,l])},320836,e=>{"use strict";var t=e.i(406048),i=e.i(550757),s=e.i(546945),r=e.i(503400),n=e.i(408155),o=e.i(265880);e.i(536084);let{Provider:a,useStore:l}=(0,e.i(739498).createStoreProvider)(()=>(0,n.createStore)()((0,o.immer)(e=>({selectedItems:[],excludedIds:[],actions:{selectAllItems:()=>e(e=>{e.selectedItems=[{id:0,action:"checked"}],e.excludedIds=[]}),deselectAllIds:()=>e(e=>{e.selectedItems=[],e.excludedIds=[]}),select:s=>{e(e=>{e.selectedItems.push(s),e.selectedItems=(0,r.uniqueBy)((0,i.reverse)(e.selectedItems),(0,t.prop)("id"))})},deselect:t=>{e(e=>{e.selectedItems=e.selectedItems.filter(e=>e.id!==t)})},exclude:t=>e(e=>{e.excludedIds.push(t),e.excludedIds=(0,s.unique)((0,i.reverse)(e.excludedIds))}),removeExcludedId:t=>e(e=>{e.excludedIds=e.excludedIds.filter(e=>e!==t)})}}))),"BulkActionsSelectableProvider");e.s(["BulkActionsSelectableStoreProvider",0,a,"useBulkActionSelectableStore",0,l])},77114,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(595570);let r=(0,i.createContext)(s.NOT_IMPERSONATING);e.s(["ImpersonationProvider",0,function({value:e,children:i}){return(0,t.jsx)(r.Provider,{value:e,children:i})},"useImpersonation",0,function(){return(0,i.useContext)(r)}])},690510,e=>{"use strict";var t=e.i(843476),i=e.i(521466);e.s(["ModalProvider",0,({children:e})=>(0,t.jsx)(i.default.Provider,{children:e})])},698606,996085,69249,e=>{"use strict";let t,i,s;var r,n,o=e.i(843476);e.i(193320);var a=e.i(72507);e.i(183645);var l=e.i(696717);e.i(991624);var u=e.i(176088),c=e.i(271645);let h=Object.create(null);h.open="0",h.close="1",h.ping="2",h.pong="3",h.message="4",h.upgrade="5",h.noop="6";let d=Object.create(null);
2Object.keys(h).forEach(e=>{d[h[e]]=e});let p={type:"error",data:"parser error"},f="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),g="function"==typeof ArrayBuffer,v=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_=({type:e,data:t},i,s)=>{if(f&&t instanceof Blob)if(i)return s(t);else return m(t,s);if(g&&(t instanceof ArrayBuffer||v(t)))if(i)return s(t);else return m(new Blob([t]),s);return s(h[e]+(t||""))},m=(e,t)=>{let i=new FileReader;return i.onload=function(){t("b"+(i.result.split(",")[1]||""))},i.readAsDataURL(e)};function y(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<b.length;e++)w[b.charCodeAt(e)]=e;let x="function"==typeof ArrayBuffer,k=(e,t)=>{if("string"!=typeof e)return{type:"message",data:S(e,t)};let i=e.charAt(0);return"b"===i?{type:"message",data:E(e.substring(1),t)}:d[i]?e.length>1?{type:d[i],data:e.substring(1)}:{type:d[i]}:p},E=(e,t)=>x?S((e=>{let t=.75*e.length,i=e.length,s,r=0,n,o,a,l;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);let u=new ArrayBuffer(t),c=new Uint8Array(u);for(s=0;s<i;s+=4)n=w[e.charCodeAt(s)],o=w[e.charCodeAt(s+1)],a=w[e.charCodeAt(s+2)],l=w[e.charCodeAt(s+3)],c[r++]=n<<2|o>>4,c[r++]=(15&o)<<4|a>>2,c[r++]=(3&a)<<6|63&l;return u})(e),t):{base64:!0,data:e},S=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer;function P(e){return e.reduce((e,t)=>e+t.length,0)}function C(e,t){if(e[0].length===t)return e.shift();let i=new Uint8Array(t),s=0;for(let r=0;r<t;r++)i[r]=e[0][s++],s===e[0].length&&(e.shift(),s=0);return e.length&&s<e[0].length&&(e[0]=e[0].slice(s)),i}function O(e){if(e){var t=e;for(var i in O.prototype)t[i]=O.prototype[i];return t}}O.prototype.on=O.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},O.prototype.once=function(e,t){function i(){this.off(e,i),t.apply(this,arguments)}return i.fn=t,this.on(e,i),this},O.prototype.off=O.prototype.removeListener=O.prototype.removeAllListeners=O.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,s=this._callbacks["$"+e];if(!s)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<s.length;r++)if((i=s[r])===t||i.fn===t){s.splice(r,1);break}return 0===s.length&&delete this._callbacks["$"+e],this},O.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),i=this._callbacks["$"+e],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,r=i.length;s<r;++s)i[s].apply(this,t)}return this},O.prototype.emitReserved=O.prototype.emit,O.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},O.prototype.hasListeners=function(e){return!!this.listeners(e).length};let T="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),F="u">typeof self?self:"u">typeof window?window:Function("return this")();function A(e,...t){return t.reduce((t,i)=>(e.hasOwnProperty(i)&&(t[i]=e[i]),t),{})}let I=F.setTimeout,R=F.clearTimeout;function $(e,t){t.useNativeTimers?(e.setTimeoutFn=I.bind(F),e.clearTimeoutFn=R.bind(F)):(e.setTimeoutFn=F.setTimeout.bind(F),e.clearTimeoutFn=F.clearTimeout.bind(F))}function M(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class q extends Error{constructor(e,t,i){super(e),this.description=t,this.context=i,this.type="TransportError"}}class L extends O{constructor(e){super(),this.writable=!1,$(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,i){return super.emitReserved("error",new q(e,t,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}
2onData(e){let t=k(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){let t=function(e){let t="";for(let i in e)e.hasOwnProperty(i)&&(t.length&&(t+="&"),t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return t}(e);return t.length?"?"+t:""}}class D extends L{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)};((e,t)=>{let i=e.split("\x1e"),s=[];for(let e=0;e<i.length;e++){let r=k(i[e],t);if(s.push(r),"error"===r.type)break}return s})(e,this.socket.binaryType).forEach(t),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){var t;let i,s,r;this.writable=!1,t=e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})},s=Array(i=e.length),r=0,e.forEach((e,n)=>{_(e,!1,e=>{s[n]=e,++r===i&&t(s.join("\x1e"))})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=M()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let j=!1;try{j="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}let N=j;function B(){}class H extends D{constructor(e){if(super(e),"u">typeof location){const t="https:"===location.protocol;let i=location.port;i||(i=t?"443":"80"),this.xd="u">typeof location&&e.hostname!==location.hostname||i!==e.port}}doWrite(e,t){let i=this.request({method:"POST",data:e});i.on("success",t),i.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class z extends O{constructor(e,t,i){super(),this.createRequest=e,$(this,i),this._opts=i,this._method=i.method||"GET",this._uri=t,this._data=void 0!==i.data?i.data:null,this._create()}_create(){var e;let t=A(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(t);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let e in i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&i.setRequestHeader(e,this._opts.extraHeaders[e])}catch(e){}if("POST"===this._method)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{i.setRequestHeader("Accept","*/*")}catch(e){}null==(e=this._opts.cookieJar)||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var e;3===i.readyState&&(null==(e=this._opts.cookieJar)||e.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof i.status?i.status:0)},0))},i.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}"u">typeof document&&(this._index=z.requestsCount++,z.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=B,e)try{this._xhr.abort()}catch(e){}"u">typeof document&&delete z.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function U(){for(let e in z.requests)z.requests.hasOwnProperty(e)&&z.requests[e].abort()}z.requestsCount=0,z.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",U):"function"==typeof addEventListener&&addEventListener("onpagehide"in F?"pagehide":"unload",U,!1));let W=(s=V({xdomain:!1}))&&null!==s.responseType;function V(e){let t=e.xdomain;try{if("u">typeof XMLHttpRequest&&(!t||N))return new XMLHttpRequest}catch(e){}if(!t)try{return new F[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}let G="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class K extends L{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,i=G?{}:A(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,i)}catch(e){return this.emitReserved("error",e)}
2this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],s=t===e.length-1;_(i,this.supportsBinary,e=>{try{this.doWrite(i,e)}catch(e){}s&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=M()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}let Q=F.WebSocket||F.MozWebSocket,Y={websocket:class extends K{createSocket(e,t,i){return G?new Q(e,t,i):t?new Q(e,t):new Q(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends L{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{var s,r;let n,o,a,l,u=(s=Number.MAX_SAFE_INTEGER,r=this.socket.binaryType,i||(i=new TextDecoder),n=[],o=0,a=-1,l=!1,new TransformStream({transform(e,t){for(n.push(e);;){if(0===o){if(1>P(n))break;let e=C(n,1);l=(128&e[0])==128,o=(a=127&e[0])<126?3:126===a?1:2}else if(1===o){if(2>P(n))break;let e=C(n,2);a=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),o=3}else if(2===o){if(8>P(n))break;let e=C(n,8),i=new DataView(e.buffer,e.byteOffset,e.length),s=i.getUint32(0);if(s>2097151){t.enqueue(p);break}a=0x100000000*s+i.getUint32(4),o=3}else{if(P(n)<a)break;let e=C(n,a);t.enqueue(k(l?e:i.decode(e),r)),o=0}if(0===a||a>s){t.enqueue(p);break}}}})),c=e.readable.pipeThrough(u).getReader(),h=new TransformStream({transform(e,i){var s;s=t=>{let s,r=t.length;if(r<126)new DataView((s=new Uint8Array(1)).buffer).setUint8(0,r);else if(r<65536){let e=new DataView((s=new Uint8Array(3)).buffer);e.setUint8(0,126),e.setUint16(1,r)}else{let e=new DataView((s=new Uint8Array(9)).buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(s[0]|=128),i.enqueue(s),i.enqueue(t)},f&&e.data instanceof Blob?e.data.arrayBuffer().then(y).then(s):g&&(e.data instanceof ArrayBuffer||v(e.data))?s(y(e.data)):_(e,!1,e=>{t||(t=new TextEncoder),s(t.encode(e))})}});h.readable.pipeTo(e.writable),this._writer=h.writable.getWriter();let d=()=>{c.read().then(({done:e,value:t})=>{e||(this.onPacket(t),d())}).catch(e=>{})};d();let m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this._writer.write(m).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],s=t===e.length-1;this._writer.write(i).then(()=>{s&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null==(e=this._transport)||e.close()}},polling:class extends H{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=W&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new z(V,this.uri(),e)}}},J=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Z(e){var t,i;let s,r;if(e.length>8e3)throw"URI too long";let n=e,o=e.indexOf("["),a=e.indexOf("]");-1!=o&&-1!=a&&(e=e.substring(0,o)+e.substring(o,a).replace(/:/g,";")+e.substring(a,e.length));let l=J.exec(e||""),u={},c=14;for(;c--;)u[X[c]]=l[c]||"";return -1!=o&&-1!=a&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),s=(t=u.path).replace(/\/{2,9}/g,"/").split("/"),("/"==t.slice(0,1)||0===t.length)&&s.splice(0,1),"/"==t.slice(-1)&&s.splice(s.length-1,1),u.pathNames=s,i=u.query,r={},i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,i){t&&(r[t]=i)}),u.queryKey=r,u}let ee="function"==typeof addEventListener&&"function"==typeof removeEventListener,et=[];ee&&addEventListener("offline",()=>
2{et.forEach(e=>e())},!1);class ei extends O{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const i=Z(e);t.hostname=i.host,t.secure="https"===i.protocol||"wss"===i.protocol,t.port=i.port,i.query&&(t.query=i.query)}else t.host&&(t.hostname=Z(t.host).host);$(this,t),this.secure=null!=t.secure?t.secure:"u">typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("u">typeof location?location.hostname:"localhost"),this.port=t.port||("u">typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},i=e.split("&");for(let e=0,s=i.length;e<s;e++){let s=i[e].split("=");
2t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}(this.opts.query)),ee&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},et.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let i=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](i)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let e=this.opts.rememberUpgrade&&ei.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",ei.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let t=Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let i=this.writeBuffer[t].data;if(i&&(e+="string"==typeof i?function(e){let t=0,i=0;for(let s=0,r=e.length;s<r;s++)(t=e.charCodeAt(s))<128?i+=1:t<2048?i+=2:t<55296||t>=57344?i+=3:(s++,i+=4);return i}(i):Math.ceil(1.33*(i.byteLength||i.size))),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,T(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,i){return this._sendPacket("message",e,t,i),this}send(e,t,i){return this._sendPacket("message",e,t,i),this}_sendPacket(e,t,i,s){if("function"==typeof t&&(s=t,t=void 0),"function"==typeof i&&(s=i,i=null),"closing"===this.readyState||"closed"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;let r={type:e,data:t,options:i};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),s&&this.once("flush",s),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},i=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():e()}):this.upgrading?i():e()),this}_onError(e){if(ei.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ee&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=et.indexOf(this._offlineEventListener);-1!==e&&et.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=4;class es extends ei{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),i=!1;ei.priorWebsocketSuccess=!1;let s=()=>{i||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!i)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;ei.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{i||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}
2]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function r(){i||(i=!0,u(),t.close(),t=null)}let n=e=>{let i=Error("probe error: "+e);i.transport=t.name,r(),this.emitReserved("upgradeError",i)};function o(){n("transport closed")}function a(){n("socket closed")}function l(e){t&&e.name!==t.name&&r()}let u=()=>{t.removeListener("open",s),t.removeListener("error",n),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",s),t.once("error",n),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{i||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let i=0;i<e.length;i++)~this.transports.indexOf(e[i])&&t.push(e[i]);return t}}class er extends es{constructor(e,t={}){const i="object"==typeof e?e:t;(!i.transports||i.transports&&"string"==typeof i.transports[0])&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(e=>Y[e]).filter(e=>!!e)),super(e,i)}}er.protocol;let en="function"==typeof ArrayBuffer,eo=Object.prototype.toString,ea="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===eo.call(Blob),el="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===eo.call(File);function eu(e){return en&&(e instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer))||ea&&e instanceof Blob||el&&e instanceof File}let ec=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(r=n||(n={}))[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK";class eh extends O{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof e?{reviver:e}:e)}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let i=(t=this.decodeString(e)).type===n.BINARY_EVENT;i||t.type===n.BINARY_ACK?(t.type=i?n.EVENT:n.ACK,this.reconstructor=new ed(t)):super.emitReserved("decoded",t)}else if(eu(e)||e.base64)if(this.reconstructor)(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+e)}decodeString(e){let t=0,i={type:Number(e.charAt(0))};if(void 0===n[i.type])throw Error("unknown packet type "+i.type);if(i.type===n.BINARY_EVENT||i.type===n.BINARY_ACK){let s=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);let r=e.substring(s,t);if(r!=Number(r)||"-"!==e.charAt(t))throw Error("Illegal attachments");let n=Number(r);if(!ep(n)||n<1)throw Error("Illegal attachments");if(n>this.opts.maxAttachments)throw Error("too many attachments");i.attachments=n}if("/"===e.charAt(t+1)){let s=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);i.nsp=e.substring(s,t)}else i.nsp="/";let s=e.charAt(t+1);if(""!==s&&Number(s)==s){let s=t+1;for(;++t;){let i=e.charAt(t);if(null==i||Number(i)!=i){--t;break}if(t===e.length)break}i.id=Number(e.substring(s,t+1))}if(e.charAt(++t)){let s=this.tryParse(e.substr(t));if(eh.isPayloadValid(i.type,s))i.data=s;else throw Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case n.CONNECT:return ef(t);case n.DISCONNECT:return void 0===t;case n.CONNECT_ERROR:return"string"==typeof t||ef(t);case n.EVENT:case n.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ec.indexOf(t[0]));case n.ACK:case n.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ed{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t,i;let e=(t=this.reconPack,i=this.buffers,t.data=function e(t,i){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<i.length)return i[t.num];throw Error("illegal attachments")}if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=e(t[s],i);else if("object"==typeof t)for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=e(t[s],i));return t}(t.data,i),delete t.attachments,t);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let ep=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function ef(e){return"[object Object]"===Object.prototype.toString.call(e)}function eg(e,t,i){return e.on(t,i),function(){e.off(t,i)}}e.s(["Decoder",0,eh,"Encoder",0,class{constructor(e){this.replacer=e}encode(e){return(e.type===n.EVENT||e.type===n.ACK)&&function e(t,i){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let i=0,s=t.length;i<s;i++)if(e(t[i]))return!0;return!1}if(eu(t))return!0;
2if(t.toJSON&&"function"==typeof t.toJSON&&1==arguments.length)return e(t.toJSON(),!0);for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return!0;return!1}(e)?this.encodeAsBinary({type:e.type===n.EVENT?n.BINARY_EVENT:n.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===n.BINARY_EVENT||e.type===n.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t,i,s=(t=[],i=e.data,e.data=function e(t,i,s){if(!t)return t;if(eu(t)){let e={_placeholder:!0,num:i.length};return i.push(t),e}if(Array.isArray(t)){let s=Array(t.length);for(let r=0;r<t.length;r++)s[r]=e(t[r],i);return s}if("object"==typeof t&&!(t instanceof Date)){if(t.toJSON&&"function"==typeof t.toJSON&&!s)return e(t.toJSON(),i,!0);let r={};for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=e(t[s],i));return r}return t}(i,t),e.attachments=t.length,{packet:e,buffers:t}),r=this.encodeAsString(s.packet),n=s.buffers;return n.unshift(r),n}},"PacketType",0,n,"isPacketValid",0,function(e){var t;return"string"==typeof e.nsp&&(void 0===(t=e.id)||ep(t))&&function(e,t){switch(e){case n.CONNECT:return void 0===t||ef(t);case n.DISCONNECT:return void 0===t;case n.EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ec.indexOf(t[0]));case n.ACK:return Array.isArray(t);case n.CONNECT_ERROR:return"string"==typeof t||ef(t);default:return!1}}(e.type,e.data)},"protocol",0,5],351890);let ev=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class e_ extends O{constructor(e,t,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;
2this.subs=[eg(e,"open",this.onopen.bind(this)),eg(e,"packet",this.onpacket.bind(this)),eg(e,"error",this.onerror.bind(this)),eg(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var i,s,r;if(ev.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:n.EVENT,data:t};if(o.options={},o.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){let e=this.ids++,i=t.pop();this._registerAckCallback(e,i),o.id=e}let a=null==(s=null==(i=this.io.engine)?void 0:i.transport)?void 0:s.writable,l=this.connected&&!(null==(r=this.io.engine)?void 0:r._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var i;let s=null!=(i=this.flags.timeout)?i:this._opts.ackTimeout;if(void 0===s){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error("operation has timed out"))},s),n=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};n.withError=!0,this.acks[e]=n}emitWithAck(e,...t){return new Promise((i,s)=>{let r=(e,t)=>e?s(e):i(t);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...s)=>(this._queue[0],null!==e?i.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...s)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;let t=this._queue[0];(!t.pending||e)&&(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:n.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}
2_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case n.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case n.EVENT:case n.BINARY_EVENT:this.onevent(e);break;case n.ACK:case n.BINARY_ACK:this.onack(e);break;case n.DISCONNECT:this.ondisconnect();break;case n.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){let t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length)for(let t of this._anyListeners.slice())t.apply(this,e);super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,i=!1;return function(...s){i||(i=!0,t.packet({type:n.ACK,id:e,data:s}))}}onack(e){let t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:n.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let i=0;i<t.length;i++)if(e===t[i]){t.splice(i,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let i=0;i<t.length;i++)if(e===t[i]){t.splice(i,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let t of this._anyOutgoingListeners.slice())t.apply(this,e.data)}}var em=e.i(351890);function ey(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ey.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),i=Math.floor(t*this.jitter*e);e=(1&Math.floor(10*t))==0?e-i:e+i}return 0|Math.min(e,this.max)},ey.prototype.reset=function(){this.attempts=0},ey.prototype.setMin=function(e){this.ms=e},ey.prototype.setMax=function(e){this.max=e},ey.prototype.setJitter=function(e){this.jitter=e};class eb extends O{constructor(e,t){var i;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,$(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(i=t.randomizationFactor)?i:.5),this.backoff=new ey({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const s=t.parser||em;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null==(t=this.backoff)||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null==(t=this.backoff)||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null==(t=this.backoff)||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new er(this.uri,this.opts);let t=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let s=eg(t,"open",function(){i.onopen(),e&&e()}),r=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},n=eg(t,"error",r);if(!1!==this._timeout){let e=this._timeout,i=this.setTimeoutFn(()=>{s(),r(Error("timeout")),t.close()},e);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(s),this.subs.push(n),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(eg(e,"ping",this.onping.bind(this)),eg(e,"data",this.ondata.bind(this)),eg(e,"error",this.onerror.bind(this)),eg(e,"close",this.onclose.bind(this)),eg(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){T(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new e_(this,e,t),this.nsps[e]=i),i}_destroy(e){for(let e of Object.keys(this.nsps))if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let i=0;i<t.length;
2i++)this.engine.write(t[i],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var i;this.cleanup(),null==(i=this.engine)||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}let ew={};function ex(e,t){let i;"object"==typeof e&&(t=e,e=void 0);let s=function(e,t="",i){let s=e;i=i||"u">typeof location&&location,null==e&&(e=i.protocol+"//"+i.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?i.protocol+e:i.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==i?i.protocol+"//"+e:"https://"+e),s=Z(e)),!s.port&&(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let r=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+r+":"+s.port+t,s.href=s.protocol+"://"+r+(i&&i.port===s.port?"":":"+s.port),s}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,o=s.path,a=ew[n]&&o in ew[n].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?i=new eb(r,t):(ew[n]||(ew[n]=new eb(r,t)),i=ew[n]),s.query&&!t.query&&(t.query=s.queryKey),i.socket(s.path,t)}Object.assign(ex,{Manager:eb,Socket:e_,io:ex,connect:ex}),e.s(["io",0,ex],996085);var ek=e.i(50270),eE=e.i(340358);e.i(906641);var eS=e.i(909276),eP=e.i(823207);e.i(159069);let eC=e=>{let t=e.trim().toLowerCase();if(""===t)return"";let i=t.replace(/^[a-z][a-z0-9+\-.]*:\/\//,"").split(/[?#]/,1)[0]??"";return(i.startsWith("www.")?i.slice(4):i).replace(/\/+$/,"")},eO="check-domain",eT="check-domain-result",eF="check-domain-finished",eA=ek.z.object({domain:ek.z.string()}),eI=ek.z.object({port:ek.z.number()}),eR=ek.z.object({domain:ek.z.string()}),e$=ek.z.object({pages:eA.array().optional(),ports:eI.array().optional(),subDomains:eR.array().optional(),thirdPartyServices:ek.z.unknown().array().optional(),errors:ek.z.unknown().array().optional()}),eM=ek.z.object({pages:ek.z.boolean().optional(),ports:ek.z.boolean().optional(),subDomains:ek.z.boolean().optional(),thirdPartyServices:ek.z.boolean().optional()}),eq=ex(`${eS.envConfig.socketHost}/monitors`,{autoConnect:!1,transports:["websocket"],forceNew:!0}),eL=(e,t)=>{let i=(0,eP.useWebsiteScanActions)(),s=(0,eP.useScannedUrl)(),r=(0,eP.useScanStatus)(),n=(0,eP.useScanResults)(),{mutate:o}=(0,eE.useDisableWebsiteScanMutation)(),a=e?.registrationUrl,l=(0,c.useRef)(a);l.current=a;let u=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=e=>{let t=e$.safeParse(e);if(!t.success)return void console.error("[useEagerScanLifecycle] check-domain-result parse failed",t.error);let s=t.data;if(s.errors&&s.errors.length>0)return void i.failScan("payload");let r=l.current??null,n=null!=r?eC(r):null,o=e=>null!=n&&eC(e)===n;s.pages?.forEach(({domain:e})=>{o(e)||i.addFinding("pages",e)}),s.subDomains?.forEach(({domain:e})=>{o(e)||i.addFinding("subDomains",e)}),s.ports?.forEach(({port:e})=>i.addFinding("ports",e))},t=e=>{let t=eM.safeParse(e);if(!t.success)return void console.error("[useEagerScanLifecycle] check-domain-finished parse failed",t.error);let s=t.data;s.pages&&i.markCategoryFinished("pages"),s.ports&&i.markCategoryFinished("ports"),s.subDomains&&i.markCategoryFinished("subDomains")},s=()=>{let e=u.current;if(null==e)return;u.current=null;let t=eP.useWebsiteScanStore.getState();"scanning"===t.scanStatus&&t.scannedUrl===e&&eq.emit(eO,{url:e.startsWith("http")?e:`https://${e}`,pages:!0,ports:!0,subDomains:!0,thirdPartyServices:!1})},r=()=>{"scanning"===eP.useWebsiteScanStore.getState().scanStatus&&i.failScan("socket")},n=()=>{"scanning"===eP.useWebsiteScanStore.getState().scanStatus&&i.failScan("socket")};eq.on(eT,e),eq.on(eF,t),eq.on("connect",s),eq.on("error",r),eq.on("disconnect",n);let o=null,a=eP.useWebsiteScanStore.subscribe((e,t)=>{e.scanStatus!==t.scanStatus&&("scanning"===e.scanStatus?(null!=o&&clearTimeout(o),o=setTimeout(()=>{"scanning"===eP.useWebsiteScanStore.getState().scanStatus&&i.failScan("timeout")},3e4)):null!=o&&(clearTimeout(o),o=null))});return()=>{eq.off(eT,e),eq.off(eF,t),eq.off("connect",s),eq.off("error",r),eq.off("disconnect",n),eq.disconnect(),a(),null!=o&&clearTimeout(o)}},[i]),(0,c.useEffect)(()=>{var n;if(n={scannedUrl:s,scanStatus:r},!t||!e||null==e.registrationUrl||""===e.registrationUrl||null!=e.steps.WebsiteScan||null!=e.creditsClaimedAt||e.isMinimized||e.websiteScanDisabled||n.scannedUrl===e.registrationUrl&&("scanning"===n.scanStatus||"completed"===n.scanStatus||"error"===n.scanStatus)||0)return;let o=e.registrationUrl;(i.beginScan(o,"live"),eq.connected)?eq.emit(eO,{url:o.startsWith("http")?o:`https://${o}`,pages:!0,ports:!0,subDomains:!0,thirdPartyServices:!1}):(u.current=o,eq.connect())},[a,t,s,r,i,e]);let h=(0,c.useRef)(!1);(0,c.useEffect)(()=>
2{if(h.current||!e||e.websiteScanDisabled||"completed"!==r||s!==e.registrationUrl||(0,eP.hasAnyScanFindings)(n))return;let t=e.registrationUrl,i=setTimeout(()=>{let e=eP.useWebsiteScanStore.getState();"completed"!==e.scanStatus||e.scannedUrl!==t||(0,eP.hasAnyScanFindings)(e.results)||(h.current=!0,o())},2e3);return()=>clearTimeout(i)},[e,r,s,n,o])};e.s(["onboardingScanSocket",0,eq,"useEagerScanLifecycle",0,eL],69249),e.s(["OnboardingScanProvider",0,({children:e})=>{let{user:t}=(0,l.useUser)(),i=(0,u.isOnboardingExperimentUser)(t?.abTests);return eL((0,a.useOnboardingProgressQuery)({enabled:i}).data,i),(0,o.jsx)(o.Fragment,{children:e})}],698606)},253258,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(39839),r=e.i(999769);e.i(183645);var n=e.i(696717);let o=(0,i.createContext)({isWidgetVisible:!1,showWidget:()=>{console.warn("showWidget function is not implemented")},hideWidget:()=>{console.warn("hideWidget function is not implemented")},openManually:()=>{console.warn("openManually function is not implemented")}});e.s(["SupportWidgetVisibilityContext",0,o,"SupportWidgetVisibilityProvider",0,({children:e})=>{let{show:a,update:l}=(0,r.useIntercom)(),u=(0,s.useMediaQuery)("(max-width: 768px)"),{user:c}=(0,n.useUser)(),{preferences:h}=c,[d,p]=(0,i.useState)(h.isSupportWidgetVisible),[f,g]=(0,i.useState)(!1),v=(0,i.useCallback)(()=>p(!0),[]),_=(0,i.useCallback)(()=>p(!1),[]);return(0,i.useEffect)(()=>(f||!u&&d?l({hideDefaultLauncher:!1}):l({hideDefaultLauncher:!0}),()=>{u||l({hideDefaultLauncher:!1})}),[d,f,u]),(0,t.jsx)(o.Provider,{value:{isWidgetVisible:d,showWidget:v,hideWidget:_,openManually:()=>{g(!0),a()}},children:e})}])},632592,e=>{"use strict";var t=e.i(843476),i=e.i(271645),s=e.i(618566);let r=(0,i.createContext)(void 0);function n({onWebviewChange:e}){let t=(0,s.useSearchParams)();return(0,i.useEffect)(()=>{let i="true"===t.get("webview");e(i),i?document.body.setAttribute("data-webview","true"):document.body.removeAttribute("data-webview")},[t,e]),null}e.s(["WebviewProvider",0,function({children:e}){let[s,o]=(0,i.useState)(!1);return(0,t.jsxs)(r.Provider,{value:{isWebview:s},children:[(0,t.jsx)(i.Suspense,{fallback:null,children:(0,t.jsx)(n,{onWebviewChange:o})}),e]})},"useWebviewContext",0,function(){let e=(0,i.useContext)(r);if(void 0===e)throw Error("useWebviewContext must be used within a WebviewProvider");return e}])},823207,768834,e=>{"use strict";var t=e.i(271645),i=e.i(408155);let s=e=>{let s=(0,i.createStore)(e),r=e=>(function(e,i=e=>e){let s=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>i(e.getState()),[e,i]),t.default.useCallback(()=>i(e.getInitialState()),[e,i]));return t.default.useDebugValue(s),s})(s,e);return Object.assign(r,s),r},r=e=>e?s(e):s;e.s(["create",0,r],768834);let n={scannedUrl:null,scanStatus:"idle",startedAt:null,path:null,errorReason:null,results:{pages:[],ports:[],subDomains:[]},finishedCategories:{pages:!1,ports:!1,subDomains:!1}},o=r(e=>({...n,actions:{beginScan:(t,i)=>e({scannedUrl:t,scanStatus:"scanning",startedAt:Date.now(),path:i,errorReason:null,results:{pages:[],ports:[],subDomains:[]},finishedCategories:{pages:!1,ports:!1,subDomains:!1}}),addFinding:(t,i)=>e(e=>{let s=e.results[t];return s.includes(i)?e:{results:{...e.results,[t]:[...s,i]}}}),markCategoryFinished:t=>e(e=>{if(e.finishedCategories[t])return e;let i={...e.finishedCategories,[t]:!0},s=i.pages&&i.ports&&i.subDomains;return{finishedCategories:i,scanStatus:s&&"scanning"===e.scanStatus?"completed":e.scanStatus}}),completeScan:()=>e(e=>({scanStatus:"error"===e.scanStatus?e.scanStatus:"completed",finishedCategories:{pages:!0,ports:!0,subDomains:!0}})),failScan:t=>e(e=>"error"===e.scanStatus?e:{scanStatus:"error",errorReason:t}),reset:()=>e(n)}}));e.s(["countScanFindings",0,e=>e.pages.length+e.ports.length+e.subDomains.length,"hasAnyScanFindings",0,e=>e.pages.length>0||e.ports.length>0||e.subDomains.length>0,"useScanResults",0,()=>o(e=>e.results),"useScanStatus",0,()=>o(e=>e.scanStatus),"useScannedUrl",0,()=>o(e=>e.scannedUrl),"useWebsiteScanActions",0,()=>o(e=>e.actions),"useWebsiteScanStore",0,o],823207)},916112,58345,317751,307173,e=>{"use strict";let t;var i=e.i(692278),s=e.i(843476),r=e.i(66037),n=e.i(598533),n=n,o=e.i(271645),a=e.i(222245);let l="chakra-ui-light",u="chakra-ui-dark",c="chakra-ui-color-mode",h={ssr:!1,type:"localStorage",get(e){let t;if(!globalThis?.document)return e;try{t=localStorage.getItem(c)||e}catch(e){}return t||e},set(e){try{localStorage.setItem(c,e)}catch(e){}}},d=()=>{},p=(0,r.isBrowser)()?o.useLayoutEffect:o.useEffect;function f(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}let g=function(e){let{value:t,children:i,options:{useSystemColorMode:r,initialColorMode:c,disableTransitionOnChange:g}={},colorModeManager:v=h}=e,_=(0,n._)(),m="dark"===c?"dark":"light",[y,b]=(0,o.useState)(()=>f(v,m)),[w,x]=(0,o.useState)(()=>
2f(v)),{getSystemTheme:k,setClassName:E,setDataset:S,addListener:P}=(0,o.useMemo)(()=>(function(e={}){let{preventTransition:t=!0,nonce:i}=e,s={setDataset:e=>{let i=t?s.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,i?.()},setClassName(e){document.body.classList.add(e?u:l),document.body.classList.remove(e?l:u)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme:e=>s.query().matches??"dark"===e?"dark":"light",addListener(e){let t=s.query(),i=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(i):t.addEventListener("change",i),()=>{"function"==typeof t.removeListener?t.removeListener(i):t.removeEventListener("change",i)}},preventTransition(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),void 0!==i&&(e.nonce=i),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(e)})})}}};return s})({preventTransition:g,nonce:_?.nonce}),[g,_?.nonce]),C="system"!==c||y?y:w,O=(0,o.useCallback)(e=>{let t="system"===e?k():e;b(t),E("dark"===t),S(t),v.set(t)},[v,k,E,S]);p(()=>{"system"===c&&x(k())},[]),(0,o.useEffect)(()=>{let e=v.get();e?O(e):"system"===c?O("system"):O(m)},[v,m,c,O]);let T=(0,o.useCallback)(()=>{O("dark"===C?"light":"dark")},[C,O]);(0,o.useEffect)(()=>{if(r)return P(O)},[r,P,O]);let F=(0,o.useMemo)(()=>({colorMode:t??C,toggleColorMode:t?d:T,setColorMode:t?d:O,forced:void 0!==t}),[C,T,O,t]);return(0,s.jsx)(a.ColorModeContext.Provider,{value:F,children:i})};g.displayName="ColorModeProvider";var v=e.i(884364);let _=String.raw,m=_`
3  :root,
4  :host {
5    --chakra-vh: 100vh;
6  }
7
8  @supports (height: -webkit-fill-available) {
9    :root,
10    :host {
11      --chakra-vh: -webkit-fill-available;
12    }
13  }
14
15  @supports (height: -moz-fill-available) {
16    :root,
17    :host {
18      --chakra-vh: -moz-fill-available;
19    }
20  }
21
22  @supports (height: 100dvh) {
23    :root,
24    :host {
25      --chakra-vh: 100dvh;
26    }
27  }
28`,y=()=>(0,s.jsx)(v.Global,{styles:m}),b=({scope:e=""})=>(0,s.jsx)(v.Global,{styles:_`
29      html {
30        line-height: 1.5;
31        -webkit-text-size-adjust: 100%;
32        font-family: system-ui, sans-serif;
33        -webkit-font-smoothing: antialiased;
34        text-rendering: optimizeLegibility;
35        -moz-osx-font-smoothing: grayscale;
36        touch-action: manipulation;
37      }
38
39      body {
40        position: relative;
41        min-height: 100%;
42        margin: 0;
43        font-feature-settings: "kern";
44      }
45
46      ${e} :where(*, *::before, *::after) {
47        border-width: 0;
48        border-style: solid;
49        box-sizing: border-box;
50        word-wrap: break-word;
51      }
52
53      main {
54        display: block;
55      }
56
57      ${e} hr {
58        border-top-width: 1px;
59        box-sizing: content-box;
60        height: 0;
61        overflow: visible;
62      }
63
64      ${e} :where(pre, code, kbd,samp) {
65        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
66        font-size: 1em;
67      }
68
69      ${e} a {
70        background-color: transparent;
71        color: inherit;
72        text-decoration: inherit;
73      }
74
75      ${e} abbr[title] {
76        border-bottom: none;
77        text-decoration: underline;
78        -webkit-text-decoration: underline dotted;
79        text-decoration: underline dotted;
80      }
81
82      ${e} :where(b, strong) {
83        font-weight: bold;
84      }
85
86      ${e} small {
87        font-size: 80%;
88      }
89
90      ${e} :where(sub,sup) {
91        font-size: 75%;
92        line-height: 0;
93        position: relative;
94        vertical-align: baseline;
95      }
96
97      ${e} sub {
98        bottom: -0.25em;
99      }
100
101      ${e} sup {
102        top: -0.5em;
103      }
104
105      ${e} img {
106        border-style: none;
107      }
108
109      ${e} :where(button, input, optgroup, select, textarea) {
110        font-family: inherit;
111        font-size: 100%;
112        line-height: 1.15;
113        margin: 0;
114      }
115
116      ${e} :where(button, input) {
117        overflow: visible;
118      }
119
120      ${e} :where(button, select) {
121        text-transform: none;
122      }
123
124      ${e} :where(
125          button::-moz-focus-inner,
126          [type="button"]::-moz-focus-inner,
127          [type="reset"]::-moz-focus-inner,
128          [type="submit"]::-moz-focus-inner
129        ) {
130        border-style: none;
131        padding: 0;
132      }
133
134      ${e} fieldset {
135        padding: 0.35em 0.75em 0.625em;
136      }
137
138      ${e} legend {
139        box-sizing: border-box;
140        color: inherit;
141        display: table;
142        max-width: 100%;
143        padding: 0;
144        white-space: normal;
145      }
146
147      ${e} progress {
148        vertical-align: baseline;
149      }
150
151      ${e} textarea {
152        overflow: auto;
153      }
154
155      ${e}
155 :where([type="checkbox"], [type="radio"]) {
156        box-sizing: border-box;
157        padding: 0;
158      }
159
160      ${e} input[type="number"]::-webkit-inner-spin-button,
161      ${e} input[type="number"]::-webkit-outer-spin-button {
162        -webkit-appearance: none !important;
163      }
164
165      ${e} input[type="number"] {
166        -moz-appearance: textfield;
167      }
168
169      ${e} input[type="search"] {
170        -webkit-appearance: textfield;
171        outline-offset: -2px;
172      }
173
174      ${e} input[type="search"]::-webkit-search-decoration {
175        -webkit-appearance: none !important;
176      }
177
178      ${e} ::-webkit-file-upload-button {
179        -webkit-appearance: button;
180        font: inherit;
181      }
182
183      ${e} details {
184        display: block;
185      }
186
187      ${e} summary {
188        display: list-item;
189      }
190
191      template {
192        display: none;
193      }
194
195      [hidden] {
196        display: none !important;
197      }
198
199      ${e} :where(
200          blockquote,
201          dl,
202          dd,
203          h1,
204          h2,
205          h3,
206          h4,
207          h5,
208          h6,
209          hr,
210          figure,
211          p,
212          pre
213        ) {
214        margin: 0;
215      }
216
217      ${e} button {
218        background: transparent;
219        padding: 0;
220      }
221
222      ${e} fieldset {
223        margin: 0;
224        padding: 0;
225      }
226
227      ${e} :where(ol, ul) {
228        margin: 0;
229        padding: 0;
230      }
231
232      ${e} textarea {
233        resize: vertical;
234      }
235
236      ${e} :where(button, [role="button"]) {
237        cursor: pointer;
238      }
239
240      ${e} button::-moz-focus-inner {
241        border: 0 !important;
242      }
243
244      ${e} table {
245        border-collapse: collapse;
246      }
247
248      ${e} :where(h1, h2, h3, h4, h5, h6) {
249        font-size: inherit;
250        font-weight: inherit;
251      }
252
253      ${e} :where(button, input, optgroup, select, textarea) {
254        padding: 0;
255        line-height: inherit;
256        color: inherit;
257      }
258
259      ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
260        display: block;
261      }
262
263      ${e} :where(img, video) {
264        max-width: 100%;
265        height: auto;
266      }
267
268      [data-js-focus-visible]
269        :focus:not([data-focus-visible-added]):not(
270          [data-focus-visible-disabled]
271        ) {
272        outline: none;
273        box-shadow: none;
274      }
275
276      ${e} select::-ms-expand {
277        display: none;
278      }
279
280      ${m}
281    `});var w=e.i(390550),x=e.i(735734),k=e.i(989028);let E=e=>{let{children:t,colorModeManager:i,portalZIndex:r,resetScope:n,resetCSS:o=!0,theme:a={},environment:l,cssVarsRoot:u,disableEnvironment:c,disableGlobalStyle:h}=e,d=(0,s.jsx)(k.EnvironmentProvider,{environment:l,disabled:c,children:t});return(0,s.jsx)(w.ThemeProvider,{theme:a,cssVarsRoot:u,children:(0,s.jsxs)(g,{colorModeManager:i,options:a.config,children:[o?(0,s.jsx)(b,{scope:n}):(0,s.jsx)(y,{}),!h&&(0,s.jsx)(w.GlobalStyle,{}),r?(0,s.jsx)(x.PortalManager,{zIndex:r,children:d}):d]})})};var S=e.i(677642);let P=(t=i.theme,function({children:e,theme:i=t,toastOptions:r,...n}){return(0,s.jsxs)(E,{theme:i,...n,children:[(0,s.jsx)(S.ToastOptionProvider,{value:r?.defaultOptions,children:e}),(0,s.jsx)(S.ToastProvider,{...r})]})});e.s(["ChakraProvider",0,P],916112);var C=e.i(619273),O=e.i(286491),T=e.i(540143),F=e.i(915823),A=class extends F.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,i){let s=t.queryKey,r=t.queryHash??(0,C.hashQueryKeyByOptions)(s,t),n=this.get(r);return n||(n=new O.Query({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(n)),n}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){T.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,C.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,C.matchQuery)(e,t)):t}notify(e){T.notifyManager.batch(()=>
281{this.listeners.forEach(t=>{t(e)})})}onFocus(){T.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){T.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};e.s(["QueryCache",0,A],58345);var I=e.i(114272),R=F,$=class extends R.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#i=new Map,this.#s=0}#t;#i;#s;build(e,t,i){let s=new I.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:i});return this.add(s),s}add(e){this.#t.add(e);let t=M(e);if("string"==typeof t){let i=this.#i.get(t);i?i.push(e):this.#i.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=M(e);if("string"==typeof t){let i=this.#i.get(t);if(i)if(i.length>1){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}else i[0]===e&&this.#i.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=M(e);if("string"!=typeof t)return!0;{let i=this.#i.get(t),s=i?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=M(e);if("string"!=typeof t)return Promise.resolve();{let i=this.#i.get(t)?.find(t=>
281t!==e&&t.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){T.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#i.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,C.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,C.matchMutation)(e,t))}notify(e){T.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return T.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(C.noop))))}};function M(e){return e.options.scope?.id}var q=e.i(175555),L=e.i(814448),D=class{#r;#n;#o;#a;#l;#u;#c;#h;constructor(e={}){this.#r=e.queryCache||new A,this.#n=e.mutationCache||new $,this.#o=e.defaultOptions||{},this.#a=new Map,this.#l=new Map,this.#u=0}mount(){this.#u++,1===this.#u&&(this.#c=q.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#h=L.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#u--,0===this.#u&&(this.#c?.(),this.#c=void 0,this.#h?.(),this.#h=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),i=this.#r.build(this,t),s=i.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime((0,C.resolveStaleTime)(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,i){let s=this.defaultQueryOptions({queryKey:e}),r=this.#r.get(s.queryHash),n=r?.state.data,o=(0,C.functionalUpdate)(t,n);if(void 0!==o)return this.#r.build(this,s).setData(o,{...i,manual:!0})}setQueriesData(e,t,i){return T.notifyManager.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,i)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;T.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let i=this.#r;return T.notifyManager.batch(()=>(i.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let i={revert:!0,...t};return Promise.all(T.notifyManager.batch(()=>this.#r.findAll(e).map(e=>e.cancel(i)))).then(C.noop).catch(C.noop)}invalidateQueries(e,t={}){return T.notifyManager.batch(()=>(this.#r.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let i={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(T.notifyManager.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,i);return i.throwOnError||(t=t.catch(C.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(C.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let i=this.#r.build(this,t);return i.isStaleByTime((0,C.resolveStaleTime)(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C.noop).catch(C.noop)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C.noop).catch(C.noop)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return L.onlineManager.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#n}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#a.set((0,C.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#a.values()],i={};return t.forEach(t=>{(0,C.partialMatchKey)(e,t.queryKey)&&Object.assign(i,t.defaultOptions)}),i}setMutationDefaults(e,t){this.#l.set((0,C.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],i={};return t.forEach(t=>{(0,C.partialMatchKey)(e,t.mutationKey)&&Object.assign(i,t.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,C.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===C.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#n.clear()}};e.s(["QueryClient",0,D],317751),e.s(["ReactQueryDevtools",0,function(){return null}],307173)},605164,604570,e=>{"use strict";var t,i,s="u">typeof window?window:void 0,r="u">typeof globalThis?globalThis:s;"u"<typeof self&&(r.self=r),"u"<typeof File&&(r.File=function(){});var n=null==r?void 0:r.navigator,o=null==r?void 0:r.document,a=null==r?void 0:r.location,l=null==r?void 0:r.fetch,u=null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest?r.XMLHttpRequest:void 0,c=null==r?void 0:r.AbortController,h=null==r?void 0:r.CompressionStream,d=null==n?void 0:n.userAgent,p=null!=s?s:{},f="1.380.1",g={DEBUG:!1,LIB_VERSION:f,LIB_NAME:"web",JS_SDK_VERSION:f};function v(e,t,i,s,r,n,o){try{var a=e[n](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(s,r)}function _(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function o(e){v(n,s,r,o,a,"next",e)}function a(e){v(n,s,r,o,a,"throw",e)}o(void 0)})}}function m(){return(m=Object.assign.bind()).apply(null,arguments)}function y(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var b,w,x,k=((b={}).GZipJS="gzip-js",b.Base64="base64",b),E=["$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"],S="NativeGzipValidationError",P=e=>e.length>=2&&31===e[0]&&139===e[1],C=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),O=e=>
281{var t=Error("Native gzip produced invalid output: "+e);throw t.name=S,t},T=(w=_(function*(e,t){18>e.size&&O("too-short");var i=new Uint8Array((yield e.slice(0,10).arrayBuffer()));P(i)&&8===i[2]||O("invalid-header");var s=new DataView((yield e.slice(e.size-8).arrayBuffer()));s.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(x)return x;x=[];for(var e=0;256>e;e++){for(var t=e,i=0;8>i;i++)t=1&t?0xedb88320^t>>>1:t>>>1;x[e]=t>>>0}return x})(),i=0xffffffff,s=0;e.length>s;s++)i=t[255&(i^e[s])]^i>>>8;return(0xffffffff^i)>>>0})(t)&&O("invalid-crc");var r=t.length>>>0;s.getUint32(4,!0)!==r&&O("invalid-size")}),function(e,t){return w.apply(this,arguments)});function F(){return(F=_(function*(e,t,i){void 0===t&&(t=!0);try{var s,r=(new TextEncoder).encode(e),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=o.write(r).then(()=>o.close()).catch((s=_(function*(e){try{yield o.abort(e)}catch(e){}throw e}),function(e){return s.apply(this,arguments)})),l=new Response(n.readable).blob(),[u]=yield Promise.all([l,a]);return yield T(u,r),u}catch(e){if(null!=i&&i.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var A=["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"],I=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return A.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function R(e,t){return -1!==e.indexOf(t)}var $=function(e){return e.trim()},M=function(e){return e.replace(/^\$/,"")},q=Object.prototype,L=q.hasOwnProperty,D=q.toString,j=Array.isArray||function(e){return"[object Array]"===D.call(e)},N=e=>"function"==typeof e,B=e=>e===Object(e)&&!j(e),H=e=>{if(B(e)){for(var t in e)if(L.call(e,t))return!1;return!0}return!1},z=e=>void 0===e,U=e=>"[object String]"==D.call(e),W=e=>U(e)&&0===e.trim().length,V=e=>null===e,G=e=>z(e)||V(e),K=e=>"[object Number]"==D.call(e)&&e==e,Q=e=>K(e)&&e>0,Y=e=>"[object Boolean]"===D.call(e),J=e=>R(E,e);function X(e){return null===e||"object"!=typeof e}function Z(e,t){return({}).toString.call(e)==="[object "+t+"]"}function ee(e){return"u">typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var et=[!0,"true",1,"1","yes"],ei=[!1,"false",0,"0","no"];function es(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),K(e)?e>i?(s.warn(" cannot be  greater than max: "+i+". Using max value instead."),i):t>e?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),es(r||i,t,i,s))}class er{constructor(e){this.$t={},this.zt=e.zt,this.Zt=es(e.bucketSize,0,100,e.Gt),this.Qt=es(e.refillRate,0,this.Zt,e.Gt),this.Jt=es(e.refillInterval,0,864e5,e.Gt)}Kt(e,t){var i=Math.floor((t-e.lastAccess)/this.Jt);i>0&&(e.tokens=Math.min(e.tokens+i*this.Qt,this.Zt),e.lastAccess=e.lastAccess+i*this.Jt)}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.$t[s];return r?this.Kt(r,i):this.$t[s]=r={tokens:this.Zt,lastAccess:i},0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.zt)||t.call(this,e)),0===r.tokens)}
281stop(){this.$t={}}}var en,eo,ea,el="Mobile",eu="Android",ec="Tablet",eh=eu+" "+ec,ed="iPad",ep="Apple",ef=ep+" Watch",eg="Safari",ev="BlackBerry",e_="Samsung",em=e_+"Browser",ey=e_+" Internet",eb="Chrome",ew=eb+" OS",ex=eb+" iOS",ek="Internet Explorer",eE=ek+" "+el,eS="Opera",eP=eS+" Mini",eC="Edge",eO="Microsoft "+eC,eT="Firefox",eF=eT+" iOS",eA="Nintendo",eI="PlayStation",eR="Xbox",e$=eu+" "+el,eM=el+" "+eg,eq="Windows",eL=eq+" Phone",eD="Nokia",ej="Ouya",eN="Generic",eB=eN+" "+el.toLowerCase(),eH=eN+" "+ec.toLowerCase(),ez="Konqueror",eU="Oculus Browser",eW="Vivaldi",eV="Yandex",eG="Whale",eK="DuckDuckGo",eQ="Pale Moon",eY="Waterfox",eJ="Brave",eX="(\\d+(\\.\\d+)?)",eZ=RegExp("Version/"+eX),e0=RegExp(eR,"i"),e1=RegExp(eI+" \\w+","i"),e2=RegExp(eA+" \\w+","i"),e3=RegExp(ev+"|PlayBook|BB10","i"),e5={"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"},e6=function(e,t,i){var s;return t=t||"",(null!=i&&i.brave?eJ:null)||(R(e," OPR/")&&R(e,"Mini")?eP:R(e," OPR/")?eS:e3.test(e)?ev:R(e,"IE"+el)||R(e,"WPDesktop")?eE:R(e,"OculusBrowser")?eU:R(e,em)?ey:R(e,eC)||R(e,"Edg/")?eO:R(e,eW+"/")?eW:R(e,"YaBrowser/")?eV:R(e,eG+"/")?eG:R(e,eK+"/")||R(e,"Ddg/")?eK:R(e,"FBIOS")?"Facebook "+el:R(e,"UCWEB")||R(e,"UCBrowser")?"UC Browser":R(e,"CriOS")?ex:R(e,"CrMo")||R(e,eb)?eb:R(e,eu)&&R(e,eg)?e$:R(e,"FxiOS")?eF:R(e.toLowerCase(),ez.toLowerCase())?ez:R(e,eJ+"/")?eJ:(s=t)&&R(s,ep)||R(e,eg)&&!R(e,eb)&&!R(e,eu)?R(e,el)?eM:eg:R(e,"PaleMoon/")?eQ:R(e,eY+"/")?eY:R(e,eT)?eT:R(e,"MSIE")||R(e,"Trident/")?ek:R(e,"Gecko")?eT:"")},e4={[eE]:[RegExp("rv:"+eX)],[eO]:[RegExp(eC+"?\\/"+eX)],[eb]:[RegExp("("+eb+"|CrMo)\\/"+eX)],[ex]:[RegExp("CriOS\\/"+eX)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+eX)],[eg]:[eZ],[eM]:[eZ],[eS]:[RegExp("(Opera|OPR)\\/"+eX)],[eT]:[RegExp(eT+"\\/"+eX)],[eF]:[RegExp("FxiOS\\/"+eX)],[ez]:[RegExp("Konqueror[:/]?"+eX,"i")],[ev]:[RegExp(ev+" "+eX),eZ],[e$]:[RegExp("android\\s"+eX,"i")],[ey]:[RegExp(em+"\\/"+eX)],[eU]:[RegExp("OculusBrowser\\/"+eX)],[eW]:[RegExp(eW+"\\/"+eX)],[eV]:[RegExp("YaBrowser\\/"+eX)],[eG]:[RegExp(eG+"\\/"+eX)],[eJ]:[RegExp(eJ+"\\/"+eX)],[eK]:[RegExp("(DuckDuckGo|Ddg)\\/"+eX)],[eQ]:[RegExp("PaleMoon\\/"+eX)],[eY]:[RegExp(eY+"\\/"+eX)],[ek]:[RegExp("(rv:|MSIE )"+eX)],Mozilla:[RegExp("rv:"+eX)]},e8=function(e,t,i){var s=e4[e6(e,t,i)];if(z(s))return null;for(var r=0;s.length>r;r++){var n=e.match(s[r]);if(n)return parseFloat(n[n.length-2])}return null},e7=[[RegExp(eR+"; "+eR+" (.*?)[);]","i"),e=>[eR,e&&e[1]||""]],[RegExp(eA,"i"),[eA,""]],[RegExp(eI,"i"),[eI,""]],[e3,[ev,""]],[RegExp(eq,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eL,""];if(new RegExp(el).test(t)&&!/IEMobile\b/.test(t))return[eq+" "+el,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=e5[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[eq,s]}return[eq,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=z(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+eu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+eu+")","i"),e=>e&&e[2]?[eu,[e[2],e[3],e[4]||"0"].join(".")]:[eu,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ew,""]],[/Linux|debian/i,["Linux",""]]],e9=function(e){return e2.test(e)?eA:e1.test(e)?eI:e0.test(e)?eR:RegExp(ej,"i").test(e)?ej:RegExp("("+eL+"|WPDesktop)","i").test(e)?eL:/iPad/.test(e)?ed:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ef:e3.test(e)?ev:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eD,"i").test(e)?eD:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(el).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?eu:eh:RegExp("(pda|"+el+")","i").test(e)?eB:RegExp(ec,"i").test(e)&&!RegExp(ec+" pc","i").test(e)?eH:""},te=e=>e instanceof Error,tt={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}},ti=tt.info;function ts(e){var t=[];for(var i in e){var s=e[i];V(s)||z(s)||t.push({key:i,value:function e(t){if(Y(t))return{boolValue:t};if("number"==typeof t)return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if("string"==typeof t)return{stringValue:t};if(j(t))return{arrayValue:{values:t.map(t=>e(t))}};try{return{stringValue:JSON.stringify(t)}}catch(e){return{stringValue:String(t)}}}(s)})}return t}class tr{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(t),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return _(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&j(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
281pFirstLines:0),t.chunkIdMap)),m({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return _(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var o=[n];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,m({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return ea&&i.length===eo||(eo=i.length,ea=i.reduce((i,s)=>{en||(en={});var r=en[s];if(r)i[r[0]]=r[1];else for(var n=e(s),o=n.length-1;o>=0;o--){var a=n[o],l=null==a?void 0:a.filename,u=t[s];if(l&&u){i[l]=u,en[s]=[l,u];break}}return i},{})),ea}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(4>=s){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return m({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function tn(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return z(s)||(n.lineno=s),z(r)||(n.colno=r),n}var to=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ta=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tl=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tu=/\((\S*)(?::(\d+))(?::(\d+))\)/,tc=(e,t)=>{var i=ta.exec(e);if(i){var[,s,r,n]=i;return tn(t,s,"?",+r,+n)}var o=tl.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=tu.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=to(o[1]||"?",o[2]);return tn(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},th=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,td=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tp=(e,t)=>{var i=th.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=td.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?";return[n,r]=to(n,r),tn(t,r,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tf=/\(error: (.*)\)/;class tg{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=U(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?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 Z(e,"DOMException")}isDOMError(e){return Z(e,"DOMError")}}class tv{match(e){return e instanceof Error}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 i=e.message;return String(i.error&&"string"==typeof i.error.message?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class t_{match(e){return Z(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var tm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ty{match(e){return"string"==typeof e}coerce(e,t){var i,[s,r]=this.getInfos(e);return{type:null!=s?s:"Error",value:null!=r?r:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(tm);return s&&(t=s[1],i=s[2]),[t,i]}}var tb=["fatal","error","warning","log","info","debug"];function tw(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");
281if(t>=r.length)return s===i.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class tx{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return ee(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tw(e)}isSeverityLevel(e){return U(e)&&!W(e)&&tb.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var i=e[t];if(te(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tk{match(e){return ee(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+tw(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tE{match(e){return X(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tS{match(e){return Z(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!ee(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return X(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tP="$message",tC="$timestamp",tO=new Set([tP,tC]),tT={enabled:!0,max_bytes:32768};function tF(e){var t;return e?{enabled:null!=(t=e.enabled)?t:tT.enabled,max_bytes:function(e,t){if(!K(e)||e===1/0||e===-1/0)return t;var i=Math.floor(e);return 0>i?t:i}(e.max_bytes,tT.max_bytes)}:m({},tT)}class tA{constructor(e){this.Yt=[],this.Xt=0,this.qt=tF(e)}setConfig(e){this.qt=tF(e),this.er()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,i)=>{if("bigint"==typeof i)return i.toString();if("function"!=typeof i&&"symbol"!=typeof i){if(i instanceof Date)return i.toISOString();if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i&&"object"==typeof i){if(t.has(i))return"[Circular]";t.add(i)}return i}})}catch(e){return}}(e);if(t)try{var i=JSON.parse(t);if(!B(i))return;var s=i[tP],r=i[tC];if(!U(s)||0===s.trim().length||!U(r)&&!K(r))return;return{step:i,json:t}}catch(e){return}}(e);if(t){var i=function(e){if("u">typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),i=0,s=0;t.length>s;s++)"%"===t[s]?(i+=1,s+=2):i+=1;return i}(t.json);i>this.qt.max_bytes||(this.Yt.push({step:t.step,bytes:i}),this.Xt+=i,this.er())}}getAttachable(){return this.Yt.map(e=>e.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}var tI=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,r={k(t){if(s&&(g.DEBUG||p.POSTHOG_DEBUG||i)&&!z(s.console)&&s.console){for(var r=("__rrweb_original__"in s.console[t])?s.console[t].__rrweb_original__:s.console[t],n=arguments.length,o=Array(n>1?n-1:0),a=1;n>a;a++)o[a-1]=arguments[a];r(e,...o)}},debug(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("debug",...t)},info(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("log",...t)},warn(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("warn",...t)},error(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];r.k("error",...t)},critical(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning(e){r.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>tI(e+" "+t,i)};return r}
281,tR=tI("[PostHog.js]"),t$=tR.createLogger,tM=t$("[ExternalScriptsLoader]"),tq=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return tM.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==o?void 0:o.querySelectorAll("script");if(s){for(var r,n=0;s.length>n;n++)if(r=function(){if(s[n].src===t){var e=s[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return r.v}var a=()=>{if(!o)return i("document not found");var s=o.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)o.head.appendChild(s);else{var r,n=o.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):o.body.appendChild(s)}};null!=o&&o.body?a():null==o||o.addEventListener("DOMContentLoaded",a)};p.__PosthogExtensions__=p.__PosthogExtensions__||{},p.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{if("remote-config"!==t){var s;if(e.config.__preview_external_dependency_versioned_paths)s=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var r="/static/"+t+".js?v="+e.version;"toolbar"===t&&(r=r+"&t="+3e5*Math.floor(Date.now()/3e5)),s=e.requestRouter.endpointFor("assets",r)}tq(e,s,i)}else{var n=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");tq(e,n,i)}},p.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);tq(e,s,i)};var tL="$people_distinct_id",tD="$device_id",tj="__alias",tN="__timers",tB="$autocapture_disabled_server_side",tH="$heatmaps_enabled_server_side",tz="$exception_capture_enabled_server_side",tU="$error_tracking_suppression_rules",tW="$error_tracking_capture_extension_exceptions",tV="$web_vitals_enabled_server_side",tG="$dead_clicks_enabled_server_side",tK="$product_tours_enabled_server_side",tQ="$web_vitals_allowed_metrics",tY="$session_recording_remote_config",tJ="$replay_override_sampling",tX="$replay_override_linked_flag",tZ="$replay_override_url_trigger",t0="$replay_override_event_trigger",t1="$sesid",t2="$session_is_sampled",t3="$enabled_feature_flags",t5="$active_feature_flags",t6="$early_access_features",t4="$feature_flag_details",t8="$feature_flag_payloads",t7="$feature_flag_request_id",t9="$override_feature_flags",ie="$override_feature_flag_payloads",it="$stored_person_properties",ii="$stored_group_properties",is="$surveys",ir="$surveys_activated",io="ph_product_tours",ia="$flag_call_reported",il="$flag_call_reported_session_id",iu="$feature_flag_errors",ic="$feature_flag_evaluated_at",ih="$user_state",id="$client_session_props",ip="$capture_rate_limit",ig="$initial_campaign_params",iv="$initial_referrer_info",i_="$initial_person_info",im="$epp",iy="__POSTHOG_TOOLBAR__",ib="$posthog_cookieless",iw="$sdk_debug_extensions_init_method",ix="$sdk_debug_extensions_init_time_ms",ik="$sdk_debug_recording_script_not_loaded",iE="PostHog loadExternalDependency extension not found.",iS="on_reject",iP="always",iC="anonymous",iO="identified",iT="identified_only",iF="visibilitychange",iA="beforeunload",iI="$pageview",iR="$pageleave",i$="$identify",iM="$groupidentify";function iq(e,t){j(e)&&e.forEach(t)}function iL(e,t){if(!G(e))if(j(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,i)=>t(e,i));else for(var i in e)L.call(e,i)&&t(e[i],i)}var iD=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];for(var r of i)for(var n in r)void 0!==r[n]&&(e[n]=r[n]);return e};function ij(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var iN=function(e){try{return e()}catch(e){return}},iB=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){tR.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),tR.critical(e)}}},iH=function(e){var t={};return iL(e,function(e,i){(U(e)&&e.length>0||K(e))&&(t[i]=e)}),t},iz=["herokuapp.com","vercel.app","netlify.app"];function iU(e,t,i,s){var{capture:r=!1,passive:n=!0}=null!=s?s:{};null==e||e.addEventListener(t,i,{capture:r,passive:n})}function iW(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return K(e)&&isFinite(e)&&Math.floor(e)===e});class iV{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||0>e||0>t||0>i||0>s||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");
281var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new iV(r)}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),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new iV(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class iG{constructor(){this.S=0,this.C=0,this.I=new iY}generate(){var e=this.generateOrAbort();if(z(e)){this.S=0;var t=this.generateOrAbort();if(z(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>0x3ffffffffff&&(this.S++,this.T())}return iV.fromFieldsV7(this.S,Math.trunc(this.C/0x40000000),0x3fffffff&this.C,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var iK,iQ=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};s&&!z(s.crypto)&&crypto.getRandomValues&&(iQ=e=>crypto.getRandomValues(e));class iY{constructor(){this.M=new Uint32Array(8),this.R=1/0}nextUint32(){return this.M.length>this.R||(iQ(this.M),this.R=0),this.M[this.R++]}}var iJ=()=>iX().toString(),iX=()=>(iK||(iK=new iG)).generate(),iZ="",i0=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,i1={O:()=>!!o,D(e){tR.error("cookieStore error: "+e)},A(e){if(o){try{for(var t=e+"=",i=o.cookie.split(";").filter(e=>e.length),s=0;i.length>s;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(i1.A(e))||{}}catch(e){}return t},N(e,t,i,s,r){if(o)try{var n="",a="",l=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=o),iZ)return iZ;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+iJ();!iZ&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",iZ=n)}return iZ}(e);if(!i){var s,r=(s=e.match(i0))?s[0]:"";r!==i&&tR.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(o.location.hostname,s);if(i){var u=new Date;u.setTime(u.getTime()+864e5*i),n="; expires="+u.toUTCString()}r&&(a="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+l+a;return c.length>3686.4&&tR.warn("cookieStore warning: large cookie, len="+c.length),o.cookie=c,c}catch(e){return}},q(e,t){if(null!=o&&o.cookie)try{i1.N(e,"",-1,t)}catch(e){return}}},i2=null,i3={O(){if(!V(i2))return i2;var e=!0;if(z(s))e=!1;else try{var t="__mplssupport__";i3.N(t,"xyz"),'"xyz"'!==i3.A(t)&&(e=!1),i3.q(t)}catch(t){e=!1}return e||tR.error("localStorage unsupported; falling back to cookie store"),i2=e,e},D(e){tR.error("localStorage error: "+e)},A(e){try{return null==s?void 0:s.localStorage.getItem(e)}catch(e){i3.D(e)}return null},F(e){try{return JSON.parse(i3.A(e))||{}}catch(e){}return null},N(e,t){try{null==s||s.localStorage.setItem(e,JSON.stringify(t))}catch(e){i3.D(e)}},q(e){try{null==s||s.localStorage.removeItem(e)}catch(e){i3.D(e)}}},i5=[tD,"distinct_id",t1,t2,im,i_,ih],i6={},i4={O:()=>!0,D(e){tR.error("memoryStorage error: "+e)},A:e=>i6[e]||null,F:e=>i6[e]||null,N(e,t){i6[e]=t},q(e){delete i6[e]}},i8=null,i7={O(){if(!V(i8))return i8;if(i8=!0,z(s))i8=!1;else try{var e="__support__";i7.N(e,"xyz"),'"xyz"'!==i7.A(e)&&(i8=!1),i7.q(e)}catch(e){i8=!1}return i8},D(e){tR.error("sessionStorage error: ",e)},A(e){try{return null==s?void 0:s.sessionStorage.getItem(e)}catch(e){i7.D(e)}return null},F(e){try{return JSON.parse(i7.A(e))||null}catch(e){}return null},N(e,t){try{null==s||s.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){i7.D(e)}},q(e){try{null==s||s.sessionStorage.removeItem(e)}catch(e){i7.D(e)}}};class i9{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===iP||this.isRejected()||-1===this.consent&&this.qt.cookieless_mode===iS}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,+!!e,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;
281return i||(t?t+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return R(et,e)?1:R(ei,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,t="localStorage"===e?i3:i1;if(!this.ar||this.ar!==t){this.ar=t;var i="localStorage"===e?i1:i3;i.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(R(et,i.A(this.sr))),i.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[null==n?void 0:n.doNotTrack,null==n?void 0:n.msDoNotTrack,p.doNotTrack].some(e=>R(et,e))}}var se=t$("[Dead Clicks]"),st=()=>!0,si=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(tG)),s=e.instance.config.capture_dead_clicks;return Y(s)?s:!!B(s)||i};class ss{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[tG]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?se.error("failed to load script",t):e()})}hr(){var e;if(o){if(!this.ur&&null!=(e=p.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=B(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ur=p.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ur.start(o),se.info("starting...")}}else se.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,se.info("stopping..."))}}var sr=t$("[SegmentIntegration]"),sn="posthog-js";function so(e,t){var{organization:i,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if("*"!==n&&!n.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var a=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=a,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,h,d,p,f=(null==(l=t.exception)?void 0:l.values)||[],g=f.map(e=>m({},e,{stacktrace:e.stacktrace?m({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>m({},e,{platform:"web:javascript"}))}):void 0})),v={$exception_message:(null==(u=f[0])?void 0:u.value)||t.message,$exception_type:null==(c=f[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(h=f[0])?void 0:h.value)||t.message,$sentry_exception_type:null==(d=f[0])?void 0:d.type,$sentry_tags:t.tags};return i&&s&&(v.$sentry_url=(r||"https://sentry.io/organizations/")+i+"/issues/?project="+s+"&query="+t.event_id),o&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}class sa{constructor(e,t,i,s,r,n){this.name=sn,this.setupOnce=function(o){o(so(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}class sl{constructor(e){this.cr=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(tR.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.cr)}destroy(){var e;null==(e=this.pr)||e.call(this),this.pr=void 0}doPageView(e,t){var i,r=this.gr(e,t);return this.dr={pathname:null!=(i=null==s?void 0:s.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.gr(e,null==(t=this.dr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.dr)?void 0:e.pageViewId}}gr(e,t){var i=this.dr;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:u,maxContentY:c}=r;if(!(z(n)||z(o)||z(a)||z(l)||z(u)||z(c))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var h=n>
2811?es(o/n,0,1,tR):1,d=n>1?es(a/n,0,1,tR):1,p=l>1?es(u/l,0,1,tR):1,f=l>1?es(c/l,0,1,tR):1;s=iD(s,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:f})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var su={[tL]:{exposure:"hidden"},[tj]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[tN]:{exposure:"hidden"},[tB]:{exposure:"event"},[tH]:{exposure:"hidden"},[tz]:{exposure:"event"},[tU]:{exposure:"hidden"},[tW]:{exposure:"event"},[tV]:{exposure:"event"},[tG]:{exposure:"event"},[tK]:{exposure:"hidden"},[tQ]:{exposure:"event"},[tY]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[t1]:{exposure:"hidden"},[t2]:{exposure:"event"},$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"},[t3]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!B(e))return{};for(var t={},i=Object.keys(e),s=0;i.length>s;s++)t["$feature/"+i[s]]=e[i[s]];return t}},[t5]:{exposure:"event"},[t6]:{exposure:"hidden"},[t4]:{exposure:"hidden"},[t8]:{exposure:"event"},[t7]:{exposure:"event"},[t9]:{exposure:"event"},[ie]:{exposure:"hidden"},[it]:{exposure:"hidden"},[ii]:{exposure:"hidden"},[is]:{exposure:"hidden"},[ir]:{exposure:"event"},[io]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[ia]:{exposure:"hidden"},[il]:{exposure:"hidden"},[iu]:{exposure:"hidden"},[ic]:{exposure:"hidden"},[ih]:{exposure:"hidden"},[id]:{exposure:"hidden"},[ip]:{exposure:"hidden"},[ig]:{exposure:"hidden"},[iv]:{exposure:"hidden"},[i_]:{exposure:"hidden"},[im]:{exposure:"hidden"},[tJ]:{exposure:"event"},[tX]:{exposure:"event"},[tZ]:{exposure:"event"},[t0]:{exposure:"event"},[iw]:{exposure:"event"},[ix]:{exposure:"event"},[ik]:{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"}},sc=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],sh=e=>{var t=null==o?void 0:o.createElement("a");return z(t)?null:(t.href=e,t)},sd=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!j(i)||2>i.length)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){tR.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},sp=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[1],n=(s[0]||"").split("?"),o=n[1],a=n[0],l=(o||"").split("&"),u=[],c=0;l.length>c;c++){var h=l[c].split("=");j(h)&&(t.includes(h[0])?u.push(h[0]+"="+i):u.push(l[c]))}var d=a;return null!=o&&(d+="?"+u.join("&")),null!=r&&(d+="#"+r),d},sf=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},sg="https?://(.*)",sv=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],s_=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...sv],sm="<masked>",sy=["li_fat_id"];
281function sb(e,t,i){if(!o)return{};var s,r=t?[...sv,...i||[]]:[],n=sw(sp(o.URL,r,sm),e);return iD((s={},iL(sy,function(e){var t=i1.A(e);s[e]=t||null}),s),n)}function sw(e,t){var i=s_.concat(t||[]),s={};return iL(i,function(t){var i=sd(e,t);s[t]=i||null}),s}function sx(e){var t=e?0===e.search(sg+"google.([^/?]*)")?"google":0===e.search(sg+"bing.com")?"bing":0===e.search(sg+"yahoo.com")?"yahoo":0===e.search(sg+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!V(t)){i.$search_engine=t;var s=o?sd(o.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function sk(){return navigator.language||navigator.userLanguage}var sE="$direct";function sS(){return(null==o?void 0:o.referrer)||sE}function sP(e,t){var i=e?[...sv,...t||[]]:[],s=null==a?void 0:a.href.substring(0,1e3);return{r:sS().substring(0,1e3),u:s?sp(s,i,sm):void 0}}function sC(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:i==sE?sE:null==(t=sh(i))?void 0:t.host};if(s){r.$current_url=s;var n=sh(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,iD(r,sw(s))}return i&&iD(r,sx(i)),r}function sO(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var sT=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class sF{constructor(e,t){if(this.qt=e,this.props={},this.mr=!1,this.yr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.nr=this.br(e),this.load(),e.debug&&tR.info("Persistence loaded",e.persistence,m({},this.props)),this.update_config(e,e,t),this.save(),s){var i=()=>this.flush();iU(s,"beforeunload",i,{capture:!1}),iU(s,"pagehide",i,{capture:!1})}}_r(){var e,t=null==(e=this.qt)?void 0:e.persistence_save_debounce_ms;return K(t)&&t>0?t:0}isDisabled(){return!!this.wr}br(e){-1===sT.indexOf(e.persistence.toLowerCase())&&(tR.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,r=(void 0===(t=e.cookie_persisted_properties||[])&&(t=[]),i=[...i5,...t],m({},i3,{F(e){try{var t={};try{t=i1.F(e)||{}}catch(e){}var i=iD(t,JSON.parse(i3.A(e)||"{}"));return i3.N(e,i),i}catch(e){}return null},N(e,t,s,r,n,o){try{i3.N(e,t,void 0,void 0,o);var a={};i.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&i1.N(e,a,s,r,n,o)}catch(e){i3.D(e)}},q(e,t){try{null==s||s.localStorage.removeItem(e),i1.q(e,t)}catch(e){i3.D(e)}}})),n=e.persistence.toLowerCase();return"localstorage"===n&&i3.O()?i3:"localstorage+cookie"===n&&r.O()?r:"sessionstorage"===n&&i7.O()?i7:"memory"===n?i4:"cookie"===n?i1:r.O()?r:i1}Sr(e){var t=null!=e?e:this.qt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var i=this.props[ic];return!i||"number"!=typeof i||Date.now()-i>t}properties(){var e={};return iL(this.props,(t,i)=>{var s=(e=>{var t=su[e];if(t)return t;for(var[i,s]of sc)if(0===e.indexOf(i))return s})(i);if("derived"===(null==s?void 0:s.exposure)){if(null!=s.shouldSkipFromEventProperties&&s.shouldSkipFromEventProperties(t,i===t3?()=>this.Sr():()=>!1))return;s.transformToEventProperties&&iD(e,s.transformToEventProperties(t))}else s&&"event"!==s.exposure||(e[i]=t)}),e}load(){if(!this.wr){var e=this.nr.F(this.yr);e&&(this.props=iD({},e))}}refreshKey(e){if(!this.wr){var t=this.nr.F(this.yr);t&&e in t?this.kr(e,t[e]):this.Cr(e)}}save(){if(!this.wr){var e=this._r();e>0?z(this.Ir)&&(this.Ir=setTimeout(()=>{this.Ir=void 0,this.Tr()},e)):this.Tr()}}flush(){z(this.Ir)||(clearTimeout(this.Ir),this.Ir=void 0,this.Tr())}Tr(){if(!this.wr){try{var e=JSON.stringify(this.props)+"|"+this.Er+"|"+this.Mr+"|"+this.Rr;if(e===this.Pr)return;this.Pr=e}catch(e){}this.nr.N(this.yr,this.props,this.Er,this.Mr,this.Rr,this.qt.debug)}}remove(){z(this.Ir)||(clearTimeout(this.Ir),this.Ir=void 0),this.nr.q(this.yr,!1),this.nr.q(this.yr,!0),this.Pr=void 0}clear(){this.remove(),this.props={}}register_once(e,t,i){if(B(e)){z(t)&&(t="None"),this.Er=z(i)?this.Or:i;var s=!1;if(iL(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.kr(i,e),s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(B(e)){this.Er=z(t)?this.Or:t;var i=!1;if(iL(e,(t,s)=>{e.hasOwnProperty(s)&&this.props[s]!==t&&(this.kr(s,t),i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Cr(e),this.save())}update_campaign_params(){if(!this.mr){var e=sb(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);H(iH(e))||this.register(e),this.mr=!0}}update_search_keyword(){var e;this.register((e=null==o?void 0:o.referrer)?sx(e):{})}update_referrer_info(){var e;this.register_once({$referrer:sS(),$referring_domain:null!=o&&o.referrer&&(null==(e=sh(o.referrer))?void 0:e.host)||sE},void 0)}set_initial_person_info(){this.props[ig]||this.props[iv]||this.register_once({[i_]:sP(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};iL([iv,ig],t=>{var i=this.props[t];i&&iL(i,function(t,i){e["$initial_"+M(i)]=t})});var t,i,s=this.props[i_];
281return s&&iD(e,(t=sC(s),i={},iL(t,function(e,t){i["$initial_"+M(t)]=e}),i)),e}safe_merge(e){return iL(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.Or=this.Er=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),s=[...t].sort();return i.every((e,t)=>e===s[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var s=this.br(e),r=this.props;this.clear(),this.nr=s,this.props=r,this.save()}}set_disabled(e){this.wr=e,this.wr?this.remove():this.save()}set_cross_subdomain(e){e!==this.Mr&&(this.Mr=e,this.remove(),this.save())}set_secure(e){e!==this.Rr&&(this.Rr=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[tN]||{};i[e]=t,this.kr(tN,i),this.save()}remove_event_timer(e){var t=this.props[tN]||{},i=t[e];return z(i)||(delete t[e],this.kr(tN,t),this.save()),i}get_property(e){return this.props[e]}set_property(e,t){this.kr(e,t),this.save()}kr(e,t){this.props[e]=t}Cr(e){delete this.props[e]}}var sA="events",sI="cancelEvents",sR="survey shown",s$="survey sent",sM="popover",sq=t$("[RateLimiter]");class sL{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sq.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sq.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,{captureEventsBurstLimit:r,captureEventsPerSecond:n}=this,o=(new Date).getTime(),a=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(ip))?t:{tokens:r,last:o};a.tokens+=(o-a.last)/1e3*n,a.last=o,a.tokens>r&&(a.tokens=r);var l=1>a.tokens;return l||e||(a.tokens=Math.max(0,a.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+r+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(s=this.instance.persistence)||s.set_property(ip,a),{isRateLimited:l,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sD=t$("[RemoteConfig]");class sj{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Fr(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 sD.info("Using preloaded remote config",this.remoteConfig),this.Ar(this.remoteConfig),void this.Nr();if(this._instance.Dr())return void sD.warn("Remote config is disabled. Falling back to local config.");this.Lr(e=>{e?(this.Ar(e),this.Nr()):(sD.info("No config found after loading remote JS config. Falling back to JSON."),this.Fr(e=>{this.Ar(e),this.Nr()}))})}catch(e){sD.error("Error loading remote config",e)}}stop(){this.$r&&(clearInterval(this.$r),this.$r=void 0)}refresh(){!this._instance.Dr()&&o&&"hidden"!==o.visibilityState&&this._instance.reloadFeatureFlags()}Nr(){var e;if(!this.$r){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.$r=setInterval(()=>{this.refresh()},t))}}Ar(e){var t;e||sD.error("Failed to fetch remote config from PostHog."),this._instance.Ar(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var sN="gzip-js",sB="base64",sH=Uint8Array,sz=Uint16Array,sU=Uint32Array,sW=new sH([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]),sV=new sH([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]),sG=new sH([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sK=function(e,t){for(var i=new sz(31),s=0;31>s;++s)i[s]=t+=1<<e[s-1];var r=new sU(i[30]);for(s=1;30>s;++s)for(var n=i[s];i[s+1]>n;++n)r[n]=n-i[s]<<5|s;return[i,r]},sQ=sK(sW,2),sY=sQ[1];sQ[0][28]=258,sY[258]=28;for(var sJ=sK(sV,0)[1],sX=new sz(32768),sZ=0;32768>sZ;++sZ){var s0=(43690&sZ)>>>1|(21845&sZ)<<1;sX[sZ]=((65280&(s0=(61680&(s0=(52428&s0)>>>2|(13107&s0)<<2))>>>4|(3855&s0)<<4))>>>8|(255&s0)<<8)>>>1}var s1=function(e,t,i){for(var s=e.length,r=0,n=new sz(t);s>r;++r)++n[e[r]-1];var o,a=new sz(t);for(r=0;t>r;++r)a[r]=a[r-1]+n[r-1]<<1;if(i){o=new sz(1<<t);var l=15-t;for(r=0;s>r;++r)if(e[r])for(var u=r<<4|e[r],c=t-e[r],h=a[e[r]-1]++<<c,d=h|(1<<c)-1;d>=h;++h)o[sX[h]>>>l]=u}else for(o=new sz(s),r=0;s>r;++r)o[r]=sX[a[e[r]-1]++]>>>15-e[r];return o}
281,s2=new sH(288);for(sZ=0;144>sZ;++sZ)s2[sZ]=8;for(sZ=144;256>sZ;++sZ)s2[sZ]=9;for(sZ=256;280>sZ;++sZ)s2[sZ]=7;for(sZ=280;288>sZ;++sZ)s2[sZ]=8;var s3=new sH(32);for(sZ=0;32>sZ;++sZ)s3[sZ]=5;var s5=s1(s2,9,0),s6=s1(s3,5,0),s4=function(e){return(e/8|0)+(7&e&&1)},s8=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof sz?sz:e instanceof sU?sU:sH)(i-t);return s.set(e.subarray(t,i)),s},s7=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8},s9=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8,e[s+2]|=i>>>16},re=function(e,t){for(var i=[],s=0;e.length>s;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new sH(0),0];if(1==r){var o=new sH(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],u=0,c=1,h=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=r-1;)a=i[i[h].f>i[u].f?u++:h++],l=i[u!=c&&i[h].f>i[u].f?u++:h++],i[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var p=new sz(d+1),f=rt(i[c-1],p,0);if(f>t){s=0;var g=0,v=f-t,_=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r>s;++s){var m=n[s].s;if(t>=p[m])break;g+=_-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var y=n[s].s;t>p[y]?g-=1<<t-p[y]++-1:++s}for(;s>=0&&g;--s){var b=n[s].s;p[b]==t&&(--p[b],++g)}f=t}return[new sH(p),f]},rt=function(e,t,i){return -1==e.s?Math.max(rt(e.l,t,i+1),rt(e.r,t,i+1)):t[e.s]=i},ri=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new sz(++t),s=0,r=e[0],n=1,o=function(e){i[s++]=e},a=1;t>=a;++a)if(e[a]==r&&a!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(r),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(r);n=1,r=e[a]}return[i.subarray(0,s),t]},rs=function(e,t){for(var i=0,s=0;t.length>s;++s)i+=e[s]*t[s];return i},rr=function(e,t,i){var s=i.length,r=s4(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;s>n;++n)e[r+n+4]=i[n];return 8*(r+4+s)},rn=function(e,t,i,s,r,n,o,a,l,u,c){s7(t,c++,i),++r[256];for(var h=re(r,15),d=h[0],p=h[1],f=re(n,15),g=f[0],v=f[1],_=ri(d),m=_[0],y=_[1],b=ri(g),w=b[0],x=b[1],k=new sz(19),E=0;m.length>E;++E)k[31&m[E]]++;for(E=0;w.length>E;++E)k[31&w[E]]++;for(var S=re(k,7),P=S[0],C=S[1],O=19;O>4&&!P[sG[O-1]];--O);var T,F,A,I,R=u+5<<3,$=rs(r,s2)+rs(n,s3)+o,M=rs(r,d)+rs(n,g)+o+14+3*O+rs(k,P)+(2*k[16]+3*k[17]+7*k[18]);if($>=R&&M>=R)return rr(t,c,e.subarray(l,l+u));if(s7(t,c,1+($>M)),c+=2,$>M){T=s1(d,p,0),F=d,A=s1(g,v,0),I=g;var q=s1(P,C,0);for(s7(t,c,y-257),s7(t,c+5,x-1),s7(t,c+10,O-4),c+=14,E=0;O>E;++E)s7(t,c+3*E,P[sG[E]]);c+=3*O;for(var L=[m,w],D=0;2>D;++D){var j=L[D];for(E=0;j.length>E;++E)s7(t,c,q[N=31&j[E]]),c+=P[N],N>15&&(s7(t,c,j[E]>>>5&127),c+=j[E]>>>12)}}else T=s5,F=s2,A=s6,I=s3;for(E=0;a>E;++E)if(s[E]>255){s9(t,c,T[257+(N=s[E]>>>18&31)]),c+=F[N+257],N>7&&(s7(t,c,s[E]>>>23&31),c+=sW[N]);var N,B=31&s[E];s9(t,c,A[B]),c+=I[B],B>3&&(s9(t,c,s[E]>>>5&8191),c+=sV[B])}else s9(t,c,T[s[E]]),c+=F[s[E]];return s9(t,c,T[256]),c+F[256]},ro=new sU([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ra=function(){for(var e=new sU(256),t=0;256>t;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),rl=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},ru=!!u||!!l,rc="text/plain",rh=!1,rd=function(e,t,i){void 0===i&&(i=!0);var s,r,n,o,a,[l,u]=e.split("?"),c=m({},t),h=null!=(a=null==u?void 0:u.split("&").map(e=>{var t,[s,r]=e.split("="),n=i&&null!=(t=c[s])?t:r;return delete c[s],s+"="+n}))?a:[],d=(void 0===s&&(s="&"),o=[],iL(c,function(e,t){z(e)||z(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),o[o.length]=n+"="+r)}),o.join(s));return d&&h.push(d),l+"?"+h.join("&")},rp=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),rf=e=>{if(e.tr)return e.tr;var{data:t,compression:i}=e;if(t){if(i===sN){var s,r,n,o,a,l,u,c,h=(s=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new sH(e.length+(e.length>>>1)),s=0,r=function(e){i[s++]=e},n=0;t>n;++n){if(s+5>i.length){var o=new sH(s+8+(t-n<<1));o.set(i),i=o}var a=e.charCodeAt(n);128>a?r(a):(2048>a?r(192|a>>>6):(a>55295&&57344>a?(r(240|(a=65536+(1047552&a)|1023&e.charCodeAt(++n))>>>18),r(128|a>>>12&63)):r(224|a>>>12),r(128|a>>>6&63)),r(128|63&a))}return s8(i,0,s)}(rp(t)),r={mtime:0},n=0xffffffff,o={p(e){for(var t=n,i=0;e.length>i;++i)t=ra[255&t^e[i]]^t>>>8;n=t},d:()=>0xffffffff^n},a=s.length,o.p(s),c=(l=10+(r.filename&&r.filename.length+1||0),u=function(e,t,i,s){var r=e.length,n=new sH(s+r+5*(1+Math.floor(r/7e3))+8),o=n.subarray(s,n.length-8),a=0;if(!t||8>r)for(var l=0;r>=l;l+=65535){var u=l+65535;r>u?a=rr(o,a,e.subarray(l,u)):(o[l]=!0,a=rr(o,a,e.subarray(l,r)))}else{for(var c=ro[t-1],h=c>>>13,d=8191&c,p=(1<<i)-1,f=new sz(32768),g=new sz(p+1),v=Math.ceil(i/3),_=2*v,m=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<_)&p},y=new sU(25e3),b=new sz(288),w=new sz(32),x=0,k=0,E=(l=0,0),S=0,P=0;r>l;
281++l){var C=m(l),O=32767&l,T=g[C];if(f[O]=T,g[C]=O,l>=S){var F=r-l;if((x>7e3||E>24576)&&F>423){a=rn(e,o,0,y,b,w,k,E,P,l-P,a),E=x=k=0,P=l;for(var A=0;286>A;++A)b[A]=0;for(A=0;30>A;++A)w[A]=0}var I=2,R=0,$=d,M=O-T&32767;if(F>2&&C==m(l-M))for(var q=Math.min(h,F)-1,L=Math.min(32767,l),D=Math.min(258,F);L>=M&&--$&&O!=T;){if(e[l+I]==e[l+I-M]){for(var j=0;D>j&&e[l+j]==e[l+j-M];++j);if(j>I){if(I=j,R=M,j>q)break;var N=Math.min(M,j-2),B=0;for(A=0;N>A;++A){var H=l-M+A+32768&32767,z=H-f[H]+32768&32767;z>B&&(B=z,T=H)}}}M+=(O=T)-(T=f[O])+32768&32767}if(R){y[E++]=0x10000000|sY[I]<<18|sJ[R];var U=31&sY[I],W=31&sJ[R];k+=sW[U]+sV[W],++b[257+U],++w[W],S=l+I,++x}else y[E++]=e[l],++b[e[l]]}}a=rn(e,o,!0,y,b,w,k,E,P,l-P,a)}return s8(n,0,s+s4(a)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&rl(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;i.length>=s;++s)e[s+10]=i.charCodeAt(s)}}(u,r),rl(u,c-8,o.d()),rl(u,c-4,a),u);return{contentType:rc,body:h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength),estimatedSize:h.byteLength}}if(i===sB){let e;var d,p="data="+encodeURIComponent("string"==typeof(e=(d=rp(t))?btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):d)?e:rp(e));return{contentType:"application/x-www-form-urlencoded",body:p,estimatedSize:new Blob([p]).size}}var f=rp(t);return{contentType:"application/json",body:f,estimatedSize:new Blob([f]).size}}},rg=e=>{var t,i,s,r=rf(e);return!r||(i=e.compression,s=sd(e.url,"compression"),i!==k.GZipJS&&s!==k.GZipJS&&"gzip"!==s)||((t=r.body)instanceof ArrayBuffer?P(new Uint8Array(t)):ArrayBuffer.isView(t)&&P(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:r}:(rh=!0,{url:((e,t)=>{var[i,s]=e.split("#"),[r,n]=i.split("?");if(!n)return e;var o=n.split("&").filter(e=>e.split("=")[0]!==t).join("&");return r+(o?"?"+o:"")+(s?"#"+s:"")})(e.url,"compression"),encodedBody:rf(m({},e,{compression:void 0,tr:void 0}))})},rv=(rW=_(function*(e){var t=rp(e.data),i=yield function(e,t,i){return F.apply(this,arguments)}(t,g.DEBUG,{rethrow:!0});if(!i)return e;var s=yield i.arrayBuffer();return m({},e,{tr:{contentType:rc,body:s,estimatedSize:s.byteLength}})}),function(e){return rW.apply(this,arguments)}),r_=(e,t)=>rd(e,{_:(new Date).getTime().toString(),ver:g.JS_SDK_VERSION,compression:t}),rm=[];l&&rm.push({transport:"fetch",method(e){var t,{url:i,encodedBody:s}=rg(e),{contentType:r,body:n,estimatedSize:o}=null!=s?s:{},a=new Headers;iL(e.headers,function(e,t){a.append(t,e)}),r&&a.append("Content-Type",r);var u=null;if(c){var h=new c;u={signal:h.signal,timeout:setTimeout(()=>h.abort(),e.timeout)}}l(i,m({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(o||0),body:n,signal:null==(t=u)?void 0:t.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){tR.error(e)}null==e.callback||e.callback(s)})).catch(t=>{tR.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>u?clearTimeout(u.timeout):null)}}),u&&rm.push({transport:"XHR",method(e){var t=new u,{url:i,encodedBody:s}=rg(e);t.open(e.method||"GET",i,!0);var{contentType:r,body:n}=null!=s?s:{};iL(e.headers,function(e,i){t.setRequestHeader(i,e)}),r&&t.setRequestHeader("Content-Type",r),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(4===t.readyState){var i={statusCode:t.status,text:t.responseText};if(200===t.status)try{i.json=JSON.parse(t.responseText)}catch(e){}null==e.callback||e.callback(i)}},t.send(n)}}),null!=n&&n.sendBeacon&&rm.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:i}=rg(e),s=rd(t,{beacon:"1"}),{contentType:r,body:o}=null!=i?i:{};if(!o)return;var a=o instanceof Blob?o:new Blob([o],{type:r});n.sendBeacon(s,a)}catch(e){}}});class ry{constructor(e,t){this.qr=!0,this.jr=[],this.Hr=es((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,tR.createLogger("flush interval"),3e3),this.Ur=e}enqueue(e){this.jr.push(e),this.Br||this.zr()}unload(){this.Vr();var e=Object.values(this.jr.length>0?this.Wr():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Ur(m({},e,{transport:"sendBeacon"}))})}enable(){this.qr=!1,this.zr()}zr(){var e=this;this.qr||(this.Br=setTimeout(()=>{if(this.Vr(),this.jr.length>0){var t=this.Wr();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&j(s.data)&&iL(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.Ur(s)}()}},this.Hr))}Vr(){clearTimeout(this.Br),this.Br=void 0}Wr(){var e={};return iL(this.jr,t=>{var i,s=(t?t.batchKey:null)||t.url;z(e[s])&&(e[s]=m({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.jr=[],e}}var rb=["retriesPerformedSoFar"];class rw{constructor(e){this.Zr=!1,this.Gr=3e3,this.jr=[],this._instance=e,this.jr=[],this.Qr=!0,!z
281(s)&&"onLine"in s.navigator&&(this.Qr=s.navigator.onLine,this.Jr=()=>{this.Qr=!0,this.Kr()},this.Yr=()=>{this.Qr=!1},iU(s,"online",this.Jr),iU(s,"offline",this.Yr))}get length(){return this.jr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=y(e,rb);Q(t)&&(i.url=rd(i.url,{retry_count:t})),this._instance._send_request(m({},i,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==i.callback||i.callback(e):this.Xr(m({retriesPerformedSoFar:t},i))}}))}Xr(e){var t,i,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var r=Math.ceil((i=Math.min(18e5,t=3e3*Math.pow(2,s)))+(Math.random()-.5)*(i-t/2)),n=Date.now()+r;this.jr.push({retryAt:n,requestOptions:e});var o="Enqueued failed request for retry in "+r;navigator.onLine||(o+=" (Browser is offline)"),tR.warn(o),this.Zr||(this.Zr=!0,this.ei())}ei(){(this.ti&&clearTimeout(this.ti),0===this.jr.length)?(this.Zr=!1,this.ti=void 0):this.ti=setTimeout(()=>{this.Qr&&this.jr.length>0&&this.Kr(),this.ei()},this.Gr)}Kr(){var e=Date.now(),t=[],i=this.jr.filter(i=>e>i.retryAt||(t.push(i),!1));if(this.jr=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.ti&&(clearTimeout(this.ti),this.ti=void 0),this.Zr=!1,z(s)||(this.Jr&&(s.removeEventListener("online",this.Jr),this.Jr=void 0),this.Yr&&(s.removeEventListener("offline",this.Yr),this.Yr=void 0)),this.jr))try{this._instance._send_request(m({},e,{transport:"sendBeacon"}))}catch(e){tR.error(e)}this.jr=[]}}class rx{constructor(e){this.ri=()=>{this.ii||(this.ii={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),o=r?Math.max(0,r.scrollHeight-r.clientHeight):0,a=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.ii.lastScrollY=Math.ceil(n),this.ii.maxScrollY=Math.max(n,null!=(e=this.ii.maxScrollY)?e:0),this.ii.maxScrollHeight=Math.max(o,null!=(t=this.ii.maxScrollHeight)?t:0),this.ii.lastContentY=a,this.ii.maxContentY=Math.max(a,null!=(i=this.ii.maxContentY)?i:0),this.ii.maxContentHeight=Math.max(l,null!=(s=this.ii.maxContentHeight)?s:0)},this._instance=e}get ni(){return this._instance.config.scroll_root_selector}getContext(){return this.ii}resetContext(){var e=this.ii;return setTimeout(this.ri,0),e}startMeasuringScrollPosition(){iU(s,"scroll",this.ri,{capture:!0}),iU(s,"scrollend",this.ri,{capture:!0}),iU(s,"resize",this.ri)}scrollElement(){if(!this.ni)return null==s?void 0:s.document.documentElement;for(var e of j(this.ni)?this.ni:[this.ni]){var t=null==s?void 0:s.document.querySelector(e);if(t)return t}}scrollY(){if(this.ni){var e=this.scrollElement();return e&&e.scrollTop||0}return s&&(s.scrollY||s.pageYOffset||s.document.documentElement.scrollTop)||0}scrollX(){if(this.ni){var e=this.scrollElement();return e&&e.scrollLeft||0}return s&&(s.scrollX||s.pageXOffset||s.document.documentElement.scrollLeft)||0}}var rk=e=>sP(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class rE{constructor(e,t,i,s){this.si=e=>{var t=this.oi();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.ai(this._instance)};this.ui.register({[id]:i})}},this._instance=e,this.li=t,this.ui=i,this.ai=s||rk,this.li.onSessionId(this.si)}oi(){return this.ui.props[id]}getSetOnceProps(){var e,t=null==(e=this.oi())?void 0:e.props;return t?"r"in t?sC(t):{$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 iL(iH(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+M(i)]=t}),e}}class rS{constructor(){this.hi={}}on(e,t){return this.hi[e]||(this.hi[e]=[]),this.hi[e].push(t),()=>{this.hi[e]=this.hi[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.hi[e]||[])i(t);for(var s of this.hi["*"]||[])s(e,t)}}var rP=t$("[SessionId]");class rC{on(e,t){return this.ci.on(e,t)}constructor(e,t,i){if(this.di=null,this.vi=[],this.fi=void 0,this.ci=new rS,this.pi=(e,t)=>!(!Q(e)||!Q(t))&&Math.abs(e-t)>
281this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===iP)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.ui=e.persistence,this.gi=void 0,this.mi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.yi=t||iJ,this.bi=i||iJ;var s,r=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*es(this.qt.session_idle_timeout_seconds||1800,60,36e3,rP.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.wi(),this.xi="ph_"+r+"_window_id",this.Si="ph_"+r+"_primary_window_exists",this.ki()){var n=i7.F(this.xi),o=i7.F(this.Si);n&&!o?this.gi=n:i7.q(this.xi),i7.N(this.Si,!0)}if(null!=(s=this.qt.bootstrap)&&s.sessionID)try{var a=(()=>{var e=this.qt.bootstrap.sessionID.replace(/-/g,"");if(32!==e.length)throw Error("Not a valid UUID");if("7"!==e[12])throw Error("Not a UUIDv7");return parseInt(e.substring(0,12),16)})();this.Ci(this.qt.bootstrap.sessionID,(new Date).getTime(),a)}catch(e){rP.error("Invalid sessionID in bootstrap",e)}this.Ii()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return z(this.vi)&&(this.vi=[]),this.vi.push(e),this.mi&&e(this.mi,this.gi),()=>{this.vi=this.vi.filter(t=>t!==e)}}ki(){return"memory"!==this.qt.persistence&&!this.ui.wr&&i7.O()}Ti(e){e!==this.gi&&(this.gi=e,this.ki()&&i7.N(this.xi,e))}Ei(){return this.gi?this.gi:this.ki()?i7.F(this.xi):null}Mi(e){var t=this.di;return!V(t)&&!V(e)&&5e3>Math.abs(e-t)}Ci(e,t,i){var s=t!==this._sessionActivityTimestamp,r=e===this.mi&&i===this._sessionStartTimestamp;this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.mi=e,r&&!s||r&&this.Mi(t)||(this.di=t,this.ui.register({[t1]:[t,e,i]}))}Ri(){var e,t=null==(e=this.qt)?void 0:e.persistence_save_debounce_ms;return Q(t)&&t>0}Pi(){var e;if(!V(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.di){this.Ri()?this.ui.refreshKey(t1):(this.ui.flush(),this.ui.load());var[,t,i]=this.Oi();t===this.mi&&i===this._sessionStartTimestamp&&(this.di=this._sessionActivityTimestamp,this.ui.register({[t1]:[this._sessionActivityTimestamp,null!=(e=this.mi)?e:null,this._sessionStartTimestamp]}),this.ui.flush())}}Li(){var[e]=this.Oi();return Math.max(Q(e)?e:0,Q(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0)}Oi(){var e=this.ui.props[t1];return j(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.di=null,clearTimeout(this.Fi),this.Fi=void 0,this.Ci(null,null,null)}destroy(){this.Pi(),clearTimeout(this.Fi),this.Fi=void 0,this.fi&&s&&(s.removeEventListener(iA,this.fi,{capture:!1}),this.fi=void 0),this.vi=[]}Ii(){this.fi=()=>{this.Pi(),this.ki()&&i7.q(this.Si)},iU(s,iA,this.fi,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.qt.cookieless_mode===iP)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[,s,r]=this.Oi(),n=this.Li(),o=this.Ei(),a=Q(r)&&Math.abs(i-r)>864e5,l=!1,u=!s,c=!u&&!e&&this.pi(i,n);u||c||a?(s=this.yi(),o=this.bi(),rP.info("new session ID generated",{sessionId:s,windowId:o,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}}),r=i,l=!0):o||(o=this.bi(),l=!0);var h=Q(n)&&e&&!a?n:i,d=Q(r)?r:(new Date).getTime();return this.Ti(o),this.Ci(s,h,d),e||this.wi(),l&&this.vi.forEach(e=>e(s,o,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:s,windowId:o,sessionStartTimestamp:d,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:n}}wi(){clearTimeout(this.Fi),this.Fi=setTimeout(()=>{var e=this.Li();if(this.pi((new Date).getTime(),e)){var t=this.mi;this.resetSessionId(),this.ci.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var rO=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&I(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>I(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},rT=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function rF(e,t,i){return rp({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var rA={exact:(e,t)=>
281t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>rT(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!rT(t,e))),icontains:(e,t)=>t.map(rI).some(t=>e.map(rI).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(rI).every(t=>e.map(rI).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},rI=e=>e.toLowerCase();function rR(e,t){return!e||Object.entries(e).every(e=>{var[i,s]=e,r=null==t?void 0:t[i];if(z(r)||V(r))return!1;var n=[String(r)],o=rA[s.operator];return!!o&&o(s.values,n)})}var r$="custom",rM="i.posthog.com",rq=/^\/static\//;class rL{constructor(e){this.Ai={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"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=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+rM,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ai[this.apiHost]||(this.Ai[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":r$),this.Ai[this.apiHost]}Ni(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&rq.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var i=this.Ni(t);if(i)return""+i+t}if(this.region===r$)return this.apiHost+t;var s=rM+t;switch(e){case"assets":return"https://"+this.region+"-assets."+s;case"api":return"https://"+this.region+"."+s}}}var rD=t$("[Surveys]"),rj="seenSurvey_",rN=["popover","widget","api"],rB={ignoreConditions:!1,ignoreDelay:!1,displayType:sM},rH=t$("[PostHog ExternalIntegrations]"),rz={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class rU{constructor(e){this._instance=e}lr(e,t){var i;null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return rH.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=p.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.lr(rz[e],()=>{var i;null==(i=p.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=p.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=p.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[s,r]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(s)}}var rW,rV,rG={},rK=0,rQ=()=>{},rY='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',rJ="Surveys module not available",rX="sanitize_properties is deprecated. Use before_send instead",rZ="Invalid value for property_denylist config: ",r0="posthog",r1=!ru&&-1===(null==d?void 0:d.indexOf("MSIE"))&&-1===(null==d?void 0:d.indexOf("Mozilla")),r2=e=>{var t;return m({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!U(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of iz)if(i===s)return!1;return!0}(null==o?void 0:o.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:rQ,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:a&&U(null==a?void 0:a.search)&&-1!==a.search.indexOf("__posthog_debug=true")||!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,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==s||null==(t=s.location)?void 0:t.protocol),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(e){tR.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:iT,before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:rQ,__preview_eager_load_replay:!1},{rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>="2026-05-30"?250:0})},r3=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],r5=e=>{var t={};
281for(var[i,s]of r3)z(e[i])||(t[s]=e[i]);var r=iD({},t,e);return j(e.property_blacklist)&&(z(e.property_denylist)?r.property_denylist=e.property_blacklist:j(e.property_denylist)?r.property_denylist=[...e.property_blacklist,...e.property_denylist]:tR.error(rZ+e.property_denylist)),r};class r6{constructor(){this.__forceAllowLocalhost=!1}get Di(){return this.__forceAllowLocalhost}set Di(e){tR.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class r4{$i(e,t){if(e){var i=this.qi.indexOf(e);-1!==i&&this.qi.splice(i,1)}return this.qi.push(t),null==t.initialize||t.initialize(),t}ji(){return this.config.cookieless_mode===iP||this.config.cookieless_mode===iS&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new r6,this.Hi=!1,this.version=g.LIB_VERSION,this.Ui=new rS,this.qi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=r2(),this.SentryIntegration=sa,this.sentryIntegration=e=>{var t;return t=so(this,e),{name:sn,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Bi=!1,this.zi=null,this.Vi=null,this.Wi=null,this.scrollManager=new rx(this),this.pageViewManager=new sl(this),this.rateLimiter=new sL(this),this.requestRouter=new rL(this),this.consent=new i9(this),this.externalIntegrations=new rU(this);var e,t=null!=(e=r4.__defaultExtensionClasses)?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.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var s=U(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=U(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>tR.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==r0){var s,r=null!=(s=rG[i])?s:new r4;return r._init(e,t,i),rG[i]=r,rG[r0][i]=r,r}return this._init(e,t,i)}_init(e,t,i){void 0===t&&(t={});var r,n,o=U(e)?e.trim():"";if(!o)return tR.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={},t.debug=this.Zi(t.debug),this.Gi=t,this.Qi=[],t.person_profiles?this.Vi=t.person_profiles:t.process_person&&(this.Vi=t.process_person),this.set_config(iD({},r2(t.defaults),r5(t),{name:i,token:o})),this.config.on_xhr_error&&tR.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:sN;var a=this.Ji();this.persistence=new sF(this.config,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sF(m({},this.config,{persistence:"sessionStorage"}),a);var l=m({},this.persistence.props),u=m({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ki=new ry(e=>this.Yi(e),this.config.request_queue_config),this.Xi=new rw(this),this.__request_queue=[];var c=this.ji();if(c||(this.sessionManager=new rC(this),this.sessionPropsManager=new rE(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(tR.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.en(c)},0)):(tR.info("Initializing extensions synchronously"),this.en(c)),g.DEBUG=g.DEBUG||this.config.debug,g.DEBUG&&tR.info("Starting in debug mode",{this:this,config:t,thisC:m({},this.config),p:l,s:u}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=m({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}
281)),void 0!==(null==(n=t.bootstrap)?void 0:n.distinctID)){var h=t.bootstrap.distinctID,d=this.get_distinct_id(),p=this.persistence.get_property(ih);if(t.bootstrap.isIdentifiedID&&null!=d&&d!==h&&p===iC)this.identify(h);else if(t.bootstrap.isIdentifiedID&&null!=d&&d!==h&&p===iO)tR.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 f=this.config.get_device_id(iJ()),v=t.bootstrap.isIdentifiedID?f:h;this.persistence.set_property(ih,t.bootstrap.isIdentifiedID?iO:iC),this.register({distinct_id:h,$device_id:v})}}if(c)this.register_once({distinct_id:ib,$device_id:null},"");else if(!this.get_distinct_id()){var _=this.config.get_device_id(iJ());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_property(ih,iC)}return iU(s,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var s=i=>{var s=()=>i.anonymousId()||iJ();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(ih,iO)),t()},r=i.user();"then"in r&&N(r.then)?r.then(s):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||sr.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(sr.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(sr.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,iI),identify:e=>s(e,i$),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.tn()):this.tn(),N(this.config._onCapture)&&this.config._onCapture!==rQ&&(tR.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&tR.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}en(e){var t,i,s,r,n,o,a,l=performance.now(),u=m({},r4.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.qi.push(this.featureFlags=null!=(t=this.featureFlags)?t:new u.featureFlags(this)),u.exceptions&&this.qi.push(this.exceptions=null!=(i=this.exceptions)?i:new u.exceptions(this)),u.historyAutocapture&&this.qi.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.qi.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.qi.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.qi.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.qi.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.qi.push(this.surveys=null!=(s=this.surveys)?s:new u.surveys(this)),u.logs&&this.qi.push(this.logs=null!=(r=this.logs)?r:new u.logs(this)),u.conversations&&this.qi.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.qi.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.qi.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.qi.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.qi.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.qi.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,si)),u.toolbar&&this.qi.push(this.toolbar=null!=(o=this.toolbar)?o:new u.toolbar(this)),u.experiments&&this.qi.push(this.experiments=null!=(a=this.experiments)?a:new u.experiments(this)),this.qi.forEac
281h(e=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.rn){var e=this.rn;this.rn=void 0,this.Ar(e)}}),this.nn(c,l)}nn(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.nn(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){tR.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({[iw]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[ix]:s}),this.config.__preview_deferred_init_extensions&&tR.info("PostHog extensions initialized ("+s+"ms)")}Ar(e){var t;o&&o.body?(this.config.__preview_deferred_init_extensions&&(this.rn=e),this.sn=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=R(e.supportedCompression,sN)?sN:R(e.supportedCompression,sB)?sB:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Vi?this.Vi:iT}),this.qi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))):(tR.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Ar(e)},500))}tn(){try{this.config.loaded(this)}catch(e){tR.critical("`loaded` function failed",e)}if(this.an(),this.config.internal_or_test_user_hostname&&null!=a&&a.hostname){var e=a.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.ji())&&this.un()},1),this.ln=new sj(this),this.ln.load()}an(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ki)||e.enable())}_dom_loaded(){this.is_capturing()&&iq(this.__request_queue,e=>this.Yi(e)),this.__request_queue=[],this.an()}_handle_unload(){var e,t,i,s;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.hn()&&this.capture(iR),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(i=this.Ki)||i.unload(),null==(s=this.Xi)||s.unload()):this.hn()&&this.capture(iR,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(r1?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=rd(e.url,{ip:+!!this.config.ip}),e.headers=m({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,s,r=m({},e);r.timeout=r.timeout||6e4,r.url=r_(r.url,r.compression);var n=null!=(t=r.transport)?t:"fetch",o=rm.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),a=null!=(i=null==(s=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===n)return e[t]}(o))?void 0:s.method)?i:o[0].method;if(!a)throw Error("No available transport method");"sendBeacon"!==n&&r.data&&r.compression===sN&&h&&!rh?rv(r).then(e=>{a(e)}).catch(t=>{C(t)?(rh=!0,a(m({},r,{compression:void 0,url:r_(e.url,void 0)}))):((e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return C(e)||t===S})(t)&&(rh=!0),a(r))}):a(r)})(m({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(i=(s=this.config).on_request_error)||i.call(s,t),null==e.callback||e.callback(t)}}))))}Yi(e){this.Xi?this.Xi.retriableRequest(e):this._send_request(e)}_execute_array(e){rK++;try{var t,i=[],s=[],r=[];iq(e,e=>{if(e)if(j(t=e[0]))r.push(e);else if(N(e))try{e.call(this)}catch(t){tR.error("Error executing queued PostHog call",e,t)}else j(e)&&"alias"===t?i.push(e):j(e)&&-1!==t.indexOf("capture")&&N(this[t])?r.push(e):s.push(e)});var n=function(e,t){iq(e,function(e){try{if(j(e[0])){var i=t;iL(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){tR.error("Error executing queued PostHog call",e,t)}})};n(i,this),n(s,this),n(r,this)}finally{rK--}}push(e){if(rK>0&&j(e)&&U(e[0])){var t=r4.prototype[e[0]];N(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var s,r,n,o,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ki){if(this.is_capturing())if(!z(e)&&U(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!U(null==t?void 0:t.$current_url)&&(tR.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.cn||tR.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 c=new Date,h=(null==i?void 0:i.timestamp)||c,d=(null==i?void 0:i.uuid)||iJ(),p={uuid:d,event:e,properties:this.calculateEventProperties(e,t||{},h,d)};e===iI&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),u&&(p.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),(null==i?void 0:i.$set)&&(p.$set=null==i?void 0:i.$set);var f,g,v,_=this.dn(null==i?void 0:i.$set_once,e!==iM,e===i$);if(_&&(p.$set_once=_),null!=i&&i._noTruncate||(r=this.config.properties_string_max_length,n=p,o=e=>U(e)?e.slice(0,r):e,a=new Set,p=function e(t,i){var s;return t!==Object(t)?o?o(t):t:a.has(t)?void 0:(a.add(t),j(t)?(s=[],iq(t,t=>{s.push(e(t))})):(s={},iL(t,(t,i)=>{a.has(t)||(s[i]=e(t,i))}
281)),s)}(n)),p.timestamp=h,z(null==i?void 0:i.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),"survey dismissed"===e||e===s$){var y=null==t?void 0:t.$survey_id,b=null==t?void 0:t.$survey_iteration;(e=>{try{var t,i=(t=""+rj+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+rj+e.id+"_"+e.current_iteration),t);if(localStorage.getItem(i))return;localStorage.setItem(i,"true")}catch(e){rD.error("Failed to persist survey seen state",e)}})({id:y,current_iteration:b}),p.$set=m({},p.$set,{[(f={id:y,current_iteration:b},v="$survey_"+(g=e===s$?"responded":"dismissed")+"/"+f.id,f.current_iteration&&f.current_iteration>0&&(v="$survey_"+g+"/"+f.id+"/"+f.current_iteration),v)]:!0})}else e===sR&&(p.$set=m({},p.$set,{$survey_last_seen_date:(new Date).toISOString()}));if("product tour shown"===e){var w=null==t?void 0:t.$product_tour_type;w&&(p.$set=m({},p.$set,{["$product_tour_last_seen_date/"+w]:(new Date).toISOString()}))}var x=m({},p.properties.$set,p.$set);if(H(x)||this.setPersonPropertiesForFlags(x),!G(this.config.before_send)){var k=this.vn(p);if(!k)return;p=k}this.Ui.emit("eventCaptured",p);var E={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==i?void 0:i._batchKey,transport:null==i?void 0:i.transport};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.Yi(E):this.Ki.enqueue(E),p}tR.critical("This capture call is ignored due to client rate limiting.")}}else tR.error("No event name provided to posthog.capture")}else tR.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,r,n){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var l,u=n?void 0:this.persistence.remove_event_timer(e),c=m({},t);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.ji()&&(c.$cookieless_mode=!0),"$snapshot"===e){var h=m({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=h.distinct_id,(!U(c.distinct_id)&&!K(c.distinct_id)||W(c.distinct_id))&&tR.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var p,f=function(e,t){if(!d)return{};var i,r,n,o,l,u,c,h,p,f,v,_,m=e?[...sv,...t||[]]:[],[y,b]=function(e){for(var t=0;e7.length>t;t++){var[i,s]=e7[t],r=i.exec(e),n=r&&(N(s)?s(r,e):s);if(n)return n}return["",""]}(d),w=null!=(l="u">typeof navigator?navigator:void 0)&&l.brave?{brave:!0}:{},x=iD(iH({$os:y,$os_version:b,$browser:e6(d,navigator.vendor,w),$device:e9(d),$device_type:(c={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==s||null==(n=s.screen)?void 0:n.width,screenHeight:null==s||null==(o=s.screen)?void 0:o.height,devicePixelRatio:null==s?void 0:s.devicePixelRatio},(_=e9(d))===ed||_===eh||"Kobo"===_||"Kindle Fire"===_||_===eH?ec:_===eA||_===eR||_===eI||_===ej?"Console":_===ef?"Wearable":_?el:"Android"===(null==c?void 0:c.userAgentDataPlatform)&&(null!=(h=null==c?void 0:c.maxTouchPoints)?h:0)>0?600>Math.min(null!=(p=null==c?void 0:c.screenWidth)?p:0,null!=(f=null==c?void 0:c.screenHeight)?f:0)/(null!=(v=null==c?void 0:c.devicePixelRatio)?v:1)?el:ec:"Desktop"),$timezone:sO(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:sp(null==a?void 0:a.href,m,sm),$host:null==a?void 0:a.host,$pathname:null==a?void 0:a.pathname,$raw_user_agent:d.length>1e3?d.substring(0,997)+"...":d,$browser_version:e8(d,navigator.vendor,w),$browser_language:sk(),$browser_language_prefix:"string"==typeof(u=sk())?u.split("-")[0]:void 0,$screen_height:null==s?void 0:s.screen.height,$screen_width:null==s?void 0:s.screen.width,$viewport_height:null==s?void 0:s.innerHeight,$viewport_width:null==s?void 0:s.innerWidth,$lib:g.LIB_NAME,$lib_version:g.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return g.SDK_DIST_CHANNEL&&(x.$sdk_dist_channel=g.SDK_DIST_CHANNEL),x}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:v,windowId:_}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());c.$session_id=v,c.$window_id=_}this.sessionPropsManager&&iD(c,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&iD(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=null==(l=this.Xi)?void 0:l.length}catch(e){c.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===r$&&(c.$lib_custom_api_host=this.config.api_host),p=e!==iI||n?e!==iR||n?this.pageViewM
281anager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),c=iD(c,p),e===iI&&o&&(c.title=o.title),!z(u)){var y=i.getTime()-u;c.$duration=parseFloat((y/1e3).toFixed(3))}d&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=iD({},f,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),j(this.config.property_denylist)?iL(this.config.property_denylist,function(e){delete c[e]}):tR.error(rZ+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(tR.error(rX),c=b(c,e));var w=this.fn();return c.$process_person_profile=w,w&&!n&&this.pn("_calculate_event_properties"),c}dn(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!this.persistence||!this.fn()||this.Hi&&!i)return e;var s,r=iD({},this.persistence.get_initial_props(),(null==(s=this.sessionPropsManager)?void 0:s.getSetOnceProps())||{},e||{}),n=this.config.sanitize_properties;return n&&(tR.error(rX),r=n(r,"$set_once")),t&&(this.Hi=!0),H(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}gn(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var i;return null==(i=this.featureFlags)?void 0:i.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var s;null==(s=this.featureFlags)||s.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var s;null==(s=this.featureFlags)||s.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var s;return void 0===t&&(t=!1),null==(s=this.featureFlags)?void 0:s.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.Ui.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:rJ}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:rJ})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:rJ})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=rB),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:rJ}}canRenderSurveyAsync(e,t){var i,s;return void 0===t&&(t=!1),null!=(i=null==(s=this.surveys)?void 0:s.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:rJ})}mn(e){return!e||W(e)?(tR.critical("Unique user id has not been set in posthog.identify"),!1):e===ib?(tR.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())||(tR.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,i){if(!this.__loaded||!this.persistence)return tR.uninitializedWarning("posthog.identify");if(K(e)&&(e=e.toString(),tR.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.pn("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property(tD)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(tj)&&(this.unregister(tj),this.register({distinct_id:e}));var r,n=(this.persistence.get_property(ih)||iC)===iC;e!==s&&n?(this.persistence.set_property(ih,iO),this.setPersonPropertiesForFlags({$set:t||{},$set_once:i||{}},!1),this.capture(i$,{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.Wi=rF(e,t,i),null==(r=this.featureFlags)||r.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(ia))}}setPersonProperties(e,t){if((e||t)&&this.pn("posthog.setPersonProperties")){var i=rF(this.get_distinct_id(),e,t);this.Wi!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Wi=i):tR.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var s=this.getGroups(),r=s[e]!==t;if(r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:m({},s,{[e]:t})}),r||i){var n={$group_type:e,$group_key:t};
281i&&(n.$group_set=i),this.capture(iM,n)}i&&this.setGroupPropertiesForFlags({[e]:i}),r&&!i&&this.reloadFeatureFlags()}else tR.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.pn("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){if(tR.info("reset"),!this.__loaded)return tR.uninitializedWarning("posthog.reset");var t,i,s,r,n,o,a,l,u,c=this.get_property(tD),h=this.get_property(tY);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),z(h)||null==(u=this.persistence)||u.register({[tY]:h}),null==(s=this.surveys)||s.reset(),null==(r=this.ln)||r.stop(),null==(n=this.featureFlags)||n.reset(),null==(o=this.conversations)||o.reset(),null==(a=this.persistence)||a.set_property(ih,iC),null==(l=this.sessionManager)||l.resetSessionId(),this.Wi=null,this.config.cookieless_mode===iP)this.register_once({distinct_id:ib,$device_id:null},"");else{var d=this.config.get_device_id(iJ());this.register_once({distinct_id:d,$device_id:e?d:c},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var i;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(i=this.conversations)||i.yn()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.bn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(tL)?(tR.critical("Attempting to create alias for existing People user - aborting."),-2):this.pn("posthog.alias")?(z(t)&&(t=this.get_distinct_id()),e!==t?(this.gn(tj,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(tR.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=m({},this.config);if(B(e)){iD(this.config,r5(e));var i,s,r,n,o,a,l,u,c,h,d,p=this.Ji();null==(i=this.persistence)||i.update_config(this.config,t,p),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sF(m({},this.config,{persistence:"sessionStorage"}),p);var f=this.Zi(this.config.debug);Y(f)&&(this.config.debug=f),Y(this.config.debug)&&(this.config.debug?(g.DEBUG=!0,i3.O()&&i3.N("ph_debug",!0),tR.info("set_config",{config:e,oldConfig:t,newConfig:m({},this.config)})):(g.DEBUG=!1,i3.O()&&i3.q("ph_debug"))),null==(s=this.exceptionObserver)||s.onConfigChange(),null==(r=this.exceptions)||r.onConfigChange(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),null==(o=this.tracingHeaders)||o.startIfEnabledOrStop(),null==(a=this.autocapture)||a.startIfEnabled(),null==(l=this.heatmaps)||l.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(c=this.deadClicksAutocapture)||c.startIfEnabledOrStop(),null==(h=this.surveys)||h.loadIfEnabled(),this._n(),null==(d=this.externalIntegrations)||d.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){g.LIB_NAME=e,g.LIB_VERSION=t}startSessionRecording(e){var t,i,s,r,n,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),a.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),a.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(m({},s,t))}}addExceptionStep(e,t){var i;null==(i=this.exceptions)||i.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!=(e=null==(t=this.logs)?void 0:t.logger)?e:r4.wn}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:r0;return t!==r0&&(t=r0+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(ih))===iO||(null==(t=this.sessionPersistence)?void 0:t.get_property(ih))===iO}fn(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===iT&&!this._isIdentified()&&H(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[tj])&&(null==(t=this.persistence)||null==(t=t.props)||!t[im]))}hn(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.fn()||this.pn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.pn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}pn(e){return"never"===this.config.person_profiles?(tR.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.gn(im,!0),!0)}Ji(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==iS)}_n(){var e,t,i,s,r=this.Ji();return(null==(e=this.persistence)?void 0:e.wr)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.wr)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==iP){if(this.ji()){this.reset(!0),null==(r=this.sessionManager)||r.destroy(),null==(n=this.pageViewM
281anager)||n.destroy(),this.sessionManager=new rC(this),this.pageViewManager=new sl(this),this.persistence&&(this.sessionPropsManager=new rE(this,this.sessionManager,this.persistence));var i,s,r,n,o,a,l,u,c=null!=(o=null==(a=this.config.__extensionClasses)?void 0:a.sessionRecording)?o:null==(l=r4.__defaultExtensionClasses)?void 0:l.sessionRecording;c&&(this.sessionRecording=this.$i(this.sessionRecording,new c(this)),this.sn&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this.sn)))}this.consent.optInOut(!0),this._n(),this.an(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==iS&&(null==(i=this.surveys)||i.loadIfEnabled()),(z(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.un()}else tR.warn(rY)}opt_out_capturing(){var e,t,i;this.config.cookieless_mode!==iP?(this.config.cookieless_mode===iS&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._n(),this.config.cookieless_mode===iS&&(this.register({distinct_id:ib,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.un(),this.an())):tR.warn(rY)}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 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===iP||(this.config.cookieless_mode===iS?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this._n()}_is_bot(){return n?rO(n,this.config.custom_blocked_useragents):void 0}un(){o&&("visible"===o.visibilityState?this.Bi||(this.Bi=!0,this.capture(iI,{title:o.title},{send_instantly:!0}),this.zi&&(o.removeEventListener(iF,this.zi),this.zi=null)):this.zi||(this.zi=this.un.bind(this),iU(o,iF,this.zi)))}debug(e){!1===e?(null==s||s.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==s||s.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}))}Dr(){var e,t,i,s,r=this.Gi||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(tR.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):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!G(r[e]),s=t in r&&!G(r[t]),i?r[e]:!!s&&(tR&&tR.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}vn(e){if(G(this.config.before_send))return e;var t=j(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(G(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return J(e.event)?tR.warn(r+". This can cause unexpected behavior."):tR.info(r),null}i.properties&&!H(i.properties)||tR.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.dr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}Zi(e){var t=Y(e)&&!e,i=i3.O()&&"true"===i3.A("ph_debug");return!t&&(!!i||e)}}function r8(e){return e instanceof Element&&(e.id===iy||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function r7(e){return!!e&&1===e.nodeType}function r9(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}
281function ne(e){return!!e&&3===e.nodeType}function nt(e){return!!e&&11===e.nodeType&&r7(e.host)}function ni(e){return e?$(e).split(/\s+/):[]}function ns(e){var t=null==s?void 0:s.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function nr(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return ni(t)}function nn(e){return G(e)?null:$(e).split(/(\s+)/).filter(e=>nk(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function no(e){var t="";return ng(e)&&!nv(e)&&e.childNodes&&e.childNodes.length&&iL(e.childNodes,function(e){var i;ne(e)&&e.textContent&&(t+=null!=(i=nn(e.textContent))?i:"")}),$(t)}function na(e){var t;return z(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}r4.__defaultExtensionClasses={},r4.wn={trace:rV=()=>{},debug:rV,info:rV,warn:rV,error:rV,fatal:rV},function(e,t){for(var i=0;t.length>i;i++)e.prototype[t[i]]=iB(e.prototype[t[i]])}(r4,["identify"]);var nl=["a","button","form","input","select","textarea","label"];function nu(e,t){if(z(t))return!0;var i,s=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function nc(e){var t=e.parentNode;return!(!t||!r7(t))&&t}var nh=["next","previous","prev",">","<"],nd=[".ph-no-rageclick",".ph-no-capture"],np=e=>!e||r9(e,"html")||!r7(e),nf=(e,t)=>{if(!s||np(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,r=[e],n=e;n.parentNode&&!r9(n,"body");)if(nt(n.parentNode))r.push(n.parentNode.host),n=n.parentNode.host;else{var o=nc(n);if(!o)break;if(t||nl.indexOf(o.tagName.toLowerCase())>-1)i=!0;else{var a=s.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(i=!0)}r.push(o),n=o}return{parentIsUsefulElement:i,targetElementList:r}};function ng(e){for(var t=e;t.parentNode&&!r9(t,"body");t=t.parentNode){var i=nr(t);if(R(i,"ph-sensitive")||R(i,"ph-no-capture"))return!1}if(R(nr(e),"ph-include"))return!0;var s=e.type||"";if(U(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=e.name||e.id||"";return!U(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function nv(e){return!!(r9(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||r9(e,"select")||r9(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var n_="(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})",nm=RegExp("^(?:"+n_+")$"),ny=new RegExp(n_),nb="\\d{3}-?\\d{2}-?\\d{4}",nw=RegExp("^("+nb+")$"),nx=RegExp("("+nb+")");function nk(e,t){return void 0===t&&(t=!0),!(G(e)||U(e)&&(e=$(e),(t?nm:ny).test((e||"").replace(/[- ]/g,""))||(t?nw:nx).test(e)))&&!0}function nE(e){var t=no(e);return nk(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&iL(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=no(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){tR.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function nS(e){return e.replace(/"|\\"/g,'\\"')}class nP{constructor(e){this.disabled=!1===e;var t=B(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,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&this.timeoutMs>i-s.timestamp){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var nC="$copy_autocapture",nO=t$("[AutoCapture]");function nT(e,t){return t.length>e?t.slice(0,e)+"...":t}var nF=t$("[ExceptionAutocapture]");function nA(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return N(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]===r&&(e[t]=s)}}catch(e){return()=>{}}}var nI=t$("[TracingHeaders]"),nR=t$("[Web Vitals]"),n$="disabled",nM="lazy_loading",nq="awaiting_config",nL="missing_config";t$("[SessionRecording]"),t$("[SessionRecording]");var nD="[SessionRecording]",nj=t$(nD),nN=t$("[Heatmaps]");function nB(e){return B(e)&&"clientX"in e&&"clientY"in e&&K(e.clientX)&&K(e.clientY)}var nH=t$("[Product Tours]"),nz=["$set_once","$set"],nU=t$("[SiteApps]"),nW="Error while initializing PostHog app with config id ";function nV(e,t,i){if(G(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class nG{constructor(e){this.xn=new rS,this.Sn=(e,t)=>this.kn(e,t)&&this.Cn(e,t)&&this.In(e,t)&&this.Tn(e,t),this.kn=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.En=new Set,this.Mn=new Set}init(){var e,t;z(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!z(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e
281=>{var t,i;null==(t=this.Mn)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.En)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.En.has(e)||this.En.has(null==t?void 0:t.event))&&this.Mn&&(null==(i=this.Mn)?void 0:i.size)>0&&this.Mn.forEach(e=>{this.Rn(t,e)&&this.xn.emit("actionCaptured",e.name)})}Pn(e){this.onAction("actionCaptured",t=>e(t))}Rn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Sn(e,i))return!0;return!1}onAction(e,t){return this.xn.on(e,t)}Cn(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!nV(s,t.url,t.url_matching||"contains"))return!1}return!0}In(e,t){return!!this.On(e,t)&&!!this.Ln(e,t)&&!!this.Fn(e,t)}On(e,t){if(null==t||!t.href)return!0;var i=this.An(e);if(i.length>0)return i.some(e=>nV(e.href,t.href,t.href_matching||"exact"));var s,r,n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!n&&nV((r=n.match(/(?::|")href="(.*?)"/))?r[1]:"",t.href,t.href_matching||"exact")}Ln(e,t){if(null==t||!t.text)return!0;var i=this.An(e);if(i.length>0)return i.some(e=>nV(e.text,t.text,t.text_matching||"exact")||nV(e.$el_text,t.text,t.text_matching||"exact"));var s,r,n,o,a=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!a&&(r=function(e){for(var t,i=[],s=/(?::|")text="(.*?)"/g;!G(t=s.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(a),n=t.text,o=t.text_matching||"exact",r.some(e=>nV(e,n,o)))}Fn(e,t){if(null==t||!t.selector)return!0;var i,s,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=r&&r.includes(t.selector))return!0;var n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}An(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}Tn(e,t){return null==t||!t.properties||0===t.properties.length||rR(t.properties.reduce((e,t)=>{var i=j(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class nK{constructor(e){this._instance=e,this.Nn=new Map,this.Dn=new Map,this.$n=new Map}qn(e,t){return!!e&&rR(e.propertyFilters,null==t?void 0:t.properties)}jn(e,t){var i=new Map;return e.forEach(e=>{var s;null==(s=e.conditions)||null==(s=s[t])||null==(s=s.values)||s.forEach(t=>{if(null!=t&&t.name){var s=i.get(t.name)||[];s.push(e.id),i.set(t.name,s)}})}),i}Hn(e,t,i){var s=(i===sA?this.Nn:this.Dn).get(e),r=[];return this.Un(e=>{r=e.filter(e=>null==s?void 0:s.includes(e.id))}),r.filter(s=>{var r,n=null==(r=s.conditions)||null==(r=r[i])||null==(r=r.values)?void 0:r.find(t=>t.name===e);return this.qn(n,t)})}register(e){var t;z(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Bn(e),this.zn(e))}zn(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.Vn&&(this.Vn=new nG(this._instance),this.Vn.init(),this.Vn.Pn(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.Vn)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.$n.get(t.name);i&&i.push(e.id),this.$n.set(t.name,i||[e.id])}}))}))}Bn(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),s=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});0===i.length&&0===s.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Nn=this.jn(e,sA),this.Dn=this.jn(e,sI))}onEvent(e,t){var i,s=this.le(),r=this.Wn(),n=this.Zn(),o=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[r])||[];
281if(n===e&&t&&o.length>0){s.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var a,l,u=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=o.indexOf(u);0>c||(o.splice(c,1),this.Gn(o))}}else{if(this.Dn.has(e)){var h=this.Hn(e,t,sI);h.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map(e=>e.id)}),h.forEach(e=>{var t=o.indexOf(e.id);0>t||o.splice(t,1),this.Qn(e.id)}),this.Gn(o))}if(this.Nn.has(e)){s.info("event name matched",{event:e,eventPayload:t,items:this.Nn.get(e)});var d=this.Hn(e,t,sA);this.Gn(o.concat(d.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.Wn(),s=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.$n.has(e)&&this.Gn(s.concat(this.$n.get(e)||[]))}Gn(e){var t=this.le(),i=[...new Set(e)].filter(e=>!this.Jn(e));t.info("updating activated items",{activatedItems:i}),this.Kn(i)}getActivatedIds(){var e,t=this.Wn();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Nn}Yn(){return this.Vn}}class nQ extends nK{constructor(e){super(e)}Wn(){return ir}Zn(){return sR}Un(e){var t;null==(t=this._instance)||t.getSurveys(e)}Qn(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}le(){return rD}Kn(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[ir]:e})}Jn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var nY="SDK is not enabled or survey functionality is not yet loaded",nJ="Disabled. Not loading surveys.",nX=null!=s&&s.location?sf(s.location.hash,"__posthog")||sf(location.hash,"state"):null,nZ="_postHogToolbarParams",n0=t$("[Toolbar]"),n1=t$("[FeatureFlags]"),n2=t$("[FeatureFlags]",{debugEnabled:!0}),n3="\" failed. Feature flags didn't load in time.",n5=e=>{for(var t={},i=0;e.length>i;i++)t[e[i]]=!0;return t},n6=e=>{var t={};for(var[i,s]of ij(e||{}))s&&(t[i]=s);return t},n4=t$("[Error tracking]"),n8="Refusing to render web experiment since the viewer is a likely bot",n7={icontains:(e,t)=>!!s&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!s&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!s&&rT(t.href,e),not_regex:(e,t)=>!!s&&!rT(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class n9{get qt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{n9.Xn("retrieved web experiments from the server"),t.es=new Map,e.forEach(e=>{if(e.feature_flag_key){t.es&&(n9.Xn("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.es)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);U(s)&&e.variants[s]&&t.ts(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];n9.rs(n)&&t.ts(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())n9.Xn(n8);else if(!this.qt.disable_web_experiments){if(G(this.es))return this.es=new Map,this.loadIfEnabled(),void this.previewWebExperiment();n9.Xn("applying feature flags",e),e.forEach(e=>{var t;if(this.es&&null!=(t=this.es)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.es)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.ts(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=n9.getWindowLocation();if(null!=e&&e.search){var t=sd(null==e?void 0:e.search,"__experiment_id"),i=sd(null==e?void 0:e.search,"__experiment_variant");t&&i&&(n9.Xn("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.ns(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this.qt.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}ns(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(n9.Xn("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.ts(s[0].name,t,s[0].variants[t].transforms))}static rs(e){return!G(e.conditions)&&n9.ss(e)&&n9.os(e)}static ss(e){if(G(e.conditions)||G(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=n9.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||n7[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}
281static getWindowLocation(){return null==s?void 0:s.location}static os(e){if(G(e.conditions)||G(null==(i=e.conditions)?void 0:i.utm))return!0;var t=sb();if(t.utm_source){var i,s,r,n,o,a,l,u,c,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,f=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return h&&p&&f&&d}return!1}static Xn(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];tR.info("[WebExperiments] "+e,i)}ts(e,t,i){this._is_bot()?n9.Xn(n8):"control"!==t?i.forEach(i=>{if(i.selector){n9.Xn("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):n9.Xn("Control variants leave the page unmodified.")}_is_bot(){return n&&this._instance?rO(n,this.qt.custom_blocked_useragents):void 0}}var oe=t$("[Conversations]"),ot="Conversations not available yet.",oi={featureFlags:class{constructor(e){this.us=!1,this.ls=!1,this.hs=!1,this.cs=!1,this.ds=!1,this.vs=!1,this.fs=!1,this.ps=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ui(){return this._instance.persistence}gs(e){return this._instance.get_property(e)}ys(){var e,t;return null!=(e=null==(t=this.ui)?void 0:t.Sr(this.qt.feature_flag_cache_ttl_ms))&&e}bs(){return!!this.ys()&&(this.ps||this.hs||(this.ps=!0,n1.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}_s(){var e,t=null!=(e=this.qt.evaluation_contexts)?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.fs||(n1.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.fs=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||n1.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}ws(){return this._s().length>0}xs(){var e=this.qt.flag_keys;if(!z(e)){if(j(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||n1.error("Invalid flag key found:",e,"Expected non-empty string"),t});n1.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:i}=this._instance,s=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(s).length){var r,n,o=null!=(r=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?r:{},a=Object.keys(s).filter(e=>!!s[e]).reduce((e,t)=>(e[t]=s[t]||!1,e),{}),l=Object.keys(o).filter(e=>a[e]).reduce((e,t)=>(o[t]&&(e[t]=o[t]),e),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(e,t,i){var s=null!=i&&i.merge?this.getFlagVariants():{},r=null!=i&&i.merge?this.getFlagPayloads():{},n=m({},s,e),o=m({},r,t),a={};for(var[l,u]of Object.entries(n)){var c="string"==typeof u;a[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:z(null==o?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.ls}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.gs(t4),t=this.gs(t9),i=this.gs(ie);if(!i&&!t)return e||{};var s=iD({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,o,a=s[r],l=null==t?void 0:t[r],u=z(l)?null!=(n=null==a?void 0:a.enabled)&&n:!!l,c=z(l)?a.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=m({},a,{enabled:u,variant:u?null!=c?c:null==a?void 0:a.variant:void 0});u!==(null==a?void 0:a.enabled)&&(d.original_enabled=null==a?void 0:a.enabled),c!==(null==a?void 0:a.variant)&&(
281d.original_variant=null==a?void 0:a.variant),h&&(d.metadata=m({},null==a?void 0:a.metadata,{payload:h,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),s[r]=d}return this.us||(n1.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.us=!0),s}getFlagVariants(){var e=this.gs(t3),t=this.gs(t9);if(!t)return e||{};for(var i=iD({},e),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.us||(n1.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.us=!0),i}getFlagPayloads(){var e=this.gs(t8),t=this.gs(ie);if(!t)return e||{};for(var i=iD({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.us||(n1.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.us=!0),i}reloadFeatureFlags(){this.cs||this.qt.advanced_disable_feature_flags||this.Ss||(this._instance.Ui.emit("featureFlagsReloading",!0),this.Ss=setTimeout(()=>{this.ks()},5))}Cs(){clearTimeout(this.Ss),this.Ss=void 0}ensureFlagsLoaded(){this.ls||this.hs||this.Ss||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.cs=e}ks(e){var t;if(this.Cs(),!this._instance.Dr())if(this.hs)this.ds=!0;else{var i=this.qt.token,s=this.gs(tD),r={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:m({},(null==(t=this.ui)?void 0:t.get_initial_props())||{},this.gs(it)||{}),group_properties:this.gs(ii),timezone:sO()};V(s)||z(s)||(r.$device_id=s),(null!=e&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.ws()&&(r.evaluation_contexts=this._s());var n=this.xs();z(n)||(r.flag_keys=n);var o=!!this.qt.advanced_only_evaluate_survey_feature_flags,a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.hs=!0,this._instance._send_request({method:"POST",url:a,data:r,compression:this.qt.disable_compression?void 0:sB,timeout:this.qt.feature_flag_request_timeout_ms,callback:e=>{var t,i,s,n=!0;if(200===e.statusCode&&(this.ds||(this.$anon_distinct_id=void 0),n=!1),this.hs=!1,!r.disable_flags||this.ds){this.vs=!n;var a=[];e.error?e.error instanceof Error?a.push("AbortError"===e.error.name?"timeout":"connection_error"):a.push("unknown_error"):200!==e.statusCode&&a.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&a.push("errors_while_computing_flags");var l,u=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes("feature_flags"));(u&&a.push("quota_limited"),null==(s=this.ui)||s.register({[iu]:a}),u)?n1.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."):(r.disable_flags||this.receivedFeatureFlags(null!=(l=e.json)?l:{},n,{partialResponse:o}),this.ds&&(this.ds=!1,this.ks()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.vs)if(this.ls||this.getFlags()&&this.getFlags().length>0){if(!this.bs()){var s=this.getFeatureFlagResult(e,t);return null!=(i=null==s?void 0:s.variant)?i:null==s?void 0:s.enabled}}else n1.warn('getFeatureFlag for key "'+e+n3)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.vs)if(this.ls||this.getFlags()&&this.getFlags().length>0){if(!this.bs()){var i=this.getFlagVariants(),s=e in i,r=i[e],n=this.getFlagPayloads()[e],o=String(r),a=this.gs(t7)||void 0,l=this.gs(ic)||void 0,u=this.gs(ia)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var c,h=this._instance.get_session_id(),d=this.gs(il);h&&h!==d&&(u={},null==(c=this.ui)||c.register({[ia]:u,[il]:h}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(o))){j(u[e])?u[e].push(o):u[e]=[o],null==(v=this.ui)||v.register({[ia]:u});var p=this.getFeatureFlagDetails(e),f=[...null!=(_=this.gs(iu))?_:[]];z(r)&&f.push("flag_missing");var g={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:n||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.qt.bootstrap)||null==(m
281=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(y=this.qt.bootstrap)||null==(y=y.featureFlagPayloads)?void 0:y[e])||null,$used_bootstrap_value:!this.vs};z(null==p||null==(b=p.metadata)?void 0:b.version)||(g.$feature_flag_version=p.metadata.version);var v,_,m,y,b,w,x,k,E,S,P,C=null!=(w=null==p||null==(x=p.reason)?void 0:x.description)?w:null==p||null==(k=p.reason)?void 0:k.code;C&&(g.$feature_flag_reason=C),null!=p&&null!=(E=p.metadata)&&E.id&&(g.$feature_flag_id=p.metadata.id),z(null==p?void 0:p.original_variant)&&z(null==p?void 0:p.original_enabled)||(g.$feature_flag_original_response=z(p.original_variant)?p.original_enabled:p.original_variant),null!=p&&null!=(S=p.metadata)&&S.original_payload&&(g.$feature_flag_original_payload=null==p||null==(P=p.metadata)?void 0:P.original_payload),f.length&&(g.$feature_flag_error=f.join(",")),this._instance.capture("$feature_flag_called",g)}if(s){var O=n;if(!z(n))try{O=JSON.parse(n)}catch(e){}return{key:e,enabled:!!r,variant:"string"==typeof r?r:void 0,payload:O}}}}else n1.warn('getFeatureFlagResult for key "'+e+n3)}getRemoteConfigPayload(e,t){var i=this.qt.token,s={distinct_id:this._instance.get_distinct_id(),token:i};this.ws()&&(s.evaluation_contexts=this._s());var r=this.xs();z(r)||(s.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this.qt.disable_compression?void 0:sB,timeout:this.qt.feature_flag_request_timeout_ms,callback(i){var s,r=null==(s=i.json)?void 0:s.featureFlagPayloads;t((null==r?void 0:r[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.vs){if(this.ls||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return z(i)?void 0:!!i}n1.warn('isFeatureEnabled for key "'+e+n3)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,i){if(this.ui){this.ls=!0;var s=this.getFlagVariants(),r=this.getFlagPayloads(),n=this.getFlagsWithDetails();!function(e,t,i,s,r,n){void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r={});var o,a=((o=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(o).map(e=>{var t;return[e,null!=(t=o[e].variant)?t:o[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(o).filter(e=>o[e].enabled).filter(e=>{var t;return null==(t=o[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=o[e].metadata)?void 0:t.payload]}))):n1.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),l=a.flags,u=a.featureFlags,c=a.featureFlagPayloads;if(u){var h=e.requestId,d=e.evaluatedAt;if(j(u)){n1.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var p={};if(u)for(var f=0;u.length>f;f++)p[u[f]]=!0;t&&t.register({[t5]:u,[t3]:p})}else{var g=u,v=c,_=l;if(null!=n&&n.partialResponse)g=m({},i,g),v=m({},s,v),_=m({},r,_);else if(e.errorsWhileComputingFlags)if(l){var y=new Set(Object.keys(l).filter(e=>{var t;return!(null!=(t=l[e])&&t.failed)}));g=m({},i,Object.fromEntries(Object.entries(g).filter(e=>{var[t]=e;return y.has(t)}))),v=m({},s,Object.fromEntries(Object.entries(v||{}).filter(e=>{var[t]=e;return y.has(t)}))),_=m({},r,Object.fromEntries(Object.entries(_||{}).filter(e=>{var[t]=e;return y.has(t)})))}else g=m({},i,g),v=m({},s,v),_=m({},r,_);t&&t.register(m({[t5]:Object.keys(n6(g)),[t3]:g||{},[t8]:v||{},[t4]:_||{}},h?{[t7]:h}:{},d?{[ic]:d}:{}))}}}(e,this.ui,s,r,n,i),t||(this.ps=!1),this.Is(t)}}override(e,t){void 0===t&&(t=!1),n1.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ui)return n1.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.ui.unregister(t9),this.ui.unregister(ie),this.Is(),n2.info("All overrides cleared");if(j(e)){var t,i=n5(e);return this.ui.register({[t9]:i}),this.Is(),n2.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){if(this.us=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this.ui.unregister(t9),n2.info("Flag overrides cleared");else if(e.flags){if(j(e.flags)){var s=n5(e.flags);this.ui.register({[t9]:s})}else this.ui.register({[t9]:e.flags});n2.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this.ui.unregister(ie),n2.info("Payload overrides cleared")):e.payloads&&(this.ui.register({[ie]:e.payloads}),n2.info("Payload overrides set",{payloads:e.payloads}))),void this.Is()}if(e&&"object"==typeof e)return this.ui.register({[t9]:e}),this.Is(),n2.info("Flag overrides set",{flags:e});n1.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ls){var{flags:t,flagVariants:i}=this.Ts();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this.gs(t6)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(o.$early_access_feature_name=r.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(n,!1);var a=m({},this.getFlagVariants(),{[e]:t});null==(s=this.ui)||s.register({[t5]:Object.keys(n6(a)),[t3]:a}),this.Is()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this.gs(t6),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+r),method:"GET",callback:t=>{var i,s;if(t.json){var r=t.json.earlyAccessFeatures;return null==(i=this.ui)||i.unregister(t6),null==(s=this.ui)||s.register({[t6]:r}),e(r)}}})}Ts(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}Is(e){var{flags:t,flagVariants:i}=this.Ts();
281this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.gs(it)||{},s=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),r=null==e?void 0:e.$set_once,n={};if(r)for(var o in r)({}).hasOwnProperty.call(r,o)&&(o in i||(n[o]=r[o]));this._instance.register({[it]:m({},i,n,s)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(it)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.gs(ii)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=m({},i[t],e[t]),delete e[t]}),this._instance.register({[ii]:m({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.gs(ii)||{};this._instance.register({[ii]:m({},t,{[e]:{}})})}else this._instance.unregister(ii)}reset(){this.ls=!1,this.hs=!1,this.cs=!1,this.ds=!1,this.vs=!1,this.$anon_distinct_id=void 0,this.Cs(),this.us=!1}}},os=m({productTours:class{get ui(){return this._instance.persistence}constructor(e){this.$o=null,this.qo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ui&&this.ui.register({[tK]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.$o||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(tK)||this.lr(()=>this.jo())}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?nH.error("Could not load product tours script",t):e()})}jo(){var e;!this.$o&&null!=(e=p.__PosthogExtensions__)&&e.generateProductTours&&(this.$o=p.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!j(this.qo)||t){var i=this.ui;if(i){var s=i.props[io];if(j(s)&&!t)return this.qo=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var s=t.statusCode;if(200!==s||!t.json){var r="Product Tours API could not be loaded, status: "+s;return nH.error(r),void e([],{isLoaded:!1,error:r})}var n=j(t.json.product_tours)?t.json.product_tours:[];this.qo=n,i&&i.register({[io]:n}),e(n,{isLoaded:!0})}})}else e(this.qo,{isLoaded:!0})}getActiveProductTours(e){G(this.$o)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.$o.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.$o)||t.showTourById(e)}previewTour(e){this.$o?this.$o.previewTour(e):this.lr(()=>{var t;this.jo(),null==(t=this.$o)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.$o)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.$o)||e.nextStep()}previousStep(){var e;null==(e=this.$o)||e.previousStep()}clearCache(){var e;this.qo=null,null==(e=this.ui)||e.unregister(io)}resetTour(e){var t;null==(t=this.$o)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.$o)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.$o)||t.cancelPendingTour(e)}}},oi),or=m({surveys:class{get qt(){return this._instance.config}constructor(e){this.Ko=void 0,this._surveyManager=null,this.Yo=!1,this.Xo=[],this.ea=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(G(t))return rD.warn("Flags not loaded yet. Not loading surveys.");var i=j(t);this.Ko=i?t.length>0:t,rD.info("flags response received, isSurveysEnabled: "+this.Ko),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(rj)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.Yo)rD.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)rD.info(nJ);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())rD.info("Not loading surveys in cookieless mode without consent.");else{var e=null==p?void 0:p.__PosthogExtensions__;if(e){if(!z(this.Ko)||this.qt.advanced_enable_surveys){var t=this.Ko||this.qt.advanced_enable_surveys;this.Yo=!0;try{var i=e.generateSurveys;if(i)return void this.ta(i,t);var s=e.loadExternalDependency;if(!s)return void this.ra(iE);s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.ra("Could not load surveys script",i):this.ta(e.generateSurveys,t)})}catch(e){throw this.ra("Error initializing surveys",e),e}finally{this.Yo=!1}}}else rD.error("PostHog Extensions not found.")}}ta(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nQ(this._instance),rD.info("Surveys loaded successfully"),this.ia({isLoaded:!0})}ra(e,t){rD.error(e,t),this.ia({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Xo.push(e),this._surveyManager&&this.ia({isLoaded:!0}),()=>{this.Xo=this.Xo.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.qt.disable_surveys)return rD.info(nJ),e([]);var i,s=this._instance.get_property(is);if(s&&!t)return e(s,{isLoaded:!0});"u">typeof Promise&&this.ea?this.ea.then(t=>{var{surveys:i,context:s}=t;return e(i,s)}):("u">typeof Promise&&(this.ea=new Promise(e=>{i=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:t=>{this.ea=null;var s=t.statusCode;if(200!==s||!t.json){var r="Surveys API could not be loaded, status: "+s;rD.error(r);var n={isLoaded:!1,error:r};return e([],n),void(null==i||i({surveys:[],context:n}))}var o,a,l=t.json.surveys||[],u=l.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});u.length>0&&(null==(a=this._surveyEventReceiver)||a.register(u)),null==(o=this._instance.persistence)||o.register({[is]:l});var c={isLoaded:!0};e(l,c),null==i||i({surveys:l,context:c})}}))}
281ia(e){for(var t of this.Xo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){rD.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!G(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);rD.warn("init was not called")}na(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}sa(e){if(G(this._surveyManager))return{eligible:!1,reason:nY};var t="string"==typeof e?this.na(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(G(this._surveyManager))return rD.warn("init was not called"),{visible:!1,disabledReason:nY};var t=this.sa(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return G(this._surveyManager)?(rD.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:nY})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.sa(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var s;if(G(this._surveyManager))rD.warn("init was not called");else{var r="string"==typeof e?this.na(e):e;if(null!=r&&r.id)if(rN.includes(r.type)){var n=null==o?void 0:o.querySelector(t);if(n)return null!=(s=r.appearance)&&s.surveyPopupDelaySeconds?(rD.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;rD.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,n,i),rD.info("Survey "+r.id+" rendered")},1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n,i);rD.warn("Survey element not found")}else rD.warn("Surveys of type "+r.type+" cannot be rendered in the app");else rD.warn("Survey not found")}}displaySurvey(e,t){var i;if(G(this._surveyManager))rD.warn("init was not called");else{var s=this.na(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=m({},s,{appearance:m({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==sM&&t.initialResponses&&rD.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void rD.warn("Survey is not eligible to be displayed: ",n.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else rD.warn("Survey not found")}}cancelPendingSurvey(e){G(this._surveyManager)?rD.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},oi),on=m({experiments:n9},oi),oo=m({},oi,{sessionRecording:class{get qt(){return this._instance.config}get ui(){return this._instance.persistence}get started(){var e;return!(null==(e=this.Es)||!e.isStarted)}get status(){var e,t;return this.Ms===nq||this.Ms===nL?this.Ms:null!=(e=null==(t=this.Es)?void 0:t.status)?e:this.Ms}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ms=n$,this.Rs=void 0,this._instance=e,!this._instance.sessionManager)throw nj.error("started without valid sessionManager"),Error(nD+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===iP)throw Error(nD+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ps(){var e,t=!(null==(e=this._instance.get_property(tY))||!e.enabled),i=!this.qt.disable_session_recording,r=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return s&&t&&i&&!r}startIfEnabledOrStop(e){var t;if(!this.Ps||null==(t=this.Es)||!t.isStarted){var i=!z(Object.assign)&&!z(Array.from);this.Ps&&i?(this.Os(e),nj.info("starting")):(this.Ms=n$,this.stopRecording())}}Os(e){var t,i,s;this.Ps&&(this.Ms!==nq&&this.Ms!==nL&&(this.Ms=nM),null!=p&&null!=(t=p.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=p.__PosthogExtensions__)&&i.initSessionRecording?this.Ls(e):null==(s=p.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.Fs,t=>{if(t)return nj.error("could not load recorder",t);this.Ls(e)}))}stopRecording(){var e,t;null==(e=this.Rs)||e.call(this),this.Rs=void 0,null==(t=this.Es)||t.stop()}As(){var e,t;null==(e=this.Rs)||e.call(this),this.Rs=void 0,null==(t=this.Es)||t.discard()}Ns(){var e;null==(e=this.ui)||e.unregister(t2)}Ds(e,t){if(G(e))return null;var i=K(e)?e:parseFloat(e);return"number"!=typeof i||!Number.isFinite(i)||0>i||i>1?(nj.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):i}$s(e){if(this.ui){var t,i,s=this.ui,r=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.Ds(null==(t=this.qt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.Ds(null==i?void 0:i.sampleRate,"remote config sampleRate"),o=null!=r?r:n;
281G(o)&&this.Ns();var a=null==i?void 0:i.minimumDurationMilliseconds;s.register({[tY]:m({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:m({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:o,minimumDurationMilliseconds:z(a)?null:a,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers,version:null==i?void 0:i.version,triggerGroups:null==i?void 0:i.triggerGroups})})};r(),null==(t=this.Rs)||t.call(this),this.Rs=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.$s(e),void this.As()):(this.$s(e),void this.startIfEnabledOrStop()):(this.Ms===nq&&(this.Ms=nL,nj.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Es)&&i.log?this.Es.log(e,t):nj.warn("log called before recorder was ready")}get Fs(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(tY);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}qs(){var e,t,i=this._instance.get_property(tY);if(!i)return!1;try{t="object"==typeof i?i:JSON.parse(i)}catch(e){return nj.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}var s=null!=(e=t.cache_timestamp)?e:Date.now();return 36e5>=Date.now()-s}Ls(e){var t,i;if(null==(t=p.__PosthogExtensions__)||!t.initSessionRecording)return nj.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[ik]:!0});if(this.Es||(this.Es=null==(i=p.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Es._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.qs()){if(this.Ms===nL||this.Ms===nq)return;return this.Ms=nq,nj.info("persisted remote config is stale, requesting fresh config before starting"),void new sj(this._instance).load()}this.Ms=nM,this.Es.start(e)}onRRwebEmit(e){var t;null==(t=this.Es)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Es||null==(t=this.ui)||t.register({[tX]:!0}),null==(e=this.Es)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Es||null==(t=this.ui)||t.register({[tJ]:!0}),null==(e=this.Es)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Es||null==(i=this.ui)||i.register({["url"===e?tZ:t0]:!0}),null==(t=this.Es)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Es)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Es)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.js=!1,this.Hs=null,this.Us=!1,this.instance=e,this.rageclicks=new nP(e.config.rageclick),this.Bs=null}initialize(){this.startIfEnabled()}get qt(){var e,t,i=B(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}zs(){if(this.isBrowserSupported()){if(s&&o){var e=e=>{e=e||(null==s?void 0:s.event);try{this.Vs(e)}catch(e){nO.error("Failed to capture event",e)}};if(iU(o,"submit",e,{capture:!0}),iU(o,"change",e,{capture:!0}),iU(o,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=e=>{e=e||(null==s?void 0:s.event);try{this.Vs(e,nC)}catch(e){nO.error("Failed to capture copy/cut event",e)}};iU(o,"copy",t,{capture:!0}),iU(o,"cut",t,{capture:!0})}}}else nO.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.js&&(this.zs(),this.js=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Us=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[tB]:!!e.autocapture_opt_out}),this.Hs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Bs=e}getElementSelectors(e){var t,i=[];return null==(t=this.Bs)||t.forEach(t=>{var s=null==o?void 0:o.querySelectorAll(t);
281null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[tB];if(V(this.Hs)&&!Y(i)&&!this.instance.Dr())return!1;var s=null!=(t=this.Hs)?t:!!i;return!!this.instance.config.autocapture&&!s}Vs(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,r=na(e);ne(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!s||np(e)||(Y(t)?(i=!!t&&nd,r=void 0):(i=null!=(n=null==t?void 0:t.css_selector_ignorelist)?n:nd,r=null==t?void 0:t.content_ignorelist),!1===i))return!1;var i,r,n,{targetElementList:o}=nf(e,!1);return!function(e,t){var i;if(!1===e||z(e))return!1;if(!0===e)i=nh;else{if(!j(e))return!1;if(e.length>10)return tR.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:s}=e;return i.some(e=>t.includes(e)||s.includes(e))})}(r,o.map(e=>{var t;return{safeText:no(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!nu(o,i)}(r,this.instance.config.rageclick)&&this.Vs(e,"$rageclick");var n=t===nC;if(r&&function(e,t,i,r,n){if(void 0===i&&(i=void 0),!s||np(e)||null!=(o=i)&&o.url_allowlist&&!ns(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&ns(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var o,a,l,u,c=i.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=nf(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(z(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(d,i)||!nu(d,null==(u=i)?void 0:u.css_selector_allowlist))return!1;var p=s.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var f=e.tagName.toLowerCase();switch(f){case"html":return!1;case"form":return(n||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0;default:return h?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(nl.indexOf(f)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.qt,n,n?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=function(e,t){var i,r,{e:n,maskAllElementAttributes:o,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:u}=t;if(!r7(e))return{props:{}};for(var c=[e],h=e;h.parentNode&&!r9(h,"body");)if(nt(h.parentNode))c.push(h.parentNode.host),h=h.parentNode.host;else{if(!r7(h.parentNode))break;c.push(h.parentNode),h=h.parentNode}var d,p=[],f={},g=!1,v=!1;if(iL(c,e=>{var t=ng(e);if(r9(e,"a")){var i=e.getAttribute("href");g=t&&!!i&&nk(i)&&i}R(nr(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};nl.indexOf(r)>-1&&!i&&(n.$el_text="a"===r.toLowerCase()||"button"===r.toLowerCase()?nT(1024,nE(e)):nT(1024,no(e)));var o=nr(e);o.length>0&&(n.classes=o.filter(function(e){return""!==e})),iL(e.attributes,function(i){var r;if((!nv(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&nk(i.value)&&(!U(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var o=i.value;"class"===i.name&&(o=ni(o).join(" ")),n["attr__"+i.name]=nT(1024,o)}});for(var a=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!r7(t))return t}(u);)a++,u.tagName===e.tagName&&l++;return n.nth_child=a,n.nth_of_type=l,n}(e,o,a,l)),iD(f,function(e){if(!ng(e))return{};var t={};return iL(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&nk(s)&&(t[i]=s)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(a||(p[0].$el_text=r9(e,"a")||r9(e,"button")?nE(e):no(e)),g){p[0].attr__href=g;var _,y,b=null==(_=sh(g))?void 0:_.host,w=null==s||null==(y=s.location)?void 0:y.host;b&&w&&b!==w&&(d=g)}return{props:iD({$event_type:n.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,s,r={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(s=e.attr__href)?void 0:s.slice(0,2048),attr_class:(t=e.attr__class)?j(t)?t:ni(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return ij(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}
281).forEach(e=>{var[t,i]=e;return r.attributes[t]=i}),r}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=m({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return ij(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return o[nS(t.toString())]=nS(i.toString())}),(s+=":")+ij(o).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=p[0])&&i.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},f)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Us});if(a)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(o.$element_selectors=l),t===nC){var u,c=nn(null==s||null==(u=s.getSelection())?void 0:u.toString()),h=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=h}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return N(null==o?void 0:o.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ws=(null==s||null==(t=s.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(tR.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Zs&&this.Zs(),this.Zs=void 0,tR.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(s&&s.history){var i=this;null!=(e=s.history.pushState)&&e.__posthog_wrapped__||nA(s.history,"pushState",e=>function(t,s,r){e.call(this,t,s,r),i.Gs("pushState")}),null!=(t=s.history.replaceState)&&t.__posthog_wrapped__||nA(s.history,"replaceState",e=>function(t,s,r){e.call(this,t,s,r),i.Gs("replaceState")}),this.Qs()}}Gs(e){try{var t,i=null==s||null==(t=s.location)?void 0:t.pathname;if(!i)return;i!==this.Ws&&this.isEnabled&&this._instance.capture(iI,{navigation_type:e}),this.Ws=i}catch(t){tR.error("Error capturing "+e+" pageview",t)}}Qs(){if(!this.Zs){var e=()=>{this.Gs("popstate")};iU(s,"popstate",e),this.Zs=()=>{s&&s.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.Js=!1,this.js=!1,this.Ks=null,this.instance=e,this.Js=!(null==(t=this.instance.persistence)||!t.props[tH]),this.rageclicks=new nP(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return B(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return G(this.qt.capture_heatmaps)?G(this.qt.enable_heatmaps)?this.Js:this.qt.enable_heatmaps:!1!==this.qt.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.js||(nN.info("starting..."),this.Ys(),this.At());else{var e;clearInterval(null!=(e=this.Ks)?e:void 0),this.Xs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tH]:t}),this.Js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}eo(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Ks&&clearInterval(this.Ks),this.Ks="visible"===(null==o?void 0:o.visibilityState)?setInterval(this.Kr.bind(this),this.flushIntervalMilliseconds):null}Ys(){s&&o&&(this.ro=this.Kr.bind(this),iU(s,iA,this.ro),this.io=e=>this.Mt(e||(null==s?void 0:s.event)),iU(o,"click",this.io,{capture:!0}),this.no=e=>this.so(e||(null==s?void 0:s.event)),iU(o,"mousemove",this.no,{capture:!0}),this.oo=new ss(this.instance,st,this.eo.bind(this)),this.oo.startIfEnabledOrStop(),this.ao=this.At.bind(this),iU(o,iF,this.ao),this.js=!0)}Xs(){var e;s&&o&&(this.ro&&s.removeEventListener(iA,this.ro),this.io&&o.removeEventListener("click",this.io,{
281capture:!0}),this.no&&o.removeEventListener("mousemove",this.no,{capture:!0}),this.ao&&o.removeEventListener(iF,this.ao),clearTimeout(this.uo),null==(e=this.oo)||e.stop(),this.js=!1)}lo(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),o=function(e,t,i){for(var r=e;r&&r7(r)&&!r9(r,"body")&&r!==i;){if(R(t,null==s?void 0:s.getComputedStyle(r).position))return!0;r=nc(r)}return!1}(na(e),["fixed","sticky"],n);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:i),target_fixed:o,type:t}}Mt(e,t){var i;if(void 0===t&&(t="click"),!r8(e.target)&&nB(e)){var s=this.lo(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.ho(m({},s,{type:"rageclick"})),this.ho(s)}}so(e){!r8(e.target)&&nB(e)&&(clearTimeout(this.uo),this.uo=setTimeout(()=>{this.ho(this.lo(e,"mousemove"))},500))}ho(e){if(s){var t=s.location.href,i=this.qt.custom_personal_data_properties,r=sp(t,this.qt.mask_personal_data_properties?[...sv,...i||[]]:[],sm);this.M=this.M||{},this.M[r]||(this.M[r]=[]),this.M[r].push(e)}}Kr(){this.M&&!H(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:ss,webVitalsAutocapture:class{constructor(e){var t;this.Js=!1,this.js=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.co=()=>{clearTimeout(this.do),0!==this.M.metrics.length&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((e,t)=>m({},e,{["$web_vitals_"+t.name+"_event"]:m({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.dt=e=>{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var t,i=this.vo();if(!z(i))if(G(null==e?void 0:e.name)||G(null==e?void 0:e.value))nR.error("Invalid metric received",e);else if(!this.fo||this.fo>e.value){this.M.url!==i&&(this.co(),this.do=setTimeout(this.co,this.flushToCaptureTimeoutMs)),z(this.M.url)&&(this.M.url=i),this.M.firstMetricTimestamp=z(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var s=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),r=m({},e,{$current_url:i,timestamp:Date.now()});z(s)||(r.$session_id=s.sessionId,r.$window_id=s.windowId),this.M.metrics.push(r),this.M.metrics.length===this.allowedMetrics.length&&this.co()}else nR.error("Ignoring metric with value >= "+this.fo,e)},this.po=()=>
281{if(!this.js){var e,t,i,s,r=p.__PosthogExtensions__;z(r)||z(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.dt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.dt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.dt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.dt.bind(this)),this.js=!0):nR.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Js=!(null==(t=this._instance.persistence)||!t.props[tV]),this.startIfEnabled()}get mo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,i=B(this.mo)?null==(e=this.mo)?void 0:e.web_vitals_allowed_metrics:void 0;return G(i)?(null==(t=this._instance.persistence)?void 0:t.props[tQ])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(B(this.mo)?this.mo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=B(this.mo)?this.mo.web_vitals_attribution:void 0;return null!=e&&e}get fo(){var e=B(this.mo)&&K(this.mo.__web_vitals_max_value)?this.mo.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==a?void 0:a.protocol;if("http:"!==e&&"https:"!==e)return nR.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=B(this.mo)?this.mo.web_vitals:Y(this.mo)?this.mo:void 0;return Y(t)?t:this.Js}startIfEnabled(){this.isEnabled&&!this.js&&(nR.info("enabled, starting..."),this.lr(this.po))}onRemoteConfig(e){if("capturePerformance"in e){var t=B(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=B(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[tV]:t}),this._instance.persistence.register({[tQ]:i})),this.Js=t,this.startIfEnabled()}}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?nR.error("failed to load script",t):e()})}vo(){var e=s?s.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties;return sp(e,this._instance.config.mask_personal_data_properties?[...sv,...t||[]]:[],sm)}nR.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t,i,r;this.po=()=>{var e;if(s&&this.isEnabled&&null!=(e=p.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=p.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=p.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=p.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.yo&&this.qt.capture_unhandled_errors&&(this.yo=t(this.captureException.bind(this))),!this.bo&&this.qt.capture_unhandled_rejections&&(this.bo=i(this.captureException.bind(this))),!this._o&&this.qt.capture_console_errors&&(this._o=r(this.captureException.bind(this)))}catch(e){nF.error("failed to start",e),this.wo()}}},this._instance=e,this.xo=!(null==(t=this._instance.persistence)||!t.props[tz]),this.So=new er({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,Gt:nF}),this.qt=this.ko(),this.startIfEnabledOrStop()}ko(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return B(e)?t=m({},t,e):(z(e)?this.xo:e)&&(t=m({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(nF.info("enabled"),this.wo(),this.lr(this.po)):this.wo()}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return nF.error("failed to load script",t);e()})}wo(){var e,t,i;null==(e=this.yo)||e.call(this),this.yo=void 0,null==(t=this.bo)||t.call(this),this.bo=void 0,null==(i=this._o)||i.call(this),this._o=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.xo=!!e.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[tz]:this.xo}),this.qt=this.ko(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.ko()}captureException(e){var t,i,s,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.So.consumeRateLimit(r)?nF.info("Skipping exception capture because of client rate limiting.",{exception:r}):null==(s=this._instance.exceptions)||s.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.Co=[],this.Io=new tr([new tg,new tS,new t_,new tv,new tk,new tx,new ty,new tE],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),o=s;n.length>o;o++){var a=n[o];if(1024>=a.length){var l=tf.test(a)?a.replace(tf,"$1"):a;if(!l.match(/\S*Error: /)){for(var u of i){var c=u(l,e);if(c){r.push(c);break}}if(r.length>=50)break}}}if(!r.length)return[];var h=Array.from(r);return h.reverse(),h.slice(0,50).map(e=>m({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tc,tp)),this._instance=e,this.Co=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(tU))?t:[],this.To=tF(this.Eo()),this.Mo=new tA(this.To)}onConfigChange(){this.To=tF(this.Eo()),this.Mo.setConfig(this.To)}onRemoteConfig(e){var t,i,s;if("errorTracking"in e){var r=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(s=e.errorTracking)?void 0:s.captureExtensionExceptions;this.Co=r,this._instance.persistence&&this._instance.persistence.register({[tU]:this.Co,[tW]:n})}}get Ro(){var e,t=!!this._instance.get_property(tW),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Io.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.To.enabled)try{if(!U(e)||0===e.trim().length)return void n4.warn("Ignoring exception step because message must be a non-empty string");var i=this.Po(t),{sanitizedProperties:s,droppedKeys:r}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((i,s)=>(tO.has(s)?t.push(s):i[s]=e[s],i),{}),droppedKeys:t}}(i);r.length>0&&n4.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.Mo.add(m({[tP]:e,[tC]:(new Date).toISOString()}
281,s))}catch(e){n4.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Oo(t)){if(this.Lo(t))return this.Fo("Exception dropped: matched a suppression rule"),void n4.info("Skipping exception capture because a suppression rule matched");if(!this.Ro&&this.Ao(t))return this.Fo("Exception dropped: thrown by a browser extension"),void n4.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.No(t))return this.Fo("Exception dropped: thrown by the PostHog SDK"),void n4.info("Skipping exception capture because it was thrown by the PostHog SDK")}var i=this.To.enabled&&G(e.$exception_steps)?this.Do(e):e;try{var s=this._instance.capture("$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",cn:!0});return s&&this.Mo.clear(),s}catch(e){return n4.error("Failed to capture exception event. Dropping this exception.",e),void this.Mo.clear()}}catch(e){return void n4.error("Failed to process exception event. Ignoring this exception.",e)}}Do(e){try{var t=this.Mo.getAttachable();return 0===t.length?e:m({},e,{$exception_steps:t})}catch(t){return n4.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}Fo(e){this.To.enabled&&this.Mo.add({[tP]:e,[tC]:(new Date).toISOString()})}Po(e){return B(e)?m({},e):{}}Eo(){var e,t;return null!=(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)?e:{}}Lo(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:s}=t;return U(i)&&i.length>0&&e.$exception_types.push(i),U(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.Co.some(e=>{var i=e.values.map(e=>{var i,s=rA[e.operator],r=j(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return r.length>0&&s(r,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Ao(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}No(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],o=n[n.length-1];return null!=(s=null==o||null==(r=o.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}Oo(e){return!G(e)&&j(e)}}},os,{siteApps:class{constructor(e){this._instance=e,this.Ho=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Uo(e,t){if(t){var i=this.globalsForEvent(t);this.Ho.push(i),this.Ho.length>1e3&&(this.Ho=this.Ho.slice(10))}}get siteAppLoaders(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Uo.bind(this));this.Bo=()=>{e(),this.Ho=[],this.Bo=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,o,a,l={},u=this._instance.get_property("$groups")||[];for(var[c,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:h};var{$set_once:d,$set:p}=e;return{event:m({},y(e,nz),{properties:m({},e.properties,p?{$set:m({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:m({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(o=e.properties)?void 0:o.$elements_chain)?n:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.Ho.length&&(nU.info("Processing "+this.Ho.length+" events for site app with id "+e.id),this.Ho.forEac
281h(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.Bo)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,nU.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback(e){r(e)}});n&&(t.processEvent=n),s=!0}catch(t){nU.error(nW+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){nU.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}zo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}Vo(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){nU.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.zo(),void this._instance.on("eventCaptured",e=>this.Vo(e))):void nU.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Bo)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;p["__$$ph_site_app_"+e]=r._instance,null==(t=p.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,a,t=>{if(t)return nU.error(nW+e,t)})};for(var{id:o,url:a}of e.siteApps)n(o)}else nU.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},or,{tracingHeaders:class{constructor(e){this.Wo=void 0,this.Zo=void 0,this.Go=void 0,this.po=()=>{var e,t,i=this.Qo();i?(z(this.Wo)&&(this.Wo=null==(e=p.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)?void 0:e._patchXHR(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),z(this.Zo)&&(this.Zo=null==(t=p.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)?void 0:t._patchFetch(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.wo()},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.tracingHeadersPatchFns?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return nI.error("failed to load script",t);e()})}Jo(){var e,t;return null!=(e=null!=(t=this._instance.config.tracing_headers)?t:this._instance.config.addTracingHeaders)?e:this._instance.config.__add_tracing_headers}Qo(){var e=this.Jo();return j(e)?(j(this.Go)?this.Go.splice(0,this.Go.length,...e):this.Go=[...e],e.length>0?this.Go:void 0):(j(this.Go)&&this.Go.splice(0),this.Go=e||void 0,this.Go)}wo(){var e,t;null==(e=this.Wo)||e.call(this),null==(t=this.Zo)||t.call(this),this.Wo=void 0,this.Zo=void 0}startIfEnabledOrStop(){this.Qo()?this.lr(this.po):this.wo()}}},{toolbar:class{constructor(e){this.instance=e}oa(e){p.ph_toolbar_state=e}aa(){var e;return null!=(e=p.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),iW(this.instance.config)||!s||!o)return!1;e=null!=e?e:s.location,i=null!=i?i:s.history;try{if(!t){try{s.localStorage.setItem("test","test"),s.localStorage.removeItem("test")}catch(e){return!1}t=null==s?void 0:s.localStorage}var r,n=nX||sf(e.hash,"__posthog")||sf(e.hash,"state"),a=n?iN(()=>JSON.parse(atob(decodeURIComponent(n))))||iN(()=>JSON.parse(decodeURIComponent(n))):null;return a&&"ph_authorize"===a.action?((r=a).source="url",r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(nZ)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(e){return!1}}ua(e){var t=p.ph_load_toolbar||p.ph_load_editor;!G(t)&&N(t)?t(e,this.instance):n0.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==o||!o.getElementById(iy));if(!s||i)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=m({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});return(s.localStorage.setItem(nZ,JSON.stringify(m({},n,{source:void 0}))),2===this.aa())?this.ua(n):0===this.aa()&&(this.oa(1),null==(t=p.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(n0.error("[Toolbar] Failed to load",e),this.oa(0)):(this.oa(2),this.ua(n))}),iU(s,"turbolinks:load",()=>{this.oa(0),this.loadToolbar(n)})),!0}la(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},on,{conversations:class{constructor(e){this.ha=void 0,this._conversationsManager=null,this.ca=!1,this.da=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;G(t)||(Y(t)?this.ha=t:(this.ha=t.enabled,this.da=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.ha=void 0,this.da=null}loadIfEnabled(){if(!(this._conversationsManager||this.ca||this._instance.config.disable_conversations||iW(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==p?void 0:p.__PosthogExtensions__;if(e&&!z(this.ha)&&this.ha)if(this.da&&this.da.token){this.ca=!0;try{var t=e.initConversations;if(t)return this.va(t),void(this.ca=!1);var i=e.loadExternalDependency;if(!i)return void this.fa(iE);i(this._instance,"conversations",t=>{t||!e.initConversations?this.fa("Could not load conversations script",t):this.va(e.initConversations),this.ca=!1})}catch(e){this.fa("Error initializing conversations",e),this.ca=!1}}else oe.error("Conversations enabled but missing token in remote config.")}}va(e){if(this.da)try{this._conversationsManager=e(this.da,this._instance),oe.info("Conversations loaded successfully")}catch(e){this.fa("Error completing conversations initialization",e)}else oe.error("Cannot complete initialization: remote config is null")}fa(e,t){oe.error(e,t),this._conversationsManager=null,this.ca=!1}show(){this._conversationsManager?this._conversationsManager.show():oe.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.ha&&!V(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var s=this;return _(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,i):(oe.warn(ot),null)})()}getMessages(e,t){var i=this;return _(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(oe.warn(ot),null)})()}markAsRead(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(oe.warn(ot),null)})()}getTickets(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(oe.warn(ot),null)})()}requestRestoreLink(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(oe.warn(ot),null)})()}restoreFromToken(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(oe.warn(ot),null)})()}restoreFromUrlToken(){var e=this;return _(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(oe.warn(ot),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}yn(){var e;null==(e=this._conversationsManager)||e.setIdentity()}bn(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.pa=!1,this.ga=!1,this.Gt=t$("[logs]"),this.ma=[],this.ya=0,this.ba=0,this._a=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.pa=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!G(i)&&i&&(this.pa=!0,this.loadIfEnabled())}reset(){this.ma=[],this.Br&&(clearTimeout(this.Br),this.Br=void 0),this.ya=0,this.ba=0,this._a=!1}loadIfEnabled(){if(this.pa&&!this.ga){var e=null==p?void 0:p.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var i;t||null==(i=e.logs)||!i.initializeLogs?this.Gt.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.ga=!0)}):this.Gt.error(iE)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,i,s,r,n,o;if(this._instance.is_capturing())if(e&&e.body){var a=null!=(t=null==(i=this._instance.config.logs)?void 0:i.flushIntervalMs)?t:3e3,l=null!=(s=null==(r=this._instance.config.logs)?void 0:r.maxLogsPerInterval)?s:1e3,u=Date.now();if(a>u-this.ba||(this.ba=u,this.ya=0,this._a=!1),l>this.ya){this.ya++;var c=function(e,t){var{text:i,number:s}=tt[e.level||"info"]||ti,r=String(Date.now())+"000000",n={};t.distinctId&&(n.posthogDistinctId=t.distinctId),t.sessionId&&(n.sessionId=t.sessionId),t.currentUrl&&(n["url.full"]=t.currentUrl),t.screenName&&(n["screen.name"]=t.screenName),t.appState&&(n["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(n.feature_flags=t.activeFeatureFlags);var o=m({},n,e.attributes||{}),a={timeUnixNano:r,observedTimeUnixNano:r,severityNumber:s,severityText:i,body:{stringValue:e.body},attributes:ts(o)};return e.trace_id&&(a.traceId=e.trace_id),e.span_id&&(a.spanId=e.span_id),z(e.trace_flags)||(a.flags=e.trace_flags),a}(e,this.wa());this.ma.push({record:c}),(null!=(n=null==(o=this._instance.config.logs)?void 0:o.maxBufferSize)?n:100)>this.ma.length?this.xa():this.flushLogs()}else this._a||(this.Gt.warn("captureLog dropping logs: exceeded "+l+" logs per "+a+"ms"),this._a=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.Sa||(this.Sa={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>
281this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Sa}flushLogs(e){if(this.Br&&(clearTimeout(this.Br),this.Br=void 0),0!==this.ma.length){var t,i,s,r=this.ma;this.ma=[];var n=this._instance.config.logs,o=m({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),a=(t=r.map(e=>e.record),i=g.LIB_NAME,s=g.LIB_VERSION,{resourceLogs:[{resource:{attributes:ts(o)},scopeLogs:[{scope:{name:i,version:s},logRecords:t}]}]}),l=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Yi({method:"POST",url:l,data:a,compression:"best-available",batchKey:"logs",transport:e})}}xa(){var e,t;this.Br||(this.Br=setTimeout(()=>{this.Br=void 0,this.flushLogs()},null!=(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)?e:3e3))}wa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:i}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=i}if(null!=p&&null!=(e=p.location)&&e.href&&(t.currentUrl=p.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(t.activeFeatureFlags=s)}return t}}});r4.__defaultExtensionClasses=m({},oo);var oa=(g.SDK_DIST_CHANNEL="npm",t=rG[r0]=new r4,function(){function e(){e.done||(e.done=!0,r1=!1,iL(rG,function(e){e._dom_loaded()}))}null!=o&&o.addEventListener?"complete"===o.readyState?e():iU(o,"DOMContentLoaded",e,{capture:!1}):s&&tR.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),t);e.s(["default",0,oa],604570);var ol=e.i(271645),ou=(0,ol.createContext)({get client(){return i},bootstrap:void 0}),oc=function(e){return"function"==typeof e},oh=function(e){return void 0===e},od=function(e,t){return(od=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var op={componentStack:null,exceptionEvent:null,error:null};!function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}function i(t){var i=e.call(this,t)||this;return i.state=op,i}od(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),i.prototype.componentDidCatch=function(e,t){var i,s=this.props.additionalProperties;oc(s)?i=s(e):"object"==typeof s&&(i=s);var r=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:null!=n?n:null,exceptionEvent:r})},i.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,s=this.state;if(null==s.componentStack)return oc(t)?t():t;var r=oc(i)?ol.default.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return ol.default.isValidElement(r)?r:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),ol.default.createElement(ol.default.Fragment,null))},i.contextType=ou}(ol.default.Component),i=oa,e.s(["PostHogProvider",0,function(e){var t,s,r=e.children,n=e.client,o=e.apiKey,a=e.options,l=(0,ol.useRef)(null),u=(0,ol.useMemo)(function(){if(n)return o&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n;var e=i;return o||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[n,o,JSON.stringify(a)]);return(0,ol.useEffect)(function(){if(!n&&o){var e=i,t=l.current;t?(o!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!function e(t,i,s){if(void 0===s&&(s=new WeakMap),t===i)return!0;
281if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(s.has(t)&&s.get(t)===i)return!0;s.set(t,i);var r=Object.keys(t),n=Object.keys(i);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var a=r[o];if(!n.includes(a)||!e(t[a],i[a],s))return!1}return!0}(a,t.options)&&e.set_config(a)):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(o,a)),l.current={apiKey:o,options:null!=a?a:{}}}},[n,o,JSON.stringify(a)]),ol.default.createElement(ou.Provider,{value:{client:u,bootstrap:null!=(t=null==a?void 0:a.bootstrap)?t:null==(s=null==n?void 0:n.config)?void 0:s.bootstrap}},r)},"useFeatureFlagEnabled",0,function(e,t){var i,s,r=(0,ol.useContext)(ou),n=r.client,o=r.bootstrap,a=(0,ol.useState)(function(){return n.isFeatureEnabled(e)}),l=a[0],u=a[1];(0,ol.useEffect)(function(){return n.onFeatureFlags(function(){u(n.isFeatureEnabled(e))})},[n,e]);var c=null==(i=null==o?void 0:o.featureFlags)?void 0:i[e];return!(null==(s=null==n?void 0:n.featureFlags)?void 0:s.hasLoadedFlags)&&(null==o?void 0:o.featureFlags)?oh(c)?t:!!c:oh(l)?t:l},"usePostHog",0,function(){return(0,ol.useContext)(ou).client}],605164)},386850,531338,e=>{"use strict";let t={done:!1,hasNext:!1};e.s(["r",0,e=>({hasNext:!0,next:e,done:!1}),"t",0,t],531338),e.s(["pipe",0,function(e,...i){let s=e,r=i.map(e=>"lazy"in e?function(e){let{lazy:t,lazyArgs:i}=e;return Object.assign(t(...i),{isSingle:t.single??!1,index:0,items:[]})}(e):void 0),n=0;for(;n<i.length;){var o;if(void 0===r[n]||!("string"==typeof(o=s)||"object"==typeof o&&o&&Symbol.iterator in o)){s=(0,i[n])(s),n+=1;continue}let e=[];for(let t=n;t<i.length;t++){let i=r[t];if(void 0===i||(e.push(i),i.isSingle))break}let a=[];for(let i of s)if(function e(i,s,r){if(0===r.length)return s.push(i),!1;let n=i,o=t,a=!1;for(let[t,i]of r.entries()){let{index:l,items:u}=i;if(u.push(n),o=i(n,l,u),i.index+=1,o.hasNext){if(o.hasMany){for(let i of o.next)if(e(i,s,r.slice(t+1)))return!0;return a}n=o.next}if(!o.hasNext)break;o.done&&(a=!0)}return o.hasNext&&s.push(n),a}(i,a,e))break;let{isSingle:l}=e.at(-1);s=l?a[0]:a,n+=e.length}return s}],386850)},406048,503400,e=>{"use strict";function t(e,...i){let s=e;for(let e of i){if(null==s)return;s=s[e]}return s}e.s(["prop",0,function(e,...i){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e?s=>t(s,e,...i):t(e,...i)}],406048);var i=e.i(531338),s=e.i(2219);function r(e){let t=new Set;return(s,r,n)=>{let o=e(s,r,n);return t.has(o)?i.t:(t.add(o),{done:!1,hasNext:!0,next:s})}}e.s(["uniqueBy",0,function(...e){return(0,s.t)(r,e)}],503400)},550757,e=>{"use strict";var t=e.i(676014);function i(e){return[...e].reverse()}e.s(["reverse",0,function(...e){return(0,t.purry)(i,e)}])},546945,2219,e=>{"use strict";var t=e.i(531338),i=e.i(386850);function s(e,t){let s=t.length-e.length;if(1===s){let[s,...r]=t;return(0,i.pipe)(s,{lazy:e,lazyArgs:r})}if(0===s){let s={lazy:e,lazyArgs:t};return Object.assign(e=>(0,i.pipe)(e,s),s)}throw Error("Wrong number of arguments")}function r(){let e=new Set;return i=>e.has(i)?t.t:(e.add(i),{done:!1,hasNext:!0,next:i})}e.s(["t",0,s],2219),e.s(["unique",0,function(...e){return s(r,e)}],546945)}]);
282
283//# debugId=9de2c5a6-c10b-cc65-7220-3ff815cf5c99

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.