circuschief 0.8.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/server/src/agents/AgentGateway.js +2 -0
- package/packages/server/src/agents/adapters/GeminiAdapter.js +105 -0
- package/packages/server/src/agents/adapters/cliUtils.js +15 -0
- package/packages/server/src/agents/adapters/codexCliRunner.js +1 -8
- package/packages/server/src/agents/adapters/geminiCliRunner.js +183 -0
- package/packages/server/src/agents/adapters/geminiEventMapper.js +195 -0
- package/packages/server/src/api/commandButtons.js +16 -15
- package/packages/server/src/api/projects-commandButtons.js +6 -6
- package/packages/server/src/api/projects-session-create.js +109 -0
- package/packages/server/src/api/projects-session-defaults.js +51 -0
- package/packages/server/src/api/projects-session-helpers.js +47 -1
- package/packages/server/src/api/projects-templates.js +38 -0
- package/packages/server/src/api/projects.js +28 -180
- package/packages/server/src/api/sessions-commands.js +21 -18
- package/packages/server/src/api/sessions-patch.js +41 -1
- package/packages/server/src/db/ProviderRepository.js +4 -2
- package/packages/server/src/db/SessionRepository.js +1 -1
- package/packages/server/src/db/SessionTemplateRepository.js +23 -2
- package/packages/server/src/db/migrations/canvasItemsMigrations.js +109 -0
- package/packages/server/src/db/migrations/conversationsMigrations.js +187 -0
- package/packages/server/src/db/migrations/index.js +234 -6
- package/packages/server/src/db/migrations/kanbanMigrations.js +99 -0
- package/packages/server/src/db/migrations/miscMigrations.js +244 -0
- package/packages/server/src/db/migrations/projectsMigrations.js +130 -0
- package/packages/server/src/db/migrations/providerCommitAttributionMigrations.js +30 -0
- package/packages/server/src/db/migrations/providerMigrations.js +250 -0
- package/packages/server/src/db/migrations/sessionTableRecreate.js +136 -0
- package/packages/server/src/db/migrations/sessionsMigrations.js +300 -0
- package/packages/server/src/db/seedBaselineData.js +23 -1
- package/packages/server/src/db/session-helpers.js +26 -1
- package/packages/server/src/schema.sql +5 -1
- package/packages/server/src/services/commandButtonPrompts.js +9 -7
- package/packages/server/src/services/e2eSpawnCapture.js +47 -6
- package/packages/server/src/services/geminiSpawnHelper.js +47 -0
- package/packages/server/src/services/gitCommitAttribution.js +38 -8
- package/packages/server/src/services/gitDiff.js +107 -0
- package/packages/server/src/services/gitRepoUrl.js +174 -0
- package/packages/server/src/services/gitService.js +43 -311
- package/packages/server/src/services/gitWorktree.js +127 -0
- package/packages/server/src/services/providerTestService.js +59 -1
- package/packages/server/src/services/queryParamBuilder.js +33 -1
- package/packages/server/src/services/sessionExecution.js +4 -0
- package/packages/server/src/services/sessionPrompts.js +23 -1
- package/packages/server/src/services/sessionProvider.js +41 -1
- package/packages/shared/src/constants.js +1 -1
- package/packages/shared/src/contracts/providers.js +1 -1
- package/packages/shared/src/contracts/sessions.js +27 -1
- package/packages/shared/src/contracts/templates.js +10 -0
- package/packages/shared/src/types.js +7 -0
- package/packages/web/dist/assets/{ActiveSessionsView-B0XHqLmv.js → ActiveSessionsView-EdNxmPmZ.js} +1 -1
- package/packages/web/dist/assets/{AgentLogsView-DmsjUMlB.js → AgentLogsView-C2wX0JPP.js} +2 -2
- package/packages/web/dist/assets/ApiClient-DfbJwzpz.js +1 -0
- package/packages/web/dist/assets/ArchiveConfirmModal-DJERn5XO.js +1 -0
- package/packages/web/dist/assets/CommandButtonDetailView-CBPI8-US.js +1 -0
- package/packages/web/dist/assets/CommandButtonDetailView-D9zjx9ME.css +1 -0
- package/packages/web/dist/assets/EffortLevelSelector-PaBpUveC.js +1 -0
- package/packages/web/dist/assets/{GeneralSettingsView-D1nI8_zk.js → GeneralSettingsView-Dw-x83R0.js} +1 -1
- package/packages/web/dist/assets/{InputWithButton-CAkttyqx.js → InputWithButton-CHHcpF4I.js} +1 -1
- package/packages/web/dist/assets/{InterpolationHelp-BO1j9Z3_.js → InterpolationHelp-CLNPz8s8.js} +1 -1
- package/packages/web/dist/assets/MarkdownEditor-DYi1igfT.js +2 -0
- package/packages/web/dist/assets/ModelSelector-Cko_yTO5.js +1 -0
- package/packages/web/dist/assets/{ModelSelector-BSxKUSus.css → ModelSelector-Dtwe5xLH.css} +1 -1
- package/packages/web/dist/assets/{NewSessionView-BDPb-1qr.css → NewSessionView-DBl7T2Xp.css} +1 -1
- package/packages/web/dist/assets/NewSessionView-DwUfBg70.js +3 -0
- package/packages/web/dist/assets/ProjectEditView-CSbsea3U.js +1 -0
- package/packages/web/dist/assets/ProjectEditView-DbqTbA0q.css +1 -0
- package/packages/web/dist/assets/{ProjectListView-DcNyuINs.js → ProjectListView-CEc_LWZL.js} +1 -1
- package/packages/web/dist/assets/{ProjectNewView-B5YV62hv.js → ProjectNewView-D4U0uRlp.js} +1 -1
- package/packages/web/dist/assets/ProvidersView-2KCOiY6Q.css +1 -0
- package/packages/web/dist/assets/ProvidersView-CD1j8BOv.js +1 -0
- package/packages/web/dist/assets/QuickResponsesPanel-Dp39f12o.js +1 -0
- package/packages/web/dist/assets/QuickResponsesPanel-dk-Rj8xx.css +1 -0
- package/packages/web/dist/assets/ResizableTextarea-BWywIqOv.js +1 -0
- package/packages/web/dist/assets/ResizableTextarea-DERSH3Wz.css +1 -0
- package/packages/web/dist/assets/SessionCard-B6d5ijDW.js +1 -0
- package/packages/web/dist/assets/SessionDetailView-DWbXdx7A.js +36 -0
- package/packages/web/dist/assets/SessionDetailView-ULeIkWS0.css +1 -0
- package/packages/web/dist/assets/{SessionFormOptions-B6AxyREh.js → SessionFormOptions-Dz9ik4Fo.js} +1 -1
- package/packages/web/dist/assets/{SessionListView-B5_6gW49.css → SessionListView-3-xx6EVs.css} +1 -1
- package/packages/web/dist/assets/SessionListView-C129buBe.js +1 -0
- package/packages/web/dist/assets/{SessionLogStream-LlZ3z_Xj.js → SessionLogStream-BvXUNNBZ.js} +6 -6
- package/packages/web/dist/assets/{SettingsView-CTGiGvR2.js → SettingsView-DW1NvpX_.js} +1 -1
- package/packages/web/dist/assets/SlashCommandWizard-DleYBxrE.js +1 -0
- package/packages/web/dist/assets/{SummarySettingsView-BR2ZjEa3.js → SummarySettingsView-CLUfcWvf.js} +1 -1
- package/packages/web/dist/assets/TemplateDetailView-B5NI2oTR.css +1 -0
- package/packages/web/dist/assets/TemplateDetailView-Cukb205e.js +1 -0
- package/packages/web/dist/assets/{commandButtons-BfqR-fqq.js → commandButtons-DejH0rVN.js} +1 -1
- package/packages/web/dist/assets/index-BD7Y3rBE.js +3 -0
- package/packages/web/dist/assets/{index-BY174HVJ.css → index-Bd20AzX1.css} +1 -1
- package/packages/web/dist/assets/index-BgJiarKe.js +1 -0
- package/packages/web/dist/assets/index-Bk32fSSG.js +1 -0
- package/packages/web/dist/assets/index-BkA6pF2Z.js +1 -0
- package/packages/web/dist/assets/index-Cltr-Ldt.js +7 -0
- package/packages/web/dist/assets/index-Co-46Tp3.js +1 -0
- package/packages/web/dist/assets/index-Cpykk857.js +1 -0
- package/packages/web/dist/assets/index-CtABl0D1.js +1 -0
- package/packages/web/dist/assets/index-Cuqk5m9S.js +1 -0
- package/packages/web/dist/assets/{index-fK8FIZgP.js → index-CvXApbVC.js} +15 -15
- package/packages/web/dist/assets/index-D2gN-xEH.js +1 -0
- package/packages/web/dist/assets/index-Dd3WpmyQ.js +1 -0
- package/packages/web/dist/assets/index-Dk6--9rj.js +1 -0
- package/packages/web/dist/assets/{index-DgkC10TW.js → index-MZf7MlPX.js} +3 -3
- package/packages/web/dist/assets/{index-DtfUt785.js → index-NShCcwfj.js} +1 -1
- package/packages/web/dist/assets/index-hA3VEuSq.js +1 -0
- package/packages/web/dist/assets/index-p0mp3nca.js +1 -0
- package/packages/web/dist/assets/index-qntNa5r_.js +1 -0
- package/packages/web/dist/assets/index-qq9ceNSK.js +1 -0
- package/packages/web/dist/assets/projectDefaults-D9xkp2XR.js +1 -0
- package/packages/web/dist/assets/{projects-DXYQNJIi.js → projects-BvLADGKx.js} +1 -1
- package/packages/web/dist/assets/{providers-1bnH-exJ.js → providers-DZ-fOa4G.js} +1 -1
- package/packages/web/dist/assets/{sessions-6zGUlFrt.js → sessions-DETEyjPI.js} +1 -1
- package/packages/web/dist/assets/{settings-MbfRir0d.js → settings-TWfbahn5.js} +1 -1
- package/packages/web/dist/index.html +2 -2
- package/packages/web/dist/assets/ApiClient-C3ztI9s9.js +0 -1
- package/packages/web/dist/assets/ArchiveConfirmModal-BlCyn5Vt.js +0 -1
- package/packages/web/dist/assets/CommandButtonDetailView-CdSCPp78.js +0 -1
- package/packages/web/dist/assets/CommandButtonDetailView-DBm3rzhw.css +0 -1
- package/packages/web/dist/assets/EffortLevelSelector-hc2MNKg6.js +0 -1
- package/packages/web/dist/assets/MarkdownEditor-ucRAP_UM.js +0 -2
- package/packages/web/dist/assets/ModelSelector-CwTz8ZWO.js +0 -1
- package/packages/web/dist/assets/NewSessionView-BsDrp8mj.js +0 -3
- package/packages/web/dist/assets/ProjectEditView-CwTOeSun.js +0 -1
- package/packages/web/dist/assets/ProjectEditView-J15mcsWz.css +0 -1
- package/packages/web/dist/assets/ProvidersView-bZemq_Rv.css +0 -1
- package/packages/web/dist/assets/ProvidersView-nY9GnDdO.js +0 -1
- package/packages/web/dist/assets/QuickResponseSettings-B352c75l.css +0 -1
- package/packages/web/dist/assets/QuickResponseSettings-BQwQXuL7.js +0 -1
- package/packages/web/dist/assets/QuickResponsesPanel-BlFDvnZ2.css +0 -1
- package/packages/web/dist/assets/QuickResponsesPanel-BzSYcCSP.js +0 -1
- package/packages/web/dist/assets/ResizableTextarea-B3YIdIXv.js +0 -1
- package/packages/web/dist/assets/ResizableTextarea-DsU3TVwF.css +0 -1
- package/packages/web/dist/assets/SessionCard-CjE1tXiT.js +0 -1
- package/packages/web/dist/assets/SessionDetailView-3cPZrbS3.js +0 -36
- package/packages/web/dist/assets/SessionDetailView-CZRZMrfM.css +0 -1
- package/packages/web/dist/assets/SessionListView-CLXBfLcq.js +0 -1
- package/packages/web/dist/assets/SlashCommandWizard-Cy04d7-o.js +0 -1
- package/packages/web/dist/assets/TemplateDetailView-DH6Oswsp.js +0 -1
- package/packages/web/dist/assets/TemplateDetailView-DT2m06W7.css +0 -1
- package/packages/web/dist/assets/index-1zziPL6l.js +0 -1
- package/packages/web/dist/assets/index-7kzHPxSF.js +0 -1
- package/packages/web/dist/assets/index-B0N_obMc.js +0 -1
- package/packages/web/dist/assets/index-BNk_gdfI.js +0 -1
- package/packages/web/dist/assets/index-CSqaAH-0.js +0 -1
- package/packages/web/dist/assets/index-C_q4WlK8.js +0 -1
- package/packages/web/dist/assets/index-D1wpU4y0.js +0 -7
- package/packages/web/dist/assets/index-D5zCA8sD.js +0 -1
- package/packages/web/dist/assets/index-DGR8ELWY.js +0 -1
- package/packages/web/dist/assets/index-DHga8pXo.js +0 -1
- package/packages/web/dist/assets/index-DSby02Wl.js +0 -1
- package/packages/web/dist/assets/index-DqjXJTVI.js +0 -1
- package/packages/web/dist/assets/index-_4S2uLDI.js +0 -1
- package/packages/web/dist/assets/index-gmiZeFXN.js +0 -1
- package/packages/web/dist/assets/index-irD539ZM.js +0 -3
- package/packages/web/dist/assets/index-yq-E1Y00.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectListView-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectListView-CEc_LWZL.js","assets/projects-BvLADGKx.js","assets/ApiClient-DfbJwzpz.js","assets/useSummaryHelpers-GVg7sMWF.js","assets/ProjectListView-CumumZN-.css","assets/ProjectNewView-D4U0uRlp.js","assets/InputWithButton-CHHcpF4I.js","assets/InputWithButton-D9HMvfR5.css","assets/ProjectNewView-CaLXfFzd.css","assets/ProjectEditView-CSbsea3U.js","assets/projectDefaults-D9xkp2XR.js","assets/ModelSelector-Cko_yTO5.js","assets/providers-DZ-fOa4G.js","assets/ModelSelector-Dtwe5xLH.css","assets/ProjectEditView-DbqTbA0q.css","assets/CommandButtonDetailView-CBPI8-US.js","assets/commandButtons-DejH0rVN.js","assets/CommandButtonDetailView-D9zjx9ME.css","assets/SessionListView-C129buBe.js","assets/sessions-DETEyjPI.js","assets/SessionLogStream-BvXUNNBZ.js","assets/SessionLogStream-zPUTiGbe.css","assets/SessionCard-B6d5ijDW.js","assets/SessionCard-BMGC2HqI.css","assets/EffortLevelSelector-PaBpUveC.js","assets/EffortLevelSelector-BQaQmU2d.css","assets/InterpolationHelp-CLNPz8s8.js","assets/InterpolationHelp-iNxTxmhs.css","assets/ResizableTextarea-BWywIqOv.js","assets/ResizableTextarea-DERSH3Wz.css","assets/SessionFormOptions-Dz9ik4Fo.js","assets/SlashCommandWizard-DleYBxrE.js","assets/SlashCommandWizard-DJzw3LP5.css","assets/SessionFormOptions-BpUALRKn.css","assets/ArchiveConfirmModal-DJERn5XO.js","assets/ArchiveConfirmModal-DeoCVGXt.css","assets/SessionListView-3-xx6EVs.css","assets/TemplateDetailView-Cukb205e.js","assets/TemplateDetailView-B5NI2oTR.css","assets/NewSessionView-DwUfBg70.js","assets/QuickResponsesPanel-Dp39f12o.js","assets/QuickResponsesPanel-dk-Rj8xx.css","assets/NewSessionView-DBl7T2Xp.css","assets/ActiveSessionsView-EdNxmPmZ.js","assets/ActiveSessionsView-BVco8bPU.css","assets/SessionDetailView-DWbXdx7A.js","assets/SessionDetailView-ULeIkWS0.css","assets/SettingsView-DW1NvpX_.js","assets/SettingsView-DC8-hTQ-.css","assets/ProvidersView-CD1j8BOv.js","assets/ProvidersView-2KCOiY6Q.css","assets/SummarySettingsView-CLUfcWvf.js","assets/settings-TWfbahn5.js","assets/SummarySettingsView-l2bxHmZZ.css","assets/GeneralSettingsView-Dw-x83R0.js","assets/GeneralSettingsView-BCf53fpC.css","assets/AgentLogsView-C2wX0JPP.js","assets/AgentLogsView-D90PnQVk.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
3
3
|
* @vue/shared v3.5.29
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
5
|
* @license MIT
|
|
6
|
-
**/function
|
|
6
|
+
**/function Ul(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Oe={},Nr=[],ln=()=>{},wd=()=>!1,Ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),jl=e=>e.startsWith("onUpdate:"),Je=Object.assign,Bl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},s_=Object.prototype.hasOwnProperty,we=(e,t)=>s_.call(e,t),ee=Array.isArray,$r=e=>ci(e)==="[object Map]",ns=e=>ci(e)==="[object Set]",Dc=e=>ci(e)==="[object Date]",ie=e=>typeof e=="function",Be=e=>typeof e=="string",cn=e=>typeof e=="symbol",me=e=>e!==null&&typeof e=="object",Ed=e=>(me(e)||ie(e))&&ie(e.then)&&ie(e.catch),Sd=Object.prototype.toString,ci=e=>Sd.call(e),i_=e=>ci(e).slice(8,-1),Td=e=>ci(e)==="[object Object]",Io=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Cs=Ul(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Co=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},o_=/-\w/g,jt=Co(e=>e.replace(o_,t=>t.slice(1).toUpperCase())),a_=/\B([A-Z])/g,er=Co(e=>e.replace(a_,"-$1").toLowerCase()),No=Co(e=>e.charAt(0).toUpperCase()+e.slice(1)),ea=Co(e=>e?`on${No(e)}`:""),Gn=(e,t)=>!Object.is(e,t),Li=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kd=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},$o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Od=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Mc;const Do=()=>Mc||(Mc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function On(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=Be(r)?f_(r):On(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(Be(e)||me(e))return e}const l_=/;(?![^(]*\))/g,c_=/:([^]+)/,u_=/\/\*[^]*?\*\//g;function f_(e){const t={};return e.replace(u_,"").split(l_).forEach(n=>{if(n){const r=n.split(c_);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function pr(e){let t="";if(Be(e))t=e;else if(ee(e))for(let n=0;n<e.length;n++){const r=pr(e[n]);r&&(t+=r+" ")}else if(me(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const d_="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",h_=Ul(d_);function Ad(e){return!!e||e===""}function p_(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Kn(e[r],t[r]);return n}function Kn(e,t){if(e===t)return!0;let n=Dc(e),r=Dc(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=cn(e),r=cn(t),n||r)return e===t;if(n=ee(e),r=ee(t),n||r)return n&&r?p_(e,t):!1;if(n=me(e),r=me(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,i=Object.keys(t).length;if(s!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!Kn(e[o],t[o]))return!1}}return String(e)===String(t)}function Vl(e,t){return e.findIndex(n=>Kn(n,t))}const xd=e=>!!(e&&e.__v_isRef===!0),St=e=>Be(e)?e:e==null?"":ee(e)||me(e)&&(e.toString===Sd||!ie(e.toString))?xd(e)?St(e.value):JSON.stringify(e,Pd,2):String(e),Pd=(e,t)=>xd(t)?Pd(e,t.value):$r(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[ta(r,i)+" =>"]=s,n),{})}:ns(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ta(n))}:cn(t)?ta(t):me(t)&&!ee(t)&&!Td(t)?String(t):t,ta=(e,t="")=>{var n;return cn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
7
7
|
* @vue/reactivity v3.5.29
|
|
8
8
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
9
9
|
* @license MIT
|
|
10
|
-
**/let ft;class Ad{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ft,!t&&ft&&(this.index=(ft.scopes||(ft.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ft;try{return ft=this,t()}finally{ft=n}}}on(){++this._on===1&&(this.prevScope=ft,ft=this)}off(){this._on>0&&--this._on===0&&(ft=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Cd(e){return new Ad(e)}function Rd(){return ft}function f_(e,t=!1){ft&&ft.cleanups.push(e)}let Ae;const na=new WeakSet;class Id{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft&&ft.active&&ft.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,na.has(this)&&(na.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Nd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Dc(this),$d(this);const t=Ae,n=Ht;Ae=this,Ht=!0;try{return this.fn()}finally{Dd(this),Ae=t,Ht=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Hl(t);this.deps=this.depsTail=void 0,Dc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?na.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ma(this)&&this.run()}get dirty(){return Ma(this)}}let Pd=0,Ps,Ns;function Nd(e,t=!1){if(e.flags|=8,t){e.next=Ns,Ns=e;return}e.next=Ps,Ps=e}function Vl(){Pd++}function Zl(){if(--Pd>0)return;if(Ns){let t=Ns;for(Ns=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ps;){let t=Ps;for(Ps=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function $d(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dd(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Hl(r),d_(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Ma(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Md(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Md(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gs)||(e.globalVersion=Gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ma(e))))return;e.flags|=2;const t=e.dep,n=Ae,r=Ht;Ae=e,Ht=!0;try{$d(e);const s=e.fn(e._value);(t.version===0||Gn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ae=n,Ht=r,Dd(e),e.flags&=-3}}function Hl(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Hl(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function d_(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ht=!0;const Fd=[];function Cn(){Fd.push(Ht),Ht=!1}function Rn(){const e=Fd.pop();Ht=e===void 0?!0:e}function Dc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let Gs=0;class h_{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Gl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ae||!Ht||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink=new h_(Ae,this),Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ld(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return n}trigger(t){this.version++,Gs++,this.notify(t)}notify(t){Vl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Zl()}}}function Ld(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ld(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ji=new WeakMap,dr=Symbol(""),Fa=Symbol(""),Ws=Symbol("");function dt(e,t,n){if(Ht&&Ae){let r=Ji.get(e);r||Ji.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Gl),s.map=r,s.key=n),s.track()}}function mn(e,t,n,r,s,i){const o=Ji.get(e);if(!o){Gs++;return}const a=l=>{l&&l.trigger()};if(Vl(),t==="clear")o.forEach(a);else{const l=ee(e),u=l&&Io(n);if(l&&n==="length"){const c=Number(r);o.forEach((f,d)=>{(d==="length"||d===Ws||!cn(d)&&d>=c)&&a(f)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Ws)),t){case"add":l?u&&a(o.get("length")):(a(o.get(dr)),$r(e)&&a(o.get(Fa)));break;case"delete":l||(a(o.get(dr)),$r(e)&&a(o.get(Fa)));break;case"set":$r(e)&&a(o.get(dr));break}}Zl()}function p_(e,t){const n=Ji.get(e);return n&&n.get(t)}function yr(e){const t=_e(e);return t===e?t:(dt(t,"iterate",Ws),Pt(e)?t:t.map(Gt))}function Mo(e){return dt(e=_e(e),"iterate",Ws),e}function jn(e,t){return In(e)?Vr(xn(e)?Gt(t):t):Gt(t)}const g_={__proto__:null,[Symbol.iterator](){return ra(this,Symbol.iterator,e=>jn(this,e))},concat(...e){return yr(this).concat(...e.map(t=>ee(t)?yr(t):t))},entries(){return ra(this,"entries",e=>(e[1]=jn(this,e[1]),e))},every(e,t){return un(this,"every",e,t,void 0,arguments)},filter(e,t){return un(this,"filter",e,t,n=>n.map(r=>jn(this,r)),arguments)},find(e,t){return un(this,"find",e,t,n=>jn(this,n),arguments)},findIndex(e,t){return un(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return un(this,"findLast",e,t,n=>jn(this,n),arguments)},findLastIndex(e,t){return un(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return un(this,"forEach",e,t,void 0,arguments)},includes(...e){return sa(this,"includes",e)},indexOf(...e){return sa(this,"indexOf",e)},join(e){return yr(this).join(e)},lastIndexOf(...e){return sa(this,"lastIndexOf",e)},map(e,t){return un(this,"map",e,t,void 0,arguments)},pop(){return as(this,"pop")},push(...e){return as(this,"push",e)},reduce(e,...t){return Mc(this,"reduce",e,t)},reduceRight(e,...t){return Mc(this,"reduceRight",e,t)},shift(){return as(this,"shift")},some(e,t){return un(this,"some",e,t,void 0,arguments)},splice(...e){return as(this,"splice",e)},toReversed(){return yr(this).toReversed()},toSorted(e){return yr(this).toSorted(e)},toSpliced(...e){return yr(this).toSpliced(...e)},unshift(...e){return as(this,"unshift",e)},values(){return ra(this,"values",e=>jn(this,e))}};function ra(e,t,n){const r=Mo(e),s=r[t]();return r!==e&&!Pt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const __=Array.prototype;function un(e,t,n,r,s,i){const o=Mo(e),a=o!==e&&!Pt(e),l=o[t];if(l!==__[t]){const f=l.apply(e,i);return a?Gt(f):f}let u=n;o!==e&&(a?u=function(f,d){return n.call(this,jn(e,f),d,e)}:n.length>2&&(u=function(f,d){return n.call(this,f,d,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function Mc(e,t,n,r){const s=Mo(e);let i=n;return s!==e&&(Pt(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,jn(e,a),l,e)}),s[t](i,...r)}function sa(e,t,n){const r=_e(e);dt(r,"iterate",Ws);const s=r[t](...n);return(s===-1||s===!1)&&Fo(n[0])?(n[0]=_e(n[0]),r[t](...n)):s}function as(e,t,n=[]){Cn(),Vl();const r=_e(e)[t].apply(e,n);return Zl(),Rn(),r}const v_=zl("__proto__,__v_isRef,__isVue"),zd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(cn));function m_(e){cn(e)||(e=String(e));const t=_e(this);return dt(t,"has",e),t.hasOwnProperty(e)}class Ud{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?A_:Zd:i?Vd:Bd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=ee(t);if(!s){let l;if(o&&(l=g_[n]))return l;if(n==="hasOwnProperty")return m_}const a=Reflect.get(t,n,Me(t)?t:r);if((cn(n)?zd.has(n):v_(n))||(s||dt(t,"get",n),i))return a;if(Me(a)){const l=o&&Io(n)?a:a.value;return s&&me(l)?za(l):l}return me(a)?s?za(a):ci(a):a}}class jd extends Ud{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=ee(t)&&Io(n);if(!this._isShallow){const u=In(i);if(!Pt(r)&&!In(r)&&(i=_e(i),r=_e(r)),!o&&Me(i)&&!Me(r))return u||(i.value=r),!0}const a=o?Number(n)<t.length:we(t,n),l=Reflect.set(t,n,r,Me(t)?t:s);return t===_e(s)&&(a?Gn(r,i)&&mn(t,"set",n,r):mn(t,"add",n,r)),l}deleteProperty(t,n){const r=we(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&mn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!cn(n)||!zd.has(n))&&dt(t,"has",n),r}ownKeys(t){return dt(t,"iterate",ee(t)?"length":dr),Reflect.ownKeys(t)}}class y_ extends Ud{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const b_=new jd,w_=new y_,E_=new jd(!0);const La=e=>e,yi=e=>Reflect.getPrototypeOf(e);function S_(e,t,n){return function(...r){const s=this.__v_raw,i=_e(s),o=$r(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?La:t?Vr:Gt;return!t&&dt(i,"iterate",l?Fa:dr),Je(Object.create(u),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:a?[c(f[0]),c(f[1])]:c(f),done:d}}})}}function bi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function k_(e,t){const n={get(s){const i=this.__v_raw,o=_e(i),a=_e(s);e||(Gn(s,a)&&dt(o,"get",s),dt(o,"get",a));const{has:l}=yi(o),u=t?La:e?Vr:Gt;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&dt(_e(s),"iterate",dr),s.size},has(s){const i=this.__v_raw,o=_e(i),a=_e(s);return e||(Gn(s,a)&&dt(o,"has",s),dt(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=_e(a),u=t?La:e?Vr:Gt;return!e&&dt(l,"iterate",dr),a.forEach((c,f)=>s.call(i,u(c),u(f),o))}};return Je(n,e?{add:bi("add"),set:bi("set"),delete:bi("delete"),clear:bi("clear")}:{add(s){!t&&!Pt(s)&&!In(s)&&(s=_e(s));const i=_e(this);return yi(i).has.call(i,s)||(i.add(s),mn(i,"add",s,s)),this},set(s,i){!t&&!Pt(i)&&!In(i)&&(i=_e(i));const o=_e(this),{has:a,get:l}=yi(o);let u=a.call(o,s);u||(s=_e(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Gn(i,c)&&mn(o,"set",s,i):mn(o,"add",s,i),this},delete(s){const i=_e(this),{has:o,get:a}=yi(i);let l=o.call(i,s);l||(s=_e(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&mn(i,"delete",s,void 0),u},clear(){const s=_e(this),i=s.size!==0,o=s.clear();return i&&mn(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=S_(s,e,t)}),n}function Wl(e,t){const n=k_(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(we(n,s)&&s in r?n:r,s,i)}const T_={get:Wl(!1,!1)},O_={get:Wl(!1,!0)},x_={get:Wl(!0,!1)};const Bd=new WeakMap,Vd=new WeakMap,Zd=new WeakMap,A_=new WeakMap;function C_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function R_(e){return e.__v_skip||!Object.isExtensible(e)?0:C_(t_(e))}function ci(e){return In(e)?e:ql(e,!1,b_,T_,Bd)}function Hd(e){return ql(e,!1,E_,O_,Vd)}function za(e){return ql(e,!0,w_,x_,Zd)}function ql(e,t,n,r,s){if(!me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=R_(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function xn(e){return In(e)?xn(e.__v_raw):!!(e&&e.__v_isReactive)}function In(e){return!!(e&&e.__v_isReadonly)}function Pt(e){return!!(e&&e.__v_isShallow)}function Fo(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function Kl(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&Sd(e,"__v_skip",!0),e}const Gt=e=>me(e)?ci(e):e,Vr=e=>me(e)?za(e):e;function Me(e){return e?e.__v_isRef===!0:!1}function Nt(e){return Gd(e,!1)}function I_(e){return Gd(e,!0)}function Gd(e,t){return Me(e)?e:new P_(e,t)}class P_{constructor(t,n){this.dep=new Gl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:_e(t),this._value=n?t:Gt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Pt(t)||In(t);t=r?t:_e(t),Gn(t,n)&&(this._rawValue=t,this._value=r?t:Gt(t),this.dep.trigger())}}function Ft(e){return Me(e)?e.value:e}const N_={get:(e,t,n)=>t==="__v_raw"?e:Ft(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Me(s)&&!Me(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Wd(e){return xn(e)?e:new Proxy(e,N_)}function $_(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=qd(e,n);return t}class D_{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=_e(t);let s=!0,i=t;if(!ee(t)||!Io(String(n)))do s=!Fo(i)||Pt(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Ft(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Me(this._raw[this._key])){const n=this._object[this._key];if(Me(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return p_(this._raw,this._key)}}class M_{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function zx(e,t,n){return Me(e)?e:ie(e)?new M_(e):me(e)&&arguments.length>1?qd(e,t,n):Nt(e)}function qd(e,t,n){return new D_(e,t,n)}class F_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Gl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ae!==this)return Nd(this,!0),!0}get value(){const t=this.dep.track();return Md(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function L_(e,t,n=!1){let r,s;return ie(e)?r=e:(r=e.get,s=e.set),new F_(r,s,n)}const wi={},Yi=new WeakMap;let cr;function z_(e,t=!1,n=cr){if(n){let r=Yi.get(n);r||Yi.set(n,r=[]),r.push(e)}}function U_(e,t,n=Oe){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=E=>s?E:Pt(E)||s===!1||s===0?yn(E,1):yn(E);let c,f,d,h,p=!1,g=!1;if(Me(e)?(f=()=>e.value,p=Pt(e)):xn(e)?(f=()=>u(e),p=!0):ee(e)?(g=!0,p=e.some(E=>xn(E)||Pt(E)),f=()=>e.map(E=>{if(Me(E))return E.value;if(xn(E))return u(E);if(ie(E))return l?l(E,2):E()})):ie(e)?t?f=l?()=>l(e,2):e:f=()=>{if(d){Cn();try{d()}finally{Rn()}}const E=cr;cr=c;try{return l?l(e,3,[h]):e(h)}finally{cr=E}}:f=ln,t&&s){const E=f,m=s===!0?1/0:s;f=()=>yn(E(),m)}const y=Rd(),T=()=>{c.stop(),y&&y.active&&jl(y.effects,c)};if(i&&t){const E=t;t=(...m)=>{E(...m),T()}}let b=g?new Array(e.length).fill(wi):wi;const S=E=>{if(!(!(c.flags&1)||!c.dirty&&!E))if(t){const m=c.run();if(s||p||(g?m.some((N,M)=>Gn(N,b[M])):Gn(m,b))){d&&d();const N=cr;cr=c;try{const M=[m,b===wi?void 0:g&&b[0]===wi?[]:b,h];b=m,l?l(t,3,M):t(...M)}finally{cr=N}}}else c.run()};return a&&a(S),c=new Id(f),c.scheduler=o?()=>o(S,!1):S,h=E=>z_(E,!1,c),d=c.onStop=()=>{const E=Yi.get(c);if(E){if(l)l(E,4);else for(const m of E)m();Yi.delete(c)}},t?r?S(!0):b=c.run():o?o(S.bind(null,!0),!0):c.run(),T.pause=c.pause.bind(c),T.resume=c.resume.bind(c),T.stop=T,T}function yn(e,t=1/0,n){if(t<=0||!me(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Me(e))yn(e.value,t,n);else if(ee(e))for(let r=0;r<e.length;r++)yn(e[r],t,n);else if(ns(e)||$r(e))e.forEach(r=>{yn(r,t,n)});else if(Ed(e)){for(const r in e)yn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&yn(e[r],t,n)}return e}/**
|
|
10
|
+
**/let ft;class Rd{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ft,!t&&ft&&(this.index=(ft.scopes||(ft.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ft;try{return ft=this,t()}finally{ft=n}}}on(){++this._on===1&&(this.prevScope=ft,ft=this)}off(){this._on>0&&--this._on===0&&(ft=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Id(e){return new Rd(e)}function Cd(){return ft}function g_(e,t=!1){ft&&ft.cleanups.push(e)}let xe;const na=new WeakSet;class Nd{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft&&ft.active&&ft.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,na.has(this)&&(na.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Fc(this),Md(this);const t=xe,n=Ht;xe=this,Ht=!0;try{return this.fn()}finally{Fd(this),xe=t,Ht=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Gl(t);this.deps=this.depsTail=void 0,Fc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?na.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ma(this)&&this.run()}get dirty(){return Ma(this)}}let $d=0,Ns,$s;function Dd(e,t=!1){if(e.flags|=8,t){e.next=$s,$s=e;return}e.next=Ns,Ns=e}function Zl(){$d++}function Hl(){if(--$d>0)return;if($s){let t=$s;for($s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ns;){let t=Ns;for(Ns=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Md(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fd(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Gl(r),__(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Ma(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ld(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ld(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ws)||(e.globalVersion=Ws,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ma(e))))return;e.flags|=2;const t=e.dep,n=xe,r=Ht;xe=e,Ht=!0;try{Md(e);const s=e.fn(e._value);(t.version===0||Gn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{xe=n,Ht=r,Fd(e),e.flags&=-3}}function Gl(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Gl(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function __(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ht=!0;const zd=[];function Pn(){zd.push(Ht),Ht=!1}function Rn(){const e=zd.pop();Ht=e===void 0?!0:e}function Fc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xe;xe=void 0;try{t()}finally{xe=n}}}let Ws=0;class v_{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Wl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xe||!Ht||xe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xe)n=this.activeLink=new v_(xe,this),xe.deps?(n.prevDep=xe.depsTail,xe.depsTail.nextDep=n,xe.depsTail=n):xe.deps=xe.depsTail=n,Ud(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=xe.depsTail,n.nextDep=void 0,xe.depsTail.nextDep=n,xe.depsTail=n,xe.deps===n&&(xe.deps=r)}return n}trigger(t){this.version++,Ws++,this.notify(t)}notify(t){Zl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Hl()}}}function Ud(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ud(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ji=new WeakMap,dr=Symbol(""),Fa=Symbol(""),qs=Symbol("");function dt(e,t,n){if(Ht&&xe){let r=Ji.get(e);r||Ji.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Wl),s.map=r,s.key=n),s.track()}}function mn(e,t,n,r,s,i){const o=Ji.get(e);if(!o){Ws++;return}const a=l=>{l&&l.trigger()};if(Zl(),t==="clear")o.forEach(a);else{const l=ee(e),u=l&&Io(n);if(l&&n==="length"){const c=Number(r);o.forEach((f,d)=>{(d==="length"||d===qs||!cn(d)&&d>=c)&&a(f)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(qs)),t){case"add":l?u&&a(o.get("length")):(a(o.get(dr)),$r(e)&&a(o.get(Fa)));break;case"delete":l||(a(o.get(dr)),$r(e)&&a(o.get(Fa)));break;case"set":$r(e)&&a(o.get(dr));break}}Hl()}function m_(e,t){const n=Ji.get(e);return n&&n.get(t)}function yr(e){const t=_e(e);return t===e?t:(dt(t,"iterate",qs),Ct(e)?t:t.map(Gt))}function Mo(e){return dt(e=_e(e),"iterate",qs),e}function jn(e,t){return In(e)?Vr(An(e)?Gt(t):t):Gt(t)}const y_={__proto__:null,[Symbol.iterator](){return ra(this,Symbol.iterator,e=>jn(this,e))},concat(...e){return yr(this).concat(...e.map(t=>ee(t)?yr(t):t))},entries(){return ra(this,"entries",e=>(e[1]=jn(this,e[1]),e))},every(e,t){return un(this,"every",e,t,void 0,arguments)},filter(e,t){return un(this,"filter",e,t,n=>n.map(r=>jn(this,r)),arguments)},find(e,t){return un(this,"find",e,t,n=>jn(this,n),arguments)},findIndex(e,t){return un(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return un(this,"findLast",e,t,n=>jn(this,n),arguments)},findLastIndex(e,t){return un(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return un(this,"forEach",e,t,void 0,arguments)},includes(...e){return sa(this,"includes",e)},indexOf(...e){return sa(this,"indexOf",e)},join(e){return yr(this).join(e)},lastIndexOf(...e){return sa(this,"lastIndexOf",e)},map(e,t){return un(this,"map",e,t,void 0,arguments)},pop(){return as(this,"pop")},push(...e){return as(this,"push",e)},reduce(e,...t){return Lc(this,"reduce",e,t)},reduceRight(e,...t){return Lc(this,"reduceRight",e,t)},shift(){return as(this,"shift")},some(e,t){return un(this,"some",e,t,void 0,arguments)},splice(...e){return as(this,"splice",e)},toReversed(){return yr(this).toReversed()},toSorted(e){return yr(this).toSorted(e)},toSpliced(...e){return yr(this).toSpliced(...e)},unshift(...e){return as(this,"unshift",e)},values(){return ra(this,"values",e=>jn(this,e))}};function ra(e,t,n){const r=Mo(e),s=r[t]();return r!==e&&!Ct(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const b_=Array.prototype;function un(e,t,n,r,s,i){const o=Mo(e),a=o!==e&&!Ct(e),l=o[t];if(l!==b_[t]){const f=l.apply(e,i);return a?Gt(f):f}let u=n;o!==e&&(a?u=function(f,d){return n.call(this,jn(e,f),d,e)}:n.length>2&&(u=function(f,d){return n.call(this,f,d,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function Lc(e,t,n,r){const s=Mo(e);let i=n;return s!==e&&(Ct(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,jn(e,a),l,e)}),s[t](i,...r)}function sa(e,t,n){const r=_e(e);dt(r,"iterate",qs);const s=r[t](...n);return(s===-1||s===!1)&&Fo(n[0])?(n[0]=_e(n[0]),r[t](...n)):s}function as(e,t,n=[]){Pn(),Zl();const r=_e(e)[t].apply(e,n);return Hl(),Rn(),r}const w_=Ul("__proto__,__v_isRef,__isVue"),jd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(cn));function E_(e){cn(e)||(e=String(e));const t=_e(this);return dt(t,"has",e),t.hasOwnProperty(e)}class Bd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?C_:Gd:i?Hd:Zd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=ee(t);if(!s){let l;if(o&&(l=y_[n]))return l;if(n==="hasOwnProperty")return E_}const a=Reflect.get(t,n,Me(t)?t:r);if((cn(n)?jd.has(n):w_(n))||(s||dt(t,"get",n),i))return a;if(Me(a)){const l=o&&Io(n)?a:a.value;return s&&me(l)?za(l):l}return me(a)?s?za(a):ui(a):a}}class Vd extends Bd{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=ee(t)&&Io(n);if(!this._isShallow){const u=In(i);if(!Ct(r)&&!In(r)&&(i=_e(i),r=_e(r)),!o&&Me(i)&&!Me(r))return u||(i.value=r),!0}const a=o?Number(n)<t.length:we(t,n),l=Reflect.set(t,n,r,Me(t)?t:s);return t===_e(s)&&(a?Gn(r,i)&&mn(t,"set",n,r):mn(t,"add",n,r)),l}deleteProperty(t,n){const r=we(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&mn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!cn(n)||!jd.has(n))&&dt(t,"has",n),r}ownKeys(t){return dt(t,"iterate",ee(t)?"length":dr),Reflect.ownKeys(t)}}class S_ extends Bd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const T_=new Vd,k_=new S_,O_=new Vd(!0);const La=e=>e,bi=e=>Reflect.getPrototypeOf(e);function A_(e,t,n){return function(...r){const s=this.__v_raw,i=_e(s),o=$r(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?La:t?Vr:Gt;return!t&&dt(i,"iterate",l?Fa:dr),Je(Object.create(u),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:a?[c(f[0]),c(f[1])]:c(f),done:d}}})}}function wi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function x_(e,t){const n={get(s){const i=this.__v_raw,o=_e(i),a=_e(s);e||(Gn(s,a)&&dt(o,"get",s),dt(o,"get",a));const{has:l}=bi(o),u=t?La:e?Vr:Gt;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&dt(_e(s),"iterate",dr),s.size},has(s){const i=this.__v_raw,o=_e(i),a=_e(s);return e||(Gn(s,a)&&dt(o,"has",s),dt(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=_e(a),u=t?La:e?Vr:Gt;return!e&&dt(l,"iterate",dr),a.forEach((c,f)=>s.call(i,u(c),u(f),o))}};return Je(n,e?{add:wi("add"),set:wi("set"),delete:wi("delete"),clear:wi("clear")}:{add(s){!t&&!Ct(s)&&!In(s)&&(s=_e(s));const i=_e(this);return bi(i).has.call(i,s)||(i.add(s),mn(i,"add",s,s)),this},set(s,i){!t&&!Ct(i)&&!In(i)&&(i=_e(i));const o=_e(this),{has:a,get:l}=bi(o);let u=a.call(o,s);u||(s=_e(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Gn(i,c)&&mn(o,"set",s,i):mn(o,"add",s,i),this},delete(s){const i=_e(this),{has:o,get:a}=bi(i);let l=o.call(i,s);l||(s=_e(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&mn(i,"delete",s,void 0),u},clear(){const s=_e(this),i=s.size!==0,o=s.clear();return i&&mn(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=A_(s,e,t)}),n}function ql(e,t){const n=x_(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(we(n,s)&&s in r?n:r,s,i)}const P_={get:ql(!1,!1)},R_={get:ql(!1,!0)},I_={get:ql(!0,!1)};const Zd=new WeakMap,Hd=new WeakMap,Gd=new WeakMap,C_=new WeakMap;function N_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $_(e){return e.__v_skip||!Object.isExtensible(e)?0:N_(i_(e))}function ui(e){return In(e)?e:Kl(e,!1,T_,P_,Zd)}function Wd(e){return Kl(e,!1,O_,R_,Hd)}function za(e){return Kl(e,!0,k_,I_,Gd)}function Kl(e,t,n,r,s){if(!me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=$_(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function An(e){return In(e)?An(e.__v_raw):!!(e&&e.__v_isReactive)}function In(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function Fo(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function Jl(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&kd(e,"__v_skip",!0),e}const Gt=e=>me(e)?ui(e):e,Vr=e=>me(e)?za(e):e;function Me(e){return e?e.__v_isRef===!0:!1}function Nt(e){return qd(e,!1)}function D_(e){return qd(e,!0)}function qd(e,t){return Me(e)?e:new M_(e,t)}class M_{constructor(t,n){this.dep=new Wl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:_e(t),this._value=n?t:Gt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ct(t)||In(t);t=r?t:_e(t),Gn(t,n)&&(this._rawValue=t,this._value=r?t:Gt(t),this.dep.trigger())}}function Ft(e){return Me(e)?e.value:e}const F_={get:(e,t,n)=>t==="__v_raw"?e:Ft(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Me(s)&&!Me(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Kd(e){return An(e)?e:new Proxy(e,F_)}function L_(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=Jd(e,n);return t}class z_{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=_e(t);let s=!0,i=t;if(!ee(t)||!Io(String(n)))do s=!Fo(i)||Ct(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Ft(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Me(this._raw[this._key])){const n=this._object[this._key];if(Me(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return m_(this._raw,this._key)}}class U_{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function gx(e,t,n){return Me(e)?e:ie(e)?new U_(e):me(e)&&arguments.length>1?Jd(e,t,n):Nt(e)}function Jd(e,t,n){return new z_(e,t,n)}class j_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Wl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ws-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&xe!==this)return Dd(this,!0),!0}get value(){const t=this.dep.track();return Ld(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function B_(e,t,n=!1){let r,s;return ie(e)?r=e:(r=e.get,s=e.set),new j_(r,s,n)}const Ei={},Yi=new WeakMap;let cr;function V_(e,t=!1,n=cr){if(n){let r=Yi.get(n);r||Yi.set(n,r=[]),r.push(e)}}function Z_(e,t,n=Oe){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=E=>s?E:Ct(E)||s===!1||s===0?yn(E,1):yn(E);let c,f,d,h,p=!1,g=!1;if(Me(e)?(f=()=>e.value,p=Ct(e)):An(e)?(f=()=>u(e),p=!0):ee(e)?(g=!0,p=e.some(E=>An(E)||Ct(E)),f=()=>e.map(E=>{if(Me(E))return E.value;if(An(E))return u(E);if(ie(E))return l?l(E,2):E()})):ie(e)?t?f=l?()=>l(e,2):e:f=()=>{if(d){Pn();try{d()}finally{Rn()}}const E=cr;cr=c;try{return l?l(e,3,[h]):e(h)}finally{cr=E}}:f=ln,t&&s){const E=f,m=s===!0?1/0:s;f=()=>yn(E(),m)}const y=Cd(),k=()=>{c.stop(),y&&y.active&&Bl(y.effects,c)};if(i&&t){const E=t;t=(...m)=>{E(...m),k()}}let b=g?new Array(e.length).fill(Ei):Ei;const S=E=>{if(!(!(c.flags&1)||!c.dirty&&!E))if(t){const m=c.run();if(s||p||(g?m.some((N,M)=>Gn(N,b[M])):Gn(m,b))){d&&d();const N=cr;cr=c;try{const M=[m,b===Ei?void 0:g&&b[0]===Ei?[]:b,h];b=m,l?l(t,3,M):t(...M)}finally{cr=N}}}else c.run()};return a&&a(S),c=new Nd(f),c.scheduler=o?()=>o(S,!1):S,h=E=>V_(E,!1,c),d=c.onStop=()=>{const E=Yi.get(c);if(E){if(l)l(E,4);else for(const m of E)m();Yi.delete(c)}},t?r?S(!0):b=c.run():o?o(S.bind(null,!0),!0):c.run(),k.pause=c.pause.bind(c),k.resume=c.resume.bind(c),k.stop=k,k}function yn(e,t=1/0,n){if(t<=0||!me(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Me(e))yn(e.value,t,n);else if(ee(e))for(let r=0;r<e.length;r++)yn(e[r],t,n);else if(ns(e)||$r(e))e.forEach(r=>{yn(r,t,n)});else if(Td(e)){for(const r in e)yn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&yn(e[r],t,n)}return e}/**
|
|
11
11
|
* @vue/runtime-core v3.5.29
|
|
12
12
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13
13
|
* @license MIT
|
|
14
|
-
**/function ui(e,t,n,r){try{return r?e(...r):e()}catch(s){rs(s,t,n)}}function Wt(e,t,n,r){if(ie(e)){const s=ui(e,t,n,r);return s&&bd(s)&&s.catch(i=>{rs(i,t,n)}),s}if(ee(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Wt(e[i],t,n,r));return s}}function rs(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Oe;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,l,u)===!1)return}a=a.parent}if(i){Cn(),ui(i,null,10,[e,l,u]),Rn();return}}j_(e,n,s,r,o)}function j_(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const mt=[];let tn=-1;const Dr=[];let Bn=null,kr=0;const Kd=Promise.resolve();let Xi=null;function Lo(e){const t=Xi||Kd;return e?t.then(this?e.bind(this):e):t}function B_(e){let t=tn+1,n=mt.length;for(;t<n;){const r=t+n>>>1,s=mt[r],i=qs(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Jl(e){if(!(e.flags&1)){const t=qs(e),n=mt[mt.length-1];!n||!(e.flags&2)&&t>=qs(n)?mt.push(e):mt.splice(B_(t),0,e),e.flags|=1,Jd()}}function Jd(){Xi||(Xi=Kd.then(Xd))}function Ua(e){ee(e)?Dr.push(...e):Bn&&e.id===-1?Bn.splice(kr+1,0,e):e.flags&1||(Dr.push(e),e.flags|=1),Jd()}function Fc(e,t,n=tn+1){for(;n<mt.length;n++){const r=mt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;mt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Yd(e){if(Dr.length){const t=[...new Set(Dr)].sort((n,r)=>qs(n)-qs(r));if(Dr.length=0,Bn){Bn.push(...t);return}for(Bn=t,kr=0;kr<Bn.length;kr++){const n=Bn[kr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Bn=null,kr=0}}const qs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xd(e){try{for(tn=0;tn<mt.length;tn++){const t=mt[tn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ui(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;tn<mt.length;tn++){const t=mt[tn];t&&(t.flags&=-2)}tn=-1,mt.length=0,Yd(),Xi=null,(mt.length||Dr.length)&&Xd()}}let Ct=null,Qd=null;function Qi(e){const t=Ct;return Ct=e,Qd=e&&e.type.__scopeId||null,t}function Ks(e,t=Ct,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&no(-1);const i=Qi(t);let o;try{o=e(...s)}finally{Qi(i),r._d&&no(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Ux(e,t){if(Ct===null)return e;const n=Bo(Ct),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Oe]=t[s];i&&(ie(i)&&(i={mounted:i,updated:i}),i.deep&&yn(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function sr(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Cn(),Wt(l,n,8,[e.el,a,e,t]),Rn())}}function zi(e,t){if(lt){let n=lt.provides;const r=lt.parent&<.parent.provides;r===n&&(n=lt.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=hi();if(r||hr){let s=hr?hr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&ie(t)?t.call(r&&r.proxy):t}}function eh(){return!!(hi()||hr)}const V_=Symbol.for("v-scx"),Z_=()=>$t(V_);function Mr(e,t,n){return th(e,t,n)}function th(e,t,n=Oe){const{immediate:r,deep:s,flush:i,once:o}=n,a=Je({},n),l=t&&r||!t&&i!=="post";let u;if(Hr){if(i==="sync"){const h=Z_();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=ln,h.resume=ln,h.pause=ln,h}}const c=lt;a.call=(h,p,g)=>Wt(h,c,p,g);let f=!1;i==="post"?a.scheduler=h=>{st(h,c&&c.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(h,p)=>{p?h():Jl(h)}),a.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=U_(e,t,a);return Hr&&(u?u.push(d):l&&d()),d}function H_(e,t,n){const r=this.proxy,s=Be(e)?e.includes(".")?nh(r,e):()=>r[e]:e.bind(r,r);let i;ie(t)?i=t:(i=t.handler,n=t);const o=pi(this),a=th(s,i.bind(r),n);return o(),a}function nh(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const rh=Symbol("_vte"),sh=e=>e.__isTeleport,$s=e=>e&&(e.disabled||e.disabled===""),Lc=e=>e&&(e.defer||e.defer===""),zc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Uc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ja=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},ih={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:y}}=u,T=$s(t.props);let{shapeFlag:b,children:S,dynamicChildren:E}=t;if(e==null){const m=t.el=g(""),N=t.anchor=g("");h(m,n,r),h(N,n,r);const M=(I,F)=>{b&16&&c(S,I,F,s,i,o,a,l)},R=()=>{const I=t.target=ja(t.props,p),F=Ba(I,t,g,h);I&&(o!=="svg"&&zc(I)?o="svg":o!=="mathml"&&Uc(I)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),T||(M(I,F),Ui(t,!1)))};T&&(M(n,N),Ui(t,!0)),Lc(t.props)?(t.el.__isMounted=!1,st(()=>{R(),delete t.el.__isMounted},i)):R()}else{if(Lc(t.props)&&e.el.__isMounted===!1){st(()=>{ih.process(e,t,n,r,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const m=t.anchor=e.anchor,N=t.target=e.target,M=t.targetAnchor=e.targetAnchor,R=$s(e.props),I=R?n:N,F=R?m:M;if(o==="svg"||zc(N)?o="svg":(o==="mathml"||Uc(N))&&(o="mathml"),E?(d(e.dynamicChildren,E,I,s,i,o,a),rc(e,t,!0)):l||f(e,t,I,F,s,i,o,a,!1),T)R?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ei(t,n,m,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const J=t.target=ja(t.props,p);J&&Ei(t,J,null,u,0)}else R&&Ei(t,N,M,u,1);Ui(t,T)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:f,props:d}=e;if(f&&(s(u),s(c)),i&&s(l),o&16){const h=i||!$s(d);for(let p=0;p<a.length;p++){const g=a[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:Ei,hydrate:G_};function Ei(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,f=i===2;if(f&&r(o,t,n),(!f||$s(c))&&l&16)for(let d=0;d<u.length;d++)s(u[d],t,n,2);f&&r(a,t,n)}function G_(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},f){function d(y,T){let b=T;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,y._lpa=t.targetAnchor&&o(t.targetAnchor);break}}b=o(b)}}function h(y,T){T.anchor=f(o(y),T,a(y),n,r,s,i)}const p=t.target=ja(t.props,l),g=$s(t.props);if(p){const y=p._lpa||p.firstChild;t.shapeFlag&16&&(g?(h(e,t),d(p,y),t.targetAnchor||Ba(p,t,c,u,a(e)===p?e:null)):(t.anchor=o(e),d(p,y),t.targetAnchor||Ba(p,t,c,u),f(y&&o(y),t,p,n,r,s,i))),Ui(t,g)}else g&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const oh=ih;function Ui(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Ba(e,t,n,r,s=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[rh]=o,e&&(r(i,e,s),r(o,e,s)),o}const nn=Symbol("_leaveCb"),ls=Symbol("_enterCb");function ah(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ss(()=>{e.isMounted=!0}),ph(()=>{e.isUnmounting=!0}),e}const Dt=[Function,Array],lh={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dt,onEnter:Dt,onAfterEnter:Dt,onEnterCancelled:Dt,onBeforeLeave:Dt,onLeave:Dt,onAfterLeave:Dt,onLeaveCancelled:Dt,onBeforeAppear:Dt,onAppear:Dt,onAfterAppear:Dt,onAppearCancelled:Dt},ch=e=>{const t=e.subTree;return t.component?ch(t.component):t},W_={name:"BaseTransition",props:lh,setup(e,{slots:t}){const n=hi(),r=ah();return()=>{const s=t.default&&Yl(t.default(),!0);if(!s||!s.length)return;const i=uh(s),o=_e(e),{mode:a}=o;if(r.isLeaving)return ia(i);const l=jc(i);if(!l)return ia(i);let u=Js(l,o,r,n,f=>u=f);l.type!==at&&gr(l,u);let c=n.subTree&&jc(n.subTree);if(c&&c.type!==at&&!sn(c,l)&&ch(n).type!==at){let f=Js(c,o,r,n);if(gr(c,f),a==="out-in"&&l.type!==at)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,c=void 0},ia(i);a==="in-out"&&l.type!==at?f.delayLeave=(d,h,p)=>{const g=fh(r,c);g[String(c.key)]=c,d[nn]=()=>{h(),d[nn]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{p(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function uh(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const q_=W_;function fh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Js(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:y,onAppear:T,onAfterAppear:b,onAppearCancelled:S}=t,E=String(e.key),m=fh(n,e),N=(I,F)=>{I&&Wt(I,r,9,F)},M=(I,F)=>{const J=F[1];N(I,F),ee(I)?I.every(D=>D.length<=1)&&J():I.length<=1&&J()},R={mode:o,persisted:a,beforeEnter(I){let F=l;if(!n.isMounted)if(i)F=y||l;else return;I[nn]&&I[nn](!0);const J=m[E];J&&sn(e,J)&&J.el[nn]&&J.el[nn](),N(F,[I])},enter(I){if(m[E]===e)return;let F=u,J=c,D=f;if(!n.isMounted)if(i)F=T||u,J=b||c,D=S||f;else return;let re=!1;I[ls]=Ee=>{re||(re=!0,Ee?N(D,[I]):N(J,[I]),R.delayedLeave&&R.delayedLeave(),I[ls]=void 0)};const ue=I[ls].bind(null,!1);F?M(F,[I,ue]):ue()},leave(I,F){const J=String(e.key);if(I[ls]&&I[ls](!0),n.isUnmounting)return F();N(d,[I]);let D=!1;I[nn]=ue=>{D||(D=!0,F(),ue?N(g,[I]):N(p,[I]),I[nn]=void 0,m[J]===e&&delete m[J])};const re=I[nn].bind(null,!1);m[J]=e,h?M(h,[I,re]):re()},clone(I){const F=Js(I,t,n,r,s);return s&&s(F),F}};return R}function ia(e){if(fi(e))return e=Jn(e),e.children=null,e}function jc(e){if(!fi(e))return sh(e.type)&&e.children?uh(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function gr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,gr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yl(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===ht?(o.patchFlag&128&&s++,r=r.concat(Yl(o.children,t,a))):(t||o.type!==at)&&r.push(a!=null?Jn(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Xl(e,t){return ie(e)?Je({name:e.name},t,{setup:e}):e}function jx(){const e=hi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Ql(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Bc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const eo=new WeakMap;function Ds(e,t,n,r,s=!1){if(ee(e)){e.forEach((g,y)=>Ds(g,t&&(ee(t)?t[y]:t),n,r,s));return}if(Ms(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ds(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Bo(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Oe?a.refs={}:a.refs,f=a.setupState,d=_e(f),h=f===Oe?yd:g=>Bc(c,g)?!1:we(d,g),p=(g,y)=>!(y&&Bc(c,y));if(u!=null&&u!==l){if(Vc(t),Be(u))c[u]=null,h(u)&&(f[u]=null);else if(Me(u)){const g=t;p(u,g.k)&&(u.value=null),g.k&&(c[g.k]=null)}}if(ie(l))ui(l,a,12,[o,c]);else{const g=Be(l),y=Me(l);if(g||y){const T=()=>{if(e.f){const b=g?h(l)?f[l]:c[l]:p()||!e.k?l.value:c[e.k];if(s)ee(b)&&jl(b,i);else if(ee(b))b.includes(i)||b.push(i);else if(g)c[l]=[i],h(l)&&(f[l]=c[l]);else{const S=[i];p(l,e.k)&&(l.value=S),e.k&&(c[e.k]=S)}}else g?(c[l]=o,h(l)&&(f[l]=o)):y&&(p(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const b=()=>{T(),eo.delete(e)};b.id=-1,eo.set(e,b),st(b,n)}else Vc(e),T()}}}function Vc(e){const t=eo.get(e);t&&(t.flags|=8,eo.delete(e))}const Zc=e=>e.nodeType===8;Do().requestIdleCallback;Do().cancelIdleCallback;function K_(e,t){if(Zc(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Zc(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Ms=e=>!!e.type.__asyncLoader;function Bx(e){ie(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,f=0;const d=()=>(f++,u=null,h()),h=()=>{let p;return u||(p=u=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),l)return new Promise((y,T)=>{l(g,()=>y(d()),()=>T(g),f+1)});throw g}).then(g=>p!==u&&u?u:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),c=g,g)))};return Xl({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(p,g,y){let T=!1;(g.bu||(g.bu=[])).push(()=>T=!0);const b=()=>{T||y()},S=i?()=>{const E=i(b,m=>K_(p,m));E&&(g.bum||(g.bum=[])).push(E)}:b;c?S():h().then(()=>!g.isUnmounted&&S())},get __asyncResolved(){return c},setup(){const p=lt;if(Ql(p),c)return()=>Si(c,p);const g=S=>{u=null,rs(S,p,13,!r)};if(a&&p.suspense||Hr)return h().then(S=>()=>Si(S,p)).catch(S=>(g(S),()=>r?Ie(r,{error:S}):null));const y=Nt(!1),T=Nt(),b=Nt(!!s);return s&&setTimeout(()=>{b.value=!1},s),o!=null&&setTimeout(()=>{if(!y.value&&!T.value){const S=new Error(`Async component timed out after ${o}ms.`);g(S),T.value=S}},o),h().then(()=>{y.value=!0,p.parent&&fi(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),T.value=S}),()=>{if(y.value&&c)return Si(c,p);if(T.value&&r)return Ie(r,{error:T.value});if(n&&!b.value)return Si(n,p)}}})}function Si(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=Ie(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const fi=e=>e.type.__isKeepAlive;function J_(e,t){dh(e,"a",t)}function Y_(e,t){dh(e,"da",t)}function dh(e,t,n=lt){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(zo(t,r,n),n){let s=n.parent;for(;s&&s.parent;)fi(s.parent.vnode)&&X_(r,t,n,s),s=s.parent}}function X_(e,t,n,r){const s=zo(t,e,r,!0);tr(()=>{jl(r[t],s)},n)}function zo(e,t,n=lt,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Cn();const a=pi(n),l=Wt(t,n,e,o);return a(),Rn(),l});return r?s.unshift(i):s.push(i),i}}const Nn=e=>(t,n=lt)=>{(!Hr||e==="sp")&&zo(e,(...r)=>t(...r),n)},Q_=Nn("bm"),ss=Nn("m"),ev=Nn("bu"),hh=Nn("u"),ph=Nn("bum"),tr=Nn("um"),tv=Nn("sp"),nv=Nn("rtg"),rv=Nn("rtc");function sv(e,t=lt){zo("ec",e,t)}const iv="components";function Hc(e,t){return av(iv,e,!0,t)||e}const ov=Symbol.for("v-ndc");function av(e,t,n=!0,r=!1){const s=Ct||lt;if(s){const i=s.type;{const a=Xv(i,!1);if(a&&(a===t||a===jt(t)||a===No(jt(t))))return i}const o=Gc(s[e]||i[e],t)||Gc(s.appContext[e],t);return!o&&r?i:o}}function Gc(e,t){return e&&(e[t]||e[jt(t)]||e[No(jt(t))])}function lv(e,t,n,r){let s;const i=n,o=ee(e);if(o||Be(e)){const a=o&&xn(e);let l=!1,u=!1;a&&(l=!Pt(e),u=In(e),e=Mo(e)),s=new Array(e.length);for(let c=0,f=e.length;c<f;c++)s[c]=t(l?u?Vr(Gt(e[c])):Gt(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(me(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}const Va=e=>e?Dh(e)?Bo(e):Va(e.parent):null,Fs=Je(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Va(e.parent),$root:e=>Va(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_h(e),$forceUpdate:e=>e.f||(e.f=()=>{Jl(e.update)}),$nextTick:e=>e.n||(e.n=Lo.bind(e.proxy)),$watch:e=>H_.bind(e)}),oa=(e,t)=>e!==Oe&&!e.__isScriptSetup&&we(e,t),cv={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(oa(r,t))return o[t]=1,r[t];if(s!==Oe&&we(s,t))return o[t]=2,s[t];if(we(i,t))return o[t]=3,i[t];if(n!==Oe&&we(n,t))return o[t]=4,n[t];Za&&(o[t]=0)}}const u=Fs[t];let c,f;if(u)return t==="$attrs"&&dt(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==Oe&&we(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,we(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return oa(s,t)?(s[t]=n,!0):r!==Oe&&we(r,t)?(r[t]=n,!0):we(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:i,type:o}},a){let l;return!!(n[a]||e!==Oe&&a[0]!=="$"&&we(e,a)||oa(t,a)||we(i,a)||we(r,a)||we(Fs,a)||we(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:we(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Wc(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Za=!0;function uv(e){const t=_h(e),n=e.proxy,r=e.ctx;Za=!1,t.beforeCreate&&qc(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:y,beforeDestroy:T,beforeUnmount:b,destroyed:S,unmounted:E,render:m,renderTracked:N,renderTriggered:M,errorCaptured:R,serverPrefetch:I,expose:F,inheritAttrs:J,components:D,directives:re,filters:ue}=t;if(u&&fv(u,r,null),o)for(const X in o){const le=o[X];ie(le)&&(r[X]=le.bind(n))}if(s){const X=s.call(n,n);me(X)&&(e.data=ci(X))}if(Za=!0,i)for(const X in i){const le=i[X],He=ie(le)?le.bind(n,n):ie(le.get)?le.get.bind(n,n):ln,nt=!ie(le)&&ie(le.set)?le.set.bind(n):ln,rt=Re({get:He,set:nt});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>rt.value,set:ye=>rt.value=ye})}if(a)for(const X in a)gh(a[X],r,n,X);if(l){const X=ie(l)?l.call(n):l;Reflect.ownKeys(X).forEach(le=>{zi(le,X[le])})}c&&qc(c,e,"c");function ce(X,le){ee(le)?le.forEach(He=>X(He.bind(n))):le&&X(le.bind(n))}if(ce(Q_,f),ce(ss,d),ce(ev,h),ce(hh,p),ce(J_,g),ce(Y_,y),ce(sv,R),ce(rv,N),ce(nv,M),ce(ph,b),ce(tr,E),ce(tv,I),ee(F))if(F.length){const X=e.exposed||(e.exposed={});F.forEach(le=>{Object.defineProperty(X,le,{get:()=>n[le],set:He=>n[le]=He,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===ln&&(e.render=m),J!=null&&(e.inheritAttrs=J),D&&(e.components=D),re&&(e.directives=re),I&&Ql(e)}function fv(e,t,n=ln){ee(e)&&(e=Ha(e));for(const r in e){const s=e[r];let i;me(s)?"default"in s?i=$t(s.from||r,s.default,!0):i=$t(s.from||r):i=$t(s),Me(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function qc(e,t,n){Wt(ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function gh(e,t,n,r){let s=r.includes(".")?nh(n,r):()=>n[r];if(Be(e)){const i=t[e];ie(i)&&Mr(s,i)}else if(ie(e))Mr(s,e.bind(n));else if(me(e))if(ee(e))e.forEach(i=>gh(i,t,n,r));else{const i=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(i)&&Mr(s,i,e)}}function _h(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>to(l,u,o,!0)),to(l,t,o)),me(t)&&i.set(t,l),l}function to(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&to(e,i,n,!0),s&&s.forEach(o=>to(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=dv[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const dv={data:Kc,props:Jc,emits:Jc,methods:ws,computed:ws,beforeCreate:pt,created:pt,beforeMount:pt,mounted:pt,beforeUpdate:pt,updated:pt,beforeDestroy:pt,beforeUnmount:pt,destroyed:pt,unmounted:pt,activated:pt,deactivated:pt,errorCaptured:pt,serverPrefetch:pt,components:ws,directives:ws,watch:pv,provide:Kc,inject:hv};function Kc(e,t){return t?e?function(){return Je(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function hv(e,t){return ws(Ha(e),Ha(t))}function Ha(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pt(e,t){return e?[...new Set([].concat(e,t))]:t}function ws(e,t){return e?Je(Object.create(null),e,t):t}function Jc(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:Je(Object.create(null),Wc(e),Wc(t??{})):t}function pv(e,t){if(!e)return t;if(!t)return e;const n=Je(Object.create(null),e);for(const r in t)n[r]=pt(e[r],t[r]);return n}function vh(){return{app:null,config:{isNativeTag:yd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let gv=0;function _v(e,t){return function(r,s=null){ie(r)||(r=Je({},r)),s!=null&&!me(s)&&(s=null);const i=vh(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:gv++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:em,get config(){return i.config},set config(c){},use(c,...f){return o.has(c)||(c&&ie(c.install)?(o.add(c),c.install(u,...f)):ie(c)&&(o.add(c),c(u,...f))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,f){return f?(i.components[c]=f,u):i.components[c]},directive(c,f){return f?(i.directives[c]=f,u):i.directives[c]},mount(c,f,d){if(!l){const h=u._ceVNode||Ie(r,s);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,c,d),l=!0,u._container=c,c.__vue_app__=u,Bo(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Wt(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return i.provides[c]=f,u},runWithContext(c){const f=hr;hr=u;try{return c()}finally{hr=f}}};return u}}let hr=null;const vv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${jt(t)}Modifiers`]||e[`${er(t)}Modifiers`];function mv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Oe;let s=n;const i=t.startsWith("update:"),o=i&&vv(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>Be(c)?c.trim():c)),o.number&&(s=n.map($o)));let a,l=r[a=ea(t)]||r[a=ea(jt(t))];!l&&i&&(l=r[a=ea(er(t))]),l&&Wt(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Wt(u,e,6,s)}}const yv=new WeakMap;function mh(e,t,n=!1){const r=n?yv:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!ie(e)){const l=u=>{const c=mh(u,t,!0);c&&(a=!0,Je(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(me(e)&&r.set(e,null),null):(ee(i)?i.forEach(l=>o[l]=null):Je(o,i),me(e)&&r.set(e,o),o)}function Uo(e,t){return!e||!Ro(t)?!1:(t=t.slice(2).replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,er(t))||we(e,t))}function Yc(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e,y=Qi(e);let T,b;try{if(n.shapeFlag&4){const E=s||r,m=E;T=Zt(u.call(m,E,c,f,h,d,p)),b=a}else{const E=t;T=Zt(E.length>1?E(f,{attrs:a,slots:o,emit:l}):E(f,null)),b=t.props?a:wv(a)}}catch(E){Ls.length=0,rs(E,e,1),T=Ie(at)}let S=T;if(b&&g!==!1){const E=Object.keys(b),{shapeFlag:m}=S;E.length&&m&7&&(i&&E.some(Ul)&&(b=Ev(b,i)),S=Jn(S,b,!1,!0))}return n.dirs&&(S=Jn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&gr(S,n.transition),T=S,Qi(y),T}function bv(e,t=!0){let n;for(let r=0;r<e.length;r++){const s=e[r];if(Xs(s)){if(s.type!==at||s.children==="v-if"){if(n)return;n=s}}else return}return n}const wv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ro(n))&&((t||(t={}))[n]=e[n]);return t},Ev=(e,t)=>{const n={};for(const r in e)(!Ul(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Sv(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Xc(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(yh(o,r,d)&&!Uo(u,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?Xc(r,o,u):!0:!!o;return!1}function Xc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(yh(t,e,i)&&!Uo(n,i))return!0}return!1}function yh(e,t,n){const r=e[n],s=t[n];return n==="style"&&me(r)&&me(s)?!Kn(r,s):r!==s}function ec({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const bh={},wh=()=>Object.create(bh),Eh=e=>Object.getPrototypeOf(e)===bh;function kv(e,t,n,r=!1){const s={},i=wh();e.propsDefaults=Object.create(null),Sh(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Hd(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Tv(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=_e(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(Uo(e.emitsOptions,d))continue;const h=t[d];if(l)if(we(i,d))h!==i[d]&&(i[d]=h,u=!0);else{const p=jt(d);s[p]=Ga(l,a,p,h,e,!1)}else h!==i[d]&&(i[d]=h,u=!0)}}}else{Sh(e,t,s,i)&&(u=!0);let c;for(const f in a)(!t||!we(t,f)&&((c=er(f))===f||!we(t,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(s[f]=Ga(l,a,f,void 0,e,!0)):delete s[f]);if(i!==a)for(const f in i)(!t||!we(t,f))&&(delete i[f],u=!0)}u&&mn(e.attrs,"set","")}function Sh(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Is(l))continue;const u=t[l];let c;s&&we(s,c=jt(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:Uo(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=_e(n),u=a||Oe;for(let c=0;c<i.length;c++){const f=i[c];n[f]=Ga(s,l,f,u[f],e,!we(u,f))}}return o}function Ga(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=we(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&ie(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=pi(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===er(n))&&(r=!0))}return r}const Ov=new WeakMap;function kh(e,t,n=!1){const r=n?Ov:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!ie(e)){const c=f=>{l=!0;const[d,h]=kh(f,t,!0);Je(o,d),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return me(e)&&r.set(e,Nr),Nr;if(ee(i))for(let c=0;c<i.length;c++){const f=jt(i[c]);Qc(f)&&(o[f]=Oe)}else if(i)for(const c in i){const f=jt(c);if(Qc(f)){const d=i[c],h=o[f]=ee(d)||ie(d)?{type:d}:Je({},d),p=h.type;let g=!1,y=!0;if(ee(p))for(let T=0;T<p.length;++T){const b=p[T],S=ie(b)&&b.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(y=!1)}else g=ie(p)&&p.name==="Boolean";h[0]=g,h[1]=y,(g||we(h,"default"))&&a.push(f)}}const u=[o,a];return me(e)&&r.set(e,u),u}function Qc(e){return e[0]!=="$"&&!Is(e)}const tc=e=>e==="_"||e==="_ctx"||e==="$stable",nc=e=>ee(e)?e.map(Zt):[Zt(e)],xv=(e,t,n)=>{if(t._n)return t;const r=Ks((...s)=>nc(t(...s)),n);return r._c=!1,r},Th=(e,t,n)=>{const r=e._ctx;for(const s in e){if(tc(s))continue;const i=e[s];if(ie(i))t[s]=xv(s,i,r);else if(i!=null){const o=nc(i);t[s]=()=>o}}},Oh=(e,t)=>{const n=nc(t);e.slots.default=()=>n},xh=(e,t,n)=>{for(const r in t)(n||!tc(r))&&(e[r]=t[r])},Av=(e,t,n)=>{const r=e.slots=wh();if(e.vnode.shapeFlag&32){const s=t._;s?(xh(r,t,n),n&&Sd(r,"_",s,!0)):Th(t,r)}else t&&Oh(e,t)},Cv=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Oe;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:xh(s,t,n):(i=!t.$stable,Th(t,s)),o=t}else t&&(Oh(e,t),o={default:1});if(i)for(const a in s)!tc(a)&&o[a]==null&&delete s[a]},st=zv;function Rv(e){return Iv(e)}function Iv(e,t){const n=Do();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=ln,insertStaticContent:p}=e,g=(_,v,w,x=null,P=null,A=null,H=void 0,z=null,L=!!v.dynamicChildren)=>{if(_===v)return;_&&!sn(_,v)&&(x=C(_),ye(_,P,A,!0),_=null),v.patchFlag===-2&&(L=!1,v.dynamicChildren=null);const{type:$,ref:se,shapeFlag:W}=v;switch($){case jo:y(_,v,w,x);break;case at:T(_,v,w,x);break;case ji:_==null&&b(v,w,x,H);break;case ht:D(_,v,w,x,P,A,H,z,L);break;default:W&1?m(_,v,w,x,P,A,H,z,L):W&6?re(_,v,w,x,P,A,H,z,L):(W&64||W&128)&&$.process(_,v,w,x,P,A,H,z,L,K)}se!=null&&P?Ds(se,_&&_.ref,A,v||_,!v):se==null&&_&&_.ref!=null&&Ds(_.ref,null,A,_,!0)},y=(_,v,w,x)=>{if(_==null)r(v.el=a(v.children),w,x);else{const P=v.el=_.el;v.children!==_.children&&u(P,v.children)}},T=(_,v,w,x)=>{_==null?r(v.el=l(v.children||""),w,x):v.el=_.el},b=(_,v,w,x)=>{[_.el,_.anchor]=p(_.children,v,w,x,_.el,_.anchor)},S=({el:_,anchor:v},w,x)=>{let P;for(;_&&_!==v;)P=d(_),r(_,w,x),_=P;r(v,w,x)},E=({el:_,anchor:v})=>{let w;for(;_&&_!==v;)w=d(_),s(_),_=w;s(v)},m=(_,v,w,x,P,A,H,z,L)=>{if(v.type==="svg"?H="svg":v.type==="math"&&(H="mathml"),_==null)N(v,w,x,P,A,H,z,L);else{const $=_.el&&_.el._isVueCE?_.el:null;try{$&&$._beginPatch(),I(_,v,P,A,H,z,L)}finally{$&&$._endPatch()}}},N=(_,v,w,x,P,A,H,z)=>{let L,$;const{props:se,shapeFlag:W,transition:ne,dirs:oe}=_;if(L=_.el=o(_.type,A,se&&se.is,se),W&8?c(L,_.children):W&16&&R(_.children,L,null,x,P,aa(_,A),H,z),oe&&sr(_,null,x,"created"),M(L,_,_.scopeId,H,x),se){for(const xe in se)xe!=="value"&&!Is(xe)&&i(L,xe,null,se[xe],A,x);"value"in se&&i(L,"value",null,se.value,A),($=se.onVnodeBeforeMount)&&Qt($,x,_)}oe&&sr(_,null,x,"beforeMount");const ge=Pv(P,ne);ge&&ne.beforeEnter(L),r(L,v,w),(($=se&&se.onVnodeMounted)||ge||oe)&&st(()=>{$&&Qt($,x,_),ge&&ne.enter(L),oe&&sr(_,null,x,"mounted")},P)},M=(_,v,w,x,P)=>{if(w&&h(_,w),x)for(let A=0;A<x.length;A++)h(_,x[A]);if(P){let A=P.subTree;if(v===A||Rh(A.type)&&(A.ssContent===v||A.ssFallback===v)){const H=P.vnode;M(_,H,H.scopeId,H.slotScopeIds,P.parent)}}},R=(_,v,w,x,P,A,H,z,L=0)=>{for(let $=L;$<_.length;$++){const se=_[$]=z?vn(_[$]):Zt(_[$]);g(null,se,v,w,x,P,A,H,z)}},I=(_,v,w,x,P,A,H)=>{const z=v.el=_.el;let{patchFlag:L,dynamicChildren:$,dirs:se}=v;L|=_.patchFlag&16;const W=_.props||Oe,ne=v.props||Oe;let oe;if(w&&ir(w,!1),(oe=ne.onVnodeBeforeUpdate)&&Qt(oe,w,v,_),se&&sr(v,_,w,"beforeUpdate"),w&&ir(w,!0),(W.innerHTML&&ne.innerHTML==null||W.textContent&&ne.textContent==null)&&c(z,""),$?F(_.dynamicChildren,$,z,w,x,aa(v,P),A):H||le(_,v,z,null,w,x,aa(v,P),A,!1),L>0){if(L&16)J(z,W,ne,w,P);else if(L&2&&W.class!==ne.class&&i(z,"class",null,ne.class,P),L&4&&i(z,"style",W.style,ne.style,P),L&8){const ge=v.dynamicProps;for(let xe=0;xe<ge.length;xe++){const Se=ge[xe],bt=W[Se],wt=ne[Se];(wt!==bt||Se==="value")&&i(z,Se,bt,wt,P,w)}}L&1&&_.children!==v.children&&c(z,v.children)}else!H&&$==null&&J(z,W,ne,w,P);((oe=ne.onVnodeUpdated)||se)&&st(()=>{oe&&Qt(oe,w,v,_),se&&sr(v,_,w,"updated")},x)},F=(_,v,w,x,P,A,H)=>{for(let z=0;z<v.length;z++){const L=_[z],$=v[z],se=L.el&&(L.type===ht||!sn(L,$)||L.shapeFlag&198)?f(L.el):w;g(L,$,se,null,x,P,A,H,!0)}},J=(_,v,w,x,P)=>{if(v!==w){if(v!==Oe)for(const A in v)!Is(A)&&!(A in w)&&i(_,A,v[A],null,P,x);for(const A in w){if(Is(A))continue;const H=w[A],z=v[A];H!==z&&A!=="value"&&i(_,A,z,H,P,x)}"value"in w&&i(_,"value",v.value,w.value,P)}},D=(_,v,w,x,P,A,H,z,L)=>{const $=v.el=_?_.el:a(""),se=v.anchor=_?_.anchor:a("");let{patchFlag:W,dynamicChildren:ne,slotScopeIds:oe}=v;oe&&(z=z?z.concat(oe):oe),_==null?(r($,w,x),r(se,w,x),R(v.children||[],w,se,P,A,H,z,L)):W>0&&W&64&&ne&&_.dynamicChildren&&_.dynamicChildren.length===ne.length?(F(_.dynamicChildren,ne,w,P,A,H,z),(v.key!=null||P&&v===P.subTree)&&rc(_,v,!0)):le(_,v,w,se,P,A,H,z,L)},re=(_,v,w,x,P,A,H,z,L)=>{v.slotScopeIds=z,_==null?v.shapeFlag&512?P.ctx.activate(v,w,x,H,L):ue(v,w,x,P,A,H,L):Ee(_,v,L)},ue=(_,v,w,x,P,A,H)=>{const z=_.component=Wv(_,x,P);if(fi(_)&&(z.ctx.renderer=K),qv(z,!1,H),z.asyncDep){if(P&&P.registerDep(z,ce,H),!_.el){const L=z.subTree=Ie(at);T(null,L,v,w),_.placeholder=L.el}}else ce(z,_,v,w,P,A,H)},Ee=(_,v,w)=>{const x=v.component=_.component;if(Sv(_,v,w))if(x.asyncDep&&!x.asyncResolved){X(x,v,w);return}else x.next=v,x.update();else v.el=_.el,x.vnode=v},ce=(_,v,w,x,P,A,H)=>{const z=()=>{if(_.isMounted){let{next:W,bu:ne,u:oe,parent:ge,vnode:xe}=_;{const Yt=Ah(_);if(Yt){W&&(W.el=xe.el,X(_,W,H)),Yt.asyncDep.then(()=>{st(()=>{_.isUnmounted||$()},P)});return}}let Se=W,bt;ir(_,!1),W?(W.el=xe.el,X(_,W,H)):W=xe,ne&&Li(ne),(bt=W.props&&W.props.onVnodeBeforeUpdate)&&Qt(bt,ge,W,xe),ir(_,!0);const wt=Yc(_),Jt=_.subTree;_.subTree=wt,g(Jt,wt,f(Jt.el),C(Jt),_,P,A),W.el=wt.el,Se===null&&ec(_,wt.el),oe&&st(oe,P),(bt=W.props&&W.props.onVnodeUpdated)&&st(()=>Qt(bt,ge,W,xe),P)}else{let W;const{el:ne,props:oe}=v,{bm:ge,m:xe,parent:Se,root:bt,type:wt}=_,Jt=Ms(v);ir(_,!1),ge&&Li(ge),!Jt&&(W=oe&&oe.onVnodeBeforeMount)&&Qt(W,Se,v),ir(_,!0);{bt.ce&&bt.ce._hasShadowRoot()&&bt.ce._injectChildStyle(wt);const Yt=_.subTree=Yc(_);g(null,Yt,w,x,_,P,A),v.el=Yt.el}if(xe&&st(xe,P),!Jt&&(W=oe&&oe.onVnodeMounted)){const Yt=v;st(()=>Qt(W,Se,Yt),P)}(v.shapeFlag&256||Se&&Ms(Se.vnode)&&Se.vnode.shapeFlag&256)&&_.a&&st(_.a,P),_.isMounted=!0,v=w=x=null}};_.scope.on();const L=_.effect=new Id(z);_.scope.off();const $=_.update=L.run.bind(L),se=_.job=L.runIfDirty.bind(L);se.i=_,se.id=_.uid,L.scheduler=()=>Jl(se),ir(_,!0),$()},X=(_,v,w)=>{v.component=_;const x=_.vnode.props;_.vnode=v,_.next=null,Tv(_,v.props,x,w),Cv(_,v.children,w),Cn(),Fc(_),Rn()},le=(_,v,w,x,P,A,H,z,L=!1)=>{const $=_&&_.children,se=_?_.shapeFlag:0,W=v.children,{patchFlag:ne,shapeFlag:oe}=v;if(ne>0){if(ne&128){nt($,W,w,x,P,A,H,z,L);return}else if(ne&256){He($,W,w,x,P,A,H,z,L);return}}oe&8?(se&16&&Ve($,P,A),W!==$&&c(w,W)):se&16?oe&16?nt($,W,w,x,P,A,H,z,L):Ve($,P,A,!0):(se&8&&c(w,""),oe&16&&R(W,w,x,P,A,H,z,L))},He=(_,v,w,x,P,A,H,z,L)=>{_=_||Nr,v=v||Nr;const $=_.length,se=v.length,W=Math.min($,se);let ne;for(ne=0;ne<W;ne++){const oe=v[ne]=L?vn(v[ne]):Zt(v[ne]);g(_[ne],oe,w,null,P,A,H,z,L)}$>se?Ve(_,P,A,!0,!1,W):R(v,w,x,P,A,H,z,L,W)},nt=(_,v,w,x,P,A,H,z,L)=>{let $=0;const se=v.length;let W=_.length-1,ne=se-1;for(;$<=W&&$<=ne;){const oe=_[$],ge=v[$]=L?vn(v[$]):Zt(v[$]);if(sn(oe,ge))g(oe,ge,w,null,P,A,H,z,L);else break;$++}for(;$<=W&&$<=ne;){const oe=_[W],ge=v[ne]=L?vn(v[ne]):Zt(v[ne]);if(sn(oe,ge))g(oe,ge,w,null,P,A,H,z,L);else break;W--,ne--}if($>W){if($<=ne){const oe=ne+1,ge=oe<se?v[oe].el:x;for(;$<=ne;)g(null,v[$]=L?vn(v[$]):Zt(v[$]),w,ge,P,A,H,z,L),$++}}else if($>ne)for(;$<=W;)ye(_[$],P,A,!0),$++;else{const oe=$,ge=$,xe=new Map;for($=ge;$<=ne;$++){const At=v[$]=L?vn(v[$]):Zt(v[$]);At.key!=null&&xe.set(At.key,$)}let Se,bt=0;const wt=ne-ge+1;let Jt=!1,Yt=0;const os=new Array(wt);for($=0;$<wt;$++)os[$]=0;for($=oe;$<=W;$++){const At=_[$];if(bt>=wt){ye(At,P,A,!0);continue}let Xt;if(At.key!=null)Xt=xe.get(At.key);else for(Se=ge;Se<=ne;Se++)if(os[Se-ge]===0&&sn(At,v[Se])){Xt=Se;break}Xt===void 0?ye(At,P,A,!0):(os[Xt-ge]=$+1,Xt>=Yt?Yt=Xt:Jt=!0,g(At,v[Xt],w,null,P,A,H,z,L),bt++)}const Rc=Jt?Nv(os):Nr;for(Se=Rc.length-1,$=wt-1;$>=0;$--){const At=ge+$,Xt=v[At],Ic=v[At+1],Pc=At+1<se?Ic.el||Ch(Ic):x;os[$]===0?g(null,Xt,w,Pc,P,A,H,z,L):Jt&&(Se<0||$!==Rc[Se]?rt(Xt,w,Pc,2):Se--)}}},rt=(_,v,w,x,P=null)=>{const{el:A,type:H,transition:z,children:L,shapeFlag:$}=_;if($&6){rt(_.component.subTree,v,w,x);return}if($&128){_.suspense.move(v,w,x);return}if($&64){H.move(_,v,w,K);return}if(H===ht){r(A,v,w);for(let W=0;W<L.length;W++)rt(L[W],v,w,x);r(_.anchor,v,w);return}if(H===ji){S(_,v,w);return}if(x!==2&&$&1&&z)if(x===0)z.beforeEnter(A),r(A,v,w),st(()=>z.enter(A),P);else{const{leave:W,delayLeave:ne,afterLeave:oe}=z,ge=()=>{_.ctx.isUnmounted?s(A):r(A,v,w)},xe=()=>{A._isLeaving&&A[nn](!0),W(A,()=>{ge(),oe&&oe()})};ne?ne(A,ge,xe):xe()}else r(A,v,w)},ye=(_,v,w,x=!1,P=!1)=>{const{type:A,props:H,ref:z,children:L,dynamicChildren:$,shapeFlag:se,patchFlag:W,dirs:ne,cacheIndex:oe}=_;if(W===-2&&(P=!1),z!=null&&(Cn(),Ds(z,null,w,_,!0),Rn()),oe!=null&&(v.renderCache[oe]=void 0),se&256){v.ctx.deactivate(_);return}const ge=se&1&&ne,xe=!Ms(_);let Se;if(xe&&(Se=H&&H.onVnodeBeforeUnmount)&&Qt(Se,v,_),se&6)yt(_.component,w,x);else{if(se&128){_.suspense.unmount(w,x);return}ge&&sr(_,null,v,"beforeUnmount"),se&64?_.type.remove(_,v,w,K,x):$&&!$.hasOnce&&(A!==ht||W>0&&W&64)?Ve($,v,w,!1,!0):(A===ht&&W&384||!P&&se&16)&&Ve(L,v,w),x&&Ye(_)}(xe&&(Se=H&&H.onVnodeUnmounted)||ge)&&st(()=>{Se&&Qt(Se,v,_),ge&&sr(_,null,v,"unmounted")},w)},Ye=_=>{const{type:v,el:w,anchor:x,transition:P}=_;if(v===ht){Ge(w,x);return}if(v===ji){E(_);return}const A=()=>{s(w),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(_.shapeFlag&1&&P&&!P.persisted){const{leave:H,delayLeave:z}=P,L=()=>H(w,A);z?z(_.el,A,L):L()}else A()},Ge=(_,v)=>{let w;for(;_!==v;)w=d(_),s(_),_=w;s(v)},yt=(_,v,w)=>{const{bum:x,scope:P,job:A,subTree:H,um:z,m:L,a:$}=_;eu(L),eu($),x&&Li(x),P.stop(),A&&(A.flags|=8,ye(H,_,v,w)),z&&st(z,v),st(()=>{_.isUnmounted=!0},v)},Ve=(_,v,w,x=!1,P=!1,A=0)=>{for(let H=A;H<_.length;H++)ye(_[H],v,w,x,P)},C=_=>{if(_.shapeFlag&6)return C(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const v=d(_.anchor||_.el),w=v&&v[rh];return w?d(w):v};let q=!1;const Z=(_,v,w)=>{let x;_==null?v._vnode&&(ye(v._vnode,null,null,!0),x=v._vnode.component):g(v._vnode||null,_,v,null,null,null,w),v._vnode=_,q||(q=!0,Fc(x),Yd(),q=!1)},K={p:g,um:ye,m:rt,r:Ye,mt:ue,mc:R,pc:le,pbc:F,n:C,o:e};return{render:Z,hydrate:void 0,createApp:_v(Z)}}function aa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ir({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Pv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rc(e,t,n=!1){const r=e.children,s=t.children;if(ee(r)&&ee(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=vn(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&rc(o,a)),a.type===jo&&(a.patchFlag===-1&&(a=s[i]=vn(a)),a.el=o.el),a.type===at&&!a.el&&(a.el=o.el)}}function Nv(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ah(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ah(t)}function eu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ch(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ch(t.subTree):null}const Rh=e=>e.__isSuspense;let Wa=0;const $v={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,i,o,a,l,u){if(e==null)Dv(t,n,r,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Mv(e,t,n,r,s,o,a,l,u)}},hydrate:Fv,normalize:Lv},Vx=$v;function Ys(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function Dv(e,t,n,r,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,f=c("div"),d=e.suspense=Ih(e,s,r,t,f,n,i,o,a,l);u(null,d.pendingBranch=e.ssContent,f,null,r,d,i,o),d.deps>0?(Ys(e,"onPending"),Ys(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,i,o),Fr(d,e.ssFallback)):d.resolve(!1,!0)}function Mv(e,t,n,r,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const d=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:g,isInFallback:y,isHydrating:T}=f;if(g)f.pendingBranch=d,sn(g,d)?(l(g,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0?f.resolve():y&&(T||(l(p,h,n,r,s,null,i,o,a),Fr(f,h)))):(f.pendingId=Wa++,T?(f.isHydrating=!1,f.activeBranch=g):u(g,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),y?(l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0?f.resolve():(l(p,h,n,r,s,null,i,o,a),Fr(f,h))):p&&sn(p,d)?(l(p,d,n,r,s,f,i,o,a),f.resolve(!0)):(l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0&&f.resolve()));else if(p&&sn(p,d))l(p,d,n,r,s,f,i,o,a),Fr(f,d);else if(Ys(t,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=Wa++,l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0)f.resolve();else{const{timeout:b,pendingId:S}=f;b>0?setTimeout(()=>{f.pendingId===S&&f.fallback(h)},b):b===0&&f.fallback(h)}}function Ih(e,t,n,r,s,i,o,a,l,u,c=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:g,remove:y}}=u;let T;const b=Uv(e);b&&t&&t.pendingBranch&&(T=t.pendingId,t.deps++);const S=e.props?kd(e.props.timeout):void 0,E=i,m={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:s,deps:0,pendingId:Wa++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(N=!1,M=!1){const{vnode:R,activeBranch:I,pendingBranch:F,pendingId:J,effects:D,parentComponent:re,container:ue,isInFallback:Ee}=m;let ce=!1;m.isHydrating?m.isHydrating=!1:N||(ce=I&&F.transition&&F.transition.mode==="out-in",ce&&(I.transition.afterLeave=()=>{J===m.pendingId&&(d(F,ue,i===E?p(I):i,0),Ua(D),Ee&&R.ssFallback&&(R.ssFallback.el=null))}),I&&(g(I.el)===ue&&(i=p(I)),h(I,re,m,!0),!ce&&Ee&&R.ssFallback&&st(()=>R.ssFallback.el=null,m)),ce||d(F,ue,i,0)),Fr(m,F),m.pendingBranch=null,m.isInFallback=!1;let X=m.parent,le=!1;for(;X;){if(X.pendingBranch){X.effects.push(...D),le=!0;break}X=X.parent}!le&&!ce&&Ua(D),m.effects=[],b&&t&&t.pendingBranch&&T===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),Ys(R,"onResolve")},fallback(N){if(!m.pendingBranch)return;const{vnode:M,activeBranch:R,parentComponent:I,container:F,namespace:J}=m;Ys(M,"onFallback");const D=p(R),re=()=>{m.isInFallback&&(f(null,N,F,D,I,null,J,a,l),Fr(m,N))},ue=N.transition&&N.transition.mode==="out-in";ue&&(R.transition.afterLeave=re),m.isInFallback=!0,h(R,I,null,!0),ue||re()},move(N,M,R){m.activeBranch&&d(m.activeBranch,N,M,R),m.container=N},next(){return m.activeBranch&&p(m.activeBranch)},registerDep(N,M,R){const I=!!m.pendingBranch;I&&m.deps++;const F=N.vnode.el;N.asyncDep.catch(J=>{rs(J,N,0)}).then(J=>{if(N.isUnmounted||m.isUnmounted||m.pendingId!==N.suspenseId)return;N.asyncResolved=!0;const{vnode:D}=N;Ka(N,J),F&&(D.el=F);const re=!F&&N.subTree.el;M(N,D,g(F||N.subTree.el),F?null:p(N.subTree),m,o,R),re&&(D.placeholder=null,y(re)),ec(N,D.el),I&&--m.deps===0&&m.resolve()})},unmount(N,M){m.isUnmounted=!0,m.activeBranch&&h(m.activeBranch,n,N,M),m.pendingBranch&&h(m.pendingBranch,n,N,M)}};return m}function Fv(e,t,n,r,s,i,o,a,l){const u=t.suspense=Ih(t,r,n,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function Lv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=tu(r?n.default:n),e.ssFallback=r?tu(n.fallback):Ie(at)}function tu(e){let t;if(ie(e)){const n=Zr&&e._c;n&&(e._d=!1,Ne()),e=e(),n&&(e._d=!0,t=Tt,Ph())}return ee(e)&&(e=bv(e)),e=Zt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function zv(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Ua(e)}function Fr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,ec(r,s))}function Uv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const ht=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),ji=Symbol.for("v-stc"),Ls=[];let Tt=null;function Ne(e=!1){Ls.push(Tt=e?null:[])}function Ph(){Ls.pop(),Tt=Ls[Ls.length-1]||null}let Zr=1;function no(e,t=!1){Zr+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function Nh(e){return e.dynamicChildren=Zr>0?Tt||Nr:null,Ph(),Zr>0&&Tt&&Tt.push(e),e}function tt(e,t,n,r,s,i){return Nh(G(e,t,n,r,s,i,!0))}function di(e,t,n,r,s){return Nh(Ie(e,t,n,r,s,!0))}function Xs(e){return e?e.__v_isVNode===!0:!1}function sn(e,t){return e.type===t.type&&e.key===t.key}const $h=({key:e})=>e??null,Bi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||Me(e)||ie(e)?{i:Ct,r:e,k:t,f:!!n}:e:null);function G(e,t=null,n=null,r=0,s=null,i=e===ht?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$h(t),ref:t&&Bi(t),scopeId:Qd,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ct};return a?(sc(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Be(n)?8:16),Zr>0&&!o&&Tt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Tt.push(l),l}const Ie=jv;function jv(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===ov)&&(e=at),Xs(e)){const a=Jn(e,t,!0);return n&&sc(a,n),Zr>0&&!i&&Tt&&(a.shapeFlag&6?Tt[Tt.indexOf(e)]=a:Tt.push(a)),a.patchFlag=-2,a}if(Qv(e)&&(e=e.__vccOpts),t){t=Bv(t);let{class:a,style:l}=t;a&&!Be(a)&&(t.class=pr(a)),me(l)&&(Fo(l)&&!ee(l)&&(l=Je({},l)),t.style=On(l))}const o=Be(e)?1:Rh(e)?128:sh(e)?64:me(e)?4:ie(e)?2:0;return G(e,t,n,r,s,o,i,!0)}function Bv(e){return e?Fo(e)||Eh(e)?Je({},e):e:null}function Jn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?Zv(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&$h(u),ref:t&&t.ref?n&&i?ee(i)?i.concat(Bi(t)):[i,Bi(t)]:Bi(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ht?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Jn(e.ssContent),ssFallback:e.ssFallback&&Jn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&gr(c,l.clone(c)),c}function Vv(e=" ",t=0){return Ie(jo,null,e,t)}function nu(e,t){const n=Ie(ji,null,e);return n.staticCount=t,n}function Zn(e="",t=!1){return t?(Ne(),di(at,null,e)):Ie(at,null,e)}function Zt(e){return e==null||typeof e=="boolean"?Ie(at):ee(e)?Ie(ht,null,e.slice()):Xs(e)?vn(e):Ie(jo,null,String(e))}function vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Jn(e)}function sc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),sc(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Eh(t)?t._ctx=Ct:s===3&&Ct&&(Ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Ct},n=32):(t=String(t),r&64?(n=16,t=[Vv(t)]):n=8);e.children=t,e.shapeFlag|=n}function Zv(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=pr([t.class,r.class]));else if(s==="style")t.style=On([t.style,r.style]);else if(Ro(s)){const i=t[s],o=r[s];o&&i!==o&&!(ee(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Qt(e,t,n,r=null){Wt(e,t,7,[n,r])}const Hv=vh();let Gv=0;function Wv(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Hv,i={uid:Gv++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ad(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kh(r,s),emitsOptions:mh(r,s),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:r.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=mv.bind(null,i),e.ce&&e.ce(i),i}let lt=null;const hi=()=>lt||Ct;let ro,qa;{const e=Do(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};ro=t("__VUE_INSTANCE_SETTERS__",n=>lt=n),qa=t("__VUE_SSR_SETTERS__",n=>Hr=n)}const pi=e=>{const t=lt;return ro(e),e.scope.on(),()=>{e.scope.off(),ro(t)}},ru=()=>{lt&<.scope.off(),ro(null)};function Dh(e){return e.vnode.shapeFlag&4}let Hr=!1;function qv(e,t=!1,n=!1){t&&qa(t);const{props:r,children:s}=e.vnode,i=Dh(e);kv(e,r,i,t),Av(e,s,n||t);const o=i?Kv(e,t):void 0;return t&&qa(!1),o}function Kv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cv);const{setup:r}=n;if(r){Cn();const s=e.setupContext=r.length>1?Yv(e):null,i=pi(e),o=ui(r,e,0,[e.props,s]),a=bd(o);if(Rn(),i(),(a||e.sp)&&!Ms(e)&&Ql(e),a){if(o.then(ru,ru),t)return o.then(l=>{Ka(e,l)}).catch(l=>{rs(l,e,0)});e.asyncDep=o}else Ka(e,o)}else Mh(e)}function Ka(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=Wd(t)),Mh(e)}function Mh(e,t,n){const r=e.type;e.render||(e.render=r.render||ln);{const s=pi(e);Cn();try{uv(e)}finally{Rn(),s()}}}const Jv={get(e,t){return dt(e,"get",""),e[t]}};function Yv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Jv),slots:e.slots,emit:e.emit,expose:t}}function Bo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Wd(Kl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fs)return Fs[n](e)},has(t,n){return n in t||n in Fs}})):e.proxy}function Xv(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function Qv(e){return ie(e)&&"__vccOpts"in e}const Re=(e,t)=>L_(e,t,Hr);function ic(e,t,n){try{no(-1);const r=arguments.length;return r===2?me(t)&&!ee(t)?Xs(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Xs(n)&&(n=[n]),Ie(e,t,n))}finally{no(1)}}const em="3.5.29";/**
|
|
14
|
+
**/function fi(e,t,n,r){try{return r?e(...r):e()}catch(s){rs(s,t,n)}}function Wt(e,t,n,r){if(ie(e)){const s=fi(e,t,n,r);return s&&Ed(s)&&s.catch(i=>{rs(i,t,n)}),s}if(ee(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Wt(e[i],t,n,r));return s}}function rs(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Oe;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,l,u)===!1)return}a=a.parent}if(i){Pn(),fi(i,null,10,[e,l,u]),Rn();return}}H_(e,n,s,r,o)}function H_(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const mt=[];let tn=-1;const Dr=[];let Bn=null,Tr=0;const Yd=Promise.resolve();let Xi=null;function Lo(e){const t=Xi||Yd;return e?t.then(this?e.bind(this):e):t}function G_(e){let t=tn+1,n=mt.length;for(;t<n;){const r=t+n>>>1,s=mt[r],i=Ks(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Yl(e){if(!(e.flags&1)){const t=Ks(e),n=mt[mt.length-1];!n||!(e.flags&2)&&t>=Ks(n)?mt.push(e):mt.splice(G_(t),0,e),e.flags|=1,Xd()}}function Xd(){Xi||(Xi=Yd.then(eh))}function Ua(e){ee(e)?Dr.push(...e):Bn&&e.id===-1?Bn.splice(Tr+1,0,e):e.flags&1||(Dr.push(e),e.flags|=1),Xd()}function zc(e,t,n=tn+1){for(;n<mt.length;n++){const r=mt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;mt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Qd(e){if(Dr.length){const t=[...new Set(Dr)].sort((n,r)=>Ks(n)-Ks(r));if(Dr.length=0,Bn){Bn.push(...t);return}for(Bn=t,Tr=0;Tr<Bn.length;Tr++){const n=Bn[Tr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Bn=null,Tr=0}}const Ks=e=>e.id==null?e.flags&2?-1:1/0:e.id;function eh(e){try{for(tn=0;tn<mt.length;tn++){const t=mt[tn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),fi(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;tn<mt.length;tn++){const t=mt[tn];t&&(t.flags&=-2)}tn=-1,mt.length=0,Qd(),Xi=null,(mt.length||Dr.length)&&eh()}}let Pt=null,th=null;function Qi(e){const t=Pt;return Pt=e,th=e&&e.type.__scopeId||null,t}function Js(e,t=Pt,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&no(-1);const i=Qi(t);let o;try{o=e(...s)}finally{Qi(i),r._d&&no(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function _x(e,t){if(Pt===null)return e;const n=Bo(Pt),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Oe]=t[s];i&&(ie(i)&&(i={mounted:i,updated:i}),i.deep&&yn(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function sr(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Pn(),Wt(l,n,8,[e.el,a,e,t]),Rn())}}function zi(e,t){if(lt){let n=lt.provides;const r=lt.parent&<.parent.provides;r===n&&(n=lt.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=pi();if(r||hr){let s=hr?hr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&ie(t)?t.call(r&&r.proxy):t}}function nh(){return!!(pi()||hr)}const W_=Symbol.for("v-scx"),q_=()=>$t(W_);function Mr(e,t,n){return rh(e,t,n)}function rh(e,t,n=Oe){const{immediate:r,deep:s,flush:i,once:o}=n,a=Je({},n),l=t&&r||!t&&i!=="post";let u;if(Hr){if(i==="sync"){const h=q_();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=ln,h.resume=ln,h.pause=ln,h}}const c=lt;a.call=(h,p,g)=>Wt(h,c,p,g);let f=!1;i==="post"?a.scheduler=h=>{st(h,c&&c.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(h,p)=>{p?h():Yl(h)}),a.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=Z_(e,t,a);return Hr&&(u?u.push(d):l&&d()),d}function K_(e,t,n){const r=this.proxy,s=Be(e)?e.includes(".")?sh(r,e):()=>r[e]:e.bind(r,r);let i;ie(t)?i=t:(i=t.handler,n=t);const o=gi(this),a=rh(s,i.bind(r),n);return o(),a}function sh(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const ih=Symbol("_vte"),oh=e=>e.__isTeleport,Ds=e=>e&&(e.disabled||e.disabled===""),Uc=e=>e&&(e.defer||e.defer===""),jc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Bc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ja=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},ah={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:y}}=u,k=Ds(t.props);let{shapeFlag:b,children:S,dynamicChildren:E}=t;if(e==null){const m=t.el=g(""),N=t.anchor=g("");h(m,n,r),h(N,n,r);const M=(I,F)=>{b&16&&c(S,I,F,s,i,o,a,l)},R=()=>{const I=t.target=ja(t.props,p),F=Ba(I,t,g,h);I&&(o!=="svg"&&jc(I)?o="svg":o!=="mathml"&&Bc(I)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),k||(M(I,F),Ui(t,!1)))};k&&(M(n,N),Ui(t,!0)),Uc(t.props)?(t.el.__isMounted=!1,st(()=>{R(),delete t.el.__isMounted},i)):R()}else{if(Uc(t.props)&&e.el.__isMounted===!1){st(()=>{ah.process(e,t,n,r,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const m=t.anchor=e.anchor,N=t.target=e.target,M=t.targetAnchor=e.targetAnchor,R=Ds(e.props),I=R?n:N,F=R?m:M;if(o==="svg"||jc(N)?o="svg":(o==="mathml"||Bc(N))&&(o="mathml"),E?(d(e.dynamicChildren,E,I,s,i,o,a),sc(e,t,!0)):l||f(e,t,I,F,s,i,o,a,!1),k)R?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Si(t,n,m,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const J=t.target=ja(t.props,p);J&&Si(t,J,null,u,0)}else R&&Si(t,N,M,u,1);Ui(t,k)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:f,props:d}=e;if(f&&(s(u),s(c)),i&&s(l),o&16){const h=i||!Ds(d);for(let p=0;p<a.length;p++){const g=a[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:Si,hydrate:J_};function Si(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,f=i===2;if(f&&r(o,t,n),(!f||Ds(c))&&l&16)for(let d=0;d<u.length;d++)s(u[d],t,n,2);f&&r(a,t,n)}function J_(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},f){function d(y,k){let b=k;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,y._lpa=t.targetAnchor&&o(t.targetAnchor);break}}b=o(b)}}function h(y,k){k.anchor=f(o(y),k,a(y),n,r,s,i)}const p=t.target=ja(t.props,l),g=Ds(t.props);if(p){const y=p._lpa||p.firstChild;t.shapeFlag&16&&(g?(h(e,t),d(p,y),t.targetAnchor||Ba(p,t,c,u,a(e)===p?e:null)):(t.anchor=o(e),d(p,y),t.targetAnchor||Ba(p,t,c,u),f(y&&o(y),t,p,n,r,s,i))),Ui(t,g)}else g&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const lh=ah;function Ui(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Ba(e,t,n,r,s=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[ih]=o,e&&(r(i,e,s),r(o,e,s)),o}const nn=Symbol("_leaveCb"),ls=Symbol("_enterCb");function ch(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ss(()=>{e.isMounted=!0}),_h(()=>{e.isUnmounting=!0}),e}const Dt=[Function,Array],uh={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dt,onEnter:Dt,onAfterEnter:Dt,onEnterCancelled:Dt,onBeforeLeave:Dt,onLeave:Dt,onAfterLeave:Dt,onLeaveCancelled:Dt,onBeforeAppear:Dt,onAppear:Dt,onAfterAppear:Dt,onAppearCancelled:Dt},fh=e=>{const t=e.subTree;return t.component?fh(t.component):t},Y_={name:"BaseTransition",props:uh,setup(e,{slots:t}){const n=pi(),r=ch();return()=>{const s=t.default&&Xl(t.default(),!0);if(!s||!s.length)return;const i=dh(s),o=_e(e),{mode:a}=o;if(r.isLeaving)return ia(i);const l=Vc(i);if(!l)return ia(i);let u=Ys(l,o,r,n,f=>u=f);l.type!==at&&gr(l,u);let c=n.subTree&&Vc(n.subTree);if(c&&c.type!==at&&!sn(c,l)&&fh(n).type!==at){let f=Ys(c,o,r,n);if(gr(c,f),a==="out-in"&&l.type!==at)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,c=void 0},ia(i);a==="in-out"&&l.type!==at?f.delayLeave=(d,h,p)=>{const g=hh(r,c);g[String(c.key)]=c,d[nn]=()=>{h(),d[nn]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{p(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function dh(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const X_=Y_;function hh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ys(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:y,onAppear:k,onAfterAppear:b,onAppearCancelled:S}=t,E=String(e.key),m=hh(n,e),N=(I,F)=>{I&&Wt(I,r,9,F)},M=(I,F)=>{const J=F[1];N(I,F),ee(I)?I.every(D=>D.length<=1)&&J():I.length<=1&&J()},R={mode:o,persisted:a,beforeEnter(I){let F=l;if(!n.isMounted)if(i)F=y||l;else return;I[nn]&&I[nn](!0);const J=m[E];J&&sn(e,J)&&J.el[nn]&&J.el[nn](),N(F,[I])},enter(I){if(m[E]===e)return;let F=u,J=c,D=f;if(!n.isMounted)if(i)F=k||u,J=b||c,D=S||f;else return;let re=!1;I[ls]=Ee=>{re||(re=!0,Ee?N(D,[I]):N(J,[I]),R.delayedLeave&&R.delayedLeave(),I[ls]=void 0)};const ue=I[ls].bind(null,!1);F?M(F,[I,ue]):ue()},leave(I,F){const J=String(e.key);if(I[ls]&&I[ls](!0),n.isUnmounting)return F();N(d,[I]);let D=!1;I[nn]=ue=>{D||(D=!0,F(),ue?N(g,[I]):N(p,[I]),I[nn]=void 0,m[J]===e&&delete m[J])};const re=I[nn].bind(null,!1);m[J]=e,h?M(h,[I,re]):re()},clone(I){const F=Ys(I,t,n,r,s);return s&&s(F),F}};return R}function ia(e){if(di(e))return e=Jn(e),e.children=null,e}function Vc(e){if(!di(e))return oh(e.type)&&e.children?dh(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function gr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,gr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Xl(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===ht?(o.patchFlag&128&&s++,r=r.concat(Xl(o.children,t,a))):(t||o.type!==at)&&r.push(a!=null?Jn(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Ql(e,t){return ie(e)?Je({name:e.name},t,{setup:e}):e}function vx(){const e=pi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function ec(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Zc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const eo=new WeakMap;function Ms(e,t,n,r,s=!1){if(ee(e)){e.forEach((g,y)=>Ms(g,t&&(ee(t)?t[y]:t),n,r,s));return}if(Fs(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ms(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Bo(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Oe?a.refs={}:a.refs,f=a.setupState,d=_e(f),h=f===Oe?wd:g=>Zc(c,g)?!1:we(d,g),p=(g,y)=>!(y&&Zc(c,y));if(u!=null&&u!==l){if(Hc(t),Be(u))c[u]=null,h(u)&&(f[u]=null);else if(Me(u)){const g=t;p(u,g.k)&&(u.value=null),g.k&&(c[g.k]=null)}}if(ie(l))fi(l,a,12,[o,c]);else{const g=Be(l),y=Me(l);if(g||y){const k=()=>{if(e.f){const b=g?h(l)?f[l]:c[l]:p()||!e.k?l.value:c[e.k];if(s)ee(b)&&Bl(b,i);else if(ee(b))b.includes(i)||b.push(i);else if(g)c[l]=[i],h(l)&&(f[l]=c[l]);else{const S=[i];p(l,e.k)&&(l.value=S),e.k&&(c[e.k]=S)}}else g?(c[l]=o,h(l)&&(f[l]=o)):y&&(p(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const b=()=>{k(),eo.delete(e)};b.id=-1,eo.set(e,b),st(b,n)}else Hc(e),k()}}}function Hc(e){const t=eo.get(e);t&&(t.flags|=8,eo.delete(e))}const Gc=e=>e.nodeType===8;Do().requestIdleCallback;Do().cancelIdleCallback;function Q_(e,t){if(Gc(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Gc(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Fs=e=>!!e.type.__asyncLoader;function mx(e){ie(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,f=0;const d=()=>(f++,u=null,h()),h=()=>{let p;return u||(p=u=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),l)return new Promise((y,k)=>{l(g,()=>y(d()),()=>k(g),f+1)});throw g}).then(g=>p!==u&&u?u:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),c=g,g)))};return Ql({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(p,g,y){let k=!1;(g.bu||(g.bu=[])).push(()=>k=!0);const b=()=>{k||y()},S=i?()=>{const E=i(b,m=>Q_(p,m));E&&(g.bum||(g.bum=[])).push(E)}:b;c?S():h().then(()=>!g.isUnmounted&&S())},get __asyncResolved(){return c},setup(){const p=lt;if(ec(p),c)return()=>Ti(c,p);const g=S=>{u=null,rs(S,p,13,!r)};if(a&&p.suspense||Hr)return h().then(S=>()=>Ti(S,p)).catch(S=>(g(S),()=>r?Ie(r,{error:S}):null));const y=Nt(!1),k=Nt(),b=Nt(!!s);return s&&setTimeout(()=>{b.value=!1},s),o!=null&&setTimeout(()=>{if(!y.value&&!k.value){const S=new Error(`Async component timed out after ${o}ms.`);g(S),k.value=S}},o),h().then(()=>{y.value=!0,p.parent&&di(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),k.value=S}),()=>{if(y.value&&c)return Ti(c,p);if(k.value&&r)return Ie(r,{error:k.value});if(n&&!b.value)return Ti(n,p)}}})}function Ti(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=Ie(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const di=e=>e.type.__isKeepAlive;function ev(e,t){ph(e,"a",t)}function tv(e,t){ph(e,"da",t)}function ph(e,t,n=lt){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(zo(t,r,n),n){let s=n.parent;for(;s&&s.parent;)di(s.parent.vnode)&&nv(r,t,n,s),s=s.parent}}function nv(e,t,n,r){const s=zo(t,e,r,!0);tr(()=>{Bl(r[t],s)},n)}function zo(e,t,n=lt,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Pn();const a=gi(n),l=Wt(t,n,e,o);return a(),Rn(),l});return r?s.unshift(i):s.push(i),i}}const Nn=e=>(t,n=lt)=>{(!Hr||e==="sp")&&zo(e,(...r)=>t(...r),n)},rv=Nn("bm"),ss=Nn("m"),sv=Nn("bu"),gh=Nn("u"),_h=Nn("bum"),tr=Nn("um"),iv=Nn("sp"),ov=Nn("rtg"),av=Nn("rtc");function lv(e,t=lt){zo("ec",e,t)}const cv="components";function Wc(e,t){return fv(cv,e,!0,t)||e}const uv=Symbol.for("v-ndc");function fv(e,t,n=!0,r=!1){const s=Pt||lt;if(s){const i=s.type;{const a=nm(i,!1);if(a&&(a===t||a===jt(t)||a===No(jt(t))))return i}const o=qc(s[e]||i[e],t)||qc(s.appContext[e],t);return!o&&r?i:o}}function qc(e,t){return e&&(e[t]||e[jt(t)]||e[No(jt(t))])}function dv(e,t,n,r){let s;const i=n,o=ee(e);if(o||Be(e)){const a=o&&An(e);let l=!1,u=!1;a&&(l=!Ct(e),u=In(e),e=Mo(e)),s=new Array(e.length);for(let c=0,f=e.length;c<f;c++)s[c]=t(l?u?Vr(Gt(e[c])):Gt(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(me(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}const Va=e=>e?Fh(e)?Bo(e):Va(e.parent):null,Ls=Je(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Va(e.parent),$root:e=>Va(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>mh(e),$forceUpdate:e=>e.f||(e.f=()=>{Yl(e.update)}),$nextTick:e=>e.n||(e.n=Lo.bind(e.proxy)),$watch:e=>K_.bind(e)}),oa=(e,t)=>e!==Oe&&!e.__isScriptSetup&&we(e,t),hv={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(oa(r,t))return o[t]=1,r[t];if(s!==Oe&&we(s,t))return o[t]=2,s[t];if(we(i,t))return o[t]=3,i[t];if(n!==Oe&&we(n,t))return o[t]=4,n[t];Za&&(o[t]=0)}}const u=Ls[t];let c,f;if(u)return t==="$attrs"&&dt(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==Oe&&we(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,we(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return oa(s,t)?(s[t]=n,!0):r!==Oe&&we(r,t)?(r[t]=n,!0):we(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:i,type:o}},a){let l;return!!(n[a]||e!==Oe&&a[0]!=="$"&&we(e,a)||oa(t,a)||we(i,a)||we(r,a)||we(Ls,a)||we(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:we(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Kc(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Za=!0;function pv(e){const t=mh(e),n=e.proxy,r=e.ctx;Za=!1,t.beforeCreate&&Jc(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:y,beforeDestroy:k,beforeUnmount:b,destroyed:S,unmounted:E,render:m,renderTracked:N,renderTriggered:M,errorCaptured:R,serverPrefetch:I,expose:F,inheritAttrs:J,components:D,directives:re,filters:ue}=t;if(u&&gv(u,r,null),o)for(const X in o){const le=o[X];ie(le)&&(r[X]=le.bind(n))}if(s){const X=s.call(n,n);me(X)&&(e.data=ui(X))}if(Za=!0,i)for(const X in i){const le=i[X],He=ie(le)?le.bind(n,n):ie(le.get)?le.get.bind(n,n):ln,nt=!ie(le)&&ie(le.set)?le.set.bind(n):ln,rt=Re({get:He,set:nt});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>rt.value,set:ye=>rt.value=ye})}if(a)for(const X in a)vh(a[X],r,n,X);if(l){const X=ie(l)?l.call(n):l;Reflect.ownKeys(X).forEach(le=>{zi(le,X[le])})}c&&Jc(c,e,"c");function ce(X,le){ee(le)?le.forEach(He=>X(He.bind(n))):le&&X(le.bind(n))}if(ce(rv,f),ce(ss,d),ce(sv,h),ce(gh,p),ce(ev,g),ce(tv,y),ce(lv,R),ce(av,N),ce(ov,M),ce(_h,b),ce(tr,E),ce(iv,I),ee(F))if(F.length){const X=e.exposed||(e.exposed={});F.forEach(le=>{Object.defineProperty(X,le,{get:()=>n[le],set:He=>n[le]=He,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===ln&&(e.render=m),J!=null&&(e.inheritAttrs=J),D&&(e.components=D),re&&(e.directives=re),I&&ec(e)}function gv(e,t,n=ln){ee(e)&&(e=Ha(e));for(const r in e){const s=e[r];let i;me(s)?"default"in s?i=$t(s.from||r,s.default,!0):i=$t(s.from||r):i=$t(s),Me(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Jc(e,t,n){Wt(ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function vh(e,t,n,r){let s=r.includes(".")?sh(n,r):()=>n[r];if(Be(e)){const i=t[e];ie(i)&&Mr(s,i)}else if(ie(e))Mr(s,e.bind(n));else if(me(e))if(ee(e))e.forEach(i=>vh(i,t,n,r));else{const i=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(i)&&Mr(s,i,e)}}function mh(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>to(l,u,o,!0)),to(l,t,o)),me(t)&&i.set(t,l),l}function to(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&to(e,i,n,!0),s&&s.forEach(o=>to(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=_v[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const _v={data:Yc,props:Xc,emits:Xc,methods:ws,computed:ws,beforeCreate:pt,created:pt,beforeMount:pt,mounted:pt,beforeUpdate:pt,updated:pt,beforeDestroy:pt,beforeUnmount:pt,destroyed:pt,unmounted:pt,activated:pt,deactivated:pt,errorCaptured:pt,serverPrefetch:pt,components:ws,directives:ws,watch:mv,provide:Yc,inject:vv};function Yc(e,t){return t?e?function(){return Je(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function vv(e,t){return ws(Ha(e),Ha(t))}function Ha(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pt(e,t){return e?[...new Set([].concat(e,t))]:t}function ws(e,t){return e?Je(Object.create(null),e,t):t}function Xc(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:Je(Object.create(null),Kc(e),Kc(t??{})):t}function mv(e,t){if(!e)return t;if(!t)return e;const n=Je(Object.create(null),e);for(const r in t)n[r]=pt(e[r],t[r]);return n}function yh(){return{app:null,config:{isNativeTag:wd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let yv=0;function bv(e,t){return function(r,s=null){ie(r)||(r=Je({},r)),s!=null&&!me(s)&&(s=null);const i=yh(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:yv++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:sm,get config(){return i.config},set config(c){},use(c,...f){return o.has(c)||(c&&ie(c.install)?(o.add(c),c.install(u,...f)):ie(c)&&(o.add(c),c(u,...f))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,f){return f?(i.components[c]=f,u):i.components[c]},directive(c,f){return f?(i.directives[c]=f,u):i.directives[c]},mount(c,f,d){if(!l){const h=u._ceVNode||Ie(r,s);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,c,d),l=!0,u._container=c,c.__vue_app__=u,Bo(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Wt(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return i.provides[c]=f,u},runWithContext(c){const f=hr;hr=u;try{return c()}finally{hr=f}}};return u}}let hr=null;const wv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${jt(t)}Modifiers`]||e[`${er(t)}Modifiers`];function Ev(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Oe;let s=n;const i=t.startsWith("update:"),o=i&&wv(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>Be(c)?c.trim():c)),o.number&&(s=n.map($o)));let a,l=r[a=ea(t)]||r[a=ea(jt(t))];!l&&i&&(l=r[a=ea(er(t))]),l&&Wt(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Wt(u,e,6,s)}}const Sv=new WeakMap;function bh(e,t,n=!1){const r=n?Sv:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!ie(e)){const l=u=>{const c=bh(u,t,!0);c&&(a=!0,Je(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(me(e)&&r.set(e,null),null):(ee(i)?i.forEach(l=>o[l]=null):Je(o,i),me(e)&&r.set(e,o),o)}function Uo(e,t){return!e||!Ro(t)?!1:(t=t.slice(2).replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,er(t))||we(e,t))}function Qc(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e,y=Qi(e);let k,b;try{if(n.shapeFlag&4){const E=s||r,m=E;k=Zt(u.call(m,E,c,f,h,d,p)),b=a}else{const E=t;k=Zt(E.length>1?E(f,{attrs:a,slots:o,emit:l}):E(f,null)),b=t.props?a:kv(a)}}catch(E){zs.length=0,rs(E,e,1),k=Ie(at)}let S=k;if(b&&g!==!1){const E=Object.keys(b),{shapeFlag:m}=S;E.length&&m&7&&(i&&E.some(jl)&&(b=Ov(b,i)),S=Jn(S,b,!1,!0))}return n.dirs&&(S=Jn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&gr(S,n.transition),k=S,Qi(y),k}function Tv(e,t=!0){let n;for(let r=0;r<e.length;r++){const s=e[r];if(Qs(s)){if(s.type!==at||s.children==="v-if"){if(n)return;n=s}}else return}return n}const kv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ro(n))&&((t||(t={}))[n]=e[n]);return t},Ov=(e,t)=>{const n={};for(const r in e)(!jl(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Av(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?eu(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(wh(o,r,d)&&!Uo(u,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?eu(r,o,u):!0:!!o;return!1}function eu(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(wh(t,e,i)&&!Uo(n,i))return!0}return!1}function wh(e,t,n){const r=e[n],s=t[n];return n==="style"&&me(r)&&me(s)?!Kn(r,s):r!==s}function tc({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Eh={},Sh=()=>Object.create(Eh),Th=e=>Object.getPrototypeOf(e)===Eh;function xv(e,t,n,r=!1){const s={},i=Sh();e.propsDefaults=Object.create(null),kh(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Wd(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Pv(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=_e(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(Uo(e.emitsOptions,d))continue;const h=t[d];if(l)if(we(i,d))h!==i[d]&&(i[d]=h,u=!0);else{const p=jt(d);s[p]=Ga(l,a,p,h,e,!1)}else h!==i[d]&&(i[d]=h,u=!0)}}}else{kh(e,t,s,i)&&(u=!0);let c;for(const f in a)(!t||!we(t,f)&&((c=er(f))===f||!we(t,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(s[f]=Ga(l,a,f,void 0,e,!0)):delete s[f]);if(i!==a)for(const f in i)(!t||!we(t,f))&&(delete i[f],u=!0)}u&&mn(e.attrs,"set","")}function kh(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Cs(l))continue;const u=t[l];let c;s&&we(s,c=jt(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:Uo(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=_e(n),u=a||Oe;for(let c=0;c<i.length;c++){const f=i[c];n[f]=Ga(s,l,f,u[f],e,!we(u,f))}}return o}function Ga(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=we(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&ie(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=gi(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===er(n))&&(r=!0))}return r}const Rv=new WeakMap;function Oh(e,t,n=!1){const r=n?Rv:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!ie(e)){const c=f=>{l=!0;const[d,h]=Oh(f,t,!0);Je(o,d),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return me(e)&&r.set(e,Nr),Nr;if(ee(i))for(let c=0;c<i.length;c++){const f=jt(i[c]);tu(f)&&(o[f]=Oe)}else if(i)for(const c in i){const f=jt(c);if(tu(f)){const d=i[c],h=o[f]=ee(d)||ie(d)?{type:d}:Je({},d),p=h.type;let g=!1,y=!0;if(ee(p))for(let k=0;k<p.length;++k){const b=p[k],S=ie(b)&&b.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(y=!1)}else g=ie(p)&&p.name==="Boolean";h[0]=g,h[1]=y,(g||we(h,"default"))&&a.push(f)}}const u=[o,a];return me(e)&&r.set(e,u),u}function tu(e){return e[0]!=="$"&&!Cs(e)}const nc=e=>e==="_"||e==="_ctx"||e==="$stable",rc=e=>ee(e)?e.map(Zt):[Zt(e)],Iv=(e,t,n)=>{if(t._n)return t;const r=Js((...s)=>rc(t(...s)),n);return r._c=!1,r},Ah=(e,t,n)=>{const r=e._ctx;for(const s in e){if(nc(s))continue;const i=e[s];if(ie(i))t[s]=Iv(s,i,r);else if(i!=null){const o=rc(i);t[s]=()=>o}}},xh=(e,t)=>{const n=rc(t);e.slots.default=()=>n},Ph=(e,t,n)=>{for(const r in t)(n||!nc(r))&&(e[r]=t[r])},Cv=(e,t,n)=>{const r=e.slots=Sh();if(e.vnode.shapeFlag&32){const s=t._;s?(Ph(r,t,n),n&&kd(r,"_",s,!0)):Ah(t,r)}else t&&xh(e,t)},Nv=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Oe;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:Ph(s,t,n):(i=!t.$stable,Ah(t,s)),o=t}else t&&(xh(e,t),o={default:1});if(i)for(const a in s)!nc(a)&&o[a]==null&&delete s[a]},st=Vv;function $v(e){return Dv(e)}function Dv(e,t){const n=Do();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=ln,insertStaticContent:p}=e,g=(_,v,w,A=null,C=null,x=null,H=void 0,z=null,L=!!v.dynamicChildren)=>{if(_===v)return;_&&!sn(_,v)&&(A=P(_),ye(_,C,x,!0),_=null),v.patchFlag===-2&&(L=!1,v.dynamicChildren=null);const{type:$,ref:se,shapeFlag:W}=v;switch($){case jo:y(_,v,w,A);break;case at:k(_,v,w,A);break;case ji:_==null&&b(v,w,A,H);break;case ht:D(_,v,w,A,C,x,H,z,L);break;default:W&1?m(_,v,w,A,C,x,H,z,L):W&6?re(_,v,w,A,C,x,H,z,L):(W&64||W&128)&&$.process(_,v,w,A,C,x,H,z,L,K)}se!=null&&C?Ms(se,_&&_.ref,x,v||_,!v):se==null&&_&&_.ref!=null&&Ms(_.ref,null,x,_,!0)},y=(_,v,w,A)=>{if(_==null)r(v.el=a(v.children),w,A);else{const C=v.el=_.el;v.children!==_.children&&u(C,v.children)}},k=(_,v,w,A)=>{_==null?r(v.el=l(v.children||""),w,A):v.el=_.el},b=(_,v,w,A)=>{[_.el,_.anchor]=p(_.children,v,w,A,_.el,_.anchor)},S=({el:_,anchor:v},w,A)=>{let C;for(;_&&_!==v;)C=d(_),r(_,w,A),_=C;r(v,w,A)},E=({el:_,anchor:v})=>{let w;for(;_&&_!==v;)w=d(_),s(_),_=w;s(v)},m=(_,v,w,A,C,x,H,z,L)=>{if(v.type==="svg"?H="svg":v.type==="math"&&(H="mathml"),_==null)N(v,w,A,C,x,H,z,L);else{const $=_.el&&_.el._isVueCE?_.el:null;try{$&&$._beginPatch(),I(_,v,C,x,H,z,L)}finally{$&&$._endPatch()}}},N=(_,v,w,A,C,x,H,z)=>{let L,$;const{props:se,shapeFlag:W,transition:ne,dirs:oe}=_;if(L=_.el=o(_.type,x,se&&se.is,se),W&8?c(L,_.children):W&16&&R(_.children,L,null,A,C,aa(_,x),H,z),oe&&sr(_,null,A,"created"),M(L,_,_.scopeId,H,A),se){for(const Ae in se)Ae!=="value"&&!Cs(Ae)&&i(L,Ae,null,se[Ae],x,A);"value"in se&&i(L,"value",null,se.value,x),($=se.onVnodeBeforeMount)&&Qt($,A,_)}oe&&sr(_,null,A,"beforeMount");const ge=Mv(C,ne);ge&&ne.beforeEnter(L),r(L,v,w),(($=se&&se.onVnodeMounted)||ge||oe)&&st(()=>{$&&Qt($,A,_),ge&&ne.enter(L),oe&&sr(_,null,A,"mounted")},C)},M=(_,v,w,A,C)=>{if(w&&h(_,w),A)for(let x=0;x<A.length;x++)h(_,A[x]);if(C){let x=C.subTree;if(v===x||Ch(x.type)&&(x.ssContent===v||x.ssFallback===v)){const H=C.vnode;M(_,H,H.scopeId,H.slotScopeIds,C.parent)}}},R=(_,v,w,A,C,x,H,z,L=0)=>{for(let $=L;$<_.length;$++){const se=_[$]=z?vn(_[$]):Zt(_[$]);g(null,se,v,w,A,C,x,H,z)}},I=(_,v,w,A,C,x,H)=>{const z=v.el=_.el;let{patchFlag:L,dynamicChildren:$,dirs:se}=v;L|=_.patchFlag&16;const W=_.props||Oe,ne=v.props||Oe;let oe;if(w&&ir(w,!1),(oe=ne.onVnodeBeforeUpdate)&&Qt(oe,w,v,_),se&&sr(v,_,w,"beforeUpdate"),w&&ir(w,!0),(W.innerHTML&&ne.innerHTML==null||W.textContent&&ne.textContent==null)&&c(z,""),$?F(_.dynamicChildren,$,z,w,A,aa(v,C),x):H||le(_,v,z,null,w,A,aa(v,C),x,!1),L>0){if(L&16)J(z,W,ne,w,C);else if(L&2&&W.class!==ne.class&&i(z,"class",null,ne.class,C),L&4&&i(z,"style",W.style,ne.style,C),L&8){const ge=v.dynamicProps;for(let Ae=0;Ae<ge.length;Ae++){const Se=ge[Ae],bt=W[Se],wt=ne[Se];(wt!==bt||Se==="value")&&i(z,Se,bt,wt,C,w)}}L&1&&_.children!==v.children&&c(z,v.children)}else!H&&$==null&&J(z,W,ne,w,C);((oe=ne.onVnodeUpdated)||se)&&st(()=>{oe&&Qt(oe,w,v,_),se&&sr(v,_,w,"updated")},A)},F=(_,v,w,A,C,x,H)=>{for(let z=0;z<v.length;z++){const L=_[z],$=v[z],se=L.el&&(L.type===ht||!sn(L,$)||L.shapeFlag&198)?f(L.el):w;g(L,$,se,null,A,C,x,H,!0)}},J=(_,v,w,A,C)=>{if(v!==w){if(v!==Oe)for(const x in v)!Cs(x)&&!(x in w)&&i(_,x,v[x],null,C,A);for(const x in w){if(Cs(x))continue;const H=w[x],z=v[x];H!==z&&x!=="value"&&i(_,x,z,H,C,A)}"value"in w&&i(_,"value",v.value,w.value,C)}},D=(_,v,w,A,C,x,H,z,L)=>{const $=v.el=_?_.el:a(""),se=v.anchor=_?_.anchor:a("");let{patchFlag:W,dynamicChildren:ne,slotScopeIds:oe}=v;oe&&(z=z?z.concat(oe):oe),_==null?(r($,w,A),r(se,w,A),R(v.children||[],w,se,C,x,H,z,L)):W>0&&W&64&&ne&&_.dynamicChildren&&_.dynamicChildren.length===ne.length?(F(_.dynamicChildren,ne,w,C,x,H,z),(v.key!=null||C&&v===C.subTree)&&sc(_,v,!0)):le(_,v,w,se,C,x,H,z,L)},re=(_,v,w,A,C,x,H,z,L)=>{v.slotScopeIds=z,_==null?v.shapeFlag&512?C.ctx.activate(v,w,A,H,L):ue(v,w,A,C,x,H,L):Ee(_,v,L)},ue=(_,v,w,A,C,x,H)=>{const z=_.component=Yv(_,A,C);if(di(_)&&(z.ctx.renderer=K),Xv(z,!1,H),z.asyncDep){if(C&&C.registerDep(z,ce,H),!_.el){const L=z.subTree=Ie(at);k(null,L,v,w),_.placeholder=L.el}}else ce(z,_,v,w,C,x,H)},Ee=(_,v,w)=>{const A=v.component=_.component;if(Av(_,v,w))if(A.asyncDep&&!A.asyncResolved){X(A,v,w);return}else A.next=v,A.update();else v.el=_.el,A.vnode=v},ce=(_,v,w,A,C,x,H)=>{const z=()=>{if(_.isMounted){let{next:W,bu:ne,u:oe,parent:ge,vnode:Ae}=_;{const Yt=Rh(_);if(Yt){W&&(W.el=Ae.el,X(_,W,H)),Yt.asyncDep.then(()=>{st(()=>{_.isUnmounted||$()},C)});return}}let Se=W,bt;ir(_,!1),W?(W.el=Ae.el,X(_,W,H)):W=Ae,ne&&Li(ne),(bt=W.props&&W.props.onVnodeBeforeUpdate)&&Qt(bt,ge,W,Ae),ir(_,!0);const wt=Qc(_),Jt=_.subTree;_.subTree=wt,g(Jt,wt,f(Jt.el),P(Jt),_,C,x),W.el=wt.el,Se===null&&tc(_,wt.el),oe&&st(oe,C),(bt=W.props&&W.props.onVnodeUpdated)&&st(()=>Qt(bt,ge,W,Ae),C)}else{let W;const{el:ne,props:oe}=v,{bm:ge,m:Ae,parent:Se,root:bt,type:wt}=_,Jt=Fs(v);ir(_,!1),ge&&Li(ge),!Jt&&(W=oe&&oe.onVnodeBeforeMount)&&Qt(W,Se,v),ir(_,!0);{bt.ce&&bt.ce._hasShadowRoot()&&bt.ce._injectChildStyle(wt);const Yt=_.subTree=Qc(_);g(null,Yt,w,A,_,C,x),v.el=Yt.el}if(Ae&&st(Ae,C),!Jt&&(W=oe&&oe.onVnodeMounted)){const Yt=v;st(()=>Qt(W,Se,Yt),C)}(v.shapeFlag&256||Se&&Fs(Se.vnode)&&Se.vnode.shapeFlag&256)&&_.a&&st(_.a,C),_.isMounted=!0,v=w=A=null}};_.scope.on();const L=_.effect=new Nd(z);_.scope.off();const $=_.update=L.run.bind(L),se=_.job=L.runIfDirty.bind(L);se.i=_,se.id=_.uid,L.scheduler=()=>Yl(se),ir(_,!0),$()},X=(_,v,w)=>{v.component=_;const A=_.vnode.props;_.vnode=v,_.next=null,Pv(_,v.props,A,w),Nv(_,v.children,w),Pn(),zc(_),Rn()},le=(_,v,w,A,C,x,H,z,L=!1)=>{const $=_&&_.children,se=_?_.shapeFlag:0,W=v.children,{patchFlag:ne,shapeFlag:oe}=v;if(ne>0){if(ne&128){nt($,W,w,A,C,x,H,z,L);return}else if(ne&256){He($,W,w,A,C,x,H,z,L);return}}oe&8?(se&16&&Ve($,C,x),W!==$&&c(w,W)):se&16?oe&16?nt($,W,w,A,C,x,H,z,L):Ve($,C,x,!0):(se&8&&c(w,""),oe&16&&R(W,w,A,C,x,H,z,L))},He=(_,v,w,A,C,x,H,z,L)=>{_=_||Nr,v=v||Nr;const $=_.length,se=v.length,W=Math.min($,se);let ne;for(ne=0;ne<W;ne++){const oe=v[ne]=L?vn(v[ne]):Zt(v[ne]);g(_[ne],oe,w,null,C,x,H,z,L)}$>se?Ve(_,C,x,!0,!1,W):R(v,w,A,C,x,H,z,L,W)},nt=(_,v,w,A,C,x,H,z,L)=>{let $=0;const se=v.length;let W=_.length-1,ne=se-1;for(;$<=W&&$<=ne;){const oe=_[$],ge=v[$]=L?vn(v[$]):Zt(v[$]);if(sn(oe,ge))g(oe,ge,w,null,C,x,H,z,L);else break;$++}for(;$<=W&&$<=ne;){const oe=_[W],ge=v[ne]=L?vn(v[ne]):Zt(v[ne]);if(sn(oe,ge))g(oe,ge,w,null,C,x,H,z,L);else break;W--,ne--}if($>W){if($<=ne){const oe=ne+1,ge=oe<se?v[oe].el:A;for(;$<=ne;)g(null,v[$]=L?vn(v[$]):Zt(v[$]),w,ge,C,x,H,z,L),$++}}else if($>ne)for(;$<=W;)ye(_[$],C,x,!0),$++;else{const oe=$,ge=$,Ae=new Map;for($=ge;$<=ne;$++){const xt=v[$]=L?vn(v[$]):Zt(v[$]);xt.key!=null&&Ae.set(xt.key,$)}let Se,bt=0;const wt=ne-ge+1;let Jt=!1,Yt=0;const os=new Array(wt);for($=0;$<wt;$++)os[$]=0;for($=oe;$<=W;$++){const xt=_[$];if(bt>=wt){ye(xt,C,x,!0);continue}let Xt;if(xt.key!=null)Xt=Ae.get(xt.key);else for(Se=ge;Se<=ne;Se++)if(os[Se-ge]===0&&sn(xt,v[Se])){Xt=Se;break}Xt===void 0?ye(xt,C,x,!0):(os[Xt-ge]=$+1,Xt>=Yt?Yt=Xt:Jt=!0,g(xt,v[Xt],w,null,C,x,H,z,L),bt++)}const Cc=Jt?Fv(os):Nr;for(Se=Cc.length-1,$=wt-1;$>=0;$--){const xt=ge+$,Xt=v[xt],Nc=v[xt+1],$c=xt+1<se?Nc.el||Ih(Nc):A;os[$]===0?g(null,Xt,w,$c,C,x,H,z,L):Jt&&(Se<0||$!==Cc[Se]?rt(Xt,w,$c,2):Se--)}}},rt=(_,v,w,A,C=null)=>{const{el:x,type:H,transition:z,children:L,shapeFlag:$}=_;if($&6){rt(_.component.subTree,v,w,A);return}if($&128){_.suspense.move(v,w,A);return}if($&64){H.move(_,v,w,K);return}if(H===ht){r(x,v,w);for(let W=0;W<L.length;W++)rt(L[W],v,w,A);r(_.anchor,v,w);return}if(H===ji){S(_,v,w);return}if(A!==2&&$&1&&z)if(A===0)z.beforeEnter(x),r(x,v,w),st(()=>z.enter(x),C);else{const{leave:W,delayLeave:ne,afterLeave:oe}=z,ge=()=>{_.ctx.isUnmounted?s(x):r(x,v,w)},Ae=()=>{x._isLeaving&&x[nn](!0),W(x,()=>{ge(),oe&&oe()})};ne?ne(x,ge,Ae):Ae()}else r(x,v,w)},ye=(_,v,w,A=!1,C=!1)=>{const{type:x,props:H,ref:z,children:L,dynamicChildren:$,shapeFlag:se,patchFlag:W,dirs:ne,cacheIndex:oe}=_;if(W===-2&&(C=!1),z!=null&&(Pn(),Ms(z,null,w,_,!0),Rn()),oe!=null&&(v.renderCache[oe]=void 0),se&256){v.ctx.deactivate(_);return}const ge=se&1&&ne,Ae=!Fs(_);let Se;if(Ae&&(Se=H&&H.onVnodeBeforeUnmount)&&Qt(Se,v,_),se&6)yt(_.component,w,A);else{if(se&128){_.suspense.unmount(w,A);return}ge&&sr(_,null,v,"beforeUnmount"),se&64?_.type.remove(_,v,w,K,A):$&&!$.hasOnce&&(x!==ht||W>0&&W&64)?Ve($,v,w,!1,!0):(x===ht&&W&384||!C&&se&16)&&Ve(L,v,w),A&&Ye(_)}(Ae&&(Se=H&&H.onVnodeUnmounted)||ge)&&st(()=>{Se&&Qt(Se,v,_),ge&&sr(_,null,v,"unmounted")},w)},Ye=_=>{const{type:v,el:w,anchor:A,transition:C}=_;if(v===ht){Ge(w,A);return}if(v===ji){E(_);return}const x=()=>{s(w),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(_.shapeFlag&1&&C&&!C.persisted){const{leave:H,delayLeave:z}=C,L=()=>H(w,x);z?z(_.el,x,L):L()}else x()},Ge=(_,v)=>{let w;for(;_!==v;)w=d(_),s(_),_=w;s(v)},yt=(_,v,w)=>{const{bum:A,scope:C,job:x,subTree:H,um:z,m:L,a:$}=_;nu(L),nu($),A&&Li(A),C.stop(),x&&(x.flags|=8,ye(H,_,v,w)),z&&st(z,v),st(()=>{_.isUnmounted=!0},v)},Ve=(_,v,w,A=!1,C=!1,x=0)=>{for(let H=x;H<_.length;H++)ye(_[H],v,w,A,C)},P=_=>{if(_.shapeFlag&6)return P(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const v=d(_.anchor||_.el),w=v&&v[ih];return w?d(w):v};let q=!1;const Z=(_,v,w)=>{let A;_==null?v._vnode&&(ye(v._vnode,null,null,!0),A=v._vnode.component):g(v._vnode||null,_,v,null,null,null,w),v._vnode=_,q||(q=!0,zc(A),Qd(),q=!1)},K={p:g,um:ye,m:rt,r:Ye,mt:ue,mc:R,pc:le,pbc:F,n:P,o:e};return{render:Z,hydrate:void 0,createApp:bv(Z)}}function aa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ir({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sc(e,t,n=!1){const r=e.children,s=t.children;if(ee(r)&&ee(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=vn(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&sc(o,a)),a.type===jo&&(a.patchFlag===-1&&(a=s[i]=vn(a)),a.el=o.el),a.type===at&&!a.el&&(a.el=o.el)}}function Fv(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Rh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rh(t)}function nu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ih(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ih(t.subTree):null}const Ch=e=>e.__isSuspense;let Wa=0;const Lv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,i,o,a,l,u){if(e==null)zv(t,n,r,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Uv(e,t,n,r,s,o,a,l,u)}},hydrate:jv,normalize:Bv},yx=Lv;function Xs(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function zv(e,t,n,r,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,f=c("div"),d=e.suspense=Nh(e,s,r,t,f,n,i,o,a,l);u(null,d.pendingBranch=e.ssContent,f,null,r,d,i,o),d.deps>0?(Xs(e,"onPending"),Xs(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,i,o),Fr(d,e.ssFallback)):d.resolve(!1,!0)}function Uv(e,t,n,r,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const d=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:g,isInFallback:y,isHydrating:k}=f;if(g)f.pendingBranch=d,sn(g,d)?(l(g,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0?f.resolve():y&&(k||(l(p,h,n,r,s,null,i,o,a),Fr(f,h)))):(f.pendingId=Wa++,k?(f.isHydrating=!1,f.activeBranch=g):u(g,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),y?(l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0?f.resolve():(l(p,h,n,r,s,null,i,o,a),Fr(f,h))):p&&sn(p,d)?(l(p,d,n,r,s,f,i,o,a),f.resolve(!0)):(l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0&&f.resolve()));else if(p&&sn(p,d))l(p,d,n,r,s,f,i,o,a),Fr(f,d);else if(Xs(t,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=Wa++,l(null,d,f.hiddenContainer,null,s,f,i,o,a),f.deps<=0)f.resolve();else{const{timeout:b,pendingId:S}=f;b>0?setTimeout(()=>{f.pendingId===S&&f.fallback(h)},b):b===0&&f.fallback(h)}}function Nh(e,t,n,r,s,i,o,a,l,u,c=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:g,remove:y}}=u;let k;const b=Zv(e);b&&t&&t.pendingBranch&&(k=t.pendingId,t.deps++);const S=e.props?Od(e.props.timeout):void 0,E=i,m={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:s,deps:0,pendingId:Wa++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(N=!1,M=!1){const{vnode:R,activeBranch:I,pendingBranch:F,pendingId:J,effects:D,parentComponent:re,container:ue,isInFallback:Ee}=m;let ce=!1;m.isHydrating?m.isHydrating=!1:N||(ce=I&&F.transition&&F.transition.mode==="out-in",ce&&(I.transition.afterLeave=()=>{J===m.pendingId&&(d(F,ue,i===E?p(I):i,0),Ua(D),Ee&&R.ssFallback&&(R.ssFallback.el=null))}),I&&(g(I.el)===ue&&(i=p(I)),h(I,re,m,!0),!ce&&Ee&&R.ssFallback&&st(()=>R.ssFallback.el=null,m)),ce||d(F,ue,i,0)),Fr(m,F),m.pendingBranch=null,m.isInFallback=!1;let X=m.parent,le=!1;for(;X;){if(X.pendingBranch){X.effects.push(...D),le=!0;break}X=X.parent}!le&&!ce&&Ua(D),m.effects=[],b&&t&&t.pendingBranch&&k===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),Xs(R,"onResolve")},fallback(N){if(!m.pendingBranch)return;const{vnode:M,activeBranch:R,parentComponent:I,container:F,namespace:J}=m;Xs(M,"onFallback");const D=p(R),re=()=>{m.isInFallback&&(f(null,N,F,D,I,null,J,a,l),Fr(m,N))},ue=N.transition&&N.transition.mode==="out-in";ue&&(R.transition.afterLeave=re),m.isInFallback=!0,h(R,I,null,!0),ue||re()},move(N,M,R){m.activeBranch&&d(m.activeBranch,N,M,R),m.container=N},next(){return m.activeBranch&&p(m.activeBranch)},registerDep(N,M,R){const I=!!m.pendingBranch;I&&m.deps++;const F=N.vnode.el;N.asyncDep.catch(J=>{rs(J,N,0)}).then(J=>{if(N.isUnmounted||m.isUnmounted||m.pendingId!==N.suspenseId)return;N.asyncResolved=!0;const{vnode:D}=N;Ka(N,J),F&&(D.el=F);const re=!F&&N.subTree.el;M(N,D,g(F||N.subTree.el),F?null:p(N.subTree),m,o,R),re&&(D.placeholder=null,y(re)),tc(N,D.el),I&&--m.deps===0&&m.resolve()})},unmount(N,M){m.isUnmounted=!0,m.activeBranch&&h(m.activeBranch,n,N,M),m.pendingBranch&&h(m.pendingBranch,n,N,M)}};return m}function jv(e,t,n,r,s,i,o,a,l){const u=t.suspense=Nh(t,r,n,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function Bv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=ru(r?n.default:n),e.ssFallback=r?ru(n.fallback):Ie(at)}function ru(e){let t;if(ie(e)){const n=Zr&&e._c;n&&(e._d=!1,Ne()),e=e(),n&&(e._d=!0,t=kt,$h())}return ee(e)&&(e=Tv(e)),e=Zt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Vv(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Ua(e)}function Fr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,tc(r,s))}function Zv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const ht=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),ji=Symbol.for("v-stc"),zs=[];let kt=null;function Ne(e=!1){zs.push(kt=e?null:[])}function $h(){zs.pop(),kt=zs[zs.length-1]||null}let Zr=1;function no(e,t=!1){Zr+=e,e<0&&kt&&t&&(kt.hasOnce=!0)}function Dh(e){return e.dynamicChildren=Zr>0?kt||Nr:null,$h(),Zr>0&&kt&&kt.push(e),e}function tt(e,t,n,r,s,i){return Dh(G(e,t,n,r,s,i,!0))}function hi(e,t,n,r,s){return Dh(Ie(e,t,n,r,s,!0))}function Qs(e){return e?e.__v_isVNode===!0:!1}function sn(e,t){return e.type===t.type&&e.key===t.key}const Mh=({key:e})=>e??null,Bi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||Me(e)||ie(e)?{i:Pt,r:e,k:t,f:!!n}:e:null);function G(e,t=null,n=null,r=0,s=null,i=e===ht?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mh(t),ref:t&&Bi(t),scopeId:th,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Pt};return a?(ic(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Be(n)?8:16),Zr>0&&!o&&kt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&kt.push(l),l}const Ie=Hv;function Hv(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===uv)&&(e=at),Qs(e)){const a=Jn(e,t,!0);return n&&ic(a,n),Zr>0&&!i&&kt&&(a.shapeFlag&6?kt[kt.indexOf(e)]=a:kt.push(a)),a.patchFlag=-2,a}if(rm(e)&&(e=e.__vccOpts),t){t=Gv(t);let{class:a,style:l}=t;a&&!Be(a)&&(t.class=pr(a)),me(l)&&(Fo(l)&&!ee(l)&&(l=Je({},l)),t.style=On(l))}const o=Be(e)?1:Ch(e)?128:oh(e)?64:me(e)?4:ie(e)?2:0;return G(e,t,n,r,s,o,i,!0)}function Gv(e){return e?Fo(e)||Th(e)?Je({},e):e:null}function Jn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?qv(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mh(u),ref:t&&t.ref?n&&i?ee(i)?i.concat(Bi(t)):[i,Bi(t)]:Bi(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ht?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Jn(e.ssContent),ssFallback:e.ssFallback&&Jn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&gr(c,l.clone(c)),c}function Wv(e=" ",t=0){return Ie(jo,null,e,t)}function su(e,t){const n=Ie(ji,null,e);return n.staticCount=t,n}function Zn(e="",t=!1){return t?(Ne(),hi(at,null,e)):Ie(at,null,e)}function Zt(e){return e==null||typeof e=="boolean"?Ie(at):ee(e)?Ie(ht,null,e.slice()):Qs(e)?vn(e):Ie(jo,null,String(e))}function vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Jn(e)}function ic(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ic(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Th(t)?t._ctx=Pt:s===3&&Pt&&(Pt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Pt},n=32):(t=String(t),r&64?(n=16,t=[Wv(t)]):n=8);e.children=t,e.shapeFlag|=n}function qv(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=pr([t.class,r.class]));else if(s==="style")t.style=On([t.style,r.style]);else if(Ro(s)){const i=t[s],o=r[s];o&&i!==o&&!(ee(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Qt(e,t,n,r=null){Wt(e,t,7,[n,r])}const Kv=yh();let Jv=0;function Yv(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Kv,i={uid:Jv++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Rd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Oh(r,s),emitsOptions:bh(r,s),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:r.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Ev.bind(null,i),e.ce&&e.ce(i),i}let lt=null;const pi=()=>lt||Pt;let ro,qa;{const e=Do(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};ro=t("__VUE_INSTANCE_SETTERS__",n=>lt=n),qa=t("__VUE_SSR_SETTERS__",n=>Hr=n)}const gi=e=>{const t=lt;return ro(e),e.scope.on(),()=>{e.scope.off(),ro(t)}},iu=()=>{lt&<.scope.off(),ro(null)};function Fh(e){return e.vnode.shapeFlag&4}let Hr=!1;function Xv(e,t=!1,n=!1){t&&qa(t);const{props:r,children:s}=e.vnode,i=Fh(e);xv(e,r,i,t),Cv(e,s,n||t);const o=i?Qv(e,t):void 0;return t&&qa(!1),o}function Qv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,hv);const{setup:r}=n;if(r){Pn();const s=e.setupContext=r.length>1?tm(e):null,i=gi(e),o=fi(r,e,0,[e.props,s]),a=Ed(o);if(Rn(),i(),(a||e.sp)&&!Fs(e)&&ec(e),a){if(o.then(iu,iu),t)return o.then(l=>{Ka(e,l)}).catch(l=>{rs(l,e,0)});e.asyncDep=o}else Ka(e,o)}else Lh(e)}function Ka(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=Kd(t)),Lh(e)}function Lh(e,t,n){const r=e.type;e.render||(e.render=r.render||ln);{const s=gi(e);Pn();try{pv(e)}finally{Rn(),s()}}}const em={get(e,t){return dt(e,"get",""),e[t]}};function tm(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,em),slots:e.slots,emit:e.emit,expose:t}}function Bo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Kd(Jl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ls)return Ls[n](e)},has(t,n){return n in t||n in Ls}})):e.proxy}function nm(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function rm(e){return ie(e)&&"__vccOpts"in e}const Re=(e,t)=>B_(e,t,Hr);function oc(e,t,n){try{no(-1);const r=arguments.length;return r===2?me(t)&&!ee(t)?Qs(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Qs(n)&&(n=[n]),Ie(e,t,n))}finally{no(1)}}const sm="3.5.29";/**
|
|
15
15
|
* @vue/runtime-dom v3.5.29
|
|
16
16
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
17
17
|
* @license MIT
|
|
18
|
-
**/let Ja;const su=typeof window<"u"&&window.trustedTypes;if(su)try{Ja=su.createPolicy("vue",{createHTML:e=>e})}catch{}const Fh=Ja?e=>Ja.createHTML(e):e=>e,tm="http://www.w3.org/2000/svg",nm="http://www.w3.org/1998/Math/MathML",hn=typeof document<"u"?document:null,iu=hn&&hn.createElement("template"),rm={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?hn.createElementNS(tm,e):t==="mathml"?hn.createElementNS(nm,e):n?hn.createElement(e,{is:n}):hn.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>hn.createTextNode(e),createComment:e=>hn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{iu.innerHTML=Fh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=iu.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$n="transition",cs="animation",Gr=Symbol("_vtc"),Lh={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},zh=Je({},lh,Lh),sm=e=>(e.displayName="Transition",e.props=zh,e),im=sm((e,{slots:t})=>ic(q_,Uh(e),t)),or=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},ou=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function Uh(e){const t={};for(const D in e)D in Lh||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=om(s),g=p&&p[0],y=p&&p[1],{onBeforeEnter:T,onEnter:b,onEnterCancelled:S,onLeave:E,onLeaveCancelled:m,onBeforeAppear:N=T,onAppear:M=b,onAppearCancelled:R=S}=t,I=(D,re,ue,Ee)=>{D._enterCancelled=Ee,Ln(D,re?c:a),Ln(D,re?u:o),ue&&ue()},F=(D,re)=>{D._isLeaving=!1,Ln(D,f),Ln(D,h),Ln(D,d),re&&re()},J=D=>(re,ue)=>{const Ee=D?M:b,ce=()=>I(re,D,ue);or(Ee,[re,ce]),au(()=>{Ln(re,D?l:i),en(re,D?c:a),ou(Ee)||lu(re,r,g,ce)})};return Je(t,{onBeforeEnter(D){or(T,[D]),en(D,i),en(D,o)},onBeforeAppear(D){or(N,[D]),en(D,l),en(D,u)},onEnter:J(!1),onAppear:J(!0),onLeave(D,re){D._isLeaving=!0;const ue=()=>F(D,re);en(D,f),D._enterCancelled?(en(D,d),Ya(D)):(Ya(D),en(D,d)),au(()=>{D._isLeaving&&(Ln(D,f),en(D,h),ou(E)||lu(D,r,y,ue))}),or(E,[D,ue])},onEnterCancelled(D){I(D,!1,void 0,!0),or(S,[D])},onAppearCancelled(D){I(D,!0,void 0,!0),or(R,[D])},onLeaveCancelled(D){F(D),or(m,[D])}})}function om(e){if(e==null)return null;if(me(e))return[la(e.enter),la(e.leave)];{const t=la(e);return[t,t]}}function la(e){return kd(e)}function en(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Gr]||(e[Gr]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Gr];n&&(n.delete(t),n.size||(e[Gr]=void 0))}function au(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let am=0;function lu(e,t,n,r){const s=e._endId=++am,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=jh(e,t);if(!o)return r();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),i()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},a+1),e.addEventListener(u,d)}function jh(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),s=r(`${$n}Delay`),i=r(`${$n}Duration`),o=cu(s,i),a=r(`${cs}Delay`),l=r(`${cs}Duration`),u=cu(a,l);let c=null,f=0,d=0;t===$n?o>0&&(c=$n,f=o,d=i.length):t===cs?u>0&&(c=cs,f=u,d=l.length):(f=Math.max(o,u),c=f>0?o>u?$n:cs:null,d=c?c===$n?i.length:l.length:0);const h=c===$n&&/\b(?:transform|all)(?:,|$)/.test(r(`${$n}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function cu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>uu(n)+uu(e[r])))}function uu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ya(e){return(e?e.ownerDocument:document).body.offsetHeight}function lm(e,t,n){const r=e[Gr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const so=Symbol("_vod"),Bh=Symbol("_vsh"),Zx={name:"show",beforeMount(e,{value:t},{transition:n}){e[so]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):us(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),us(e,!0),r.enter(e)):r.leave(e,()=>{us(e,!1)}):us(e,t))},beforeUnmount(e,{value:t}){us(e,t)}};function us(e,t){e.style.display=t?e[so]:"none",e[Bh]=!t}const cm=Symbol(""),um=/(?:^|;)\s*display\s*:/;function fm(e,t,n){const r=e.style,s=Be(n);let i=!1;if(n&&!s){if(t)if(Be(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Vi(r,a,"")}else for(const o in t)n[o]==null&&Vi(r,o,"");for(const o in n)o==="display"&&(i=!0),Vi(r,o,n[o])}else if(s){if(t!==n){const o=r[cm];o&&(n+=";"+o),r.cssText=n,i=um.test(n)}}else t&&e.removeAttribute("style");so in e&&(e[so]=i?r.display:"",e[Bh]&&(r.display="none"))}const fu=/\s*!important$/;function Vi(e,t,n){if(ee(n))n.forEach(r=>Vi(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=dm(e,t);fu.test(n)?e.setProperty(er(r),n.replace(fu,""),"important"):e[r]=n}}const du=["Webkit","Moz","ms"],ca={};function dm(e,t){const n=ca[t];if(n)return n;let r=jt(t);if(r!=="filter"&&r in e)return ca[t]=r;r=No(r);for(let s=0;s<du.length;s++){const i=du[s]+r;if(i in e)return ca[t]=i}return t}const hu="http://www.w3.org/1999/xlink";function pu(e,t,n,r,s,i=c_(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(hu,t.slice(6,t.length)):e.setAttributeNS(hu,t,n):n==null||i&&!Td(n)?e.removeAttribute(t):e.setAttribute(t,i?"":cn(n)?String(n):n)}function gu(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Fh(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Td(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function bn(e,t,n,r){e.addEventListener(t,n,r)}function hm(e,t,n,r){e.removeEventListener(t,n,r)}const _u=Symbol("_vei");function pm(e,t,n,r,s=null){const i=e[_u]||(e[_u]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=gm(t);if(r){const u=i[t]=mm(r,s);bn(e,a,u,l)}else o&&(hm(e,a,o,l),i[t]=void 0)}}const vu=/(?:Once|Passive|Capture)$/;function gm(e){let t;if(vu.test(e)){t={};let r;for(;r=e.match(vu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):er(e.slice(2)),t]}let ua=0;const _m=Promise.resolve(),vm=()=>ua||(_m.then(()=>ua=0),ua=Date.now());function mm(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Wt(ym(r,n.value),t,5,[r])};return n.value=e,n.attached=vm(),n}function ym(e,t){if(ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const mu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bm=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?lm(e,r,o):t==="style"?fm(e,n,r):Ro(t)?Ul(t)||pm(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):wm(e,t,r,o))?(gu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&pu(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Be(r))?gu(e,jt(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),pu(e,t,r,o))};function wm(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&mu(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return mu(t)&&Be(n)?!1:t in e}const Vh=new WeakMap,Zh=new WeakMap,io=Symbol("_moveCb"),yu=Symbol("_enterCb"),Em=e=>(delete e.props.mode,e),Sm=Em({name:"TransitionGroup",props:Je({},zh,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=hi(),r=ah();let s,i;return hh(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!Am(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(Tm),s.forEach(Om);const a=s.filter(xm);Ya(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;en(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[io]=d=>{d&&d.target!==u||(!d||d.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",f),u[io]=null,Ln(u,o))};u.addEventListener("transitionend",f)}),s=[]}),()=>{const o=_e(e),a=Uh(o);let l=o.tag||ht;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),gr(c,Js(c,a,r,n)),Vh.set(c,Hh(c.el)))}i=t.default?Yl(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&gr(c,Js(c,a,r,n))}return Ie(l,null,i)}}}),km=Sm;function Tm(e){const t=e.el;t[io]&&t[io](),t[yu]&&t[yu]()}function Om(e){Zh.set(e,Hh(e.el))}function xm(e){const t=Vh.get(e),n=Zh.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${r/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function Hh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Am(e,t,n){const r=e.cloneNode(),s=e[Gr];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=jh(r);return i.removeChild(r),o}const Yn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Li(t,n):t};function Cm(e){e.target.composing=!0}function bu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Lt=Symbol("_assign");function wu(e,t,n){return t&&(e=e.trim()),n&&(e=$o(e)),e}const Eu={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Lt]=Yn(s);const i=r||s.props&&s.props.type==="number";bn(e,t?"change":"input",o=>{o.target.composing||e[Lt](wu(e.value,n,i))}),(n||i)&&bn(e,"change",()=>{e.value=wu(e.value,n,i)}),t||(bn(e,"compositionstart",Cm),bn(e,"compositionend",bu),bn(e,"change",bu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Lt]=Yn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?$o(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},Rm={deep:!0,created(e,t,n){e[Lt]=Yn(n),bn(e,"change",()=>{const r=e._modelValue,s=Wr(e),i=e.checked,o=e[Lt];if(ee(r)){const a=Bl(r,s),l=a!==-1;if(i&&!l)o(r.concat(s));else if(!i&&l){const u=[...r];u.splice(a,1),o(u)}}else if(ns(r)){const a=new Set(r);i?a.add(s):a.delete(s),o(a)}else o(Gh(e,i))})},mounted:Su,beforeUpdate(e,t,n){e[Lt]=Yn(n),Su(e,t,n)}};function Su(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(ee(t))s=Bl(t,r.props.value)>-1;else if(ns(t))s=t.has(r.props.value);else{if(t===n)return;s=Kn(t,Gh(e,!0))}e.checked!==s&&(e.checked=s)}const Im={created(e,{value:t},n){e.checked=Kn(t,n.props.value),e[Lt]=Yn(n),bn(e,"change",()=>{e[Lt](Wr(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Lt]=Yn(r),t!==n&&(e.checked=Kn(t,r.props.value))}},Pm={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=ns(t);bn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?$o(Wr(o)):Wr(o));e[Lt](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Lo(()=>{e._assigning=!1})}),e[Lt]=Yn(r)},mounted(e,{value:t}){ku(e,t)},beforeUpdate(e,t,n){e[Lt]=Yn(n)},updated(e,{value:t}){e._assigning||ku(e,t)}};function ku(e,t){const n=e.multiple,r=ee(t);if(!(n&&!r&&!ns(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Wr(o);if(n)if(r){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Bl(t,a)>-1}else o.selected=t.has(a);else if(Kn(Wr(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Wr(e){return"_value"in e?e._value:e.value}function Gh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Hx={created(e,t,n){ki(e,t,n,null,"created")},mounted(e,t,n){ki(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ki(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ki(e,t,n,r,"updated")}};function Nm(e,t){switch(e){case"SELECT":return Pm;case"TEXTAREA":return Eu;default:switch(t){case"checkbox":return Rm;case"radio":return Im;default:return Eu}}}function ki(e,t,n,r,s){const o=Nm(e.tagName,n.props&&n.props.type)[s];o&&o(e,t,n,r)}const $m=["ctrl","shift","alt","meta"],Dm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>$m.some(n=>e[`${n}Key`]&&!t.includes(n))},Mm=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=Dm[t[o]];if(a&&a(s,t))return}return e(s,...i)})},Fm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Lm=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=er(s.key);if(t.some(o=>o===i||Fm[o]===i))return e(s)})},zm=Je({patchProp:bm},rm);let Tu;function Um(){return Tu||(Tu=Rv(zm))}const jm=(...e)=>{const t=Um().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Vm(r);if(!s)return;const i=t._component;!ie(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Bm(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Bm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vm(e){return Be(e)?document.querySelector(e):e}/*!
|
|
18
|
+
**/let Ja;const ou=typeof window<"u"&&window.trustedTypes;if(ou)try{Ja=ou.createPolicy("vue",{createHTML:e=>e})}catch{}const zh=Ja?e=>Ja.createHTML(e):e=>e,im="http://www.w3.org/2000/svg",om="http://www.w3.org/1998/Math/MathML",hn=typeof document<"u"?document:null,au=hn&&hn.createElement("template"),am={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?hn.createElementNS(im,e):t==="mathml"?hn.createElementNS(om,e):n?hn.createElement(e,{is:n}):hn.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>hn.createTextNode(e),createComment:e=>hn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{au.innerHTML=zh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=au.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$n="transition",cs="animation",Gr=Symbol("_vtc"),Uh={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},jh=Je({},uh,Uh),lm=e=>(e.displayName="Transition",e.props=jh,e),cm=lm((e,{slots:t})=>oc(X_,Bh(e),t)),or=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},lu=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function Bh(e){const t={};for(const D in e)D in Uh||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=um(s),g=p&&p[0],y=p&&p[1],{onBeforeEnter:k,onEnter:b,onEnterCancelled:S,onLeave:E,onLeaveCancelled:m,onBeforeAppear:N=k,onAppear:M=b,onAppearCancelled:R=S}=t,I=(D,re,ue,Ee)=>{D._enterCancelled=Ee,Ln(D,re?c:a),Ln(D,re?u:o),ue&&ue()},F=(D,re)=>{D._isLeaving=!1,Ln(D,f),Ln(D,h),Ln(D,d),re&&re()},J=D=>(re,ue)=>{const Ee=D?M:b,ce=()=>I(re,D,ue);or(Ee,[re,ce]),cu(()=>{Ln(re,D?l:i),en(re,D?c:a),lu(Ee)||uu(re,r,g,ce)})};return Je(t,{onBeforeEnter(D){or(k,[D]),en(D,i),en(D,o)},onBeforeAppear(D){or(N,[D]),en(D,l),en(D,u)},onEnter:J(!1),onAppear:J(!0),onLeave(D,re){D._isLeaving=!0;const ue=()=>F(D,re);en(D,f),D._enterCancelled?(en(D,d),Ya(D)):(Ya(D),en(D,d)),cu(()=>{D._isLeaving&&(Ln(D,f),en(D,h),lu(E)||uu(D,r,y,ue))}),or(E,[D,ue])},onEnterCancelled(D){I(D,!1,void 0,!0),or(S,[D])},onAppearCancelled(D){I(D,!0,void 0,!0),or(R,[D])},onLeaveCancelled(D){F(D),or(m,[D])}})}function um(e){if(e==null)return null;if(me(e))return[la(e.enter),la(e.leave)];{const t=la(e);return[t,t]}}function la(e){return Od(e)}function en(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Gr]||(e[Gr]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Gr];n&&(n.delete(t),n.size||(e[Gr]=void 0))}function cu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let fm=0;function uu(e,t,n,r){const s=e._endId=++fm,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Vh(e,t);if(!o)return r();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),i()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},a+1),e.addEventListener(u,d)}function Vh(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),s=r(`${$n}Delay`),i=r(`${$n}Duration`),o=fu(s,i),a=r(`${cs}Delay`),l=r(`${cs}Duration`),u=fu(a,l);let c=null,f=0,d=0;t===$n?o>0&&(c=$n,f=o,d=i.length):t===cs?u>0&&(c=cs,f=u,d=l.length):(f=Math.max(o,u),c=f>0?o>u?$n:cs:null,d=c?c===$n?i.length:l.length:0);const h=c===$n&&/\b(?:transform|all)(?:,|$)/.test(r(`${$n}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function fu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>du(n)+du(e[r])))}function du(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ya(e){return(e?e.ownerDocument:document).body.offsetHeight}function dm(e,t,n){const r=e[Gr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const so=Symbol("_vod"),Zh=Symbol("_vsh"),bx={name:"show",beforeMount(e,{value:t},{transition:n}){e[so]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):us(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),us(e,!0),r.enter(e)):r.leave(e,()=>{us(e,!1)}):us(e,t))},beforeUnmount(e,{value:t}){us(e,t)}};function us(e,t){e.style.display=t?e[so]:"none",e[Zh]=!t}const hm=Symbol(""),pm=/(?:^|;)\s*display\s*:/;function gm(e,t,n){const r=e.style,s=Be(n);let i=!1;if(n&&!s){if(t)if(Be(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Vi(r,a,"")}else for(const o in t)n[o]==null&&Vi(r,o,"");for(const o in n)o==="display"&&(i=!0),Vi(r,o,n[o])}else if(s){if(t!==n){const o=r[hm];o&&(n+=";"+o),r.cssText=n,i=pm.test(n)}}else t&&e.removeAttribute("style");so in e&&(e[so]=i?r.display:"",e[Zh]&&(r.display="none"))}const hu=/\s*!important$/;function Vi(e,t,n){if(ee(n))n.forEach(r=>Vi(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=_m(e,t);hu.test(n)?e.setProperty(er(r),n.replace(hu,""),"important"):e[r]=n}}const pu=["Webkit","Moz","ms"],ca={};function _m(e,t){const n=ca[t];if(n)return n;let r=jt(t);if(r!=="filter"&&r in e)return ca[t]=r;r=No(r);for(let s=0;s<pu.length;s++){const i=pu[s]+r;if(i in e)return ca[t]=i}return t}const gu="http://www.w3.org/1999/xlink";function _u(e,t,n,r,s,i=h_(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(gu,t.slice(6,t.length)):e.setAttributeNS(gu,t,n):n==null||i&&!Ad(n)?e.removeAttribute(t):e.setAttribute(t,i?"":cn(n)?String(n):n)}function vu(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?zh(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Ad(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function bn(e,t,n,r){e.addEventListener(t,n,r)}function vm(e,t,n,r){e.removeEventListener(t,n,r)}const mu=Symbol("_vei");function mm(e,t,n,r,s=null){const i=e[mu]||(e[mu]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=ym(t);if(r){const u=i[t]=Em(r,s);bn(e,a,u,l)}else o&&(vm(e,a,o,l),i[t]=void 0)}}const yu=/(?:Once|Passive|Capture)$/;function ym(e){let t;if(yu.test(e)){t={};let r;for(;r=e.match(yu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):er(e.slice(2)),t]}let ua=0;const bm=Promise.resolve(),wm=()=>ua||(bm.then(()=>ua=0),ua=Date.now());function Em(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Wt(Sm(r,n.value),t,5,[r])};return n.value=e,n.attached=wm(),n}function Sm(e,t){if(ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const bu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Tm=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?dm(e,r,o):t==="style"?gm(e,n,r):Ro(t)?jl(t)||mm(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):km(e,t,r,o))?(vu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_u(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Be(r))?vu(e,jt(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),_u(e,t,r,o))};function km(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&bu(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return bu(t)&&Be(n)?!1:t in e}const Hh=new WeakMap,Gh=new WeakMap,io=Symbol("_moveCb"),wu=Symbol("_enterCb"),Om=e=>(delete e.props.mode,e),Am=Om({name:"TransitionGroup",props:Je({},jh,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pi(),r=ch();let s,i;return gh(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!Cm(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(Pm),s.forEach(Rm);const a=s.filter(Im);Ya(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;en(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[io]=d=>{d&&d.target!==u||(!d||d.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",f),u[io]=null,Ln(u,o))};u.addEventListener("transitionend",f)}),s=[]}),()=>{const o=_e(e),a=Bh(o);let l=o.tag||ht;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),gr(c,Ys(c,a,r,n)),Hh.set(c,Wh(c.el)))}i=t.default?Xl(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&gr(c,Ys(c,a,r,n))}return Ie(l,null,i)}}}),xm=Am;function Pm(e){const t=e.el;t[io]&&t[io](),t[wu]&&t[wu]()}function Rm(e){Gh.set(e,Wh(e.el))}function Im(e){const t=Hh.get(e),n=Gh.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${r/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function Wh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Cm(e,t,n){const r=e.cloneNode(),s=e[Gr];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=Vh(r);return i.removeChild(r),o}const Yn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Li(t,n):t};function Nm(e){e.target.composing=!0}function Eu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Lt=Symbol("_assign");function Su(e,t,n){return t&&(e=e.trim()),n&&(e=$o(e)),e}const Tu={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Lt]=Yn(s);const i=r||s.props&&s.props.type==="number";bn(e,t?"change":"input",o=>{o.target.composing||e[Lt](Su(e.value,n,i))}),(n||i)&&bn(e,"change",()=>{e.value=Su(e.value,n,i)}),t||(bn(e,"compositionstart",Nm),bn(e,"compositionend",Eu),bn(e,"change",Eu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Lt]=Yn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?$o(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},$m={deep:!0,created(e,t,n){e[Lt]=Yn(n),bn(e,"change",()=>{const r=e._modelValue,s=Wr(e),i=e.checked,o=e[Lt];if(ee(r)){const a=Vl(r,s),l=a!==-1;if(i&&!l)o(r.concat(s));else if(!i&&l){const u=[...r];u.splice(a,1),o(u)}}else if(ns(r)){const a=new Set(r);i?a.add(s):a.delete(s),o(a)}else o(qh(e,i))})},mounted:ku,beforeUpdate(e,t,n){e[Lt]=Yn(n),ku(e,t,n)}};function ku(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(ee(t))s=Vl(t,r.props.value)>-1;else if(ns(t))s=t.has(r.props.value);else{if(t===n)return;s=Kn(t,qh(e,!0))}e.checked!==s&&(e.checked=s)}const Dm={created(e,{value:t},n){e.checked=Kn(t,n.props.value),e[Lt]=Yn(n),bn(e,"change",()=>{e[Lt](Wr(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Lt]=Yn(r),t!==n&&(e.checked=Kn(t,r.props.value))}},Mm={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=ns(t);bn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?$o(Wr(o)):Wr(o));e[Lt](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Lo(()=>{e._assigning=!1})}),e[Lt]=Yn(r)},mounted(e,{value:t}){Ou(e,t)},beforeUpdate(e,t,n){e[Lt]=Yn(n)},updated(e,{value:t}){e._assigning||Ou(e,t)}};function Ou(e,t){const n=e.multiple,r=ee(t);if(!(n&&!r&&!ns(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Wr(o);if(n)if(r){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Vl(t,a)>-1}else o.selected=t.has(a);else if(Kn(Wr(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Wr(e){return"_value"in e?e._value:e.value}function qh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const wx={created(e,t,n){ki(e,t,n,null,"created")},mounted(e,t,n){ki(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ki(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ki(e,t,n,r,"updated")}};function Fm(e,t){switch(e){case"SELECT":return Mm;case"TEXTAREA":return Tu;default:switch(t){case"checkbox":return $m;case"radio":return Dm;default:return Tu}}}function ki(e,t,n,r,s){const o=Fm(e.tagName,n.props&&n.props.type)[s];o&&o(e,t,n,r)}const Lm=["ctrl","shift","alt","meta"],zm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Lm.some(n=>e[`${n}Key`]&&!t.includes(n))},Um=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=zm[t[o]];if(a&&a(s,t))return}return e(s,...i)})},jm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Bm=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=er(s.key);if(t.some(o=>o===i||jm[o]===i))return e(s)})},Vm=Je({patchProp:Tm},am);let Au;function Zm(){return Au||(Au=$v(Vm))}const Hm=(...e)=>{const t=Zm().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Wm(r);if(!s)return;const i=t._component;!ie(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Gm(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Gm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wm(e){return Be(e)?document.querySelector(e):e}/*!
|
|
19
19
|
* pinia v2.3.1
|
|
20
20
|
* (c) 2025 Eduardo San Martin Morote
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/let
|
|
22
|
+
*/let ac;const Vo=e=>ac=e,Ex=()=>nh()&&$t(lc)||ac,lc=Symbol();function Xa(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Us;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Us||(Us={}));function qm(){const e=Id(!0),t=e.run(()=>Nt({}));let n=[],r=[];const s=Jl({install(i){Vo(s),s._a=i,i.provide(lc,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const Kh=()=>{};function xu(e,t,n,r=Kh){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Cd()&&g_(s),s}function br(e,...t){e.slice().forEach(n=>{n(...t)})}const Km=e=>e(),Pu=Symbol(),fa=Symbol();function Qa(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Xa(s)&&Xa(r)&&e.hasOwnProperty(n)&&!Me(r)&&!An(r)?e[n]=Qa(s,r):e[n]=r}return e}const Jm=Symbol();function Ym(e){return!Xa(e)||!e.hasOwnProperty(Jm)}const{assign:zn}=Object;function Xm(e){return!!(Me(e)&&e.effect)}function Qm(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=s?s():{});const c=L_(n.state.value[e]);return zn(c,i,Object.keys(o||{}).reduce((f,d)=>(f[d]=Jl(Re(()=>{Vo(n);const h=n._s.get(e);return o[d].call(h,h)})),f),{}))}return l=Jh(e,u,t,n,r,!0),l}function Jh(e,t,n={},r,s,i){let o;const a=zn({actions:{}},n),l={deep:!0};let u,c,f=[],d=[],h;const p=r.state.value[e];!i&&!p&&(r.state.value[e]={});let g;function y(R){let I;u=c=!1,typeof R=="function"?(R(r.state.value[e]),I={type:Us.patchFunction,storeId:e,events:h}):(Qa(r.state.value[e],R),I={type:Us.patchObject,payload:R,storeId:e,events:h});const F=g=Symbol();Lo().then(()=>{g===F&&(u=!0)}),c=!0,br(f,I,r.state.value[e])}const k=i?function(){const{state:I}=n,F=I?I():{};this.$patch(J=>{zn(J,F)})}:Kh;function b(){o.stop(),f=[],d=[],r._s.delete(e)}const S=(R,I="")=>{if(Pu in R)return R[fa]=I,R;const F=function(){Vo(r);const J=Array.from(arguments),D=[],re=[];function ue(X){D.push(X)}function Ee(X){re.push(X)}br(d,{args:J,name:F[fa],store:m,after:ue,onError:Ee});let ce;try{ce=R.apply(this&&this.$id===e?this:m,J)}catch(X){throw br(re,X),X}return ce instanceof Promise?ce.then(X=>(br(D,X),X)).catch(X=>(br(re,X),Promise.reject(X))):(br(D,ce),ce)};return F[Pu]=!0,F[fa]=I,F},E={_p:r,$id:e,$onAction:xu.bind(null,d),$patch:y,$reset:k,$subscribe(R,I={}){const F=xu(f,R,I.detached,()=>J()),J=o.run(()=>Mr(()=>r.state.value[e],D=>{(I.flush==="sync"?c:u)&&R({storeId:e,type:Us.direct,events:h},D)},zn({},l,I)));return F},$dispose:b},m=ui(E);r._s.set(e,m);const M=(r._a&&r._a.runWithContext||Km)(()=>r._e.run(()=>(o=Id()).run(()=>t({action:S}))));for(const R in M){const I=M[R];if(Me(I)&&!Xm(I)||An(I))i||(p&&Ym(I)&&(Me(I)?I.value=p[R]:Qa(I,p[R])),r.state.value[e][R]=I);else if(typeof I=="function"){const F=S(I,R);M[R]=F,a.actions[R]=I}}return zn(m,M),zn(_e(m),M),Object.defineProperty(m,"$state",{get:()=>r.state.value[e],set:R=>{y(I=>{zn(I,R)})}}),r._p.forEach(R=>{zn(m,o.run(()=>R({store:m,app:r._a,pinia:r,options:a})))}),p&&i&&n.hydrate&&n.hydrate(m.$state,p),u=!0,c=!0,m}/*! #__NO_SIDE_EFFECTS__ */function ey(e,t,n){let r,s;const i=typeof t=="function";typeof e=="string"?(r=e,s=i?n:t):(s=e,r=e.id);function o(a,l){const u=nh();return a=a||(u?$t(lc,null):null),a&&Vo(a),a=ac,a._s.has(r)||(i?Jh(r,t,s,a):Qm(r,s,a)),a._s.get(r)}return o.$id=r,o}const ty="/logo.png",Y={SUBSCRIBE_SESSION:"subscribe:session",UNSUBSCRIBE_SESSION:"unsubscribe:session",SUBSCRIBE_PROJECT:"subscribe:project",UNSUBSCRIBE_PROJECT:"unsubscribe:project",SESSION_CREATED:"session:created",SESSION_STATUS:"session:status",SESSION_MESSAGE:"session:message",SESSION_PARTIAL:"session:partial",SESSION_ERROR:"session:error",SESSION_DELETED:"session:deleted",SESSION_WORK_LOG:"session:work_log",SESSION_WORK_LOGS_ASSOCIATED:"session:work_logs_associated",SESSION_THINKING_PARTIAL:"session:thinking_partial",SESSION_SUMMARY_UPDATED:"session:summary_updated",SESSION_SUMMARY_GENERATING:"session:summary_generating",SESSION_UPDATED:"session:updated",CANVAS_ADD:"canvas:add",CANVAS_REMOVE:"canvas:remove",CANVAS_UPDATE:"canvas:update",TODOS_UPDATE:"todos:update",CHANGES_UPDATE:"changes:update",CONVERSATION_CREATED:"conversation:created",CONVERSATION_UPDATED:"conversation:updated",CONVERSATION_DELETED:"conversation:deleted",SESSION_USAGE_UPDATE:"session:usage_update",COMMAND_RUN_OUTPUT:"command:run:output",COMMAND_RUN_COMPLETE:"command:run:complete",COMMAND_RUN_ERROR:"command:run:error",COMMAND_RUN_DELETED:"command:run:deleted",SYSTEM_METRICS:"system:metrics",KANBAN_BOARD_UPDATED:"kanban:board_updated",KANBAN_CARD_MOVED:"kanban:card_moved",KANBAN_CARD_ADDED:"kanban:card_added",KANBAN_CARD_REMOVED:"kanban:card_removed"};function el(e,t){return JSON.stringify({type:e,...t})}function ny(e){try{return JSON.parse(e)}catch{return null}}const Sx={input:1,output:5,cacheRead:.1,cacheCreation:1.25},Yh=2e3,ry=3e4,sy=5e3,Tx=60,kx=`You are an AI coding assistant. You help users with software engineering tasks including writing code, debugging, refactoring, and explaining code. You have full access to the shell and can execute any commands needed to assist the user. Be helpful, accurate, and thorough.
|
|
23
23
|
|
|
24
24
|
IMPORTANT: Your working directory is already set correctly for this session. NEVER use \`cd\` to change to a hardcoded project path before running commands (e.g., \`cd /path/to/project && git status\`). This bypasses git worktree isolation and causes commands to run in the wrong directory. Always run commands directly without changing directory.
|
|
25
25
|
|
|
@@ -30,9 +30,9 @@ IMPORTANT: NEVER proactively put artifacts on the canvas unless the user explici
|
|
|
30
30
|
When creating plan files or design documents, always write them to a temporary directory:
|
|
31
31
|
- Use \`~/.claude/plans/<descriptive-name>.md\` for plan files
|
|
32
32
|
- Use the Write tool to create these files
|
|
33
|
-
- This keeps plans organized and separate from the main codebase`,ty=Object.freeze({status:"aborted"});function O(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const u=o.prototype,c=Object.keys(u);for(let f=0;f<c.length;f++){const d=c[f];d in a||(a[d]=u[d].bind(a))}}const s=(n==null?void 0:n.Parent)??Object;class i extends s{}Object.defineProperty(i,"name",{value:e});function o(a){var l;const u=n!=null&&n.Parent?new i:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class Lr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Jh extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Yh={};function Xn(e){return Yh}function Xh(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function tl(e,t){return typeof t=="bigint"?t.toString():t}function lc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function cc(e){return e==null}function uc(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ny(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(s=Number.parseInt(l[1]))}const i=n>s?n:s,o=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return o%a/10**i}const Au=Symbol("evaluating");function ke(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Au)return r===void 0&&(r=Au,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function mr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Cu(e){return JSON.stringify(e)}function ry(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Qh="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const sy=lc(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function qr(e){if(oo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(oo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ep(e){return qr(e)?{...e}:Array.isArray(e)?[...e]:e}const iy=new Set(["string","number","symbol"]);function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function te(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function oy(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const ay={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ly(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=nr(e._zod.def,{get shape(){const o={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=n.shape[a])}return mr(this,"shape",o),o},checks:[]});return rr(e,i)}function cy(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=nr(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return mr(this,"shape",o),o},checks:[]});return rr(e,i)}function uy(e,t){if(!qr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=nr(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return mr(this,"shape",i),i}});return rr(e,s)}function fy(e,t){if(!qr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=nr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return mr(this,"shape",r),r}});return rr(e,n)}function dy(e,t){const n=nr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return mr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return rr(e,n)}function hy(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=nr(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return mr(this,"shape",l),l},checks:[]});return rr(t,o)}function py(e,t,n){const r=nr(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new e({type:"nonoptional",innerType:s[o]}))}else for(const o in s)i[o]=new e({type:"nonoptional",innerType:s[o]});return mr(this,"shape",i),i}});return rr(t,r)}function Cr(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Rr(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ti(e){return typeof e=="string"?e:e==null?void 0:e.message}function Qn(e,t,n){var s,i,o,a,l,u;const r={...e,path:e.path??[]};if(!e.message){const c=Ti((o=(i=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:i.error)==null?void 0:o.call(i,e))??Ti((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??Ti((l=n.customError)==null?void 0:l.call(n,e))??Ti((u=n.localeError)==null?void 0:u.call(n,e))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function fc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qs(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const tp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},np=O("$ZodError",tp),rp=O("$ZodError",tp,{Parent:Error});function gy(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function _y(e,t=n=>n.message){const n={_errors:[]},r=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>r({issues:o}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let o=n,a=0;for(;a<i.path.length;){const l=i.path[a];a===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return r(e),n}const dc=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Lr;if(o.issues.length){const a=new((s==null?void 0:s.Err)??e)(o.issues.map(l=>Qn(l,i,Xn())));throw Qh(a,s==null?void 0:s.callee),a}return o.value},hc=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((s==null?void 0:s.Err)??e)(o.issues.map(l=>Qn(l,i,Xn())));throw Qh(a,s==null?void 0:s.callee),a}return o.value},Ho=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Lr;return i.issues.length?{success:!1,error:new(e??np)(i.issues.map(o=>Qn(o,s,Xn())))}:{success:!0,data:i.value}},vy=Ho(rp),Go=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(o=>Qn(o,s,Xn())))}:{success:!0,data:i.value}},my=Go(rp),yy=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return dc(e)(t,n,s)},by=e=>(t,n,r)=>dc(e)(t,n,r),wy=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(t,n,s)},Ey=e=>async(t,n,r)=>hc(e)(t,n,r),Sy=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ho(e)(t,n,s)},ky=e=>(t,n,r)=>Ho(e)(t,n,r),Ty=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Go(e)(t,n,s)},Oy=e=>async(t,n,r)=>Go(e)(t,n,r),xy=/^[cC][^\s-]{8,}$/,Ay=/^[0-9a-z]+$/,Cy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ry=/^[0-9a-vA-V]{20}$/,Iy=/^[A-Za-z0-9]{27}$/,Py=/^[a-zA-Z0-9_-]{21}$/,Ny=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$y=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ru=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Dy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,My="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fy(){return new RegExp(My,"u")}const Ly=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Uy=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,By=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sp=/^[A-Za-z0-9_-]*$/,Vy=/^\+[1-9]\d{6,14}$/,ip="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Zy=new RegExp(`^${ip}$`);function op(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Hy(e){return new RegExp(`^${op(e)}$`)}function Gy(e){const t=op({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ip}T(?:${r})$`)}const Wy=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qy=/^-?\d+$/,ap=/^-?\d+(?:\.\d+)?$/,Ky=/^(?:true|false)$/i,Jy=/^[^A-Z]*$/,Yy=/^[^a-z]*$/,xt=O("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),lp={number:"number",bigint:"bigint",object:"date"},cp=O("$ZodCheckLessThan",(e,t)=>{xt.init(e,t);const n=lp[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),up=O("$ZodCheckGreaterThan",(e,t)=>{xt.init(e,t);const n=lp[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xy=O("$ZodCheckMultipleOf",(e,t)=>{xt.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ny(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Qy=O("$ZodCheckNumberFormat",(e,t)=>{var o;xt.init(e,t),t.format=t.format||"float64";const n=(o=t.format)==null?void 0:o.includes("int"),r=n?"int":"number",[s,i]=ay[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=qy)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<s&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>i&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),eb=O("$ZodCheckMaxLength",(e,t)=>{var n;xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!cc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const o=fc(s);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),tb=O("$ZodCheckMinLength",(e,t)=>{var n;xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!cc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const o=fc(s);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),nb=O("$ZodCheckLengthEquals",(e,t)=>{var n;xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!cc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,i=s.length;if(i===t.length)return;const o=fc(s),a=i>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Wo=O("$ZodCheckStringFormat",(e,t)=>{var n,r;xt.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),rb=O("$ZodCheckRegex",(e,t)=>{Wo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sb=O("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jy),Wo.init(e,t)}),ib=O("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Yy),Wo.init(e,t)}),ob=O("$ZodCheckIncludes",(e,t)=>{xt.init(e,t);const n=Zo(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),ab=O("$ZodCheckStartsWith",(e,t)=>{xt.init(e,t);const n=new RegExp(`^${Zo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),lb=O("$ZodCheckEndsWith",(e,t)=>{xt.init(e,t);const n=new RegExp(`.*${Zo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),cb=O("$ZodCheckOverwrite",(e,t)=>{xt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class ub{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
33
|
+
- This keeps plans organized and separate from the main codebase`,iy=Object.freeze({status:"aborted"});function O(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const u=o.prototype,c=Object.keys(u);for(let f=0;f<c.length;f++){const d=c[f];d in a||(a[d]=u[d].bind(a))}}const s=(n==null?void 0:n.Parent)??Object;class i extends s{}Object.defineProperty(i,"name",{value:e});function o(a){var l;const u=n!=null&&n.Parent?new i:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class Lr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xh extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Qh={};function Xn(e){return Qh}function ep(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function tl(e,t){return typeof t=="bigint"?t.toString():t}function cc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function uc(e){return e==null}function fc(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function oy(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(s=Number.parseInt(l[1]))}const i=n>s?n:s,o=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return o%a/10**i}const Ru=Symbol("evaluating");function Te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ru)return r===void 0&&(r=Ru,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function mr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Iu(e){return JSON.stringify(e)}function ay(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ly=cc(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function qr(e){if(oo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(oo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function np(e){return qr(e)?{...e}:Array.isArray(e)?[...e]:e}const cy=new Set(["string","number","symbol"]);function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function te(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function uy(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const fy={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function dy(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=nr(e._zod.def,{get shape(){const o={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=n.shape[a])}return mr(this,"shape",o),o},checks:[]});return rr(e,i)}function hy(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=nr(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return mr(this,"shape",o),o},checks:[]});return rr(e,i)}function py(e,t){if(!qr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=nr(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return mr(this,"shape",i),i}});return rr(e,s)}function gy(e,t){if(!qr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=nr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return mr(this,"shape",r),r}});return rr(e,n)}function _y(e,t){const n=nr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return mr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return rr(e,n)}function vy(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=nr(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return mr(this,"shape",l),l},checks:[]});return rr(t,o)}function my(e,t,n){const r=nr(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new e({type:"nonoptional",innerType:s[o]}))}else for(const o in s)i[o]=new e({type:"nonoptional",innerType:s[o]});return mr(this,"shape",i),i}});return rr(t,r)}function Pr(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Rr(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Oi(e){return typeof e=="string"?e:e==null?void 0:e.message}function Qn(e,t,n){var s,i,o,a,l,u;const r={...e,path:e.path??[]};if(!e.message){const c=Oi((o=(i=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:i.error)==null?void 0:o.call(i,e))??Oi((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??Oi((l=n.customError)==null?void 0:l.call(n,e))??Oi((u=n.localeError)==null?void 0:u.call(n,e))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function dc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ei(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const rp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sp=O("$ZodError",rp),ip=O("$ZodError",rp,{Parent:Error});function yy(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function by(e,t=n=>n.message){const n={_errors:[]},r=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>r({issues:o}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let o=n,a=0;for(;a<i.path.length;){const l=i.path[a];a===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return r(e),n}const hc=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Lr;if(o.issues.length){const a=new((s==null?void 0:s.Err)??e)(o.issues.map(l=>Qn(l,i,Xn())));throw tp(a,s==null?void 0:s.callee),a}return o.value},pc=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((s==null?void 0:s.Err)??e)(o.issues.map(l=>Qn(l,i,Xn())));throw tp(a,s==null?void 0:s.callee),a}return o.value},Ho=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Lr;return i.issues.length?{success:!1,error:new(e??sp)(i.issues.map(o=>Qn(o,s,Xn())))}:{success:!0,data:i.value}},wy=Ho(ip),Go=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(o=>Qn(o,s,Xn())))}:{success:!0,data:i.value}},Ey=Go(ip),Sy=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hc(e)(t,n,s)},Ty=e=>(t,n,r)=>hc(e)(t,n,r),ky=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return pc(e)(t,n,s)},Oy=e=>async(t,n,r)=>pc(e)(t,n,r),Ay=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ho(e)(t,n,s)},xy=e=>(t,n,r)=>Ho(e)(t,n,r),Py=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Go(e)(t,n,s)},Ry=e=>async(t,n,r)=>Go(e)(t,n,r),Iy=/^[cC][^\s-]{8,}$/,Cy=/^[0-9a-z]+$/,Ny=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$y=/^[0-9a-vA-V]{20}$/,Dy=/^[A-Za-z0-9]{27}$/,My=/^[a-zA-Z0-9_-]{21}$/,Fy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ly=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Cu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function jy(){return new RegExp(Uy,"u")}const By=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Zy=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Hy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Gy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,op=/^[A-Za-z0-9_-]*$/,Wy=/^\+[1-9]\d{6,14}$/,ap="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qy=new RegExp(`^${ap}$`);function lp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ky(e){return new RegExp(`^${lp(e)}$`)}function Jy(e){const t=lp({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ap}T(?:${r})$`)}const Yy=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Xy=/^-?\d+$/,cp=/^-?\d+(?:\.\d+)?$/,Qy=/^(?:true|false)$/i,eb=/^[^A-Z]*$/,tb=/^[^a-z]*$/,At=O("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),up={number:"number",bigint:"bigint",object:"date"},fp=O("$ZodCheckLessThan",(e,t)=>{At.init(e,t);const n=up[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dp=O("$ZodCheckGreaterThan",(e,t)=>{At.init(e,t);const n=up[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nb=O("$ZodCheckMultipleOf",(e,t)=>{At.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):oy(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),rb=O("$ZodCheckNumberFormat",(e,t)=>{var o;At.init(e,t),t.format=t.format||"float64";const n=(o=t.format)==null?void 0:o.includes("int"),r=n?"int":"number",[s,i]=fy[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=Xy)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<s&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>i&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),sb=O("$ZodCheckMaxLength",(e,t)=>{var n;At.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!uc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const o=dc(s);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ib=O("$ZodCheckMinLength",(e,t)=>{var n;At.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!uc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const o=dc(s);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ob=O("$ZodCheckLengthEquals",(e,t)=>{var n;At.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!uc(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,i=s.length;if(i===t.length)return;const o=dc(s),a=i>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Wo=O("$ZodCheckStringFormat",(e,t)=>{var n,r;At.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ab=O("$ZodCheckRegex",(e,t)=>{Wo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lb=O("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eb),Wo.init(e,t)}),cb=O("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tb),Wo.init(e,t)}),ub=O("$ZodCheckIncludes",(e,t)=>{At.init(e,t);const n=Zo(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),fb=O("$ZodCheckStartsWith",(e,t)=>{At.init(e,t);const n=new RegExp(`^${Zo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),db=O("$ZodCheckEndsWith",(e,t)=>{At.init(e,t);const n=new RegExp(`.*${Zo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),hb=O("$ZodCheckOverwrite",(e,t)=>{At.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class pb{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
34
34
|
`).filter(o=>o),s=Math.min(...r.map(o=>o.length-o.trimStart().length)),i=r.map(o=>o.slice(s)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const t=Function,n=this==null?void 0:this.args,s=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...n,s.join(`
|
|
35
|
-
`))}}const
|
|
35
|
+
`))}}const gb={major:4,minor:3,patch:6},Fe=O("$ZodType",(e,t)=>{var s;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gb;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,l,u)=>{let c=Pr(a),f;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(c)continue;const h=a.issues.length,p=d._zod.check(a);if(p instanceof Promise&&(u==null?void 0:u.async)===!1)throw new Lr;if(f||p instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await p,a.issues.length!==h&&(c||(c=Pr(a,h)))});else{if(a.issues.length===h)continue;c||(c=Pr(a,h))}}return f?f.then(()=>a):a},o=(a,l,u)=>{if(Pr(a))return a.aborted=!0,a;const c=i(l,r,u);if(c instanceof Promise){if(u.async===!1)throw new Lr;return c.then(f=>e._zod.parse(f,u))}return e._zod.parse(c,u)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(f=>o(f,a,l)):o(c,a,l)}const u=e._zod.parse(a,l);if(u instanceof Promise){if(l.async===!1)throw new Lr;return u.then(c=>i(c,r,l))}return i(u,r,l)}}Te(e,"~standard",()=>({validate:i=>{var o;try{const a=wy(e,i);return a.success?{value:a.data}:{issues:(o=a.error)==null?void 0:o.issues}}catch{return Ey(e,i).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),gc=O("$ZodString",(e,t)=>{var n;Fe.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??Yy(e._zod.bag),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),$e=O("$ZodStringFormat",(e,t)=>{Wo.init(e,t),gc.init(e,t)}),_b=O("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ly),$e.init(e,t)}),vb=O("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Cu(r))}else t.pattern??(t.pattern=Cu());$e.init(e,t)}),mb=O("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=zy),$e.init(e,t)}),yb=O("$ZodURL",(e,t)=>{$e.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),bb=O("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=jy()),$e.init(e,t)}),wb=O("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=My),$e.init(e,t)}),Eb=O("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Iy),$e.init(e,t)}),Sb=O("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Cy),$e.init(e,t)}),Tb=O("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ny),$e.init(e,t)}),kb=O("$ZodXID",(e,t)=>{t.pattern??(t.pattern=$y),$e.init(e,t)}),Ob=O("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Dy),$e.init(e,t)}),Ab=O("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Jy(t)),$e.init(e,t)}),xb=O("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qy),$e.init(e,t)}),Pb=O("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ky(t)),$e.init(e,t)}),Rb=O("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Fy),$e.init(e,t)}),Ib=O("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=By),$e.init(e,t),e._zod.bag.format="ipv4"}),Cb=O("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Vy),$e.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Nb=O("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Zy),$e.init(e,t)}),$b=O("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Hy),$e.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,i]=r;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function hp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Db=O("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Gy),$e.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{hp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Mb(e){if(!op.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return hp(n)}const Fb=O("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=op),$e.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Mb(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Lb=O("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Wy),$e.init(e,t)});function zb(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const Ub=O("$ZodJWT",(e,t)=>{$e.init(e,t),e._zod.check=n=>{zb(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),pp=O("$ZodNumber",(e,t)=>{Fe.init(e,t),e._zod.pattern=e._zod.bag.pattern??cp,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),jb=O("$ZodNumberFormat",(e,t)=>{rb.init(e,t),pp.init(e,t)}),Bb=O("$ZodBoolean",(e,t)=>{Fe.init(e,t),e._zod.pattern=Qy,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Vb=O("$ZodAny",(e,t)=>{Fe.init(e,t),e._zod.parse=n=>n}),Zb=O("$ZodUnknown",(e,t)=>{Fe.init(e,t),e._zod.parse=n=>n}),Hb=O("$ZodNever",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Nu(e,t,n){e.issues.length&&t.issues.push(...Rr(n,e.issues)),t.value[n]=e.value}const Gb=O("$ZodArray",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let o=0;o<s.length;o++){const a=s[o],l=t.element._zod.run({value:a,issues:[]},r);l instanceof Promise?i.push(l.then(u=>Nu(u,n,o))):Nu(l,n,o)}return i.length?Promise.all(i).then(()=>n):n}});function ao(e,t,n,r,s){if(e.issues.length){if(s&&!(n in r))return;t.issues.push(...Rr(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function gp(e){var r,s,i,o;const t=Object.keys(e.shape);for(const a of t)if(!((o=(i=(s=(r=e.shape)==null?void 0:r[a])==null?void 0:s._zod)==null?void 0:i.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=uy(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _p(e,t,n,r,s,i){const o=[],a=s.keySet,l=s.catchall._zod,u=l.def.type,c=l.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){o.push(f);continue}const d=l.run({value:t[f],issues:[]},r);d instanceof Promise?e.push(d.then(h=>ao(h,n,f,t,c))):ao(d,n,f,t,c)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Wb=O("$ZodObject",(e,t)=>{Fe.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=cc(()=>gp(t));Te(e._zod,"propValues",()=>{const a=t.shape,l={};for(const u in a){const c=a[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(const f of c.values)l[u].add(f)}}return l});const s=oo,i=t.catchall;let o;e._zod.parse=(a,l)=>{o??(o=r.value);const u=a.value;if(!s(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const c=[],f=o.shape;for(const d of o.keys){const h=f[d],p=h._zod.optout==="optional",g=h._zod.run({value:u[d],issues:[]},l);g instanceof Promise?c.push(g.then(y=>ao(y,a,d,u,p))):ao(g,a,d,u,p)}return i?_p(c,u,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),qb=O("$ZodObjectJIT",(e,t)=>{Wb.init(e,t);const n=e._zod.parse,r=cc(()=>gp(t)),s=d=>{var S;const h=new pb(["shape","payload","ctx"]),p=r.value,g=E=>{const m=Iu(E);return`shape[${m}]._zod.run({ value: input[${m}], issues: [] }, ctx)`};h.write("const input = payload.value;");const y=Object.create(null);let k=0;for(const E of p.keys)y[E]=`key_${k++}`;h.write("const newResult = {};");for(const E of p.keys){const m=y[E],N=Iu(E),M=d[E],R=((S=M==null?void 0:M._zod)==null?void 0:S.optout)==="optional";h.write(`const ${m} = ${g(E)};`),R?h.write(`
|
|
36
36
|
if (${m}.issues.length) {
|
|
37
37
|
if (${N} in input) {
|
|
38
38
|
payload.issues = payload.issues.concat(${m}.issues.map(iss => ({
|
|
@@ -66,18 +66,18 @@ When creating plan files or design documents, always write them to a temporary d
|
|
|
66
66
|
newResult[${N}] = ${m}.value;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");const b=h.compile();return(E,m)=>b(d,E,m)};let i;const o=oo,a=!Yh.jitless,u=a&&sy.value,c=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const p=d.value;return o(p)?a&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(i||(i=s(t.shape)),d=i(d,h),c?pp([],p,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function Pu(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Cr(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(o=>Qn(o,r,Xn())))}),t)}const Hb=O("$ZodUnion",(e,t)=>{Fe.init(e,t),ke(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),ke(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),ke(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),ke(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>uc(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const l of t.options){const u=l._zod.run({value:s.value,issues:[]},i);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(l=>Pu(l,s,e,i)):Pu(a,s,e,i)}}),Gb=O("$ZodIntersection",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},r),o=t.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([l,u])=>Nu(n,l,u)):Nu(n,i,o)}});function nl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qr(e)&&qr(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of r){const o=nl(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};s[i]=o.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],i=t[r],o=nl(s,i);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Nu(e,t,n){const r=new Map;let s;for(const a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&s&&e.issues.push({...s,keys:i}),Cr(e))return e;const o=nl(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Wb=O("$ZodRecord",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!qr(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],o=t.keyType._zod.values;if(o){n.value={};const a=new Set;for(const u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Rr(u,f.issues)),n.value[u]=f.value})):(c.issues.length&&n.issues.push(...Rr(u,c.issues)),n.value[u]=c.value)}let l;for(const u in s)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&ap.test(a)&&l.issues.length){const f=t.keyType._zod.run({value:Number(a),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(l=f)}if(l.issues.length){t.mode==="loose"?n.value[a]=s[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>Qn(f,r,Xn())),input:a,path:[a],inst:e});continue}const c=t.valueType._zod.run({value:s[a],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Rr(a,f.issues)),n.value[l.value]=f.value})):(c.issues.length&&n.issues.push(...Rr(a,c.issues)),n.value[l.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),qb=O("$ZodEnum",(e,t)=>{Fe.init(e,t);const n=Xh(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>iy.has(typeof s)).map(s=>typeof s=="string"?Zo(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const o=s.value;return r.has(o)||s.issues.push({code:"invalid_value",values:n,input:o,inst:e}),s}}),Kb=O("$ZodTransform",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jh(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(o=>(n.value=o,n));if(s instanceof Promise)throw new Lr;return n.value=s,n}});function $u(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const gp=O("$ZodOptional",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${uc(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>$u(i,n.value)):$u(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Jb=O("$ZodExactOptional",(e,t)=>{gp.init(e,t),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Yb=O("$ZodNullable",(e,t)=>{Fe.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${uc(n.source)}|null)$`):void 0}),ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Xb=O("$ZodDefault",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Du(i,t)):Du(s,t)}});function Du(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Qb=O("$ZodPrefault",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),e0=O("$ZodNonOptional",(e,t)=>{Fe.init(e,t),ke(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Mu(i,e)):Mu(s,e)}});function Mu(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const t0=O("$ZodCatch",(e,t)=>{Fe.init(e,t),ke(e._zod,"optin",()=>t.innerType._zod.optin),ke(e._zod,"optout",()=>t.innerType._zod.optout),ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>Qn(o,r,Xn()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Qn(i,r,Xn()))},input:n.value}),n.issues=[]),n)}}),n0=O("$ZodPipe",(e,t)=>{Fe.init(e,t),ke(e._zod,"values",()=>t.in._zod.values),ke(e._zod,"optin",()=>t.in._zod.optin),ke(e._zod,"optout",()=>t.out._zod.optout),ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(o=>Oi(o,t.in,r)):Oi(i,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Oi(i,t.out,r)):Oi(s,t.out,r)}});function Oi(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const r0=O("$ZodReadonly",(e,t)=>{Fe.init(e,t),ke(e._zod,"propValues",()=>t.innerType._zod.propValues),ke(e._zod,"values",()=>t.innerType._zod.values),ke(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ke(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(Fu):Fu(s)}});function Fu(e){return e.value=Object.freeze(e.value),e}const s0=O("$ZodCustom",(e,t)=>{xt.init(e,t),Fe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(i=>Lu(i,n,r,e));Lu(s,n,r,e)}});function Lu(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(Qs(s))}}var zu;class i0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function o0(){return new i0}(zu=globalThis).__zod_globalRegistry??(zu.__zod_globalRegistry=o0());const Es=globalThis.__zod_globalRegistry;function a0(e,t){return new e({type:"string",...te(t)})}function l0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...te(t)})}function Uu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...te(t)})}function c0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...te(t)})}function u0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(t)})}function f0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(t)})}function d0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(t)})}function h0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...te(t)})}function p0(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...te(t)})}function g0(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(t)})}function _0(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...te(t)})}function v0(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(t)})}function m0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...te(t)})}function y0(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...te(t)})}function b0(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(t)})}function w0(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(t)})}function E0(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(t)})}function S0(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(t)})}function k0(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(t)})}function T0(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...te(t)})}function O0(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...te(t)})}function x0(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...te(t)})}function A0(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...te(t)})}function C0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(t)})}function R0(e,t){return new e({type:"string",format:"date",check:"string_format",...te(t)})}function I0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...te(t)})}function P0(e,t){return new e({type:"string",format:"duration",check:"string_format",...te(t)})}function N0(e,t){return new e({type:"number",checks:[],...te(t)})}function $0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...te(t)})}function D0(e,t){return new e({type:"boolean",...te(t)})}function M0(e){return new e({type:"any"})}function F0(e){return new e({type:"unknown"})}function L0(e,t){return new e({type:"never",...te(t)})}function ju(e,t){return new cp({check:"less_than",...te(t),value:e,inclusive:!1})}function da(e,t){return new cp({check:"less_than",...te(t),value:e,inclusive:!0})}function Bu(e,t){return new up({check:"greater_than",...te(t),value:e,inclusive:!1})}function ha(e,t){return new up({check:"greater_than",...te(t),value:e,inclusive:!0})}function Vu(e,t){return new Xy({check:"multiple_of",...te(t),value:e})}function _p(e,t){return new eb({check:"max_length",...te(t),maximum:e})}function lo(e,t){return new tb({check:"min_length",...te(t),minimum:e})}function vp(e,t){return new nb({check:"length_equals",...te(t),length:e})}function z0(e,t){return new rb({check:"string_format",format:"regex",...te(t),pattern:e})}function U0(e){return new sb({check:"string_format",format:"lowercase",...te(e)})}function j0(e){return new ib({check:"string_format",format:"uppercase",...te(e)})}function B0(e,t){return new ob({check:"string_format",format:"includes",...te(t),includes:e})}function V0(e,t){return new ab({check:"string_format",format:"starts_with",...te(t),prefix:e})}function Z0(e,t){return new lb({check:"string_format",format:"ends_with",...te(t),suffix:e})}function is(e){return new cb({check:"overwrite",tx:e})}function H0(e){return is(t=>t.normalize(e))}function G0(){return is(e=>e.trim())}function W0(){return is(e=>e.toLowerCase())}function q0(){return is(e=>e.toUpperCase())}function K0(){return is(e=>ry(e))}function J0(e,t,n){return new e({type:"array",element:t,...te(n)})}function Y0(e,t,n){return new e({type:"custom",check:"custom",fn:t,...te(n)})}function X0(e){const t=Q0(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Qs(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(Qs(s))}},e(n.value,n)));return t}function Q0(e,t){const n=new xt({check:"custom",...te(t)});return n._zod.check=e,n}function mp(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Es,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Ke(e,t,n={path:[],schemaPath:[]}){var c,f;var r;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const a=(f=(c=e._zod).toJSONSchema)==null?void 0:f.call(c);if(a)o.schema=a;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,d);else{const p=o.schema,g=t.processors[s.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);g(e,t,p,d)}const h=e._zod.parent;h&&(o.ref||(o.ref=h),Ke(h,t,d),t.seen.get(h).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&>(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function yp(e,t){var o,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const f=(o=e.metadataRegistry.get(c[0]))==null?void 0:o.id;if(f){const d=r.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,c[0])}}const s=c=>{var g;const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(g=e.external.registry.get(c[0]))==null?void 0:g.id,T=e.external.uri??(S=>S);if(y)return{ref:T(y)};const b=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=b,{defId:b,ref:`${T("__shared")}#/${f}/${b}`}}if(c[1]===n)return{ref:"#"};const h=`#/${f}/`,p=c[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},i=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const g in p)delete p[g];p.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${(a=f.cycle)==null?void 0:a.join("/")}/<root>
|
|
69
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const b=h.compile();return(E,m)=>b(d,E,m)};let i;const o=oo,a=!Qh.jitless,u=a&&ly.value,c=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const p=d.value;return o(p)?a&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(i||(i=s(t.shape)),d=i(d,h),c?_p([],p,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function $u(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Pr(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(o=>Qn(o,r,Xn())))}),t)}const Kb=O("$ZodUnion",(e,t)=>{Fe.init(e,t),Te(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Te(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Te(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Te(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>fc(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const l of t.options){const u=l._zod.run({value:s.value,issues:[]},i);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(l=>$u(l,s,e,i)):$u(a,s,e,i)}}),Jb=O("$ZodIntersection",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},r),o=t.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([l,u])=>Du(n,l,u)):Du(n,i,o)}});function nl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qr(e)&&qr(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of r){const o=nl(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};s[i]=o.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],i=t[r],o=nl(s,i);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Du(e,t,n){const r=new Map;let s;for(const a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&s&&e.issues.push({...s,keys:i}),Pr(e))return e;const o=nl(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Yb=O("$ZodRecord",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!qr(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],o=t.keyType._zod.values;if(o){n.value={};const a=new Set;for(const u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Rr(u,f.issues)),n.value[u]=f.value})):(c.issues.length&&n.issues.push(...Rr(u,c.issues)),n.value[u]=c.value)}let l;for(const u in s)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&cp.test(a)&&l.issues.length){const f=t.keyType._zod.run({value:Number(a),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(l=f)}if(l.issues.length){t.mode==="loose"?n.value[a]=s[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>Qn(f,r,Xn())),input:a,path:[a],inst:e});continue}const c=t.valueType._zod.run({value:s[a],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Rr(a,f.issues)),n.value[l.value]=f.value})):(c.issues.length&&n.issues.push(...Rr(a,c.issues)),n.value[l.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Xb=O("$ZodEnum",(e,t)=>{Fe.init(e,t);const n=ep(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>cy.has(typeof s)).map(s=>typeof s=="string"?Zo(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const o=s.value;return r.has(o)||s.issues.push({code:"invalid_value",values:n,input:o,inst:e}),s}}),Qb=O("$ZodTransform",(e,t)=>{Fe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Xh(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(o=>(n.value=o,n));if(s instanceof Promise)throw new Lr;return n.value=s,n}});function Mu(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const vp=O("$ZodOptional",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Te(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${fc(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Mu(i,n.value)):Mu(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),e0=O("$ZodExactOptional",(e,t)=>{vp.init(e,t),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),t0=O("$ZodNullable",(e,t)=>{Fe.init(e,t),Te(e._zod,"optin",()=>t.innerType._zod.optin),Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${fc(n.source)}|null)$`):void 0}),Te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),n0=O("$ZodDefault",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Fu(i,t)):Fu(s,t)}});function Fu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const r0=O("$ZodPrefault",(e,t)=>{Fe.init(e,t),e._zod.optin="optional",Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),s0=O("$ZodNonOptional",(e,t)=>{Fe.init(e,t),Te(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Lu(i,e)):Lu(s,e)}});function Lu(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const i0=O("$ZodCatch",(e,t)=>{Fe.init(e,t),Te(e._zod,"optin",()=>t.innerType._zod.optin),Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>Qn(o,r,Xn()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Qn(i,r,Xn()))},input:n.value}),n.issues=[]),n)}}),o0=O("$ZodPipe",(e,t)=>{Fe.init(e,t),Te(e._zod,"values",()=>t.in._zod.values),Te(e._zod,"optin",()=>t.in._zod.optin),Te(e._zod,"optout",()=>t.out._zod.optout),Te(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(o=>Ai(o,t.in,r)):Ai(i,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Ai(i,t.out,r)):Ai(s,t.out,r)}});function Ai(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const a0=O("$ZodReadonly",(e,t)=>{Fe.init(e,t),Te(e._zod,"propValues",()=>t.innerType._zod.propValues),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),Te(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(zu):zu(s)}});function zu(e){return e.value=Object.freeze(e.value),e}const l0=O("$ZodCustom",(e,t)=>{At.init(e,t),Fe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(i=>Uu(i,n,r,e));Uu(s,n,r,e)}});function Uu(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(ei(s))}}var ju;class c0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function u0(){return new c0}(ju=globalThis).__zod_globalRegistry??(ju.__zod_globalRegistry=u0());const Es=globalThis.__zod_globalRegistry;function f0(e,t){return new e({type:"string",...te(t)})}function d0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...te(t)})}function Bu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...te(t)})}function h0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...te(t)})}function p0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(t)})}function g0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(t)})}function _0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(t)})}function v0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...te(t)})}function m0(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...te(t)})}function y0(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(t)})}function b0(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...te(t)})}function w0(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(t)})}function E0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...te(t)})}function S0(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...te(t)})}function T0(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(t)})}function k0(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(t)})}function O0(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(t)})}function A0(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(t)})}function x0(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(t)})}function P0(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...te(t)})}function R0(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...te(t)})}function I0(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...te(t)})}function C0(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...te(t)})}function N0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(t)})}function $0(e,t){return new e({type:"string",format:"date",check:"string_format",...te(t)})}function D0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...te(t)})}function M0(e,t){return new e({type:"string",format:"duration",check:"string_format",...te(t)})}function F0(e,t){return new e({type:"number",checks:[],...te(t)})}function L0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...te(t)})}function z0(e,t){return new e({type:"boolean",...te(t)})}function U0(e){return new e({type:"any"})}function j0(e){return new e({type:"unknown"})}function B0(e,t){return new e({type:"never",...te(t)})}function Vu(e,t){return new fp({check:"less_than",...te(t),value:e,inclusive:!1})}function da(e,t){return new fp({check:"less_than",...te(t),value:e,inclusive:!0})}function Zu(e,t){return new dp({check:"greater_than",...te(t),value:e,inclusive:!1})}function ha(e,t){return new dp({check:"greater_than",...te(t),value:e,inclusive:!0})}function Hu(e,t){return new nb({check:"multiple_of",...te(t),value:e})}function mp(e,t){return new sb({check:"max_length",...te(t),maximum:e})}function lo(e,t){return new ib({check:"min_length",...te(t),minimum:e})}function yp(e,t){return new ob({check:"length_equals",...te(t),length:e})}function V0(e,t){return new ab({check:"string_format",format:"regex",...te(t),pattern:e})}function Z0(e){return new lb({check:"string_format",format:"lowercase",...te(e)})}function H0(e){return new cb({check:"string_format",format:"uppercase",...te(e)})}function G0(e,t){return new ub({check:"string_format",format:"includes",...te(t),includes:e})}function W0(e,t){return new fb({check:"string_format",format:"starts_with",...te(t),prefix:e})}function q0(e,t){return new db({check:"string_format",format:"ends_with",...te(t),suffix:e})}function is(e){return new hb({check:"overwrite",tx:e})}function K0(e){return is(t=>t.normalize(e))}function J0(){return is(e=>e.trim())}function Y0(){return is(e=>e.toLowerCase())}function X0(){return is(e=>e.toUpperCase())}function Q0(){return is(e=>ay(e))}function ew(e,t,n){return new e({type:"array",element:t,...te(n)})}function tw(e,t,n){return new e({type:"custom",check:"custom",fn:t,...te(n)})}function nw(e){const t=rw(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(ei(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(ei(s))}},e(n.value,n)));return t}function rw(e,t){const n=new At({check:"custom",...te(t)});return n._zod.check=e,n}function bp(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Es,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Ke(e,t,n={path:[],schemaPath:[]}){var c,f;var r;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const a=(f=(c=e._zod).toJSONSchema)==null?void 0:f.call(c);if(a)o.schema=a;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,d);else{const p=o.schema,g=t.processors[s.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);g(e,t,p,d)}const h=e._zod.parent;h&&(o.ref||(o.ref=h),Ke(h,t,d),t.seen.get(h).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&>(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function wp(e,t){var o,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const f=(o=e.metadataRegistry.get(c[0]))==null?void 0:o.id;if(f){const d=r.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,c[0])}}const s=c=>{var g;const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(g=e.external.registry.get(c[0]))==null?void 0:g.id,k=e.external.uri??(S=>S);if(y)return{ref:k(y)};const b=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=b,{defId:b,ref:`${k("__shared")}#/${f}/${b}`}}if(c[1]===n)return{ref:"#"};const h=`#/${f}/`,p=c[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},i=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const g in p)delete p[g];p.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${(a=f.cycle)==null?void 0:a.join("/")}/<root>
|
|
70
70
|
|
|
71
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){i(c);continue}if(e.external){const h=(l=e.external.registry.get(c[0]))==null?void 0:l.id;if(t!==c[0]&&h){i(c);continue}}if((u=e.metadataRegistry.get(c[0]))==null?void 0:u.id){i(c);continue}if(f.cycle){i(c);continue}if(f.count>1&&e.reused==="ref"){i(c);continue}}}function bp(e,t){var o,a,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const f=c.def??c.schema,d={...f},h=c.ref;if(c.ref=null,h){r(h);const g=e.seen.get(h),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(y)):Object.assign(f,y),Object.assign(f,d),u._zod.parent===h)for(const b in f)b==="$ref"||b==="allOf"||b in d||delete f[b];if(y.$ref&&g.def)for(const b in f)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(f[b])===JSON.stringify(g.def[b])&&delete f[b]}const p=u._zod.parent;if(p&&p!==h){r(p);const g=e.seen.get(p);if(g!=null&&g.schema.$ref&&(f.$ref=g.schema.$ref,g.def))for(const y in f)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(f[y])===JSON.stringify(g.def[y])&&delete f[y]}e.override({zodSchema:u,jsonSchema:f,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(o=e.external)!=null&&o.uri){const u=(a=e.external.registry.get(t))==null?void 0:a.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:co(t,"input",e.processors),output:co(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function gt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return gt(r.element,n);if(r.type==="set")return gt(r.valueType,n);if(r.type==="lazy")return gt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return gt(r.innerType,n);if(r.type==="intersection")return gt(r.left,n)||gt(r.right,n);if(r.type==="record"||r.type==="map")return gt(r.keyType,n)||gt(r.valueType,n);if(r.type==="pipe")return gt(r.in,n)||gt(r.out,n);if(r.type==="object"){for(const s in r.shape)if(gt(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(gt(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(gt(s,n))return!0;return!!(r.rest&>(r.rest,n))}return!1}const ew=(e,t={})=>n=>{const r=mp({...n,processors:t});return Ke(e,r),yp(r,e),bp(r,e)},co=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},o=mp({...s??{},target:i,io:t,processors:n});return Ke(e,o),yp(o,e),bp(o,e)},tw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nw=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:o,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof o=="number"&&(s.maxLength=o),a&&(s.format=tw[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),u&&(s.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},rw=(e,t,n,r)=>{const s=n,{minimum:i,maximum:o,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof i=="number"&&(s.minimum=i,typeof c=="number"&&t.target!=="draft-04"&&(c>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof o=="number"&&(s.maximum=o,typeof u=="number"&&t.target!=="draft-04"&&(u<=o?delete s.maximum:delete s.exclusiveMaximum)),typeof l=="number"&&(s.multipleOf=l)},sw=(e,t,n,r)=>{n.type="boolean"},iw=(e,t,n,r)=>{n.not={}},ow=(e,t,n,r)=>{},aw=(e,t,n,r)=>{},lw=(e,t,n,r)=>{const s=e._zod.def,i=Xh(s.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},cw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},uw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},fw=(e,t,n,r)=>{const s=n,i=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(s.minItems=o),typeof a=="number"&&(s.maxItems=a),s.type="array",s.items=Ke(i.element,t,{...r,path:[...r.path,"items"]})},dw=(e,t,n,r)=>{var u;const s=n,i=e._zod.def;s.type="object",s.properties={};const o=i.shape;for(const c in o)s.properties[c]=Ke(o[c],t,{...r,path:[...r.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const f=i.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(s.required=Array.from(l)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Ke(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},hw=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,o=s.options.map((a,l)=>Ke(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=o:n.anyOf=o},pw=(e,t,n,r)=>{const s=e._zod.def,i=Ke(s.left,t,{...r,path:[...r.path,"allOf",0]}),o=Ke(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=l},gw=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object";const o=i.keyType,a=o._zod.bag,l=a==null?void 0:a.patterns;if(i.mode==="loose"&&l&&l.size>0){const c=Ke(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const f of l)s.patternProperties[f.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Ke(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Ke(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=o._zod.values;if(u){const c=[...u].filter(f=>typeof f=="string"||typeof f=="number");c.length>0&&(s.required=c)}},_w=(e,t,n,r)=>{const s=e._zod.def,i=Ke(s.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},vw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},mw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},yw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},bw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType;let o;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},ww=(e,t,n,r)=>{const s=e._zod.def,i=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;Ke(i,t,r);const o=t.seen.get(e);o.ref=i},Ew=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},wp=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Sw=O("ZodISODateTime",(e,t)=>{Sb.init(e,t),ze.init(e,t)});function kw(e){return C0(Sw,e)}const Tw=O("ZodISODate",(e,t)=>{kb.init(e,t),ze.init(e,t)});function Ow(e){return R0(Tw,e)}const xw=O("ZodISOTime",(e,t)=>{Tb.init(e,t),ze.init(e,t)});function Aw(e){return I0(xw,e)}const Cw=O("ZodISODuration",(e,t)=>{Ob.init(e,t),ze.init(e,t)});function Rw(e){return P0(Cw,e)}const Iw=(e,t)=>{np.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>_y(e,n)},flatten:{value:n=>gy(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,tl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,tl,2)}},isEmpty:{get(){return e.issues.length===0}}})},Vt=O("ZodError",Iw,{Parent:Error}),Pw=dc(Vt),Nw=hc(Vt),$w=Ho(Vt),Dw=Go(Vt),Mw=yy(Vt),Fw=by(Vt),Lw=wy(Vt),zw=Ey(Vt),Uw=Sy(Vt),jw=ky(Vt),Bw=Ty(Vt),Vw=Oy(Vt),Le=O("ZodType",(e,t)=>(Fe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:co(e,"input"),output:co(e,"output")}}),e.toJSONSchema=ew(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(nr(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>rr(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>Pw(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>$w(e,n,r),e.parseAsync=async(n,r)=>Nw(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Dw(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Mw(e,n,r),e.decode=(n,r)=>Fw(e,n,r),e.encodeAsync=async(n,r)=>Lw(e,n,r),e.decodeAsync=async(n,r)=>zw(e,n,r),e.safeEncode=(n,r)=>Uw(e,n,r),e.safeDecode=(n,r)=>jw(e,n,r),e.safeEncodeAsync=async(n,r)=>Bw(e,n,r),e.safeDecodeAsync=async(n,r)=>Vw(e,n,r),e.refine=(n,r)=>e.check(ME(n,r)),e.superRefine=n=>e.check(FE(n)),e.overwrite=n=>e.check(is(n)),e.optional=()=>Wu(e),e.exactOptional=()=>SE(e),e.nullable=()=>qu(e),e.nullish=()=>Wu(qu(e)),e.nonoptional=n=>CE(e,n),e.array=()=>Op(e),e.or=n=>xp([e,n]),e.and=n=>mE(e,n),e.transform=n=>Ku(e,wE(n)),e.default=n=>OE(e,n),e.prefault=n=>AE(e,n),e.catch=n=>IE(e,n),e.pipe=n=>Ku(e,n),e.readonly=()=>$E(e),e.describe=n=>{const r=e.clone();return Es.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Es.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Es.get(e);const r=e.clone();return Es.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Ep=O("_ZodString",(e,t)=>{pc.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>nw(e,r,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(z0(...r)),e.includes=(...r)=>e.check(B0(...r)),e.startsWith=(...r)=>e.check(V0(...r)),e.endsWith=(...r)=>e.check(Z0(...r)),e.min=(...r)=>e.check(lo(...r)),e.max=(...r)=>e.check(_p(...r)),e.length=(...r)=>e.check(vp(...r)),e.nonempty=(...r)=>e.check(lo(1,...r)),e.lowercase=r=>e.check(U0(r)),e.uppercase=r=>e.check(j0(r)),e.trim=()=>e.check(G0()),e.normalize=(...r)=>e.check(H0(...r)),e.toLowerCase=()=>e.check(W0()),e.toUpperCase=()=>e.check(q0()),e.slugify=()=>e.check(K0())}),Zw=O("ZodString",(e,t)=>{pc.init(e,t),Ep.init(e,t),e.email=n=>e.check(l0(Hw,n)),e.url=n=>e.check(h0(Gw,n)),e.jwt=n=>e.check(A0(aE,n)),e.emoji=n=>e.check(p0(Ww,n)),e.guid=n=>e.check(Uu(Zu,n)),e.uuid=n=>e.check(c0(xi,n)),e.uuidv4=n=>e.check(u0(xi,n)),e.uuidv6=n=>e.check(f0(xi,n)),e.uuidv7=n=>e.check(d0(xi,n)),e.nanoid=n=>e.check(g0(qw,n)),e.guid=n=>e.check(Uu(Zu,n)),e.cuid=n=>e.check(_0(Kw,n)),e.cuid2=n=>e.check(v0(Jw,n)),e.ulid=n=>e.check(m0(Yw,n)),e.base64=n=>e.check(T0(sE,n)),e.base64url=n=>e.check(O0(iE,n)),e.xid=n=>e.check(y0(Xw,n)),e.ksuid=n=>e.check(b0(Qw,n)),e.ipv4=n=>e.check(w0(eE,n)),e.ipv6=n=>e.check(E0(tE,n)),e.cidrv4=n=>e.check(S0(nE,n)),e.cidrv6=n=>e.check(k0(rE,n)),e.e164=n=>e.check(x0(oE,n)),e.datetime=n=>e.check(kw(n)),e.date=n=>e.check(Ow(n)),e.time=n=>e.check(Aw(n)),e.duration=n=>e.check(Rw(n))});function ae(e){return a0(Zw,e)}const ze=O("ZodStringFormat",(e,t)=>{$e.init(e,t),Ep.init(e,t)}),Hw=O("ZodEmail",(e,t)=>{pb.init(e,t),ze.init(e,t)}),Zu=O("ZodGUID",(e,t)=>{db.init(e,t),ze.init(e,t)}),xi=O("ZodUUID",(e,t)=>{hb.init(e,t),ze.init(e,t)}),Gw=O("ZodURL",(e,t)=>{gb.init(e,t),ze.init(e,t)}),Ww=O("ZodEmoji",(e,t)=>{_b.init(e,t),ze.init(e,t)}),qw=O("ZodNanoID",(e,t)=>{vb.init(e,t),ze.init(e,t)}),Kw=O("ZodCUID",(e,t)=>{mb.init(e,t),ze.init(e,t)}),Jw=O("ZodCUID2",(e,t)=>{yb.init(e,t),ze.init(e,t)}),Yw=O("ZodULID",(e,t)=>{bb.init(e,t),ze.init(e,t)}),Xw=O("ZodXID",(e,t)=>{wb.init(e,t),ze.init(e,t)}),Qw=O("ZodKSUID",(e,t)=>{Eb.init(e,t),ze.init(e,t)}),eE=O("ZodIPv4",(e,t)=>{xb.init(e,t),ze.init(e,t)}),tE=O("ZodIPv6",(e,t)=>{Ab.init(e,t),ze.init(e,t)}),nE=O("ZodCIDRv4",(e,t)=>{Cb.init(e,t),ze.init(e,t)}),rE=O("ZodCIDRv6",(e,t)=>{Rb.init(e,t),ze.init(e,t)}),sE=O("ZodBase64",(e,t)=>{Ib.init(e,t),ze.init(e,t)}),iE=O("ZodBase64URL",(e,t)=>{Nb.init(e,t),ze.init(e,t)}),oE=O("ZodE164",(e,t)=>{$b.init(e,t),ze.init(e,t)}),aE=O("ZodJWT",(e,t)=>{Mb.init(e,t),ze.init(e,t)}),Sp=O("ZodNumber",(e,t)=>{dp.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>rw(e,r,s),e.gt=(r,s)=>e.check(Bu(r,s)),e.gte=(r,s)=>e.check(ha(r,s)),e.min=(r,s)=>e.check(ha(r,s)),e.lt=(r,s)=>e.check(ju(r,s)),e.lte=(r,s)=>e.check(da(r,s)),e.max=(r,s)=>e.check(da(r,s)),e.int=r=>e.check(Hu(r)),e.safe=r=>e.check(Hu(r)),e.positive=r=>e.check(Bu(0,r)),e.nonnegative=r=>e.check(ha(0,r)),e.negative=r=>e.check(ju(0,r)),e.nonpositive=r=>e.check(da(0,r)),e.multipleOf=(r,s)=>e.check(Vu(r,s)),e.step=(r,s)=>e.check(Vu(r,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Rt(e){return N0(Sp,e)}const lE=O("ZodNumberFormat",(e,t)=>{Fb.init(e,t),Sp.init(e,t)});function Hu(e){return $0(lE,e)}const cE=O("ZodBoolean",(e,t)=>{Lb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sw(e,n,r)});function kp(e){return D0(cE,e)}const uE=O("ZodAny",(e,t)=>{zb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ow()});function Tp(){return M0(uE)}const fE=O("ZodUnknown",(e,t)=>{Ub.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>aw()});function Gu(){return F0(fE)}const dE=O("ZodNever",(e,t)=>{jb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>iw(e,n,r)});function hE(e){return L0(dE,e)}const pE=O("ZodArray",(e,t)=>{Bb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>fw(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(lo(n,r)),e.nonempty=n=>e.check(lo(1,n)),e.max=(n,r)=>e.check(_p(n,r)),e.length=(n,r)=>e.check(vp(n,r)),e.unwrap=()=>e.element});function Op(e,t){return J0(pE,e,t)}const gE=O("ZodObject",(e,t)=>{Zb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>dw(e,n,r,s),ke(e,"shape",()=>t.shape),e.keyof=()=>gi(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gu()}),e.strict=()=>e.clone({...e._zod.def,catchall:hE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>uy(e,n),e.safeExtend=n=>fy(e,n),e.merge=n=>dy(e,n),e.pick=n=>ly(e,n),e.omit=n=>cy(e,n),e.partial=(...n)=>hy(Ap,e,n[0]),e.required=(...n)=>py(Cp,e,n[0])});function Bt(e,t){const n={type:"object",shape:e??{},...te(t)};return new gE(n)}const _E=O("ZodUnion",(e,t)=>{Hb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>hw(e,n,r,s),e.options=t.options});function xp(e,t){return new _E({type:"union",options:e,...te(t)})}const vE=O("ZodIntersection",(e,t)=>{Gb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>pw(e,n,r,s)});function mE(e,t){return new vE({type:"intersection",left:e,right:t})}const yE=O("ZodRecord",(e,t)=>{Wb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>gw(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function gc(e,t,n){return new yE({type:"record",keyType:e,valueType:t,...te(n)})}const rl=O("ZodEnum",(e,t)=>{qb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>lw(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const i={};for(const o of r)if(n.has(o))i[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new rl({...t,checks:[],...te(s),entries:i})},e.exclude=(r,s)=>{const i={...t.entries};for(const o of r)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new rl({...t,checks:[],...te(s),entries:i})}});function gi(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new rl({type:"enum",entries:n,...te(t)})}const bE=O("ZodTransform",(e,t)=>{Kb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>uw(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jh(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Qs(i,n.value,t));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(Qs(o))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function wE(e){return new bE({type:"transform",transform:e})}const Ap=O("ZodOptional",(e,t)=>{gp.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>wp(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Wu(e){return new Ap({type:"optional",innerType:e})}const EE=O("ZodExactOptional",(e,t)=>{Jb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>wp(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function SE(e){return new EE({type:"optional",innerType:e})}const kE=O("ZodNullable",(e,t)=>{Yb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>_w(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function qu(e){return new kE({type:"nullable",innerType:e})}const TE=O("ZodDefault",(e,t)=>{Xb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>mw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function OE(e,t){return new TE({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ep(t)}})}const xE=O("ZodPrefault",(e,t)=>{Qb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>yw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function AE(e,t){return new xE({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ep(t)}})}const Cp=O("ZodNonOptional",(e,t)=>{e0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>vw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function CE(e,t){return new Cp({type:"nonoptional",innerType:e,...te(t)})}const RE=O("ZodCatch",(e,t)=>{t0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>bw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function IE(e,t){return new RE({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const PE=O("ZodPipe",(e,t)=>{n0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ww(e,n,r,s),e.in=t.in,e.out=t.out});function Ku(e,t){return new PE({type:"pipe",in:e,out:t})}const NE=O("ZodReadonly",(e,t)=>{r0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ew(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function $E(e){return new NE({type:"readonly",innerType:e})}const DE=O("ZodCustom",(e,t)=>{s0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>cw(e,n)});function ME(e,t={}){return Y0(DE,e,t)}function FE(e){return X0(e)}Bt({filePath:ae()});Bt({id:ae().uuid(),sessionId:ae().uuid().nullable(),type:gi(["image","markdown","text","json","pdf","code"]),content:ae().nullable(),data:ae().nullable(),mimeType:ae().nullable(),filename:ae().nullable(),width:Rt().nullable(),height:Rt().nullable(),createdAt:Rt(),updatedAt:Rt()});Bt({content:ae().min(0)});const Ai='Commit attribution must be in the format "Name <email@example.com>" or "Co-authored-by: Name <email@example.com>".',LE=/^Co-authored-by:\s*/i,zE=/^([^\n<>]+?)\s*<([^\s<>\n@]+@[^\s<>\n@]+\.[^\s<>\n@]+)>$/;function UE(e){if(e==null)return{success:!0,value:null};if(typeof e!="string")return{success:!1,error:Ai};const t=e.trim();if(!t)return{success:!0,value:null};if(t.includes(`
|
|
72
|
-
`)||t.includes("\r"))return{success:!1,error:Ai};const r=t.replace(LE,"").trim().match(zE);if(!r)return{success:!1,error:Ai};const s=r[1].trim(),i=r[2].trim();return!s||!i?{success:!1,error:Ai}:{success:!0,value:`Co-authored-by: ${s} <${i}>`}}const Rp=Tp().transform((e,t)=>{const n=UE(e);return n.success?n.value:(t.addIssue({code:"custom",message:n.error}),ty)}),_c=gi(["anthropic","openai"]);Bt({name:ae().min(1).max(100),kind:_c,baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional(),additionalEnvVars:gc(ae()).nullable().optional(),commitAttributionOverride:Rp.optional()});Bt({name:ae().min(1).max(100).optional(),baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional(),additionalEnvVars:gc(ae()).nullable().optional(),commitAttributionOverride:Rp.optional()}).strict();Bt({id:ae().uuid(),name:ae(),kind:_c,baseUrl:ae().nullable(),authToken:ae().nullable(),apiTimeoutMs:Rt().nullable(),additionalEnvVars:gc(ae()).nullable(),commitAttributionOverride:ae().nullable(),isBuiltIn:kp(),createdAt:Rt(),updatedAt:Rt(),models:Op(Bt({id:ae().uuid(),providerId:ae().uuid(),modelId:ae(),displayName:ae(),description:ae().nullable(),tier:gi(["opus","sonnet","haiku","custom"]),createdAt:Rt()}))});Bt({modelId:ae().min(1),displayName:ae().min(1).max(100),description:ae().nullable().optional(),tier:gi(["opus","sonnet","haiku","custom"]).nullable().optional()});Bt({id:ae().uuid(),providerId:ae().uuid(),modelId:ae(),displayName:ae(),description:ae().nullable(),tier:ae().nullable(),createdAt:Rt()});Bt({kind:_c,baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),defaultSonnetModel:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional()});Bt({success:kp(),message:ae(),details:Bt({model:ae().optional(),usage:Tp().optional(),code:xp([ae(),Rt()]).optional(),type:ae().optional()}).optional()});let jE=0;const BE=Jm("ui",{state:()=>({toasts:[],modalOpen:null,loading:!1}),actions:{addToast(e,t,n=ey){const r=++jE;return this.toasts.push({id:r,type:e,message:t}),n>0&&setTimeout(()=>{this.removeToast(r)},n),r},removeToast(e){this.toasts=this.toasts.filter(t=>t.id!==e)},success(e){return this.addToast("success",e)},error(e){return this.addToast("error",e)},warning(e){return this.addToast("warning",e)},info(e){return this.addToast("info",e)},openModal(e){this.modalOpen=e},closeModal(){this.modalOpen=null},setLoading(e){this.loading=e}}}),_i=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},VE={class:"toast-container"},ZE={class:"toast-icon"},HE={key:0},GE={key:1},WE={key:2},qE={key:3},KE={class:"toast-message"},JE=["onClick"],YE={__name:"ToastContainer",setup(e){const t=BE(),n=Re(()=>t.toasts);return(r,s)=>(Ne(),di(oh,{to:"body"},[G("div",VE,[Ie(km,{name:"toast"},{default:Ks(()=>[(Ne(!0),tt(ht,null,lv(n.value,i=>(Ne(),tt("div",{key:i.id,class:pr(["toast",`toast-${i.type}`])},[G("span",ZE,[i.type==="success"?(Ne(),tt("span",HE,"✓")):i.type==="error"?(Ne(),tt("span",GE,"✗")):i.type==="warning"?(Ne(),tt("span",WE,"⚠")):(Ne(),tt("span",qE,"ℹ"))]),G("span",KE,St(i.message),1),G("button",{class:"toast-close",onClick:o=>Ft(t).removeToast(i.id)}," × ",8,JE)],2))),128))]),_:1})])]))}},XE=_i(YE,[["__scopeId","data-v-33c0e27f"]]),Tr=new Map;function QE(e,t,n){return(r,s,i)=>o=>{const a=l=>{s.filter(l)&&o(...s.args(l))};return e(r,a,i==null?void 0:i.replaySessionId),()=>t(r,a)}}function eS(e,t,n){const r=i=>i.sessionId===n,s=QE(e,t);return{onStatus:s(Y.SESSION_STATUS,{filter:r,args:i=>[i.status]}),onMessage:s(Y.SESSION_MESSAGE,{filter:i=>{var o;return((o=i.message)==null?void 0:o.sessionId)===n},args:i=>[i.message]}),onError:s(Y.SESSION_ERROR,{filter:r,args:i=>[i.error]}),onCanvasAdd:s(Y.CANVAS_ADD,{filter:i=>{var o;return((o=i.item)==null?void 0:o.sessionId)===n},args:i=>[i.item]}),onCanvasRemove:s(Y.CANVAS_REMOVE,{filter:r,args:i=>[i.itemId]}),onCanvasUpdate:s(Y.CANVAS_UPDATE,{filter:i=>{var o;return((o=i.item)==null?void 0:o.sessionId)===n},args:i=>[i.item]}),onPartial:s(Y.SESSION_PARTIAL,{filter:r,args:i=>[i.text]}),onTodosUpdate:s(Y.TODOS_UPDATE,{filter:r,args:i=>[i.todos,i.conversationId]}),onWorkLog:s(Y.SESSION_WORK_LOG,{filter:i=>r(i)&&i.log,args:i=>[i.log]}),onWorkLogsAssociated:s(Y.SESSION_WORK_LOGS_ASSOCIATED,{filter:r,args:i=>[i.messageId]}),onThinkingPartial:s(Y.SESSION_THINKING_PARTIAL,{filter:r,args:i=>[i.thinking]}),onSummaryUpdate:s(Y.SESSION_SUMMARY_UPDATED,{filter:r,args:i=>[i.summary]}),onSummaryGenerating:s(Y.SESSION_SUMMARY_GENERATING,{filter:r,args:i=>[i.generating]}),onSessionUpdate:s(Y.SESSION_UPDATED,{filter:r,args:i=>[i.session]}),onConversationCreated:s(Y.CONVERSATION_CREATED,{filter:r,args:i=>[i.conversation]}),onConversationUpdated:s(Y.CONVERSATION_UPDATED,{filter:r,args:i=>[i.conversation]}),onConversationDeleted:s(Y.CONVERSATION_DELETED,{filter:r,args:i=>[i.conversationId,i.newActiveConversation]}),onUsageUpdate:s(Y.SESSION_USAGE_UPDATE,{filter:r,args:i=>[i]},{replaySessionId:n}),onCommandOutput:s(Y.COMMAND_RUN_OUTPUT,{filter:r,args:i=>[i.runId,i.buttonId,i.output]}),onCommandComplete:s(Y.COMMAND_RUN_COMPLETE,{filter:r,args:i=>[i.runId,i.buttonId,i.exitCode,i.output]}),onCommandError:s(Y.COMMAND_RUN_ERROR,{filter:r,args:i=>[i.runId,i.buttonId,i.error||i.message]}),onCommandRunDeleted:s(Y.COMMAND_RUN_DELETED,{filter:r,args:i=>[i.runId,i.buttonId]}),onChangesUpdate:s(Y.CHANGES_UPDATE,{filter:r,args:i=>[i.changeCount,i.hasChanges]})}}function Jx(e){const{send:t,on:n,off:r,clearSessionBuffer:s}=vi();let i=!1;const o=()=>{if(i)return;i=!0;const u=Tr.get(e)||0;Tr.set(e,u+1),u===0&&t(Y.SUBSCRIBE_SESSION,{sessionId:e})},a=()=>{if(!i)return;i=!1;const u=Tr.get(e)||0;u<=1?(Tr.delete(e),t(Y.UNSUBSCRIBE_SESSION,{sessionId:e}),s(e)):Tr.set(e,u-1)},l=eS(n,r,e);return tr(()=>{a()}),{subscribe:o,unsubscribe:a,...l}}const sl=new Set;function Yx(e){const{send:t,on:n,off:r}=vi(),s=()=>{sl.add(e),t(Y.SUBSCRIBE_PROJECT,{projectId:e})},i=()=>{sl.delete(e),t(Y.UNSUBSCRIBE_PROJECT,{projectId:e})},o=S=>E=>{const m=N=>{N.projectId===e&&E(N.session)};return n(S,m),()=>r(S,m)},a=o(Y.SESSION_CREATED),l=o(Y.SESSION_UPDATED),u=S=>{const E=m=>{m.projectId===e&&S(m.sessionId)};return n(Y.SESSION_DELETED,E),()=>r(Y.SESSION_DELETED,E)},c=S=>{const E=m=>{m.projectId===e&&S(m.sessionId,m.summary)};return n(Y.SESSION_SUMMARY_UPDATED,E),()=>r(Y.SESSION_SUMMARY_UPDATED,E)},f=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.output)};return n(Y.COMMAND_RUN_OUTPUT,E),()=>r(Y.COMMAND_RUN_OUTPUT,E)},d=S=>{const E=m=>{m.projectId===e&&S({runId:m.runId,sessionId:m.sessionId,buttonId:m.buttonId,exitCode:m.exitCode,output:m.output,status:m.status})};return n(Y.COMMAND_RUN_COMPLETE,E),()=>r(Y.COMMAND_RUN_COMPLETE,E)},h=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.error)};return n(Y.COMMAND_RUN_ERROR,E),()=>r(Y.COMMAND_RUN_ERROR,E)},p=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId)};return n(Y.COMMAND_RUN_DELETED,E),()=>r(Y.COMMAND_RUN_DELETED,E)},g=S=>{const E=m=>{m.projectId===e&&S(m.board)};return n(Y.KANBAN_BOARD_UPDATED,E),()=>r(Y.KANBAN_BOARD_UPDATED,E)},y=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.fromLaneId,m.toLaneId,m.card)};return n(Y.KANBAN_CARD_MOVED,E),()=>r(Y.KANBAN_CARD_MOVED,E)},T=S=>{const E=m=>{m.projectId===e&&S(m.card,m.laneId)};return n(Y.KANBAN_CARD_ADDED,E),()=>r(Y.KANBAN_CARD_ADDED,E)},b=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.laneId)};return n(Y.KANBAN_CARD_REMOVED,E),()=>r(Y.KANBAN_CARD_REMOVED,E)};return tr(()=>{i()}),{subscribe:s,unsubscribe:i,onSessionCreated:a,onSessionUpdated:l,onSessionDeleted:u,onSessionSummaryUpdated:c,onCommandRunOutput:f,onCommandRunComplete:d,onCommandRunError:h,onCommandRunDeleted:p,onKanbanBoardUpdated:g,onKanbanCardMoved:y,onKanbanCardAdded:T,onKanbanCardRemoved:b}}let pe=null,Zi=null,Ci=Kh,Ju=!1;const Us=new Map,uo=Nt(!1),js=Nt("disconnected"),fo=Nt(0),wn=new Map,ho=[],il=new Set;function tS(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function qo(){(pe==null?void 0:pe.readyState)!==WebSocket.OPEN&&(pe=new WebSocket(tS()),pe.onopen=()=>{for(console.log("WebSocket connected"),uo.value=!0,js.value="connected",fo.value=0,Ci=Kh;ho.length>0;){const e=ho.shift();pe.send(e)}for(const e of Tr.keys())pe.send(el(Y.SUBSCRIBE_SESSION,{sessionId:e}));for(const e of sl)pe.send(el(Y.SUBSCRIBE_PROJECT,{projectId:e}));if(Ju)for(const e of il)e();Ju=!0},pe.onmessage=e=>{const t=Xm(e.data);if(!t)return;const n=Us.get(t.type);if(t.type===Y.SESSION_USAGE_UPDATE&&(!n||n.size===0)){const r=t.sessionId;wn.has(r)||wn.set(r,[]),wn.get(r).push(t),wn.get(r).length>100&&wn.get(r).shift();return}if(n)for(const r of n)r(t)},pe.onclose=e=>{if(console.log("WebSocket closed",e.code),uo.value=!1,pe=null,e.code===1e3){js.value="disconnected";return}js.value="reconnecting",fo.value++,Zi=setTimeout(()=>{Ci=Math.min(Ci*2,Qm),qo()},Ci)},pe.onerror=e=>{console.error("WebSocket error:",e)})}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(!pe||pe.readyState!==WebSocket.OPEN)&&(pe&&(pe.onclose=null,pe.close(),pe=null),js.value="reconnecting",fo.value++,qo())});function nS(e){return il.add(e),()=>il.delete(e)}function rS(){Zi&&(clearTimeout(Zi),Zi=null),pe&&(pe.close(1e3),pe=null),wn.clear(),ho.length=0}function sS(e){wn.delete(e)}function Ip(e,t){const n=el(e,t);(pe==null?void 0:pe.readyState)===WebSocket.OPEN?pe.send(n):(ho.push(n),pe||qo())}function iS(e,t,n=null){if(Us.has(e)||Us.set(e,new Set),Us.get(e).add(t),e===Y.SESSION_USAGE_UPDATE&&n){const r=wn.get(n);if(r&&r.length>0){for(const s of r)t(s);wn.delete(n)}}}function oS(e,t){const n=Us.get(e);n&&n.delete(t)}function vi(){return pe||qo(),{isConnected:uo,connectionStatus:js,reconnectAttempt:fo,send:Ip,on:iS,off:oS,disconnect:rS,clearSessionBuffer:sS,onReconnect:nS}}async function Xx(e){const{send:t}=vi();if((pe==null?void 0:pe.readyState)===WebSocket.OPEN){t(Y.SUBSCRIBE_SESSION,{sessionId:e});return}return pe&&pe.readyState!==WebSocket.CONNECTING&&(pe.onclose=null,pe.close(),pe=null),Ip(Y.SUBSCRIBE_SESSION,{sessionId:e}),new Promise((n,r)=>{let s=!1;const i=setTimeout(()=>{s=!0,r(new Error(`Subscription timeout for session ${e}`))},5e3),o=()=>{s||(uo.value?(s=!0,clearTimeout(i),n()):setTimeout(o,100))};o()})}function Hi(e){return e>=80?"var(--color-error)":e>=60?"var(--color-warning)":"var(--color-success)"}const aS={class:"modal-content"},lS={class:"modal-header"},cS={class:"modal-title","data-testid":"stat-detail-title"},uS={class:"modal-body"},fS={key:0,class:"stat-unavailable"},dS={key:1,class:"stat-details"},hS={class:"stat-bar-track"},pS={class:"stat-status-row"},gS={class:"stat-detail-rows"},_S={class:"stat-detail-row","data-testid":"stat-detail-row-cores"},vS={class:"detail-value"},mS={class:"stat-detail-row","data-testid":"stat-detail-row-model"},yS={class:"detail-value"},bS={class:"stat-detail-row","data-testid":"stat-detail-row-used"},wS={class:"detail-value"},ES={class:"stat-detail-row","data-testid":"stat-detail-row-total"},SS={class:"detail-value"},kS={class:"stat-detail-row","data-testid":"stat-detail-row-free"},TS={class:"detail-value"},OS={class:"stat-detail-row","data-testid":"stat-detail-row-free"},xS={class:"detail-value"},AS={class:"stat-detail-row","data-testid":"stat-detail-row-total"},CS={class:"detail-value"},RS={class:"stat-detail-row","data-testid":"stat-detail-row-used"},IS={class:"detail-value"},PS={__name:"SystemStatDetailModal",props:{isOpen:Boolean,statType:{type:String,validator:e=>["cpu","memory","disk",null].includes(e),default:null},metrics:{type:Object,required:!0}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,s=Re(()=>{switch(n.statType){case"cpu":return"CPU Usage";case"memory":return"Memory Usage";case"disk":return"Disk Usage";default:return""}}),i=Re(()=>{switch(n.statType){case"cpu":return Math.round(n.metrics.cpu.usagePercent*10)/10;case"memory":return Math.round(n.metrics.memory.usedPercent*10)/10;case"disk":return n.metrics.disk?Math.round(n.metrics.disk.usedPercent*10)/10:0;default:return 0}}),o=Re(()=>Hi(i.value)),a=Re(()=>{const d=i.value;return d>=80?"High":d>=60?"Elevated":"Normal"}),l=Re(()=>n.metrics.memory.totalGB-n.metrics.memory.usedGB),u=Re(()=>n.metrics.disk?n.metrics.disk.totalGB-n.metrics.disk.freeGB:0);function c(){r("close")}function f(d){d.key==="Escape"&&n.isOpen&&c()}return ss(()=>{window.addEventListener("keydown",f)}),tr(()=>{window.removeEventListener("keydown",f)}),(d,h)=>(Ne(),di(oh,{to:"body"},[e.isOpen?(Ne(),tt("div",{key:0,class:"modal-backdrop","data-testid":"system-stat-modal",onClick:Mm(c,["self"]),onKeydown:Lm(f,["escape"])},[G("div",aS,[G("div",lS,[G("h2",cS,St(s.value),1),G("button",{class:"close-btn","aria-label":"Close",onClick:c}," × ")]),G("div",uS,[e.statType==="disk"&&!e.metrics.disk?(Ne(),tt("div",fS," Disk data unavailable ")):(Ne(),tt("div",dS,[G("div",{class:"stat-percentage","data-testid":"stat-detail-percentage",style:On({color:o.value})},St(i.value)+"% ",5),G("div",hS,[G("div",{class:"stat-bar-fill","data-testid":"stat-detail-bar",style:On({width:`${i.value}%`,backgroundColor:o.value})},null,4)]),G("div",pS,[G("span",{class:"stat-status","data-testid":"stat-detail-status",style:On({color:o.value})},St(a.value),5)]),G("div",gS,[e.statType==="cpu"?(Ne(),tt(ht,{key:0},[G("div",_S,[h[0]||(h[0]=G("span",{class:"detail-label"},"Cores",-1)),G("span",vS,St(e.metrics.cpu.coreCount),1)]),G("div",mS,[h[1]||(h[1]=G("span",{class:"detail-label"},"Model",-1)),G("span",yS,St(e.metrics.cpu.model),1)])],64)):Zn("",!0),e.statType==="memory"?(Ne(),tt(ht,{key:1},[G("div",bS,[h[2]||(h[2]=G("span",{class:"detail-label"},"Used",-1)),G("span",wS,St(e.metrics.memory.usedGB.toFixed(1))+" GB",1)]),G("div",ES,[h[3]||(h[3]=G("span",{class:"detail-label"},"Total",-1)),G("span",SS,St(e.metrics.memory.totalGB.toFixed(1))+" GB",1)]),G("div",kS,[h[4]||(h[4]=G("span",{class:"detail-label"},"Free",-1)),G("span",TS,St(l.value.toFixed(1))+" GB",1)])],64)):Zn("",!0),e.statType==="disk"&&e.metrics.disk?(Ne(),tt(ht,{key:2},[G("div",OS,[h[5]||(h[5]=G("span",{class:"detail-label"},"Free",-1)),G("span",xS,St(e.metrics.disk.freeGB.toFixed(1))+" GB",1)]),G("div",AS,[h[6]||(h[6]=G("span",{class:"detail-label"},"Total",-1)),G("span",CS,St(e.metrics.disk.totalGB.toFixed(1))+" GB",1)]),G("div",RS,[h[7]||(h[7]=G("span",{class:"detail-label"},"Used",-1)),G("span",IS,St(u.value.toFixed(1))+" GB",1)])],64)):Zn("",!0)])]))]),G("div",{class:"modal-footer"},[G("button",{class:"btn btn-secondary",onClick:c}," Close ")])])],32)):Zn("",!0)]))}},NS=_i(PS,[["__scopeId","data-v-4efd7d7f"]]),$S=["title"],DS={key:1,class:"system-indicators","data-testid":"system-indicators"},MS=["title"],FS={class:"indicator-bar-track"},LS=["title"],zS={class:"indicator-bar-track"},US=["title"],jS={class:"indicator-bar-track"},BS={__name:"SystemIndicators",setup(e){const{on:t,off:n,connectionStatus:r,reconnectAttempt:s}=vi(),i=Nt(null),o=Re(()=>i.value!==null),a=Nt(null),l=Re(()=>r.value==="reconnecting"?"dot-amber dot-pulse":r.value==="disconnected"?"dot-red":""),u=Re(()=>{if(r.value==="reconnecting"){const f=s.value;return`Reconnecting${f>0?` (attempt ${f})`:""}...`}return r.value==="disconnected"?"Disconnected":""});function c(f){i.value=f}return ss(()=>{t(Y.SYSTEM_METRICS,c)}),tr(()=>{n(Y.SYSTEM_METRICS,c)}),(f,d)=>(Ne(),tt(ht,null,[Ft(r)!=="connected"?(Ne(),tt("span",{key:0,class:pr(["connection-status-dot",l.value]),title:u.value,"data-testid":"connection-status-dot"},null,10,$S)):Zn("",!0),o.value?(Ne(),tt("div",DS,[G("div",{class:"indicator","data-testid":"indicator-cpu",title:`CPU: ${Math.round(i.value.cpu.usagePercent)}%`,onClick:d[0]||(d[0]=h=>a.value="cpu")},[d[4]||(d[4]=nu('<svg class="indicator-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-f8935b47><rect x="4" y="4" width="16" height="16" rx="2" ry="2" data-v-f8935b47></rect><rect x="9" y="9" width="6" height="6" data-v-f8935b47></rect><line x1="9" y1="1" x2="9" y2="4" data-v-f8935b47></line><line x1="15" y1="1" x2="15" y2="4" data-v-f8935b47></line><line x1="9" y1="20" x2="9" y2="23" data-v-f8935b47></line><line x1="15" y1="20" x2="15" y2="23" data-v-f8935b47></line><line x1="20" y1="9" x2="23" y2="9" data-v-f8935b47></line><line x1="20" y1="14" x2="23" y2="14" data-v-f8935b47></line><line x1="1" y1="9" x2="4" y2="9" data-v-f8935b47></line><line x1="1" y1="14" x2="4" y2="14" data-v-f8935b47></line></svg>',1)),G("div",FS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-cpu",style:On({width:`${i.value.cpu.usagePercent}%`,backgroundColor:Ft(Hi)(i.value.cpu.usagePercent)})},null,4)])],8,MS),G("div",{class:"indicator","data-testid":"indicator-memory",title:`RAM: ${i.value.memory.usedGB.toFixed(1)} / ${i.value.memory.totalGB.toFixed(1)} GB`,onClick:d[1]||(d[1]=h=>a.value="memory")},[d[5]||(d[5]=nu('<svg class="indicator-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-f8935b47><path d="M6 19v-3" data-v-f8935b47></path><path d="M10 19v-3" data-v-f8935b47></path><path d="M14 19v-3" data-v-f8935b47></path><path d="M18 19v-3" data-v-f8935b47></path><path d="M8 11V9" data-v-f8935b47></path><path d="M16 11V9" data-v-f8935b47></path><path d="M12 11V9" data-v-f8935b47></path><path d="M2 15h20" data-v-f8935b47></path><path d="M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z" data-v-f8935b47></path></svg>',1)),G("div",zS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-memory",style:On({width:`${i.value.memory.usedPercent}%`,backgroundColor:Ft(Hi)(i.value.memory.usedPercent)})},null,4)])],8,LS),i.value.disk?(Ne(),tt("div",{key:0,class:"indicator","data-testid":"indicator-disk",title:`Disk: ${Math.round(i.value.disk.freeGB)} GB free`,onClick:d[2]||(d[2]=h=>a.value="disk")},[d[6]||(d[6]=G("svg",{class:"indicator-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[G("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),G("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),G("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)),G("div",jS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-disk",style:On({width:`${i.value.disk.usedPercent}%`,backgroundColor:Ft(Hi)(i.value.disk.usedPercent)})},null,4)])],8,US)):Zn("",!0)])):Zn("",!0),Ie(NS,{"is-open":a.value!==null,"stat-type":a.value,metrics:i.value,onClose:d[3]||(d[3]=h=>a.value=null)},null,8,["is-open","stat-type","metrics"])],64))}},VS=_i(BS,[["__scopeId","data-v-f8935b47"]]),ZS=2e3,{connectionStatus:Pp,reconnectAttempt:HS}=vi(),ol=Nt(!1);let Ri=null;Mr(Pp,e=>{e==="connected"?(clearTimeout(Ri),Ri=null,ol.value=!1):Ri||(Ri=setTimeout(()=>{ol.value=!0},ZS))},{immediate:!0});function GS(){return{isStale:ol,connectionStatus:Pp,reconnectAttempt:HS}}const WS={class:"banner-text"},qS={__name:"ConnectionBanner",setup(e){const{isStale:t,connectionStatus:n,reconnectAttempt:r}=GS(),s=Re(()=>t.value),i=Re(()=>n.value==="reconnecting"?"banner-warning":n.value==="disconnected"?"banner-error":""),o=Re(()=>n.value==="reconnecting"?"dot-pulse":""),a=Re(()=>{if(n.value==="reconnecting"){const l=r.value;return`Connection lost — reconnecting${l>0?` (attempt ${l})`:""}...`}return"Disconnected from server"});return(l,u)=>(Ne(),di(im,{name:"banner-slide"},{default:Ks(()=>[s.value?(Ne(),tt("div",{key:0,class:pr(["connection-banner",i.value]),"data-testid":"connection-banner",role:"alert"},[G("span",{class:pr(["banner-dot",o.value])},null,2),G("span",WS,St(a.value),1)],2)):Zn("",!0)]),_:1}))}},KS=_i(qS,[["__scopeId","data-v-2fc9161b"]]);let zr=null,Ur=null,Bs=null,al=0,ll=null,Gi=0;function Yu(e,t){return Number.isFinite(e)?`${e}px`:t}function JS(){const{offsetTop:e,height:t}=window.visualViewport;return{offsetTop:e,height:t}}function YS(e,t){return e&&t&&e.offsetTop===t.offsetTop&&e.height===t.height}function Np(){if(!window.visualViewport)return null;const e=JS();return document.documentElement.style.setProperty("--viewport-offset-top",Yu(e.offsetTop,"0px")),document.documentElement.style.setProperty("--visual-viewport-height",Yu(e.height,"100dvh")),e}function Ii(){!window.visualViewport||zr||(zr=requestAnimationFrame(()=>{Np(),zr=null}))}function XS(){zr&&(cancelAnimationFrame(zr),zr=null)}function Wi(){Ur&&(cancelAnimationFrame(Ur),Ur=null),Bs&&(clearTimeout(Bs),Bs=null),al=0,ll=null,Gi=0}function QS(e={}){if(!window.visualViewport)return;const{maxDurationMs:t=500,intervalMs:n=50,stableSampleCount:r=2,minDurationMs:s=150}=e;Wi(),al=performance.now();const i=()=>{Ur=null;const o=Np();if(!o){Wi();return}YS(o,ll)?Gi+=1:(Gi=1,ll=o);const a=performance.now()-al;if(Gi>=r&&a>=s||a>=t){Wi();return}Bs=setTimeout(()=>{Bs=null,Ur=requestAnimationFrame(i)},n)};Ur=requestAnimationFrame(i)}function ek(){function e(){Ii()}return ss(()=>{window.visualViewport&&(Ii(),window.visualViewport.addEventListener("scroll",e),window.visualViewport.addEventListener("resize",e))}),tr(()=>{window.visualViewport&&(window.visualViewport.removeEventListener("scroll",e),window.visualViewport.removeEventListener("resize",e)),XS(),Wi()}),{requestVisualViewportUpdate:Ii,requestVisualViewportSettle:QS,updateViewportOffset:Ii}}const tk={class:"app"},nk={class:"container"},rk={class:"nav"},sk={class:"app-main"},ik={__name:"App",setup(e){ek();const t=Nt(null);let n=null;function r(){if(t.value){const i=t.value.offsetHeight;document.documentElement.style.setProperty("--header-height-computed",`${i}px`)}}function s(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}return ss(()=>{s(),typeof ResizeObserver<"u"&&t.value&&(n=new ResizeObserver(()=>{r()}),n.observe(t.value)),window.addEventListener("resize",r),window.addEventListener("orientationchange",s)}),tr(()=>{n&&n.disconnect(),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",s)}),(i,o)=>{const a=Hc("router-link"),l=Hc("router-view");return Ne(),tt("div",tk,[G("header",{ref_key:"headerRef",ref:t,class:"app-header"},[G("div",nk,[Ie(a,{to:"/",class:"logo"},{default:Ks(()=>[...o[0]||(o[0]=[G("img",{src:Ym,alt:"Circus Chief Logo",class:"logo-image"},null,-1),G("span",{class:"logo-text"},"Circus Chief",-1)])]),_:1}),G("nav",rk,[Ie(VS),Ie(a,{to:"/settings",class:"nav-link",title:"Settings"},{default:Ks(()=>[...o[1]||(o[1]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),G("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),G("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),G("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),G("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),G("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),G("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),G("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),G("line",{x1:"17",y1:"16",x2:"23",y2:"16"})],-1)])]),_:1})])])],512),Ie(KS),G("main",sk,[(Ne(),di(l,{key:i.$route.path}))]),Ie(XE)])}}},ok=_i(ik,[["__scopeId","data-v-f51d3e8c"]]),ak="modulepreload",lk=function(e){return"/"+e},Xu={},Xe=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=lk(l),l in Xu)return;Xu[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":ak,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};/*!
|
|
71
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){i(c);continue}if(e.external){const h=(l=e.external.registry.get(c[0]))==null?void 0:l.id;if(t!==c[0]&&h){i(c);continue}}if((u=e.metadataRegistry.get(c[0]))==null?void 0:u.id){i(c);continue}if(f.cycle){i(c);continue}if(f.count>1&&e.reused==="ref"){i(c);continue}}}function Ep(e,t){var o,a,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const f=c.def??c.schema,d={...f},h=c.ref;if(c.ref=null,h){r(h);const g=e.seen.get(h),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(y)):Object.assign(f,y),Object.assign(f,d),u._zod.parent===h)for(const b in f)b==="$ref"||b==="allOf"||b in d||delete f[b];if(y.$ref&&g.def)for(const b in f)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(f[b])===JSON.stringify(g.def[b])&&delete f[b]}const p=u._zod.parent;if(p&&p!==h){r(p);const g=e.seen.get(p);if(g!=null&&g.schema.$ref&&(f.$ref=g.schema.$ref,g.def))for(const y in f)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(f[y])===JSON.stringify(g.def[y])&&delete f[y]}e.override({zodSchema:u,jsonSchema:f,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(o=e.external)!=null&&o.uri){const u=(a=e.external.registry.get(t))==null?void 0:a.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:co(t,"input",e.processors),output:co(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function gt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return gt(r.element,n);if(r.type==="set")return gt(r.valueType,n);if(r.type==="lazy")return gt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return gt(r.innerType,n);if(r.type==="intersection")return gt(r.left,n)||gt(r.right,n);if(r.type==="record"||r.type==="map")return gt(r.keyType,n)||gt(r.valueType,n);if(r.type==="pipe")return gt(r.in,n)||gt(r.out,n);if(r.type==="object"){for(const s in r.shape)if(gt(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(gt(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(gt(s,n))return!0;return!!(r.rest&>(r.rest,n))}return!1}const sw=(e,t={})=>n=>{const r=bp({...n,processors:t});return Ke(e,r),wp(r,e),Ep(r,e)},co=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},o=bp({...s??{},target:i,io:t,processors:n});return Ke(e,o),wp(o,e),Ep(o,e)},iw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ow=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:o,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof o=="number"&&(s.maxLength=o),a&&(s.format=iw[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),u&&(s.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},aw=(e,t,n,r)=>{const s=n,{minimum:i,maximum:o,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof i=="number"&&(s.minimum=i,typeof c=="number"&&t.target!=="draft-04"&&(c>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof o=="number"&&(s.maximum=o,typeof u=="number"&&t.target!=="draft-04"&&(u<=o?delete s.maximum:delete s.exclusiveMaximum)),typeof l=="number"&&(s.multipleOf=l)},lw=(e,t,n,r)=>{n.type="boolean"},cw=(e,t,n,r)=>{n.not={}},uw=(e,t,n,r)=>{},fw=(e,t,n,r)=>{},dw=(e,t,n,r)=>{const s=e._zod.def,i=ep(s.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},hw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},gw=(e,t,n,r)=>{const s=n,i=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(s.minItems=o),typeof a=="number"&&(s.maxItems=a),s.type="array",s.items=Ke(i.element,t,{...r,path:[...r.path,"items"]})},_w=(e,t,n,r)=>{var u;const s=n,i=e._zod.def;s.type="object",s.properties={};const o=i.shape;for(const c in o)s.properties[c]=Ke(o[c],t,{...r,path:[...r.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const f=i.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(s.required=Array.from(l)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Ke(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},vw=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,o=s.options.map((a,l)=>Ke(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=o:n.anyOf=o},mw=(e,t,n,r)=>{const s=e._zod.def,i=Ke(s.left,t,{...r,path:[...r.path,"allOf",0]}),o=Ke(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=l},yw=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object";const o=i.keyType,a=o._zod.bag,l=a==null?void 0:a.patterns;if(i.mode==="loose"&&l&&l.size>0){const c=Ke(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const f of l)s.patternProperties[f.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Ke(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Ke(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=o._zod.values;if(u){const c=[...u].filter(f=>typeof f=="string"||typeof f=="number");c.length>0&&(s.required=c)}},bw=(e,t,n,r)=>{const s=e._zod.def,i=Ke(s.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ww=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Ew=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Sw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Tw=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType;let o;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},kw=(e,t,n,r)=>{const s=e._zod.def,i=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;Ke(i,t,r);const o=t.seen.get(e);o.ref=i},Ow=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},Sp=(e,t,n,r)=>{const s=e._zod.def;Ke(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Aw=O("ZodISODateTime",(e,t)=>{Ab.init(e,t),ze.init(e,t)});function xw(e){return N0(Aw,e)}const Pw=O("ZodISODate",(e,t)=>{xb.init(e,t),ze.init(e,t)});function Rw(e){return $0(Pw,e)}const Iw=O("ZodISOTime",(e,t)=>{Pb.init(e,t),ze.init(e,t)});function Cw(e){return D0(Iw,e)}const Nw=O("ZodISODuration",(e,t)=>{Rb.init(e,t),ze.init(e,t)});function $w(e){return M0(Nw,e)}const Dw=(e,t)=>{sp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>by(e,n)},flatten:{value:n=>yy(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,tl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,tl,2)}},isEmpty:{get(){return e.issues.length===0}}})},Vt=O("ZodError",Dw,{Parent:Error}),Mw=hc(Vt),Fw=pc(Vt),Lw=Ho(Vt),zw=Go(Vt),Uw=Sy(Vt),jw=Ty(Vt),Bw=ky(Vt),Vw=Oy(Vt),Zw=Ay(Vt),Hw=xy(Vt),Gw=Py(Vt),Ww=Ry(Vt),Le=O("ZodType",(e,t)=>(Fe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:co(e,"input"),output:co(e,"output")}}),e.toJSONSchema=sw(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(nr(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>rr(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>Mw(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Lw(e,n,r),e.parseAsync=async(n,r)=>Fw(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>zw(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Uw(e,n,r),e.decode=(n,r)=>jw(e,n,r),e.encodeAsync=async(n,r)=>Bw(e,n,r),e.decodeAsync=async(n,r)=>Vw(e,n,r),e.safeEncode=(n,r)=>Zw(e,n,r),e.safeDecode=(n,r)=>Hw(e,n,r),e.safeEncodeAsync=async(n,r)=>Gw(e,n,r),e.safeDecodeAsync=async(n,r)=>Ww(e,n,r),e.refine=(n,r)=>e.check(UE(n,r)),e.superRefine=n=>e.check(jE(n)),e.overwrite=n=>e.check(is(n)),e.optional=()=>Ku(e),e.exactOptional=()=>AE(e),e.nullable=()=>Ju(e),e.nullish=()=>Ku(Ju(e)),e.nonoptional=n=>NE(e,n),e.array=()=>xp(e),e.or=n=>Pp([e,n]),e.and=n=>EE(e,n),e.transform=n=>Yu(e,kE(n)),e.default=n=>RE(e,n),e.prefault=n=>CE(e,n),e.catch=n=>DE(e,n),e.pipe=n=>Yu(e,n),e.readonly=()=>LE(e),e.describe=n=>{const r=e.clone();return Es.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Es.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Es.get(e);const r=e.clone();return Es.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Tp=O("_ZodString",(e,t)=>{gc.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>ow(e,r,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(V0(...r)),e.includes=(...r)=>e.check(G0(...r)),e.startsWith=(...r)=>e.check(W0(...r)),e.endsWith=(...r)=>e.check(q0(...r)),e.min=(...r)=>e.check(lo(...r)),e.max=(...r)=>e.check(mp(...r)),e.length=(...r)=>e.check(yp(...r)),e.nonempty=(...r)=>e.check(lo(1,...r)),e.lowercase=r=>e.check(Z0(r)),e.uppercase=r=>e.check(H0(r)),e.trim=()=>e.check(J0()),e.normalize=(...r)=>e.check(K0(...r)),e.toLowerCase=()=>e.check(Y0()),e.toUpperCase=()=>e.check(X0()),e.slugify=()=>e.check(Q0())}),qw=O("ZodString",(e,t)=>{gc.init(e,t),Tp.init(e,t),e.email=n=>e.check(d0(Kw,n)),e.url=n=>e.check(v0(Jw,n)),e.jwt=n=>e.check(C0(fE,n)),e.emoji=n=>e.check(m0(Yw,n)),e.guid=n=>e.check(Bu(Gu,n)),e.uuid=n=>e.check(h0(xi,n)),e.uuidv4=n=>e.check(p0(xi,n)),e.uuidv6=n=>e.check(g0(xi,n)),e.uuidv7=n=>e.check(_0(xi,n)),e.nanoid=n=>e.check(y0(Xw,n)),e.guid=n=>e.check(Bu(Gu,n)),e.cuid=n=>e.check(b0(Qw,n)),e.cuid2=n=>e.check(w0(eE,n)),e.ulid=n=>e.check(E0(tE,n)),e.base64=n=>e.check(P0(lE,n)),e.base64url=n=>e.check(R0(cE,n)),e.xid=n=>e.check(S0(nE,n)),e.ksuid=n=>e.check(T0(rE,n)),e.ipv4=n=>e.check(k0(sE,n)),e.ipv6=n=>e.check(O0(iE,n)),e.cidrv4=n=>e.check(A0(oE,n)),e.cidrv6=n=>e.check(x0(aE,n)),e.e164=n=>e.check(I0(uE,n)),e.datetime=n=>e.check(xw(n)),e.date=n=>e.check(Rw(n)),e.time=n=>e.check(Cw(n)),e.duration=n=>e.check($w(n))});function ae(e){return f0(qw,e)}const ze=O("ZodStringFormat",(e,t)=>{$e.init(e,t),Tp.init(e,t)}),Kw=O("ZodEmail",(e,t)=>{mb.init(e,t),ze.init(e,t)}),Gu=O("ZodGUID",(e,t)=>{_b.init(e,t),ze.init(e,t)}),xi=O("ZodUUID",(e,t)=>{vb.init(e,t),ze.init(e,t)}),Jw=O("ZodURL",(e,t)=>{yb.init(e,t),ze.init(e,t)}),Yw=O("ZodEmoji",(e,t)=>{bb.init(e,t),ze.init(e,t)}),Xw=O("ZodNanoID",(e,t)=>{wb.init(e,t),ze.init(e,t)}),Qw=O("ZodCUID",(e,t)=>{Eb.init(e,t),ze.init(e,t)}),eE=O("ZodCUID2",(e,t)=>{Sb.init(e,t),ze.init(e,t)}),tE=O("ZodULID",(e,t)=>{Tb.init(e,t),ze.init(e,t)}),nE=O("ZodXID",(e,t)=>{kb.init(e,t),ze.init(e,t)}),rE=O("ZodKSUID",(e,t)=>{Ob.init(e,t),ze.init(e,t)}),sE=O("ZodIPv4",(e,t)=>{Ib.init(e,t),ze.init(e,t)}),iE=O("ZodIPv6",(e,t)=>{Cb.init(e,t),ze.init(e,t)}),oE=O("ZodCIDRv4",(e,t)=>{Nb.init(e,t),ze.init(e,t)}),aE=O("ZodCIDRv6",(e,t)=>{$b.init(e,t),ze.init(e,t)}),lE=O("ZodBase64",(e,t)=>{Db.init(e,t),ze.init(e,t)}),cE=O("ZodBase64URL",(e,t)=>{Fb.init(e,t),ze.init(e,t)}),uE=O("ZodE164",(e,t)=>{Lb.init(e,t),ze.init(e,t)}),fE=O("ZodJWT",(e,t)=>{Ub.init(e,t),ze.init(e,t)}),kp=O("ZodNumber",(e,t)=>{pp.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>aw(e,r,s),e.gt=(r,s)=>e.check(Zu(r,s)),e.gte=(r,s)=>e.check(ha(r,s)),e.min=(r,s)=>e.check(ha(r,s)),e.lt=(r,s)=>e.check(Vu(r,s)),e.lte=(r,s)=>e.check(da(r,s)),e.max=(r,s)=>e.check(da(r,s)),e.int=r=>e.check(Wu(r)),e.safe=r=>e.check(Wu(r)),e.positive=r=>e.check(Zu(0,r)),e.nonnegative=r=>e.check(ha(0,r)),e.negative=r=>e.check(Vu(0,r)),e.nonpositive=r=>e.check(da(0,r)),e.multipleOf=(r,s)=>e.check(Hu(r,s)),e.step=(r,s)=>e.check(Hu(r,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Rt(e){return F0(kp,e)}const dE=O("ZodNumberFormat",(e,t)=>{jb.init(e,t),kp.init(e,t)});function Wu(e){return L0(dE,e)}const hE=O("ZodBoolean",(e,t)=>{Bb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>lw(e,n,r)});function Op(e){return z0(hE,e)}const pE=O("ZodAny",(e,t)=>{Vb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>uw()});function Ap(){return U0(pE)}const gE=O("ZodUnknown",(e,t)=>{Zb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>fw()});function qu(){return j0(gE)}const _E=O("ZodNever",(e,t)=>{Hb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>cw(e,n,r)});function vE(e){return B0(_E,e)}const mE=O("ZodArray",(e,t)=>{Gb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>gw(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(lo(n,r)),e.nonempty=n=>e.check(lo(1,n)),e.max=(n,r)=>e.check(mp(n,r)),e.length=(n,r)=>e.check(yp(n,r)),e.unwrap=()=>e.element});function xp(e,t){return ew(mE,e,t)}const yE=O("ZodObject",(e,t)=>{qb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>_w(e,n,r,s),Te(e,"shape",()=>t.shape),e.keyof=()=>_i(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:qu()}),e.loose=()=>e.clone({...e._zod.def,catchall:qu()}),e.strict=()=>e.clone({...e._zod.def,catchall:vE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>py(e,n),e.safeExtend=n=>gy(e,n),e.merge=n=>_y(e,n),e.pick=n=>dy(e,n),e.omit=n=>hy(e,n),e.partial=(...n)=>vy(Rp,e,n[0]),e.required=(...n)=>my(Ip,e,n[0])});function Bt(e,t){const n={type:"object",shape:e??{},...te(t)};return new yE(n)}const bE=O("ZodUnion",(e,t)=>{Kb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>vw(e,n,r,s),e.options=t.options});function Pp(e,t){return new bE({type:"union",options:e,...te(t)})}const wE=O("ZodIntersection",(e,t)=>{Jb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>mw(e,n,r,s)});function EE(e,t){return new wE({type:"intersection",left:e,right:t})}const SE=O("ZodRecord",(e,t)=>{Yb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>yw(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function _c(e,t,n){return new SE({type:"record",keyType:e,valueType:t,...te(n)})}const rl=O("ZodEnum",(e,t)=>{Xb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(r,s,i)=>dw(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const i={};for(const o of r)if(n.has(o))i[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new rl({...t,checks:[],...te(s),entries:i})},e.exclude=(r,s)=>{const i={...t.entries};for(const o of r)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new rl({...t,checks:[],...te(s),entries:i})}});function _i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new rl({type:"enum",entries:n,...te(t)})}const TE=O("ZodTransform",(e,t)=>{Qb.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>pw(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Xh(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ei(i,n.value,t));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(ei(o))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function kE(e){return new TE({type:"transform",transform:e})}const Rp=O("ZodOptional",(e,t)=>{vp.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Sp(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Ku(e){return new Rp({type:"optional",innerType:e})}const OE=O("ZodExactOptional",(e,t)=>{e0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Sp(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function AE(e){return new OE({type:"optional",innerType:e})}const xE=O("ZodNullable",(e,t)=>{t0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>bw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Ju(e){return new xE({type:"nullable",innerType:e})}const PE=O("ZodDefault",(e,t)=>{n0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ew(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RE(e,t){return new PE({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():np(t)}})}const IE=O("ZodPrefault",(e,t)=>{r0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Sw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function CE(e,t){return new IE({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():np(t)}})}const Ip=O("ZodNonOptional",(e,t)=>{s0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ww(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function NE(e,t){return new Ip({type:"nonoptional",innerType:e,...te(t)})}const $E=O("ZodCatch",(e,t)=>{i0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Tw(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function DE(e,t){return new $E({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ME=O("ZodPipe",(e,t)=>{o0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>kw(e,n,r,s),e.in=t.in,e.out=t.out});function Yu(e,t){return new ME({type:"pipe",in:e,out:t})}const FE=O("ZodReadonly",(e,t)=>{a0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ow(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function LE(e){return new FE({type:"readonly",innerType:e})}const zE=O("ZodCustom",(e,t)=>{l0.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,r,s)=>hw(e,n)});function UE(e,t={}){return tw(zE,e,t)}function jE(e){return nw(e)}Bt({filePath:ae()});Bt({id:ae().uuid(),sessionId:ae().uuid().nullable(),type:_i(["image","markdown","text","json","pdf","code"]),content:ae().nullable(),data:ae().nullable(),mimeType:ae().nullable(),filename:ae().nullable(),width:Rt().nullable(),height:Rt().nullable(),createdAt:Rt(),updatedAt:Rt()});Bt({content:ae().min(0)});const Pi='Commit attribution must be in the format "Name <email@example.com>" or "Co-authored-by: Name <email@example.com>".',BE=/^Co-authored-by:\s*/i,VE=/^([^\n<>]+?)\s*<([^\s<>\n@]+@[^\s<>\n@]+\.[^\s<>\n@]+)>$/;function ZE(e){if(e==null)return{success:!0,value:null};if(typeof e!="string")return{success:!1,error:Pi};const t=e.trim();if(!t)return{success:!0,value:null};if(t.includes(`
|
|
72
|
+
`)||t.includes("\r"))return{success:!1,error:Pi};const r=t.replace(BE,"").trim().match(VE);if(!r)return{success:!1,error:Pi};const s=r[1].trim(),i=r[2].trim();return!s||!i?{success:!1,error:Pi}:{success:!0,value:`Co-authored-by: ${s} <${i}>`}}const Cp=Ap().transform((e,t)=>{const n=ZE(e);return n.success?n.value:(t.addIssue({code:"custom",message:n.error}),iy)}),vc=_i(["anthropic","openai","google"]);Bt({name:ae().min(1).max(100),kind:vc,baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional(),additionalEnvVars:_c(ae()).nullable().optional(),commitAttributionOverride:Cp.optional()});Bt({name:ae().min(1).max(100).optional(),baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional(),additionalEnvVars:_c(ae()).nullable().optional(),commitAttributionOverride:Cp.optional()}).strict();Bt({id:ae().uuid(),name:ae(),kind:vc,baseUrl:ae().nullable(),authToken:ae().nullable(),apiTimeoutMs:Rt().nullable(),additionalEnvVars:_c(ae()).nullable(),commitAttributionOverride:ae().nullable(),isBuiltIn:Op(),createdAt:Rt(),updatedAt:Rt(),models:xp(Bt({id:ae().uuid(),providerId:ae().uuid(),modelId:ae(),displayName:ae(),description:ae().nullable(),tier:_i(["opus","sonnet","haiku","custom"]),createdAt:Rt()}))});Bt({modelId:ae().min(1),displayName:ae().min(1).max(100),description:ae().nullable().optional(),tier:_i(["opus","sonnet","haiku","custom"]).nullable().optional()});Bt({id:ae().uuid(),providerId:ae().uuid(),modelId:ae(),displayName:ae(),description:ae().nullable(),tier:ae().nullable(),createdAt:Rt()});Bt({kind:vc,baseUrl:ae().url().nullable().optional(),authToken:ae().nullable().optional(),defaultSonnetModel:ae().nullable().optional(),apiTimeoutMs:Rt().int().positive().nullable().optional()});Bt({success:Op(),message:ae(),details:Bt({model:ae().optional(),usage:Ap().optional(),code:Pp([ae(),Rt()]).optional(),type:ae().optional()}).optional()});let HE=0;const GE=ey("ui",{state:()=>({toasts:[],modalOpen:null,loading:!1}),actions:{addToast(e,t,n=sy){const r=++HE;return this.toasts.push({id:r,type:e,message:t}),n>0&&setTimeout(()=>{this.removeToast(r)},n),r},removeToast(e){this.toasts=this.toasts.filter(t=>t.id!==e)},success(e){return this.addToast("success",e)},error(e){return this.addToast("error",e)},warning(e){return this.addToast("warning",e)},info(e){return this.addToast("info",e)},openModal(e){this.modalOpen=e},closeModal(){this.modalOpen=null},setLoading(e){this.loading=e}}}),vi=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},WE={class:"toast-container"},qE={class:"toast-icon"},KE={key:0},JE={key:1},YE={key:2},XE={key:3},QE={class:"toast-message"},eS=["onClick"],tS={__name:"ToastContainer",setup(e){const t=GE(),n=Re(()=>t.toasts);return(r,s)=>(Ne(),hi(lh,{to:"body"},[G("div",WE,[Ie(xm,{name:"toast"},{default:Js(()=>[(Ne(!0),tt(ht,null,dv(n.value,i=>(Ne(),tt("div",{key:i.id,class:pr(["toast",`toast-${i.type}`])},[G("span",qE,[i.type==="success"?(Ne(),tt("span",KE,"✓")):i.type==="error"?(Ne(),tt("span",JE,"✗")):i.type==="warning"?(Ne(),tt("span",YE,"⚠")):(Ne(),tt("span",XE,"ℹ"))]),G("span",QE,St(i.message),1),G("button",{class:"toast-close",onClick:o=>Ft(t).removeToast(i.id)}," × ",8,eS)],2))),128))]),_:1})])]))}},nS=vi(tS,[["__scopeId","data-v-33c0e27f"]]),kr=new Map;function rS(e,t,n){return(r,s,i)=>o=>{const a=l=>{s.filter(l)&&o(...s.args(l))};return e(r,a,i==null?void 0:i.replaySessionId),()=>t(r,a)}}function sS(e,t,n){const r=i=>i.sessionId===n,s=rS(e,t);return{onStatus:s(Y.SESSION_STATUS,{filter:r,args:i=>[i.status]}),onMessage:s(Y.SESSION_MESSAGE,{filter:i=>{var o;return((o=i.message)==null?void 0:o.sessionId)===n},args:i=>[i.message]}),onError:s(Y.SESSION_ERROR,{filter:r,args:i=>[i.error]}),onCanvasAdd:s(Y.CANVAS_ADD,{filter:i=>{var o;return((o=i.item)==null?void 0:o.sessionId)===n},args:i=>[i.item]}),onCanvasRemove:s(Y.CANVAS_REMOVE,{filter:r,args:i=>[i.itemId]}),onCanvasUpdate:s(Y.CANVAS_UPDATE,{filter:i=>{var o;return((o=i.item)==null?void 0:o.sessionId)===n},args:i=>[i.item]}),onPartial:s(Y.SESSION_PARTIAL,{filter:r,args:i=>[i.text]}),onTodosUpdate:s(Y.TODOS_UPDATE,{filter:r,args:i=>[i.todos,i.conversationId]}),onWorkLog:s(Y.SESSION_WORK_LOG,{filter:i=>r(i)&&i.log,args:i=>[i.log]}),onWorkLogsAssociated:s(Y.SESSION_WORK_LOGS_ASSOCIATED,{filter:r,args:i=>[i.messageId]}),onThinkingPartial:s(Y.SESSION_THINKING_PARTIAL,{filter:r,args:i=>[i.thinking]}),onSummaryUpdate:s(Y.SESSION_SUMMARY_UPDATED,{filter:r,args:i=>[i.summary]}),onSummaryGenerating:s(Y.SESSION_SUMMARY_GENERATING,{filter:r,args:i=>[i.generating]}),onSessionUpdate:s(Y.SESSION_UPDATED,{filter:r,args:i=>[i.session]}),onConversationCreated:s(Y.CONVERSATION_CREATED,{filter:r,args:i=>[i.conversation]}),onConversationUpdated:s(Y.CONVERSATION_UPDATED,{filter:r,args:i=>[i.conversation]}),onConversationDeleted:s(Y.CONVERSATION_DELETED,{filter:r,args:i=>[i.conversationId,i.newActiveConversation]}),onUsageUpdate:s(Y.SESSION_USAGE_UPDATE,{filter:r,args:i=>[i]},{replaySessionId:n}),onCommandOutput:s(Y.COMMAND_RUN_OUTPUT,{filter:r,args:i=>[i.runId,i.buttonId,i.output]}),onCommandComplete:s(Y.COMMAND_RUN_COMPLETE,{filter:r,args:i=>[i.runId,i.buttonId,i.exitCode,i.output]}),onCommandError:s(Y.COMMAND_RUN_ERROR,{filter:r,args:i=>[i.runId,i.buttonId,i.error||i.message]}),onCommandRunDeleted:s(Y.COMMAND_RUN_DELETED,{filter:r,args:i=>[i.runId,i.buttonId]}),onChangesUpdate:s(Y.CHANGES_UPDATE,{filter:r,args:i=>[i.changeCount,i.hasChanges]})}}function Ox(e){const{send:t,on:n,off:r,clearSessionBuffer:s}=mi();let i=!1;const o=()=>{if(i)return;i=!0;const u=kr.get(e)||0;kr.set(e,u+1),u===0&&t(Y.SUBSCRIBE_SESSION,{sessionId:e})},a=()=>{if(!i)return;i=!1;const u=kr.get(e)||0;u<=1?(kr.delete(e),t(Y.UNSUBSCRIBE_SESSION,{sessionId:e}),s(e)):kr.set(e,u-1)},l=sS(n,r,e);return tr(()=>{a()}),{subscribe:o,unsubscribe:a,...l}}const sl=new Set;function Ax(e){const{send:t,on:n,off:r}=mi(),s=()=>{sl.add(e),t(Y.SUBSCRIBE_PROJECT,{projectId:e})},i=()=>{sl.delete(e),t(Y.UNSUBSCRIBE_PROJECT,{projectId:e})},o=S=>E=>{const m=N=>{N.projectId===e&&E(N.session)};return n(S,m),()=>r(S,m)},a=o(Y.SESSION_CREATED),l=o(Y.SESSION_UPDATED),u=S=>{const E=m=>{m.projectId===e&&S(m.sessionId)};return n(Y.SESSION_DELETED,E),()=>r(Y.SESSION_DELETED,E)},c=S=>{const E=m=>{m.projectId===e&&S(m.sessionId,m.summary)};return n(Y.SESSION_SUMMARY_UPDATED,E),()=>r(Y.SESSION_SUMMARY_UPDATED,E)},f=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.output)};return n(Y.COMMAND_RUN_OUTPUT,E),()=>r(Y.COMMAND_RUN_OUTPUT,E)},d=S=>{const E=m=>{m.projectId===e&&S({runId:m.runId,sessionId:m.sessionId,buttonId:m.buttonId,exitCode:m.exitCode,output:m.output,status:m.status})};return n(Y.COMMAND_RUN_COMPLETE,E),()=>r(Y.COMMAND_RUN_COMPLETE,E)},h=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.error)};return n(Y.COMMAND_RUN_ERROR,E),()=>r(Y.COMMAND_RUN_ERROR,E)},p=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId)};return n(Y.COMMAND_RUN_DELETED,E),()=>r(Y.COMMAND_RUN_DELETED,E)},g=S=>{const E=m=>{m.projectId===e&&S(m.board)};return n(Y.KANBAN_BOARD_UPDATED,E),()=>r(Y.KANBAN_BOARD_UPDATED,E)},y=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.fromLaneId,m.toLaneId,m.card)};return n(Y.KANBAN_CARD_MOVED,E),()=>r(Y.KANBAN_CARD_MOVED,E)},k=S=>{const E=m=>{m.projectId===e&&S(m.card,m.laneId)};return n(Y.KANBAN_CARD_ADDED,E),()=>r(Y.KANBAN_CARD_ADDED,E)},b=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.laneId)};return n(Y.KANBAN_CARD_REMOVED,E),()=>r(Y.KANBAN_CARD_REMOVED,E)};return tr(()=>{i()}),{subscribe:s,unsubscribe:i,onSessionCreated:a,onSessionUpdated:l,onSessionDeleted:u,onSessionSummaryUpdated:c,onCommandRunOutput:f,onCommandRunComplete:d,onCommandRunError:h,onCommandRunDeleted:p,onKanbanBoardUpdated:g,onKanbanCardMoved:y,onKanbanCardAdded:k,onKanbanCardRemoved:b}}let pe=null,Zi=null,Ri=Yh,Xu=!1;const js=new Map,uo=Nt(!1),Bs=Nt("disconnected"),fo=Nt(0),wn=new Map,ho=[],il=new Set;function iS(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function qo(){(pe==null?void 0:pe.readyState)!==WebSocket.OPEN&&(pe=new WebSocket(iS()),pe.onopen=()=>{for(console.log("WebSocket connected"),uo.value=!0,Bs.value="connected",fo.value=0,Ri=Yh;ho.length>0;){const e=ho.shift();pe.send(e)}for(const e of kr.keys())pe.send(el(Y.SUBSCRIBE_SESSION,{sessionId:e}));for(const e of sl)pe.send(el(Y.SUBSCRIBE_PROJECT,{projectId:e}));if(Xu)for(const e of il)e();Xu=!0},pe.onmessage=e=>{const t=ny(e.data);if(!t)return;const n=js.get(t.type);if(t.type===Y.SESSION_USAGE_UPDATE&&(!n||n.size===0)){const r=t.sessionId;wn.has(r)||wn.set(r,[]),wn.get(r).push(t),wn.get(r).length>100&&wn.get(r).shift();return}if(n)for(const r of n)r(t)},pe.onclose=e=>{if(console.log("WebSocket closed",e.code),uo.value=!1,pe=null,e.code===1e3){Bs.value="disconnected";return}Bs.value="reconnecting",fo.value++,Zi=setTimeout(()=>{Ri=Math.min(Ri*2,ry),qo()},Ri)},pe.onerror=e=>{console.error("WebSocket error:",e)})}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(!pe||pe.readyState!==WebSocket.OPEN)&&(pe&&(pe.onclose=null,pe.close(),pe=null),Bs.value="reconnecting",fo.value++,qo())});function oS(e){return il.add(e),()=>il.delete(e)}function aS(){Zi&&(clearTimeout(Zi),Zi=null),pe&&(pe.close(1e3),pe=null),wn.clear(),ho.length=0}function lS(e){wn.delete(e)}function Np(e,t){const n=el(e,t);(pe==null?void 0:pe.readyState)===WebSocket.OPEN?pe.send(n):(ho.push(n),pe||qo())}function cS(e,t,n=null){if(js.has(e)||js.set(e,new Set),js.get(e).add(t),e===Y.SESSION_USAGE_UPDATE&&n){const r=wn.get(n);if(r&&r.length>0){for(const s of r)t(s);wn.delete(n)}}}function uS(e,t){const n=js.get(e);n&&n.delete(t)}function mi(){return pe||qo(),{isConnected:uo,connectionStatus:Bs,reconnectAttempt:fo,send:Np,on:cS,off:uS,disconnect:aS,clearSessionBuffer:lS,onReconnect:oS}}async function xx(e){const{send:t}=mi();if((pe==null?void 0:pe.readyState)===WebSocket.OPEN){t(Y.SUBSCRIBE_SESSION,{sessionId:e});return}return pe&&pe.readyState!==WebSocket.CONNECTING&&(pe.onclose=null,pe.close(),pe=null),Np(Y.SUBSCRIBE_SESSION,{sessionId:e}),new Promise((n,r)=>{let s=!1;const i=setTimeout(()=>{s=!0,r(new Error(`Subscription timeout for session ${e}`))},5e3),o=()=>{s||(uo.value?(s=!0,clearTimeout(i),n()):setTimeout(o,100))};o()})}function Hi(e){return e>=80?"var(--color-error)":e>=60?"var(--color-warning)":"var(--color-success)"}const fS={class:"modal-content"},dS={class:"modal-header"},hS={class:"modal-title","data-testid":"stat-detail-title"},pS={class:"modal-body"},gS={key:0,class:"stat-unavailable"},_S={key:1,class:"stat-details"},vS={class:"stat-bar-track"},mS={class:"stat-status-row"},yS={class:"stat-detail-rows"},bS={class:"stat-detail-row","data-testid":"stat-detail-row-cores"},wS={class:"detail-value"},ES={class:"stat-detail-row","data-testid":"stat-detail-row-model"},SS={class:"detail-value"},TS={class:"stat-detail-row","data-testid":"stat-detail-row-used"},kS={class:"detail-value"},OS={class:"stat-detail-row","data-testid":"stat-detail-row-total"},AS={class:"detail-value"},xS={class:"stat-detail-row","data-testid":"stat-detail-row-free"},PS={class:"detail-value"},RS={class:"stat-detail-row","data-testid":"stat-detail-row-free"},IS={class:"detail-value"},CS={class:"stat-detail-row","data-testid":"stat-detail-row-total"},NS={class:"detail-value"},$S={class:"stat-detail-row","data-testid":"stat-detail-row-used"},DS={class:"detail-value"},MS={__name:"SystemStatDetailModal",props:{isOpen:Boolean,statType:{type:String,validator:e=>["cpu","memory","disk",null].includes(e),default:null},metrics:{type:Object,required:!0}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,s=Re(()=>{switch(n.statType){case"cpu":return"CPU Usage";case"memory":return"Memory Usage";case"disk":return"Disk Usage";default:return""}}),i=Re(()=>{switch(n.statType){case"cpu":return Math.round(n.metrics.cpu.usagePercent*10)/10;case"memory":return Math.round(n.metrics.memory.usedPercent*10)/10;case"disk":return n.metrics.disk?Math.round(n.metrics.disk.usedPercent*10)/10:0;default:return 0}}),o=Re(()=>Hi(i.value)),a=Re(()=>{const d=i.value;return d>=80?"High":d>=60?"Elevated":"Normal"}),l=Re(()=>n.metrics.memory.totalGB-n.metrics.memory.usedGB),u=Re(()=>n.metrics.disk?n.metrics.disk.totalGB-n.metrics.disk.freeGB:0);function c(){r("close")}function f(d){d.key==="Escape"&&n.isOpen&&c()}return ss(()=>{window.addEventListener("keydown",f)}),tr(()=>{window.removeEventListener("keydown",f)}),(d,h)=>(Ne(),hi(lh,{to:"body"},[e.isOpen?(Ne(),tt("div",{key:0,class:"modal-backdrop","data-testid":"system-stat-modal",onClick:Um(c,["self"]),onKeydown:Bm(f,["escape"])},[G("div",fS,[G("div",dS,[G("h2",hS,St(s.value),1),G("button",{class:"close-btn","aria-label":"Close",onClick:c}," × ")]),G("div",pS,[e.statType==="disk"&&!e.metrics.disk?(Ne(),tt("div",gS," Disk data unavailable ")):(Ne(),tt("div",_S,[G("div",{class:"stat-percentage","data-testid":"stat-detail-percentage",style:On({color:o.value})},St(i.value)+"% ",5),G("div",vS,[G("div",{class:"stat-bar-fill","data-testid":"stat-detail-bar",style:On({width:`${i.value}%`,backgroundColor:o.value})},null,4)]),G("div",mS,[G("span",{class:"stat-status","data-testid":"stat-detail-status",style:On({color:o.value})},St(a.value),5)]),G("div",yS,[e.statType==="cpu"?(Ne(),tt(ht,{key:0},[G("div",bS,[h[0]||(h[0]=G("span",{class:"detail-label"},"Cores",-1)),G("span",wS,St(e.metrics.cpu.coreCount),1)]),G("div",ES,[h[1]||(h[1]=G("span",{class:"detail-label"},"Model",-1)),G("span",SS,St(e.metrics.cpu.model),1)])],64)):Zn("",!0),e.statType==="memory"?(Ne(),tt(ht,{key:1},[G("div",TS,[h[2]||(h[2]=G("span",{class:"detail-label"},"Used",-1)),G("span",kS,St(e.metrics.memory.usedGB.toFixed(1))+" GB",1)]),G("div",OS,[h[3]||(h[3]=G("span",{class:"detail-label"},"Total",-1)),G("span",AS,St(e.metrics.memory.totalGB.toFixed(1))+" GB",1)]),G("div",xS,[h[4]||(h[4]=G("span",{class:"detail-label"},"Free",-1)),G("span",PS,St(l.value.toFixed(1))+" GB",1)])],64)):Zn("",!0),e.statType==="disk"&&e.metrics.disk?(Ne(),tt(ht,{key:2},[G("div",RS,[h[5]||(h[5]=G("span",{class:"detail-label"},"Free",-1)),G("span",IS,St(e.metrics.disk.freeGB.toFixed(1))+" GB",1)]),G("div",CS,[h[6]||(h[6]=G("span",{class:"detail-label"},"Total",-1)),G("span",NS,St(e.metrics.disk.totalGB.toFixed(1))+" GB",1)]),G("div",$S,[h[7]||(h[7]=G("span",{class:"detail-label"},"Used",-1)),G("span",DS,St(u.value.toFixed(1))+" GB",1)])],64)):Zn("",!0)])]))]),G("div",{class:"modal-footer"},[G("button",{class:"btn btn-secondary",onClick:c}," Close ")])])],32)):Zn("",!0)]))}},FS=vi(MS,[["__scopeId","data-v-4efd7d7f"]]),LS=["title"],zS={key:1,class:"system-indicators","data-testid":"system-indicators"},US=["title"],jS={class:"indicator-bar-track"},BS=["title"],VS={class:"indicator-bar-track"},ZS=["title"],HS={class:"indicator-bar-track"},GS={__name:"SystemIndicators",setup(e){const{on:t,off:n,connectionStatus:r,reconnectAttempt:s}=mi(),i=Nt(null),o=Re(()=>i.value!==null),a=Nt(null),l=Re(()=>r.value==="reconnecting"?"dot-amber dot-pulse":r.value==="disconnected"?"dot-red":""),u=Re(()=>{if(r.value==="reconnecting"){const f=s.value;return`Reconnecting${f>0?` (attempt ${f})`:""}...`}return r.value==="disconnected"?"Disconnected":""});function c(f){i.value=f}return ss(()=>{t(Y.SYSTEM_METRICS,c)}),tr(()=>{n(Y.SYSTEM_METRICS,c)}),(f,d)=>(Ne(),tt(ht,null,[Ft(r)!=="connected"?(Ne(),tt("span",{key:0,class:pr(["connection-status-dot",l.value]),title:u.value,"data-testid":"connection-status-dot"},null,10,LS)):Zn("",!0),o.value?(Ne(),tt("div",zS,[G("div",{class:"indicator","data-testid":"indicator-cpu",title:`CPU: ${Math.round(i.value.cpu.usagePercent)}%`,onClick:d[0]||(d[0]=h=>a.value="cpu")},[d[4]||(d[4]=su('<svg class="indicator-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-f8935b47><rect x="4" y="4" width="16" height="16" rx="2" ry="2" data-v-f8935b47></rect><rect x="9" y="9" width="6" height="6" data-v-f8935b47></rect><line x1="9" y1="1" x2="9" y2="4" data-v-f8935b47></line><line x1="15" y1="1" x2="15" y2="4" data-v-f8935b47></line><line x1="9" y1="20" x2="9" y2="23" data-v-f8935b47></line><line x1="15" y1="20" x2="15" y2="23" data-v-f8935b47></line><line x1="20" y1="9" x2="23" y2="9" data-v-f8935b47></line><line x1="20" y1="14" x2="23" y2="14" data-v-f8935b47></line><line x1="1" y1="9" x2="4" y2="9" data-v-f8935b47></line><line x1="1" y1="14" x2="4" y2="14" data-v-f8935b47></line></svg>',1)),G("div",jS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-cpu",style:On({width:`${i.value.cpu.usagePercent}%`,backgroundColor:Ft(Hi)(i.value.cpu.usagePercent)})},null,4)])],8,US),G("div",{class:"indicator","data-testid":"indicator-memory",title:`RAM: ${i.value.memory.usedGB.toFixed(1)} / ${i.value.memory.totalGB.toFixed(1)} GB`,onClick:d[1]||(d[1]=h=>a.value="memory")},[d[5]||(d[5]=su('<svg class="indicator-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-f8935b47><path d="M6 19v-3" data-v-f8935b47></path><path d="M10 19v-3" data-v-f8935b47></path><path d="M14 19v-3" data-v-f8935b47></path><path d="M18 19v-3" data-v-f8935b47></path><path d="M8 11V9" data-v-f8935b47></path><path d="M16 11V9" data-v-f8935b47></path><path d="M12 11V9" data-v-f8935b47></path><path d="M2 15h20" data-v-f8935b47></path><path d="M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z" data-v-f8935b47></path></svg>',1)),G("div",VS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-memory",style:On({width:`${i.value.memory.usedPercent}%`,backgroundColor:Ft(Hi)(i.value.memory.usedPercent)})},null,4)])],8,BS),i.value.disk?(Ne(),tt("div",{key:0,class:"indicator","data-testid":"indicator-disk",title:`Disk: ${Math.round(i.value.disk.freeGB)} GB free`,onClick:d[2]||(d[2]=h=>a.value="disk")},[d[6]||(d[6]=G("svg",{class:"indicator-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[G("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),G("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),G("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)),G("div",HS,[G("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-disk",style:On({width:`${i.value.disk.usedPercent}%`,backgroundColor:Ft(Hi)(i.value.disk.usedPercent)})},null,4)])],8,ZS)):Zn("",!0)])):Zn("",!0),Ie(FS,{"is-open":a.value!==null,"stat-type":a.value,metrics:i.value,onClose:d[3]||(d[3]=h=>a.value=null)},null,8,["is-open","stat-type","metrics"])],64))}},WS=vi(GS,[["__scopeId","data-v-f8935b47"]]),qS=2e3,{connectionStatus:$p,reconnectAttempt:KS}=mi(),ol=Nt(!1);let Ii=null;Mr($p,e=>{e==="connected"?(clearTimeout(Ii),Ii=null,ol.value=!1):Ii||(Ii=setTimeout(()=>{ol.value=!0},qS))},{immediate:!0});function JS(){return{isStale:ol,connectionStatus:$p,reconnectAttempt:KS}}const YS={class:"banner-text"},XS={__name:"ConnectionBanner",setup(e){const{isStale:t,connectionStatus:n,reconnectAttempt:r}=JS(),s=Re(()=>t.value),i=Re(()=>n.value==="reconnecting"?"banner-warning":n.value==="disconnected"?"banner-error":""),o=Re(()=>n.value==="reconnecting"?"dot-pulse":""),a=Re(()=>{if(n.value==="reconnecting"){const l=r.value;return`Connection lost — reconnecting${l>0?` (attempt ${l})`:""}...`}return"Disconnected from server"});return(l,u)=>(Ne(),hi(cm,{name:"banner-slide"},{default:Js(()=>[s.value?(Ne(),tt("div",{key:0,class:pr(["connection-banner",i.value]),"data-testid":"connection-banner",role:"alert"},[G("span",{class:pr(["banner-dot",o.value])},null,2),G("span",YS,St(a.value),1)],2)):Zn("",!0)]),_:1}))}},QS=vi(XS,[["__scopeId","data-v-2fc9161b"]]),eT=120,tT=.85,nT=64,rT=420,sT=320,iT=240,oT=160;function aT(e,t,n){const r=String(e),s=String(t),i=Number(n)||0,o=/Android/i.test(r),a=o&&/Mobile/i.test(r),l=/iPhone|iPod/i.test(`${r} ${s}`),u=/iPad/i.test(`${r} ${s}`)||s==="MacIntel"&&i>1,c=o&&!/Mobile/i.test(r);return{isPhone:l||a,isTablet:u||c}}function lT(e,t){return Number.isFinite(e)&&e>0&&Number.isFinite(t)&&(e-t>eT||t/e<tT)}function cT({layoutWidth:e,layoutHeight:t,visualViewportHeight:n,visualViewportOffsetTop:r}){return Number.isFinite(e)&&Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r)&&e>0&&t>0&&n>0}function uT({userAgent:e,platform:t,maxTouchPoints:n}){const r=aT(e,t,n);return!r.isPhone&&r.isTablet&&Number(n)>0}function fT(e,t,n){const r=e-(t+n);return Number.isFinite(r)?r:0}function dT({layoutHeight:e,visualViewportHeight:t,absoluteMax:n,minUsableOverlayHeight:r,minUsableShortOverlayHeight:s,minVisibleComposerArea:i}){const o=e<=500?s:r,a=e-o,l=t-i;return Math.max(0,Math.min(n,a,l))}function hT({isOverlayPromptFocused:e,layoutWidth:t,layoutHeight:n,visualViewportHeight:r,visualViewportOffsetTop:s=0,userAgent:i="",platform:o="",maxTouchPoints:a=0,accessoryAllowance:l=nT,absoluteMax:u=rT,minUsableOverlayHeight:c=sT,minUsableShortOverlayHeight:f=iT,minVisibleComposerArea:d=oT}){if(!e||!cT({layoutWidth:t,layoutHeight:n,visualViewportHeight:r,visualViewportOffsetTop:s})||!uT({userAgent:i,platform:o,maxTouchPoints:a})||!lT(n,r))return 0;const h=fT(n,r,s);if(h<=0)return 0;const p=dT({layoutHeight:n,visualViewportHeight:r,absoluteMax:u,minUsableOverlayHeight:c,minUsableShortOverlayHeight:f,minVisibleComposerArea:d});return Math.max(0,Math.min(h+l,p))}const pT=64,gT=120,_T=.85,vT=700,mT=2,yT=new Set(["","text","search","email","url","tel","password","number"]);function bT(e){return Number.isFinite(e)&&e>0&&e<=pT}function Dp(e,t,n){const r=String(e),s=String(t),i=Number(n)||0,o=/Android/i.test(r),a=o&&/Mobile/i.test(r),l=/iPhone|iPod/i.test(`${r} ${s}`),u=/iPad/i.test(`${r} ${s}`)||s==="MacIntel"&&i>1,c=o&&!/Mobile/i.test(r);return{isPhone:l||a,isTablet:u||c}}function Mp(e,t){return Number.isFinite(e)&&e>0&&Number.isFinite(t)&&(e-t>gT||t/e<_T)}function Fp(e,t){return Number.isFinite(e)&&Number.isFinite(t)&&Math.min(e,t)>=vT}function wT(e){var r,s;if(!e||e.nodeType!==1)return!1;const t=(r=e.closest)==null?void 0:r.call(e,"[contenteditable]");if(t){const i=t.getAttribute("contenteditable");return i===null||i.toLowerCase()!=="false"}const n=(s=e.tagName)==null?void 0:s.toLowerCase();return n==="textarea"?!0:n!=="input"?!1:yT.has((e.getAttribute("type")||"").toLowerCase())}function ET(){return typeof document>"u"?!1:wT(document.activeElement)}function ST({offsetTop:e,visualViewportHeight:t,layoutWidth:n,layoutHeight:r,userAgent:s="",platform:i="",maxTouchPoints:o=0}){if(!bT(e))return 0;const a=Dp(s,i,o);return a.isPhone||Mp(r,t)?0:a.isTablet||Fp(n,r)?e:0}function TT(e,{writeVisualViewportVariables:t=()=>null}={}){var l,u,c;if(!e)return;if(ET()){t();return}if(window.scrollY!==0&&window.scrollTo(0,0),!window.visualViewport){t();return}const{offsetTop:n,height:r}=window.visualViewport,s=window.innerWidth,i=window.innerHeight,o=Dp((l=window.navigator)==null?void 0:l.userAgent,(u=window.navigator)==null?void 0:u.platform,(c=window.navigator)==null?void 0:c.maxTouchPoints);!o.isPhone&&!Mp(i,r)&&(o.isTablet||Fp(s,i))&&n>mT?(e.style.top=`${n}px`,e.style.bottom="auto",e.style.height=`${r}px`):kT(e),t()}function kT(e){e&&(e.style.top="",e.style.bottom="",e.style.height="")}let zr=null,Ur=null,Vs=null,al=0,ll=null,Gi=0,cl=!1;function Qu(e,t){return Number.isFinite(e)?`${e}px`:t}function OT(){const{offsetTop:e,height:t}=window.visualViewport;return{offsetTop:e,height:t}}function Px(e){cl=!!e,cl||document.documentElement.style.setProperty("--session-overlay-keyboard-bottom-inset","0px"),Ss()}function AT(e,t){return e&&t&&e.offsetTop===t.offsetTop&&e.height===t.height}function mc(){var r,s,i,o,a,l;if(!window.visualViewport)return null;const e=OT();document.documentElement.style.setProperty("--viewport-offset-top",Qu(e.offsetTop,"0px")),document.documentElement.style.setProperty("--visual-viewport-height",Qu(e.height,"100dvh"));const t=ST({offsetTop:e.offsetTop,visualViewportHeight:e.height,layoutWidth:window.innerWidth,layoutHeight:window.innerHeight,userAgent:(r=window.navigator)==null?void 0:r.userAgent,platform:(s=window.navigator)==null?void 0:s.platform,maxTouchPoints:(i=window.navigator)==null?void 0:i.maxTouchPoints});document.documentElement.style.setProperty("--session-overlay-top-chrome-inset",`${t}px`);const n=hT({isOverlayPromptFocused:cl,layoutWidth:window.innerWidth,layoutHeight:window.innerHeight,visualViewportHeight:e.height,visualViewportOffsetTop:e.offsetTop,userAgent:(o=window.navigator)==null?void 0:o.userAgent,platform:(a=window.navigator)==null?void 0:a.platform,maxTouchPoints:(l=window.navigator)==null?void 0:l.maxTouchPoints});return document.documentElement.style.setProperty("--session-overlay-keyboard-bottom-inset",`${n}px`),e}function Ss(){!window.visualViewport||zr||(zr=requestAnimationFrame(()=>{mc(),zr=null}))}function xT(){zr&&(cancelAnimationFrame(zr),zr=null)}function Wi(){Ur&&(cancelAnimationFrame(Ur),Ur=null),Vs&&(clearTimeout(Vs),Vs=null),al=0,ll=null,Gi=0}function PT(e={}){if(!window.visualViewport)return;const{maxDurationMs:t=500,intervalMs:n=50,stableSampleCount:r=2,minDurationMs:s=150}=e;Wi(),al=performance.now();const i=()=>{Ur=null;const o=mc();if(!o){Wi();return}AT(o,ll)?Gi+=1:(Gi=1,ll=o);const a=performance.now()-al;if(Gi>=r&&a>=s||a>=t){Wi();return}Vs=setTimeout(()=>{Vs=null,Ur=requestAnimationFrame(i)},n)};Ur=requestAnimationFrame(i)}function Rx(e){TT(e,{writeVisualViewportVariables:mc})}function Ix(e){return window.visualViewport?(window.visualViewport.addEventListener("scroll",e),window.visualViewport.addEventListener("resize",e),()=>{window.visualViewport.removeEventListener("scroll",e),window.visualViewport.removeEventListener("resize",e)}):()=>{}}function RT(){function e(){Ss()}return ss(()=>{window.visualViewport&&(Ss(),window.visualViewport.addEventListener("scroll",e),window.visualViewport.addEventListener("resize",e))}),tr(()=>{window.visualViewport&&(window.visualViewport.removeEventListener("scroll",e),window.visualViewport.removeEventListener("resize",e)),xT(),Wi()}),{requestVisualViewportUpdate:Ss,requestVisualViewportSettle:PT,updateViewportOffset:Ss}}const IT={class:"app"},CT={class:"container"},NT={class:"nav"},$T={class:"app-main"},DT={__name:"App",setup(e){RT();const t=Nt(null);let n=null;function r(){if(t.value){const i=t.value.offsetHeight;document.documentElement.style.setProperty("--header-height-computed",`${i}px`)}}function s(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}return ss(()=>{s(),typeof ResizeObserver<"u"&&t.value&&(n=new ResizeObserver(()=>{r()}),n.observe(t.value)),window.addEventListener("resize",r),window.addEventListener("orientationchange",s)}),tr(()=>{n&&n.disconnect(),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",s)}),(i,o)=>{const a=Wc("router-link"),l=Wc("router-view");return Ne(),tt("div",IT,[G("header",{ref_key:"headerRef",ref:t,class:"app-header"},[G("div",CT,[Ie(a,{to:"/",class:"logo"},{default:Js(()=>[...o[0]||(o[0]=[G("img",{src:ty,alt:"Circus Chief Logo",class:"logo-image"},null,-1),G("span",{class:"logo-text"},"Circus Chief",-1)])]),_:1}),G("nav",NT,[Ie(WS),Ie(a,{to:"/settings",class:"nav-link",title:"Settings"},{default:Js(()=>[...o[1]||(o[1]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),G("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),G("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),G("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),G("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),G("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),G("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),G("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),G("line",{x1:"17",y1:"16",x2:"23",y2:"16"})],-1)])]),_:1})])])],512),Ie(QS),G("main",$T,[(Ne(),hi(l,{key:i.$route.path}))]),Ie(nS)])}}},MT=vi(DT,[["__scopeId","data-v-f51d3e8c"]]),FT="modulepreload",LT=function(e){return"/"+e},ef={},Xe=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=LT(l),l in ef)return;ef[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":FT,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};/*!
|
|
73
73
|
* vue-router v4.6.4
|
|
74
74
|
* (c) 2025 Eduardo San Martin Morote
|
|
75
75
|
* @license MIT
|
|
76
|
-
*/const Or=typeof document<"u";function
|
|
76
|
+
*/const Or=typeof document<"u";function Lp(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function zT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Lp(e.default)}const be=Object.assign;function pa(e,t){const n={};for(const r in t){const s=t[r];n[r]=qt(s)?s.map(e):e(s)}return n}const Zs=()=>{},qt=Array.isArray;function tf(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const zp=/#/g,UT=/&/g,jT=/\//g,BT=/=/g,VT=/\?/g,Up=/\+/g,ZT=/%5B/g,HT=/%5D/g,jp=/%5E/g,GT=/%60/g,Bp=/%7B/g,WT=/%7C/g,Vp=/%7D/g,qT=/%20/g;function yc(e){return e==null?"":encodeURI(""+e).replace(WT,"|").replace(ZT,"[").replace(HT,"]")}function KT(e){return yc(e).replace(Bp,"{").replace(Vp,"}").replace(jp,"^")}function ul(e){return yc(e).replace(Up,"%2B").replace(qT,"+").replace(zp,"%23").replace(UT,"%26").replace(GT,"`").replace(Bp,"{").replace(Vp,"}").replace(jp,"^")}function JT(e){return ul(e).replace(BT,"%3D")}function YT(e){return yc(e).replace(zp,"%23").replace(VT,"%3F")}function XT(e){return YT(e).replace(jT,"%2F")}function ti(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const QT=/\/$/,ek=e=>e.replace(QT,"");function ga(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),i=t.slice(l,a>0?a:t.length),s=e(i.slice(1))),a>=0&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=sk(r??t,n),{fullPath:r+i+o,path:r,query:s,hash:ti(o)}}function tk(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function nf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function nk(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kr(t.matched[r],n.matched[s])&&Zp(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Zp(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!rk(e[n],t[n]))return!1;return!0}function rk(e,t){return qt(e)?rf(e,t):qt(t)?rf(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function rf(e,t){return qt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function sk(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}const Dn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let fl=function(e){return e.pop="pop",e.push="push",e}({}),_a=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function ik(e){if(!e)if(Or){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ek(e)}const ok=/^[^#]+#/;function ak(e,t){return e.replace(ok,"#")+t}function lk(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ko=()=>({left:window.scrollX,top:window.scrollY});function ck(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=lk(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function sf(e,t){return(history.state?history.state.position-t:-1)+e}const dl=new Map;function uk(e,t){dl.set(e,t)}function fk(e){const t=dl.get(e);return dl.delete(e),t}function dk(e){return typeof e=="string"||e&&typeof e=="object"}function Hp(e){return typeof e=="string"||typeof e=="symbol"}let je=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Gp=Symbol("");je.MATCHER_NOT_FOUND+"",je.NAVIGATION_GUARD_REDIRECT+"",je.NAVIGATION_ABORTED+"",je.NAVIGATION_CANCELLED+"",je.NAVIGATION_DUPLICATED+"";function Jr(e,t){return be(new Error,{type:e,[Gp]:!0},t)}function fn(e,t){return e instanceof Error&&Gp in e&&(t==null||!!(e.type&t))}const hk=["params","query","hash"];function pk(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of hk)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function gk(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Up," "),i=s.indexOf("="),o=ti(i<0?s:s.slice(0,i)),a=i<0?null:ti(s.slice(i+1));if(o in t){let l=t[o];qt(l)||(l=t[o]=[l]),l.push(a)}else t[o]=a}return t}function of(e){let t="";for(let n in e){const r=e[n];if(n=JT(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(qt(r)?r.map(s=>s&&ul(s)):[r&&ul(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function _k(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=qt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const vk=Symbol(""),af=Symbol(""),Jo=Symbol(""),bc=Symbol(""),hl=Symbol("");function fs(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Vn(e,t,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=d=>{d===!1?l(Jr(je.NAVIGATION_ABORTED,{from:n,to:t})):d instanceof Error?l(d):dk(d)?l(Jr(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let f=Promise.resolve(c);e.length<3&&(f=f.then(u)),f.catch(d=>l(d))})}function va(e,t,n,r,s=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(Lp(l)){const u=(l.__vccOpts||l)[t];u&&i.push(Vn(u,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=zT(c)?c.default:c;o.mods[a]=c,o.components[a]=f;const d=(f.__vccOpts||f)[t];return d&&Vn(d,n,r,o,a,s)()}))}}return i}function mk(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(u=>Kr(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>Kr(u,l))||s.push(l))}return[n,r,s]}/*!
|
|
77
77
|
* vue-router v4.6.4
|
|
78
78
|
* (c) 2025 Eduardo San Martin Morote
|
|
79
79
|
* @license MIT
|
|
80
|
-
*/let Vk=()=>location.protocol+"//"+location.host;function Vp(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),ef(a,"")}return ef(n,e)+r+s}function Zk(e,t,n,r){let s=[],i=[],o=null;const a=({state:d})=>{const h=Vp(e,location),p=n.value,g=t.value;let y=0;if(d){if(n.value=h,t.value=d,o&&o===p){o=null;return}y=g?d.position-g.position:0}else r(h);s.forEach(T=>{T(n.value,p,{delta:y,type:ul.pop,direction:y?y>0?_a.forward:_a.back:_a.unknown})})};function l(){o=n.value}function u(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(h),h}function c(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(be({},d.state,{scroll:Ko()}),"")}}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:u,destroy:f}}function of(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Ko():null}}function Hk(e){const{history:t,location:n}=window,r={value:Vp(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Vk()+e+l;try{t[c?"replaceState":"pushState"](u,"",d),s.value=u}catch(h){console.error(h),n[c?"replace":"assign"](d)}}function o(l,u){i(l,be({},t.state,of(s.value.back,l,s.value.forward,!0),u,{position:s.value.position}),!0),r.value=l}function a(l,u){const c=be({},s.value,t.state,{forward:l,scroll:Ko()});i(c.current,c,!0),i(l,be({},of(r.value,l,null),{position:c.position+1},u),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function Gk(e){e=Ck(e);const t=Hk(e),n=Zk(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=be({location:"",base:e,go:r,createHref:Ik.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let fr=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Qe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Qe||{});const Wk={type:fr.Static,value:""},qk=/[a-zA-Z0-9_]/;function Kk(e){if(!e)return[[]];if(e==="/")return[[Wk]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=Qe.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function f(){u&&(n===Qe.Static?i.push({type:fr.Static,value:u}):n===Qe.Param||n===Qe.ParamRegExp||n===Qe.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:fr.Param,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==Qe.ParamRegExp){r=n,n=Qe.EscapeNext;continue}switch(n){case Qe.Static:l==="/"?(u&&f(),o()):l===":"?(f(),n=Qe.Param):d();break;case Qe.EscapeNext:d(),n=r;break;case Qe.Param:l==="("?n=Qe.ParamRegExp:qk.test(l)?d():(f(),n=Qe.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Qe.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=Qe.ParamRegExpEnd:c+=l;break;case Qe.ParamRegExpEnd:f(),n=Qe.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===Qe.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),f(),o(),s}const af="[^/]+?",Jk={sensitive:!1,strict:!1,start:!0,end:!0};var vt=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(vt||{});const Yk=/[.+*?^${}()[\]/\\]/g;function Xk(e,t){const n=be({},Jk,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[vt.Root];n.strict&&!u.length&&(s+="/");for(let f=0;f<u.length;f++){const d=u[f];let h=vt.Segment+(n.sensitive?vt.BonusCaseSensitive:0);if(d.type===fr.Static)f||(s+="/"),s+=d.value.replace(Yk,"\\$&"),h+=vt.Static;else if(d.type===fr.Param){const{value:p,repeatable:g,optional:y,regexp:T}=d;i.push({name:p,repeatable:g,optional:y});const b=T||af;if(b!==af){h+=vt.BonusCustomRegExp;try{`${b}`}catch(E){throw new Error(`Invalid custom RegExp for param "${p}" (${b}): `+E.message)}}let S=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;f||(S=y&&u.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,h+=vt.Dynamic,y&&(h+=vt.BonusOptional),g&&(h+=vt.BonusRepeatable),b===".*"&&(h+=vt.BonusWildcard)}c.push(h)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=vt.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),f={};if(!c)return null;for(let d=1;d<c.length;d++){const h=c[d]||"",p=i[d-1];f[p.name]=h&&p.repeatable?h.split("/"):h}return f}function l(u){let c="",f=!1;for(const d of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const h of d)if(h.type===fr.Static)c+=h.value;else if(h.type===fr.Param){const{value:p,repeatable:g,optional:y}=h,T=p in u?u[p]:"";if(qt(T)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const b=qt(T)?T.join("/"):T;if(!b)if(y)d.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function Qk(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===vt.Static+vt.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===vt.Static+vt.Segment?1:-1:0}function Zp(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=Qk(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(lf(r))return 1;if(lf(s))return-1}return s.length-r.length}function lf(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const eT={strict:!1,end:!0,sensitive:!1};function tT(e,t,n){const r=Xk(Kk(e.path),n),s=be(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function nT(e,t){const n=[],r=new Map;t=Qu(eT,t);function s(f){return r.get(f)}function i(f,d,h){const p=!h,g=uf(f);g.aliasOf=h&&h.record;const y=Qu(t,f),T=[g];if("alias"in f){const E=typeof f.alias=="string"?[f.alias]:f.alias;for(const m of E)T.push(uf(be({},g,{components:h?h.record.components:g.components,path:m,aliasOf:h?h.record:g})))}let b,S;for(const E of T){const{path:m}=E;if(d&&m[0]!=="/"){const N=d.record.path,M=N[N.length-1]==="/"?"":"/";E.path=d.record.path+(m&&M+m)}if(b=tT(E,d,y),h?h.alias.push(b):(S=S||b,S!==b&&S.alias.push(b),p&&f.name&&!ff(b)&&o(f.name)),Hp(b)&&l(b),g.children){const N=g.children;for(let M=0;M<N.length;M++)i(N[M],b,h&&h.children[M])}h=h||b}return S?()=>{o(S)}:Vs}function o(f){if(jp(f)){const d=r.get(f);d&&(r.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&r.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return n}function l(f){const d=iT(f,n);n.splice(d,0,f),f.record.name&&!ff(f)&&r.set(f.record.name,f)}function u(f,d){let h,p={},g,y;if("name"in f&&f.name){if(h=r.get(f.name),!h)throw Jr(je.MATCHER_NOT_FOUND,{location:f});y=h.record.name,p=be(cf(d.params,h.keys.filter(S=>!S.optional).concat(h.parent?h.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),f.params&&cf(f.params,h.keys.map(S=>S.name))),g=h.stringify(p)}else if(f.path!=null)g=f.path,h=n.find(S=>S.re.test(g)),h&&(p=h.parse(g),y=h.record.name);else{if(h=d.name?r.get(d.name):n.find(S=>S.re.test(d.path)),!h)throw Jr(je.MATCHER_NOT_FOUND,{location:f,currentLocation:d});y=h.record.name,p=be({},d.params,f.params),g=h.stringify(p)}const T=[];let b=h;for(;b;)T.unshift(b.record),b=b.parent;return{name:y,path:g,params:p,matched:T,meta:sT(T)}}e.forEach(f=>i(f));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function cf(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function uf(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:rT(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function rT(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ff(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sT(e){return e.reduce((t,n)=>be(t,n.meta),{})}function iT(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;Zp(e,t[i])<0?r=i:n=i+1}const s=oT(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function oT(e){let t=e;for(;t=t.parent;)if(Hp(t)&&Zp(e,t)===0)return t}function Hp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function df(e){const t=$t(Jo),n=$t(mc),r=Re(()=>{const l=Ft(e.to);return t.resolve(l)}),s=Re(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],f=n.matched;if(!c||!f.length)return-1;const d=f.findIndex(Kr.bind(null,c));if(d>-1)return d;const h=hf(l[u-2]);return u>1&&hf(c)===h&&f[f.length-1].path!==h?f.findIndex(Kr.bind(null,l[u-2])):d}),i=Re(()=>s.value>-1&&fT(n.params,r.value.params)),o=Re(()=>s.value>-1&&s.value===n.matched.length-1&&Up(n.params,r.value.params));function a(l={}){if(uT(l)){const u=t[Ft(e.replace)?"replace":"push"](Ft(e.to)).catch(Vs);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:Re(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function aT(e){return e.length===1?e[0]:e}const lT=Xl({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:df,setup(e,{slots:t}){const n=ci(df(e)),{options:r}=$t(Jo),s=Re(()=>({[pf(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[pf(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&aT(t.default(n));return e.custom?i:ic("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),cT=lT;function uT(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fT(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!qt(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function hf(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const pf=(e,t,n)=>e??t??n,dT=Xl({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=$t(dl),s=Re(()=>e.route||r.value),i=$t(sf,0),o=Re(()=>{let u=Ft(i);const{matched:c}=s.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),a=Re(()=>s.value.matched[o.value]);zi(sf,Re(()=>o.value+1)),zi(jk,a),zi(dl,s);const l=Nt();return Mr(()=>[l.value,a.value,e.name],([u,c,f],[d,h,p])=>{c&&(c.instances[f]=u,h&&h!==c&&u&&u===d&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Kr(c,h)||!d)&&(c.enterCallbacks[f]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,f=a.value,d=f&&f.components[c];if(!d)return gf(n.default,{Component:d,route:u});const h=f.props[c],p=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=ic(d,be({},p,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return gf(n.default,{Component:y,route:u})||y}}});function gf(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const hT=dT;function pT(e){const t=nT(e.routes,e),n=e.parseQuery||zk,r=e.stringifyQuery||rf,s=e.history,i=fs(),o=fs(),a=fs(),l=I_(Dn);let u=Dn;Or&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=pa.bind(null,C=>""+C),f=pa.bind(null,Ek),d=pa.bind(null,ei);function h(C,q){let Z,K;return jp(C)?(Z=t.getRecordMatcher(C),K=q):K=C,t.addRoute(K,Z)}function p(C){const q=t.getRecordMatcher(C);q&&t.removeRoute(q)}function g(){return t.getRoutes().map(C=>C.record)}function y(C){return!!t.getRecordMatcher(C)}function T(C,q){if(q=be({},q||l.value),typeof C=="string"){const w=ga(n,C,q.path),x=t.resolve({path:w.path},q),P=s.createHref(w.fullPath);return be(w,x,{params:d(x.params),hash:ei(w.hash),redirectedFrom:void 0,href:P})}let Z;if(C.path!=null)Z=be({},C,{path:ga(n,C.path,q.path).path});else{const w=be({},C.params);for(const x in w)w[x]==null&&delete w[x];Z=be({},C,{params:f(w)}),q.params=f(q.params)}const K=t.resolve(Z,q),de=C.hash||"";K.params=c(d(K.params));const _=Tk(r,be({},C,{hash:yk(de),path:K.path})),v=s.createHref(_);return be({fullPath:_,hash:de,query:r===rf?Uk(C.query):C.query||{}},K,{redirectedFrom:void 0,href:v})}function b(C){return typeof C=="string"?ga(n,C,l.value.path):be({},C)}function S(C,q){if(u!==C)return Jr(je.NAVIGATION_CANCELLED,{from:q,to:C})}function E(C){return M(C)}function m(C){return E(be(b(C),{replace:!0}))}function N(C,q){const Z=C.matched[C.matched.length-1];if(Z&&Z.redirect){const{redirect:K}=Z;let de=typeof K=="function"?K(C,q):K;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=b(de):{path:de},de.params={}),be({query:C.query,hash:C.hash,params:de.path!=null?{}:C.params},de)}}function M(C,q){const Z=u=T(C),K=l.value,de=C.state,_=C.force,v=C.replace===!0,w=N(Z,K);if(w)return M(be(b(w),{state:typeof w=="object"?be({},de,w.state):de,force:_,replace:v}),q||Z);const x=Z;x.redirectedFrom=q;let P;return!_&&Ok(r,K,Z)&&(P=Jr(je.NAVIGATION_DUPLICATED,{to:x,from:K}),rt(K,K,!0,!1)),(P?Promise.resolve(P):F(x,K)).catch(A=>fn(A)?fn(A,je.NAVIGATION_GUARD_REDIRECT)?A:nt(A):le(A,x,K)).then(A=>{if(A){if(fn(A,je.NAVIGATION_GUARD_REDIRECT))return M(be({replace:v},b(A.to),{state:typeof A.to=="object"?be({},de,A.to.state):de,force:_}),q||x)}else A=D(x,K,!0,v,de);return J(x,K,A),A})}function R(C,q){const Z=S(C,q);return Z?Promise.reject(Z):Promise.resolve()}function I(C){const q=Ge.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(C):C()}function F(C,q){let Z;const[K,de,_]=Bk(C,q);Z=va(K.reverse(),"beforeRouteLeave",C,q);for(const w of K)w.leaveGuards.forEach(x=>{Z.push(Vn(x,C,q))});const v=R.bind(null,C,q);return Z.push(v),Ve(Z).then(()=>{Z=[];for(const w of i.list())Z.push(Vn(w,C,q));return Z.push(v),Ve(Z)}).then(()=>{Z=va(de,"beforeRouteUpdate",C,q);for(const w of de)w.updateGuards.forEach(x=>{Z.push(Vn(x,C,q))});return Z.push(v),Ve(Z)}).then(()=>{Z=[];for(const w of _)if(w.beforeEnter)if(qt(w.beforeEnter))for(const x of w.beforeEnter)Z.push(Vn(x,C,q));else Z.push(Vn(w.beforeEnter,C,q));return Z.push(v),Ve(Z)}).then(()=>(C.matched.forEach(w=>w.enterCallbacks={}),Z=va(_,"beforeRouteEnter",C,q,I),Z.push(v),Ve(Z))).then(()=>{Z=[];for(const w of o.list())Z.push(Vn(w,C,q));return Z.push(v),Ve(Z)}).catch(w=>fn(w,je.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function J(C,q,Z){a.list().forEach(K=>I(()=>K(C,q,Z)))}function D(C,q,Z,K,de){const _=S(C,q);if(_)return _;const v=q===Dn,w=Or?history.state:{};Z&&(K||v?s.replace(C.fullPath,be({scroll:v&&w&&w.scroll},de)):s.push(C.fullPath,de)),l.value=C,rt(C,q,Z,v),nt()}let re;function ue(){re||(re=s.listen((C,q,Z)=>{if(!yt.listening)return;const K=T(C),de=N(K,yt.currentRoute.value);if(de){M(be(de,{replace:!0,force:!0}),K).catch(Vs);return}u=K;const _=l.value;Or&&$k(nf(_.fullPath,Z.delta),Ko()),F(K,_).catch(v=>fn(v,je.NAVIGATION_ABORTED|je.NAVIGATION_CANCELLED)?v:fn(v,je.NAVIGATION_GUARD_REDIRECT)?(M(be(b(v.to),{force:!0}),K).then(w=>{fn(w,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&!Z.delta&&Z.type===ul.pop&&s.go(-1,!1)}).catch(Vs),Promise.reject()):(Z.delta&&s.go(-Z.delta,!1),le(v,K,_))).then(v=>{v=v||D(K,_,!1),v&&(Z.delta&&!fn(v,je.NAVIGATION_CANCELLED)?s.go(-Z.delta,!1):Z.type===ul.pop&&fn(v,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),J(K,_,v)}).catch(Vs)}))}let Ee=fs(),ce=fs(),X;function le(C,q,Z){nt(C);const K=ce.list();return K.length?K.forEach(de=>de(C,q,Z)):console.error(C),Promise.reject(C)}function He(){return X&&l.value!==Dn?Promise.resolve():new Promise((C,q)=>{Ee.add([C,q])})}function nt(C){return X||(X=!C,ue(),Ee.list().forEach(([q,Z])=>C?Z(C):q()),Ee.reset()),C}function rt(C,q,Z,K){const{scrollBehavior:de}=e;if(!Or||!de)return Promise.resolve();const _=!Z&&Dk(nf(C.fullPath,0))||(K||!Z)&&history.state&&history.state.scroll||null;return Lo().then(()=>de(C,q,_)).then(v=>v&&Nk(v)).catch(v=>le(v,C,q))}const ye=C=>s.go(C);let Ye;const Ge=new Set,yt={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:g,resolve:T,options:e,push:E,replace:m,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:ce.add,isReady:He,install(C){C.component("RouterLink",cT),C.component("RouterView",hT),C.config.globalProperties.$router=yt,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),Or&&!Ye&&l.value===Dn&&(Ye=!0,E(s.location).catch(K=>{}));const q={};for(const K in Dn)Object.defineProperty(q,K,{get:()=>l.value[K],enumerable:!0});C.provide(Jo,yt),C.provide(mc,Hd(q)),C.provide(dl,l);const Z=C.unmount;Ge.add(C),C.unmount=function(){Ge.delete(C),Ge.size<1&&(u=Dn,re&&re(),re=null,l.value=Dn,Ye=!1,X=!1),Z()}}};function Ve(C){return C.reduce((q,Z)=>q.then(()=>I(Z)),Promise.resolve())}return yt}function Qx(){return $t(Jo)}function eA(e){return $t(mc)}const gT=[{path:"/",name:"ProjectList",component:()=>Xe(()=>import("./ProjectListView-DcNyuINs.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/projects/new",name:"ProjectNew",component:()=>Xe(()=>import("./ProjectNewView-B5YV62hv.js"),__vite__mapDeps([5,1,2,6,7,8]))},{path:"/projects/:id/edit",name:"ProjectEdit",component:()=>Xe(()=>import("./ProjectEditView-CwTOeSun.js"),__vite__mapDeps([9,1,2,10,11,6,7,12,13,14,15]))},{path:"/projects/:projectId/command-buttons/new",name:"CommandButtonNew",component:()=>Xe(()=>import("./CommandButtonDetailView-CdSCPp78.js"),__vite__mapDeps([16,17,2,18]))},{path:"/projects/:projectId/command-buttons/:buttonId",name:"CommandButtonEdit",component:()=>Xe(()=>import("./CommandButtonDetailView-CdSCPp78.js"),__vite__mapDeps([16,17,2,18]))},{path:"/projects/:id/sessions",name:"SessionList",component:()=>Xe(()=>import("./SessionListView-CLXBfLcq.js"),__vite__mapDeps([19,1,2,20,21,17,22,23,24,25,26,13,12,14,27,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/archived",name:"ArchivedSessions",component:()=>Xe(()=>import("./SessionListView-CLXBfLcq.js"),__vite__mapDeps([19,1,2,20,21,17,22,23,24,25,26,13,12,14,27,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/templates",name:"ProjectTemplates",component:()=>Xe(()=>import("./SessionListView-CLXBfLcq.js"),__vite__mapDeps([19,1,2,20,21,17,22,23,24,25,26,13,12,14,27,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/commands",name:"ProjectCommands",component:()=>Xe(()=>import("./SessionListView-CLXBfLcq.js"),__vite__mapDeps([19,1,2,20,21,17,22,23,24,25,26,13,12,14,27,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/kanban",name:"ProjectKanban",component:()=>Xe(()=>import("./SessionListView-CLXBfLcq.js"),__vite__mapDeps([19,1,2,20,21,17,22,23,24,25,26,13,12,14,27,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/scheduled",redirect:e=>`/projects/${e.params.id}/sessions`},{path:"/projects/:projectId/templates/:templateId",name:"TemplateDetail",component:()=>Xe(()=>import("./TemplateDetailView-DH6Oswsp.js"),__vite__mapDeps([38,25,2,20,26,12,13,14,27,28,29,30,39]))},{path:"/projects/:id/sessions/new",name:"NewSession",component:()=>Xe(()=>import("./NewSessionView-BsDrp8mj.js"),__vite__mapDeps([40,20,2,25,26,10,11,41,42,31,12,13,14,32,33,34,29,30,1,43]))},{path:"/sessions/active",name:"ActiveSessions",component:()=>Xe(()=>import("./ActiveSessionsView-B0XHqLmv.js"),__vite__mapDeps([44,20,2,17,23,21,22,24,45]))},{path:"/sessions/:id/:tab?",name:"SessionDetail",component:()=>Xe(()=>import("./SessionDetailView-3cPZrbS3.js").then(e=>e.S),__vite__mapDeps([46,20,2,1,25,26,21,17,22,32,13,33,3,12,14,35,36,10,11,41,42,29,30,47]))},{path:"/settings",name:"Settings",component:()=>Xe(()=>import("./SettingsView-CTGiGvR2.js"),__vite__mapDeps([48,49])),redirect:"/settings/providers",children:[{path:"providers",name:"Providers",component:()=>Xe(()=>import("./ProvidersView-nY9GnDdO.js"),__vite__mapDeps([50,13,2,51]))},{path:"summary",name:"SummarySettings",component:()=>Xe(()=>import("./SummarySettingsView-BR2ZjEa3.js"),__vite__mapDeps([52,53,2,29,30,12,13,14,54]))},{path:"general",name:"GeneralSettings",component:()=>Xe(()=>import("./GeneralSettingsView-D1nI8_zk.js"),__vite__mapDeps([55,53,2,56]))},{path:"logs",name:"AgentLogs",component:()=>Xe(()=>import("./AgentLogsView-DmsjUMlB.js"),__vite__mapDeps([57,2,58]))}]}],_T=pT({history:Gk(),routes:gT});var k=typeof window<"u"?window:void 0,ct=typeof globalThis<"u"?globalThis:k;typeof self>"u"&&(ct.self=ct),typeof File>"u"&&(ct.File=function(){});var Gp=Array.prototype,_f=Gp.forEach,vf=Gp.indexOf,It=ct==null?void 0:ct.navigator,j=ct==null?void 0:ct.document,ot=ct==null?void 0:ct.location,hl=ct==null?void 0:ct.fetch,pl=ct!=null&&ct.XMLHttpRequest&&"withCredentials"in new ct.XMLHttpRequest?ct.XMLHttpRequest:void 0,mf=ct==null?void 0:ct.AbortController,kt=It==null?void 0:It.userAgent,Q=k??{},pn={DEBUG:!1,LIB_VERSION:"1.356.1"};function yf(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,s)}function gn(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){yf(i,r,s,o,a,"next",l)}function a(l){yf(i,r,s,o,a,"throw",l)}o(void 0)})}}function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function Wp(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vT=["$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"],mT=["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"],bf=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return mT.concat(t).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})};function fe(e,t){return e.indexOf(t)!==-1}var Yo=function(e){return e.trim()},gl=function(e){return e.replace(/^\$/,"")},yT=Array.isArray,qp=Object.prototype,Kp=qp.hasOwnProperty,Xo=qp.toString,ve=yT||function(e){return Xo.call(e)==="[object Array]"},Sn=e=>typeof e=="function",et=e=>e===Object(e)&&!ve(e),Ir=e=>{if(et(e)){for(var t in e)if(Kp.call(e,t))return!1;return!0}return!1},B=e=>e===void 0,qe=e=>Xo.call(e)=="[object String]",_l=e=>qe(e)&&e.trim().length===0,Kt=e=>e===null,he=e=>B(e)||Kt(e),Pn=e=>Xo.call(e)=="[object Number]"&&e==e,xr=e=>Pn(e)&&e>0,An=e=>Xo.call(e)==="[object Boolean]",bT=e=>e instanceof FormData,wT=e=>fe(vT,e);function vl(e){return e===null||typeof e!="object"}function po(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Jp(e){return!B(Event)&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var ET=[!0,"true",1,"1","yes"],ma=e=>fe(ET,e),ST=[!1,"false",0,"0","no"];function an(e,t,n,r,s){return t>n&&(r.warn("min cannot be greater than max."),t=n),Pn(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+s),an(s||n,t,n,r))}class kT{constructor(t){this.t={},this.i=t.i,this.o=an(t.bucketSize,0,100,t.h),this.m=an(t.refillRate,0,this.o,t.h),this.$=an(t.refillInterval,0,864e5,t.h)}S(t,n){var r=n-t.lastAccess,s=Math.floor(r/this.$);if(s>0){var i=s*this.m;t.tokens=Math.min(t.tokens+i,this.o),t.lastAccess=t.lastAccess+s*this.$}}consumeRateLimit(t){var n,r=Date.now(),s=String(t),i=this.t[s];return i?this.S(i,r):(i={tokens:this.o,lastAccess:r},this.t[s]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.i)==null||n.call(this,t)),i.tokens===0)}stop(){this.t={}}}var zt="Mobile",go="iOS",kn="Android",ti="Tablet",Yp=kn+" "+ti,Xp="iPad",Qp="Apple",eg=Qp+" Watch",ni="Safari",Yr="BlackBerry",tg="Samsung",ng=tg+"Browser",rg=tg+" Internet",_r="Chrome",TT=_r+" OS",sg=_r+" "+go,yc="Internet Explorer",ig=yc+" "+zt,bc="Opera",OT=bc+" Mini",wc="Edge",og="Microsoft "+wc,jr="Firefox",ag=jr+" "+go,ri="Nintendo",si="PlayStation",Br="Xbox",lg=kn+" "+zt,cg=zt+" "+ni,Ss="Windows",ml=Ss+" Phone",wf="Nokia",yl="Ouya",ug="Generic",xT=ug+" "+zt.toLowerCase(),fg=ug+" "+ti.toLowerCase(),bl="Konqueror",_t="(\\d+(\\.\\d+)?)",ya=new RegExp("Version/"+_t),AT=new RegExp(Br,"i"),CT=new RegExp(si+" \\w+","i"),RT=new RegExp(ri+" \\w+","i"),Ec=new RegExp(Yr+"|PlayBook|BB10","i"),IT={"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"},Pi,Ef,ba,PT=(e,t)=>t&&fe(t,Qp)||function(n){return fe(n,ni)&&!fe(n,_r)&&!fe(n,kn)}(e),dg=function(e,t){return t=t||"",fe(e," OPR/")&&fe(e,"Mini")?OT:fe(e," OPR/")?bc:Ec.test(e)?Yr:fe(e,"IE"+zt)||fe(e,"WPDesktop")?ig:fe(e,ng)?rg:fe(e,wc)||fe(e,"Edg/")?og:fe(e,"FBIOS")?"Facebook "+zt:fe(e,"UCWEB")||fe(e,"UCBrowser")?"UC Browser":fe(e,"CriOS")?sg:fe(e,"CrMo")||fe(e,_r)?_r:fe(e,kn)&&fe(e,ni)?lg:fe(e,"FxiOS")?ag:fe(e.toLowerCase(),bl.toLowerCase())?bl:PT(e,t)?fe(e,zt)?cg:ni:fe(e,jr)?jr:fe(e,"MSIE")||fe(e,"Trident/")?yc:fe(e,"Gecko")?jr:""},NT={[ig]:[new RegExp("rv:"+_t)],[og]:[new RegExp(wc+"?\\/"+_t)],[_r]:[new RegExp("("+_r+"|CrMo)\\/"+_t)],[sg]:[new RegExp("CriOS\\/"+_t)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+_t)],[ni]:[ya],[cg]:[ya],[bc]:[new RegExp("(Opera|OPR)\\/"+_t)],[jr]:[new RegExp(jr+"\\/"+_t)],[ag]:[new RegExp("FxiOS\\/"+_t)],[bl]:[new RegExp("Konqueror[:/]?"+_t,"i")],[Yr]:[new RegExp(Yr+" "+_t),ya],[lg]:[new RegExp("android\\s"+_t,"i")],[rg]:[new RegExp(ng+"\\/"+_t)],[yc]:[new RegExp("(rv:|MSIE )"+_t)],Mozilla:[new RegExp("rv:"+_t)]},$T=function(e,t){var n=dg(e,t),r=NT[n];if(B(r))return null;for(var s=0;s<r.length;s++){var i=r[s],o=e.match(i);if(o)return parseFloat(o[o.length-2])}return null},Sf=[[new RegExp(Br+"; "+Br+" (.*?)[);]","i"),e=>[Br,e&&e[1]||""]],[new RegExp(ri,"i"),[ri,""]],[new RegExp(si,"i"),[si,""]],[Ec,[Yr,""]],[new RegExp(Ss,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ml,""];if(new RegExp(zt).test(t)&&!/IEMobile\b/.test(t))return[Ss+" "+zt,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],s=IT[r]||"";return/arm/i.test(t)&&(s="RT"),[Ss,s]}return[Ss,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[go,t.join(".")]}return[go,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=B(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+kn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+kn+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[kn,t.join(".")]}return[kn,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[TT,""]],[/Linux|debian/i,["Linux",""]]],kf=function(e){return RT.test(e)?ri:CT.test(e)?si:AT.test(e)?Br:new RegExp(yl,"i").test(e)?yl:new RegExp("("+ml+"|WPDesktop)","i").test(e)?ml:/iPad/.test(e)?Xp:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eg:Ec.test(e)?Yr:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(wf,"i").test(e)?wf:/(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(zt).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)?kn:Yp:new RegExp("(pda|"+zt+")","i").test(e)?xT:new RegExp(ti,"i").test(e)&&!new RegExp(ti+" pc","i").test(e)?fg:""},DT=e=>e instanceof Error;function MT(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ba&&n.length===Ef||(Ef=n.length,ba=n.reduce((r,s)=>{Pi||(Pi={});var i=Pi[s];if(i)r[i[0]]=i[1];else for(var o=e(s),a=o.length-1;a>=0;a--){var l=o[a],u=l==null?void 0:l.filename,c=t[s];if(u&&c){r[u]=c,Pi[s]=[u,c];break}}return r},{})),ba}}class FT{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,n,0).apply(t),i=this.buildParsingContext(n),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(t){var n=this;return gn(function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&ve(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t})()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,s;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(s=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),U({},t,{cause:r,stack:s})}applyChunkIds(t,n){return t.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return gn(function*(){var r=t;for(var s of n.modifiers)r=yield s(r);return r})()}convertToExceptionList(t,n){var r,s,i,o={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(o.stacktrace={type:"raw",frames:t.stack});var a=[o];return t.cause!=null&&a.push(...this.convertToExceptionList(t.cause,U({},n,{handled:!0}))),a}buildParsingContext(t){var n;return{chunkIdMap:MT(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var s=(i,o)=>{if(o<=4){var a=this.buildCoercingContext(t,n,o);return this.applyCoercers(i,a)}};return U({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Xr="?";function wl(e,t,n,r,s){var i={platform:e,filename:t,function:n==="<anonymous>"?Xr:n,in_app:!0};return B(r)||(i.lineno=r),B(s)||(i.colno=s),i}var hg=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Xr,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},LT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,UT=/\((\S*)(?::(\d+))(?::(\d+))\)/,jT=(e,t)=>{var n=LT.exec(e);if(n){var[,r,s,i]=n;return wl(t,r,Xr,+s,+i)}var o=zT.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=UT.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=hg(o[1]||Xr,o[2]);return wl(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},BT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,VT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ZT=(e,t)=>{var n=BT.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=VT.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||Xr;return[i,s]=hg(i,s),wl(t,s,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Tf=/\(error: (.*)\)/,Of=50;function HT(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
81
|
-
`),l=i;l<a.length;l++){var u=a[l];if(!(u.length>1024)){var c=Tf.test(u)?u.replace(Tf,"$1"):u;if(!c.match(/\S*Error: /)){for(var f of n){var d=f(c,e);if(d){o.push(d);break}}if(o.length>=Of)break}}}return function(h){if(!h.length)return[];var p=Array.from(h);return p.reverse(),p.slice(0,Of).map(g=>{return U({},g,{filename:g.filename||(y=p,y[y.length-1]||{}).filename,function:g.function||Xr});var y})}(o)}}("web:javascript",jT,ZT)}class GT{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=qe(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return po(t,"DOMException")}isDOMError(t){return po(t,"DOMError")}}class WT{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(t){return t.stacktrace||t.stack||void 0}}class qT{constructor(){}match(t){return po(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r,s=n.apply(t.error);return s||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var KT=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class JT{match(t){return typeof t=="string"}coerce(t,n){var r,[s,i]=this.getInfos(t);return{type:s??"Error",value:i??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,s=t.match(KT);return s&&(n=s[1],r=s[2]),[n,r]}}var YT=["fatal","error","warning","log","info","debug"];function pg(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length||s.length<=t?s:s.slice(0,t)+"..."}return""}class XT{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,s=this.getErrorPropertyFromObject(t);return s?n.apply(s):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return Jp(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+pg(t)}isSeverityLevel(t){return qe(t)&&!_l(t)&&YT.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(DT(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class QT{match(t){return Jp(t)}coerce(t,n){var r,s=t.constructor.name;return{type:s,value:s+" captured as exception with keys: "+pg(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class eO{match(t){return vl(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class tO{match(t){return po(t,"PromiseRejectionEvent")}coerce(t,n){var r,s=this.getUnhandledRejectionReason(t);return vl(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}getUnhandledRejectionReason(t){if(vl(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var gg=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k:function(s){if(k&&(pn.DEBUG||Q.POSTHOG_DEBUG||n)&&!B(k.console)&&k.console){for(var i=("__rrweb_original__"in k.console[s])?k.console[s].__rrweb_original__:k.console[s],o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];i(e,...a)}},info:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("log",...i)},warn:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("warn",...i)},error:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("error",...i)},critical:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];console.error(e,...i)},uninitializedWarning:s=>{r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>gg(e+" "+s,i)};return r},V=gg("[PostHog.js]"),Ue=V.createLogger,nO=Ue("[ExternalScriptsLoader]"),xf=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return nO.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=j==null?void 0:j.querySelectorAll("script");if(r){for(var s,i=function(){if(r[o].src===t){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)}),l.onerror=u=>n(u),{v:void 0})}},o=0;o<r.length;o++)if(s=i())return s.v}var a=()=>{if(!j)return n("document not found");var l=j.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=t,l.onload=f=>{l.__posthog_loading_callback_fired=!0,n(void 0,f)},l.onerror=f=>n(f),e.config.prepare_external_dependency_script&&(l=e.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")j.head.appendChild(l);else{var u,c=j.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):j.body.appendChild(l)}};j!=null&&j.body?a():j==null||j.addEventListener("DOMContentLoaded",a)};Q.__PosthogExtensions__=Q.__PosthogExtensions__||{},Q.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(r="/array/"+e.config.token+"/config.js"),t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}var i=e.requestRouter.endpointFor("assets",r);xf(e,i,n)},Q.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);xf(e,r,n)};var _o={};function Wn(e,t,n){if(ve(e)){if(_f&&e.forEach===_f)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(n,e[r],r)===_o)return}}}function Ce(e,t,n){if(!he(e)){if(ve(e))return Wn(e,t,n);if(bT(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===_o)return}else for(var s in e)if(Kp.call(e,s)&&t.call(n,e[s],s)===_o)return}}var Ze=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Wn(n,function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])}),e},Qr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Wn(n,function(s){Wn(s,function(i){e.push(i)})}),e};function qi(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Af=function(e){try{return e()}catch{return}},rO=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(s){V.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),V.critical(s)}}},Sc=function(e){var t={};return Ce(e,function(n,r){(qe(n)&&n.length>0||Pn(n))&&(t[r]=n)}),t};function sO(e,t){return n=e,r=i=>qe(i)&&!Kt(t)?i.slice(0,t):i,s=new Set,function i(o,a){return o!==Object(o)?r?r(o,a):o:s.has(o)?void 0:(s.add(o),ve(o)?(l=[],Wn(o,u=>{l.push(i(u))})):(l={},Ce(o,(u,c)=>{s.has(u)||(l[c]=i(u,c))})),l);var l}(n);var n,r,s}var iO=["herokuapp.com","vercel.app","netlify.app"];function oO(e){var t=e==null?void 0:e.hostname;if(!qe(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of iO)if(n===r)return!1;return!0}function _g(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function We(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}function vg(e){return e.name==="ph_toolbar_internal"}var mg="$people_distinct_id",ks="__alias",Ts="__timers",Cf="$autocapture_disabled_server_side",El="$heatmaps_enabled_server_side",Rf="$exception_capture_enabled_server_side",Sl="$error_tracking_suppression_rules",If="$error_tracking_capture_extension_exceptions",Pf="$web_vitals_enabled_server_side",yg="$dead_clicks_enabled_server_side",Nf="$product_tours_enabled_server_side",$f="$web_vitals_allowed_metrics",Ni="$session_recording_remote_config",vo="$sesid",bg="$session_is_sampled",Pr="$enabled_feature_flags",Os="$early_access_features",kl="$feature_flag_details",xs="$stored_person_properties",ur="$stored_group_properties",Tl="$surveys",mo="$flag_call_reported",Ol="$feature_flag_errors",yo="$feature_flag_evaluated_at",rn="$user_state",xl="$client_session_props",Al="$capture_rate_limit",Cl="$initial_campaign_params",Rl="$initial_referrer_info",bo="$initial_person_info",wo="$epp",wg="__POSTHOG_TOOLBAR__",ds="$posthog_cookieless",aO=[mg,ks,"__cmpns",Ts,"$session_recording_enabled_server_side",El,vo,Pr,Sl,rn,Os,kl,ur,xs,Tl,mo,Ol,yo,xl,Al,Cl,Rl,wo,bo];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Pn(e)&&isFinite(e)&&Math.floor(e)===e});var Df="0123456789abcdef";class Eo{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,s){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||t<0||n<0||r<0||s<0||t>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new Eo(i)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+Df.charAt(this.bytes[n]>>>4)+Df.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Eo(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class lO{constructor(){this.P=0,this.T=0,this.C=new cO}generate(){var t=this.generateOrAbort();if(B(t)){this.P=0;var n=this.generateOrAbort();if(B(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.P)this.P=t,this.I();else{if(!(t+1e4>this.P))return;this.T++,this.T>4398046511103&&(this.P++,this.I())}return Eo.fromFieldsV7(this.P,Math.trunc(this.T/Math.pow(2,30)),this.T&Math.pow(2,30)-1,this.C.nextUint32())}I(){this.T=1024*this.C.nextUint32()+(1023&this.C.nextUint32())}}var Mf,Eg=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};k&&!B(k.crypto)&&crypto.getRandomValues&&(Eg=e=>crypto.getRandomValues(e));class cO{constructor(){this.R=new Uint32Array(8),this.F=1/0}nextUint32(){return this.F>=this.R.length&&(Eg(this.R),this.F=0),this.R[this.F++]}}var Hn=()=>uO().toString(),uO=()=>(Mf||(Mf=new lO)).generate(),hs="",fO=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function dO(e,t){if(t){var n=function(s,i){if(i===void 0&&(i=j),hs)return hs;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Hn();!hs&&a--;){var u=o.slice(a).join("."),c=l+"=1;domain=."+u+";path=/";i.cookie=c+";max-age=3",i.cookie.includes(l)&&(i.cookie=c+";max-age=0",hs=u)}return hs}(e);if(!n){var r=(s=>{var i=s.match(fO);return i?i[0]:""})(e);r!==n&&V.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var on={O:()=>!!j,M:function(e){V.error("cookieStore error: "+e)},A:function(e){if(j){try{for(var t=e+"=",n=j.cookie.split(";").filter(i=>i.length),r=0;r<n.length;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},D:function(e){var t;try{t=JSON.parse(on.A(e))||{}}catch{}return t},j:function(e,t,n,r,s){if(j)try{var i="",o="",a=dO(j.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&V.warn("cookieStore warning: large cookie, len="+u.length),j.cookie=u,u}catch{return}},L:function(e,t){if(j!=null&&j.cookie)try{on.j(e,"",-1,t)}catch{return}}},wa=null,De={O:function(){if(!Kt(wa))return wa;var e=!0;if(B(k))e=!1;else try{var t="__mplssupport__";De.j(t,"xyz"),De.A(t)!=='"xyz"'&&(e=!1),De.L(t)}catch{e=!1}return e||V.error("localStorage unsupported; falling back to cookie store"),wa=e,e},M:function(e){V.error("localStorage error: "+e)},A:function(e){try{return k==null?void 0:k.localStorage.getItem(e)}catch(t){De.M(t)}return null},D:function(e){try{return JSON.parse(De.A(e))||{}}catch{}return null},j:function(e,t){try{k==null||k.localStorage.setItem(e,JSON.stringify(t))}catch(n){De.M(n)}},L:function(e){try{k==null||k.localStorage.removeItem(e)}catch(t){De.M(t)}}},hO=["$device_id","distinct_id",vo,bg,wo,bo,rn],$i={},pO={O:function(){return!0},M:function(e){V.error("memoryStorage error: "+e)},A:function(e){return $i[e]||null},D:function(e){return $i[e]||null},j:function(e,t){$i[e]=t},L:function(e){delete $i[e]}},ar=null,it={O:function(){if(!Kt(ar))return ar;if(ar=!0,B(k))ar=!1;else try{var e="__support__";it.j(e,"xyz"),it.A(e)!=='"xyz"'&&(ar=!1),it.L(e)}catch{ar=!1}return ar},M:function(e){V.error("sessionStorage error: ",e)},A:function(e){try{return k==null?void 0:k.sessionStorage.getItem(e)}catch(t){it.M(t)}return null},D:function(e){try{return JSON.parse(it.A(e))||null}catch{}return null},j:function(e,t){try{k==null||k.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){it.M(n)}},L:function(e){try{k==null||k.sessionStorage.removeItem(e)}catch(t){it.M(t)}}},_n=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class gO{constructor(t){this._instance=t}get N(){return this._instance.config}get consent(){return this.U()?_n.DENIED:this.H}isOptedOut(){return this.N.cookieless_mode==="always"||this.consent===_n.DENIED||this.consent===_n.PENDING&&(this.N.opt_out_capturing_by_default||this.N.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===_n.DENIED}optInOut(t){this.B.j(this.q,t?1:0,this.N.cookie_expiration,this.N.cross_subdomain_cookie,this.N.secure_cookie)}reset(){this.B.L(this.q,this.N.cross_subdomain_cookie)}get q(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get H(){var t=this.B.A(this.q);return ma(t)?_n.GRANTED:fe(ST,t)?_n.DENIED:_n.PENDING}get B(){if(!this.W){var t=this.N.opt_out_capturing_persistence_type;this.W=t==="localStorage"?De:on;var n=t==="localStorage"?on:De;n.A(this.q)&&(this.W.A(this.q)||this.optInOut(ma(n.A(this.q))),n.L(this.q,this.N.cross_subdomain_cookie))}return this.W}U(){return!!this.N.respect_dnt&&!!_g([It==null?void 0:It.doNotTrack,It==null?void 0:It.msDoNotTrack,Q.doNotTrack],t=>ma(t))}}var Di=Ue("[Dead Clicks]"),_O=()=>!0,vO=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(yg)),r=e.instance.config.capture_dead_clicks;return An(r)?r:!!et(r)||n};class Ff{get lazyLoadedDeadClicksAutocapture(){return this.G}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[yg]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.V(()=>{this.J()}):this.stop()}V(t){var n,r;(n=Q.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?Di.error("failed to load script",s):t()})}J(){var t;if(j){if(!this.G&&(t=Q.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=et(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.G=Q.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.G.start(j),Di.info("starting...")}}else Di.error("`document` not found. Cannot start.")}stop(){this.G&&(this.G.stop(),this.G=void 0,Di.info("stopping..."))}}var Ea=Ue("[SegmentIntegration]");function mO(e,t){var n=e.config.segment;if(!n)return t();(function(r,s){var i=r.config.segment;if(!i)return s();var o=l=>{var u=()=>l.anonymousId()||Hn();r.config.get_device_id=u,l.id()&&(r.register({distinct_id:l.id(),$device_id:u()}),r.persistence.set_property(rn,"identified")),s()},a=i.user();"then"in a&&Sn(a.then)?a.then(o):o(a)})(e,()=>{n.register((r=>{Promise&&Promise.resolve||Ea.warn("This browser does not have Promise support, and can not use the segment integration");var s=(i,o)=>{if(!o)return i;i.event.userId||i.event.anonymousId===r.get_distinct_id()||(Ea.info("No userId set, resetting PostHog"),r.reset()),i.event.userId&&i.event.userId!==r.get_distinct_id()&&(Ea.info("UserId set, identifying with PostHog"),r.identify(i.event.userId));var a=r.calculateEventProperties(o,i.event.properties);return i.event.properties=Object.assign({},a,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:i=>s(i,i.event.event),page:i=>s(i,"$pageview"),identify:i=>s(i,"$identify"),screen:i=>s(i,"$screen")}})(e)).then(()=>{t()})})}var Sg="posthog-js";function kg(e,t){var{organization:n,projectId:r,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return a=>{var l,u,c,f,d;if(!(i==="*"||i.includes(a.level))||!e.__loaded)return a;a.tags||(a.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());a.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((l=a.exception)==null?void 0:l.values)||[],g=p.map(T=>U({},T,{stacktrace:T.stacktrace?U({},T.stacktrace,{type:"raw",frames:(T.stacktrace.frames||[]).map(b=>U({},b,{platform:"web:javascript"}))}):void 0})),y={$exception_message:((u=p[0])==null?void 0:u.value)||a.message,$exception_type:(c=p[0])==null?void 0:c.type,$exception_level:a.level,$exception_list:g,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((f=p[0])==null?void 0:f.value)||a.message,$sentry_exception_type:(d=p[0])==null?void 0:d.type,$sentry_tags:a.tags};return n&&r&&(y.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+a.event_id),o&&e.exceptions.sendExceptionEvent(y),a}}class yO{constructor(t,n,r,s,i,o){this.name=Sg,this.setupOnce=function(a){a(kg(t,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}var So=e=>{var t=j==null?void 0:j.createElement("a");return B(t)?null:(t.href=e,t)},bO=function(e,t){var n,r;t===void 0&&(t="&");var s=[];return Ce(e,function(i,o){B(i)||B(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),r=encodeURIComponent(o),s[s.length]=r+"="+n)}),s.join(t)},ko=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var i=r[s].split("=");if(i[0]===t){n=i;break}}if(!ve(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{V.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},ii=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",i=r[1],o=s.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),c=[],f=0;f<u.length;f++){var d=u[f].split("=");ve(d)&&(t.includes(d[0])?c.push(d[0]+"="+n):c.push(u[f]))}var h=l;return a!=null&&(h+="?"+c.join("&")),i!=null&&(h+="#"+i),h},To=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},wO=k!=null&&k.location?To(k.location.hash,"__posthog")||To(location.hash,"state"):null,Lf="_postHogToolbarParams",zf=Ue("[Toolbar]"),Un=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Un||{});class EO{constructor(t){this.instance=t}K(t){Q.ph_toolbar_state=t}Y(){var t;return(t=Q.ph_toolbar_state)!==null&&t!==void 0?t:Un.UNINITIALIZED}maybeLoadToolbar(t,n,r){if(t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),vg(this.instance.config)||!k||!j)return!1;t=t??k.location,r=r??k.history;try{if(!n){try{k.localStorage.setItem("test","test"),k.localStorage.removeItem("test")}catch{return!1}n=k==null?void 0:k.localStorage}var s,i=wO||To(t.hash,"__posthog")||To(t.hash,"state"),o=i?Af(()=>JSON.parse(atob(decodeURIComponent(i))))||Af(()=>JSON.parse(decodeURIComponent(i))):null;return o&&o.action==="ph_authorize"?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?t.hash=o.desiredHash:r?r.replaceState(r.state,"",t.pathname+t.search):t.hash="")):((s=JSON.parse(n.getItem(Lf)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}X(t){var n=Q.ph_load_toolbar||Q.ph_load_editor;!he(n)&&Sn(n)?n(t,this.instance):zf.warn("No toolbar load function found")}loadToolbar(t){var n=!(j==null||!j.getElementById(wg));if(!k||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=U({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(k.localStorage.setItem(Lf,JSON.stringify(U({},s,{source:void 0}))),this.Y()===Un.LOADED)this.X(s);else if(this.Y()===Un.UNINITIALIZED){var i;this.K(Un.LOADING),(i=Q.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return zf.error("[Toolbar] Failed to load",o),void this.K(Un.UNINITIALIZED);this.K(Un.LOADED),this.X(s)}),We(k,"turbolinks:load",()=>{this.K(Un.UNINITIALIZED),this.loadToolbar(s)})}return!0}Z(t){return this.loadToolbar(t)}maybeLoadEditor(t,n,r){return t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(t,n,r)}}class Uf{constructor(t){this.tt=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength)&&(V.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.it=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.et()}et(){var t;this.rt=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.tt)}destroy(){var t;(t=this.rt)==null||t.call(this),this.rt=void 0}doPageView(t,n){var r,s=this.st(t,n);return this.it={pathname:(r=k==null?void 0:k.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),s}doPageLeave(t){var n;return this.st(t,(n=this.it)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.it)==null?void 0:t.pageViewId}}st(t,n){var r=this.it;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:u,lastContentY:c,maxContentY:f}=i;if(!(B(o)||B(a)||B(l)||B(u)||B(c)||B(f))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),f=Math.ceil(f);var d=o<=1?1:an(a/o,0,1,V),h=o<=1?1:an(l/o,0,1,V),p=u<=1?1:an(c/u,0,1,V),g=u<=1?1:an(f/u,0,1,V);s=Ze(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:g})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),s}}var En=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),Ut=Uint8Array,Ot=Uint16Array,es=Uint32Array,kc=new Ut([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]),Tc=new Ut([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]),jf=new Ut([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Tg=function(e,t){for(var n=new Ot(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var s=new es(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)s[i]=i-n[r]<<5|r;return[n,s]},Og=Tg(kc,2),SO=Og[0],Il=Og[1];SO[28]=258,Il[258]=28;for(var Bf=Tg(Tc,0)[1],xg=new Ot(32768),Pe=0;Pe<32768;++Pe){var lr=(43690&Pe)>>>1|(21845&Pe)<<1;lr=(61680&(lr=(52428&lr)>>>2|(13107&lr)<<2))>>>4|(3855&lr)<<4,xg[Pe]=((65280&lr)>>>8|(255&lr)<<8)>>>1}var Zs=function(e,t,n){for(var r=e.length,s=0,i=new Ot(t);s<r;++s)++i[e[s]-1];var o,a=new Ot(t);for(s=0;s<t;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Ot(r),s=0;s<r;++s)o[s]=xg[a[e[s]-1]++]>>>15-e[s];return o},vr=new Ut(288);for(Pe=0;Pe<144;++Pe)vr[Pe]=8;for(Pe=144;Pe<256;++Pe)vr[Pe]=9;for(Pe=256;Pe<280;++Pe)vr[Pe]=7;for(Pe=280;Pe<288;++Pe)vr[Pe]=8;var Oo=new Ut(32);for(Pe=0;Pe<32;++Pe)Oo[Pe]=5;var kO=Zs(vr,9),TO=Zs(Oo,5),Ag=function(e){return(e/8>>0)+(7&e&&1)},Cg=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Ot?Ot:e instanceof es?es:Ut)(n-t);return r.set(e.subarray(t,n)),r},dn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},ps=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Sa=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return[new Ut(0),0];if(s==1){var o=new Ut(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(m,N){return m.f-N.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,f=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=s-1;)a=n[n[u].f<n[f].f?u++:f++],l=n[u!=c&&n[u].f<n[f].f?u++:f++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=i[0].s;for(r=1;r<s;++r)i[r].s>d&&(d=i[r].s);var h=new Ot(d+1),p=Pl(n[c-1],h,0);if(p>t){r=0;var g=0,y=p-t,T=1<<y;for(i.sort(function(m,N){return h[N.s]-h[m.s]||m.f-N.f});r<s;++r){var b=i[r].s;if(!(h[b]>t))break;g+=T-(1<<p-h[b]),h[b]=t}for(g>>>=y;g>0;){var S=i[r].s;h[S]<t?g-=1<<t-h[S]++-1:++r}for(;r>=0&&g;--r){var E=i[r].s;h[E]==t&&(--h[E],++g)}p=t}return[new Ut(h),p]},Pl=function(e,t,n){return e.s==-1?Math.max(Pl(e.l,t,n+1),Pl(e.r,t,n+1)):t[e.s]=n},Vf=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ot(++t),r=0,s=e[0],i=1,o=function(l){n[r++]=l},a=1;a<=t;++a)if(e[a]==s&&a!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=e[a]}return[n.subarray(0,r),t]},gs=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Nl=function(e,t,n){var r=n.length,s=Ag(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var i=0;i<r;++i)e[s+i+4]=n[i];return 8*(s+4+r)},Zf=function(e,t,n,r,s,i,o,a,l,u,c){dn(t,c++,n),++s[256];for(var f=Sa(s,15),d=f[0],h=f[1],p=Sa(i,15),g=p[0],y=p[1],T=Vf(d),b=T[0],S=T[1],E=Vf(g),m=E[0],N=E[1],M=new Ot(19),R=0;R<b.length;++R)M[31&b[R]]++;for(R=0;R<m.length;++R)M[31&m[R]]++;for(var I=Sa(M,7),F=I[0],J=I[1],D=19;D>4&&!F[jf[D-1]];--D);var re,ue,Ee,ce,X=u+5<<3,le=gs(s,vr)+gs(i,Oo)+o,He=gs(s,d)+gs(i,g)+o+14+3*D+gs(M,F)+(2*M[16]+3*M[17]+7*M[18]);if(X<=le&&X<=He)return Nl(t,c,e.subarray(l,l+u));if(dn(t,c,1+(He<le)),c+=2,He<le){re=Zs(d,h),ue=d,Ee=Zs(g,y),ce=g;var nt=Zs(F,J);for(dn(t,c,S-257),dn(t,c+5,N-1),dn(t,c+10,D-4),c+=14,R=0;R<D;++R)dn(t,c+3*R,F[jf[R]]);c+=3*D;for(var rt=[b,m],ye=0;ye<2;++ye){var Ye=rt[ye];for(R=0;R<Ye.length;++R){var Ge=31&Ye[R];dn(t,c,nt[Ge]),c+=F[Ge],Ge>15&&(dn(t,c,Ye[R]>>>5&127),c+=Ye[R]>>>12)}}}else re=kO,ue=vr,Ee=TO,ce=Oo;for(R=0;R<a;++R)if(r[R]>255){Ge=r[R]>>>18&31,ps(t,c,re[Ge+257]),c+=ue[Ge+257],Ge>7&&(dn(t,c,r[R]>>>23&31),c+=kc[Ge]);var yt=31&r[R];ps(t,c,Ee[yt]),c+=ce[yt],yt>3&&(ps(t,c,r[R]>>>5&8191),c+=Tc[yt])}else ps(t,c,re[r[R]]),c+=ue[r[R]];return ps(t,c,re[256]),c+ue[256]},OO=new es([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xO=function(){for(var e=new es(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),AO=function(e,t,n,r,s){return function(i,o,a,l,u,c){var f=i.length,d=new Ut(l+f+5*(1+Math.floor(f/7e3))+u),h=d.subarray(l,d.length-u),p=0;if(!o||f<8)for(var g=0;g<=f;g+=65535){var y=g+65535;y<f?p=Nl(h,p,i.subarray(g,y)):(h[g]=c,p=Nl(h,p,i.subarray(g,f)))}else{for(var T=OO[o-1],b=T>>>13,S=8191&T,E=(1<<a)-1,m=new Ot(32768),N=new Ot(E+1),M=Math.ceil(a/3),R=2*M,I=function(A){return(i[A]^i[A+1]<<M^i[A+2]<<R)&E},F=new es(25e3),J=new Ot(288),D=new Ot(32),re=0,ue=0,Ee=(g=0,0),ce=0,X=0;g<f;++g){var le=I(g),He=32767&g,nt=N[le];if(m[He]=nt,N[le]=He,ce<=g){var rt=f-g;if((re>7e3||Ee>24576)&&rt>423){p=Zf(i,h,0,F,J,D,ue,Ee,X,g-X,p),Ee=re=ue=0,X=g;for(var ye=0;ye<286;++ye)J[ye]=0;for(ye=0;ye<30;++ye)D[ye]=0}var Ye=2,Ge=0,yt=S,Ve=He-nt&32767;if(rt>2&&le==I(g-Ve))for(var C=Math.min(b,rt)-1,q=Math.min(32767,g),Z=Math.min(258,rt);Ve<=q&&--yt&&He!=nt;){if(i[g+Ye]==i[g+Ye-Ve]){for(var K=0;K<Z&&i[g+K]==i[g+K-Ve];++K);if(K>Ye){if(Ye=K,Ge=Ve,K>C)break;var de=Math.min(Ve,K-2),_=0;for(ye=0;ye<de;++ye){var v=g-Ve+ye+32768&32767,w=v-m[v]+32768&32767;w>_&&(_=w,nt=v)}}}Ve+=(He=nt)-(nt=m[He])+32768&32767}if(Ge){F[Ee++]=268435456|Il[Ye]<<18|Bf[Ge];var x=31&Il[Ye],P=31&Bf[Ge];ue+=kc[x]+Tc[P],++J[257+x],++D[P],ce=g+Ye,++re}else F[Ee++]=i[g],++J[i[g]]}}p=Zf(i,h,c,F,J,D,ue,Ee,X,g-X,p)}return Cg(d,0,l+Ag(p)+u)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},ka=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function CO(e,t){t===void 0&&(t={});var n=function(){var a=4294967295;return{p:function(l){for(var u=a,c=0;c<l.length;++c)u=xO[255&u^l[c]]^u>>>8;a=u},d:function(){return 4294967295^a}}}(),r=e.length;n.p(e);var s,i=AO(e,t,10+((s=t).filename&&s.filename.length+1||0),8),o=i.length;return function(a,l){var u=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&ka(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),u){a[3]=8;for(var c=0;c<=u.length;++c)a[c+10]=u.charCodeAt(c)}}(i,t),ka(i,o-8,n.d()),ka(i,o-4,r),i}var RO=function(e){var t,n,r,s,i="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
|
|
80
|
+
*/let yk=()=>location.protocol+"//"+location.host;function Wp(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),nf(a,"")}return nf(n,e)+r+s}function bk(e,t,n,r){let s=[],i=[],o=null;const a=({state:d})=>{const h=Wp(e,location),p=n.value,g=t.value;let y=0;if(d){if(n.value=h,t.value=d,o&&o===p){o=null;return}y=g?d.position-g.position:0}else r(h);s.forEach(k=>{k(n.value,p,{delta:y,type:fl.pop,direction:y?y>0?_a.forward:_a.back:_a.unknown})})};function l(){o=n.value}function u(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(h),h}function c(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(be({},d.state,{scroll:Ko()}),"")}}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:u,destroy:f}}function lf(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Ko():null}}function wk(e){const{history:t,location:n}=window,r={value:Wp(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:yk()+e+l;try{t[c?"replaceState":"pushState"](u,"",d),s.value=u}catch(h){console.error(h),n[c?"replace":"assign"](d)}}function o(l,u){i(l,be({},t.state,lf(s.value.back,l,s.value.forward,!0),u,{position:s.value.position}),!0),r.value=l}function a(l,u){const c=be({},s.value,t.state,{forward:l,scroll:Ko()});i(c.current,c,!0),i(l,be({},lf(r.value,l,null),{position:c.position+1},u),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function Ek(e){e=ik(e);const t=wk(e),n=bk(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=be({location:"",base:e,go:r,createHref:ak.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let fr=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Qe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Qe||{});const Sk={type:fr.Static,value:""},Tk=/[a-zA-Z0-9_]/;function kk(e){if(!e)return[[]];if(e==="/")return[[Sk]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=Qe.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function f(){u&&(n===Qe.Static?i.push({type:fr.Static,value:u}):n===Qe.Param||n===Qe.ParamRegExp||n===Qe.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:fr.Param,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==Qe.ParamRegExp){r=n,n=Qe.EscapeNext;continue}switch(n){case Qe.Static:l==="/"?(u&&f(),o()):l===":"?(f(),n=Qe.Param):d();break;case Qe.EscapeNext:d(),n=r;break;case Qe.Param:l==="("?n=Qe.ParamRegExp:Tk.test(l)?d():(f(),n=Qe.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Qe.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=Qe.ParamRegExpEnd:c+=l;break;case Qe.ParamRegExpEnd:f(),n=Qe.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===Qe.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),f(),o(),s}const cf="[^/]+?",Ok={sensitive:!1,strict:!1,start:!0,end:!0};var vt=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(vt||{});const Ak=/[.+*?^${}()[\]/\\]/g;function xk(e,t){const n=be({},Ok,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[vt.Root];n.strict&&!u.length&&(s+="/");for(let f=0;f<u.length;f++){const d=u[f];let h=vt.Segment+(n.sensitive?vt.BonusCaseSensitive:0);if(d.type===fr.Static)f||(s+="/"),s+=d.value.replace(Ak,"\\$&"),h+=vt.Static;else if(d.type===fr.Param){const{value:p,repeatable:g,optional:y,regexp:k}=d;i.push({name:p,repeatable:g,optional:y});const b=k||cf;if(b!==cf){h+=vt.BonusCustomRegExp;try{`${b}`}catch(E){throw new Error(`Invalid custom RegExp for param "${p}" (${b}): `+E.message)}}let S=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;f||(S=y&&u.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,h+=vt.Dynamic,y&&(h+=vt.BonusOptional),g&&(h+=vt.BonusRepeatable),b===".*"&&(h+=vt.BonusWildcard)}c.push(h)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=vt.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),f={};if(!c)return null;for(let d=1;d<c.length;d++){const h=c[d]||"",p=i[d-1];f[p.name]=h&&p.repeatable?h.split("/"):h}return f}function l(u){let c="",f=!1;for(const d of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const h of d)if(h.type===fr.Static)c+=h.value;else if(h.type===fr.Param){const{value:p,repeatable:g,optional:y}=h,k=p in u?u[p]:"";if(qt(k)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const b=qt(k)?k.join("/"):k;if(!b)if(y)d.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function Pk(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===vt.Static+vt.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===vt.Static+vt.Segment?1:-1:0}function qp(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=Pk(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(uf(r))return 1;if(uf(s))return-1}return s.length-r.length}function uf(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Rk={strict:!1,end:!0,sensitive:!1};function Ik(e,t,n){const r=xk(kk(e.path),n),s=be(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function Ck(e,t){const n=[],r=new Map;t=tf(Rk,t);function s(f){return r.get(f)}function i(f,d,h){const p=!h,g=df(f);g.aliasOf=h&&h.record;const y=tf(t,f),k=[g];if("alias"in f){const E=typeof f.alias=="string"?[f.alias]:f.alias;for(const m of E)k.push(df(be({},g,{components:h?h.record.components:g.components,path:m,aliasOf:h?h.record:g})))}let b,S;for(const E of k){const{path:m}=E;if(d&&m[0]!=="/"){const N=d.record.path,M=N[N.length-1]==="/"?"":"/";E.path=d.record.path+(m&&M+m)}if(b=Ik(E,d,y),h?h.alias.push(b):(S=S||b,S!==b&&S.alias.push(b),p&&f.name&&!hf(b)&&o(f.name)),Kp(b)&&l(b),g.children){const N=g.children;for(let M=0;M<N.length;M++)i(N[M],b,h&&h.children[M])}h=h||b}return S?()=>{o(S)}:Zs}function o(f){if(Hp(f)){const d=r.get(f);d&&(r.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&r.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return n}function l(f){const d=Dk(f,n);n.splice(d,0,f),f.record.name&&!hf(f)&&r.set(f.record.name,f)}function u(f,d){let h,p={},g,y;if("name"in f&&f.name){if(h=r.get(f.name),!h)throw Jr(je.MATCHER_NOT_FOUND,{location:f});y=h.record.name,p=be(ff(d.params,h.keys.filter(S=>!S.optional).concat(h.parent?h.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),f.params&&ff(f.params,h.keys.map(S=>S.name))),g=h.stringify(p)}else if(f.path!=null)g=f.path,h=n.find(S=>S.re.test(g)),h&&(p=h.parse(g),y=h.record.name);else{if(h=d.name?r.get(d.name):n.find(S=>S.re.test(d.path)),!h)throw Jr(je.MATCHER_NOT_FOUND,{location:f,currentLocation:d});y=h.record.name,p=be({},d.params,f.params),g=h.stringify(p)}const k=[];let b=h;for(;b;)k.unshift(b.record),b=b.parent;return{name:y,path:g,params:p,matched:k,meta:$k(k)}}e.forEach(f=>i(f));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function ff(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function df(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nk(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nk(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function hf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $k(e){return e.reduce((t,n)=>be(t,n.meta),{})}function Dk(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;qp(e,t[i])<0?r=i:n=i+1}const s=Mk(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Mk(e){let t=e;for(;t=t.parent;)if(Kp(t)&&qp(e,t)===0)return t}function Kp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function pf(e){const t=$t(Jo),n=$t(bc),r=Re(()=>{const l=Ft(e.to);return t.resolve(l)}),s=Re(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],f=n.matched;if(!c||!f.length)return-1;const d=f.findIndex(Kr.bind(null,c));if(d>-1)return d;const h=gf(l[u-2]);return u>1&&gf(c)===h&&f[f.length-1].path!==h?f.findIndex(Kr.bind(null,l[u-2])):d}),i=Re(()=>s.value>-1&&jk(n.params,r.value.params)),o=Re(()=>s.value>-1&&s.value===n.matched.length-1&&Zp(n.params,r.value.params));function a(l={}){if(Uk(l)){const u=t[Ft(e.replace)?"replace":"push"](Ft(e.to)).catch(Zs);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:Re(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function Fk(e){return e.length===1?e[0]:e}const Lk=Ql({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:pf,setup(e,{slots:t}){const n=ui(pf(e)),{options:r}=$t(Jo),s=Re(()=>({[_f(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[_f(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Fk(t.default(n));return e.custom?i:oc("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),zk=Lk;function Uk(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jk(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!qt(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function gf(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const _f=(e,t,n)=>e??t??n,Bk=Ql({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=$t(hl),s=Re(()=>e.route||r.value),i=$t(af,0),o=Re(()=>{let u=Ft(i);const{matched:c}=s.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),a=Re(()=>s.value.matched[o.value]);zi(af,Re(()=>o.value+1)),zi(vk,a),zi(hl,s);const l=Nt();return Mr(()=>[l.value,a.value,e.name],([u,c,f],[d,h,p])=>{c&&(c.instances[f]=u,h&&h!==c&&u&&u===d&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Kr(c,h)||!d)&&(c.enterCallbacks[f]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,f=a.value,d=f&&f.components[c];if(!d)return vf(n.default,{Component:d,route:u});const h=f.props[c],p=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=oc(d,be({},p,t,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return vf(n.default,{Component:y,route:u})||y}}});function vf(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Vk=Bk;function Zk(e){const t=Ck(e.routes,e),n=e.parseQuery||gk,r=e.stringifyQuery||of,s=e.history,i=fs(),o=fs(),a=fs(),l=D_(Dn);let u=Dn;Or&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=pa.bind(null,P=>""+P),f=pa.bind(null,XT),d=pa.bind(null,ti);function h(P,q){let Z,K;return Hp(P)?(Z=t.getRecordMatcher(P),K=q):K=P,t.addRoute(K,Z)}function p(P){const q=t.getRecordMatcher(P);q&&t.removeRoute(q)}function g(){return t.getRoutes().map(P=>P.record)}function y(P){return!!t.getRecordMatcher(P)}function k(P,q){if(q=be({},q||l.value),typeof P=="string"){const w=ga(n,P,q.path),A=t.resolve({path:w.path},q),C=s.createHref(w.fullPath);return be(w,A,{params:d(A.params),hash:ti(w.hash),redirectedFrom:void 0,href:C})}let Z;if(P.path!=null)Z=be({},P,{path:ga(n,P.path,q.path).path});else{const w=be({},P.params);for(const A in w)w[A]==null&&delete w[A];Z=be({},P,{params:f(w)}),q.params=f(q.params)}const K=t.resolve(Z,q),de=P.hash||"";K.params=c(d(K.params));const _=tk(r,be({},P,{hash:KT(de),path:K.path})),v=s.createHref(_);return be({fullPath:_,hash:de,query:r===of?_k(P.query):P.query||{}},K,{redirectedFrom:void 0,href:v})}function b(P){return typeof P=="string"?ga(n,P,l.value.path):be({},P)}function S(P,q){if(u!==P)return Jr(je.NAVIGATION_CANCELLED,{from:q,to:P})}function E(P){return M(P)}function m(P){return E(be(b(P),{replace:!0}))}function N(P,q){const Z=P.matched[P.matched.length-1];if(Z&&Z.redirect){const{redirect:K}=Z;let de=typeof K=="function"?K(P,q):K;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=b(de):{path:de},de.params={}),be({query:P.query,hash:P.hash,params:de.path!=null?{}:P.params},de)}}function M(P,q){const Z=u=k(P),K=l.value,de=P.state,_=P.force,v=P.replace===!0,w=N(Z,K);if(w)return M(be(b(w),{state:typeof w=="object"?be({},de,w.state):de,force:_,replace:v}),q||Z);const A=Z;A.redirectedFrom=q;let C;return!_&&nk(r,K,Z)&&(C=Jr(je.NAVIGATION_DUPLICATED,{to:A,from:K}),rt(K,K,!0,!1)),(C?Promise.resolve(C):F(A,K)).catch(x=>fn(x)?fn(x,je.NAVIGATION_GUARD_REDIRECT)?x:nt(x):le(x,A,K)).then(x=>{if(x){if(fn(x,je.NAVIGATION_GUARD_REDIRECT))return M(be({replace:v},b(x.to),{state:typeof x.to=="object"?be({},de,x.to.state):de,force:_}),q||A)}else x=D(A,K,!0,v,de);return J(A,K,x),x})}function R(P,q){const Z=S(P,q);return Z?Promise.reject(Z):Promise.resolve()}function I(P){const q=Ge.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(P):P()}function F(P,q){let Z;const[K,de,_]=mk(P,q);Z=va(K.reverse(),"beforeRouteLeave",P,q);for(const w of K)w.leaveGuards.forEach(A=>{Z.push(Vn(A,P,q))});const v=R.bind(null,P,q);return Z.push(v),Ve(Z).then(()=>{Z=[];for(const w of i.list())Z.push(Vn(w,P,q));return Z.push(v),Ve(Z)}).then(()=>{Z=va(de,"beforeRouteUpdate",P,q);for(const w of de)w.updateGuards.forEach(A=>{Z.push(Vn(A,P,q))});return Z.push(v),Ve(Z)}).then(()=>{Z=[];for(const w of _)if(w.beforeEnter)if(qt(w.beforeEnter))for(const A of w.beforeEnter)Z.push(Vn(A,P,q));else Z.push(Vn(w.beforeEnter,P,q));return Z.push(v),Ve(Z)}).then(()=>(P.matched.forEach(w=>w.enterCallbacks={}),Z=va(_,"beforeRouteEnter",P,q,I),Z.push(v),Ve(Z))).then(()=>{Z=[];for(const w of o.list())Z.push(Vn(w,P,q));return Z.push(v),Ve(Z)}).catch(w=>fn(w,je.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function J(P,q,Z){a.list().forEach(K=>I(()=>K(P,q,Z)))}function D(P,q,Z,K,de){const _=S(P,q);if(_)return _;const v=q===Dn,w=Or?history.state:{};Z&&(K||v?s.replace(P.fullPath,be({scroll:v&&w&&w.scroll},de)):s.push(P.fullPath,de)),l.value=P,rt(P,q,Z,v),nt()}let re;function ue(){re||(re=s.listen((P,q,Z)=>{if(!yt.listening)return;const K=k(P),de=N(K,yt.currentRoute.value);if(de){M(be(de,{replace:!0,force:!0}),K).catch(Zs);return}u=K;const _=l.value;Or&&uk(sf(_.fullPath,Z.delta),Ko()),F(K,_).catch(v=>fn(v,je.NAVIGATION_ABORTED|je.NAVIGATION_CANCELLED)?v:fn(v,je.NAVIGATION_GUARD_REDIRECT)?(M(be(b(v.to),{force:!0}),K).then(w=>{fn(w,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&!Z.delta&&Z.type===fl.pop&&s.go(-1,!1)}).catch(Zs),Promise.reject()):(Z.delta&&s.go(-Z.delta,!1),le(v,K,_))).then(v=>{v=v||D(K,_,!1),v&&(Z.delta&&!fn(v,je.NAVIGATION_CANCELLED)?s.go(-Z.delta,!1):Z.type===fl.pop&&fn(v,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),J(K,_,v)}).catch(Zs)}))}let Ee=fs(),ce=fs(),X;function le(P,q,Z){nt(P);const K=ce.list();return K.length?K.forEach(de=>de(P,q,Z)):console.error(P),Promise.reject(P)}function He(){return X&&l.value!==Dn?Promise.resolve():new Promise((P,q)=>{Ee.add([P,q])})}function nt(P){return X||(X=!P,ue(),Ee.list().forEach(([q,Z])=>P?Z(P):q()),Ee.reset()),P}function rt(P,q,Z,K){const{scrollBehavior:de}=e;if(!Or||!de)return Promise.resolve();const _=!Z&&fk(sf(P.fullPath,0))||(K||!Z)&&history.state&&history.state.scroll||null;return Lo().then(()=>de(P,q,_)).then(v=>v&&ck(v)).catch(v=>le(v,P,q))}const ye=P=>s.go(P);let Ye;const Ge=new Set,yt={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:g,resolve:k,options:e,push:E,replace:m,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:ce.add,isReady:He,install(P){P.component("RouterLink",zk),P.component("RouterView",Vk),P.config.globalProperties.$router=yt,Object.defineProperty(P.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),Or&&!Ye&&l.value===Dn&&(Ye=!0,E(s.location).catch(K=>{}));const q={};for(const K in Dn)Object.defineProperty(q,K,{get:()=>l.value[K],enumerable:!0});P.provide(Jo,yt),P.provide(bc,Wd(q)),P.provide(hl,l);const Z=P.unmount;Ge.add(P),P.unmount=function(){Ge.delete(P),Ge.size<1&&(u=Dn,re&&re(),re=null,l.value=Dn,Ye=!1,X=!1),Z()}}};function Ve(P){return P.reduce((q,Z)=>q.then(()=>I(Z)),Promise.resolve())}return yt}function Cx(){return $t(Jo)}function Nx(e){return $t(bc)}const Hk=[{path:"/",name:"ProjectList",component:()=>Xe(()=>import("./ProjectListView-CEc_LWZL.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/projects/new",name:"ProjectNew",component:()=>Xe(()=>import("./ProjectNewView-D4U0uRlp.js"),__vite__mapDeps([5,1,2,6,7,8]))},{path:"/projects/:id/edit",name:"ProjectEdit",component:()=>Xe(()=>import("./ProjectEditView-CSbsea3U.js"),__vite__mapDeps([9,1,2,10,6,7,11,12,13,14]))},{path:"/projects/:projectId/circus-commands/new",name:"CommandButtonNew",component:()=>Xe(()=>import("./CommandButtonDetailView-CBPI8-US.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:projectId/circus-commands/:buttonId",name:"CommandButtonEdit",component:()=>Xe(()=>import("./CommandButtonDetailView-CBPI8-US.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:id/sessions",name:"SessionList",component:()=>Xe(()=>import("./SessionListView-C129buBe.js"),__vite__mapDeps([18,1,2,19,20,16,21,22,23,24,25,12,11,13,26,27,28,29,30,31,32,33,34,35,36]))},{path:"/projects/:id/archived",name:"ArchivedSessions",component:()=>Xe(()=>import("./SessionListView-C129buBe.js"),__vite__mapDeps([18,1,2,19,20,16,21,22,23,24,25,12,11,13,26,27,28,29,30,31,32,33,34,35,36]))},{path:"/projects/:id/templates",name:"ProjectTemplates",component:()=>Xe(()=>import("./SessionListView-C129buBe.js"),__vite__mapDeps([18,1,2,19,20,16,21,22,23,24,25,12,11,13,26,27,28,29,30,31,32,33,34,35,36]))},{path:"/projects/:id/commands",name:"ProjectCommands",component:()=>Xe(()=>import("./SessionListView-C129buBe.js"),__vite__mapDeps([18,1,2,19,20,16,21,22,23,24,25,12,11,13,26,27,28,29,30,31,32,33,34,35,36]))},{path:"/projects/:id/kanban",name:"ProjectKanban",component:()=>Xe(()=>import("./SessionListView-C129buBe.js"),__vite__mapDeps([18,1,2,19,20,16,21,22,23,24,25,12,11,13,26,27,28,29,30,31,32,33,34,35,36]))},{path:"/projects/:id/scheduled",redirect:e=>`/projects/${e.params.id}/sessions`},{path:"/projects/:projectId/templates/:templateId",name:"TemplateDetail",component:()=>Xe(()=>import("./TemplateDetailView-Cukb205e.js"),__vite__mapDeps([37,24,2,19,25,11,12,13,26,27,28,29,38]))},{path:"/projects/:id/sessions/new",name:"NewSession",component:()=>Xe(()=>import("./NewSessionView-DwUfBg70.js"),__vite__mapDeps([39,19,2,24,25,10,40,41,30,11,12,13,31,32,33,28,29,1,42]))},{path:"/sessions/active",name:"ActiveSessions",component:()=>Xe(()=>import("./ActiveSessionsView-EdNxmPmZ.js"),__vite__mapDeps([43,19,2,16,22,20,21,23,44]))},{path:"/sessions/:id/:tab?",name:"SessionDetail",component:()=>Xe(()=>import("./SessionDetailView-DWbXdx7A.js").then(e=>e.S),__vite__mapDeps([45,19,2,1,24,25,20,16,21,31,12,32,3,11,13,34,35,10,40,41,28,29,46]))},{path:"/settings",name:"Settings",component:()=>Xe(()=>import("./SettingsView-DW1NvpX_.js"),__vite__mapDeps([47,48])),redirect:"/settings/providers",children:[{path:"providers",name:"Providers",component:()=>Xe(()=>import("./ProvidersView-CD1j8BOv.js"),__vite__mapDeps([49,12,2,50]))},{path:"summary",name:"SummarySettings",component:()=>Xe(()=>import("./SummarySettingsView-CLUfcWvf.js"),__vite__mapDeps([51,52,2,28,29,11,12,13,53]))},{path:"general",name:"GeneralSettings",component:()=>Xe(()=>import("./GeneralSettingsView-Dw-x83R0.js"),__vite__mapDeps([54,52,2,55]))},{path:"logs",name:"AgentLogs",component:()=>Xe(()=>import("./AgentLogsView-C2wX0JPP.js"),__vite__mapDeps([56,2,57]))}]}],Gk=Zk({history:Ek(),routes:Hk});var T=typeof window<"u"?window:void 0,ct=typeof globalThis<"u"?globalThis:T;typeof self>"u"&&(ct.self=ct),typeof File>"u"&&(ct.File=function(){});var Jp=Array.prototype,mf=Jp.forEach,yf=Jp.indexOf,It=ct==null?void 0:ct.navigator,j=ct==null?void 0:ct.document,ot=ct==null?void 0:ct.location,pl=ct==null?void 0:ct.fetch,gl=ct!=null&&ct.XMLHttpRequest&&"withCredentials"in new ct.XMLHttpRequest?ct.XMLHttpRequest:void 0,bf=ct==null?void 0:ct.AbortController,Tt=It==null?void 0:It.userAgent,Q=T??{},pn={DEBUG:!1,LIB_VERSION:"1.356.1"};function wf(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,s)}function gn(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){wf(i,r,s,o,a,"next",l)}function a(l){wf(i,r,s,o,a,"throw",l)}o(void 0)})}}function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function Yp(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wk=["$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"],qk=["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"],Ef=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return qk.concat(t).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})};function fe(e,t){return e.indexOf(t)!==-1}var Yo=function(e){return e.trim()},_l=function(e){return e.replace(/^\$/,"")},Kk=Array.isArray,Xp=Object.prototype,Qp=Xp.hasOwnProperty,Xo=Xp.toString,ve=Kk||function(e){return Xo.call(e)==="[object Array]"},Sn=e=>typeof e=="function",et=e=>e===Object(e)&&!ve(e),Ir=e=>{if(et(e)){for(var t in e)if(Qp.call(e,t))return!1;return!0}return!1},B=e=>e===void 0,qe=e=>Xo.call(e)=="[object String]",vl=e=>qe(e)&&e.trim().length===0,Kt=e=>e===null,he=e=>B(e)||Kt(e),Cn=e=>Xo.call(e)=="[object Number]"&&e==e,Ar=e=>Cn(e)&&e>0,xn=e=>Xo.call(e)==="[object Boolean]",Jk=e=>e instanceof FormData,Yk=e=>fe(Wk,e);function ml(e){return e===null||typeof e!="object"}function po(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function eg(e){return!B(Event)&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var Xk=[!0,"true",1,"1","yes"],ma=e=>fe(Xk,e),Qk=[!1,"false",0,"0","no"];function an(e,t,n,r,s){return t>n&&(r.warn("min cannot be greater than max."),t=n),Cn(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+s),an(s||n,t,n,r))}class eO{constructor(t){this.t={},this.i=t.i,this.o=an(t.bucketSize,0,100,t.h),this.m=an(t.refillRate,0,this.o,t.h),this.$=an(t.refillInterval,0,864e5,t.h)}S(t,n){var r=n-t.lastAccess,s=Math.floor(r/this.$);if(s>0){var i=s*this.m;t.tokens=Math.min(t.tokens+i,this.o),t.lastAccess=t.lastAccess+s*this.$}}consumeRateLimit(t){var n,r=Date.now(),s=String(t),i=this.t[s];return i?this.S(i,r):(i={tokens:this.o,lastAccess:r},this.t[s]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.i)==null||n.call(this,t)),i.tokens===0)}stop(){this.t={}}}var zt="Mobile",go="iOS",Tn="Android",ni="Tablet",tg=Tn+" "+ni,ng="iPad",rg="Apple",sg=rg+" Watch",ri="Safari",Yr="BlackBerry",ig="Samsung",og=ig+"Browser",ag=ig+" Internet",_r="Chrome",tO=_r+" OS",lg=_r+" "+go,wc="Internet Explorer",cg=wc+" "+zt,Ec="Opera",nO=Ec+" Mini",Sc="Edge",ug="Microsoft "+Sc,jr="Firefox",fg=jr+" "+go,si="Nintendo",ii="PlayStation",Br="Xbox",dg=Tn+" "+zt,hg=zt+" "+ri,Ts="Windows",yl=Ts+" Phone",Sf="Nokia",bl="Ouya",pg="Generic",rO=pg+" "+zt.toLowerCase(),gg=pg+" "+ni.toLowerCase(),wl="Konqueror",_t="(\\d+(\\.\\d+)?)",ya=new RegExp("Version/"+_t),sO=new RegExp(Br,"i"),iO=new RegExp(ii+" \\w+","i"),oO=new RegExp(si+" \\w+","i"),Tc=new RegExp(Yr+"|PlayBook|BB10","i"),aO={"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"},Ci,Tf,ba,lO=(e,t)=>t&&fe(t,rg)||function(n){return fe(n,ri)&&!fe(n,_r)&&!fe(n,Tn)}(e),_g=function(e,t){return t=t||"",fe(e," OPR/")&&fe(e,"Mini")?nO:fe(e," OPR/")?Ec:Tc.test(e)?Yr:fe(e,"IE"+zt)||fe(e,"WPDesktop")?cg:fe(e,og)?ag:fe(e,Sc)||fe(e,"Edg/")?ug:fe(e,"FBIOS")?"Facebook "+zt:fe(e,"UCWEB")||fe(e,"UCBrowser")?"UC Browser":fe(e,"CriOS")?lg:fe(e,"CrMo")||fe(e,_r)?_r:fe(e,Tn)&&fe(e,ri)?dg:fe(e,"FxiOS")?fg:fe(e.toLowerCase(),wl.toLowerCase())?wl:lO(e,t)?fe(e,zt)?hg:ri:fe(e,jr)?jr:fe(e,"MSIE")||fe(e,"Trident/")?wc:fe(e,"Gecko")?jr:""},cO={[cg]:[new RegExp("rv:"+_t)],[ug]:[new RegExp(Sc+"?\\/"+_t)],[_r]:[new RegExp("("+_r+"|CrMo)\\/"+_t)],[lg]:[new RegExp("CriOS\\/"+_t)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+_t)],[ri]:[ya],[hg]:[ya],[Ec]:[new RegExp("(Opera|OPR)\\/"+_t)],[jr]:[new RegExp(jr+"\\/"+_t)],[fg]:[new RegExp("FxiOS\\/"+_t)],[wl]:[new RegExp("Konqueror[:/]?"+_t,"i")],[Yr]:[new RegExp(Yr+" "+_t),ya],[dg]:[new RegExp("android\\s"+_t,"i")],[ag]:[new RegExp(og+"\\/"+_t)],[wc]:[new RegExp("(rv:|MSIE )"+_t)],Mozilla:[new RegExp("rv:"+_t)]},uO=function(e,t){var n=_g(e,t),r=cO[n];if(B(r))return null;for(var s=0;s<r.length;s++){var i=r[s],o=e.match(i);if(o)return parseFloat(o[o.length-2])}return null},kf=[[new RegExp(Br+"; "+Br+" (.*?)[);]","i"),e=>[Br,e&&e[1]||""]],[new RegExp(si,"i"),[si,""]],[new RegExp(ii,"i"),[ii,""]],[Tc,[Yr,""]],[new RegExp(Ts,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[yl,""];if(new RegExp(zt).test(t)&&!/IEMobile\b/.test(t))return[Ts+" "+zt,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],s=aO[r]||"";return/arm/i.test(t)&&(s="RT"),[Ts,s]}return[Ts,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[go,t.join(".")]}return[go,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=B(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Tn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Tn+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[Tn,t.join(".")]}return[Tn,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[tO,""]],[/Linux|debian/i,["Linux",""]]],Of=function(e){return oO.test(e)?si:iO.test(e)?ii:sO.test(e)?Br:new RegExp(bl,"i").test(e)?bl:new RegExp("("+yl+"|WPDesktop)","i").test(e)?yl:/iPad/.test(e)?ng:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?sg:Tc.test(e)?Yr:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Sf,"i").test(e)?Sf:/(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(zt).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)?Tn:tg:new RegExp("(pda|"+zt+")","i").test(e)?rO:new RegExp(ni,"i").test(e)&&!new RegExp(ni+" pc","i").test(e)?gg:""},fO=e=>e instanceof Error;function dO(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ba&&n.length===Tf||(Tf=n.length,ba=n.reduce((r,s)=>{Ci||(Ci={});var i=Ci[s];if(i)r[i[0]]=i[1];else for(var o=e(s),a=o.length-1;a>=0;a--){var l=o[a],u=l==null?void 0:l.filename,c=t[s];if(u&&c){r[u]=c,Ci[s]=[u,c];break}}return r},{})),ba}}class hO{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,n,0).apply(t),i=this.buildParsingContext(n),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(t){var n=this;return gn(function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&ve(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t})()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,s;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(s=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),U({},t,{cause:r,stack:s})}applyChunkIds(t,n){return t.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return gn(function*(){var r=t;for(var s of n.modifiers)r=yield s(r);return r})()}convertToExceptionList(t,n){var r,s,i,o={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(o.stacktrace={type:"raw",frames:t.stack});var a=[o];return t.cause!=null&&a.push(...this.convertToExceptionList(t.cause,U({},n,{handled:!0}))),a}buildParsingContext(t){var n;return{chunkIdMap:dO(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var s=(i,o)=>{if(o<=4){var a=this.buildCoercingContext(t,n,o);return this.applyCoercers(i,a)}};return U({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Xr="?";function El(e,t,n,r,s){var i={platform:e,filename:t,function:n==="<anonymous>"?Xr:n,in_app:!0};return B(r)||(i.lineno=r),B(s)||(i.colno=s),i}var vg=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Xr,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},pO=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,gO=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_O=/\((\S*)(?::(\d+))(?::(\d+))\)/,vO=(e,t)=>{var n=pO.exec(e);if(n){var[,r,s,i]=n;return El(t,r,Xr,+s,+i)}var o=gO.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=_O.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=vg(o[1]||Xr,o[2]);return El(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},mO=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yO=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bO=(e,t)=>{var n=mO.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=yO.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||Xr;return[i,s]=vg(i,s),El(t,s,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Af=/\(error: (.*)\)/,xf=50;function wO(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
81
|
+
`),l=i;l<a.length;l++){var u=a[l];if(!(u.length>1024)){var c=Af.test(u)?u.replace(Af,"$1"):u;if(!c.match(/\S*Error: /)){for(var f of n){var d=f(c,e);if(d){o.push(d);break}}if(o.length>=xf)break}}}return function(h){if(!h.length)return[];var p=Array.from(h);return p.reverse(),p.slice(0,xf).map(g=>{return U({},g,{filename:g.filename||(y=p,y[y.length-1]||{}).filename,function:g.function||Xr});var y})}(o)}}("web:javascript",vO,bO)}class EO{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=qe(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return po(t,"DOMException")}isDOMError(t){return po(t,"DOMError")}}class SO{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(t){return t.stacktrace||t.stack||void 0}}class TO{constructor(){}match(t){return po(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r,s=n.apply(t.error);return s||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var kO=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class OO{match(t){return typeof t=="string"}coerce(t,n){var r,[s,i]=this.getInfos(t);return{type:s??"Error",value:i??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,s=t.match(kO);return s&&(n=s[1],r=s[2]),[n,r]}}var AO=["fatal","error","warning","log","info","debug"];function mg(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length||s.length<=t?s:s.slice(0,t)+"..."}return""}class xO{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,s=this.getErrorPropertyFromObject(t);return s?n.apply(s):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return eg(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+mg(t)}isSeverityLevel(t){return qe(t)&&!vl(t)&&AO.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(fO(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class PO{match(t){return eg(t)}coerce(t,n){var r,s=t.constructor.name;return{type:s,value:s+" captured as exception with keys: "+mg(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class RO{match(t){return ml(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class IO{match(t){return po(t,"PromiseRejectionEvent")}coerce(t,n){var r,s=this.getUnhandledRejectionReason(t);return ml(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}getUnhandledRejectionReason(t){if(ml(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var yg=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k:function(s){if(T&&(pn.DEBUG||Q.POSTHOG_DEBUG||n)&&!B(T.console)&&T.console){for(var i=("__rrweb_original__"in T.console[s])?T.console[s].__rrweb_original__:T.console[s],o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];i(e,...a)}},info:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("log",...i)},warn:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("warn",...i)},error:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];r.k("error",...i)},critical:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];console.error(e,...i)},uninitializedWarning:s=>{r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>yg(e+" "+s,i)};return r},V=yg("[PostHog.js]"),Ue=V.createLogger,CO=Ue("[ExternalScriptsLoader]"),Pf=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return CO.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=j==null?void 0:j.querySelectorAll("script");if(r){for(var s,i=function(){if(r[o].src===t){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)}),l.onerror=u=>n(u),{v:void 0})}},o=0;o<r.length;o++)if(s=i())return s.v}var a=()=>{if(!j)return n("document not found");var l=j.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=t,l.onload=f=>{l.__posthog_loading_callback_fired=!0,n(void 0,f)},l.onerror=f=>n(f),e.config.prepare_external_dependency_script&&(l=e.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")j.head.appendChild(l);else{var u,c=j.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):j.body.appendChild(l)}};j!=null&&j.body?a():j==null||j.addEventListener("DOMContentLoaded",a)};Q.__PosthogExtensions__=Q.__PosthogExtensions__||{},Q.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(r="/array/"+e.config.token+"/config.js"),t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}var i=e.requestRouter.endpointFor("assets",r);Pf(e,i,n)},Q.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);Pf(e,r,n)};var _o={};function Wn(e,t,n){if(ve(e)){if(mf&&e.forEach===mf)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(n,e[r],r)===_o)return}}}function Pe(e,t,n){if(!he(e)){if(ve(e))return Wn(e,t,n);if(Jk(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===_o)return}else for(var s in e)if(Qp.call(e,s)&&t.call(n,e[s],s)===_o)return}}var Ze=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Wn(n,function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])}),e},Qr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Wn(n,function(s){Wn(s,function(i){e.push(i)})}),e};function qi(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Rf=function(e){try{return e()}catch{return}},NO=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(s){V.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),V.critical(s)}}},kc=function(e){var t={};return Pe(e,function(n,r){(qe(n)&&n.length>0||Cn(n))&&(t[r]=n)}),t};function $O(e,t){return n=e,r=i=>qe(i)&&!Kt(t)?i.slice(0,t):i,s=new Set,function i(o,a){return o!==Object(o)?r?r(o,a):o:s.has(o)?void 0:(s.add(o),ve(o)?(l=[],Wn(o,u=>{l.push(i(u))})):(l={},Pe(o,(u,c)=>{s.has(u)||(l[c]=i(u,c))})),l);var l}(n);var n,r,s}var DO=["herokuapp.com","vercel.app","netlify.app"];function MO(e){var t=e==null?void 0:e.hostname;if(!qe(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of DO)if(n===r)return!1;return!0}function bg(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function We(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}function wg(e){return e.name==="ph_toolbar_internal"}var Eg="$people_distinct_id",ks="__alias",Os="__timers",If="$autocapture_disabled_server_side",Sl="$heatmaps_enabled_server_side",Cf="$exception_capture_enabled_server_side",Tl="$error_tracking_suppression_rules",Nf="$error_tracking_capture_extension_exceptions",$f="$web_vitals_enabled_server_side",Sg="$dead_clicks_enabled_server_side",Df="$product_tours_enabled_server_side",Mf="$web_vitals_allowed_metrics",Ni="$session_recording_remote_config",vo="$sesid",Tg="$session_is_sampled",Cr="$enabled_feature_flags",As="$early_access_features",kl="$feature_flag_details",xs="$stored_person_properties",ur="$stored_group_properties",Ol="$surveys",mo="$flag_call_reported",Al="$feature_flag_errors",yo="$feature_flag_evaluated_at",rn="$user_state",xl="$client_session_props",Pl="$capture_rate_limit",Rl="$initial_campaign_params",Il="$initial_referrer_info",bo="$initial_person_info",wo="$epp",kg="__POSTHOG_TOOLBAR__",ds="$posthog_cookieless",FO=[Eg,ks,"__cmpns",Os,"$session_recording_enabled_server_side",Sl,vo,Cr,Tl,rn,As,kl,ur,xs,Ol,mo,Al,yo,xl,Pl,Rl,Il,wo,bo];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Cn(e)&&isFinite(e)&&Math.floor(e)===e});var Ff="0123456789abcdef";class Eo{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,s){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||t<0||n<0||r<0||s<0||t>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new Eo(i)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+Ff.charAt(this.bytes[n]>>>4)+Ff.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Eo(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class LO{constructor(){this.P=0,this.T=0,this.C=new zO}generate(){var t=this.generateOrAbort();if(B(t)){this.P=0;var n=this.generateOrAbort();if(B(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.P)this.P=t,this.I();else{if(!(t+1e4>this.P))return;this.T++,this.T>4398046511103&&(this.P++,this.I())}return Eo.fromFieldsV7(this.P,Math.trunc(this.T/Math.pow(2,30)),this.T&Math.pow(2,30)-1,this.C.nextUint32())}I(){this.T=1024*this.C.nextUint32()+(1023&this.C.nextUint32())}}var Lf,Og=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};T&&!B(T.crypto)&&crypto.getRandomValues&&(Og=e=>crypto.getRandomValues(e));class zO{constructor(){this.R=new Uint32Array(8),this.F=1/0}nextUint32(){return this.F>=this.R.length&&(Og(this.R),this.F=0),this.R[this.F++]}}var Hn=()=>UO().toString(),UO=()=>(Lf||(Lf=new LO)).generate(),hs="",jO=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function BO(e,t){if(t){var n=function(s,i){if(i===void 0&&(i=j),hs)return hs;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Hn();!hs&&a--;){var u=o.slice(a).join("."),c=l+"=1;domain=."+u+";path=/";i.cookie=c+";max-age=3",i.cookie.includes(l)&&(i.cookie=c+";max-age=0",hs=u)}return hs}(e);if(!n){var r=(s=>{var i=s.match(jO);return i?i[0]:""})(e);r!==n&&V.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var on={O:()=>!!j,M:function(e){V.error("cookieStore error: "+e)},A:function(e){if(j){try{for(var t=e+"=",n=j.cookie.split(";").filter(i=>i.length),r=0;r<n.length;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},D:function(e){var t;try{t=JSON.parse(on.A(e))||{}}catch{}return t},j:function(e,t,n,r,s){if(j)try{var i="",o="",a=BO(j.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&V.warn("cookieStore warning: large cookie, len="+u.length),j.cookie=u,u}catch{return}},L:function(e,t){if(j!=null&&j.cookie)try{on.j(e,"",-1,t)}catch{return}}},wa=null,De={O:function(){if(!Kt(wa))return wa;var e=!0;if(B(T))e=!1;else try{var t="__mplssupport__";De.j(t,"xyz"),De.A(t)!=='"xyz"'&&(e=!1),De.L(t)}catch{e=!1}return e||V.error("localStorage unsupported; falling back to cookie store"),wa=e,e},M:function(e){V.error("localStorage error: "+e)},A:function(e){try{return T==null?void 0:T.localStorage.getItem(e)}catch(t){De.M(t)}return null},D:function(e){try{return JSON.parse(De.A(e))||{}}catch{}return null},j:function(e,t){try{T==null||T.localStorage.setItem(e,JSON.stringify(t))}catch(n){De.M(n)}},L:function(e){try{T==null||T.localStorage.removeItem(e)}catch(t){De.M(t)}}},VO=["$device_id","distinct_id",vo,Tg,wo,bo,rn],$i={},ZO={O:function(){return!0},M:function(e){V.error("memoryStorage error: "+e)},A:function(e){return $i[e]||null},D:function(e){return $i[e]||null},j:function(e,t){$i[e]=t},L:function(e){delete $i[e]}},ar=null,it={O:function(){if(!Kt(ar))return ar;if(ar=!0,B(T))ar=!1;else try{var e="__support__";it.j(e,"xyz"),it.A(e)!=='"xyz"'&&(ar=!1),it.L(e)}catch{ar=!1}return ar},M:function(e){V.error("sessionStorage error: ",e)},A:function(e){try{return T==null?void 0:T.sessionStorage.getItem(e)}catch(t){it.M(t)}return null},D:function(e){try{return JSON.parse(it.A(e))||null}catch{}return null},j:function(e,t){try{T==null||T.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){it.M(n)}},L:function(e){try{T==null||T.sessionStorage.removeItem(e)}catch(t){it.M(t)}}},_n=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class HO{constructor(t){this._instance=t}get N(){return this._instance.config}get consent(){return this.U()?_n.DENIED:this.H}isOptedOut(){return this.N.cookieless_mode==="always"||this.consent===_n.DENIED||this.consent===_n.PENDING&&(this.N.opt_out_capturing_by_default||this.N.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===_n.DENIED}optInOut(t){this.B.j(this.q,t?1:0,this.N.cookie_expiration,this.N.cross_subdomain_cookie,this.N.secure_cookie)}reset(){this.B.L(this.q,this.N.cross_subdomain_cookie)}get q(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get H(){var t=this.B.A(this.q);return ma(t)?_n.GRANTED:fe(Qk,t)?_n.DENIED:_n.PENDING}get B(){if(!this.W){var t=this.N.opt_out_capturing_persistence_type;this.W=t==="localStorage"?De:on;var n=t==="localStorage"?on:De;n.A(this.q)&&(this.W.A(this.q)||this.optInOut(ma(n.A(this.q))),n.L(this.q,this.N.cross_subdomain_cookie))}return this.W}U(){return!!this.N.respect_dnt&&!!bg([It==null?void 0:It.doNotTrack,It==null?void 0:It.msDoNotTrack,Q.doNotTrack],t=>ma(t))}}var Di=Ue("[Dead Clicks]"),GO=()=>!0,WO=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(Sg)),r=e.instance.config.capture_dead_clicks;return xn(r)?r:!!et(r)||n};class zf{get lazyLoadedDeadClicksAutocapture(){return this.G}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Sg]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.V(()=>{this.J()}):this.stop()}V(t){var n,r;(n=Q.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?Di.error("failed to load script",s):t()})}J(){var t;if(j){if(!this.G&&(t=Q.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=et(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.G=Q.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.G.start(j),Di.info("starting...")}}else Di.error("`document` not found. Cannot start.")}stop(){this.G&&(this.G.stop(),this.G=void 0,Di.info("stopping..."))}}var Ea=Ue("[SegmentIntegration]");function qO(e,t){var n=e.config.segment;if(!n)return t();(function(r,s){var i=r.config.segment;if(!i)return s();var o=l=>{var u=()=>l.anonymousId()||Hn();r.config.get_device_id=u,l.id()&&(r.register({distinct_id:l.id(),$device_id:u()}),r.persistence.set_property(rn,"identified")),s()},a=i.user();"then"in a&&Sn(a.then)?a.then(o):o(a)})(e,()=>{n.register((r=>{Promise&&Promise.resolve||Ea.warn("This browser does not have Promise support, and can not use the segment integration");var s=(i,o)=>{if(!o)return i;i.event.userId||i.event.anonymousId===r.get_distinct_id()||(Ea.info("No userId set, resetting PostHog"),r.reset()),i.event.userId&&i.event.userId!==r.get_distinct_id()&&(Ea.info("UserId set, identifying with PostHog"),r.identify(i.event.userId));var a=r.calculateEventProperties(o,i.event.properties);return i.event.properties=Object.assign({},a,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:i=>s(i,i.event.event),page:i=>s(i,"$pageview"),identify:i=>s(i,"$identify"),screen:i=>s(i,"$screen")}})(e)).then(()=>{t()})})}var Ag="posthog-js";function xg(e,t){var{organization:n,projectId:r,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return a=>{var l,u,c,f,d;if(!(i==="*"||i.includes(a.level))||!e.__loaded)return a;a.tags||(a.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());a.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((l=a.exception)==null?void 0:l.values)||[],g=p.map(k=>U({},k,{stacktrace:k.stacktrace?U({},k.stacktrace,{type:"raw",frames:(k.stacktrace.frames||[]).map(b=>U({},b,{platform:"web:javascript"}))}):void 0})),y={$exception_message:((u=p[0])==null?void 0:u.value)||a.message,$exception_type:(c=p[0])==null?void 0:c.type,$exception_level:a.level,$exception_list:g,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((f=p[0])==null?void 0:f.value)||a.message,$sentry_exception_type:(d=p[0])==null?void 0:d.type,$sentry_tags:a.tags};return n&&r&&(y.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+a.event_id),o&&e.exceptions.sendExceptionEvent(y),a}}class KO{constructor(t,n,r,s,i,o){this.name=Ag,this.setupOnce=function(a){a(xg(t,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}var So=e=>{var t=j==null?void 0:j.createElement("a");return B(t)?null:(t.href=e,t)},JO=function(e,t){var n,r;t===void 0&&(t="&");var s=[];return Pe(e,function(i,o){B(i)||B(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),r=encodeURIComponent(o),s[s.length]=r+"="+n)}),s.join(t)},To=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var i=r[s].split("=");if(i[0]===t){n=i;break}}if(!ve(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{V.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},oi=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",i=r[1],o=s.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),c=[],f=0;f<u.length;f++){var d=u[f].split("=");ve(d)&&(t.includes(d[0])?c.push(d[0]+"="+n):c.push(u[f]))}var h=l;return a!=null&&(h+="?"+c.join("&")),i!=null&&(h+="#"+i),h},ko=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},YO=T!=null&&T.location?ko(T.location.hash,"__posthog")||ko(location.hash,"state"):null,Uf="_postHogToolbarParams",jf=Ue("[Toolbar]"),Un=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Un||{});class XO{constructor(t){this.instance=t}K(t){Q.ph_toolbar_state=t}Y(){var t;return(t=Q.ph_toolbar_state)!==null&&t!==void 0?t:Un.UNINITIALIZED}maybeLoadToolbar(t,n,r){if(t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),wg(this.instance.config)||!T||!j)return!1;t=t??T.location,r=r??T.history;try{if(!n){try{T.localStorage.setItem("test","test"),T.localStorage.removeItem("test")}catch{return!1}n=T==null?void 0:T.localStorage}var s,i=YO||ko(t.hash,"__posthog")||ko(t.hash,"state"),o=i?Rf(()=>JSON.parse(atob(decodeURIComponent(i))))||Rf(()=>JSON.parse(decodeURIComponent(i))):null;return o&&o.action==="ph_authorize"?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?t.hash=o.desiredHash:r?r.replaceState(r.state,"",t.pathname+t.search):t.hash="")):((s=JSON.parse(n.getItem(Uf)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}X(t){var n=Q.ph_load_toolbar||Q.ph_load_editor;!he(n)&&Sn(n)?n(t,this.instance):jf.warn("No toolbar load function found")}loadToolbar(t){var n=!(j==null||!j.getElementById(kg));if(!T||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=U({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(T.localStorage.setItem(Uf,JSON.stringify(U({},s,{source:void 0}))),this.Y()===Un.LOADED)this.X(s);else if(this.Y()===Un.UNINITIALIZED){var i;this.K(Un.LOADING),(i=Q.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return jf.error("[Toolbar] Failed to load",o),void this.K(Un.UNINITIALIZED);this.K(Un.LOADED),this.X(s)}),We(T,"turbolinks:load",()=>{this.K(Un.UNINITIALIZED),this.loadToolbar(s)})}return!0}Z(t){return this.loadToolbar(t)}maybeLoadEditor(t,n,r){return t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(t,n,r)}}class Bf{constructor(t){this.tt=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength)&&(V.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.it=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.et()}et(){var t;this.rt=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.tt)}destroy(){var t;(t=this.rt)==null||t.call(this),this.rt=void 0}doPageView(t,n){var r,s=this.st(t,n);return this.it={pathname:(r=T==null?void 0:T.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),s}doPageLeave(t){var n;return this.st(t,(n=this.it)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.it)==null?void 0:t.pageViewId}}st(t,n){var r=this.it;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:u,lastContentY:c,maxContentY:f}=i;if(!(B(o)||B(a)||B(l)||B(u)||B(c)||B(f))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),f=Math.ceil(f);var d=o<=1?1:an(a/o,0,1,V),h=o<=1?1:an(l/o,0,1,V),p=u<=1?1:an(c/u,0,1,V),g=u<=1?1:an(f/u,0,1,V);s=Ze(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:g})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),s}}var En=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),Ut=Uint8Array,Ot=Uint16Array,es=Uint32Array,Oc=new Ut([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]),Ac=new Ut([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]),Vf=new Ut([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Pg=function(e,t){for(var n=new Ot(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var s=new es(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)s[i]=i-n[r]<<5|r;return[n,s]},Rg=Pg(Oc,2),QO=Rg[0],Cl=Rg[1];QO[28]=258,Cl[258]=28;for(var Zf=Pg(Ac,0)[1],Ig=new Ot(32768),Ce=0;Ce<32768;++Ce){var lr=(43690&Ce)>>>1|(21845&Ce)<<1;lr=(61680&(lr=(52428&lr)>>>2|(13107&lr)<<2))>>>4|(3855&lr)<<4,Ig[Ce]=((65280&lr)>>>8|(255&lr)<<8)>>>1}var Hs=function(e,t,n){for(var r=e.length,s=0,i=new Ot(t);s<r;++s)++i[e[s]-1];var o,a=new Ot(t);for(s=0;s<t;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Ot(r),s=0;s<r;++s)o[s]=Ig[a[e[s]-1]++]>>>15-e[s];return o},vr=new Ut(288);for(Ce=0;Ce<144;++Ce)vr[Ce]=8;for(Ce=144;Ce<256;++Ce)vr[Ce]=9;for(Ce=256;Ce<280;++Ce)vr[Ce]=7;for(Ce=280;Ce<288;++Ce)vr[Ce]=8;var Oo=new Ut(32);for(Ce=0;Ce<32;++Ce)Oo[Ce]=5;var eA=Hs(vr,9),tA=Hs(Oo,5),Cg=function(e){return(e/8>>0)+(7&e&&1)},Ng=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Ot?Ot:e instanceof es?es:Ut)(n-t);return r.set(e.subarray(t,n)),r},dn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},ps=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Sa=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return[new Ut(0),0];if(s==1){var o=new Ut(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(m,N){return m.f-N.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,f=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=s-1;)a=n[n[u].f<n[f].f?u++:f++],l=n[u!=c&&n[u].f<n[f].f?u++:f++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=i[0].s;for(r=1;r<s;++r)i[r].s>d&&(d=i[r].s);var h=new Ot(d+1),p=Nl(n[c-1],h,0);if(p>t){r=0;var g=0,y=p-t,k=1<<y;for(i.sort(function(m,N){return h[N.s]-h[m.s]||m.f-N.f});r<s;++r){var b=i[r].s;if(!(h[b]>t))break;g+=k-(1<<p-h[b]),h[b]=t}for(g>>>=y;g>0;){var S=i[r].s;h[S]<t?g-=1<<t-h[S]++-1:++r}for(;r>=0&&g;--r){var E=i[r].s;h[E]==t&&(--h[E],++g)}p=t}return[new Ut(h),p]},Nl=function(e,t,n){return e.s==-1?Math.max(Nl(e.l,t,n+1),Nl(e.r,t,n+1)):t[e.s]=n},Hf=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ot(++t),r=0,s=e[0],i=1,o=function(l){n[r++]=l},a=1;a<=t;++a)if(e[a]==s&&a!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=e[a]}return[n.subarray(0,r),t]},gs=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},$l=function(e,t,n){var r=n.length,s=Cg(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var i=0;i<r;++i)e[s+i+4]=n[i];return 8*(s+4+r)},Gf=function(e,t,n,r,s,i,o,a,l,u,c){dn(t,c++,n),++s[256];for(var f=Sa(s,15),d=f[0],h=f[1],p=Sa(i,15),g=p[0],y=p[1],k=Hf(d),b=k[0],S=k[1],E=Hf(g),m=E[0],N=E[1],M=new Ot(19),R=0;R<b.length;++R)M[31&b[R]]++;for(R=0;R<m.length;++R)M[31&m[R]]++;for(var I=Sa(M,7),F=I[0],J=I[1],D=19;D>4&&!F[Vf[D-1]];--D);var re,ue,Ee,ce,X=u+5<<3,le=gs(s,vr)+gs(i,Oo)+o,He=gs(s,d)+gs(i,g)+o+14+3*D+gs(M,F)+(2*M[16]+3*M[17]+7*M[18]);if(X<=le&&X<=He)return $l(t,c,e.subarray(l,l+u));if(dn(t,c,1+(He<le)),c+=2,He<le){re=Hs(d,h),ue=d,Ee=Hs(g,y),ce=g;var nt=Hs(F,J);for(dn(t,c,S-257),dn(t,c+5,N-1),dn(t,c+10,D-4),c+=14,R=0;R<D;++R)dn(t,c+3*R,F[Vf[R]]);c+=3*D;for(var rt=[b,m],ye=0;ye<2;++ye){var Ye=rt[ye];for(R=0;R<Ye.length;++R){var Ge=31&Ye[R];dn(t,c,nt[Ge]),c+=F[Ge],Ge>15&&(dn(t,c,Ye[R]>>>5&127),c+=Ye[R]>>>12)}}}else re=eA,ue=vr,Ee=tA,ce=Oo;for(R=0;R<a;++R)if(r[R]>255){Ge=r[R]>>>18&31,ps(t,c,re[Ge+257]),c+=ue[Ge+257],Ge>7&&(dn(t,c,r[R]>>>23&31),c+=Oc[Ge]);var yt=31&r[R];ps(t,c,Ee[yt]),c+=ce[yt],yt>3&&(ps(t,c,r[R]>>>5&8191),c+=Ac[yt])}else ps(t,c,re[r[R]]),c+=ue[r[R]];return ps(t,c,re[256]),c+ue[256]},nA=new es([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rA=function(){for(var e=new es(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),sA=function(e,t,n,r,s){return function(i,o,a,l,u,c){var f=i.length,d=new Ut(l+f+5*(1+Math.floor(f/7e3))+u),h=d.subarray(l,d.length-u),p=0;if(!o||f<8)for(var g=0;g<=f;g+=65535){var y=g+65535;y<f?p=$l(h,p,i.subarray(g,y)):(h[g]=c,p=$l(h,p,i.subarray(g,f)))}else{for(var k=nA[o-1],b=k>>>13,S=8191&k,E=(1<<a)-1,m=new Ot(32768),N=new Ot(E+1),M=Math.ceil(a/3),R=2*M,I=function(x){return(i[x]^i[x+1]<<M^i[x+2]<<R)&E},F=new es(25e3),J=new Ot(288),D=new Ot(32),re=0,ue=0,Ee=(g=0,0),ce=0,X=0;g<f;++g){var le=I(g),He=32767&g,nt=N[le];if(m[He]=nt,N[le]=He,ce<=g){var rt=f-g;if((re>7e3||Ee>24576)&&rt>423){p=Gf(i,h,0,F,J,D,ue,Ee,X,g-X,p),Ee=re=ue=0,X=g;for(var ye=0;ye<286;++ye)J[ye]=0;for(ye=0;ye<30;++ye)D[ye]=0}var Ye=2,Ge=0,yt=S,Ve=He-nt&32767;if(rt>2&&le==I(g-Ve))for(var P=Math.min(b,rt)-1,q=Math.min(32767,g),Z=Math.min(258,rt);Ve<=q&&--yt&&He!=nt;){if(i[g+Ye]==i[g+Ye-Ve]){for(var K=0;K<Z&&i[g+K]==i[g+K-Ve];++K);if(K>Ye){if(Ye=K,Ge=Ve,K>P)break;var de=Math.min(Ve,K-2),_=0;for(ye=0;ye<de;++ye){var v=g-Ve+ye+32768&32767,w=v-m[v]+32768&32767;w>_&&(_=w,nt=v)}}}Ve+=(He=nt)-(nt=m[He])+32768&32767}if(Ge){F[Ee++]=268435456|Cl[Ye]<<18|Zf[Ge];var A=31&Cl[Ye],C=31&Zf[Ge];ue+=Oc[A]+Ac[C],++J[257+A],++D[C],ce=g+Ye,++re}else F[Ee++]=i[g],++J[i[g]]}}p=Gf(i,h,c,F,J,D,ue,Ee,X,g-X,p)}return Ng(d,0,l+Cg(p)+u)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},Ta=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function iA(e,t){t===void 0&&(t={});var n=function(){var a=4294967295;return{p:function(l){for(var u=a,c=0;c<l.length;++c)u=rA[255&u^l[c]]^u>>>8;a=u},d:function(){return 4294967295^a}}}(),r=e.length;n.p(e);var s,i=sA(e,t,10+((s=t).filename&&s.filename.length+1||0),8),o=i.length;return function(a,l){var u=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&Ta(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),u){a[3]=8;for(var c=0;c<=u.length;++c)a[c+10]=u.charCodeAt(c)}}(i,t),Ta(i,o-8,n.d()),Ta(i,o-4,r),i}var oA=function(e){var t,n,r,s,i="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
|
|
82
82
|
`).replace(/\r/g,`
|
|
83
|
-
`)).length,s=0;s<r;s++){var o=e.charCodeAt(s),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Kt(a)||(n>t&&(i+=e.substring(t,n)),i+=a,t=n=s+1)}return n>t&&(i+=e.substring(t,e.length)),i},IO=!!pl||!!hl,Hf="text/plain",xo=function(e,t,n){var r;n===void 0&&(n=!0);var[s,i]=e.split("?"),o=U({},t),a=(r=i==null?void 0:i.split("&").map(u=>{var c,[f,d]=u.split("="),h=n&&(c=o[f])!==null&&c!==void 0?c:d;return delete o[f],f+"="+h}))!==null&&r!==void 0?r:[],l=bO(o);return l&&a.push(l),s+"?"+a.join("&")},As=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),Ta=e=>{var{data:t,compression:n}=e;if(t){if(n===En.GZipJS){var r=CO(function(l,u){var c=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var f=new Ut(l.length+(l.length>>>1)),d=0,h=function(T){f[d++]=T},p=0;p<c;++p){if(d+5>f.length){var g=new Ut(d+8+(c-p<<1));g.set(f),f=g}var y=l.charCodeAt(p);y<128||u?h(y):y<2048?(h(192|y>>>6),h(128|63&y)):y>55295&&y<57344?(h(240|(y=65536+(1047552&y)|1023&l.charCodeAt(++p))>>>18),h(128|y>>>12&63),h(128|y>>>6&63),h(128|63&y)):(h(224|y>>>12),h(128|y>>>6&63),h(128|63&y))}return Cg(f,0,d)}(As(t)),{mtime:0}),s=new Blob([r],{type:Hf});return{contentType:Hf,body:s,estimatedSize:s.size}}if(n===En.Base64){var i=function(l){var u,c,f,d,h,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=0,y=0,T="",b=[];if(!l)return l;l=RO(l);do u=(h=l.charCodeAt(g++)<<16|l.charCodeAt(g++)<<8|l.charCodeAt(g++))>>18&63,c=h>>12&63,f=h>>6&63,d=63&h,b[y++]=p.charAt(u)+p.charAt(c)+p.charAt(f)+p.charAt(d);while(g<l.length);switch(T=b.join(""),l.length%3){case 1:T=T.slice(0,-2)+"==";break;case 2:T=T.slice(0,-1)+"="}return T}(As(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:As(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=As(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Ki=[];hl&&Ki.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:s,estimatedSize:i}=(t=Ta(e))!==null&&t!==void 0?t:{},o=new Headers;Ce(e.headers,function(c,f){o.append(f,c)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(mf){var u=new mf;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}hl(a,U({method:(e==null?void 0:e.method)||"GET",headers:o,keepalive:e.method==="POST"&&(i||0)<52428.8,body:s,signal:(n=l)==null?void 0:n.signal},e.fetchOptions)).then(c=>c.text().then(f=>{var d={statusCode:c.status,text:f};if(c.status===200)try{d.json=JSON.parse(f)}catch(h){V.error(h)}e.callback==null||e.callback(d)})).catch(c=>{V.error(c),e.callback==null||e.callback({statusCode:0,error:c})}).finally(()=>l?clearTimeout(l.timeout):null)}}),pl&&Ki.push({transport:"XHR",method:e=>{var t,n=new pl;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=(t=Ta(e))!==null&&t!==void 0?t:{};Ce(e.headers,function(i,o){n.setRequestHeader(o,i)}),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var i={statusCode:n.status,text:n.responseText};if(n.status===200)try{i.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(i)}},n.send(s)}}),It!=null&&It.sendBeacon&&Ki.push({transport:"sendBeacon",method:e=>{var t=xo(e.url,{beacon:"1"});try{var n,{contentType:r,body:s}=(n=Ta(e))!==null&&n!==void 0?n:{},i=typeof s=="string"?new Blob([s],{type:r}):s;It.sendBeacon(t,i)}catch{}}});var Ao=function(e,t){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function Gf(e,t,n){return As({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Rg={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>Ao(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!Ao(n,r))),icontains:(e,t)=>t.map(Mi).some(n=>e.map(Mi).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(Mi).every(n=>e.map(Mi).every(r=>!n.includes(r))),gt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r>parseFloat(s))}),lt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r<parseFloat(s))})},Mi=e=>e.toLowerCase();function Ig(e,t){return!e||Object.entries(e).every(n=>{var[r,s]=n,i=t==null?void 0:t[r];if(B(i)||Kt(i))return!1;var o=[String(i)],a=Rg[s.operator];return!!a&&a(s.values,o)})}var Oa=Ue("[Error tracking]");class PO{constructor(t){var n,r;this.nt=[],this.ot=new FT([new GT,new tO,new qT,new WT,new QT,new XT,new JT,new eO],HT()),this._instance=t,this.nt=(n=(r=this._instance.persistence)==null?void 0:r.get_property(Sl))!==null&&n!==void 0?n:[]}onRemoteConfig(t){var n,r,s;if("errorTracking"in t){var i=(n=(r=t.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],o=(s=t.errorTracking)==null?void 0:s.captureExtensionExceptions;this.nt=i,this._instance.persistence&&this._instance.persistence.register({[Sl]:this.nt,[If]:o})}}get ut(){var t,n=!!this._instance.get_property(If),r=this._instance.config.error_tracking.captureExtensionExceptions;return(t=r??n)!==null&&t!==void 0&&t}buildProperties(t,n){return this.ot.buildFromUnknown(t,{syntheticException:n==null?void 0:n.syntheticException,mechanism:{handled:n==null?void 0:n.handled}})}sendExceptionEvent(t){var n=t.$exception_list;if(this.ht(n)){if(this.dt(n))return void Oa.info("Skipping exception capture because a suppression rule matched");if(!this.ut&&this.vt(n))return void Oa.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ct(n))return void Oa.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",ft:!0})}dt(t){if(t.length===0)return!1;var n=t.reduce((r,s)=>{var{type:i,value:o}=s;return qe(i)&&i.length>0&&r.$exception_types.push(i),qe(o)&&o.length>0&&r.$exception_values.push(o),r},{$exception_types:[],$exception_values:[]});return this.nt.some(r=>{var s=r.values.map(i=>{var o,a=Rg[i.operator],l=ve(i.value)?i.value:[i.value],u=(o=n[i.key])!==null&&o!==void 0?o:[];return l.length>0&&a(l,u)});return r.type==="OR"?s.some(Boolean):s.every(Boolean)})}vt(t){return t.flatMap(n=>{var r,s;return(r=(s=n.stacktrace)==null?void 0:s.frames)!==null&&r!==void 0?r:[]}).some(n=>n.filename&&n.filename.startsWith("chrome-extension://"))}ct(t){if(t.length>0){var n,r,s,i,o=(n=(r=t[0].stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[],a=o[o.length-1];return(s=a==null||(i=a.filename)==null?void 0:i.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}ht(t){return!he(t)&&ve(t)}}var Fi="https?://(.*)",ts=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],NO=Qr(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],ts),oi="<masked>",$O=["li_fat_id"];function Pg(e,t,n){if(!j)return{};var r,s=t?Qr([],ts,n||[]):[],i=Ng(ii(j.URL,s,oi),e),o=(r={},Ce($O,function(a){var l=on.A(a);r[a]=l||null}),r);return Ze(o,i)}function Ng(e,t){var n=NO.concat(t||[]),r={};return Ce(n,function(s){var i=ko(e,s);r[s]=i||null}),r}function $g(e){var t=function(i){return i?i.search(Fi+"google.([^/?]*)")===0?"google":i.search(Fi+"bing.com")===0?"bing":i.search(Fi+"yahoo.com")===0?"yahoo":i.search(Fi+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!Kt(t)){r.$search_engine=t;var s=j?ko(j.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function Wf(){return navigator.language||navigator.userLanguage}function Dg(){return(j==null?void 0:j.referrer)||"$direct"}function Mg(e,t){var n=e?Qr([],ts,t||[]):[],r=ot==null?void 0:ot.href.substring(0,1e3);return{r:Dg().substring(0,1e3),u:r?ii(r,n,oi):void 0}}function Fg(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=So(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=So(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=Ng(r);Ze(s,o)}if(n){var a=$g(n);Ze(s,a)}return s}function Lg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function DO(){try{return new Date().getTimezoneOffset()}catch{return}}function MO(e,t){var n,r;if(!kt)return{};var s,i,o=e?Qr([],ts,t||[]):[],[a,l]=function(T){for(var b=0;b<Sf.length;b++){var[S,E]=Sf[b],m=S.exec(T),N=m&&(Sn(E)?E(m,T):E);if(N)return N}return["",""]}(kt),u=(s=kf(kt))===Xp||s===Yp||s==="Kobo"||s==="Kindle Fire"||s===fg?ti:s===ri||s===Br||s===si||s===yl?"Console":s===eg?"Wearable":s?zt:"Desktop";if(u==="Desktop"&&((n=navigator)==null||(n=n.userAgentData)==null?void 0:n.platform)==="Android"&&((r=navigator)==null?void 0:r.maxTouchPoints)>0){var c,f,d,h,p,g=(c=k==null||(f=k.screen)==null?void 0:f.width)!==null&&c!==void 0?c:0,y=(d=k==null||(h=k.screen)==null?void 0:h.height)!==null&&d!==void 0?d:0;u=Math.min(g,y)/((p=k==null?void 0:k.devicePixelRatio)!==null&&p!==void 0?p:1)>=600?"Tablet":"Mobile"}return Ze(Sc({$os:a,$os_version:l,$browser:dg(kt,navigator.vendor),$device:kf(kt),$device_type:u,$timezone:Lg(),$timezone_offset:DO()}),{$current_url:ii(ot==null?void 0:ot.href,o,oi),$host:ot==null?void 0:ot.host,$pathname:ot==null?void 0:ot.pathname,$raw_user_agent:kt.length>1e3?kt.substring(0,997)+"...":kt,$browser_version:$T(kt,navigator.vendor),$browser_language:Wf(),$browser_language_prefix:(i=Wf(),typeof i=="string"?i.split("-")[0]:void 0),$screen_height:k==null?void 0:k.screen.height,$screen_width:k==null?void 0:k.screen.width,$viewport_height:k==null?void 0:k.innerHeight,$viewport_width:k==null?void 0:k.innerWidth,$lib:"web",$lib_version:pn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Et=Ue("[FeatureFlags]"),_s=Ue("[FeatureFlags]",{debugEnabled:!0}),FO="errors_while_computing_flags",LO="flag_missing",zO="quota_limited",UO="timeout",jO="connection_error",BO="unknown_error",VO=e=>"api_error_"+e,xa="$active_feature_flags",wr="$override_feature_flags",qf="$feature_flag_payloads",vs="$override_feature_flag_payloads",Kf="$feature_flag_request_id",Jf=e=>{var t={};for(var[n,r]of qi(e||{}))r&&(t[n]=r);return t},ZO=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(n=>{var r;return[n,(r=t[n].variant)!==null&&r!==void 0?r:t[n].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(n=>t[n].enabled).filter(n=>{var r;return(r=t[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=t[n].metadata)==null?void 0:r.payload]}))):Et.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},HO=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class GO{constructor(t){this._t=!1,this.bt=!1,this.yt=!1,this.wt=!1,this.xt=!1,this.$t=!1,this.Et=!1,this.St=!1,this._instance=t,this.featureFlagEventHandlers=[]}kt(){var t,n;return(t=(n=this._instance.persistence)==null?void 0:n.Pt(this._instance.config.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}Tt(){return!!this.kt()&&(this.St||this.yt||(this.St=!0,Et.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Ct(){var t,n=(t=this._instance.config.evaluation_contexts)!==null&&t!==void 0?t:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.Et||(Et.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Et=!0),n!=null&&n.length?n.filter(r=>{var s=r&&typeof r=="string"&&r.trim().length>0;return s||Et.error("Invalid evaluation context found:",r,"Expected non-empty string"),s}):[]}It(){return this.Ct().length>0}get hasLoadedFlags(){return this.bt}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(kl),n=this._instance.get_property(wr),r=this._instance.get_property(vs);if(!r&&!n)return t||{};var s=Ze({},t||{}),i=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of i){var a,l,u=s[o],c=n==null?void 0:n[o],f=B(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,d=B(c)?u.variant:typeof c=="string"?c:void 0,h=r==null?void 0:r[o],p=U({},u,{enabled:f,variant:f?d??(u==null?void 0:u.variant):void 0});f!==(u==null?void 0:u.enabled)&&(p.original_enabled=u==null?void 0:u.enabled),d!==(u==null?void 0:u.variant)&&(p.original_variant=u==null?void 0:u.variant),h&&(p.metadata=U({},u==null?void 0:u.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),s[o]=p}return this._t||(Et.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:r,finalDetails:s}),this._t=!0),s}getFlagVariants(){var t=this._instance.get_property(Pr),n=this._instance.get_property(wr);if(!n)return t||{};for(var r=Ze({},t),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(Et.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._t=!0),r}getFlagPayloads(){var t=this._instance.get_property(qf),n=this._instance.get_property(vs);if(!n)return t||{};for(var r=Ze({},t||{}),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(Et.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:n,finalPayloads:r}),this._t=!0),r}reloadFeatureFlags(){this.wt||this._instance.config.advanced_disable_feature_flags||this.Rt||(this._instance.Ft.emit("featureFlagsReloading",!0),this.Rt=setTimeout(()=>{this.Ot()},5))}Mt(){clearTimeout(this.Rt),this.Rt=void 0}ensureFlagsLoaded(){this.bt||this.yt||this.Rt||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.wt=t}Ot(t){var n;if(this.Mt(),!this._instance.At())if(this.yt)this.xt=!0;else{var r=this._instance.config.token,s=this._instance.get_property("$device_id"),i={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:U({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(xs)||{}),group_properties:this._instance.get_property(ur),timezone:Lg()};Kt(s)||B(s)||(i.$device_id=s),(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.It()&&(i.evaluation_contexts=this.Ct());var o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+o);this.yt=!0,this._instance._send_request({method:"POST",url:a,data:i,compression:this._instance.config.disable_compression?void 0:En.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var u,c,f,d=!0;if(l.statusCode===200&&(this.xt||(this.$anon_distinct_id=void 0),d=!1),this.yt=!1,!i.disable_flags||this.xt){this.$t=!d;var h=[];l.error?l.error instanceof Error?h.push(l.error.name==="AbortError"?UO:jO):h.push(BO):l.statusCode!==200&&h.push(VO(l.statusCode)),(u=l.json)!=null&&u.errorsWhileComputingFlags&&h.push(FO);var p=!((c=l.json)==null||(c=c.quotaLimited)==null||!c.includes(HO.FeatureFlags));if(p&&h.push(zO),(f=this._instance.persistence)==null||f.register({[Ol]:h}),p)Et.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.");else{var g;i.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},d),this.xt&&(this.xt=!1,this.Ot())}}}})}}getFeatureFlag(t,n){var r;if(n===void 0&&(n={}),!n.fresh||this.$t)if(this.bt||this.getFlags()&&this.getFlags().length>0){if(!this.Tt()){var s=this.getFeatureFlagResult(t,n);return(r=s==null?void 0:s.variant)!==null&&r!==void 0?r:s==null?void 0:s.enabled}}else Et.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var n=this.getFeatureFlagResult(t,{send_event:!1});return n==null?void 0:n.payload}getFeatureFlagResult(t,n){if(n===void 0&&(n={}),!n.fresh||this.$t)if(this.bt||this.getFlags()&&this.getFlags().length>0){if(!this.Tt()){var r=this.getFlagVariants(),s=t in r,i=r[t],o=this.getFlagPayloads()[t],a=String(i),l=this._instance.get_property(Kf)||void 0,u=this._instance.get_property(yo)||void 0,c=this._instance.get_property(mo)||{};if((n.send_event||!("send_event"in n))&&(!(t in c)||!c[t].includes(a))){var f,d,h,p,g,y,T,b,S,E;ve(c[t])?c[t].push(a):c[t]=[a],(f=this._instance.persistence)==null||f.register({[mo]:c});var m=this.getFeatureFlagDetails(t),N=[...(d=this._instance.get_property(Ol))!==null&&d!==void 0?d:[]];B(i)&&N.push(LO);var M={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((h=this._instance.config.bootstrap)==null||(h=h.featureFlags)==null?void 0:h[t])||null,$feature_flag_bootstrapped_payload:((p=this._instance.config.bootstrap)==null||(p=p.featureFlagPayloads)==null?void 0:p[t])||null,$used_bootstrap_value:!this.$t};B(m==null||(g=m.metadata)==null?void 0:g.version)||(M.$feature_flag_version=m.metadata.version);var R,I=(y=m==null||(T=m.reason)==null?void 0:T.description)!==null&&y!==void 0?y:m==null||(b=m.reason)==null?void 0:b.code;I&&(M.$feature_flag_reason=I),m!=null&&(S=m.metadata)!=null&&S.id&&(M.$feature_flag_id=m.metadata.id),B(m==null?void 0:m.original_variant)&&B(m==null?void 0:m.original_enabled)||(M.$feature_flag_original_response=B(m.original_variant)?m.original_enabled:m.original_variant),m!=null&&(E=m.metadata)!=null&&E.original_payload&&(M.$feature_flag_original_payload=m==null||(R=m.metadata)==null?void 0:R.original_payload),N.length&&(M.$feature_flag_error=N.join(",")),this._instance.capture("$feature_flag_called",M)}if(s){var F=o;if(!B(o))try{F=JSON.parse(o)}catch{}return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:F}}}}else Et.warn('getFeatureFlagResult for key "'+t+`" failed. Feature flags didn't load in time.`)}getRemoteConfigPayload(t,n){var r=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:r};this.It()&&(s.evaluation_contexts=this.Ct()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this._instance.config.disable_compression?void 0:En.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var o,a=(o=i.json)==null?void 0:o.featureFlagPayloads;n((a==null?void 0:a[t])||void 0)}})}isFeatureEnabled(t,n){if(n===void 0&&(n={}),!n.fresh||this.$t){if(this.bt||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(t,n);return B(r)?void 0:!!r}Et.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==t)}receivedFeatureFlags(t,n){if(this._instance.persistence){this.bt=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(o,a,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var f=ZO(o),d=f.flags,h=f.featureFlags,p=f.featureFlagPayloads;if(h){var g=o.requestId,y=o.evaluatedAt;if(ve(h)){Et.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var T={};if(h)for(var b=0;b<h.length;b++)T[h[b]]=!0;a&&a.register({[xa]:h,[Pr]:T})}else{var S=h,E=p,m=d;if(o.errorsWhileComputingFlags)if(d){var N=new Set(Object.keys(d).filter(M=>{var R;return!((R=d[M])!=null&&R.failed)}));S=U({},l,Object.fromEntries(Object.entries(S).filter(M=>{var[R]=M;return N.has(R)}))),E=U({},u,Object.fromEntries(Object.entries(E||{}).filter(M=>{var[R]=M;return N.has(R)}))),m=U({},c,Object.fromEntries(Object.entries(m||{}).filter(M=>{var[R]=M;return N.has(R)})))}else S=U({},l,S),E=U({},u,E),m=U({},c,m);a&&a.register(U({[xa]:Object.keys(Jf(S)),[Pr]:S||{},[qf]:E||{},[kl]:m||{}},g?{[Kf]:g}:{},y?{[yo]:y}:{}))}}})(t,this._instance.persistence,r,s,i),n||(this.St=!1),this.Dt(n)}}override(t,n){n===void 0&&(n=!1),Et.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return Et.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(wr),this._instance.persistence.unregister(vs),this.Dt(),_s.info("All overrides cleared");if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this._t=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(wr),_s.info("Flag overrides cleared");else if(r.flags){if(ve(r.flags)){for(var s={},i=0;i<r.flags.length;i++)s[r.flags[i]]=!0;this._instance.persistence.register({[wr]:s})}else this._instance.persistence.register({[wr]:r.flags});_s.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(vs),_s.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[vs]:r.payloads}),_s.info("Payload overrides set",{payloads:r.payloads}))),void this.Dt()}this.Dt()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.bt){var{flags:n,flagVariants:r}=this.jt();t(n,r)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,n,r){var s,i=(this._instance.get_property(Os)||[]).find(u=>u.flagKey===t),o={["$feature_enrollment/"+t]:n},a={$feature_flag:t,$feature_enrollment:n,$set:o};i&&(a.$early_access_feature_name=i.name),r&&(a.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=U({},this.getFlagVariants(),{[t]:n});(s=this._instance.persistence)==null||s.register({[xa]:Object.keys(Jf(l)),[Pr]:l}),this.Dt()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var s=this._instance.get_property(Os),i=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(s&&!n)return t(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+i),method:"GET",callback:o=>{var a,l;if(o.json){var u=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(Os),(l=this._instance.persistence)==null||l.register({[Os]:u}),t(u)}}})}jt(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,s)=>(r[s]=n[s],r),{})}}Dt(t){var{flags:n,flagVariants:r}=this.jt();this.featureFlagEventHandlers.forEach(s=>s(n,r,{errorsLoading:t}))}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(xs)||{};this._instance.register({[xs]:U({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(xs)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(ur)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(s=>{r[s]=U({},r[s],t[s]),delete t[s]}),this._instance.register({[ur]:U({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(ur)||{};this._instance.register({[ur]:U({},n,{[t]:{}})})}else this._instance.unregister(ur)}reset(){this.bt=!1,this.yt=!1,this.wt=!1,this.xt=!1,this.$t=!1,this.$anon_distinct_id=void 0,this.Mt(),this._t=!1}}var WO=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Aa{constructor(t,n){this.N=t,this.props={},this.Lt=!1,this.Nt=(r=>{var s="";return r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+s+"_posthog"})(t),this.B=this.Ut(t),this.load(),t.debug&&V.info("Persistence loaded",t.persistence,U({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this.zt}Ut(t){WO.indexOf(t.persistence.toLowerCase())===-1&&(V.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=function(s){s===void 0&&(s=[]);var i=[...hO,...s];return U({},De,{D:function(o){try{var a={};try{a=on.D(o)||{}}catch{}var l=Ze(a,JSON.parse(De.A(o)||"{}"));return De.j(o,l),l}catch{}return null},j:function(o,a,l,u,c,f){try{De.j(o,a,void 0,void 0,f);var d={};i.forEach(h=>{a[h]&&(d[h]=a[h])}),Object.keys(d).length&&on.j(o,d,l,u,c,f)}catch(h){De.M(h)}},L:function(o,a){try{k==null||k.localStorage.removeItem(o),on.L(o,a)}catch(l){De.M(l)}}})}(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&De.O()?De:r==="localstorage+cookie"&&n.O()?n:r==="sessionstorage"&&it.O()?it:r==="memory"?pO:r==="cookie"?on:n.O()?n:on}Pt(t){var n=t??this.N.feature_flag_cache_ttl_ms;if(!n||n<=0)return!1;var r=this.props[yo];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Ce(this.props,(n,r)=>{if(r===Pr&&et(n)){if(!this.Pt())for(var s=Object.keys(n),i=0;i<s.length;i++)t["$feature/"+s[i]]=n[s[i]]}else a=r,l=!1,(Kt(o=aO)?l:vf&&o.indexOf===vf?o.indexOf(a)!=-1:(Ce(o,function(u){if(l||(l=u===a))return _o}),l))||(t[r]=n);var o,a,l}),t}load(){if(!this.zt){var t=this.B.D(this.Nt);t&&(this.props=Ze({},t))}}save(){this.zt||this.B.j(this.Nt,this.props,this.Ht,this.Bt,this.qt,this.N.debug)}remove(){this.B.L(this.Nt,!1),this.B.L(this.Nt,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(et(t)){B(n)&&(n="None"),this.Ht=B(r)?this.Wt:r;var s=!1;if(Ce(t,(i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=i,s=!0)}),s)return this.save(),!0}return!1}register(t,n){if(et(t)){this.Ht=B(n)?this.Wt:n;var r=!1;if(Ce(t,(s,i)=>{t.hasOwnProperty(i)&&this.props[i]!==s&&(this.props[i]=s,r=!0)}),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.Lt){var t=Pg(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);Ir(Sc(t))||this.register(t),this.Lt=!0}}update_search_keyword(){var t;this.register((t=j==null?void 0:j.referrer)?$g(t):{})}update_referrer_info(){var t;this.register_once({$referrer:Dg(),$referring_domain:j!=null&&j.referrer&&((t=So(j.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Cl]||this.props[Rl]||this.register_once({[bo]:Mg(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Ce([Rl,Cl],o=>{var a=this.props[o];a&&Ce(a,function(l,u){t["$initial_"+gl(u)]=l})});var n,r,s=this.props[bo];if(s){var i=(n=Fg(s),r={},Ce(n,function(o,a){r["$initial_"+gl(a)]=o}),r);Ze(t,i)}return t}safe_merge(t){return Ce(this.props,function(n,r){r in t||(t[r]=n)}),t}update_config(t,n,r){if(this.Wt=this.Ht=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((o,a)=>{if(o.length!==a.length)return!1;var l=[...o].sort(),u=[...a].sort();return l.every((c,f)=>c===u[f])})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var s=this.Ut(t),i=this.props;this.clear(),this.B=s,this.props=i,this.save()}}set_disabled(t){this.zt=t,this.zt?this.remove():this.save()}set_cross_subdomain(t){t!==this.Bt&&(this.Bt=t,this.remove(),this.save())}set_secure(t){t!==this.qt&&(this.qt=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[Ts]||{};r[t]=n,this.props[Ts]=r,this.save()}remove_event_timer(t){var n=(this.props[Ts]||{})[t];return B(n)||(delete this.props[Ts][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}}var ms=function(e){return e.Activation="events",e.Cancellation="cancelEvents",e}({});(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});(function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e})({});var Ca=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var Cs=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),Ra=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e.PRODUCT_TOUR_ID="$product_tour_id",e.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",e}({}),$l=function(e){return e.Popover="popover",e.Inline="inline",e}({}),Te=Ue("[Surveys]"),zg="seenSurvey_",qO=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},Yf=e=>((t,n)=>{var r=""+t+n.id;return n.current_iteration&&n.current_iteration>0&&(r=""+t+n.id+"_"+n.current_iteration),r})(zg,e),KO=[Ca.Popover,Ca.Widget,Ca.API],JO={ignoreConditions:!1,ignoreDelay:!1,displayType:$l.Popover};class Oc{constructor(){this.Gt={},this.Gt={}}on(t,n){return this.Gt[t]||(this.Gt[t]=[]),this.Gt[t].push(n),()=>{this.Gt[t]=this.Gt[t].filter(r=>r!==n)}}emit(t,n){for(var r of this.Gt[t]||[])r(n);for(var s of this.Gt["*"]||[])s(t,n)}}function Er(e,t,n){if(he(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class YO{constructor(t){this.Vt=new Oc,this.Jt=(n,r)=>this.Kt(n,r)&&this.Yt(n,r)&&this.Xt(n,r)&&this.Qt(n,r),this.Kt=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=t,this.Zt=new Set,this.ti=new Set}init(){var t;if(!B((t=this._instance)==null?void 0:t._addCaptureHook)){var n;(n=this._instance)==null||n._addCaptureHook((r,s)=>{this.on(r,s)})}}register(t){var n,r;if(!B((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach(o=>{var a,l;(a=this.ti)==null||a.add(o),(l=o.steps)==null||l.forEach(u=>{var c;(c=this.Zt)==null||c.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;t.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)})}),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(t,n){var r;n!=null&&t.length!=0&&(this.Zt.has(t)||this.Zt.has(n==null?void 0:n.event))&&this.ti&&((r=this.ti)==null?void 0:r.size)>0&&this.ti.forEach(s=>{this.ii(n,s)&&this.Vt.emit("actionCaptured",s.name)})}ei(t){this.onAction("actionCaptured",n=>t(n))}ii(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.Jt(t,r))return!0;return!1}onAction(t,n){return this.Vt.on(t,n)}Yt(t,n){if(n!=null&&n.url){var r,s=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!Er(s,n.url,n.url_matching||"contains"))return!1}return!0}Xt(t,n){return!!this.ri(t,n)&&!!this.si(t,n)&&!!this.ni(t,n)}ri(t,n){var r;if(n==null||!n.href)return!0;var s=this.oi(t);if(s.length>0)return s.some(a=>Er(a.href,n.href,n.href_matching||"exact"));var i,o=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!o&&Er((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}si(t,n){var r;if(n==null||!n.text)return!0;var s=this.oi(t);if(s.length>0)return s.some(u=>Er(u.text,n.text,n.text_matching||"exact")||Er(u.$el_text,n.text,n.text_matching||"exact"));var i,o,a,l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!l&&(i=function(u){for(var c,f=[],d=/(?::|")text="(.*?)"/g;!he(c=d.exec(u));)f.includes(c[1])||f.push(c[1]);return f}(l),o=n.text,a=n.text_matching||"exact",i.some(u=>Er(u,o,a)))}ni(t,n){var r,s;if(n==null||!n.selector)return!0;var i=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var o=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&o)try{return new RegExp(n.selector_regex).test(o)}catch{return!1}return!1}oi(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t==null?void 0:t.properties.$elements}Qt(t,n){return n==null||!n.properties||n.properties.length===0||Ig(n.properties.reduce((r,s)=>{var i=ve(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r},{}),t==null?void 0:t.properties)}}class XO{constructor(t){this._instance=t,this.ai=new Map,this.li=new Map,this.ui=new Map}hi(t,n){return!!t&&Ig(t.propertyFilters,n==null?void 0:n.properties)}di(t,n){var r=new Map;return t.forEach(s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach(o=>{if(o!=null&&o.name){var a=r.get(o.name)||[];a.push(s.id),r.set(o.name,a)}})}),r}vi(t,n,r){var s=(r===ms.Activation?this.ai:this.li).get(t),i=[];return this.ci(o=>{i=o.filter(a=>s==null?void 0:s.includes(a.id))}),i.filter(o=>{var a,l=(a=o.conditions)==null||(a=a[r])==null||(a=a.values)==null?void 0:a.find(u=>u.name===t);return this.hi(l,n)})}register(t){var n;B((n=this._instance)==null?void 0:n._addCaptureHook)||(this.fi(t),this.pi(t))}pi(t){var n=t.filter(r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0});n.length!==0&&(this.gi==null&&(this.gi=new YO(this._instance),this.gi.init(),this.gi.ei(r=>{this.onAction(r)})),n.forEach(r=>{var s,i,o,a,l;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.gi)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(u=>{if(u&&u.name){var c=this.ui.get(u.name);c&&c.push(r.id),this.ui.set(u.name,c||[r.id])}}))}))}fi(t){var n,r=t.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0}),s=t.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0});(r.length!==0||s.length!==0)&&((n=this._instance)==null||n._addCaptureHook((i,o)=>{this.onEvent(i,o)}),this.ai=this.di(t,ms.Activation),this.li=this.di(t,ms.Cancellation))}onEvent(t,n){var r,s=this.mi(),i=this.bi(),o=this.yi(),a=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[i])||[];if(o===t&&n&&a.length>0){var l,u;s.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:a});var c=(n==null||(l=n.properties)==null?void 0:l.$survey_id)||(n==null||(u=n.properties)==null?void 0:u.$product_tour_id);if(c){var f=a.indexOf(c);f>=0&&(a.splice(f,1),this.wi(a))}}else{if(this.li.has(t)){var d=this.vi(t,n,ms.Cancellation);d.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:d.map(p=>p.id)}),d.forEach(p=>{var g=a.indexOf(p.id);g>=0&&a.splice(g,1),this.xi(p.id)}),this.wi(a))}if(this.ai.has(t)){s.info("event name matched",{event:t,eventPayload:n,items:this.ai.get(t)});var h=this.vi(t,n,ms.Activation);this.wi(a.concat(h.map(p=>p.id)||[]))}}}onAction(t){var n,r=this.bi(),s=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.ui.has(t)&&this.wi(s.concat(this.ui.get(t)||[]))}wi(t){var n,r=this.mi(),s=this.bi(),i=[...new Set(t)].filter(o=>!this.$i(o));r.info("updating activated items",{activatedItems:i}),(n=this._instance)==null||(n=n.persistence)==null||n.register({[s]:i})}getActivatedIds(){var t,n=this.bi(),r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n];return r||[]}getEventToItemsMap(){return this.ai}Ei(){return this.gi}}class QO extends XO{constructor(t){super(t)}bi(){return"$surveys_activated"}yi(){return Cs.SHOWN}ci(t){var n;(n=this._instance)==null||n.getSurveys(t)}xi(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}mi(){return Te}$i(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class ex{constructor(t){this.Si=void 0,this._surveyManager=null,this.ki=!1,this.Pi=[],this.Ti=null,this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var n=t.surveys;if(he(n))return Te.warn("Flags not loaded yet. Not loading surveys.");var r=ve(n);this.Si=r?n.length>0:n,Te.info("flags response received, isSurveysEnabled: "+this.Si),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(zg)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach(s=>localStorage.removeItem(s))}loadIfEnabled(){if(!this._surveyManager)if(this.ki)Te.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Te.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Te.info("Not loading surveys in cookieless mode without consent.");else{var t=Q==null?void 0:Q.__PosthogExtensions__;if(t){if(!B(this.Si)||this._instance.config.advanced_enable_surveys){var n=this.Si||this._instance.config.advanced_enable_surveys;this.ki=!0;try{var r=t.generateSurveys;if(r)return void this.Ci(r,n);var s=t.loadExternalDependency;if(!s)return void this.Ii("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!t.generateSurveys?this.Ii("Could not load surveys script",i):this.Ci(t.generateSurveys,n)})}catch(i){throw this.Ii("Error initializing surveys",i),i}finally{this.ki=!1}}}else Te.error("PostHog Extensions not found.")}}Ci(t,n){this._surveyManager=t(this._instance,n),this._surveyEventReceiver=new QO(this._instance),Te.info("Surveys loaded successfully"),this.Ri({isLoaded:!0})}Ii(t,n){Te.error(t,n),this.Ri({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Pi.push(t),this._surveyManager&&this.Ri({isLoaded:!0}),()=>{this.Pi=this.Pi.filter(n=>n!==t)}}getSurveys(t,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return Te.info("Disabled. Not loading surveys."),t([]);var r,s=this._instance.get_property(Tl);if(s&&!n)return t(s,{isLoaded:!0});typeof Promise<"u"&&this.Ti?this.Ti.then(i=>{var{surveys:o,context:a}=i;return t(o,a)}):(typeof Promise<"u"&&(this.Ti=new Promise(i=>{r=i})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var o;this.Ti=null;var a=i.statusCode;if(a!==200||!i.json){var l="Surveys API could not be loaded, status: "+a;Te.error(l);var u={isLoaded:!1,error:l};return t([],u),void(r==null||r({surveys:[],context:u}))}var c,f=i.json.surveys||[],d=f.filter(p=>function(g){return!(!g.start_date||g.end_date)}(p)&&(function(g){var y;return!((y=g.conditions)==null||(y=y.events)==null||(y=y.values)==null||!y.length)}(p)||function(g){var y;return!((y=g.conditions)==null||(y=y.actions)==null||(y=y.values)==null||!y.length)}(p)));d.length>0&&((c=this._surveyEventReceiver)==null||c.register(d)),(o=this._instance.persistence)==null||o.register({[Tl]:f});var h={isLoaded:!0};t(f,h),r==null||r({surveys:f,context:h})}}))}Ri(t){for(var n of this.Pi)try{if(!t.isLoaded)return n([],t);this.getSurveys(n)}catch(r){Te.error("Error in survey callback",r)}}getActiveMatchingSurveys(t,n){if(n===void 0&&(n=!1),!he(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,n);Te.warn("init was not called")}Fi(t){var n=null;return this.getSurveys(r=>{var s;n=(s=r.find(i=>i.id===t))!==null&&s!==void 0?s:null}),n}Oi(t){if(he(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof t=="string"?this.Fi(t):t;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(he(this._surveyManager))return Te.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.Oi(t);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(t,n){return he(this._surveyManager)?(Te.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(s=>{var i,o=(i=s.find(l=>l.id===t))!==null&&i!==void 0?i:null;if(o){var a=this.Oi(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(t,n,r){var s;if(he(this._surveyManager))Te.warn("init was not called");else{var i=typeof t=="string"?this.Fi(t):t;if(i!=null&&i.id)if(KO.includes(i.type)){var o=j==null?void 0:j.querySelector(n);if(o)return(s=i.appearance)!=null&&s.surveyPopupDelaySeconds?(Te.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var a,l;Te.info("Rendering survey "+i.id+" with delay of "+((a=i.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(i,o,r),Te.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,o,r);Te.warn("Survey element not found")}else Te.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Te.warn("Survey not found")}}displaySurvey(t,n){var r;if(he(this._surveyManager))Te.warn("init was not called");else{var s=this.Fi(t);if(s){var i=s;if((r=s.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(i=U({},s,{appearance:U({},s.appearance,{surveyPopupDelaySeconds:0})})),n.displayType!==$l.Popover&&n.initialResponses&&Te.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),n.ignoreConditions===!1){var o=this.canRenderSurvey(s);if(!o.visible)return void Te.warn("Survey is not eligible to be displayed: ",o.disabledReason)}n.displayType!==$l.Inline?this._surveyManager.handlePopoverSurvey(i,n):this.renderSurvey(i,n.selector,n.properties)}else Te.warn("Survey not found")}}cancelPendingSurvey(t){he(this._surveyManager)?Te.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}var Mt=Ue("[Conversations]");class tx{constructor(t){this.Mi=void 0,this._conversationsManager=null,this.Ai=!1,this.Di=null,this._instance=t}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var n=t.conversations;he(n)||(An(n)?this.Mi=n:(this.Mi=n.enabled,this.Di=n),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Mi=void 0,this.Di=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ai||this._instance.config.disable_conversations||vg(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Q==null?void 0:Q.__PosthogExtensions__;if(t&&!B(this.Mi)&&this.Mi)if(this.Di&&this.Di.token){this.Ai=!0;try{var n=t.initConversations;if(n)return this.ji(n),void(this.Ai=!1);var r=t.loadExternalDependency;if(!r)return void this.Li("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",s=>{s||!t.initConversations?this.Li("Could not load conversations script",s):this.ji(t.initConversations),this.Ai=!1})}catch(s){this.Li("Error initializing conversations",s),this.Ai=!1}}else Mt.error("Conversations enabled but missing token in remote config.")}}ji(t){if(this.Di)try{this._conversationsManager=t(this.Di,this._instance),Mt.info("Conversations loaded successfully")}catch(n){this.Li("Error completing conversations initialization",n)}else Mt.error("Cannot complete initialization: remote config is null")}Li(t,n){Mt.error(t,n),this._conversationsManager=null,this.Ai=!1}show(){this._conversationsManager?this._conversationsManager.show():Mt.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Mi===!0&&!Kt(this._conversationsManager)}isVisible(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.isVisible())!==null&&t!==void 0&&t}sendMessage(t,n,r){var s=this;return gn(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(t,n,r):(Mt.warn("Conversations not available yet."),null)})()}getMessages(t,n){var r=this;return gn(function*(){return r._conversationsManager?r._conversationsManager.getMessages(t,n):(Mt.warn("Conversations not available yet."),null)})()}markAsRead(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.markAsRead(t):(Mt.warn("Conversations not available yet."),null)})()}getTickets(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.getTickets(t):(Mt.warn("Conversations not available yet."),null)})()}requestRestoreLink(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.requestRestoreLink(t):(Mt.warn("Conversations not available yet."),null)})()}restoreFromToken(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.restoreFromToken(t):(Mt.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var t=this;return gn(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(Mt.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.getWidgetSessionId())!==null&&t!==void 0?t:null}}var nx=function(e){return e.SHOWN="product tour shown",e.DISMISSED="product tour dismissed",e.COMPLETED="product tour completed",e.STEP_SHOWN="product tour step shown",e.STEP_COMPLETED="product tour step completed",e.BUTTON_CLICKED="product tour button clicked",e.STEP_SELECTOR_FAILED="product tour step selector failed",e.BANNER_CONTAINER_SELECTOR_FAILED="product tour banner container selector failed",e.BANNER_ACTION_CLICKED="product tour banner action clicked",e}({}),Xf=function(e){return e.TOUR_ID="$product_tour_id",e.TOUR_NAME="$product_tour_name",e.TOUR_ITERATION="$product_tour_iteration",e.TOUR_RENDER_REASON="$product_tour_render_reason",e.TOUR_STEP_ID="$product_tour_step_id",e.TOUR_STEP_ORDER="$product_tour_step_order",e.TOUR_STEP_TYPE="$product_tour_step_type",e.TOUR_DISMISS_REASON="$product_tour_dismiss_reason",e.TOUR_BUTTON_TEXT="$product_tour_button_text",e.TOUR_BUTTON_ACTION="$product_tour_button_action",e.TOUR_BUTTON_LINK="$product_tour_button_link",e.TOUR_BUTTON_TOUR_ID="$product_tour_button_tour_id",e.TOUR_STEPS_COUNT="$product_tour_steps_count",e.TOUR_STEP_SELECTOR="$product_tour_step_selector",e.TOUR_STEP_SELECTOR_FOUND="$product_tour_step_selector_found",e.TOUR_STEP_ELEMENT_TAG="$product_tour_step_element_tag",e.TOUR_STEP_ELEMENT_ID="$product_tour_step_element_id",e.TOUR_STEP_ELEMENT_CLASSES="$product_tour_step_element_classes",e.TOUR_STEP_ELEMENT_TEXT="$product_tour_step_element_text",e.TOUR_ERROR="$product_tour_error",e.TOUR_MATCHES_COUNT="$product_tour_matches_count",e.TOUR_FAILURE_PHASE="$product_tour_failure_phase",e.TOUR_WAITED_FOR_ELEMENT="$product_tour_waited_for_element",e.TOUR_WAIT_DURATION_MS="$product_tour_wait_duration_ms",e.TOUR_BANNER_SELECTOR="$product_tour_banner_selector",e.TOUR_LINKED_SURVEY_ID="$product_tour_linked_survey_id",e.USE_MANUAL_SELECTOR="$use_manual_selector",e.INFERENCE_DATA_PRESENT="$inference_data_present",e.TOUR_LAST_SEEN_DATE="$product_tour_last_seen_date",e.TOUR_TYPE="$product_tour_type",e}({});class rx{constructor(t){var n;this.Ni=!1,this.Ui=!1,this._instance=t,this._instance&&(n=this._instance.config.logs)!=null&&n.captureConsoleLogs&&(this.Ni=!0)}onRemoteConfig(t){var n,r=(n=t.logs)==null?void 0:n.captureConsoleLogs;!he(r)&&r&&(this.Ni=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ni&&!this.Ui){var t=Ue("[logs]"),n=Q==null?void 0:Q.__PosthogExtensions__;if(n){var r=n.loadExternalDependency;r?r(this._instance,"logs",s=>{var i;s||(i=n.logs)==null||!i.initializeLogs?t.error("Could not load logs script",s):(n.logs.initializeLogs(this._instance),this.Ui=!0)}):t.error("PostHog loadExternalDependency extension not found.")}else t.error("PostHog Extensions not found.")}}}var Qf=Ue("[RateLimiter]");class sx{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach(s=>{Qf.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void Qf.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,s;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:o}=this,a=new Date().getTime(),l=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Al))!==null&&n!==void 0?n:{tokens:i,last:a};l.tokens+=(a-l.last)/1e3*o,l.last=a,l.tokens>i&&(l.tokens=i);var u=l.tokens<1;return u||t||(l.tokens=Math.max(0,l.tokens-1)),!u||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,(s=this.instance.persistence)==null||s.set_property(Al,l),{isRateLimited:u,remainingTokens:l.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ys=Ue("[RemoteConfig]");class Ug{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Q._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}zi(t){var n,r;(n=Q.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}Hi(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{t(n.json)}})}load(){try{if(this.remoteConfig)return ys.info("Using preloaded remote config",this.remoteConfig),this.Bi(this.remoteConfig),void this.qi();if(this._instance.At())return void ys.warn("Remote config is disabled. Falling back to local config.");this.zi(t=>{if(!t)return ys.info("No config found after loading remote JS config. Falling back to JSON."),void this.Hi(n=>{this.Bi(n),this.qi()});this.Bi(t),this.qi()})}catch(t){ys.error("Error loading remote config",t)}}stop(){this.Wi&&(clearInterval(this.Wi),this.Wi=void 0)}refresh(){this._instance.At()||(j==null?void 0:j.visibilityState)==="hidden"||this._instance.featureFlags.reloadFeatureFlags()}qi(){var t;if(!this.Wi){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Wi=setInterval(()=>{this.refresh()},n))}}Bi(t){t||ys.error("Failed to fetch remote config from PostHog."),this._instance.Bi(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||this._instance.featureFlags.ensureFlagsLoaded())}}var Dl=3e3;class ix{constructor(t,n){this.Gi=!0,this.Vi=[],this.Ji=an((n==null?void 0:n.flush_interval_ms)||Dl,250,5e3,V.createLogger("flush interval"),Dl),this.Ki=t}enqueue(t){this.Vi.push(t),this.Yi||this.Xi()}unload(){this.Qi();var t=this.Vi.length>0?this.Zi():{},n=Object.values(t);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Ki(U({},r,{transport:"sendBeacon"}))})}enable(){this.Gi=!1,this.Xi()}Xi(){var t=this;this.Gi||(this.Yi=setTimeout(()=>{if(this.Qi(),this.Vi.length>0){var n=this.Zi(),r=function(){var i=n[s],o=new Date().getTime();i.data&&ve(i.data)&&Ce(i.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),t.Ki(i)};for(var s in n)r()}},this.Ji))}Qi(){clearTimeout(this.Yi),this.Yi=void 0}Zi(){var t={};return Ce(this.Vi,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;B(t[i])&&(t[i]=U({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.Vi=[],t}}var ox=["retriesPerformedSoFar"];class ax{constructor(t){this.te=!1,this.ie=3e3,this.Vi=[],this._instance=t,this.Vi=[],this.ee=!0,!B(k)&&"onLine"in k.navigator&&(this.ee=k.navigator.onLine,this.re=()=>{this.ee=!0,this.se()},this.ne=()=>{this.ee=!1},We(k,"online",this.re),We(k,"offline",this.ne))}get length(){return this.Vi.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=Wp(t,ox);xr(n)&&(r.url=xo(r.url,{retry_count:n})),this._instance._send_request(U({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?this.oe(U({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(s)}}))}oe(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(n),s=Date.now()+r;this.Vi.push({retryAt:s,requestOptions:t});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),V.warn(i),this.te||(this.te=!0,this.ae())}ae(){if(this.le&&clearTimeout(this.le),this.Vi.length===0)return this.te=!1,void(this.le=void 0);this.le=setTimeout(()=>{this.ee&&this.Vi.length>0&&this.se(),this.ae()},this.ie)}se(){var t=Date.now(),n=[],r=this.Vi.filter(i=>i.retryAt<t||(n.push(i),!1));if(this.Vi=n,r.length>0)for(var{requestOptions:s}of r)this.retriableRequest(s)}unload(){for(var{requestOptions:t}of(this.le&&(clearTimeout(this.le),this.le=void 0),this.te=!1,B(k)||(this.re&&(k.removeEventListener("online",this.re),this.re=void 0),this.ne&&(k.removeEventListener("offline",this.ne),this.ne=void 0)),this.Vi))try{this._instance._send_request(U({},t,{transport:"sendBeacon"}))}catch(n){V.error(n)}this.Vi=[]}}class lx{constructor(t){this.ue=()=>{var n,r,s,i;this.he||(this.he={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.he.lastScrollY=Math.ceil(a),this.he.maxScrollY=Math.max(a,(n=this.he.maxScrollY)!==null&&n!==void 0?n:0),this.he.maxScrollHeight=Math.max(l,(r=this.he.maxScrollHeight)!==null&&r!==void 0?r:0),this.he.lastContentY=u,this.he.maxContentY=Math.max(u,(s=this.he.maxContentY)!==null&&s!==void 0?s:0),this.he.maxContentHeight=Math.max(c,(i=this.he.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}getContext(){return this.he}resetContext(){var t=this.he;return setTimeout(this.ue,0),t}startMeasuringScrollPosition(){We(k,"scroll",this.ue,{capture:!0}),We(k,"scrollend",this.ue,{capture:!0}),We(k,"resize",this.ue)}scrollElement(){if(!this._instance.config.scroll_root_selector)return k==null?void 0:k.document.documentElement;var t=ve(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of t){var r=k==null?void 0:k.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return k&&(k.scrollY||k.pageYOffset||k.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return k&&(k.scrollX||k.pageXOffset||k.document.documentElement.scrollLeft)||0}}var cx=e=>Mg(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class ed{constructor(t,n,r,s){this.de=i=>{var o=this.ve();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.ce(this._instance)};this.fe.register({[xl]:a})}},this._instance=t,this.pe=n,this.fe=r,this.ce=s||cx,this.pe.onSessionId(this.de)}ve(){return this.fe.props[xl]}getSetOnceProps(){var t,n=(t=this.ve())==null?void 0:t.props;return n?"r"in n?Fg(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return Ce(Sc(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+gl(r)]=n}),t}}var Ia=Ue("[SessionId]");class td{on(t,n){return this._e.on(t,n)}constructor(t,n,r){var s;if(this.ge=[],this.me=void 0,this._e=new Oc,this.be=(c,f)=>!(!xr(c)||!xr(f))&&Math.abs(c-f)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.N=t.config,this.fe=t.persistence,this.ye=void 0,this.we=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.xe=n||Hn,this.$e=r||Hn;var i=this.N.persistence_name||this.N.token,o=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*an(o,60,36e3,Ia.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ee(),this.Se="ph_"+i+"_window_id",this.ke="ph_"+i+"_primary_window_exists",this.Pe()){var a=it.D(this.Se),l=it.D(this.ke);a&&!l?this.ye=a:it.L(this.Se),it.j(this.ke,!0)}if((s=this.N.bootstrap)!=null&&s.sessionID)try{var u=(c=>{var f=c.replace(/-/g,"");if(f.length!==32)throw new Error("Not a valid UUID");if(f[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(f.substring(0,12),16)})(this.N.bootstrap.sessionID);this.Te(this.N.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Ia.error("Invalid sessionID in bootstrap",c)}this.Ce()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return B(this.ge)&&(this.ge=[]),this.ge.push(t),this.we&&t(this.we,this.ye),()=>{this.ge=this.ge.filter(n=>n!==t)}}Pe(){return this.N.persistence!=="memory"&&!this.fe.zt&&it.O()}Ie(t){t!==this.ye&&(this.ye=t,this.Pe()&&it.j(this.Se,t))}Re(){return this.ye?this.ye:this.Pe()?it.D(this.Se):null}Te(t,n,r){t===this.we&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.we=t,this.fe.register({[vo]:[n,t,r]}))}Fe(){var t=this.fe.props[vo];return ve(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Te(null,null,null)}destroy(){clearTimeout(this.Oe),this.Oe=void 0,this.me&&k&&(k.removeEventListener("beforeunload",this.me,{capture:!1}),this.me=void 0),this.ge=[]}Ce(){this.me=()=>{this.Pe()&&it.L(this.ke)},We(k,"beforeunload",this.me,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.N.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[s,i,o]=this.Fe(),a=this.Re(),l=xr(o)&&Math.abs(r-o)>864e5,u=!1,c=!i,f=!c&&!t&&this.be(r,s);c||f||l?(i=this.xe(),a=this.$e(),Ia.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}}),o=r,u=!0):a||(a=this.$e(),u=!0);var d=xr(s)&&t&&!l?s:r,h=xr(o)?o:new Date().getTime();return this.Ie(a),this.Te(i,d,h),t||this.Ee(),u&&this.ge.forEach(p=>p(i,a,u?{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:s}}Ee(){clearTimeout(this.Oe),this.Oe=setTimeout(()=>{var[t]=this.Fe();if(this.be(new Date().getTime(),t)){var n=this.we;this.resetSessionId(),this._e.emit("forcedIdleReset",{idleSessionId:n})}},1.1*this.sessionTimeoutMs)}}var jg=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&bf(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>bf(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},Rs=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),nd="i.posthog.com";class ux{constructor(t){this.Me={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+nd,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Me[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=Rs.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=Rs.EU:this.Me[this.apiHost]=Rs.CUSTOM),this.Me[this.apiHost]}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(this.region===Rs.CUSTOM)return this.apiHost+n;var r=nd+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var fx={icontains:(e,t)=>!!k&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!k&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!k&&Ao(t.href,e),not_regex:(e,t)=>!!k&&!Ao(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class ut{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{ut.Ae("retrieved web experiments from the server"),n.De=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;n.De&&(ut.Ae("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=n.De)==null||o.set(i.feature_flag_key,i));var a=n._instance.getFeatureFlag(i.feature_flag_key);qe(a)&&i.variants[a]&&n.je(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var u=i.variants[l];ut.Le(u)&&n.je(i.name,l,u.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(t){if(this._is_bot())ut.Ae("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(he(this.De))return this.De=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ut.Ae("applying feature flags",t),t.forEach(n=>{var r;if(this.De&&(r=this.De)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),o=(s=this.De)==null?void 0:s.get(n);i&&o!=null&&o.variants[i]&&this.je(o.name,i,o.variants[i].transforms)}})}}previewWebExperiment(){var t=ut.getWindowLocation();if(t!=null&&t.search){var n=ko(t==null?void 0:t.search,"__experiment_id"),r=ko(t==null?void 0:t.search,"__experiment_variant");n&&r&&(ut.Ae("previewing web experiments "+n+" && "+r),this.getWebExperiments(s=>{this.Ne(parseInt(n),r,s)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this._instance.config.disable_web_experiments&&!r)return t([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return t(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:i=>{if(i.statusCode!==200||!i.json)return t([]);var o=i.json.experiments||[];return t(o)}})}Ne(t,n,r){var s=r.filter(i=>i.id===t);s&&s.length>0&&(ut.Ae("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.je(s[0].name,n,s[0].variants[n].transforms))}static Le(t){return!he(t.conditions)&&ut.Ue(t)&&ut.ze(t)}static Ue(t){var n;if(he(t.conditions)||he((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,o=ut.getWindowLocation();return!!o&&((r=t.conditions)==null||!r.url||fx[(s=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](t.conditions.url,o))}static getWindowLocation(){return k==null?void 0:k.location}static ze(t){var n;if(he(t.conditions)||he((n=t.conditions)==null?void 0:n.utm))return!0;var r=Pg();if(r.utm_source){var s,i,o,a,l,u,c,f,d=(s=t.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,h=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=t.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,p=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=t.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,g=(c=t.conditions)==null||(c=c.utm)==null||!c.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==r.utm_term;return d&&p&&g&&h}return!1}static Ae(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];V.info("[WebExperiments] "+t,r)}je(t,n,r){this._is_bot()?ut.Ae("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(s=>{if(s.selector){var i;ut.Ae("applying transform of variant "+n+" for experiment "+t+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o==null||o.forEach(a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)})}}):ut.Ae("Control variants leave the page unmodified.")}_is_bot(){return It&&this._instance?jg(It,this._instance.config.custom_blocked_useragents):void 0}}var dx=Ue("[PostHog ExternalIntegrations]"),hx={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class px{constructor(t){this._instance=t}V(t,n){var r;(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,s=>{if(s)return dx.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,u;!s||(a=Q.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.V(hx[o],()=>{var c;(c=Q.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.start(t._instance)}),!s&&(l=Q.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((u=Q.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var Hs={},Pa=0,Ml=()=>{},Ar="posthog",Bg=!IO&&(kt==null?void 0:kt.indexOf("MSIE"))===-1&&(kt==null?void 0:kt.indexOf("Mozilla"))===-1,rd=e=>{var t;return U({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:oO(j==null?void 0:j.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Ml,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,debug:ot&&qe(ot==null?void 0:ot.search)&&ot.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(k==null||(t=k.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;V.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:Dl},error_tracking:{},_onCapture:Ml,__preview_eager_load_replay:!1},(n=>({rageclick:!(n&&n>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(n&&n>="2025-05-24")||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},sd=e=>{var t={};B(e.process_person)||(t.person_profiles=e.process_person),B(e.xhr_headers)||(t.request_headers=e.xhr_headers),B(e.cookie_name)||(t.persistence_name=e.cookie_name),B(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),B(e.store_google)||(t.save_campaign_params=e.store_google),B(e.verbose)||(t.debug=e.verbose);var n=Ze({},t,e);return ve(e.property_blacklist)&&(B(e.property_denylist)?n.property_denylist=e.property_blacklist:ve(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:V.error("Invalid value for property_denylist config: "+e.property_denylist)),n};class gx{constructor(){this.__forceAllowLocalhost=!1}get He(){return this.__forceAllowLocalhost}set He(t){V.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Tn{get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new gx,this.Be=!1,this.version=pn.LIB_VERSION,this.Ft=new Oc,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=rd(),this.SentryIntegration=yO,this.sentryIntegration=t=>function(n,r){var s=kg(n,r);return{name:Sg,processEvent:i=>s(i)}}(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.qe=!1,this.We=null,this.Ge=null,this.Ve=null,this.featureFlags=new GO(this),this.toolbar=new EO(this),this.scrollManager=new lx(this),this.pageViewManager=new Uf(this),this.surveys=new ex(this),this.conversations=new tx(this),this.logs=new rx(this),this.experiments=new ut(this),this.exceptions=new PO(this),this.rateLimiter=new sx(this),this.requestRouter=new ux(this),this.consent=new gO(this),this.externalIntegrations=new px(this),this.people={set:(t,n,r)=>{var s=qe(t)?{[t]:n}:t;this.setPersonProperties(s),r==null||r({})},set_once:(t,n,r)=>{var s=qe(t)?{[t]:n}:t;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",t=>V.info('send "'+(t==null?void 0:t.event)+'"',t))}init(t,n,r){if(r&&r!==Ar){var s,i=(s=Hs[r])!==null&&s!==void 0?s:new Tn;return i._init(t,n,r),Hs[r]=i,Hs[Ar][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s;if(n===void 0&&(n={}),B(t)||_l(t))return V.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={},n.debug=this.Je(n.debug),this.Ke=n,this.Ye=[],n.person_profiles?this.Ge=n.person_profiles:n.process_person&&(this.Ge=n.process_person),this.set_config(Ze({},rd(n.defaults),sd(n),{name:r,token:t})),this.config.on_xhr_error&&V.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:En.GZipJS;var i=this.Xe();this.persistence=new Aa(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Aa(U({},this.config,{persistence:"sessionStorage"}),i);var o=U({},this.persistence.props),a=U({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Qe=new ix(b=>this.Ze(b),this.config.request_queue_config),this.tr=new ax(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new td(this),this.sessionPropsManager=new ed(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(V.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.ir(l)},0)):(V.info("Initializing extensions synchronously"),this.ir(l)),pn.DEBUG=pn.DEBUG||this.config.debug,pn.DEBUG&&V.info("Starting in debug mode",{this:this,config:n,thisC:U({},this.config),p:o,s:a}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var u,c,f=this.config.get_device_id(Hn()),d=(u=n.bootstrap)!=null&&u.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(rn,(c=n.bootstrap)!=null&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:d})}if(this.er()){var h,p,g=Object.keys(((h=n.bootstrap)==null?void 0:h.featureFlags)||{}).filter(b=>{var S;return!((S=n.bootstrap)==null||(S=S.featureFlags)==null||!S[b])}).reduce((b,S)=>{var E;return b[S]=((E=n.bootstrap)==null||(E=E.featureFlags)==null?void 0:E[S])||!1,b},{}),y=Object.keys(((p=n.bootstrap)==null?void 0:p.featureFlagPayloads)||{}).filter(b=>g[b]).reduce((b,S)=>{var E,m;return(E=n.bootstrap)!=null&&(E=E.featureFlagPayloads)!=null&&E[S]&&(b[S]=(m=n.bootstrap)==null||(m=m.featureFlagPayloads)==null?void 0:m[S]),b},{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:y})}if(l)this.register_once({distinct_id:ds,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(Hn());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(rn,"anonymous")}return We(k,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?mO(this,()=>this.rr()):this.rr(),Sn(this.config._onCapture)&&this.config._onCapture!==Ml&&(V.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&V.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}ir(t){var n=performance.now(),r=U({},Tn.__defaultExtensionClasses,this.config.__extensionClasses);r.historyAutocapture&&(this.historyAutocapture=new r.historyAutocapture(this),this.historyAutocapture.startIfEnabled());var s=[];r.tracingHeaders&&s.push(()=>{new r.tracingHeaders(this).startIfEnabledOrStop()}),r.siteApps&&s.push(()=>{var i;this.siteApps=new r.siteApps(this),(i=this.siteApps)==null||i.init()}),!t&&r.sessionRecording&&s.push(()=>{this.sessionRecording=new r.sessionRecording(this),this.sessionRecording.startIfEnabledOrStop()}),this.config.disable_scroll_properties||s.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),r.autocapture&&s.push(()=>{this.autocapture=new r.autocapture(this),this.autocapture.startIfEnabled()}),s.push(()=>{this.surveys.loadIfEnabled()}),s.push(()=>{this.logs.loadIfEnabled()}),s.push(()=>{this.conversations.loadIfEnabled()}),r.productTours&&s.push(()=>{this.productTours=new r.productTours(this),this.productTours.loadIfEnabled()}),r.heatmaps&&s.push(()=>{this.heatmaps=new r.heatmaps(this),this.heatmaps.startIfEnabled()}),r.webVitalsAutocapture&&s.push(()=>{this.webVitalsAutocapture=new r.webVitalsAutocapture(this)}),r.exceptionObserver&&s.push(()=>{this.exceptionObserver=new r.exceptionObserver(this),this.exceptionObserver.startIfEnabledOrStop()}),r.deadClicksAutocapture&&s.push(()=>{this.deadClicksAutocapture=new r.deadClicksAutocapture(this,vO),this.deadClicksAutocapture.startIfEnabledOrStop()}),s.push(()=>{if(this.sr){var i=this.sr;this.sr=void 0,this.Bi(i)}}),this.nr(s,n)}nr(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout(()=>{this.nr(t,n)},0);var r=t.shift();if(r)try{r()}catch(i){V.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&V.info("PostHog extensions initialized ("+s+"ms)")}Bi(t){var n,r,s,i,o,a,l,u,c;if(!j||!j.body)return V.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Bi(t)},500);this.config.__preview_deferred_init_extensions&&(this.sr=t),this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=fe(t.supportedCompression,En.GZipJS)?En.GZipJS:fe(t.supportedCompression,En.Base64)?En.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Ge?this.Ge:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(t),(s=this.sessionRecording)==null||s.onRemoteConfig(t),(i=this.autocapture)==null||i.onRemoteConfig(t),(o=this.heatmaps)==null||o.onRemoteConfig(t),this.surveys.onRemoteConfig(t),this.logs.onRemoteConfig(t),this.conversations.onRemoteConfig(t),(a=this.productTours)==null||a.onRemoteConfig(t),(l=this.webVitalsAutocapture)==null||l.onRemoteConfig(t),(u=this.exceptionObserver)==null||u.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(t)}rr(){try{this.config.loaded(this)}catch(r){V.critical("`loaded` function failed",r)}if(this.ar(),this.config.internal_or_test_user_hostname&&ot!=null&&ot.hostname){var t=ot.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.lr()},1),this.ur=new Ug(this),this.ur.load()}ar(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Qe)==null||t.enable())}_dom_loaded(){this.is_capturing()&&Wn(this.__request_queue,t=>this.Ze(t)),this.__request_queue=[],this.ar()}_handle_unload(){var t,n;this.surveys.handlePageUnload(),this.config.request_batching?(this.hr()&&this.capture("$pageleave"),(t=this.Qe)==null||t.unload(),(n=this.tr)==null||n.unload()):this.hr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(Bg?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=xo(t.url,{ip:this.config.ip?1:0}),t.headers=U({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,s,i,o=U({},n);o.timeout=o.timeout||6e4,o.url=xo(o.url,{_:new Date().getTime().toString(),ver:pn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=Ki.filter(c=>!o.disableTransport||!c.transport||!o.disableTransport.includes(c.transport)),u=(s=(i=_g(l,c=>c.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!u)throw new Error("No available transport method");u(o)})(U({},t,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(s=this.config).on_request_error)==null||r.call(s,n)),t.callback==null||t.callback(n)}}))))}Ze(t){this.tr?this.tr.retriableRequest(t):this._send_request(t)}_execute_array(t){Pa++;try{var n,r=[],s=[],i=[];Wn(t,a=>{a&&(n=a[0],ve(n)?i.push(a):Sn(a)?a.call(this):ve(a)&&n==="alias"?r.push(a):ve(a)&&n.indexOf("capture")!==-1&&Sn(this[n])?i.push(a):s.push(a))});var o=function(a,l){Wn(a,function(u){if(ve(u[0])){var c=l;Ce(u,function(f){c=c[f[0]].apply(c,f.slice(1))})}else this[u[0]].apply(this,u.slice(1))},l)};o(r,this),o(s,this),o(i,this)}finally{Pa--}}er(){var t,n;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(t){if(Pa>0&&ve(t)&&qe(t[0])){var n=Tn.prototype[t[0]];Sn(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Qe){if(this.is_capturing())if(!B(t)&&qe(t)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){n!=null&&n.$current_url&&!qe(n==null?void 0:n.$current_url)&&(V.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.ft||V.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 a=new Date,l=(r==null?void 0:r.timestamp)||a,u=Hn(),c={uuid:u,event:t,properties:this.calculateEventProperties(t,n||{},l,u)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),o&&(c.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),r!=null&&r.$set&&(c.$set=r==null?void 0:r.$set);var f,d=t!=="$groupidentify",h=this.dr(r==null?void 0:r.$set_once,d);if(h&&(c.$set_once=h),(c=sO(c,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,B(r==null?void 0:r.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=a),t===Cs.DISMISSED||t===Cs.SENT){var p=n==null?void 0:n[Ra.SURVEY_ID],g=n==null?void 0:n[Ra.SURVEY_ITERATION];f={id:p,current_iteration:g},localStorage.getItem(Yf(f))||localStorage.setItem(Yf(f),"true"),c.$set=U({},c.$set,{[qO({id:p,current_iteration:g},t===Cs.SENT?"responded":"dismissed")]:!0})}else t===Cs.SHOWN&&(c.$set=U({},c.$set,{[Ra.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===nx.SHOWN){var y=n==null?void 0:n[Xf.TOUR_TYPE];y&&(c.$set=U({},c.$set,{[Xf.TOUR_LAST_SEEN_DATE+"/"+y]:new Date().toISOString()}))}var T=U({},c.properties.$set,c.$set);if(Ir(T)||this.setPersonPropertiesForFlags(T),!he(this.config.before_send)){var b=this.vr(c);if(!b)return;c=b}this.Ft.emit("eventCaptured",c);var S={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Ze(S):this.Qe.enqueue(S),c}V.critical("This capture call is ignored due to client rate limiting.")}}else V.error("No event name provided to posthog.capture")}else V.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",n=>t(n.event,n))}calculateEventProperties(t,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=i?void 0:this.persistence.remove_event_timer(t),a=U({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),t==="$snapshot"){var l=U({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!qe(a.distinct_id)&&!Pn(a.distinct_id)||_l(a.distinct_id))&&V.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=MO(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime());a.$session_id=f,a.$window_id=d}this.sessionPropsManager&&Ze(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Ze(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.tr)==null?void 0:h.length}catch(T){a.$sdk_debug_error_capturing_properties=String(T)}if(this.requestRouter.region===Rs.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),u=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=Ze(a,u),t==="$pageview"&&j&&(a.title=j.title),!B(o)){var p=r.getTime()-o;a.$duration=parseFloat((p/1e3).toFixed(3))}kt&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Ze({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ve(this.config.property_denylist)?Ce(this.config.property_denylist,function(T){delete a[T]}):V.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(V.error("sanitize_properties is deprecated. Use before_send instead"),a=g(a,t));var y=this.cr();return a.$process_person_profile=y,y&&!i&&this.pr("_calculate_event_properties"),a}dr(t,n){var r;if(n===void 0&&(n=!0),!this.persistence||!this.cr()||this.Be)return t;var s=this.persistence.get_initial_props(),i=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),o=Ze({},s,i||{},t||{}),a=this.config.sanitize_properties;return a&&(V.error("sanitize_properties is deprecated. Use before_send instead"),o=a(o,"$set_once")),n&&(this.Be=!0),Ir(o)?void 0:o}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var s;(s=this.persistence)==null||s.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}_r(t,n){this.register({[t]:n})}getFeatureFlag(t,n){return this.featureFlags.getFeatureFlag(t,n)}getFeatureFlagPayload(t){return this.featureFlags.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){return this.featureFlags.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){return this.featureFlags.isFeatureEnabled(t,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateFlags(t,n,r){var s=r!=null&&r.merge?this.featureFlags.getFlagVariants():{},i=r!=null&&r.merge?this.featureFlags.getFlagPayloads():{},o=U({},s,t),a=U({},i,n),l={};for(var[u,c]of Object.entries(o)){var f=typeof c=="string";l[u]={key:u,enabled:!!f||!!c,variant:f?c:void 0,reason:void 0,metadata:B(a==null?void 0:a[u])?void 0:{id:0,version:void 0,description:void 0,payload:a[u]}}}this.featureFlags.receivedFeatureFlags({flags:l})}updateEarlyAccessFeatureEnrollment(t,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Ft.on(t,n)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys.getSurveys(t,n)}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(t,n)}renderSurvey(t,n){this.surveys.renderSurvey(t,n)}displaySurvey(t,n){n===void 0&&(n=JO),this.surveys.displaySurvey(t,n)}cancelPendingSurvey(t){this.surveys.cancelPendingSurvey(t)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(t,n)}identify(t,n,r){if(!this.__loaded||!this.persistence)return V.uninitializedWarning("posthog.identify");if(Pn(t)&&(t=t.toString(),V.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))V.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==ds){if(this.pr("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var i=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}t!==s&&t!==this.get_property(ks)&&(this.unregister(ks),this.register({distinct_id:t}));var o=(this.persistence.get_property(rn)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(rn,"identified"),this.setPersonPropertiesForFlags(U({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.Ve=Gf(t,n,r),this.featureFlags.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(mo))}}else V.critical('The string "'+ds+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else V.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.pr("posthog.setPersonProperties")){var r=Gf(this.get_distinct_id(),t,n);this.Ve!==r?(this.setPersonPropertiesForFlags(U({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ve=r):V.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var s=this.getGroups();s[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:U({},s,{[t]:n})}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[t]:r})),s[t]===n||r||this.reloadFeatureFlags()}else V.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0),this.pr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,n)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var n,r,s,i,o;if(V.info("reset"),!this.__loaded)return V.uninitializedWarning("posthog.reset");var a=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),(s=this.ur)==null||s.stop(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(rn,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ve=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:ds,$device_id:null},"");else{var l=this.config.get_device_id(Hn());this.register_once({distinct_id:l,$device_id:t?l:a},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var i,o=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return s}alias(t,n){return t===this.get_property(mg)?(V.critical("Attempting to create alias for existing People user - aborting."),-2):this.pr("posthog.alias")?(B(n)&&(n=this.get_distinct_id()),t!==n?(this._r(ks,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(V.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=U({},this.config);if(et(t)){var r,s,i,o,a,l,u,c;Ze(this.config,sd(t));var f=this.Xe();(r=this.persistence)==null||r.update_config(this.config,n,f),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Aa(U({},this.config,{persistence:"sessionStorage"}),f);var d=this.Je(this.config.debug);An(d)&&(this.config.debug=d),An(this.config.debug)&&(this.config.debug?(pn.DEBUG=!0,De.O()&&De.j("ph_debug","true"),V.info("set_config",{config:t,oldConfig:n,newConfig:U({},this.config)})):(pn.DEBUG=!1,De.O()&&De.L("ph_debug"))),(s=this.exceptionObserver)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(a=this.heatmaps)==null||a.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(u=this.deadClicksAutocapture)==null||u.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.gr(),(c=this.externalIntegrations)==null||c.startIfEnabledOrStop()}}startSessionRecording(t){var n=t===!0,r={sampling:n||!(t==null||!t.sampling),linked_flag:n||!(t==null||!t.linked_flag),url_trigger:n||!(t==null||!t.url_trigger),event_trigger:n||!(t==null||!t.event_trigger)};if(Object.values(r).some(Boolean)){var s,i,o,a,l;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),r.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(U({},s,n))}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:Ar;return n!==Ar&&(n=Ar+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(rn))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(rn))==="identified"}cr(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Ir(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ks])&&((n=this.persistence)==null||(n=n.props)==null||!n[wo]))}hr(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.cr()||this.pr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.pr("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}pr(t){return this.config.person_profiles==="never"?(V.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._r(wo,!0),!0)}Xe(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||t&&!!n}gr(){var t,n,r,s,i=this.Xe();return((t=this.persistence)==null?void 0:t.zt)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n.zt)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(t){var n;if(this.config.cookieless_mode!=="always"){if(this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()){var r,s,i,o,a;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=new td(this),this.pageViewManager=new Uf(this),this.persistence&&(this.sessionPropsManager=new ed(this,this.sessionManager,this.persistence));var l=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=Tn.__defaultExtensionClasses)==null?void 0:a.sessionRecording;l&&(this.sessionRecording=new l(this),this.sessionRecording.startIfEnabledOrStop())}var u;this.consent.optInOut(!0),this.gr(),this.ar(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(B(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((u=t==null?void 0:t.captureEventName)!==null&&u!==void 0?u:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.lr()}else V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.gr(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:ds,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.lr())):V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===_n.GRANTED?"granted":t===_n.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.gr()}_is_bot(){return It?jg(It,this.config.custom_blocked_useragents):void 0}lr(){j&&(j.visibilityState==="visible"?this.qe||(this.qe=!0,this.capture("$pageview",{title:j.title},{send_instantly:!0}),this.We&&(j.removeEventListener("visibilitychange",this.We),this.We=null)):this.We||(this.We=this.lr.bind(this),We(j,"visibilitychange",this.We)))}debug(t){t===!1?(k==null||k.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(k==null||k.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}))}At(){var t,n,r,s,i,o,a,l=this.Ke||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(V.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):(r="advanced_disable_decide",s=!1,i=V,o=(n="advanced_disable_flags")in(t=l)&&!he(t[n]),a=r in t&&!he(t[r]),o?t[n]:a?(i&&i.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]):s)}vr(t){if(he(this.config.before_send))return t;var n=ve(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var s of n){if(r=s(r),he(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return wT(t.event)?V.warn(i+". This can cause unexpected behavior."):V.info(i),null}r.properties&&!Ir(r.properties)||V.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.it)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Je(t){var n=An(t)&&!t,r=De.O()&&De.A("ph_debug")==="true";return!n&&(!!r||t)}}Tn.__defaultExtensionClasses={},function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=rO(e.prototype[t[n]])}(Tn,["identify"]);function id(e){return e instanceof Element&&(e.id===wg||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Qo(e){return!!e&&e.nodeType===1}function qn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Vg(e){return!!e&&e.nodeType===3}function Zg(e){return!!e&&e.nodeType===11}function xc(e){return e?Yo(e).split(/\s+/):[]}function od(e){var t=k==null?void 0:k.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function Co(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 xc(t)}function Hg(e){return he(e)?null:Yo(e).split(/(\s+)/).filter(t=>ai(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function mi(e){var t="";return Fl(e)&&!Kg(e)&&e.childNodes&&e.childNodes.length&&Ce(e.childNodes,function(n){var r;Vg(n)&&n.textContent&&(t+=(r=Hg(n.textContent))!==null&&r!==void 0?r:"")}),Yo(t)}function ad(e){return B(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Ac=["a","button","form","input","select","textarea","label"];function Gg(e,t){if(B(t))return!0;var n,r=function(i){if(t.some(o=>i.matches(o)))return{v:!0}};for(var s of e)if(n=r(s))return n.v;return!1}function Wg(e){var t=e.parentNode;return!(!t||!Qo(t))&&t}var _x=["next","previous","prev",">","<"],ld=10,cd=[".ph-no-rageclick",".ph-no-capture"];function vx(e,t){if(!k||Cc(e))return!1;var n,r,s;if(An(t)?(n=!!t&&cd,r=void 0):(n=(s=t==null?void 0:t.css_selector_ignorelist)!==null&&s!==void 0?s:cd,r=t==null?void 0:t.content_ignorelist),n===!1)return!1;var{targetElementList:i}=qg(e,!1);return!function(o,a){if(o===!1||B(o))return!1;var l;if(o===!0)l=_x;else{if(!ve(o))return!1;if(o.length>ld)return V.error("[PostHog] content_ignorelist array cannot exceed "+ld+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map(u=>u.toLowerCase())}return a.some(u=>{var{safeText:c,ariaLabel:f}=u;return l.some(d=>c.includes(d)||f.includes(d))})}(r,i.map(o=>{var a;return{safeText:mi(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}}))&&!Gg(i,n)}var Cc=e=>!e||qn(e,"html")||!Qo(e),qg=(e,t)=>{if(!k||Cc(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],s=e;s.parentNode&&!qn(s,"body");)if(Zg(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=Wg(s);if(!i)break;if(t||Ac.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{var o=k.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function mx(e,t,n,r,s){var i,o,a,l;if(n===void 0&&(n=void 0),!k||Cc(e)||(i=n)!=null&&i.url_allowlist&&!od(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&od(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var u=n.dom_event_allowlist;if(u&&!u.some(p=>t.type===p))return!1}var{parentIsUsefulElement:c,targetElementList:f}=qg(e,r);if(!function(p,g){var y=g==null?void 0:g.element_allowlist;if(B(y))return!0;var T,b=function(E){if(y.some(m=>E.tagName.toLowerCase()===m))return{v:!0}};for(var S of p)if(T=b(S))return T.v;return!1}(f,n)||!Gg(f,(l=n)==null?void 0:l.css_selector_allowlist))return!1;var d=k.getComputedStyle(e);if(d&&d.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return c?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(Ac.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function Fl(e){for(var t=e;t.parentNode&&!qn(t,"body");t=t.parentNode){var n=Co(t);if(fe(n,"ph-sensitive")||fe(n,"ph-no-capture"))return!1}if(fe(Co(e),"ph-include"))return!0;var r=e.type||"";if(qe(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(qe(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function Kg(e){return!!(qn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||qn(e,"select")||qn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var Jg="(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})",yx=new RegExp("^(?:"+Jg+")$"),bx=new RegExp(Jg),Yg="\\d{3}-?\\d{2}-?\\d{4}",wx=new RegExp("^("+Yg+")$"),Ex=new RegExp("("+Yg+")");function ai(e,t){return t===void 0&&(t=!0),!(he(e)||qe(e)&&(e=Yo(e),(t?yx:bx).test((e||"").replace(/[- ]/g,""))||(t?wx:Ex).test(e)))}function Xg(e){var t=mi(e);return ai(t=(t+" "+Qg(e)).trim())?t:""}function Qg(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ce(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=mi(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+Qg(n)).trim())}catch(i){V.error("[AutoCapture]",i)}}),t}function Sx(e){return function(t){var n=t.map(r=>{var s,i,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=U({},r.text?{text:r.text}:{},{"nth-child":(s=r.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=r.nth_of_type)!==null&&i!==void 0?i:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return qi(l).sort((c,f)=>{var[d]=c,[h]=f;return d.localeCompare(h)}).forEach(c=>{var[f,d]=c;return u[ud(f.toString())]=ud(d.toString())}),o+=":",o+=qi(u).map(c=>{var[f,d]=c;return f+'="'+d+'"'}).join("")});return n.join(";")}(function(t){return t.map(n=>{var r,s,i={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(s=n.attr__href)==null?void 0:s.slice(0,2048),attr_class:kx(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return qi(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return i.attributes[a]=l}),i})}(e))}function ud(e){return e.replace(/"|\\"/g,'\\"')}function kx(e){var t=e.attr__class;return t?ve(t)?t:xc(t):void 0}class fd{constructor(t){this.disabled=t===!1;var n=et(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(n-s.y)<this.thresholdPx&&r-s.timestamp<this.timeoutMs){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var Na="$copy_autocapture",dd=Ue("[AutoCapture]");function $a(e,t){return t.length>e?t.slice(0,e)+"...":t}function Tx(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Qo(t));return t}function Ox(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};Ac.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=$a(1024,Xg(e)):i.$el_text=$a(1024,mi(e)));var o=Co(e);o.length>0&&(i.classes=o.filter(function(c){return c!==""})),Ce(e.attributes,function(c){var f;if((!Kg(e)||["name","id","class","aria-label"].indexOf(c.name)!==-1)&&(r==null||!r.includes(c.name))&&!t&&ai(c.value)&&(f=c.name,!qe(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")){var d=c.value;c.name==="class"&&(d=xc(d).join(" ")),i["attr__"+c.name]=$a(1024,d)}});for(var a=1,l=1,u=e;u=Tx(u);)a++,u.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function xx(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,u=[e],c=e;c.parentNode&&!qn(c,"body");)Zg(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var f,d=[],h={},p=!1,g=!1;if(Ce(u,E=>{var m=Fl(E);E.tagName.toLowerCase()==="a"&&(p=E.getAttribute("href"),p=m&&p&&ai(p)&&p),fe(Co(E),"ph-no-capture")&&(g=!0),d.push(Ox(E,i,o,a));var N=function(M){if(!Fl(M))return{};var R={};return Ce(M.attributes,function(I){if(I.name&&I.name.indexOf("data-ph-capture-attribute")===0){var F=I.name.replace("data-ph-capture-attribute-",""),J=I.value;F&&J&&ai(J)&&(R[F]=J)}}),R}(E);Ze(h,N)}),g)return{props:{},explicitNoCapture:g};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?d[0].$el_text=Xg(e):d[0].$el_text=mi(e)),p){var y,T;d[0].attr__href=p;var b=(y=So(p))==null?void 0:y.host,S=k==null||(T=k.location)==null?void 0:T.host;b&&S&&b!==S&&(f=p)}return{props:Ze({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:Sx(d)},(n=d[0])!=null&&n.$el_text?{$el_text:(r=d[0])==null?void 0:r.$el_text}:{},f&&s.type==="click"?{$external_click_url:f}:{},h)}}var bs=Ue("[ExceptionAutocapture]");function hd(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return Sn(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var Ax=Ue("[TracingHeaders]"),Mn=Ue("[Web Vitals]"),pd=9e5;Ue("[SessionRecording]");var Ll="[SessionRecording]",Sr=Ue(Ll),Cx=Ue("[Heatmaps]");function gd(e){return et(e)&&"clientX"in e&&"clientY"in e&&Pn(e.clientX)&&Pn(e.clientY)}var _d=Ue("[Product Tours]"),Da="ph_product_tours",Rx=["$set_once","$set"],Fn=Ue("[SiteApps]"),Ix={sessionRecording:class{get started(){var e;return!((e=this.mr)==null||!e.isStarted)}get status(){return this.mr?this.mr.status:this.br?this.yr?"lazy_loading":"disabled":"pending_config"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.br=!1,this.wr=!1,this.$r=void 0,this._instance=e,!this._instance.sessionManager)throw Sr.error("started without valid sessionManager"),new Error(Ll+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Ll+' cannot be used with cookieless_mode="always"')}get yr(){var e,t=!((e=this._instance.get_property(Ni))==null||!e.enabled),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return k&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(this.br&&(!this.yr||(t=this.mr)==null||!t.isStarted)){var n=!B(Object.assign)&&!B(Array.from);this.yr&&n?(this.Er(e),Sr.info("starting")):this.stopRecording()}}Er(e){var t,n,r;this.yr&&(Q!=null&&(t=Q.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=Q.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Sr(e):(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.kr,s=>{if(s)return Sr.error("could not load recorder",s);this.Sr(e)}))}stopRecording(){var e,t;(e=this.$r)==null||e.call(this),this.$r=void 0,(t=this.mr)==null||t.stop()}Pr(){var e;(e=this._instance.persistence)==null||e.unregister(bg)}Tr(e){if(this._instance.persistence){var t,n,r=this._instance.persistence,s=()=>{var i=e.sessionRecording===!1?void 0:e.sessionRecording,o=i==null?void 0:i.sampleRate,a=he(o)?null:parseFloat(o);he(a)&&this.Pr();var l=i==null?void 0:i.minimumDurationMilliseconds;r.register({[Ni]:U({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:U({capturePerformance:e.capturePerformance},i==null?void 0:i.networkPayloadCapture),canvasRecording:{enabled:i==null?void 0:i.recordCanvas,fps:i==null?void 0:i.canvasFps,quality:i==null?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:B(l)?null:l,endpoint:i==null?void 0:i.endpoint,triggerMatchType:i==null?void 0:i.triggerMatchType,masking:i==null?void 0:i.masking,urlTriggers:i==null?void 0:i.urlTriggers})})};s(),(t=this.$r)==null||t.call(this),this.$r=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?e.sessionRecording!==!1?(this.wr=!1,this.Tr(e),this.br=!0,this.startIfEnabledOrStop()):this.br=!0:Sr.info("skipping remote config with no sessionRecording",e)}log(e,t){var n;t===void 0&&(t="log"),(n=this.mr)!=null&&n.log?this.mr.log(e,t):Sr.warn("log called before recorder was ready")}get kr(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Ni);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Cr(){var e,t=this._instance.get_property(Ni);if(!t)return!1;var n=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return Date.now()-n<=3e5}Sr(e){var t,n;if((t=Q.__PosthogExtensions__)==null||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.mr||(this.mr=(n=Q.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.mr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Cr()?this.mr.start(e):this.wr||(this.wr=!0,Sr.info("persisted remote config is stale, requesting fresh config before starting"),new Ug(this._instance).load())}onRRwebEmit(e){var t;(t=this.mr)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.mr||(t=this._instance.persistence)==null||t.register({$replay_override_linked_flag:!0}),(e=this.mr)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.mr||(t=this._instance.persistence)==null||t.register({$replay_override_sampling:!0}),(e=this.mr)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.mr||(n=this._instance.persistence)==null||n.register({[e==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(t=this.mr)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.mr)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.mr)==null||!n.tryAddCustomEvent(e,t))}}},Px={autocapture:class{constructor(e){this.Ir=!1,this.Rr=null,this.Fr=!1,this.instance=e,this.rageclicks=new fd(e.config.rageclick),this.Or=null}get N(){var e,t,n=et(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map(r=>new RegExp(r)),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map(r=>new RegExp(r)),n}Mr(){if(this.isBrowserSupported()){if(k&&j){var e=n=>{n=n||(k==null?void 0:k.event);try{this.Ar(n)}catch(r){dd.error("Failed to capture event",r)}};if(We(j,"submit",e,{capture:!0}),We(j,"change",e,{capture:!0}),We(j,"click",e,{capture:!0}),this.N.capture_copied_text){var t=n=>{n=n||(k==null?void 0:k.event),this.Ar(n,Na)};We(j,"copy",t,{capture:!0}),We(j,"cut",t,{capture:!0})}}}else dd.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ir&&(this.Mr(),this.Ir=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Fr=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Cf]:!!e.autocapture_opt_out}),this.Rr=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Or=e}getElementSelectors(e){var t,n=[];return(t=this.Or)==null||t.forEach(r=>{var s=j==null?void 0:j.querySelectorAll(r);s==null||s.forEach(i=>{e===i&&n.push(r)})}),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[Cf],r=this.Rr;if(Kt(r)&&!An(n)&&!this.instance.At())return!1;var s=(t=this.Rr)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!s}Ar(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=ad(e);Vg(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&vx(r,this.instance.config.rageclick)&&this.Ar(e,"$rageclick");var s=t===Na;if(r&&mx(r,e,this.N,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=xx(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.N.element_attribute_ignorelist,elementsChainAsString:this.Fr});if(o)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(i.$element_selectors=a),t===Na){var l,u=Hg(k==null||(l=k.getSelection())==null?void 0:l.toString()),c=e.type||"clipboard";if(!u)return!1;i.$selected_content=u,i.$copy_type=c}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return Sn(j==null?void 0:j.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Dr=(k==null||(t=k.location)==null?void 0:t.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(V.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.jr&&this.jr(),this.jr=void 0,V.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(k&&k.history){var n=this;(e=k.history.pushState)!=null&&e.__posthog_wrapped__||hd(k.history,"pushState",r=>function(s,i,o){r.call(this,s,i,o),n.Lr("pushState")}),(t=k.history.replaceState)!=null&&t.__posthog_wrapped__||hd(k.history,"replaceState",r=>function(s,i,o){r.call(this,s,i,o),n.Lr("replaceState")}),this.Nr()}}Lr(e){try{var t,n=k==null||(t=k.location)==null?void 0:t.pathname;if(!n)return;n!==this.Dr&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.Dr=n}catch(r){V.error("Error capturing "+e+" pageview",r)}}Nr(){if(!this.jr){var e=()=>{this.Lr("popstate")};We(k,"popstate",e),this.jr=()=>{k&&k.removeEventListener("popstate",e)}}}},heatmaps:class{constructor(e){var t;this.Ur=!1,this.Ir=!1,this.zr=null,this.instance=e,this.Ur=!((t=this.instance.persistence)==null||!t.props[El]),this.rageclicks=new fd(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return et(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return he(this.instance.config.capture_heatmaps)?he(this.instance.config.enable_heatmaps)?this.Ur:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ir)return;Cx.info("starting..."),this.Hr(),this.Br()}else{var e;clearInterval((e=this.zr)!==null&&e!==void 0?e:void 0),this.qr(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[El]:t}),this.Ur=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Wr(e){this.Gr(e.originalEvent,"deadclick")}Br(){this.zr&&clearInterval(this.zr),this.zr=function(e){return(e==null?void 0:e.visibilityState)==="visible"}(j)?setInterval(this.se.bind(this),this.flushIntervalMilliseconds):null}Hr(){k&&j&&(this.Vr=this.se.bind(this),We(k,"beforeunload",this.Vr),this.Jr=e=>this.Gr(e||(k==null?void 0:k.event)),We(j,"click",this.Jr,{capture:!0}),this.Kr=e=>this.Yr(e||(k==null?void 0:k.event)),We(j,"mousemove",this.Kr,{capture:!0}),this.Xr=new Ff(this.instance,_O,this.Wr.bind(this)),this.Xr.startIfEnabledOrStop(),this.Qr=this.Br.bind(this),We(j,"visibilitychange",this.Qr),this.Ir=!0)}qr(){var e;k&&j&&(this.Vr&&k.removeEventListener("beforeunload",this.Vr),this.Jr&&j.removeEventListener("click",this.Jr,{capture:!0}),this.Kr&&j.removeEventListener("mousemove",this.Kr,{capture:!0}),this.Qr&&j.removeEventListener("visibilitychange",this.Qr),clearTimeout(this.Zr),(e=this.Xr)==null||e.stop(),this.Ir=!1)}ts(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=function(o,a,l){for(var u=o;u&&Qo(u)&&!qn(u,"body");){if(u===l)return!1;if(fe(a,k==null?void 0:k.getComputedStyle(u).position))return!0;u=Wg(u)}return!1}(ad(e),["fixed","sticky"],s);return{x:e.clientX+(i?0:r),y:e.clientY+(i?0:n),target_fixed:i,type:t}}Gr(e,t){var n;if(t===void 0&&(t="click"),!id(e.target)&&gd(e)){var r=this.ts(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.es(U({},r,{type:"rageclick"})),this.es(r)}}Yr(e){!id(e.target)&&gd(e)&&(clearTimeout(this.Zr),this.Zr=setTimeout(()=>{this.es(this.ts(e,"mousemove"))},500))}es(e){if(k){var t=k.location.href,n=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,s=n?Qr([],ts,r||[]):[],i=ii(t,s,oi);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(e)}}se(){this.R&&!Ir(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Ff,webVitalsAutocapture:class{constructor(e){var t;this.Ur=!1,this.Ir=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.rs=()=>{clearTimeout(this.ss),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce((n,r)=>U({},n,{["$web_vitals_"+r.name+"_event"]:U({},r),["$web_vitals_"+r.name+"_value"]:r.value}),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ns=n=>{var r,s=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(B(s))Mn.error("Could not read session ID. Dropping metrics!");else{this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.os();B(i)||(he(n==null?void 0:n.name)||he(n==null?void 0:n.value)?Mn.error("Invalid metric received",n):this.ls&&n.value>=this.ls?Mn.error("Ignoring metric with value >= "+this.ls,n):(this.R.url!==i&&(this.rs(),this.ss=setTimeout(this.rs,this.flushToCaptureTimeoutMs)),B(this.R.url)&&(this.R.url=i),this.R.firstMetricTimestamp=B(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.R.metrics.push(U({},n,{$current_url:i,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.R.metrics.length===this.allowedMetrics.length&&this.rs()))}},this.us=()=>{if(!this.Ir){var n,r,s,i,o=Q.__PosthogExtensions__;B(o)||B(o.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:s,onINP:i}=o.postHogWebVitalsCallbacks),n&&r&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ns.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ns.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.ns.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ns.bind(this)),this.Ir=!0):Mn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Ur=!((t=this._instance.persistence)==null||!t.props[Pf]),this.startIfEnabled()}get allowedMetrics(){var e,t,n=et(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return he(n)?((t=this._instance.persistence)==null?void 0:t.props[$f])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return e!=null&&e}get ls(){var e=et(this._instance.config.capture_performance)&&Pn(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:pd;return 0<e&&e<=6e4?pd:e}get isEnabled(){var e=ot==null?void 0:ot.protocol;if(e!=="http:"&&e!=="https:")return Mn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:An(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return An(t)?t:this.Ur}startIfEnabled(){this.isEnabled&&!this.Ir&&(Mn.info("enabled, starting..."),this.V(this.us))}onRemoteConfig(e){if("capturePerformance"in e){var t=et(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=et(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Pf]:t}),this._instance.persistence.register({[$f]:n})),this.Ur=t,this.startIfEnabled()}}V(e){var t,n;if((t=Q.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks)e();else{var r=this.useAttribution?"web-vitals-with-attribution":"web-vitals";(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,r,s=>{s?Mn.error("failed to load script",s):e()})}}os(){var e=k?k.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,r=t?Qr([],ts,n||[]):[];return ii(e,r,oi)}Mn.error("Could not determine current URL")}}},Nx={exceptionObserver:class{constructor(e){var t,n,r;this.us=()=>{var s;if(k&&this.isEnabled&&(s=Q.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var i=Q.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=Q.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,a=Q.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.hs&&this.N.capture_unhandled_errors&&(this.hs=i(this.captureException.bind(this))),!this.ds&&this.N.capture_unhandled_rejections&&(this.ds=o(this.captureException.bind(this))),!this.vs&&this.N.capture_console_errors&&(this.vs=a(this.captureException.bind(this)))}catch(l){bs.error("failed to start",l),this.cs()}}},this._instance=e,this.fs=!((t=this._instance.persistence)==null||!t.props[Rf]),this.ps=new kT({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,h:bs}),this.N=this._s(),this.startIfEnabledOrStop()}_s(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return et(e)?t=U({},t,e):(B(e)?this.fs:e)&&(t=U({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.N.capture_console_errors||this.N.capture_unhandled_errors||this.N.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(bs.info("enabled"),this.cs(),this.V(this.us)):this.cs()}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",r=>{if(r)return bs.error("failed to load script",r);e()})}cs(){var e,t,n;(e=this.hs)==null||e.call(this),this.hs=void 0,(t=this.ds)==null||t.call(this),this.ds=void 0,(n=this.vs)==null||n.call(this),this.vs=void 0}onRemoteConfig(e){if("autocaptureExceptions"in e){var t=e.autocaptureExceptions;this.fs=!!t||!1,this._instance.persistence&&this._instance.persistence.register({[Rf]:this.fs}),this.N=this._s(),this.startIfEnabledOrStop()}}onConfigChange(){this.N=this._s()}captureException(e){var t,n,r=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.ps.consumeRateLimit(r)?bs.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}},$x={productTours:class{constructor(e){this.gs=null,this.bs=null,this._instance=e}onRemoteConfig(e){"productTours"in e&&(this._instance.persistence&&this._instance.persistence.register({[Nf]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.gs||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(Nf)||this.V(()=>this.ys())}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",r=>{r?_d.error("Could not load product tours script",r):e()})}ys(){var e;!this.gs&&(e=Q.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.gs=Q.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!ve(this.bs)||t){var n=this._instance.persistence;if(n){var r=n.props[Da];if(ve(r)&&!t)return this.bs=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:s=>{var i=s.statusCode;if(i!==200||!s.json){var o="Product Tours API could not be loaded, status: "+i;return _d.error(o),void e([],{isLoaded:!1,error:o})}var a=ve(s.json.product_tours)?s.json.product_tours:[];this.bs=a,n&&n.register({[Da]:a}),e(a,{isLoaded:!0})}})}else e(this.bs,{isLoaded:!0})}getActiveProductTours(e){he(this.gs)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.gs.getActiveProductTours(e)}showProductTour(e){var t;(t=this.gs)==null||t.showTourById(e)}previewTour(e){this.gs?this.gs.previewTour(e):this.V(()=>{var t;this.ys(),(t=this.gs)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.gs)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.gs)==null||e.nextStep()}previousStep(){var e;(e=this.gs)==null||e.previousStep()}clearCache(){var e;this.bs=null,(e=this._instance.persistence)==null||e.unregister(Da)}resetTour(e){var t;(t=this.gs)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.gs)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.gs)==null||t.cancelPendingTour(e)}}},Dx={siteApps:class{constructor(e){this._instance=e,this.ws=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}xs(e,t){if(t){var n=this.globalsForEvent(t);this.ws.push(n),this.ws.length>1e3&&(this.ws=this.ws.slice(10))}}get siteAppLoaders(){var e;return(e=Q._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.xs.bind(this));this.$s=()=>{e(),this.ws=[],this.$s=void 0}}}globalsForEvent(e){var t,n,r,s,i,o,a;if(!e)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{};for(var[f,d]of Object.entries(c))l[f]={id:u[f],type:f,properties:d};var{$set_once:h,$set:p}=e;return{event:U({},Wp(e,Rx),{properties:U({},e.properties,p?{$set:U({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},p)}:{},h?{$set_once:U({},(r=(s=e.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},h)}:{}),elements_chain:(i=(o=e.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(a=e.properties)==null?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var o;!t.errored&&this.ws.length&&(Fn.info("Processing "+this.ws.length+" events for site app with id "+e.id),this.ws.forEach(a=>t.processEvent==null?void 0:t.processEvent(a)),t.processedBuffer=!0),Object.values(this.apps).every(a=>a.processedBuffer||a.errored)&&((o=this.$s)==null||o.call(this))},r=!1,s=o=>{t.errored=!o,t.loaded=!0,Fn.info("Site app with id "+e.id+" "+(o?"loaded":"errored")),r&&n()};try{var{processEvent:i}=e.init({posthog:this._instance,callback:o=>{s(o)}});i&&(t.processEvent=i),r=!0}catch(o){Fn.error("Error while initializing PostHog app with config id "+e.id,o),s(!1)}if(r&&t.loaded)try{n()}catch(o){Fn.error("Error while processing buffered events PostHog app with config id "+e.id,o),t.errored=!0}}Es(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Ss(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){Fn.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,s=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Es(),void this._instance.on("eventCaptured",l=>this.Ss(l))):void Fn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.$s)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var i=function(l){var u;Q["__$$ph_site_app_"+l]=s._instance,(u=Q.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(s._instance,a,c=>{if(c)return Fn.error("Error while initializing PostHog app with config id "+l,c)})};for(var{id:o,url:a}of e.siteApps)i(o)}else Fn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},Mx=U({},Ix,Px,Nx,$x,Dx,{tracingHeaders:class{constructor(e){this.ks=void 0,this.Ps=void 0,this.us=()=>{var t,n;B(this.ks)&&((t=Q.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),B(this.Ps)&&((n=Q.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",r=>{if(r)return Ax.error("failed to load script",r);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.V(this.us):((e=this.ks)==null||e.call(this),(t=this.Ps)==null||t.call(this),this.ks=void 0,this.Ps=void 0)}}});Tn.__defaultExtensionClasses=U({},Mx);var vd,Fx=(vd=Hs[Ar]=new Tn,function(){function e(){e.done||(e.done=!0,Bg=!1,Ce(Hs,function(t){t._dom_loaded()}))}j!=null&&j.addEventListener?j.readyState==="complete"?e():We(j,"DOMContentLoaded",e,{capture:!1}):k&&V.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),vd);function md(e={}){const{disableAnalytics:t=!1}=e,n="phc_oXbpiTqzSdiNdHvnZLw66vz3oho8m84Wbjk3r2w5Hguo",r="https://us.i.posthog.com";if(t){console.log("PostHog: Analytics disabled by user setting");return}Fx.init(n,{api_host:r,defaults:"2026-01-30",disable_session_recording:!0,capture_pageleave:!0,autocapture:!0,respect_dnt:!0,persistence:"localStorage"})}async function Lx(){try{const t=await fetch("/api/settings/general"),{disableAnalytics:n}=await t.json();md({disableAnalytics:n})}catch{console.log("PostHog: Failed to fetch general settings, using defaults"),md()}const e=jm(ok);e.use(Zm()),e.use(_T),e.mount("#app")}Lx();export{zi as $,tr as A,Yx as B,Jx as C,Kx as D,pr as E,ht as F,di as G,Im as H,qx as I,Lo as J,Lm as K,Me as L,Jm as M,Xx as N,ph as O,Bx as P,Xe as Q,GS as R,zx as S,im as T,oh as U,On as V,Y as W,Gx as X,Ii as Y,QS as Z,_i as _,Ne as a,J_ as a0,Zx as a1,$t as a2,UE as a3,Ai as a4,Hx as a5,Zv as a6,Wx as a7,Vx as a8,Xl as a9,Jn as aa,I_ as ab,jx as ac,ic as ad,Xs as ae,jm as af,G as b,tt as c,Ie as d,nu as e,Vv as f,Hc as g,Qx as h,Zn as i,Mm as j,BE as k,Mr as l,Ux as m,Nt as n,ss as o,Pm as p,Rm as q,lv as r,eA as s,St as t,Ft as u,Eu as v,Ks as w,Re as x,ci as y,vi as z};
|
|
83
|
+
`)).length,s=0;s<r;s++){var o=e.charCodeAt(s),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Kt(a)||(n>t&&(i+=e.substring(t,n)),i+=a,t=n=s+1)}return n>t&&(i+=e.substring(t,e.length)),i},aA=!!gl||!!pl,Wf="text/plain",Ao=function(e,t,n){var r;n===void 0&&(n=!0);var[s,i]=e.split("?"),o=U({},t),a=(r=i==null?void 0:i.split("&").map(u=>{var c,[f,d]=u.split("="),h=n&&(c=o[f])!==null&&c!==void 0?c:d;return delete o[f],f+"="+h}))!==null&&r!==void 0?r:[],l=JO(o);return l&&a.push(l),s+"?"+a.join("&")},Ps=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),ka=e=>{var{data:t,compression:n}=e;if(t){if(n===En.GZipJS){var r=iA(function(l,u){var c=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var f=new Ut(l.length+(l.length>>>1)),d=0,h=function(k){f[d++]=k},p=0;p<c;++p){if(d+5>f.length){var g=new Ut(d+8+(c-p<<1));g.set(f),f=g}var y=l.charCodeAt(p);y<128||u?h(y):y<2048?(h(192|y>>>6),h(128|63&y)):y>55295&&y<57344?(h(240|(y=65536+(1047552&y)|1023&l.charCodeAt(++p))>>>18),h(128|y>>>12&63),h(128|y>>>6&63),h(128|63&y)):(h(224|y>>>12),h(128|y>>>6&63),h(128|63&y))}return Ng(f,0,d)}(Ps(t)),{mtime:0}),s=new Blob([r],{type:Wf});return{contentType:Wf,body:s,estimatedSize:s.size}}if(n===En.Base64){var i=function(l){var u,c,f,d,h,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=0,y=0,k="",b=[];if(!l)return l;l=oA(l);do u=(h=l.charCodeAt(g++)<<16|l.charCodeAt(g++)<<8|l.charCodeAt(g++))>>18&63,c=h>>12&63,f=h>>6&63,d=63&h,b[y++]=p.charAt(u)+p.charAt(c)+p.charAt(f)+p.charAt(d);while(g<l.length);switch(k=b.join(""),l.length%3){case 1:k=k.slice(0,-2)+"==";break;case 2:k=k.slice(0,-1)+"="}return k}(Ps(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Ps(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=Ps(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Ki=[];pl&&Ki.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:s,estimatedSize:i}=(t=ka(e))!==null&&t!==void 0?t:{},o=new Headers;Pe(e.headers,function(c,f){o.append(f,c)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(bf){var u=new bf;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}pl(a,U({method:(e==null?void 0:e.method)||"GET",headers:o,keepalive:e.method==="POST"&&(i||0)<52428.8,body:s,signal:(n=l)==null?void 0:n.signal},e.fetchOptions)).then(c=>c.text().then(f=>{var d={statusCode:c.status,text:f};if(c.status===200)try{d.json=JSON.parse(f)}catch(h){V.error(h)}e.callback==null||e.callback(d)})).catch(c=>{V.error(c),e.callback==null||e.callback({statusCode:0,error:c})}).finally(()=>l?clearTimeout(l.timeout):null)}}),gl&&Ki.push({transport:"XHR",method:e=>{var t,n=new gl;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=(t=ka(e))!==null&&t!==void 0?t:{};Pe(e.headers,function(i,o){n.setRequestHeader(o,i)}),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var i={statusCode:n.status,text:n.responseText};if(n.status===200)try{i.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(i)}},n.send(s)}}),It!=null&&It.sendBeacon&&Ki.push({transport:"sendBeacon",method:e=>{var t=Ao(e.url,{beacon:"1"});try{var n,{contentType:r,body:s}=(n=ka(e))!==null&&n!==void 0?n:{},i=typeof s=="string"?new Blob([s],{type:r}):s;It.sendBeacon(t,i)}catch{}}});var xo=function(e,t){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function qf(e,t,n){return Ps({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var $g={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>xo(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!xo(n,r))),icontains:(e,t)=>t.map(Mi).some(n=>e.map(Mi).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(Mi).every(n=>e.map(Mi).every(r=>!n.includes(r))),gt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r>parseFloat(s))}),lt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r<parseFloat(s))})},Mi=e=>e.toLowerCase();function Dg(e,t){return!e||Object.entries(e).every(n=>{var[r,s]=n,i=t==null?void 0:t[r];if(B(i)||Kt(i))return!1;var o=[String(i)],a=$g[s.operator];return!!a&&a(s.values,o)})}var Oa=Ue("[Error tracking]");class lA{constructor(t){var n,r;this.nt=[],this.ot=new hO([new EO,new IO,new TO,new SO,new PO,new xO,new OO,new RO],wO()),this._instance=t,this.nt=(n=(r=this._instance.persistence)==null?void 0:r.get_property(Tl))!==null&&n!==void 0?n:[]}onRemoteConfig(t){var n,r,s;if("errorTracking"in t){var i=(n=(r=t.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],o=(s=t.errorTracking)==null?void 0:s.captureExtensionExceptions;this.nt=i,this._instance.persistence&&this._instance.persistence.register({[Tl]:this.nt,[Nf]:o})}}get ut(){var t,n=!!this._instance.get_property(Nf),r=this._instance.config.error_tracking.captureExtensionExceptions;return(t=r??n)!==null&&t!==void 0&&t}buildProperties(t,n){return this.ot.buildFromUnknown(t,{syntheticException:n==null?void 0:n.syntheticException,mechanism:{handled:n==null?void 0:n.handled}})}sendExceptionEvent(t){var n=t.$exception_list;if(this.ht(n)){if(this.dt(n))return void Oa.info("Skipping exception capture because a suppression rule matched");if(!this.ut&&this.vt(n))return void Oa.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ct(n))return void Oa.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",ft:!0})}dt(t){if(t.length===0)return!1;var n=t.reduce((r,s)=>{var{type:i,value:o}=s;return qe(i)&&i.length>0&&r.$exception_types.push(i),qe(o)&&o.length>0&&r.$exception_values.push(o),r},{$exception_types:[],$exception_values:[]});return this.nt.some(r=>{var s=r.values.map(i=>{var o,a=$g[i.operator],l=ve(i.value)?i.value:[i.value],u=(o=n[i.key])!==null&&o!==void 0?o:[];return l.length>0&&a(l,u)});return r.type==="OR"?s.some(Boolean):s.every(Boolean)})}vt(t){return t.flatMap(n=>{var r,s;return(r=(s=n.stacktrace)==null?void 0:s.frames)!==null&&r!==void 0?r:[]}).some(n=>n.filename&&n.filename.startsWith("chrome-extension://"))}ct(t){if(t.length>0){var n,r,s,i,o=(n=(r=t[0].stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[],a=o[o.length-1];return(s=a==null||(i=a.filename)==null?void 0:i.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}ht(t){return!he(t)&&ve(t)}}var Fi="https?://(.*)",ts=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],cA=Qr(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],ts),ai="<masked>",uA=["li_fat_id"];function Mg(e,t,n){if(!j)return{};var r,s=t?Qr([],ts,n||[]):[],i=Fg(oi(j.URL,s,ai),e),o=(r={},Pe(uA,function(a){var l=on.A(a);r[a]=l||null}),r);return Ze(o,i)}function Fg(e,t){var n=cA.concat(t||[]),r={};return Pe(n,function(s){var i=To(e,s);r[s]=i||null}),r}function Lg(e){var t=function(i){return i?i.search(Fi+"google.([^/?]*)")===0?"google":i.search(Fi+"bing.com")===0?"bing":i.search(Fi+"yahoo.com")===0?"yahoo":i.search(Fi+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!Kt(t)){r.$search_engine=t;var s=j?To(j.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function Kf(){return navigator.language||navigator.userLanguage}function zg(){return(j==null?void 0:j.referrer)||"$direct"}function Ug(e,t){var n=e?Qr([],ts,t||[]):[],r=ot==null?void 0:ot.href.substring(0,1e3);return{r:zg().substring(0,1e3),u:r?oi(r,n,ai):void 0}}function jg(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=So(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=So(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=Fg(r);Ze(s,o)}if(n){var a=Lg(n);Ze(s,a)}return s}function Bg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function fA(){try{return new Date().getTimezoneOffset()}catch{return}}function dA(e,t){var n,r;if(!Tt)return{};var s,i,o=e?Qr([],ts,t||[]):[],[a,l]=function(k){for(var b=0;b<kf.length;b++){var[S,E]=kf[b],m=S.exec(k),N=m&&(Sn(E)?E(m,k):E);if(N)return N}return["",""]}(Tt),u=(s=Of(Tt))===ng||s===tg||s==="Kobo"||s==="Kindle Fire"||s===gg?ni:s===si||s===Br||s===ii||s===bl?"Console":s===sg?"Wearable":s?zt:"Desktop";if(u==="Desktop"&&((n=navigator)==null||(n=n.userAgentData)==null?void 0:n.platform)==="Android"&&((r=navigator)==null?void 0:r.maxTouchPoints)>0){var c,f,d,h,p,g=(c=T==null||(f=T.screen)==null?void 0:f.width)!==null&&c!==void 0?c:0,y=(d=T==null||(h=T.screen)==null?void 0:h.height)!==null&&d!==void 0?d:0;u=Math.min(g,y)/((p=T==null?void 0:T.devicePixelRatio)!==null&&p!==void 0?p:1)>=600?"Tablet":"Mobile"}return Ze(kc({$os:a,$os_version:l,$browser:_g(Tt,navigator.vendor),$device:Of(Tt),$device_type:u,$timezone:Bg(),$timezone_offset:fA()}),{$current_url:oi(ot==null?void 0:ot.href,o,ai),$host:ot==null?void 0:ot.host,$pathname:ot==null?void 0:ot.pathname,$raw_user_agent:Tt.length>1e3?Tt.substring(0,997)+"...":Tt,$browser_version:uO(Tt,navigator.vendor),$browser_language:Kf(),$browser_language_prefix:(i=Kf(),typeof i=="string"?i.split("-")[0]:void 0),$screen_height:T==null?void 0:T.screen.height,$screen_width:T==null?void 0:T.screen.width,$viewport_height:T==null?void 0:T.innerHeight,$viewport_width:T==null?void 0:T.innerWidth,$lib:"web",$lib_version:pn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Et=Ue("[FeatureFlags]"),_s=Ue("[FeatureFlags]",{debugEnabled:!0}),hA="errors_while_computing_flags",pA="flag_missing",gA="quota_limited",_A="timeout",vA="connection_error",mA="unknown_error",yA=e=>"api_error_"+e,Aa="$active_feature_flags",wr="$override_feature_flags",Jf="$feature_flag_payloads",vs="$override_feature_flag_payloads",Yf="$feature_flag_request_id",Xf=e=>{var t={};for(var[n,r]of qi(e||{}))r&&(t[n]=r);return t},bA=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(n=>{var r;return[n,(r=t[n].variant)!==null&&r!==void 0?r:t[n].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(n=>t[n].enabled).filter(n=>{var r;return(r=t[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=t[n].metadata)==null?void 0:r.payload]}))):Et.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},wA=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class EA{constructor(t){this._t=!1,this.bt=!1,this.yt=!1,this.wt=!1,this.xt=!1,this.$t=!1,this.Et=!1,this.St=!1,this._instance=t,this.featureFlagEventHandlers=[]}kt(){var t,n;return(t=(n=this._instance.persistence)==null?void 0:n.Pt(this._instance.config.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}Tt(){return!!this.kt()&&(this.St||this.yt||(this.St=!0,Et.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Ct(){var t,n=(t=this._instance.config.evaluation_contexts)!==null&&t!==void 0?t:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.Et||(Et.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Et=!0),n!=null&&n.length?n.filter(r=>{var s=r&&typeof r=="string"&&r.trim().length>0;return s||Et.error("Invalid evaluation context found:",r,"Expected non-empty string"),s}):[]}It(){return this.Ct().length>0}get hasLoadedFlags(){return this.bt}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(kl),n=this._instance.get_property(wr),r=this._instance.get_property(vs);if(!r&&!n)return t||{};var s=Ze({},t||{}),i=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of i){var a,l,u=s[o],c=n==null?void 0:n[o],f=B(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,d=B(c)?u.variant:typeof c=="string"?c:void 0,h=r==null?void 0:r[o],p=U({},u,{enabled:f,variant:f?d??(u==null?void 0:u.variant):void 0});f!==(u==null?void 0:u.enabled)&&(p.original_enabled=u==null?void 0:u.enabled),d!==(u==null?void 0:u.variant)&&(p.original_variant=u==null?void 0:u.variant),h&&(p.metadata=U({},u==null?void 0:u.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),s[o]=p}return this._t||(Et.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:r,finalDetails:s}),this._t=!0),s}getFlagVariants(){var t=this._instance.get_property(Cr),n=this._instance.get_property(wr);if(!n)return t||{};for(var r=Ze({},t),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(Et.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._t=!0),r}getFlagPayloads(){var t=this._instance.get_property(Jf),n=this._instance.get_property(vs);if(!n)return t||{};for(var r=Ze({},t||{}),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(Et.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:n,finalPayloads:r}),this._t=!0),r}reloadFeatureFlags(){this.wt||this._instance.config.advanced_disable_feature_flags||this.Rt||(this._instance.Ft.emit("featureFlagsReloading",!0),this.Rt=setTimeout(()=>{this.Ot()},5))}Mt(){clearTimeout(this.Rt),this.Rt=void 0}ensureFlagsLoaded(){this.bt||this.yt||this.Rt||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.wt=t}Ot(t){var n;if(this.Mt(),!this._instance.At())if(this.yt)this.xt=!0;else{var r=this._instance.config.token,s=this._instance.get_property("$device_id"),i={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:U({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(xs)||{}),group_properties:this._instance.get_property(ur),timezone:Bg()};Kt(s)||B(s)||(i.$device_id=s),(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.It()&&(i.evaluation_contexts=this.Ct());var o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+o);this.yt=!0,this._instance._send_request({method:"POST",url:a,data:i,compression:this._instance.config.disable_compression?void 0:En.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var u,c,f,d=!0;if(l.statusCode===200&&(this.xt||(this.$anon_distinct_id=void 0),d=!1),this.yt=!1,!i.disable_flags||this.xt){this.$t=!d;var h=[];l.error?l.error instanceof Error?h.push(l.error.name==="AbortError"?_A:vA):h.push(mA):l.statusCode!==200&&h.push(yA(l.statusCode)),(u=l.json)!=null&&u.errorsWhileComputingFlags&&h.push(hA);var p=!((c=l.json)==null||(c=c.quotaLimited)==null||!c.includes(wA.FeatureFlags));if(p&&h.push(gA),(f=this._instance.persistence)==null||f.register({[Al]:h}),p)Et.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.");else{var g;i.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},d),this.xt&&(this.xt=!1,this.Ot())}}}})}}getFeatureFlag(t,n){var r;if(n===void 0&&(n={}),!n.fresh||this.$t)if(this.bt||this.getFlags()&&this.getFlags().length>0){if(!this.Tt()){var s=this.getFeatureFlagResult(t,n);return(r=s==null?void 0:s.variant)!==null&&r!==void 0?r:s==null?void 0:s.enabled}}else Et.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var n=this.getFeatureFlagResult(t,{send_event:!1});return n==null?void 0:n.payload}getFeatureFlagResult(t,n){if(n===void 0&&(n={}),!n.fresh||this.$t)if(this.bt||this.getFlags()&&this.getFlags().length>0){if(!this.Tt()){var r=this.getFlagVariants(),s=t in r,i=r[t],o=this.getFlagPayloads()[t],a=String(i),l=this._instance.get_property(Yf)||void 0,u=this._instance.get_property(yo)||void 0,c=this._instance.get_property(mo)||{};if((n.send_event||!("send_event"in n))&&(!(t in c)||!c[t].includes(a))){var f,d,h,p,g,y,k,b,S,E;ve(c[t])?c[t].push(a):c[t]=[a],(f=this._instance.persistence)==null||f.register({[mo]:c});var m=this.getFeatureFlagDetails(t),N=[...(d=this._instance.get_property(Al))!==null&&d!==void 0?d:[]];B(i)&&N.push(pA);var M={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((h=this._instance.config.bootstrap)==null||(h=h.featureFlags)==null?void 0:h[t])||null,$feature_flag_bootstrapped_payload:((p=this._instance.config.bootstrap)==null||(p=p.featureFlagPayloads)==null?void 0:p[t])||null,$used_bootstrap_value:!this.$t};B(m==null||(g=m.metadata)==null?void 0:g.version)||(M.$feature_flag_version=m.metadata.version);var R,I=(y=m==null||(k=m.reason)==null?void 0:k.description)!==null&&y!==void 0?y:m==null||(b=m.reason)==null?void 0:b.code;I&&(M.$feature_flag_reason=I),m!=null&&(S=m.metadata)!=null&&S.id&&(M.$feature_flag_id=m.metadata.id),B(m==null?void 0:m.original_variant)&&B(m==null?void 0:m.original_enabled)||(M.$feature_flag_original_response=B(m.original_variant)?m.original_enabled:m.original_variant),m!=null&&(E=m.metadata)!=null&&E.original_payload&&(M.$feature_flag_original_payload=m==null||(R=m.metadata)==null?void 0:R.original_payload),N.length&&(M.$feature_flag_error=N.join(",")),this._instance.capture("$feature_flag_called",M)}if(s){var F=o;if(!B(o))try{F=JSON.parse(o)}catch{}return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:F}}}}else Et.warn('getFeatureFlagResult for key "'+t+`" failed. Feature flags didn't load in time.`)}getRemoteConfigPayload(t,n){var r=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:r};this.It()&&(s.evaluation_contexts=this.Ct()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this._instance.config.disable_compression?void 0:En.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var o,a=(o=i.json)==null?void 0:o.featureFlagPayloads;n((a==null?void 0:a[t])||void 0)}})}isFeatureEnabled(t,n){if(n===void 0&&(n={}),!n.fresh||this.$t){if(this.bt||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(t,n);return B(r)?void 0:!!r}Et.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==t)}receivedFeatureFlags(t,n){if(this._instance.persistence){this.bt=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(o,a,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var f=bA(o),d=f.flags,h=f.featureFlags,p=f.featureFlagPayloads;if(h){var g=o.requestId,y=o.evaluatedAt;if(ve(h)){Et.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var k={};if(h)for(var b=0;b<h.length;b++)k[h[b]]=!0;a&&a.register({[Aa]:h,[Cr]:k})}else{var S=h,E=p,m=d;if(o.errorsWhileComputingFlags)if(d){var N=new Set(Object.keys(d).filter(M=>{var R;return!((R=d[M])!=null&&R.failed)}));S=U({},l,Object.fromEntries(Object.entries(S).filter(M=>{var[R]=M;return N.has(R)}))),E=U({},u,Object.fromEntries(Object.entries(E||{}).filter(M=>{var[R]=M;return N.has(R)}))),m=U({},c,Object.fromEntries(Object.entries(m||{}).filter(M=>{var[R]=M;return N.has(R)})))}else S=U({},l,S),E=U({},u,E),m=U({},c,m);a&&a.register(U({[Aa]:Object.keys(Xf(S)),[Cr]:S||{},[Jf]:E||{},[kl]:m||{}},g?{[Yf]:g}:{},y?{[yo]:y}:{}))}}})(t,this._instance.persistence,r,s,i),n||(this.St=!1),this.Dt(n)}}override(t,n){n===void 0&&(n=!1),Et.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return Et.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(wr),this._instance.persistence.unregister(vs),this.Dt(),_s.info("All overrides cleared");if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this._t=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(wr),_s.info("Flag overrides cleared");else if(r.flags){if(ve(r.flags)){for(var s={},i=0;i<r.flags.length;i++)s[r.flags[i]]=!0;this._instance.persistence.register({[wr]:s})}else this._instance.persistence.register({[wr]:r.flags});_s.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(vs),_s.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[vs]:r.payloads}),_s.info("Payload overrides set",{payloads:r.payloads}))),void this.Dt()}this.Dt()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.bt){var{flags:n,flagVariants:r}=this.jt();t(n,r)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,n,r){var s,i=(this._instance.get_property(As)||[]).find(u=>u.flagKey===t),o={["$feature_enrollment/"+t]:n},a={$feature_flag:t,$feature_enrollment:n,$set:o};i&&(a.$early_access_feature_name=i.name),r&&(a.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=U({},this.getFlagVariants(),{[t]:n});(s=this._instance.persistence)==null||s.register({[Aa]:Object.keys(Xf(l)),[Cr]:l}),this.Dt()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var s=this._instance.get_property(As),i=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(s&&!n)return t(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+i),method:"GET",callback:o=>{var a,l;if(o.json){var u=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(As),(l=this._instance.persistence)==null||l.register({[As]:u}),t(u)}}})}jt(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,s)=>(r[s]=n[s],r),{})}}Dt(t){var{flags:n,flagVariants:r}=this.jt();this.featureFlagEventHandlers.forEach(s=>s(n,r,{errorsLoading:t}))}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(xs)||{};this._instance.register({[xs]:U({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(xs)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(ur)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(s=>{r[s]=U({},r[s],t[s]),delete t[s]}),this._instance.register({[ur]:U({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(ur)||{};this._instance.register({[ur]:U({},n,{[t]:{}})})}else this._instance.unregister(ur)}reset(){this.bt=!1,this.yt=!1,this.wt=!1,this.xt=!1,this.$t=!1,this.$anon_distinct_id=void 0,this.Mt(),this._t=!1}}var SA=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class xa{constructor(t,n){this.N=t,this.props={},this.Lt=!1,this.Nt=(r=>{var s="";return r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+s+"_posthog"})(t),this.B=this.Ut(t),this.load(),t.debug&&V.info("Persistence loaded",t.persistence,U({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this.zt}Ut(t){SA.indexOf(t.persistence.toLowerCase())===-1&&(V.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=function(s){s===void 0&&(s=[]);var i=[...VO,...s];return U({},De,{D:function(o){try{var a={};try{a=on.D(o)||{}}catch{}var l=Ze(a,JSON.parse(De.A(o)||"{}"));return De.j(o,l),l}catch{}return null},j:function(o,a,l,u,c,f){try{De.j(o,a,void 0,void 0,f);var d={};i.forEach(h=>{a[h]&&(d[h]=a[h])}),Object.keys(d).length&&on.j(o,d,l,u,c,f)}catch(h){De.M(h)}},L:function(o,a){try{T==null||T.localStorage.removeItem(o),on.L(o,a)}catch(l){De.M(l)}}})}(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&De.O()?De:r==="localstorage+cookie"&&n.O()?n:r==="sessionstorage"&&it.O()?it:r==="memory"?ZO:r==="cookie"?on:n.O()?n:on}Pt(t){var n=t??this.N.feature_flag_cache_ttl_ms;if(!n||n<=0)return!1;var r=this.props[yo];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Pe(this.props,(n,r)=>{if(r===Cr&&et(n)){if(!this.Pt())for(var s=Object.keys(n),i=0;i<s.length;i++)t["$feature/"+s[i]]=n[s[i]]}else a=r,l=!1,(Kt(o=FO)?l:yf&&o.indexOf===yf?o.indexOf(a)!=-1:(Pe(o,function(u){if(l||(l=u===a))return _o}),l))||(t[r]=n);var o,a,l}),t}load(){if(!this.zt){var t=this.B.D(this.Nt);t&&(this.props=Ze({},t))}}save(){this.zt||this.B.j(this.Nt,this.props,this.Ht,this.Bt,this.qt,this.N.debug)}remove(){this.B.L(this.Nt,!1),this.B.L(this.Nt,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(et(t)){B(n)&&(n="None"),this.Ht=B(r)?this.Wt:r;var s=!1;if(Pe(t,(i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=i,s=!0)}),s)return this.save(),!0}return!1}register(t,n){if(et(t)){this.Ht=B(n)?this.Wt:n;var r=!1;if(Pe(t,(s,i)=>{t.hasOwnProperty(i)&&this.props[i]!==s&&(this.props[i]=s,r=!0)}),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.Lt){var t=Mg(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);Ir(kc(t))||this.register(t),this.Lt=!0}}update_search_keyword(){var t;this.register((t=j==null?void 0:j.referrer)?Lg(t):{})}update_referrer_info(){var t;this.register_once({$referrer:zg(),$referring_domain:j!=null&&j.referrer&&((t=So(j.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Rl]||this.props[Il]||this.register_once({[bo]:Ug(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Pe([Il,Rl],o=>{var a=this.props[o];a&&Pe(a,function(l,u){t["$initial_"+_l(u)]=l})});var n,r,s=this.props[bo];if(s){var i=(n=jg(s),r={},Pe(n,function(o,a){r["$initial_"+_l(a)]=o}),r);Ze(t,i)}return t}safe_merge(t){return Pe(this.props,function(n,r){r in t||(t[r]=n)}),t}update_config(t,n,r){if(this.Wt=this.Ht=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((o,a)=>{if(o.length!==a.length)return!1;var l=[...o].sort(),u=[...a].sort();return l.every((c,f)=>c===u[f])})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var s=this.Ut(t),i=this.props;this.clear(),this.B=s,this.props=i,this.save()}}set_disabled(t){this.zt=t,this.zt?this.remove():this.save()}set_cross_subdomain(t){t!==this.Bt&&(this.Bt=t,this.remove(),this.save())}set_secure(t){t!==this.qt&&(this.qt=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[Os]||{};r[t]=n,this.props[Os]=r,this.save()}remove_event_timer(t){var n=(this.props[Os]||{})[t];return B(n)||(delete this.props[Os][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}}var ms=function(e){return e.Activation="events",e.Cancellation="cancelEvents",e}({});(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});(function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e})({});var Pa=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var Rs=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),Ra=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e.PRODUCT_TOUR_ID="$product_tour_id",e.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",e}({}),Dl=function(e){return e.Popover="popover",e.Inline="inline",e}({}),ke=Ue("[Surveys]"),Vg="seenSurvey_",TA=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},Qf=e=>((t,n)=>{var r=""+t+n.id;return n.current_iteration&&n.current_iteration>0&&(r=""+t+n.id+"_"+n.current_iteration),r})(Vg,e),kA=[Pa.Popover,Pa.Widget,Pa.API],OA={ignoreConditions:!1,ignoreDelay:!1,displayType:Dl.Popover};class xc{constructor(){this.Gt={},this.Gt={}}on(t,n){return this.Gt[t]||(this.Gt[t]=[]),this.Gt[t].push(n),()=>{this.Gt[t]=this.Gt[t].filter(r=>r!==n)}}emit(t,n){for(var r of this.Gt[t]||[])r(n);for(var s of this.Gt["*"]||[])s(t,n)}}function Er(e,t,n){if(he(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class AA{constructor(t){this.Vt=new xc,this.Jt=(n,r)=>this.Kt(n,r)&&this.Yt(n,r)&&this.Xt(n,r)&&this.Qt(n,r),this.Kt=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=t,this.Zt=new Set,this.ti=new Set}init(){var t;if(!B((t=this._instance)==null?void 0:t._addCaptureHook)){var n;(n=this._instance)==null||n._addCaptureHook((r,s)=>{this.on(r,s)})}}register(t){var n,r;if(!B((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach(o=>{var a,l;(a=this.ti)==null||a.add(o),(l=o.steps)==null||l.forEach(u=>{var c;(c=this.Zt)==null||c.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;t.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)})}),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(t,n){var r;n!=null&&t.length!=0&&(this.Zt.has(t)||this.Zt.has(n==null?void 0:n.event))&&this.ti&&((r=this.ti)==null?void 0:r.size)>0&&this.ti.forEach(s=>{this.ii(n,s)&&this.Vt.emit("actionCaptured",s.name)})}ei(t){this.onAction("actionCaptured",n=>t(n))}ii(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.Jt(t,r))return!0;return!1}onAction(t,n){return this.Vt.on(t,n)}Yt(t,n){if(n!=null&&n.url){var r,s=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!Er(s,n.url,n.url_matching||"contains"))return!1}return!0}Xt(t,n){return!!this.ri(t,n)&&!!this.si(t,n)&&!!this.ni(t,n)}ri(t,n){var r;if(n==null||!n.href)return!0;var s=this.oi(t);if(s.length>0)return s.some(a=>Er(a.href,n.href,n.href_matching||"exact"));var i,o=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!o&&Er((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}si(t,n){var r;if(n==null||!n.text)return!0;var s=this.oi(t);if(s.length>0)return s.some(u=>Er(u.text,n.text,n.text_matching||"exact")||Er(u.$el_text,n.text,n.text_matching||"exact"));var i,o,a,l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!l&&(i=function(u){for(var c,f=[],d=/(?::|")text="(.*?)"/g;!he(c=d.exec(u));)f.includes(c[1])||f.push(c[1]);return f}(l),o=n.text,a=n.text_matching||"exact",i.some(u=>Er(u,o,a)))}ni(t,n){var r,s;if(n==null||!n.selector)return!0;var i=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var o=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&o)try{return new RegExp(n.selector_regex).test(o)}catch{return!1}return!1}oi(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t==null?void 0:t.properties.$elements}Qt(t,n){return n==null||!n.properties||n.properties.length===0||Dg(n.properties.reduce((r,s)=>{var i=ve(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r},{}),t==null?void 0:t.properties)}}class xA{constructor(t){this._instance=t,this.ai=new Map,this.li=new Map,this.ui=new Map}hi(t,n){return!!t&&Dg(t.propertyFilters,n==null?void 0:n.properties)}di(t,n){var r=new Map;return t.forEach(s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach(o=>{if(o!=null&&o.name){var a=r.get(o.name)||[];a.push(s.id),r.set(o.name,a)}})}),r}vi(t,n,r){var s=(r===ms.Activation?this.ai:this.li).get(t),i=[];return this.ci(o=>{i=o.filter(a=>s==null?void 0:s.includes(a.id))}),i.filter(o=>{var a,l=(a=o.conditions)==null||(a=a[r])==null||(a=a.values)==null?void 0:a.find(u=>u.name===t);return this.hi(l,n)})}register(t){var n;B((n=this._instance)==null?void 0:n._addCaptureHook)||(this.fi(t),this.pi(t))}pi(t){var n=t.filter(r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0});n.length!==0&&(this.gi==null&&(this.gi=new AA(this._instance),this.gi.init(),this.gi.ei(r=>{this.onAction(r)})),n.forEach(r=>{var s,i,o,a,l;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.gi)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(u=>{if(u&&u.name){var c=this.ui.get(u.name);c&&c.push(r.id),this.ui.set(u.name,c||[r.id])}}))}))}fi(t){var n,r=t.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0}),s=t.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0});(r.length!==0||s.length!==0)&&((n=this._instance)==null||n._addCaptureHook((i,o)=>{this.onEvent(i,o)}),this.ai=this.di(t,ms.Activation),this.li=this.di(t,ms.Cancellation))}onEvent(t,n){var r,s=this.mi(),i=this.bi(),o=this.yi(),a=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[i])||[];if(o===t&&n&&a.length>0){var l,u;s.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:a});var c=(n==null||(l=n.properties)==null?void 0:l.$survey_id)||(n==null||(u=n.properties)==null?void 0:u.$product_tour_id);if(c){var f=a.indexOf(c);f>=0&&(a.splice(f,1),this.wi(a))}}else{if(this.li.has(t)){var d=this.vi(t,n,ms.Cancellation);d.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:d.map(p=>p.id)}),d.forEach(p=>{var g=a.indexOf(p.id);g>=0&&a.splice(g,1),this.xi(p.id)}),this.wi(a))}if(this.ai.has(t)){s.info("event name matched",{event:t,eventPayload:n,items:this.ai.get(t)});var h=this.vi(t,n,ms.Activation);this.wi(a.concat(h.map(p=>p.id)||[]))}}}onAction(t){var n,r=this.bi(),s=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.ui.has(t)&&this.wi(s.concat(this.ui.get(t)||[]))}wi(t){var n,r=this.mi(),s=this.bi(),i=[...new Set(t)].filter(o=>!this.$i(o));r.info("updating activated items",{activatedItems:i}),(n=this._instance)==null||(n=n.persistence)==null||n.register({[s]:i})}getActivatedIds(){var t,n=this.bi(),r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n];return r||[]}getEventToItemsMap(){return this.ai}Ei(){return this.gi}}class PA extends xA{constructor(t){super(t)}bi(){return"$surveys_activated"}yi(){return Rs.SHOWN}ci(t){var n;(n=this._instance)==null||n.getSurveys(t)}xi(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}mi(){return ke}$i(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class RA{constructor(t){this.Si=void 0,this._surveyManager=null,this.ki=!1,this.Pi=[],this.Ti=null,this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var n=t.surveys;if(he(n))return ke.warn("Flags not loaded yet. Not loading surveys.");var r=ve(n);this.Si=r?n.length>0:n,ke.info("flags response received, isSurveysEnabled: "+this.Si),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(Vg)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach(s=>localStorage.removeItem(s))}loadIfEnabled(){if(!this._surveyManager)if(this.ki)ke.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ke.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ke.info("Not loading surveys in cookieless mode without consent.");else{var t=Q==null?void 0:Q.__PosthogExtensions__;if(t){if(!B(this.Si)||this._instance.config.advanced_enable_surveys){var n=this.Si||this._instance.config.advanced_enable_surveys;this.ki=!0;try{var r=t.generateSurveys;if(r)return void this.Ci(r,n);var s=t.loadExternalDependency;if(!s)return void this.Ii("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!t.generateSurveys?this.Ii("Could not load surveys script",i):this.Ci(t.generateSurveys,n)})}catch(i){throw this.Ii("Error initializing surveys",i),i}finally{this.ki=!1}}}else ke.error("PostHog Extensions not found.")}}Ci(t,n){this._surveyManager=t(this._instance,n),this._surveyEventReceiver=new PA(this._instance),ke.info("Surveys loaded successfully"),this.Ri({isLoaded:!0})}Ii(t,n){ke.error(t,n),this.Ri({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Pi.push(t),this._surveyManager&&this.Ri({isLoaded:!0}),()=>{this.Pi=this.Pi.filter(n=>n!==t)}}getSurveys(t,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return ke.info("Disabled. Not loading surveys."),t([]);var r,s=this._instance.get_property(Ol);if(s&&!n)return t(s,{isLoaded:!0});typeof Promise<"u"&&this.Ti?this.Ti.then(i=>{var{surveys:o,context:a}=i;return t(o,a)}):(typeof Promise<"u"&&(this.Ti=new Promise(i=>{r=i})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var o;this.Ti=null;var a=i.statusCode;if(a!==200||!i.json){var l="Surveys API could not be loaded, status: "+a;ke.error(l);var u={isLoaded:!1,error:l};return t([],u),void(r==null||r({surveys:[],context:u}))}var c,f=i.json.surveys||[],d=f.filter(p=>function(g){return!(!g.start_date||g.end_date)}(p)&&(function(g){var y;return!((y=g.conditions)==null||(y=y.events)==null||(y=y.values)==null||!y.length)}(p)||function(g){var y;return!((y=g.conditions)==null||(y=y.actions)==null||(y=y.values)==null||!y.length)}(p)));d.length>0&&((c=this._surveyEventReceiver)==null||c.register(d)),(o=this._instance.persistence)==null||o.register({[Ol]:f});var h={isLoaded:!0};t(f,h),r==null||r({surveys:f,context:h})}}))}Ri(t){for(var n of this.Pi)try{if(!t.isLoaded)return n([],t);this.getSurveys(n)}catch(r){ke.error("Error in survey callback",r)}}getActiveMatchingSurveys(t,n){if(n===void 0&&(n=!1),!he(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,n);ke.warn("init was not called")}Fi(t){var n=null;return this.getSurveys(r=>{var s;n=(s=r.find(i=>i.id===t))!==null&&s!==void 0?s:null}),n}Oi(t){if(he(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof t=="string"?this.Fi(t):t;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(he(this._surveyManager))return ke.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.Oi(t);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(t,n){return he(this._surveyManager)?(ke.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(s=>{var i,o=(i=s.find(l=>l.id===t))!==null&&i!==void 0?i:null;if(o){var a=this.Oi(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(t,n,r){var s;if(he(this._surveyManager))ke.warn("init was not called");else{var i=typeof t=="string"?this.Fi(t):t;if(i!=null&&i.id)if(kA.includes(i.type)){var o=j==null?void 0:j.querySelector(n);if(o)return(s=i.appearance)!=null&&s.surveyPopupDelaySeconds?(ke.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var a,l;ke.info("Rendering survey "+i.id+" with delay of "+((a=i.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(i,o,r),ke.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,o,r);ke.warn("Survey element not found")}else ke.warn("Surveys of type "+i.type+" cannot be rendered in the app");else ke.warn("Survey not found")}}displaySurvey(t,n){var r;if(he(this._surveyManager))ke.warn("init was not called");else{var s=this.Fi(t);if(s){var i=s;if((r=s.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(i=U({},s,{appearance:U({},s.appearance,{surveyPopupDelaySeconds:0})})),n.displayType!==Dl.Popover&&n.initialResponses&&ke.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),n.ignoreConditions===!1){var o=this.canRenderSurvey(s);if(!o.visible)return void ke.warn("Survey is not eligible to be displayed: ",o.disabledReason)}n.displayType!==Dl.Inline?this._surveyManager.handlePopoverSurvey(i,n):this.renderSurvey(i,n.selector,n.properties)}else ke.warn("Survey not found")}}cancelPendingSurvey(t){he(this._surveyManager)?ke.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}var Mt=Ue("[Conversations]");class IA{constructor(t){this.Mi=void 0,this._conversationsManager=null,this.Ai=!1,this.Di=null,this._instance=t}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var n=t.conversations;he(n)||(xn(n)?this.Mi=n:(this.Mi=n.enabled,this.Di=n),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Mi=void 0,this.Di=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ai||this._instance.config.disable_conversations||wg(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Q==null?void 0:Q.__PosthogExtensions__;if(t&&!B(this.Mi)&&this.Mi)if(this.Di&&this.Di.token){this.Ai=!0;try{var n=t.initConversations;if(n)return this.ji(n),void(this.Ai=!1);var r=t.loadExternalDependency;if(!r)return void this.Li("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",s=>{s||!t.initConversations?this.Li("Could not load conversations script",s):this.ji(t.initConversations),this.Ai=!1})}catch(s){this.Li("Error initializing conversations",s),this.Ai=!1}}else Mt.error("Conversations enabled but missing token in remote config.")}}ji(t){if(this.Di)try{this._conversationsManager=t(this.Di,this._instance),Mt.info("Conversations loaded successfully")}catch(n){this.Li("Error completing conversations initialization",n)}else Mt.error("Cannot complete initialization: remote config is null")}Li(t,n){Mt.error(t,n),this._conversationsManager=null,this.Ai=!1}show(){this._conversationsManager?this._conversationsManager.show():Mt.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Mi===!0&&!Kt(this._conversationsManager)}isVisible(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.isVisible())!==null&&t!==void 0&&t}sendMessage(t,n,r){var s=this;return gn(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(t,n,r):(Mt.warn("Conversations not available yet."),null)})()}getMessages(t,n){var r=this;return gn(function*(){return r._conversationsManager?r._conversationsManager.getMessages(t,n):(Mt.warn("Conversations not available yet."),null)})()}markAsRead(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.markAsRead(t):(Mt.warn("Conversations not available yet."),null)})()}getTickets(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.getTickets(t):(Mt.warn("Conversations not available yet."),null)})()}requestRestoreLink(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.requestRestoreLink(t):(Mt.warn("Conversations not available yet."),null)})()}restoreFromToken(t){var n=this;return gn(function*(){return n._conversationsManager?n._conversationsManager.restoreFromToken(t):(Mt.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var t=this;return gn(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(Mt.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,n;return(t=(n=this._conversationsManager)==null?void 0:n.getWidgetSessionId())!==null&&t!==void 0?t:null}}var CA=function(e){return e.SHOWN="product tour shown",e.DISMISSED="product tour dismissed",e.COMPLETED="product tour completed",e.STEP_SHOWN="product tour step shown",e.STEP_COMPLETED="product tour step completed",e.BUTTON_CLICKED="product tour button clicked",e.STEP_SELECTOR_FAILED="product tour step selector failed",e.BANNER_CONTAINER_SELECTOR_FAILED="product tour banner container selector failed",e.BANNER_ACTION_CLICKED="product tour banner action clicked",e}({}),ed=function(e){return e.TOUR_ID="$product_tour_id",e.TOUR_NAME="$product_tour_name",e.TOUR_ITERATION="$product_tour_iteration",e.TOUR_RENDER_REASON="$product_tour_render_reason",e.TOUR_STEP_ID="$product_tour_step_id",e.TOUR_STEP_ORDER="$product_tour_step_order",e.TOUR_STEP_TYPE="$product_tour_step_type",e.TOUR_DISMISS_REASON="$product_tour_dismiss_reason",e.TOUR_BUTTON_TEXT="$product_tour_button_text",e.TOUR_BUTTON_ACTION="$product_tour_button_action",e.TOUR_BUTTON_LINK="$product_tour_button_link",e.TOUR_BUTTON_TOUR_ID="$product_tour_button_tour_id",e.TOUR_STEPS_COUNT="$product_tour_steps_count",e.TOUR_STEP_SELECTOR="$product_tour_step_selector",e.TOUR_STEP_SELECTOR_FOUND="$product_tour_step_selector_found",e.TOUR_STEP_ELEMENT_TAG="$product_tour_step_element_tag",e.TOUR_STEP_ELEMENT_ID="$product_tour_step_element_id",e.TOUR_STEP_ELEMENT_CLASSES="$product_tour_step_element_classes",e.TOUR_STEP_ELEMENT_TEXT="$product_tour_step_element_text",e.TOUR_ERROR="$product_tour_error",e.TOUR_MATCHES_COUNT="$product_tour_matches_count",e.TOUR_FAILURE_PHASE="$product_tour_failure_phase",e.TOUR_WAITED_FOR_ELEMENT="$product_tour_waited_for_element",e.TOUR_WAIT_DURATION_MS="$product_tour_wait_duration_ms",e.TOUR_BANNER_SELECTOR="$product_tour_banner_selector",e.TOUR_LINKED_SURVEY_ID="$product_tour_linked_survey_id",e.USE_MANUAL_SELECTOR="$use_manual_selector",e.INFERENCE_DATA_PRESENT="$inference_data_present",e.TOUR_LAST_SEEN_DATE="$product_tour_last_seen_date",e.TOUR_TYPE="$product_tour_type",e}({});class NA{constructor(t){var n;this.Ni=!1,this.Ui=!1,this._instance=t,this._instance&&(n=this._instance.config.logs)!=null&&n.captureConsoleLogs&&(this.Ni=!0)}onRemoteConfig(t){var n,r=(n=t.logs)==null?void 0:n.captureConsoleLogs;!he(r)&&r&&(this.Ni=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ni&&!this.Ui){var t=Ue("[logs]"),n=Q==null?void 0:Q.__PosthogExtensions__;if(n){var r=n.loadExternalDependency;r?r(this._instance,"logs",s=>{var i;s||(i=n.logs)==null||!i.initializeLogs?t.error("Could not load logs script",s):(n.logs.initializeLogs(this._instance),this.Ui=!0)}):t.error("PostHog loadExternalDependency extension not found.")}else t.error("PostHog Extensions not found.")}}}var td=Ue("[RateLimiter]");class $A{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach(s=>{td.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void td.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,s;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:o}=this,a=new Date().getTime(),l=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Pl))!==null&&n!==void 0?n:{tokens:i,last:a};l.tokens+=(a-l.last)/1e3*o,l.last=a,l.tokens>i&&(l.tokens=i);var u=l.tokens<1;return u||t||(l.tokens=Math.max(0,l.tokens-1)),!u||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,(s=this.instance.persistence)==null||s.set_property(Pl,l),{isRateLimited:u,remainingTokens:l.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ys=Ue("[RemoteConfig]");class Zg{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Q._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}zi(t){var n,r;(n=Q.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}Hi(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{t(n.json)}})}load(){try{if(this.remoteConfig)return ys.info("Using preloaded remote config",this.remoteConfig),this.Bi(this.remoteConfig),void this.qi();if(this._instance.At())return void ys.warn("Remote config is disabled. Falling back to local config.");this.zi(t=>{if(!t)return ys.info("No config found after loading remote JS config. Falling back to JSON."),void this.Hi(n=>{this.Bi(n),this.qi()});this.Bi(t),this.qi()})}catch(t){ys.error("Error loading remote config",t)}}stop(){this.Wi&&(clearInterval(this.Wi),this.Wi=void 0)}refresh(){this._instance.At()||(j==null?void 0:j.visibilityState)==="hidden"||this._instance.featureFlags.reloadFeatureFlags()}qi(){var t;if(!this.Wi){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Wi=setInterval(()=>{this.refresh()},n))}}Bi(t){t||ys.error("Failed to fetch remote config from PostHog."),this._instance.Bi(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||this._instance.featureFlags.ensureFlagsLoaded())}}var Ml=3e3;class DA{constructor(t,n){this.Gi=!0,this.Vi=[],this.Ji=an((n==null?void 0:n.flush_interval_ms)||Ml,250,5e3,V.createLogger("flush interval"),Ml),this.Ki=t}enqueue(t){this.Vi.push(t),this.Yi||this.Xi()}unload(){this.Qi();var t=this.Vi.length>0?this.Zi():{},n=Object.values(t);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Ki(U({},r,{transport:"sendBeacon"}))})}enable(){this.Gi=!1,this.Xi()}Xi(){var t=this;this.Gi||(this.Yi=setTimeout(()=>{if(this.Qi(),this.Vi.length>0){var n=this.Zi(),r=function(){var i=n[s],o=new Date().getTime();i.data&&ve(i.data)&&Pe(i.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),t.Ki(i)};for(var s in n)r()}},this.Ji))}Qi(){clearTimeout(this.Yi),this.Yi=void 0}Zi(){var t={};return Pe(this.Vi,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;B(t[i])&&(t[i]=U({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.Vi=[],t}}var MA=["retriesPerformedSoFar"];class FA{constructor(t){this.te=!1,this.ie=3e3,this.Vi=[],this._instance=t,this.Vi=[],this.ee=!0,!B(T)&&"onLine"in T.navigator&&(this.ee=T.navigator.onLine,this.re=()=>{this.ee=!0,this.se()},this.ne=()=>{this.ee=!1},We(T,"online",this.re),We(T,"offline",this.ne))}get length(){return this.Vi.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=Yp(t,MA);Ar(n)&&(r.url=Ao(r.url,{retry_count:n})),this._instance._send_request(U({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?this.oe(U({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(s)}}))}oe(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(n),s=Date.now()+r;this.Vi.push({retryAt:s,requestOptions:t});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),V.warn(i),this.te||(this.te=!0,this.ae())}ae(){if(this.le&&clearTimeout(this.le),this.Vi.length===0)return this.te=!1,void(this.le=void 0);this.le=setTimeout(()=>{this.ee&&this.Vi.length>0&&this.se(),this.ae()},this.ie)}se(){var t=Date.now(),n=[],r=this.Vi.filter(i=>i.retryAt<t||(n.push(i),!1));if(this.Vi=n,r.length>0)for(var{requestOptions:s}of r)this.retriableRequest(s)}unload(){for(var{requestOptions:t}of(this.le&&(clearTimeout(this.le),this.le=void 0),this.te=!1,B(T)||(this.re&&(T.removeEventListener("online",this.re),this.re=void 0),this.ne&&(T.removeEventListener("offline",this.ne),this.ne=void 0)),this.Vi))try{this._instance._send_request(U({},t,{transport:"sendBeacon"}))}catch(n){V.error(n)}this.Vi=[]}}class LA{constructor(t){this.ue=()=>{var n,r,s,i;this.he||(this.he={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.he.lastScrollY=Math.ceil(a),this.he.maxScrollY=Math.max(a,(n=this.he.maxScrollY)!==null&&n!==void 0?n:0),this.he.maxScrollHeight=Math.max(l,(r=this.he.maxScrollHeight)!==null&&r!==void 0?r:0),this.he.lastContentY=u,this.he.maxContentY=Math.max(u,(s=this.he.maxContentY)!==null&&s!==void 0?s:0),this.he.maxContentHeight=Math.max(c,(i=this.he.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}getContext(){return this.he}resetContext(){var t=this.he;return setTimeout(this.ue,0),t}startMeasuringScrollPosition(){We(T,"scroll",this.ue,{capture:!0}),We(T,"scrollend",this.ue,{capture:!0}),We(T,"resize",this.ue)}scrollElement(){if(!this._instance.config.scroll_root_selector)return T==null?void 0:T.document.documentElement;var t=ve(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of t){var r=T==null?void 0:T.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return T&&(T.scrollY||T.pageYOffset||T.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return T&&(T.scrollX||T.pageXOffset||T.document.documentElement.scrollLeft)||0}}var zA=e=>Ug(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class nd{constructor(t,n,r,s){this.de=i=>{var o=this.ve();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.ce(this._instance)};this.fe.register({[xl]:a})}},this._instance=t,this.pe=n,this.fe=r,this.ce=s||zA,this.pe.onSessionId(this.de)}ve(){return this.fe.props[xl]}getSetOnceProps(){var t,n=(t=this.ve())==null?void 0:t.props;return n?"r"in n?jg(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return Pe(kc(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+_l(r)]=n}),t}}var Ia=Ue("[SessionId]");class rd{on(t,n){return this._e.on(t,n)}constructor(t,n,r){var s;if(this.ge=[],this.me=void 0,this._e=new xc,this.be=(c,f)=>!(!Ar(c)||!Ar(f))&&Math.abs(c-f)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.N=t.config,this.fe=t.persistence,this.ye=void 0,this.we=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.xe=n||Hn,this.$e=r||Hn;var i=this.N.persistence_name||this.N.token,o=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*an(o,60,36e3,Ia.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ee(),this.Se="ph_"+i+"_window_id",this.ke="ph_"+i+"_primary_window_exists",this.Pe()){var a=it.D(this.Se),l=it.D(this.ke);a&&!l?this.ye=a:it.L(this.Se),it.j(this.ke,!0)}if((s=this.N.bootstrap)!=null&&s.sessionID)try{var u=(c=>{var f=c.replace(/-/g,"");if(f.length!==32)throw new Error("Not a valid UUID");if(f[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(f.substring(0,12),16)})(this.N.bootstrap.sessionID);this.Te(this.N.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Ia.error("Invalid sessionID in bootstrap",c)}this.Ce()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return B(this.ge)&&(this.ge=[]),this.ge.push(t),this.we&&t(this.we,this.ye),()=>{this.ge=this.ge.filter(n=>n!==t)}}Pe(){return this.N.persistence!=="memory"&&!this.fe.zt&&it.O()}Ie(t){t!==this.ye&&(this.ye=t,this.Pe()&&it.j(this.Se,t))}Re(){return this.ye?this.ye:this.Pe()?it.D(this.Se):null}Te(t,n,r){t===this.we&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.we=t,this.fe.register({[vo]:[n,t,r]}))}Fe(){var t=this.fe.props[vo];return ve(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Te(null,null,null)}destroy(){clearTimeout(this.Oe),this.Oe=void 0,this.me&&T&&(T.removeEventListener("beforeunload",this.me,{capture:!1}),this.me=void 0),this.ge=[]}Ce(){this.me=()=>{this.Pe()&&it.L(this.ke)},We(T,"beforeunload",this.me,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.N.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[s,i,o]=this.Fe(),a=this.Re(),l=Ar(o)&&Math.abs(r-o)>864e5,u=!1,c=!i,f=!c&&!t&&this.be(r,s);c||f||l?(i=this.xe(),a=this.$e(),Ia.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}}),o=r,u=!0):a||(a=this.$e(),u=!0);var d=Ar(s)&&t&&!l?s:r,h=Ar(o)?o:new Date().getTime();return this.Ie(a),this.Te(i,d,h),t||this.Ee(),u&&this.ge.forEach(p=>p(i,a,u?{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:f,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:s}}Ee(){clearTimeout(this.Oe),this.Oe=setTimeout(()=>{var[t]=this.Fe();if(this.be(new Date().getTime(),t)){var n=this.we;this.resetSessionId(),this._e.emit("forcedIdleReset",{idleSessionId:n})}},1.1*this.sessionTimeoutMs)}}var Hg=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Ef(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>Ef(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},Is=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),sd="i.posthog.com";class UA{constructor(t){this.Me={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+sd,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Me[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=Is.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=Is.EU:this.Me[this.apiHost]=Is.CUSTOM),this.Me[this.apiHost]}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(this.region===Is.CUSTOM)return this.apiHost+n;var r=sd+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var jA={icontains:(e,t)=>!!T&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!T&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!T&&xo(t.href,e),not_regex:(e,t)=>!!T&&!xo(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class ut{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{ut.Ae("retrieved web experiments from the server"),n.De=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;n.De&&(ut.Ae("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=n.De)==null||o.set(i.feature_flag_key,i));var a=n._instance.getFeatureFlag(i.feature_flag_key);qe(a)&&i.variants[a]&&n.je(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var u=i.variants[l];ut.Le(u)&&n.je(i.name,l,u.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(t){if(this._is_bot())ut.Ae("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(he(this.De))return this.De=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ut.Ae("applying feature flags",t),t.forEach(n=>{var r;if(this.De&&(r=this.De)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),o=(s=this.De)==null?void 0:s.get(n);i&&o!=null&&o.variants[i]&&this.je(o.name,i,o.variants[i].transforms)}})}}previewWebExperiment(){var t=ut.getWindowLocation();if(t!=null&&t.search){var n=To(t==null?void 0:t.search,"__experiment_id"),r=To(t==null?void 0:t.search,"__experiment_variant");n&&r&&(ut.Ae("previewing web experiments "+n+" && "+r),this.getWebExperiments(s=>{this.Ne(parseInt(n),r,s)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this._instance.config.disable_web_experiments&&!r)return t([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return t(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:i=>{if(i.statusCode!==200||!i.json)return t([]);var o=i.json.experiments||[];return t(o)}})}Ne(t,n,r){var s=r.filter(i=>i.id===t);s&&s.length>0&&(ut.Ae("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.je(s[0].name,n,s[0].variants[n].transforms))}static Le(t){return!he(t.conditions)&&ut.Ue(t)&&ut.ze(t)}static Ue(t){var n;if(he(t.conditions)||he((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,o=ut.getWindowLocation();return!!o&&((r=t.conditions)==null||!r.url||jA[(s=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](t.conditions.url,o))}static getWindowLocation(){return T==null?void 0:T.location}static ze(t){var n;if(he(t.conditions)||he((n=t.conditions)==null?void 0:n.utm))return!0;var r=Mg();if(r.utm_source){var s,i,o,a,l,u,c,f,d=(s=t.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,h=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=t.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,p=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=t.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,g=(c=t.conditions)==null||(c=c.utm)==null||!c.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==r.utm_term;return d&&p&&g&&h}return!1}static Ae(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];V.info("[WebExperiments] "+t,r)}je(t,n,r){this._is_bot()?ut.Ae("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(s=>{if(s.selector){var i;ut.Ae("applying transform of variant "+n+" for experiment "+t+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o==null||o.forEach(a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)})}}):ut.Ae("Control variants leave the page unmodified.")}_is_bot(){return It&&this._instance?Hg(It,this._instance.config.custom_blocked_useragents):void 0}}var BA=Ue("[PostHog ExternalIntegrations]"),VA={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ZA{constructor(t){this._instance=t}V(t,n){var r;(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,s=>{if(s)return BA.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,u;!s||(a=Q.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.V(VA[o],()=>{var c;(c=Q.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.start(t._instance)}),!s&&(l=Q.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((u=Q.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var Gs={},Ca=0,Fl=()=>{},xr="posthog",Gg=!aA&&(Tt==null?void 0:Tt.indexOf("MSIE"))===-1&&(Tt==null?void 0:Tt.indexOf("Mozilla"))===-1,id=e=>{var t;return U({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:MO(j==null?void 0:j.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Fl,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,debug:ot&&qe(ot==null?void 0:ot.search)&&ot.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(T==null||(t=T.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;V.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:Ml},error_tracking:{},_onCapture:Fl,__preview_eager_load_replay:!1},(n=>({rageclick:!(n&&n>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(n&&n>="2025-05-24")||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},od=e=>{var t={};B(e.process_person)||(t.person_profiles=e.process_person),B(e.xhr_headers)||(t.request_headers=e.xhr_headers),B(e.cookie_name)||(t.persistence_name=e.cookie_name),B(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),B(e.store_google)||(t.save_campaign_params=e.store_google),B(e.verbose)||(t.debug=e.verbose);var n=Ze({},t,e);return ve(e.property_blacklist)&&(B(e.property_denylist)?n.property_denylist=e.property_blacklist:ve(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:V.error("Invalid value for property_denylist config: "+e.property_denylist)),n};class HA{constructor(){this.__forceAllowLocalhost=!1}get He(){return this.__forceAllowLocalhost}set He(t){V.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class kn{get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new HA,this.Be=!1,this.version=pn.LIB_VERSION,this.Ft=new xc,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=id(),this.SentryIntegration=KO,this.sentryIntegration=t=>function(n,r){var s=xg(n,r);return{name:Ag,processEvent:i=>s(i)}}(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.qe=!1,this.We=null,this.Ge=null,this.Ve=null,this.featureFlags=new EA(this),this.toolbar=new XO(this),this.scrollManager=new LA(this),this.pageViewManager=new Bf(this),this.surveys=new RA(this),this.conversations=new IA(this),this.logs=new NA(this),this.experiments=new ut(this),this.exceptions=new lA(this),this.rateLimiter=new $A(this),this.requestRouter=new UA(this),this.consent=new HO(this),this.externalIntegrations=new ZA(this),this.people={set:(t,n,r)=>{var s=qe(t)?{[t]:n}:t;this.setPersonProperties(s),r==null||r({})},set_once:(t,n,r)=>{var s=qe(t)?{[t]:n}:t;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",t=>V.info('send "'+(t==null?void 0:t.event)+'"',t))}init(t,n,r){if(r&&r!==xr){var s,i=(s=Gs[r])!==null&&s!==void 0?s:new kn;return i._init(t,n,r),Gs[r]=i,Gs[xr][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s;if(n===void 0&&(n={}),B(t)||vl(t))return V.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={},n.debug=this.Je(n.debug),this.Ke=n,this.Ye=[],n.person_profiles?this.Ge=n.person_profiles:n.process_person&&(this.Ge=n.process_person),this.set_config(Ze({},id(n.defaults),od(n),{name:r,token:t})),this.config.on_xhr_error&&V.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:En.GZipJS;var i=this.Xe();this.persistence=new xa(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xa(U({},this.config,{persistence:"sessionStorage"}),i);var o=U({},this.persistence.props),a=U({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Qe=new DA(b=>this.Ze(b),this.config.request_queue_config),this.tr=new FA(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new rd(this),this.sessionPropsManager=new nd(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(V.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.ir(l)},0)):(V.info("Initializing extensions synchronously"),this.ir(l)),pn.DEBUG=pn.DEBUG||this.config.debug,pn.DEBUG&&V.info("Starting in debug mode",{this:this,config:n,thisC:U({},this.config),p:o,s:a}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var u,c,f=this.config.get_device_id(Hn()),d=(u=n.bootstrap)!=null&&u.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(rn,(c=n.bootstrap)!=null&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:d})}if(this.er()){var h,p,g=Object.keys(((h=n.bootstrap)==null?void 0:h.featureFlags)||{}).filter(b=>{var S;return!((S=n.bootstrap)==null||(S=S.featureFlags)==null||!S[b])}).reduce((b,S)=>{var E;return b[S]=((E=n.bootstrap)==null||(E=E.featureFlags)==null?void 0:E[S])||!1,b},{}),y=Object.keys(((p=n.bootstrap)==null?void 0:p.featureFlagPayloads)||{}).filter(b=>g[b]).reduce((b,S)=>{var E,m;return(E=n.bootstrap)!=null&&(E=E.featureFlagPayloads)!=null&&E[S]&&(b[S]=(m=n.bootstrap)==null||(m=m.featureFlagPayloads)==null?void 0:m[S]),b},{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:y})}if(l)this.register_once({distinct_id:ds,$device_id:null},"");else if(!this.get_distinct_id()){var k=this.config.get_device_id(Hn());this.register_once({distinct_id:k,$device_id:k},""),this.persistence.set_property(rn,"anonymous")}return We(T,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?qO(this,()=>this.rr()):this.rr(),Sn(this.config._onCapture)&&this.config._onCapture!==Fl&&(V.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&V.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}ir(t){var n=performance.now(),r=U({},kn.__defaultExtensionClasses,this.config.__extensionClasses);r.historyAutocapture&&(this.historyAutocapture=new r.historyAutocapture(this),this.historyAutocapture.startIfEnabled());var s=[];r.tracingHeaders&&s.push(()=>{new r.tracingHeaders(this).startIfEnabledOrStop()}),r.siteApps&&s.push(()=>{var i;this.siteApps=new r.siteApps(this),(i=this.siteApps)==null||i.init()}),!t&&r.sessionRecording&&s.push(()=>{this.sessionRecording=new r.sessionRecording(this),this.sessionRecording.startIfEnabledOrStop()}),this.config.disable_scroll_properties||s.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),r.autocapture&&s.push(()=>{this.autocapture=new r.autocapture(this),this.autocapture.startIfEnabled()}),s.push(()=>{this.surveys.loadIfEnabled()}),s.push(()=>{this.logs.loadIfEnabled()}),s.push(()=>{this.conversations.loadIfEnabled()}),r.productTours&&s.push(()=>{this.productTours=new r.productTours(this),this.productTours.loadIfEnabled()}),r.heatmaps&&s.push(()=>{this.heatmaps=new r.heatmaps(this),this.heatmaps.startIfEnabled()}),r.webVitalsAutocapture&&s.push(()=>{this.webVitalsAutocapture=new r.webVitalsAutocapture(this)}),r.exceptionObserver&&s.push(()=>{this.exceptionObserver=new r.exceptionObserver(this),this.exceptionObserver.startIfEnabledOrStop()}),r.deadClicksAutocapture&&s.push(()=>{this.deadClicksAutocapture=new r.deadClicksAutocapture(this,WO),this.deadClicksAutocapture.startIfEnabledOrStop()}),s.push(()=>{if(this.sr){var i=this.sr;this.sr=void 0,this.Bi(i)}}),this.nr(s,n)}nr(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout(()=>{this.nr(t,n)},0);var r=t.shift();if(r)try{r()}catch(i){V.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&V.info("PostHog extensions initialized ("+s+"ms)")}Bi(t){var n,r,s,i,o,a,l,u,c;if(!j||!j.body)return V.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Bi(t)},500);this.config.__preview_deferred_init_extensions&&(this.sr=t),this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=fe(t.supportedCompression,En.GZipJS)?En.GZipJS:fe(t.supportedCompression,En.Base64)?En.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Ge?this.Ge:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(t),(s=this.sessionRecording)==null||s.onRemoteConfig(t),(i=this.autocapture)==null||i.onRemoteConfig(t),(o=this.heatmaps)==null||o.onRemoteConfig(t),this.surveys.onRemoteConfig(t),this.logs.onRemoteConfig(t),this.conversations.onRemoteConfig(t),(a=this.productTours)==null||a.onRemoteConfig(t),(l=this.webVitalsAutocapture)==null||l.onRemoteConfig(t),(u=this.exceptionObserver)==null||u.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(t)}rr(){try{this.config.loaded(this)}catch(r){V.critical("`loaded` function failed",r)}if(this.ar(),this.config.internal_or_test_user_hostname&&ot!=null&&ot.hostname){var t=ot.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.lr()},1),this.ur=new Zg(this),this.ur.load()}ar(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Qe)==null||t.enable())}_dom_loaded(){this.is_capturing()&&Wn(this.__request_queue,t=>this.Ze(t)),this.__request_queue=[],this.ar()}_handle_unload(){var t,n;this.surveys.handlePageUnload(),this.config.request_batching?(this.hr()&&this.capture("$pageleave"),(t=this.Qe)==null||t.unload(),(n=this.tr)==null||n.unload()):this.hr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(Gg?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=Ao(t.url,{ip:this.config.ip?1:0}),t.headers=U({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,s,i,o=U({},n);o.timeout=o.timeout||6e4,o.url=Ao(o.url,{_:new Date().getTime().toString(),ver:pn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=Ki.filter(c=>!o.disableTransport||!c.transport||!o.disableTransport.includes(c.transport)),u=(s=(i=bg(l,c=>c.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!u)throw new Error("No available transport method");u(o)})(U({},t,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(s=this.config).on_request_error)==null||r.call(s,n)),t.callback==null||t.callback(n)}}))))}Ze(t){this.tr?this.tr.retriableRequest(t):this._send_request(t)}_execute_array(t){Ca++;try{var n,r=[],s=[],i=[];Wn(t,a=>{a&&(n=a[0],ve(n)?i.push(a):Sn(a)?a.call(this):ve(a)&&n==="alias"?r.push(a):ve(a)&&n.indexOf("capture")!==-1&&Sn(this[n])?i.push(a):s.push(a))});var o=function(a,l){Wn(a,function(u){if(ve(u[0])){var c=l;Pe(u,function(f){c=c[f[0]].apply(c,f.slice(1))})}else this[u[0]].apply(this,u.slice(1))},l)};o(r,this),o(s,this),o(i,this)}finally{Ca--}}er(){var t,n;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(t){if(Ca>0&&ve(t)&&qe(t[0])){var n=kn.prototype[t[0]];Sn(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Qe){if(this.is_capturing())if(!B(t)&&qe(t)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){n!=null&&n.$current_url&&!qe(n==null?void 0:n.$current_url)&&(V.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.ft||V.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 a=new Date,l=(r==null?void 0:r.timestamp)||a,u=Hn(),c={uuid:u,event:t,properties:this.calculateEventProperties(t,n||{},l,u)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),o&&(c.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),r!=null&&r.$set&&(c.$set=r==null?void 0:r.$set);var f,d=t!=="$groupidentify",h=this.dr(r==null?void 0:r.$set_once,d);if(h&&(c.$set_once=h),(c=$O(c,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,B(r==null?void 0:r.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=a),t===Rs.DISMISSED||t===Rs.SENT){var p=n==null?void 0:n[Ra.SURVEY_ID],g=n==null?void 0:n[Ra.SURVEY_ITERATION];f={id:p,current_iteration:g},localStorage.getItem(Qf(f))||localStorage.setItem(Qf(f),"true"),c.$set=U({},c.$set,{[TA({id:p,current_iteration:g},t===Rs.SENT?"responded":"dismissed")]:!0})}else t===Rs.SHOWN&&(c.$set=U({},c.$set,{[Ra.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===CA.SHOWN){var y=n==null?void 0:n[ed.TOUR_TYPE];y&&(c.$set=U({},c.$set,{[ed.TOUR_LAST_SEEN_DATE+"/"+y]:new Date().toISOString()}))}var k=U({},c.properties.$set,c.$set);if(Ir(k)||this.setPersonPropertiesForFlags(k),!he(this.config.before_send)){var b=this.vr(c);if(!b)return;c=b}this.Ft.emit("eventCaptured",c);var S={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Ze(S):this.Qe.enqueue(S),c}V.critical("This capture call is ignored due to client rate limiting.")}}else V.error("No event name provided to posthog.capture")}else V.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",n=>t(n.event,n))}calculateEventProperties(t,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=i?void 0:this.persistence.remove_event_timer(t),a=U({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),t==="$snapshot"){var l=U({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!qe(a.distinct_id)&&!Cn(a.distinct_id)||vl(a.distinct_id))&&V.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=dA(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime());a.$session_id=f,a.$window_id=d}this.sessionPropsManager&&Ze(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Ze(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.tr)==null?void 0:h.length}catch(k){a.$sdk_debug_error_capturing_properties=String(k)}if(this.requestRouter.region===Is.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),u=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=Ze(a,u),t==="$pageview"&&j&&(a.title=j.title),!B(o)){var p=r.getTime()-o;a.$duration=parseFloat((p/1e3).toFixed(3))}Tt&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=Ze({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ve(this.config.property_denylist)?Pe(this.config.property_denylist,function(k){delete a[k]}):V.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(V.error("sanitize_properties is deprecated. Use before_send instead"),a=g(a,t));var y=this.cr();return a.$process_person_profile=y,y&&!i&&this.pr("_calculate_event_properties"),a}dr(t,n){var r;if(n===void 0&&(n=!0),!this.persistence||!this.cr()||this.Be)return t;var s=this.persistence.get_initial_props(),i=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),o=Ze({},s,i||{},t||{}),a=this.config.sanitize_properties;return a&&(V.error("sanitize_properties is deprecated. Use before_send instead"),o=a(o,"$set_once")),n&&(this.Be=!0),Ir(o)?void 0:o}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var s;(s=this.persistence)==null||s.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}_r(t,n){this.register({[t]:n})}getFeatureFlag(t,n){return this.featureFlags.getFeatureFlag(t,n)}getFeatureFlagPayload(t){return this.featureFlags.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){return this.featureFlags.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){return this.featureFlags.isFeatureEnabled(t,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateFlags(t,n,r){var s=r!=null&&r.merge?this.featureFlags.getFlagVariants():{},i=r!=null&&r.merge?this.featureFlags.getFlagPayloads():{},o=U({},s,t),a=U({},i,n),l={};for(var[u,c]of Object.entries(o)){var f=typeof c=="string";l[u]={key:u,enabled:!!f||!!c,variant:f?c:void 0,reason:void 0,metadata:B(a==null?void 0:a[u])?void 0:{id:0,version:void 0,description:void 0,payload:a[u]}}}this.featureFlags.receivedFeatureFlags({flags:l})}updateEarlyAccessFeatureEnrollment(t,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Ft.on(t,n)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys.getSurveys(t,n)}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(t,n)}renderSurvey(t,n){this.surveys.renderSurvey(t,n)}displaySurvey(t,n){n===void 0&&(n=OA),this.surveys.displaySurvey(t,n)}cancelPendingSurvey(t){this.surveys.cancelPendingSurvey(t)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(t,n)}identify(t,n,r){if(!this.__loaded||!this.persistence)return V.uninitializedWarning("posthog.identify");if(Cn(t)&&(t=t.toString(),V.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))V.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==ds){if(this.pr("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var i=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}t!==s&&t!==this.get_property(ks)&&(this.unregister(ks),this.register({distinct_id:t}));var o=(this.persistence.get_property(rn)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(rn,"identified"),this.setPersonPropertiesForFlags(U({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.Ve=qf(t,n,r),this.featureFlags.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(mo))}}else V.critical('The string "'+ds+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else V.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.pr("posthog.setPersonProperties")){var r=qf(this.get_distinct_id(),t,n);this.Ve!==r?(this.setPersonPropertiesForFlags(U({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ve=r):V.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var s=this.getGroups();s[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:U({},s,{[t]:n})}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[t]:r})),s[t]===n||r||this.reloadFeatureFlags()}else V.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0),this.pr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,n)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var n,r,s,i,o;if(V.info("reset"),!this.__loaded)return V.uninitializedWarning("posthog.reset");var a=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),(s=this.ur)==null||s.stop(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(rn,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ve=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:ds,$device_id:null},"");else{var l=this.config.get_device_id(Hn());this.register_once({distinct_id:l,$device_id:t?l:a},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var i,o=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return s}alias(t,n){return t===this.get_property(Eg)?(V.critical("Attempting to create alias for existing People user - aborting."),-2):this.pr("posthog.alias")?(B(n)&&(n=this.get_distinct_id()),t!==n?(this._r(ks,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(V.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=U({},this.config);if(et(t)){var r,s,i,o,a,l,u,c;Ze(this.config,od(t));var f=this.Xe();(r=this.persistence)==null||r.update_config(this.config,n,f),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xa(U({},this.config,{persistence:"sessionStorage"}),f);var d=this.Je(this.config.debug);xn(d)&&(this.config.debug=d),xn(this.config.debug)&&(this.config.debug?(pn.DEBUG=!0,De.O()&&De.j("ph_debug","true"),V.info("set_config",{config:t,oldConfig:n,newConfig:U({},this.config)})):(pn.DEBUG=!1,De.O()&&De.L("ph_debug"))),(s=this.exceptionObserver)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(a=this.heatmaps)==null||a.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(u=this.deadClicksAutocapture)==null||u.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.gr(),(c=this.externalIntegrations)==null||c.startIfEnabledOrStop()}}startSessionRecording(t){var n=t===!0,r={sampling:n||!(t==null||!t.sampling),linked_flag:n||!(t==null||!t.linked_flag),url_trigger:n||!(t==null||!t.url_trigger),event_trigger:n||!(t==null||!t.event_trigger)};if(Object.values(r).some(Boolean)){var s,i,o,a,l;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),r.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(U({},s,n))}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:xr;return n!==xr&&(n=xr+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(rn))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(rn))==="identified"}cr(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Ir(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ks])&&((n=this.persistence)==null||(n=n.props)==null||!n[wo]))}hr(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.cr()||this.pr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.pr("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}pr(t){return this.config.person_profiles==="never"?(V.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._r(wo,!0),!0)}Xe(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||t&&!!n}gr(){var t,n,r,s,i=this.Xe();return((t=this.persistence)==null?void 0:t.zt)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n.zt)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(t){var n;if(this.config.cookieless_mode!=="always"){if(this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()){var r,s,i,o,a;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=new rd(this),this.pageViewManager=new Bf(this),this.persistence&&(this.sessionPropsManager=new nd(this,this.sessionManager,this.persistence));var l=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=kn.__defaultExtensionClasses)==null?void 0:a.sessionRecording;l&&(this.sessionRecording=new l(this),this.sessionRecording.startIfEnabledOrStop())}var u;this.consent.optInOut(!0),this.gr(),this.ar(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(B(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((u=t==null?void 0:t.captureEventName)!==null&&u!==void 0?u:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.lr()}else V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.gr(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:ds,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.lr())):V.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===_n.GRANTED?"granted":t===_n.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.gr()}_is_bot(){return It?Hg(It,this.config.custom_blocked_useragents):void 0}lr(){j&&(j.visibilityState==="visible"?this.qe||(this.qe=!0,this.capture("$pageview",{title:j.title},{send_instantly:!0}),this.We&&(j.removeEventListener("visibilitychange",this.We),this.We=null)):this.We||(this.We=this.lr.bind(this),We(j,"visibilitychange",this.We)))}debug(t){t===!1?(T==null||T.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(T==null||T.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}))}At(){var t,n,r,s,i,o,a,l=this.Ke||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(V.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):(r="advanced_disable_decide",s=!1,i=V,o=(n="advanced_disable_flags")in(t=l)&&!he(t[n]),a=r in t&&!he(t[r]),o?t[n]:a?(i&&i.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]):s)}vr(t){if(he(this.config.before_send))return t;var n=ve(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var s of n){if(r=s(r),he(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return Yk(t.event)?V.warn(i+". This can cause unexpected behavior."):V.info(i),null}r.properties&&!Ir(r.properties)||V.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.it)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Je(t){var n=xn(t)&&!t,r=De.O()&&De.A("ph_debug")==="true";return!n&&(!!r||t)}}kn.__defaultExtensionClasses={},function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=NO(e.prototype[t[n]])}(kn,["identify"]);function ad(e){return e instanceof Element&&(e.id===kg||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Qo(e){return!!e&&e.nodeType===1}function qn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Wg(e){return!!e&&e.nodeType===3}function qg(e){return!!e&&e.nodeType===11}function Pc(e){return e?Yo(e).split(/\s+/):[]}function ld(e){var t=T==null?void 0:T.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function Po(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 Pc(t)}function Kg(e){return he(e)?null:Yo(e).split(/(\s+)/).filter(t=>li(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function yi(e){var t="";return Ll(e)&&!Qg(e)&&e.childNodes&&e.childNodes.length&&Pe(e.childNodes,function(n){var r;Wg(n)&&n.textContent&&(t+=(r=Kg(n.textContent))!==null&&r!==void 0?r:"")}),Yo(t)}function cd(e){return B(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Rc=["a","button","form","input","select","textarea","label"];function Jg(e,t){if(B(t))return!0;var n,r=function(i){if(t.some(o=>i.matches(o)))return{v:!0}};for(var s of e)if(n=r(s))return n.v;return!1}function Yg(e){var t=e.parentNode;return!(!t||!Qo(t))&&t}var GA=["next","previous","prev",">","<"],ud=10,fd=[".ph-no-rageclick",".ph-no-capture"];function WA(e,t){if(!T||Ic(e))return!1;var n,r,s;if(xn(t)?(n=!!t&&fd,r=void 0):(n=(s=t==null?void 0:t.css_selector_ignorelist)!==null&&s!==void 0?s:fd,r=t==null?void 0:t.content_ignorelist),n===!1)return!1;var{targetElementList:i}=Xg(e,!1);return!function(o,a){if(o===!1||B(o))return!1;var l;if(o===!0)l=GA;else{if(!ve(o))return!1;if(o.length>ud)return V.error("[PostHog] content_ignorelist array cannot exceed "+ud+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map(u=>u.toLowerCase())}return a.some(u=>{var{safeText:c,ariaLabel:f}=u;return l.some(d=>c.includes(d)||f.includes(d))})}(r,i.map(o=>{var a;return{safeText:yi(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}}))&&!Jg(i,n)}var Ic=e=>!e||qn(e,"html")||!Qo(e),Xg=(e,t)=>{if(!T||Ic(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],s=e;s.parentNode&&!qn(s,"body");)if(qg(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=Yg(s);if(!i)break;if(t||Rc.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{var o=T.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function qA(e,t,n,r,s){var i,o,a,l;if(n===void 0&&(n=void 0),!T||Ic(e)||(i=n)!=null&&i.url_allowlist&&!ld(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&ld(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var u=n.dom_event_allowlist;if(u&&!u.some(p=>t.type===p))return!1}var{parentIsUsefulElement:c,targetElementList:f}=Xg(e,r);if(!function(p,g){var y=g==null?void 0:g.element_allowlist;if(B(y))return!0;var k,b=function(E){if(y.some(m=>E.tagName.toLowerCase()===m))return{v:!0}};for(var S of p)if(k=b(S))return k.v;return!1}(f,n)||!Jg(f,(l=n)==null?void 0:l.css_selector_allowlist))return!1;var d=T.getComputedStyle(e);if(d&&d.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return c?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(Rc.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function Ll(e){for(var t=e;t.parentNode&&!qn(t,"body");t=t.parentNode){var n=Po(t);if(fe(n,"ph-sensitive")||fe(n,"ph-no-capture"))return!1}if(fe(Po(e),"ph-include"))return!0;var r=e.type||"";if(qe(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(qe(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function Qg(e){return!!(qn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||qn(e,"select")||qn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var e_="(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})",KA=new RegExp("^(?:"+e_+")$"),JA=new RegExp(e_),t_="\\d{3}-?\\d{2}-?\\d{4}",YA=new RegExp("^("+t_+")$"),XA=new RegExp("("+t_+")");function li(e,t){return t===void 0&&(t=!0),!(he(e)||qe(e)&&(e=Yo(e),(t?KA:JA).test((e||"").replace(/[- ]/g,""))||(t?YA:XA).test(e)))}function n_(e){var t=yi(e);return li(t=(t+" "+r_(e)).trim())?t:""}function r_(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Pe(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=yi(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+r_(n)).trim())}catch(i){V.error("[AutoCapture]",i)}}),t}function QA(e){return function(t){var n=t.map(r=>{var s,i,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=U({},r.text?{text:r.text}:{},{"nth-child":(s=r.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=r.nth_of_type)!==null&&i!==void 0?i:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return qi(l).sort((c,f)=>{var[d]=c,[h]=f;return d.localeCompare(h)}).forEach(c=>{var[f,d]=c;return u[dd(f.toString())]=dd(d.toString())}),o+=":",o+=qi(u).map(c=>{var[f,d]=c;return f+'="'+d+'"'}).join("")});return n.join(";")}(function(t){return t.map(n=>{var r,s,i={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(s=n.attr__href)==null?void 0:s.slice(0,2048),attr_class:ex(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return qi(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return i.attributes[a]=l}),i})}(e))}function dd(e){return e.replace(/"|\\"/g,'\\"')}function ex(e){var t=e.attr__class;return t?ve(t)?t:Pc(t):void 0}class hd{constructor(t){this.disabled=t===!1;var n=et(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(n-s.y)<this.thresholdPx&&r-s.timestamp<this.timeoutMs){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var Na="$copy_autocapture",pd=Ue("[AutoCapture]");function $a(e,t){return t.length>e?t.slice(0,e)+"...":t}function tx(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Qo(t));return t}function nx(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};Rc.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=$a(1024,n_(e)):i.$el_text=$a(1024,yi(e)));var o=Po(e);o.length>0&&(i.classes=o.filter(function(c){return c!==""})),Pe(e.attributes,function(c){var f;if((!Qg(e)||["name","id","class","aria-label"].indexOf(c.name)!==-1)&&(r==null||!r.includes(c.name))&&!t&&li(c.value)&&(f=c.name,!qe(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")){var d=c.value;c.name==="class"&&(d=Pc(d).join(" ")),i["attr__"+c.name]=$a(1024,d)}});for(var a=1,l=1,u=e;u=tx(u);)a++,u.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function rx(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,u=[e],c=e;c.parentNode&&!qn(c,"body");)qg(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var f,d=[],h={},p=!1,g=!1;if(Pe(u,E=>{var m=Ll(E);E.tagName.toLowerCase()==="a"&&(p=E.getAttribute("href"),p=m&&p&&li(p)&&p),fe(Po(E),"ph-no-capture")&&(g=!0),d.push(nx(E,i,o,a));var N=function(M){if(!Ll(M))return{};var R={};return Pe(M.attributes,function(I){if(I.name&&I.name.indexOf("data-ph-capture-attribute")===0){var F=I.name.replace("data-ph-capture-attribute-",""),J=I.value;F&&J&&li(J)&&(R[F]=J)}}),R}(E);Ze(h,N)}),g)return{props:{},explicitNoCapture:g};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?d[0].$el_text=n_(e):d[0].$el_text=yi(e)),p){var y,k;d[0].attr__href=p;var b=(y=So(p))==null?void 0:y.host,S=T==null||(k=T.location)==null?void 0:k.host;b&&S&&b!==S&&(f=p)}return{props:Ze({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:QA(d)},(n=d[0])!=null&&n.$el_text?{$el_text:(r=d[0])==null?void 0:r.$el_text}:{},f&&s.type==="click"?{$external_click_url:f}:{},h)}}var bs=Ue("[ExceptionAutocapture]");function gd(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return Sn(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var sx=Ue("[TracingHeaders]"),Mn=Ue("[Web Vitals]"),_d=9e5;Ue("[SessionRecording]");var zl="[SessionRecording]",Sr=Ue(zl),ix=Ue("[Heatmaps]");function vd(e){return et(e)&&"clientX"in e&&"clientY"in e&&Cn(e.clientX)&&Cn(e.clientY)}var md=Ue("[Product Tours]"),Da="ph_product_tours",ox=["$set_once","$set"],Fn=Ue("[SiteApps]"),ax={sessionRecording:class{get started(){var e;return!((e=this.mr)==null||!e.isStarted)}get status(){return this.mr?this.mr.status:this.br?this.yr?"lazy_loading":"disabled":"pending_config"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.br=!1,this.wr=!1,this.$r=void 0,this._instance=e,!this._instance.sessionManager)throw Sr.error("started without valid sessionManager"),new Error(zl+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(zl+' cannot be used with cookieless_mode="always"')}get yr(){var e,t=!((e=this._instance.get_property(Ni))==null||!e.enabled),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return T&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(this.br&&(!this.yr||(t=this.mr)==null||!t.isStarted)){var n=!B(Object.assign)&&!B(Array.from);this.yr&&n?(this.Er(e),Sr.info("starting")):this.stopRecording()}}Er(e){var t,n,r;this.yr&&(Q!=null&&(t=Q.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=Q.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Sr(e):(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.kr,s=>{if(s)return Sr.error("could not load recorder",s);this.Sr(e)}))}stopRecording(){var e,t;(e=this.$r)==null||e.call(this),this.$r=void 0,(t=this.mr)==null||t.stop()}Pr(){var e;(e=this._instance.persistence)==null||e.unregister(Tg)}Tr(e){if(this._instance.persistence){var t,n,r=this._instance.persistence,s=()=>{var i=e.sessionRecording===!1?void 0:e.sessionRecording,o=i==null?void 0:i.sampleRate,a=he(o)?null:parseFloat(o);he(a)&&this.Pr();var l=i==null?void 0:i.minimumDurationMilliseconds;r.register({[Ni]:U({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:U({capturePerformance:e.capturePerformance},i==null?void 0:i.networkPayloadCapture),canvasRecording:{enabled:i==null?void 0:i.recordCanvas,fps:i==null?void 0:i.canvasFps,quality:i==null?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:B(l)?null:l,endpoint:i==null?void 0:i.endpoint,triggerMatchType:i==null?void 0:i.triggerMatchType,masking:i==null?void 0:i.masking,urlTriggers:i==null?void 0:i.urlTriggers})})};s(),(t=this.$r)==null||t.call(this),this.$r=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?e.sessionRecording!==!1?(this.wr=!1,this.Tr(e),this.br=!0,this.startIfEnabledOrStop()):this.br=!0:Sr.info("skipping remote config with no sessionRecording",e)}log(e,t){var n;t===void 0&&(t="log"),(n=this.mr)!=null&&n.log?this.mr.log(e,t):Sr.warn("log called before recorder was ready")}get kr(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Ni);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Cr(){var e,t=this._instance.get_property(Ni);if(!t)return!1;var n=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return Date.now()-n<=3e5}Sr(e){var t,n;if((t=Q.__PosthogExtensions__)==null||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.mr||(this.mr=(n=Q.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.mr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Cr()?this.mr.start(e):this.wr||(this.wr=!0,Sr.info("persisted remote config is stale, requesting fresh config before starting"),new Zg(this._instance).load())}onRRwebEmit(e){var t;(t=this.mr)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.mr||(t=this._instance.persistence)==null||t.register({$replay_override_linked_flag:!0}),(e=this.mr)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.mr||(t=this._instance.persistence)==null||t.register({$replay_override_sampling:!0}),(e=this.mr)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.mr||(n=this._instance.persistence)==null||n.register({[e==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(t=this.mr)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.mr)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.mr)==null||!n.tryAddCustomEvent(e,t))}}},lx={autocapture:class{constructor(e){this.Ir=!1,this.Rr=null,this.Fr=!1,this.instance=e,this.rageclicks=new hd(e.config.rageclick),this.Or=null}get N(){var e,t,n=et(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map(r=>new RegExp(r)),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map(r=>new RegExp(r)),n}Mr(){if(this.isBrowserSupported()){if(T&&j){var e=n=>{n=n||(T==null?void 0:T.event);try{this.Ar(n)}catch(r){pd.error("Failed to capture event",r)}};if(We(j,"submit",e,{capture:!0}),We(j,"change",e,{capture:!0}),We(j,"click",e,{capture:!0}),this.N.capture_copied_text){var t=n=>{n=n||(T==null?void 0:T.event),this.Ar(n,Na)};We(j,"copy",t,{capture:!0}),We(j,"cut",t,{capture:!0})}}}else pd.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ir&&(this.Mr(),this.Ir=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Fr=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[If]:!!e.autocapture_opt_out}),this.Rr=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Or=e}getElementSelectors(e){var t,n=[];return(t=this.Or)==null||t.forEach(r=>{var s=j==null?void 0:j.querySelectorAll(r);s==null||s.forEach(i=>{e===i&&n.push(r)})}),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[If],r=this.Rr;if(Kt(r)&&!xn(n)&&!this.instance.At())return!1;var s=(t=this.Rr)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!s}Ar(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=cd(e);Wg(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&WA(r,this.instance.config.rageclick)&&this.Ar(e,"$rageclick");var s=t===Na;if(r&&qA(r,e,this.N,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=rx(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.N.element_attribute_ignorelist,elementsChainAsString:this.Fr});if(o)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(i.$element_selectors=a),t===Na){var l,u=Kg(T==null||(l=T.getSelection())==null?void 0:l.toString()),c=e.type||"clipboard";if(!u)return!1;i.$selected_content=u,i.$copy_type=c}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return Sn(j==null?void 0:j.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Dr=(T==null||(t=T.location)==null?void 0:t.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(V.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.jr&&this.jr(),this.jr=void 0,V.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(T&&T.history){var n=this;(e=T.history.pushState)!=null&&e.__posthog_wrapped__||gd(T.history,"pushState",r=>function(s,i,o){r.call(this,s,i,o),n.Lr("pushState")}),(t=T.history.replaceState)!=null&&t.__posthog_wrapped__||gd(T.history,"replaceState",r=>function(s,i,o){r.call(this,s,i,o),n.Lr("replaceState")}),this.Nr()}}Lr(e){try{var t,n=T==null||(t=T.location)==null?void 0:t.pathname;if(!n)return;n!==this.Dr&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.Dr=n}catch(r){V.error("Error capturing "+e+" pageview",r)}}Nr(){if(!this.jr){var e=()=>{this.Lr("popstate")};We(T,"popstate",e),this.jr=()=>{T&&T.removeEventListener("popstate",e)}}}},heatmaps:class{constructor(e){var t;this.Ur=!1,this.Ir=!1,this.zr=null,this.instance=e,this.Ur=!((t=this.instance.persistence)==null||!t.props[Sl]),this.rageclicks=new hd(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return et(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return he(this.instance.config.capture_heatmaps)?he(this.instance.config.enable_heatmaps)?this.Ur:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ir)return;ix.info("starting..."),this.Hr(),this.Br()}else{var e;clearInterval((e=this.zr)!==null&&e!==void 0?e:void 0),this.qr(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Sl]:t}),this.Ur=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Wr(e){this.Gr(e.originalEvent,"deadclick")}Br(){this.zr&&clearInterval(this.zr),this.zr=function(e){return(e==null?void 0:e.visibilityState)==="visible"}(j)?setInterval(this.se.bind(this),this.flushIntervalMilliseconds):null}Hr(){T&&j&&(this.Vr=this.se.bind(this),We(T,"beforeunload",this.Vr),this.Jr=e=>this.Gr(e||(T==null?void 0:T.event)),We(j,"click",this.Jr,{capture:!0}),this.Kr=e=>this.Yr(e||(T==null?void 0:T.event)),We(j,"mousemove",this.Kr,{capture:!0}),this.Xr=new zf(this.instance,GO,this.Wr.bind(this)),this.Xr.startIfEnabledOrStop(),this.Qr=this.Br.bind(this),We(j,"visibilitychange",this.Qr),this.Ir=!0)}qr(){var e;T&&j&&(this.Vr&&T.removeEventListener("beforeunload",this.Vr),this.Jr&&j.removeEventListener("click",this.Jr,{capture:!0}),this.Kr&&j.removeEventListener("mousemove",this.Kr,{capture:!0}),this.Qr&&j.removeEventListener("visibilitychange",this.Qr),clearTimeout(this.Zr),(e=this.Xr)==null||e.stop(),this.Ir=!1)}ts(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=function(o,a,l){for(var u=o;u&&Qo(u)&&!qn(u,"body");){if(u===l)return!1;if(fe(a,T==null?void 0:T.getComputedStyle(u).position))return!0;u=Yg(u)}return!1}(cd(e),["fixed","sticky"],s);return{x:e.clientX+(i?0:r),y:e.clientY+(i?0:n),target_fixed:i,type:t}}Gr(e,t){var n;if(t===void 0&&(t="click"),!ad(e.target)&&vd(e)){var r=this.ts(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.es(U({},r,{type:"rageclick"})),this.es(r)}}Yr(e){!ad(e.target)&&vd(e)&&(clearTimeout(this.Zr),this.Zr=setTimeout(()=>{this.es(this.ts(e,"mousemove"))},500))}es(e){if(T){var t=T.location.href,n=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,s=n?Qr([],ts,r||[]):[],i=oi(t,s,ai);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(e)}}se(){this.R&&!Ir(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:zf,webVitalsAutocapture:class{constructor(e){var t;this.Ur=!1,this.Ir=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.rs=()=>{clearTimeout(this.ss),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce((n,r)=>U({},n,{["$web_vitals_"+r.name+"_event"]:U({},r),["$web_vitals_"+r.name+"_value"]:r.value}),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ns=n=>{var r,s=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(B(s))Mn.error("Could not read session ID. Dropping metrics!");else{this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.os();B(i)||(he(n==null?void 0:n.name)||he(n==null?void 0:n.value)?Mn.error("Invalid metric received",n):this.ls&&n.value>=this.ls?Mn.error("Ignoring metric with value >= "+this.ls,n):(this.R.url!==i&&(this.rs(),this.ss=setTimeout(this.rs,this.flushToCaptureTimeoutMs)),B(this.R.url)&&(this.R.url=i),this.R.firstMetricTimestamp=B(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.R.metrics.push(U({},n,{$current_url:i,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.R.metrics.length===this.allowedMetrics.length&&this.rs()))}},this.us=()=>{if(!this.Ir){var n,r,s,i,o=Q.__PosthogExtensions__;B(o)||B(o.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:s,onINP:i}=o.postHogWebVitalsCallbacks),n&&r&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ns.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ns.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.ns.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ns.bind(this)),this.Ir=!0):Mn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Ur=!((t=this._instance.persistence)==null||!t.props[$f]),this.startIfEnabled()}get allowedMetrics(){var e,t,n=et(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return he(n)?((t=this._instance.persistence)==null?void 0:t.props[Mf])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return e!=null&&e}get ls(){var e=et(this._instance.config.capture_performance)&&Cn(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:_d;return 0<e&&e<=6e4?_d:e}get isEnabled(){var e=ot==null?void 0:ot.protocol;if(e!=="http:"&&e!=="https:")return Mn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=et(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:xn(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return xn(t)?t:this.Ur}startIfEnabled(){this.isEnabled&&!this.Ir&&(Mn.info("enabled, starting..."),this.V(this.us))}onRemoteConfig(e){if("capturePerformance"in e){var t=et(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=et(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[$f]:t}),this._instance.persistence.register({[Mf]:n})),this.Ur=t,this.startIfEnabled()}}V(e){var t,n;if((t=Q.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks)e();else{var r=this.useAttribution?"web-vitals-with-attribution":"web-vitals";(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,r,s=>{s?Mn.error("failed to load script",s):e()})}}os(){var e=T?T.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,r=t?Qr([],ts,n||[]):[];return oi(e,r,ai)}Mn.error("Could not determine current URL")}}},cx={exceptionObserver:class{constructor(e){var t,n,r;this.us=()=>{var s;if(T&&this.isEnabled&&(s=Q.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var i=Q.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=Q.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,a=Q.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.hs&&this.N.capture_unhandled_errors&&(this.hs=i(this.captureException.bind(this))),!this.ds&&this.N.capture_unhandled_rejections&&(this.ds=o(this.captureException.bind(this))),!this.vs&&this.N.capture_console_errors&&(this.vs=a(this.captureException.bind(this)))}catch(l){bs.error("failed to start",l),this.cs()}}},this._instance=e,this.fs=!((t=this._instance.persistence)==null||!t.props[Cf]),this.ps=new eO({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,h:bs}),this.N=this._s(),this.startIfEnabledOrStop()}_s(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return et(e)?t=U({},t,e):(B(e)?this.fs:e)&&(t=U({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.N.capture_console_errors||this.N.capture_unhandled_errors||this.N.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(bs.info("enabled"),this.cs(),this.V(this.us)):this.cs()}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",r=>{if(r)return bs.error("failed to load script",r);e()})}cs(){var e,t,n;(e=this.hs)==null||e.call(this),this.hs=void 0,(t=this.ds)==null||t.call(this),this.ds=void 0,(n=this.vs)==null||n.call(this),this.vs=void 0}onRemoteConfig(e){if("autocaptureExceptions"in e){var t=e.autocaptureExceptions;this.fs=!!t||!1,this._instance.persistence&&this._instance.persistence.register({[Cf]:this.fs}),this.N=this._s(),this.startIfEnabledOrStop()}}onConfigChange(){this.N=this._s()}captureException(e){var t,n,r=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.ps.consumeRateLimit(r)?bs.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}},ux={productTours:class{constructor(e){this.gs=null,this.bs=null,this._instance=e}onRemoteConfig(e){"productTours"in e&&(this._instance.persistence&&this._instance.persistence.register({[Df]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.gs||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(Df)||this.V(()=>this.ys())}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",r=>{r?md.error("Could not load product tours script",r):e()})}ys(){var e;!this.gs&&(e=Q.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.gs=Q.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!ve(this.bs)||t){var n=this._instance.persistence;if(n){var r=n.props[Da];if(ve(r)&&!t)return this.bs=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:s=>{var i=s.statusCode;if(i!==200||!s.json){var o="Product Tours API could not be loaded, status: "+i;return md.error(o),void e([],{isLoaded:!1,error:o})}var a=ve(s.json.product_tours)?s.json.product_tours:[];this.bs=a,n&&n.register({[Da]:a}),e(a,{isLoaded:!0})}})}else e(this.bs,{isLoaded:!0})}getActiveProductTours(e){he(this.gs)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.gs.getActiveProductTours(e)}showProductTour(e){var t;(t=this.gs)==null||t.showTourById(e)}previewTour(e){this.gs?this.gs.previewTour(e):this.V(()=>{var t;this.ys(),(t=this.gs)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.gs)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.gs)==null||e.nextStep()}previousStep(){var e;(e=this.gs)==null||e.previousStep()}clearCache(){var e;this.bs=null,(e=this._instance.persistence)==null||e.unregister(Da)}resetTour(e){var t;(t=this.gs)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.gs)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.gs)==null||t.cancelPendingTour(e)}}},fx={siteApps:class{constructor(e){this._instance=e,this.ws=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}xs(e,t){if(t){var n=this.globalsForEvent(t);this.ws.push(n),this.ws.length>1e3&&(this.ws=this.ws.slice(10))}}get siteAppLoaders(){var e;return(e=Q._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.xs.bind(this));this.$s=()=>{e(),this.ws=[],this.$s=void 0}}}globalsForEvent(e){var t,n,r,s,i,o,a;if(!e)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{};for(var[f,d]of Object.entries(c))l[f]={id:u[f],type:f,properties:d};var{$set_once:h,$set:p}=e;return{event:U({},Yp(e,ox),{properties:U({},e.properties,p?{$set:U({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},p)}:{},h?{$set_once:U({},(r=(s=e.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},h)}:{}),elements_chain:(i=(o=e.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(a=e.properties)==null?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var o;!t.errored&&this.ws.length&&(Fn.info("Processing "+this.ws.length+" events for site app with id "+e.id),this.ws.forEach(a=>t.processEvent==null?void 0:t.processEvent(a)),t.processedBuffer=!0),Object.values(this.apps).every(a=>a.processedBuffer||a.errored)&&((o=this.$s)==null||o.call(this))},r=!1,s=o=>{t.errored=!o,t.loaded=!0,Fn.info("Site app with id "+e.id+" "+(o?"loaded":"errored")),r&&n()};try{var{processEvent:i}=e.init({posthog:this._instance,callback:o=>{s(o)}});i&&(t.processEvent=i),r=!0}catch(o){Fn.error("Error while initializing PostHog app with config id "+e.id,o),s(!1)}if(r&&t.loaded)try{n()}catch(o){Fn.error("Error while processing buffered events PostHog app with config id "+e.id,o),t.errored=!0}}Es(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Ss(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){Fn.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,s=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Es(),void this._instance.on("eventCaptured",l=>this.Ss(l))):void Fn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.$s)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var i=function(l){var u;Q["__$$ph_site_app_"+l]=s._instance,(u=Q.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(s._instance,a,c=>{if(c)return Fn.error("Error while initializing PostHog app with config id "+l,c)})};for(var{id:o,url:a}of e.siteApps)i(o)}else Fn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},dx=U({},ax,lx,cx,ux,fx,{tracingHeaders:class{constructor(e){this.ks=void 0,this.Ps=void 0,this.us=()=>{var t,n;B(this.ks)&&((t=Q.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),B(this.Ps)&&((n=Q.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}V(e){var t,n;(t=Q.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",r=>{if(r)return sx.error("failed to load script",r);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.V(this.us):((e=this.ks)==null||e.call(this),(t=this.Ps)==null||t.call(this),this.ks=void 0,this.Ps=void 0)}}});kn.__defaultExtensionClasses=U({},dx);var yd,hx=(yd=Gs[xr]=new kn,function(){function e(){e.done||(e.done=!0,Gg=!1,Pe(Gs,function(t){t._dom_loaded()}))}j!=null&&j.addEventListener?j.readyState==="complete"?e():We(j,"DOMContentLoaded",e,{capture:!1}):T&&V.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),yd);function bd(e={}){const{disableAnalytics:t=!1}=e,n="phc_oXbpiTqzSdiNdHvnZLw66vz3oho8m84Wbjk3r2w5Hguo",r="https://us.i.posthog.com";if(t){console.log("PostHog: Analytics disabled by user setting");return}hx.init(n,{api_host:r,defaults:"2026-01-30",disable_session_recording:!0,capture_pageleave:!0,autocapture:!0,respect_dnt:!0,persistence:"localStorage"})}async function px(){try{const t=await fetch("/api/settings/general"),{disableAnalytics:n}=await t.json();bd({disableAnalytics:n})}catch{console.log("PostHog: Failed to fetch general settings, using defaults"),bd()}const e=Hm(MT);e.use(qm()),e.use(Gk),e.mount("#app")}px();export{Px as $,Lo as A,Nx as B,ui as C,kx as D,mi as E,ht as F,tr as G,Ax as H,Ox as I,pr as J,Tx as K,Bm as L,Me as M,xx as N,cm as O,_h as P,mx as Q,Xe as R,JS as S,lh as T,gx as U,On as V,Y as W,Ex as X,Ss as Y,PT as Z,vi as _,Ne as a,Ix as a0,kT as a1,Rx as a2,ET as a3,zi as a4,ev as a5,bx as a6,$t as a7,ZE as a8,Pi as a9,wx as aa,qv as ab,Sx as ac,yx as ad,Ql as ae,Jn as af,D_ as ag,vx as ah,oc as ai,Qs as aj,Hm as ak,G as b,tt as c,Ie as d,su as e,Wv as f,Wc as g,Cx as h,Zn as i,Um as j,GE as k,Mr as l,_x as m,Nt as n,ss as o,ey as p,Mm as q,dv as r,$m as s,St as t,Ft as u,Tu as v,Js as w,hi as x,Dm as y,Re as z};
|