circuschief 0.1.2 → 0.1.3

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.
Files changed (56) hide show
  1. package/package.json +1 -1
  2. package/packages/server/bin/cli.js +1 -1
  3. package/packages/web/dist/assets/{ActiveSessionsView-2qqzd1tM.js → ActiveSessionsView-BryJ-V3f.js} +1 -1
  4. package/packages/web/dist/assets/{AgentLogsView-DbulYJ7p.js → AgentLogsView-c42v_j_5.js} +1 -1
  5. package/packages/web/dist/assets/{ArchiveConfirmModal-Byx5Usg6.js → ArchiveConfirmModal-DBuOmtXu.js} +1 -1
  6. package/packages/web/dist/assets/{CommandButtonDetailView-TMSVeeLH.js → CommandButtonDetailView-CkKJ3Htz.js} +1 -1
  7. package/packages/web/dist/assets/{EffortLevelSelector-DIj0Wykj.js → EffortLevelSelector-BHJHSqul.js} +1 -1
  8. package/packages/web/dist/assets/{GeneralSettingsView-1a3MKUwM.js → GeneralSettingsView-CdxfteZ2.js} +1 -1
  9. package/packages/web/dist/assets/{InterpolationHelp-DX4mjTd3.js → InterpolationHelp-DabnHhE4.js} +1 -1
  10. package/packages/web/dist/assets/MarkdownEditor-k4zBLGqU.js +2 -0
  11. package/packages/web/dist/assets/{ModelSelector-C9RlCVhC.js → ModelSelector-BWIU4ud7.js} +1 -1
  12. package/packages/web/dist/assets/{NewSessionView-B9W_35D0.js → NewSessionView-BIZl8QlH.js} +1 -1
  13. package/packages/web/dist/assets/{PathChooser-Di96sZpx.js → PathChooser-nhat_Pz4.js} +1 -1
  14. package/packages/web/dist/assets/{ProjectEditView-ZnWKaSqt.js → ProjectEditView-DD-2_VrW.js} +1 -1
  15. package/packages/web/dist/assets/{ProjectListView-C_yWe1QB.js → ProjectListView-BOWbfoXQ.js} +1 -1
  16. package/packages/web/dist/assets/{ProjectNewView-ONPpDPNA.js → ProjectNewView-DC4uvSn2.js} +1 -1
  17. package/packages/web/dist/assets/{ProvidersView-BPd0xozI.js → ProvidersView-DT5afh1V.js} +1 -1
  18. package/packages/web/dist/assets/{QuickResponseSettings-DB8MD7dm.js → QuickResponseSettings-Bk9mq96x.js} +1 -1
  19. package/packages/web/dist/assets/{QuickResponsesPanel-D0B5nzGw.js → QuickResponsesPanel-BRvcnkQr.js} +1 -1
  20. package/packages/web/dist/assets/{ResizableTextarea-DDChlp5b.js → ResizableTextarea-CwGM4P3c.js} +1 -1
  21. package/packages/web/dist/assets/{SessionCard-BD6MuoON.js → SessionCard-BGDVHU9u.js} +1 -1
  22. package/packages/web/dist/assets/{SessionDetailView-BrMG4p2-.css → SessionDetailView-7bWgC7Es.css} +1 -1
  23. package/packages/web/dist/assets/{SessionDetailView-lNqco-dG.js → SessionDetailView-CHYrx2Ab.js} +24 -24
  24. package/packages/web/dist/assets/{SessionFormOptions-Doyl_mON.js → SessionFormOptions-8qvL25ca.js} +1 -1
  25. package/packages/web/dist/assets/{SessionListView-B6emPw4T.js → SessionListView-927Yq6Il.js} +1 -1
  26. package/packages/web/dist/assets/{SessionLogStream-BFjl4wy7.js → SessionLogStream-B-w3n4c3.js} +1 -1
  27. package/packages/web/dist/assets/{SettingsView-CJNMi4aJ.js → SettingsView-Dd0ZJ4Nv.js} +1 -1
  28. package/packages/web/dist/assets/{SlashCommandWizard-CpNLU4vI.js → SlashCommandWizard-CzyLjsdJ.js} +1 -1
  29. package/packages/web/dist/assets/{SummarySettingsView-DGjXv3Px.js → SummarySettingsView-DTbh7uAF.js} +1 -1
  30. package/packages/web/dist/assets/{TemplateDetailView-DqA7M5Pe.js → TemplateDetailView-BOnhkdtH.js} +1 -1
  31. package/packages/web/dist/assets/{commandButtons-CCojrcrv.js → commandButtons-CY87n64i.js} +1 -1
  32. package/packages/web/dist/assets/{index-Om-y-ZVA.js → index--OtPwBbF.js} +3 -3
  33. package/packages/web/dist/assets/{index-DGzmo-Vd.js → index-BRUlEEHm.js} +1 -1
  34. package/packages/web/dist/assets/{index-BGUUMf-N.js → index-BXUcbV4K.js} +1 -1
  35. package/packages/web/dist/assets/{index-Bs1D4Ibo.js → index-Bi4bQ_UB.js} +1 -1
  36. package/packages/web/dist/assets/{index-Xz0F6Or0.js → index-BshkV3r5.js} +1 -1
  37. package/packages/web/dist/assets/{index-D3EUAUMi.js → index-C6m-WfqP.js} +1 -1
  38. package/packages/web/dist/assets/{index-jHzQFk08.js → index-CO4EBOFw.js} +1 -1
  39. package/packages/web/dist/assets/{index-DJVf5YvL.js → index-Ce6sL47U.js} +1 -1
  40. package/packages/web/dist/assets/{index-DZvIqKGE.js → index-CjHb9rXv.js} +1 -1
  41. package/packages/web/dist/assets/{index-DFFF6QRP.js → index-DPwwgloE.js} +1 -1
  42. package/packages/web/dist/assets/{index-B0XHqJYv.js → index-DcA6pqXV.js} +1 -1
  43. package/packages/web/dist/assets/{index-LoOsRfMI.js → index-DkLkDgig.js} +8 -8
  44. package/packages/web/dist/assets/{index-02CN8N8c.js → index-Dx0sYW7H.js} +1 -1
  45. package/packages/web/dist/assets/{index-BwySZO9U.js → index-DxboI9i-.js} +1 -1
  46. package/packages/web/dist/assets/{index-CLVE7KEk.js → index-NzLFVaCi.js} +1 -1
  47. package/packages/web/dist/assets/{index-DSOHGmA9.js → index-aCw-iXPX.js} +1 -1
  48. package/packages/web/dist/assets/{index-DZZ8d3HG.js → index-gMpnPf1V.js} +1 -1
  49. package/packages/web/dist/assets/{index-BN1MywtA.js → index-i1o916sk.js} +1 -1
  50. package/packages/web/dist/assets/{index-ZKQQ6-mY.js → index-jGjvGBfk.js} +1 -1
  51. package/packages/web/dist/assets/{projects-DWX5jGcZ.js → projects-C2Y29PSJ.js} +1 -1
  52. package/packages/web/dist/assets/{providers-CfGxUhUu.js → providers-CeJXuo0Q.js} +1 -1
  53. package/packages/web/dist/assets/{sessions-i5xO8Qao.js → sessions-CMby7ij3.js} +1 -1
  54. package/packages/web/dist/assets/{settings-dSK3wckF.js → settings-BplIxCbi.js} +1 -1
  55. package/packages/web/dist/index.html +1 -1
  56. package/packages/web/dist/assets/MarkdownEditor-DeCPmMTP.js +0 -2
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectListView-C_yWe1QB.js","assets/projects-DWX5jGcZ.js","assets/ApiClient-Dbs1H78V.js","assets/ProjectListView-C55H1JHQ.css","assets/ProjectNewView-ONPpDPNA.js","assets/PathChooser-Di96sZpx.js","assets/PathChooser-BoMGzeg2.css","assets/ProjectNewView-CpgE4R-l.css","assets/ProjectEditView-ZnWKaSqt.js","assets/QuickResponseSettings-DB8MD7dm.js","assets/QuickResponseSettings-B8188A1D.css","assets/ModelSelector-C9RlCVhC.js","assets/providers-CfGxUhUu.js","assets/ModelSelector-DPPD-92R.css","assets/ProjectEditView-DNwBUNRk.css","assets/CommandButtonDetailView-TMSVeeLH.js","assets/commandButtons-CCojrcrv.js","assets/CommandButtonDetailView-DBm3rzhw.css","assets/SessionListView-B6emPw4T.js","assets/sessions-i5xO8Qao.js","assets/settings-dSK3wckF.js","assets/SessionLogStream-BFjl4wy7.js","assets/SessionLogStream-zPUTiGbe.css","assets/SessionCard-BD6MuoON.js","assets/SessionCard-D20G3bX8.css","assets/ArchiveConfirmModal-Byx5Usg6.js","assets/EffortLevelSelector-DIj0Wykj.js","assets/EffortLevelSelector-BQaQmU2d.css","assets/SlashCommandWizard-CpNLU4vI.js","assets/SlashCommandWizard-BB30cSvo.css","assets/ArchiveConfirmModal-CQZeuYBz.css","assets/InterpolationHelp-DX4mjTd3.js","assets/InterpolationHelp-iNxTxmhs.css","assets/ResizableTextarea-DDChlp5b.js","assets/ResizableTextarea-B5nAA0RV.css","assets/SessionFormOptions-Doyl_mON.js","assets/SessionFormOptions-BuLlDF-7.css","assets/SessionListView-BAIBtJF7.css","assets/TemplateDetailView-DqA7M5Pe.js","assets/TemplateDetailView-DT2m06W7.css","assets/NewSessionView-B9W_35D0.js","assets/QuickResponsesPanel-D0B5nzGw.js","assets/QuickResponsesPanel-DIBQFj0W.css","assets/NewSessionView-Byoi1XdQ.css","assets/ActiveSessionsView-2qqzd1tM.js","assets/ActiveSessionsView-ofSvx-K1.css","assets/SessionDetailView-lNqco-dG.js","assets/SessionDetailView-BrMG4p2-.css","assets/SettingsView-CJNMi4aJ.js","assets/SettingsView-DC8-hTQ-.css","assets/ProvidersView-BPd0xozI.js","assets/ProvidersView-B_QQF3RM.css","assets/SummarySettingsView-DGjXv3Px.js","assets/SummarySettingsView-DcsmSVJI.css","assets/GeneralSettingsView-1a3MKUwM.js","assets/GeneralSettingsView-BCf53fpC.css","assets/AgentLogsView-DbulYJ7p.js","assets/AgentLogsView-D90PnQVk.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectListView-BOWbfoXQ.js","assets/projects-C2Y29PSJ.js","assets/ApiClient-Dbs1H78V.js","assets/ProjectListView-C55H1JHQ.css","assets/ProjectNewView-DC4uvSn2.js","assets/PathChooser-nhat_Pz4.js","assets/PathChooser-BoMGzeg2.css","assets/ProjectNewView-CpgE4R-l.css","assets/ProjectEditView-DD-2_VrW.js","assets/QuickResponseSettings-Bk9mq96x.js","assets/QuickResponseSettings-B8188A1D.css","assets/ModelSelector-BWIU4ud7.js","assets/providers-CeJXuo0Q.js","assets/ModelSelector-DPPD-92R.css","assets/ProjectEditView-DNwBUNRk.css","assets/CommandButtonDetailView-CkKJ3Htz.js","assets/commandButtons-CY87n64i.js","assets/CommandButtonDetailView-DBm3rzhw.css","assets/SessionListView-927Yq6Il.js","assets/sessions-CMby7ij3.js","assets/settings-BplIxCbi.js","assets/SessionLogStream-B-w3n4c3.js","assets/SessionLogStream-zPUTiGbe.css","assets/SessionCard-BGDVHU9u.js","assets/SessionCard-D20G3bX8.css","assets/ArchiveConfirmModal-DBuOmtXu.js","assets/EffortLevelSelector-BHJHSqul.js","assets/EffortLevelSelector-BQaQmU2d.css","assets/SlashCommandWizard-CzyLjsdJ.js","assets/SlashCommandWizard-BB30cSvo.css","assets/ArchiveConfirmModal-CQZeuYBz.css","assets/InterpolationHelp-DabnHhE4.js","assets/InterpolationHelp-iNxTxmhs.css","assets/ResizableTextarea-CwGM4P3c.js","assets/ResizableTextarea-B5nAA0RV.css","assets/SessionFormOptions-8qvL25ca.js","assets/SessionFormOptions-BuLlDF-7.css","assets/SessionListView-BAIBtJF7.css","assets/TemplateDetailView-BOnhkdtH.js","assets/TemplateDetailView-DT2m06W7.css","assets/NewSessionView-BIZl8QlH.js","assets/QuickResponsesPanel-BRvcnkQr.js","assets/QuickResponsesPanel-DIBQFj0W.css","assets/NewSessionView-Byoi1XdQ.css","assets/ActiveSessionsView-BryJ-V3f.js","assets/ActiveSessionsView-ofSvx-K1.css","assets/SessionDetailView-CHYrx2Ab.js","assets/SessionDetailView-7bWgC7Es.css","assets/SettingsView-Dd0ZJ4Nv.js","assets/SettingsView-DC8-hTQ-.css","assets/ProvidersView-DT5afh1V.js","assets/ProvidersView-B_QQF3RM.css","assets/SummarySettingsView-DTbh7uAF.js","assets/SummarySettingsView-DcsmSVJI.css","assets/GeneralSettingsView-CdxfteZ2.js","assets/GeneralSettingsView-BCf53fpC.css","assets/AgentLogsView-c42v_j_5.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
@@ -7,19 +7,19 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectListView
7
7
  * @vue/reactivity v3.5.29
8
8
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
9
9
  * @license MIT
10
- **/let ut;class pd{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=ut,!t&&ut&&(this.index=(ut.scopes||(ut.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=ut;try{return ut=this,t()}finally{ut=n}}}on(){++this._on===1&&(this.prevScope=ut,ut=this)}off(){this._on>0&&--this._on===0&&(ut=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 gd(e){return new pd(e)}function _d(){return ut}function Hg(e,t=!1){ut&&ut.cleanups.push(e)}let xe;const Go=new WeakSet;class vd{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,ut&&ut.active&&ut.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Go.has(this)&&(Go.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ec(this),bd(this);const t=xe,n=Bt;xe=this,Bt=!0;try{return this.fn()}finally{wd(this),xe=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Nl(t);this.deps=this.depsTail=void 0,Ec(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Go.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Oa(this)&&this.run()}get dirty(){return Oa(this)}}let md=0,Os,xs;function yd(e,t=!1){if(e.flags|=8,t){e.next=xs,xs=e;return}e.next=Os,Os=e}function Il(){md++}function Pl(){if(--md>0)return;if(xs){let t=xs;for(xs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Os;){let t=Os;for(Os=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 bd(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wd(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Nl(r),Gg(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Oa(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ed(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zs)||(e.globalVersion=zs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Oa(e))))return;e.flags|=2;const t=e.dep,n=xe,r=Bt;xe=e,Bt=!0;try{bd(e);const s=e.fn(e._value);(t.version===0||Zn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{xe=n,Bt=r,wd(e),e.flags&=-3}}function Nl(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)Nl(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Gg(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const Sd=[];function On(){Sd.push(Bt),Bt=!1}function xn(){const e=Sd.pop();Bt=e===void 0?!0:e}function Ec(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xe;xe=void 0;try{t()}finally{xe=n}}}let zs=0;class Wg{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 $l{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||!Bt||xe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xe)n=this.activeLink=new Wg(xe,this),xe.deps?(n.prevDep=xe.depsTail,xe.depsTail.nextDep=n,xe.depsTail=n):xe.deps=xe.depsTail=n,kd(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++,zs++,this.notify(t)}notify(t){Il();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Pl()}}}function kd(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)kd(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const zi=new WeakMap,lr=Symbol(""),xa=Symbol(""),Us=Symbol("");function ft(e,t,n){if(Bt&&xe){let r=zi.get(e);r||zi.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new $l),s.map=r,s.key=n),s.track()}}function gn(e,t,n,r,s,i){const o=zi.get(e);if(!o){zs++;return}const a=l=>{l&&l.trigger()};if(Il(),t==="clear")o.forEach(a);else{const l=ee(e),c=l&&bo(n);if(l&&n==="length"){const u=Number(r);o.forEach((f,d)=>{(d==="length"||d===Us||!on(d)&&d>=u)&&a(f)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(Us)),t){case"add":l?c&&a(o.get("length")):(a(o.get(lr)),Ir(e)&&a(o.get(xa)));break;case"delete":l||(a(o.get(lr)),Ir(e)&&a(o.get(xa)));break;case"set":Ir(e)&&a(o.get(lr));break}}Pl()}function qg(e,t){const n=zi.get(e);return n&&n.get(t)}function vr(e){const t=ge(e);return t===e?t:(ft(t,"iterate",Us),Rt(e)?t:t.map(Vt))}function To(e){return ft(e=ge(e),"iterate",Us),e}function Ln(e,t){return An(e)?Lr(kn(e)?Vt(t):t):Vt(t)}const Kg={__proto__:null,[Symbol.iterator](){return Wo(this,Symbol.iterator,e=>Ln(this,e))},concat(...e){return vr(this).concat(...e.map(t=>ee(t)?vr(t):t))},entries(){return Wo(this,"entries",e=>(e[1]=Ln(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(r=>Ln(this,r)),arguments)},find(e,t){return an(this,"find",e,t,n=>Ln(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>Ln(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return qo(this,"includes",e)},indexOf(...e){return qo(this,"indexOf",e)},join(e){return vr(this).join(e)},lastIndexOf(...e){return qo(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return ts(this,"pop")},push(...e){return ts(this,"push",e)},reduce(e,...t){return Sc(this,"reduce",e,t)},reduceRight(e,...t){return Sc(this,"reduceRight",e,t)},shift(){return ts(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return ts(this,"splice",e)},toReversed(){return vr(this).toReversed()},toSorted(e){return vr(this).toSorted(e)},toSpliced(...e){return vr(this).toSpliced(...e)},unshift(...e){return ts(this,"unshift",e)},values(){return Wo(this,"values",e=>Ln(this,e))}};function Wo(e,t,n){const r=To(e),s=r[t]();return r!==e&&!Rt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const Jg=Array.prototype;function an(e,t,n,r,s,i){const o=To(e),a=o!==e&&!Rt(e),l=o[t];if(l!==Jg[t]){const f=l.apply(e,i);return a?Vt(f):f}let c=n;o!==e&&(a?c=function(f,d){return n.call(this,Ln(e,f),d,e)}:n.length>2&&(c=function(f,d){return n.call(this,f,d,e)}));const u=l.call(o,c,r);return a&&s?s(u):u}function Sc(e,t,n,r){const s=To(e);let i=n;return s!==e&&(Rt(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,Ln(e,a),l,e)}),s[t](i,...r)}function qo(e,t,n){const r=ge(e);ft(r,"iterate",Us);const s=r[t](...n);return(s===-1||s===!1)&&Oo(n[0])?(n[0]=ge(n[0]),r[t](...n)):s}function ts(e,t,n=[]){On(),Il();const r=ge(e)[t].apply(e,n);return Pl(),xn(),r}const Yg=xl("__proto__,__v_isRef,__isVue"),Td=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(on));function Xg(e){on(e)||(e=String(e));const t=ge(this);return ft(t,"has",e),t.hasOwnProperty(e)}class Od{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?l_:Rd:i?Cd:Ad).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=ee(t);if(!s){let l;if(o&&(l=Kg[n]))return l;if(n==="hasOwnProperty")return Xg}const a=Reflect.get(t,n,De(t)?t:r);if((on(n)?Td.has(n):Yg(n))||(s||ft(t,"get",n),i))return a;if(De(a)){const l=o&&bo(n)?a:a.value;return s&&me(l)?Ca(l):l}return me(a)?s?Ca(a):ri(a):a}}class xd extends Od{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=ee(t)&&bo(n);if(!this._isShallow){const c=An(i);if(!Rt(r)&&!An(r)&&(i=ge(i),r=ge(r)),!o&&De(i)&&!De(r))return c||(i.value=r),!0}const a=o?Number(n)<t.length:we(t,n),l=Reflect.set(t,n,r,De(t)?t:s);return t===ge(s)&&(a?Zn(r,i)&&gn(t,"set",n,r):gn(t,"add",n,r)),l}deleteProperty(t,n){const r=we(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&gn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!on(n)||!Td.has(n))&&ft(t,"has",n),r}ownKeys(t){return ft(t,"iterate",ee(t)?"length":lr),Reflect.ownKeys(t)}}class Qg extends Od{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const e_=new xd,t_=new Qg,n_=new xd(!0);const Aa=e=>e,fi=e=>Reflect.getPrototypeOf(e);function r_(e,t,n){return function(...r){const s=this.__v_raw,i=ge(s),o=Ir(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...r),u=n?Aa:t?Lr:Vt;return!t&&ft(i,"iterate",l?xa:lr),We(Object.create(c),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:a?[u(f[0]),u(f[1])]:u(f),done:d}}})}}function di(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function s_(e,t){const n={get(s){const i=this.__v_raw,o=ge(i),a=ge(s);e||(Zn(s,a)&&ft(o,"get",s),ft(o,"get",a));const{has:l}=fi(o),c=t?Aa:e?Lr:Vt;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ft(ge(s),"iterate",lr),s.size},has(s){const i=this.__v_raw,o=ge(i),a=ge(s);return e||(Zn(s,a)&&ft(o,"has",s),ft(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=ge(a),c=t?Aa:e?Lr:Vt;return!e&&ft(l,"iterate",lr),a.forEach((u,f)=>s.call(i,c(u),c(f),o))}};return We(n,e?{add:di("add"),set:di("set"),delete:di("delete"),clear:di("clear")}:{add(s){!t&&!Rt(s)&&!An(s)&&(s=ge(s));const i=ge(this);return fi(i).has.call(i,s)||(i.add(s),gn(i,"add",s,s)),this},set(s,i){!t&&!Rt(i)&&!An(i)&&(i=ge(i));const o=ge(this),{has:a,get:l}=fi(o);let c=a.call(o,s);c||(s=ge(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,i),c?Zn(i,u)&&gn(o,"set",s,i):gn(o,"add",s,i),this},delete(s){const i=ge(this),{has:o,get:a}=fi(i);let l=o.call(i,s);l||(s=ge(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&gn(i,"delete",s,void 0),c},clear(){const s=ge(this),i=s.size!==0,o=s.clear();return i&&gn(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=r_(s,e,t)}),n}function Dl(e,t){const n=s_(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 i_={get:Dl(!1,!1)},o_={get:Dl(!1,!0)},a_={get:Dl(!0,!1)};const Ad=new WeakMap,Cd=new WeakMap,Rd=new WeakMap,l_=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 u_(e){return e.__v_skip||!Object.isExtensible(e)?0:c_(Dg(e))}function ri(e){return An(e)?e:Ml(e,!1,e_,i_,Ad)}function Id(e){return Ml(e,!1,n_,o_,Cd)}function Ca(e){return Ml(e,!0,t_,a_,Rd)}function Ml(e,t,n,r,s){if(!me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=u_(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 kn(e){return An(e)?kn(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Rt(e){return!!(e&&e.__v_isShallow)}function Oo(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function Fl(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&cd(e,"__v_skip",!0),e}const Vt=e=>me(e)?ri(e):e,Lr=e=>me(e)?Ca(e):e;function De(e){return e?e.__v_isRef===!0:!1}function It(e){return Pd(e,!1)}function f_(e){return Pd(e,!0)}function Pd(e,t){return De(e)?e:new d_(e,t)}class d_{constructor(t,n){this.dep=new $l,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ge(t),this._value=n?t:Vt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Rt(t)||An(t);t=r?t:ge(t),Zn(t,n)&&(this._rawValue=t,this._value=r?t:Vt(t),this.dep.trigger())}}function Dt(e){return De(e)?e.value:e}const h_={get:(e,t,n)=>t==="__v_raw"?e:Dt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return De(s)&&!De(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Nd(e){return kn(e)?e:new Proxy(e,h_)}function p_(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=$d(e,n);return t}class g_{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ge(t);let s=!0,i=t;if(!ee(t)||!bo(String(n)))do s=!Oo(i)||Rt(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Dt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&De(this._raw[this._key])){const n=this._object[this._key];if(De(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return qg(this._raw,this._key)}}class __{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 nx(e,t,n){return De(e)?e:oe(e)?new __(e):me(e)&&arguments.length>1?$d(e,t,n):It(e)}function $d(e,t,n){return new g_(e,t,n)}class v_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new $l(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zs-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 yd(this,!0),!0}get value(){const t=this.dep.track();return Ed(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function m_(e,t,n=!1){let r,s;return oe(e)?r=e:(r=e.get,s=e.set),new v_(r,s,n)}const hi={},Ui=new WeakMap;let ir;function y_(e,t=!1,n=ir){if(n){let r=Ui.get(n);r||Ui.set(n,r=[]),r.push(e)}}function b_(e,t,n=Te){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Rt(E)||s===!1||s===0?_n(E,1):_n(E);let u,f,d,h,p=!1,g=!1;if(De(e)?(f=()=>e.value,p=Rt(e)):kn(e)?(f=()=>c(e),p=!0):ee(e)?(g=!0,p=e.some(E=>kn(E)||Rt(E)),f=()=>e.map(E=>{if(De(E))return E.value;if(kn(E))return c(E);if(oe(E))return l?l(E,2):E()})):oe(e)?t?f=l?()=>l(e,2):e:f=()=>{if(d){On();try{d()}finally{xn()}}const E=ir;ir=u;try{return l?l(e,3,[h]):e(h)}finally{ir=E}}:f=sn,t&&s){const E=f,m=s===!0?1/0:s;f=()=>_n(E(),m)}const y=_d(),T=()=>{u.stop(),y&&y.active&&Cl(y.effects,u)};if(i&&t){const E=t;t=(...m)=>{E(...m),T()}}let b=g?new Array(e.length).fill(hi):hi;const S=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(t){const m=u.run();if(s||p||(g?m.some(($,F)=>Zn($,b[F])):Zn(m,b))){d&&d();const $=ir;ir=u;try{const F=[m,b===hi?void 0:g&&b[0]===hi?[]:b,h];b=m,l?l(t,3,F):t(...F)}finally{ir=$}}}else u.run()};return a&&a(S),u=new vd(f),u.scheduler=o?()=>o(S,!1):S,h=E=>y_(E,!1,u),d=u.onStop=()=>{const E=Ui.get(u);if(E){if(l)l(E,4);else for(const m of E)m();Ui.delete(u)}},t?r?S(!0):b=u.run():o?o(S.bind(null,!0),!0):u.run(),T.pause=u.pause.bind(u),T.resume=u.resume.bind(u),T.stop=T,T}function _n(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--,De(e))_n(e.value,t,n);else if(ee(e))for(let r=0;r<e.length;r++)_n(e[r],t,n);else if(Jr(e)||Ir(e))e.forEach(r=>{_n(r,t,n)});else if(ld(e)){for(const r in e)_n(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&_n(e[r],t,n)}return e}/**
10
+ **/let ut;class pd{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=ut,!t&&ut&&(this.index=(ut.scopes||(ut.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=ut;try{return ut=this,t()}finally{ut=n}}}on(){++this._on===1&&(this.prevScope=ut,ut=this)}off(){this._on>0&&--this._on===0&&(ut=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 gd(e){return new pd(e)}function _d(){return ut}function Hg(e,t=!1){ut&&ut.cleanups.push(e)}let xe;const Go=new WeakSet;class vd{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,ut&&ut.active&&ut.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Go.has(this)&&(Go.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ec(this),bd(this);const t=xe,n=Bt;xe=this,Bt=!0;try{return this.fn()}finally{wd(this),xe=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Nl(t);this.deps=this.depsTail=void 0,Ec(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Go.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Oa(this)&&this.run()}get dirty(){return Oa(this)}}let md=0,Os,xs;function yd(e,t=!1){if(e.flags|=8,t){e.next=xs,xs=e;return}e.next=Os,Os=e}function Il(){md++}function Pl(){if(--md>0)return;if(xs){let t=xs;for(xs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Os;){let t=Os;for(Os=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 bd(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wd(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Nl(r),Gg(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Oa(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ed(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zs)||(e.globalVersion=zs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Oa(e))))return;e.flags|=2;const t=e.dep,n=xe,r=Bt;xe=e,Bt=!0;try{bd(e);const s=e.fn(e._value);(t.version===0||Zn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{xe=n,Bt=r,wd(e),e.flags&=-3}}function Nl(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)Nl(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Gg(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const Sd=[];function On(){Sd.push(Bt),Bt=!1}function xn(){const e=Sd.pop();Bt=e===void 0?!0:e}function Ec(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xe;xe=void 0;try{t()}finally{xe=n}}}let zs=0;class Wg{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 $l{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||!Bt||xe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xe)n=this.activeLink=new Wg(xe,this),xe.deps?(n.prevDep=xe.depsTail,xe.depsTail.nextDep=n,xe.depsTail=n):xe.deps=xe.depsTail=n,kd(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++,zs++,this.notify(t)}notify(t){Il();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Pl()}}}function kd(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)kd(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const zi=new WeakMap,lr=Symbol(""),xa=Symbol(""),Us=Symbol("");function ft(e,t,n){if(Bt&&xe){let r=zi.get(e);r||zi.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new $l),s.map=r,s.key=n),s.track()}}function gn(e,t,n,r,s,i){const o=zi.get(e);if(!o){zs++;return}const a=l=>{l&&l.trigger()};if(Il(),t==="clear")o.forEach(a);else{const l=ee(e),c=l&&bo(n);if(l&&n==="length"){const u=Number(r);o.forEach((f,d)=>{(d==="length"||d===Us||!on(d)&&d>=u)&&a(f)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(Us)),t){case"add":l?c&&a(o.get("length")):(a(o.get(lr)),Ir(e)&&a(o.get(xa)));break;case"delete":l||(a(o.get(lr)),Ir(e)&&a(o.get(xa)));break;case"set":Ir(e)&&a(o.get(lr));break}}Pl()}function qg(e,t){const n=zi.get(e);return n&&n.get(t)}function vr(e){const t=ge(e);return t===e?t:(ft(t,"iterate",Us),Rt(e)?t:t.map(Vt))}function To(e){return ft(e=ge(e),"iterate",Us),e}function Ln(e,t){return An(e)?Lr(kn(e)?Vt(t):t):Vt(t)}const Kg={__proto__:null,[Symbol.iterator](){return Wo(this,Symbol.iterator,e=>Ln(this,e))},concat(...e){return vr(this).concat(...e.map(t=>ee(t)?vr(t):t))},entries(){return Wo(this,"entries",e=>(e[1]=Ln(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(r=>Ln(this,r)),arguments)},find(e,t){return an(this,"find",e,t,n=>Ln(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>Ln(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return qo(this,"includes",e)},indexOf(...e){return qo(this,"indexOf",e)},join(e){return vr(this).join(e)},lastIndexOf(...e){return qo(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return ts(this,"pop")},push(...e){return ts(this,"push",e)},reduce(e,...t){return Sc(this,"reduce",e,t)},reduceRight(e,...t){return Sc(this,"reduceRight",e,t)},shift(){return ts(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return ts(this,"splice",e)},toReversed(){return vr(this).toReversed()},toSorted(e){return vr(this).toSorted(e)},toSpliced(...e){return vr(this).toSpliced(...e)},unshift(...e){return ts(this,"unshift",e)},values(){return Wo(this,"values",e=>Ln(this,e))}};function Wo(e,t,n){const r=To(e),s=r[t]();return r!==e&&!Rt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const Jg=Array.prototype;function an(e,t,n,r,s,i){const o=To(e),a=o!==e&&!Rt(e),l=o[t];if(l!==Jg[t]){const f=l.apply(e,i);return a?Vt(f):f}let c=n;o!==e&&(a?c=function(f,d){return n.call(this,Ln(e,f),d,e)}:n.length>2&&(c=function(f,d){return n.call(this,f,d,e)}));const u=l.call(o,c,r);return a&&s?s(u):u}function Sc(e,t,n,r){const s=To(e);let i=n;return s!==e&&(Rt(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,Ln(e,a),l,e)}),s[t](i,...r)}function qo(e,t,n){const r=ge(e);ft(r,"iterate",Us);const s=r[t](...n);return(s===-1||s===!1)&&Oo(n[0])?(n[0]=ge(n[0]),r[t](...n)):s}function ts(e,t,n=[]){On(),Il();const r=ge(e)[t].apply(e,n);return Pl(),xn(),r}const Yg=xl("__proto__,__v_isRef,__isVue"),Td=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(on));function Xg(e){on(e)||(e=String(e));const t=ge(this);return ft(t,"has",e),t.hasOwnProperty(e)}class Od{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?l_:Rd:i?Cd:Ad).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=ee(t);if(!s){let l;if(o&&(l=Kg[n]))return l;if(n==="hasOwnProperty")return Xg}const a=Reflect.get(t,n,De(t)?t:r);if((on(n)?Td.has(n):Yg(n))||(s||ft(t,"get",n),i))return a;if(De(a)){const l=o&&bo(n)?a:a.value;return s&&me(l)?Ca(l):l}return me(a)?s?Ca(a):ri(a):a}}class xd extends Od{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=ee(t)&&bo(n);if(!this._isShallow){const c=An(i);if(!Rt(r)&&!An(r)&&(i=ge(i),r=ge(r)),!o&&De(i)&&!De(r))return c||(i.value=r),!0}const a=o?Number(n)<t.length:we(t,n),l=Reflect.set(t,n,r,De(t)?t:s);return t===ge(s)&&(a?Zn(r,i)&&gn(t,"set",n,r):gn(t,"add",n,r)),l}deleteProperty(t,n){const r=we(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&gn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!on(n)||!Td.has(n))&&ft(t,"has",n),r}ownKeys(t){return ft(t,"iterate",ee(t)?"length":lr),Reflect.ownKeys(t)}}class Qg extends Od{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const e_=new xd,t_=new Qg,n_=new xd(!0);const Aa=e=>e,fi=e=>Reflect.getPrototypeOf(e);function r_(e,t,n){return function(...r){const s=this.__v_raw,i=ge(s),o=Ir(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...r),u=n?Aa:t?Lr:Vt;return!t&&ft(i,"iterate",l?xa:lr),We(Object.create(c),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:a?[u(f[0]),u(f[1])]:u(f),done:d}}})}}function di(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function s_(e,t){const n={get(s){const i=this.__v_raw,o=ge(i),a=ge(s);e||(Zn(s,a)&&ft(o,"get",s),ft(o,"get",a));const{has:l}=fi(o),c=t?Aa:e?Lr:Vt;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&ft(ge(s),"iterate",lr),s.size},has(s){const i=this.__v_raw,o=ge(i),a=ge(s);return e||(Zn(s,a)&&ft(o,"has",s),ft(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=ge(a),c=t?Aa:e?Lr:Vt;return!e&&ft(l,"iterate",lr),a.forEach((u,f)=>s.call(i,c(u),c(f),o))}};return We(n,e?{add:di("add"),set:di("set"),delete:di("delete"),clear:di("clear")}:{add(s){!t&&!Rt(s)&&!An(s)&&(s=ge(s));const i=ge(this);return fi(i).has.call(i,s)||(i.add(s),gn(i,"add",s,s)),this},set(s,i){!t&&!Rt(i)&&!An(i)&&(i=ge(i));const o=ge(this),{has:a,get:l}=fi(o);let c=a.call(o,s);c||(s=ge(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,i),c?Zn(i,u)&&gn(o,"set",s,i):gn(o,"add",s,i),this},delete(s){const i=ge(this),{has:o,get:a}=fi(i);let l=o.call(i,s);l||(s=ge(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&gn(i,"delete",s,void 0),c},clear(){const s=ge(this),i=s.size!==0,o=s.clear();return i&&gn(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=r_(s,e,t)}),n}function Dl(e,t){const n=s_(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 i_={get:Dl(!1,!1)},o_={get:Dl(!1,!0)},a_={get:Dl(!0,!1)};const Ad=new WeakMap,Cd=new WeakMap,Rd=new WeakMap,l_=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 u_(e){return e.__v_skip||!Object.isExtensible(e)?0:c_(Dg(e))}function ri(e){return An(e)?e:Ml(e,!1,e_,i_,Ad)}function Id(e){return Ml(e,!1,n_,o_,Cd)}function Ca(e){return Ml(e,!0,t_,a_,Rd)}function Ml(e,t,n,r,s){if(!me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=u_(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 kn(e){return An(e)?kn(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Rt(e){return!!(e&&e.__v_isShallow)}function Oo(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function Fl(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&cd(e,"__v_skip",!0),e}const Vt=e=>me(e)?ri(e):e,Lr=e=>me(e)?Ca(e):e;function De(e){return e?e.__v_isRef===!0:!1}function It(e){return Pd(e,!1)}function f_(e){return Pd(e,!0)}function Pd(e,t){return De(e)?e:new d_(e,t)}class d_{constructor(t,n){this.dep=new $l,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ge(t),this._value=n?t:Vt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Rt(t)||An(t);t=r?t:ge(t),Zn(t,n)&&(this._rawValue=t,this._value=r?t:Vt(t),this.dep.trigger())}}function Dt(e){return De(e)?e.value:e}const h_={get:(e,t,n)=>t==="__v_raw"?e:Dt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return De(s)&&!De(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Nd(e){return kn(e)?e:new Proxy(e,h_)}function p_(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=$d(e,n);return t}class g_{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ge(t);let s=!0,i=t;if(!ee(t)||!bo(String(n)))do s=!Oo(i)||Rt(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Dt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&De(this._raw[this._key])){const n=this._object[this._key];if(De(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return qg(this._raw,this._key)}}class __{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 tx(e,t,n){return De(e)?e:oe(e)?new __(e):me(e)&&arguments.length>1?$d(e,t,n):It(e)}function $d(e,t,n){return new g_(e,t,n)}class v_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new $l(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zs-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 yd(this,!0),!0}get value(){const t=this.dep.track();return Ed(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function m_(e,t,n=!1){let r,s;return oe(e)?r=e:(r=e.get,s=e.set),new v_(r,s,n)}const hi={},Ui=new WeakMap;let ir;function y_(e,t=!1,n=ir){if(n){let r=Ui.get(n);r||Ui.set(n,r=[]),r.push(e)}}function b_(e,t,n=Te){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Rt(E)||s===!1||s===0?_n(E,1):_n(E);let u,f,d,h,p=!1,g=!1;if(De(e)?(f=()=>e.value,p=Rt(e)):kn(e)?(f=()=>c(e),p=!0):ee(e)?(g=!0,p=e.some(E=>kn(E)||Rt(E)),f=()=>e.map(E=>{if(De(E))return E.value;if(kn(E))return c(E);if(oe(E))return l?l(E,2):E()})):oe(e)?t?f=l?()=>l(e,2):e:f=()=>{if(d){On();try{d()}finally{xn()}}const E=ir;ir=u;try{return l?l(e,3,[h]):e(h)}finally{ir=E}}:f=sn,t&&s){const E=f,m=s===!0?1/0:s;f=()=>_n(E(),m)}const y=_d(),T=()=>{u.stop(),y&&y.active&&Cl(y.effects,u)};if(i&&t){const E=t;t=(...m)=>{E(...m),T()}}let b=g?new Array(e.length).fill(hi):hi;const S=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(t){const m=u.run();if(s||p||(g?m.some(($,F)=>Zn($,b[F])):Zn(m,b))){d&&d();const $=ir;ir=u;try{const F=[m,b===hi?void 0:g&&b[0]===hi?[]:b,h];b=m,l?l(t,3,F):t(...F)}finally{ir=$}}}else u.run()};return a&&a(S),u=new vd(f),u.scheduler=o?()=>o(S,!1):S,h=E=>y_(E,!1,u),d=u.onStop=()=>{const E=Ui.get(u);if(E){if(l)l(E,4);else for(const m of E)m();Ui.delete(u)}},t?r?S(!0):b=u.run():o?o(S.bind(null,!0),!0):u.run(),T.pause=u.pause.bind(u),T.resume=u.resume.bind(u),T.stop=T,T}function _n(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--,De(e))_n(e.value,t,n);else if(ee(e))for(let r=0;r<e.length;r++)_n(e[r],t,n);else if(Jr(e)||Ir(e))e.forEach(r=>{_n(r,t,n)});else if(ld(e)){for(const r in e)_n(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&_n(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 si(e,t,n,r){try{return r?e(...r):e()}catch(s){Yr(s,t,n)}}function Zt(e,t,n,r){if(oe(e)){const s=si(e,t,n,r);return s&&od(s)&&s.catch(i=>{Yr(i,t,n)}),s}if(ee(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Zt(e[i],t,n,r));return s}}function Yr(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Te;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,l,c)===!1)return}a=a.parent}if(i){On(),si(i,null,10,[e,l,c]),xn();return}}w_(e,n,s,r,o)}function w_(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const vt=[];let Xt=-1;const Pr=[];let zn=null,Er=0;const Dd=Promise.resolve();let ji=null;function xo(e){const t=ji||Dd;return e?t.then(this?e.bind(this):e):t}function E_(e){let t=Xt+1,n=vt.length;for(;t<n;){const r=t+n>>>1,s=vt[r],i=js(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Ll(e){if(!(e.flags&1)){const t=js(e),n=vt[vt.length-1];!n||!(e.flags&2)&&t>=js(n)?vt.push(e):vt.splice(E_(t),0,e),e.flags|=1,Md()}}function Md(){ji||(ji=Dd.then(Ld))}function Ra(e){ee(e)?Pr.push(...e):zn&&e.id===-1?zn.splice(Er+1,0,e):e.flags&1||(Pr.push(e),e.flags|=1),Md()}function kc(e,t,n=Xt+1){for(;n<vt.length;n++){const r=vt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;vt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Fd(e){if(Pr.length){const t=[...new Set(Pr)].sort((n,r)=>js(n)-js(r));if(Pr.length=0,zn){zn.push(...t);return}for(zn=t,Er=0;Er<zn.length;Er++){const n=zn[Er];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}zn=null,Er=0}}const js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ld(e){try{for(Xt=0;Xt<vt.length;Xt++){const t=vt[Xt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),si(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xt<vt.length;Xt++){const t=vt[Xt];t&&(t.flags&=-2)}Xt=-1,vt.length=0,Fd(),ji=null,(vt.length||Pr.length)&&Ld()}}let At=null,zd=null;function Bi(e){const t=At;return At=e,zd=e&&e.type.__scopeId||null,t}function Bs(e,t=At,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Hi(-1);const i=Bi(t);let o;try{o=e(...s)}finally{Bi(i),r._d&&Hi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function rx(e,t){if(At===null)return e;const n=Po(At),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Te]=t[s];i&&(oe(i)&&(i={mounted:i,updated:i}),i.deep&&_n(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function er(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&&(On(),Zt(l,n,8,[e.el,a,e,t]),xn())}}function Ri(e,t){if(ot){let n=ot.provides;const r=ot.parent&&ot.parent.provides;r===n&&(n=ot.provides=Object.create(r)),n[e]=t}}function Pt(e,t,n=!1){const r=oi();if(r||cr){let s=cr?cr._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&&oe(t)?t.call(r&&r.proxy):t}}function Ud(){return!!(oi()||cr)}const S_=Symbol.for("v-scx"),k_=()=>Pt(S_);function Nr(e,t,n){return jd(e,t,n)}function jd(e,t,n=Te){const{immediate:r,deep:s,flush:i,once:o}=n,a=We({},n),l=t&&r||!t&&i!=="post";let c;if(Ur){if(i==="sync"){const h=k_();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=sn,h.resume=sn,h.pause=sn,h}}const u=ot;a.call=(h,p,g)=>Zt(h,u,p,g);let f=!1;i==="post"?a.scheduler=h=>{nt(h,u&&u.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(h,p)=>{p?h():Ll(h)}),a.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const d=b_(e,t,a);return Ur&&(c?c.push(d):l&&d()),d}function T_(e,t,n){const r=this.proxy,s=ze(e)?e.includes(".")?Bd(r,e):()=>r[e]:e.bind(r,r);let i;oe(t)?i=t:(i=t.handler,n=t);const o=ai(this),a=jd(s,i.bind(r),n);return o(),a}function Bd(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 Vd=Symbol("_vte"),Zd=e=>e.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),Tc=e=>e&&(e.defer||e.defer===""),Oc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ia=(e,t)=>{const n=e&&e.to;return ze(n)?t?t(n):null:n},Hd={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,c){const{mc:u,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:y}}=c,T=As(t.props);let{shapeFlag:b,children:S,dynamicChildren:E}=t;if(e==null){const m=t.el=g(""),$=t.anchor=g("");h(m,n,r),h($,n,r);const F=(R,L)=>{b&16&&u(S,R,L,s,i,o,a,l)},C=()=>{const R=t.target=Ia(t.props,p),L=Pa(R,t,g,h);R&&(o!=="svg"&&Oc(R)?o="svg":o!=="mathml"&&xc(R)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(R),T||(F(R,L),Ii(t,!1)))};T&&(F(n,$),Ii(t,!0)),Tc(t.props)?(t.el.__isMounted=!1,nt(()=>{C(),delete t.el.__isMounted},i)):C()}else{if(Tc(t.props)&&e.el.__isMounted===!1){nt(()=>{Hd.process(e,t,n,r,s,i,o,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const m=t.anchor=e.anchor,$=t.target=e.target,F=t.targetAnchor=e.targetAnchor,C=As(e.props),R=C?n:$,L=C?m:F;if(o==="svg"||Oc($)?o="svg":(o==="mathml"||xc($))&&(o="mathml"),E?(d(e.dynamicChildren,E,R,s,i,o,a),Hl(e,t,!0)):l||f(e,t,R,L,s,i,o,a,!1),T)C?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):pi(t,n,m,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Y=t.target=Ia(t.props,p);Y&&pi(t,Y,null,c,0)}else C&&pi(t,$,F,c,1);Ii(t,T)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:d}=e;if(f&&(s(c),s(u)),i&&s(l),o&16){const h=i||!As(d);for(let p=0;p<a.length;p++){const g=a[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:pi,hydrate:O_};function pi(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:c,props:u}=e,f=i===2;if(f&&r(o,t,n),(!f||As(u))&&l&16)for(let d=0;d<c.length;d++)s(c[d],t,n,2);f&&r(a,t,n)}function O_(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},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=Ia(t.props,l),g=As(t.props);if(p){const y=p._lpa||p.firstChild;t.shapeFlag&16&&(g?(h(e,t),d(p,y),t.targetAnchor||Pa(p,t,u,c,a(e)===p?e:null)):(t.anchor=o(e),d(p,y),t.targetAnchor||Pa(p,t,u,c),f(y&&o(y),t,p,n,r,s,i))),Ii(t,g)}else g&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const x_=Hd;function Ii(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 Pa(e,t,n,r,s=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Vd]=o,e&&(r(i,e,s),r(o,e,s)),o}const Qt=Symbol("_leaveCb"),ns=Symbol("_enterCb");function Gd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xr(()=>{e.isMounted=!0}),Qd(()=>{e.isUnmounting=!0}),e}const Nt=[Function,Array],Wd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Nt,onEnter:Nt,onAfterEnter:Nt,onEnterCancelled:Nt,onBeforeLeave:Nt,onLeave:Nt,onAfterLeave:Nt,onLeaveCancelled:Nt,onBeforeAppear:Nt,onAppear:Nt,onAfterAppear:Nt,onAppearCancelled:Nt},qd=e=>{const t=e.subTree;return t.component?qd(t.component):t},A_={name:"BaseTransition",props:Wd,setup(e,{slots:t}){const n=oi(),r=Gd();return()=>{const s=t.default&&zl(t.default(),!0);if(!s||!s.length)return;const i=Kd(s),o=ge(e),{mode:a}=o;if(r.isLeaving)return Ko(i);const l=Ac(i);if(!l)return Ko(i);let c=Vs(l,o,r,n,f=>c=f);l.type!==it&&fr(l,c);let u=n.subTree&&Ac(n.subTree);if(u&&u.type!==it&&!tn(u,l)&&qd(n).type!==it){let f=Vs(u,o,r,n);if(fr(u,f),a==="out-in"&&l.type!==it)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},Ko(i);a==="in-out"&&l.type!==it?f.delayLeave=(d,h,p)=>{const g=Jd(r,u);g[String(u.key)]=u,d[Qt]=()=>{h(),d[Qt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Kd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==it){t=n;break}}return t}const C_=A_;function Jd(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 Vs(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:y,onAppear:T,onAfterAppear:b,onAppearCancelled:S}=t,E=String(e.key),m=Jd(n,e),$=(R,L)=>{R&&Zt(R,r,9,L)},F=(R,L)=>{const Y=L[1];$(R,L),ee(R)?R.every(M=>M.length<=1)&&Y():R.length<=1&&Y()},C={mode:o,persisted:a,beforeEnter(R){let L=l;if(!n.isMounted)if(i)L=y||l;else return;R[Qt]&&R[Qt](!0);const Y=m[E];Y&&tn(e,Y)&&Y.el[Qt]&&Y.el[Qt](),$(L,[R])},enter(R){if(m[E]===e)return;let L=c,Y=u,M=f;if(!n.isMounted)if(i)L=T||c,Y=b||u,M=S||f;else return;let te=!1;R[ns]=_e=>{te||(te=!0,_e?$(M,[R]):$(Y,[R]),C.delayedLeave&&C.delayedLeave(),R[ns]=void 0)};const ce=R[ns].bind(null,!1);L?F(L,[R,ce]):ce()},leave(R,L){const Y=String(e.key);if(R[ns]&&R[ns](!0),n.isUnmounting)return L();$(d,[R]);let M=!1;R[Qt]=ce=>{M||(M=!0,L(),ce?$(g,[R]):$(p,[R]),R[Qt]=void 0,m[Y]===e&&delete m[Y])};const te=R[Qt].bind(null,!1);m[Y]=e,h?F(h,[R,te]):te()},clone(R){const L=Vs(R,t,n,r,s);return s&&s(L),L}};return C}function Ko(e){if(ii(e))return e=qn(e),e.children=null,e}function Ac(e){if(!ii(e))return Zd(e.type)&&e.children?Kd(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&&oe(n.default))return n.default()}}function fr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,fr(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 zl(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===dt?(o.patchFlag&128&&s++,r=r.concat(zl(o.children,t,a))):(t||o.type!==it)&&r.push(a!=null?qn(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Ul(e,t){return oe(e)?We({name:e.name},t,{setup:e}):e}function sx(){const e=oi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function jl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Vi=new WeakMap;function Cs(e,t,n,r,s=!1){if(ee(e)){e.forEach((g,y)=>Cs(g,t&&(ee(t)?t[y]:t),n,r,s));return}if(Rs(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Cs(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Po(r.component):r.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Te?a.refs={}:a.refs,f=a.setupState,d=ge(f),h=f===Te?id:g=>Cc(u,g)?!1:we(d,g),p=(g,y)=>!(y&&Cc(u,y));if(c!=null&&c!==l){if(Rc(t),ze(c))u[c]=null,h(c)&&(f[c]=null);else if(De(c)){const g=t;p(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(oe(l))si(l,a,12,[o,u]);else{const g=ze(l),y=De(l);if(g||y){const T=()=>{if(e.f){const b=g?h(l)?f[l]:u[l]:p()||!e.k?l.value:u[e.k];if(s)ee(b)&&Cl(b,i);else if(ee(b))b.includes(i)||b.push(i);else if(g)u[l]=[i],h(l)&&(f[l]=u[l]);else{const S=[i];p(l,e.k)&&(l.value=S),e.k&&(u[e.k]=S)}}else g?(u[l]=o,h(l)&&(f[l]=o)):y&&(p(l,e.k)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const b=()=>{T(),Vi.delete(e)};b.id=-1,Vi.set(e,b),nt(b,n)}else Rc(e),T()}}}function Rc(e){const t=Vi.get(e);t&&(t.flags|=8,Vi.delete(e))}const Ic=e=>e.nodeType===8;ko().requestIdleCallback;ko().cancelIdleCallback;function R_(e,t){if(Ic(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Ic(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Rs=e=>!!e.type.__asyncLoader;function ix(e){oe(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 c=null,u,f=0;const d=()=>(f++,c=null,h()),h=()=>{let p;return c||(p=c=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!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return Ul({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=>R_(p,m));E&&(g.bum||(g.bum=[])).push(E)}:b;u?S():h().then(()=>!g.isUnmounted&&S())},get __asyncResolved(){return u},setup(){const p=ot;if(jl(p),u)return()=>gi(u,p);const g=S=>{c=null,Yr(S,p,13,!r)};if(a&&p.suspense||Ur)return h().then(S=>()=>gi(S,p)).catch(S=>(g(S),()=>r?Re(r,{error:S}):null));const y=It(!1),T=It(),b=It(!!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&&ii(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),T.value=S}),()=>{if(y.value&&u)return gi(u,p);if(T.value&&r)return Re(r,{error:T.value});if(n&&!b.value)return gi(n,p)}}})}function gi(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=Re(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const ii=e=>e.type.__isKeepAlive;function I_(e,t){Yd(e,"a",t)}function P_(e,t){Yd(e,"da",t)}function Yd(e,t,n=ot){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ao(t,r,n),n){let s=n.parent;for(;s&&s.parent;)ii(s.parent.vnode)&&N_(r,t,n,s),s=s.parent}}function N_(e,t,n,r){const s=Ao(t,e,r,!0);Yn(()=>{Cl(r[t],s)},n)}function Ao(e,t,n=ot,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{On();const a=ai(n),l=Zt(t,n,e,o);return a(),xn(),l});return r?s.unshift(i):s.push(i),i}}const Rn=e=>(t,n=ot)=>{(!Ur||e==="sp")&&Ao(e,(...r)=>t(...r),n)},$_=Rn("bm"),Xr=Rn("m"),D_=Rn("bu"),Xd=Rn("u"),Qd=Rn("bum"),Yn=Rn("um"),M_=Rn("sp"),F_=Rn("rtg"),L_=Rn("rtc");function z_(e,t=ot){Ao("ec",e,t)}const U_="components";function Pc(e,t){return B_(U_,e,!0,t)||e}const j_=Symbol.for("v-ndc");function B_(e,t,n=!0,r=!1){const s=At||ot;if(s){const i=s.type;{const a=Nv(i,!1);if(a&&(a===t||a===zt(t)||a===Eo(zt(t))))return i}const o=Nc(s[e]||i[e],t)||Nc(s.appContext[e],t);return!o&&r?i:o}}function Nc(e,t){return e&&(e[t]||e[zt(t)]||e[Eo(zt(t))])}function V_(e,t,n,r){let s;const i=n,o=ee(e);if(o||ze(e)){const a=o&&kn(e);let l=!1,c=!1;a&&(l=!Rt(e),c=An(e),e=To(e)),s=new Array(e.length);for(let u=0,f=e.length;u<f;u++)s[u]=t(l?c?Lr(Vt(e[u])):Vt(e[u]):e[u],u,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,c=a.length;l<c;l++){const u=a[l];s[l]=t(e[u],u,l,i)}}else s=[];return s}const Na=e=>e?bh(e)?Po(e):Na(e.parent):null,Is=We(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=>Na(e.parent),$root:e=>Na(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>th(e),$forceUpdate:e=>e.f||(e.f=()=>{Ll(e.update)}),$nextTick:e=>e.n||(e.n=xo.bind(e.proxy)),$watch:e=>T_.bind(e)}),Jo=(e,t)=>e!==Te&&!e.__isScriptSetup&&we(e,t),Z_={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(Jo(r,t))return o[t]=1,r[t];if(s!==Te&&we(s,t))return o[t]=2,s[t];if(we(i,t))return o[t]=3,i[t];if(n!==Te&&we(n,t))return o[t]=4,n[t];$a&&(o[t]=0)}}const c=Is[t];let u,f;if(c)return t==="$attrs"&&ft(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Te&&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 Jo(s,t)?(s[t]=n,!0):r!==Te&&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!==Te&&a[0]!=="$"&&we(e,a)||Jo(t,a)||we(i,a)||we(r,a)||we(Is,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 $c(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let $a=!0;function H_(e){const t=th(e),n=e.proxy,r=e.ctx;$a=!1,t.beforeCreate&&Dc(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:y,beforeDestroy:T,beforeUnmount:b,destroyed:S,unmounted:E,render:m,renderTracked:$,renderTriggered:F,errorCaptured:C,serverPrefetch:R,expose:L,inheritAttrs:Y,components:M,directives:te,filters:ce}=t;if(c&&G_(c,r,null),o)for(const O in o){const se=o[O];oe(se)&&(r[O]=se.bind(n))}if(s){const O=s.call(n,n);me(O)&&(e.data=ri(O))}if($a=!0,i)for(const O in i){const se=i[O],Be=oe(se)?se.bind(n,n):oe(se.get)?se.get.bind(n,n):sn,et=!oe(se)&&oe(se.set)?se.set.bind(n):sn,tt=Ce({get:Be,set:et});Object.defineProperty(r,O,{enumerable:!0,configurable:!0,get:()=>tt.value,set:ye=>tt.value=ye})}if(a)for(const O in a)eh(a[O],r,n,O);if(l){const O=oe(l)?l.call(n):l;Reflect.ownKeys(O).forEach(se=>{Ri(se,O[se])})}u&&Dc(u,e,"c");function le(O,se){ee(se)?se.forEach(Be=>O(Be.bind(n))):se&&O(se.bind(n))}if(le($_,f),le(Xr,d),le(D_,h),le(Xd,p),le(I_,g),le(P_,y),le(z_,C),le(L_,$),le(F_,F),le(Qd,b),le(Yn,E),le(M_,R),ee(L))if(L.length){const O=e.exposed||(e.exposed={});L.forEach(se=>{Object.defineProperty(O,se,{get:()=>n[se],set:Be=>n[se]=Be,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===sn&&(e.render=m),Y!=null&&(e.inheritAttrs=Y),M&&(e.components=M),te&&(e.directives=te),R&&jl(e)}function G_(e,t,n=sn){ee(e)&&(e=Da(e));for(const r in e){const s=e[r];let i;me(s)?"default"in s?i=Pt(s.from||r,s.default,!0):i=Pt(s.from||r):i=Pt(s),De(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Dc(e,t,n){Zt(ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function eh(e,t,n,r){let s=r.includes(".")?Bd(n,r):()=>n[r];if(ze(e)){const i=t[e];oe(i)&&Nr(s,i)}else if(oe(e))Nr(s,e.bind(n));else if(me(e))if(ee(e))e.forEach(i=>eh(i,t,n,r));else{const i=oe(e.handler)?e.handler.bind(n):t[e.handler];oe(i)&&Nr(s,i,e)}}function th(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(c=>Zi(l,c,o,!0)),Zi(l,t,o)),me(t)&&i.set(t,l),l}function Zi(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Zi(e,i,n,!0),s&&s.forEach(o=>Zi(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=W_[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const W_={data:Mc,props:Fc,emits:Fc,methods:gs,computed:gs,beforeCreate:ht,created:ht,beforeMount:ht,mounted:ht,beforeUpdate:ht,updated:ht,beforeDestroy:ht,beforeUnmount:ht,destroyed:ht,unmounted:ht,activated:ht,deactivated:ht,errorCaptured:ht,serverPrefetch:ht,components:gs,directives:gs,watch:K_,provide:Mc,inject:q_};function Mc(e,t){return t?e?function(){return We(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function q_(e,t){return gs(Da(e),Da(t))}function Da(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ht(e,t){return e?[...new Set([].concat(e,t))]:t}function gs(e,t){return e?We(Object.create(null),e,t):t}function Fc(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:We(Object.create(null),$c(e),$c(t??{})):t}function K_(e,t){if(!e)return t;if(!t)return e;const n=We(Object.create(null),e);for(const r in t)n[r]=ht(e[r],t[r]);return n}function nh(){return{app:null,config:{isNativeTag:id,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 J_=0;function Y_(e,t){return function(r,s=null){oe(r)||(r=We({},r)),s!=null&&!me(s)&&(s=null);const i=nh(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:J_++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:Dv,get config(){return i.config},set config(u){},use(u,...f){return o.has(u)||(u&&oe(u.install)?(o.add(u),u.install(c,...f)):oe(u)&&(o.add(u),u(c,...f))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,f){return f?(i.components[u]=f,c):i.components[u]},directive(u,f){return f?(i.directives[u]=f,c):i.directives[u]},mount(u,f,d){if(!l){const h=c._ceVNode||Re(r,s);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,u,d),l=!0,c._container=u,u.__vue_app__=c,Po(h.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Zt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return i.provides[u]=f,c},runWithContext(u){const f=cr;cr=c;try{return u()}finally{cr=f}}};return c}}let cr=null;const X_=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${zt(t)}Modifiers`]||e[`${Jn(t)}Modifiers`];function Q_(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Te;let s=n;const i=t.startsWith("update:"),o=i&&X_(r,t.slice(7));o&&(o.trim&&(s=n.map(u=>ze(u)?u.trim():u)),o.number&&(s=n.map(So)));let a,l=r[a=Zo(t)]||r[a=Zo(zt(t))];!l&&i&&(l=r[a=Zo(Jn(t))]),l&&Zt(l,e,6,s);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Zt(c,e,6,s)}}const ev=new WeakMap;function rh(e,t,n=!1){const r=n?ev:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!oe(e)){const l=c=>{const u=rh(c,t,!0);u&&(a=!0,We(o,u))};!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):We(o,i),me(e)&&r.set(e,o),o)}function Co(e,t){return!e||!yo(t)?!1:(t=t.slice(2).replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,Jn(t))||we(e,t))}function Lc(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e,y=Bi(e);let T,b;try{if(n.shapeFlag&4){const E=s||r,m=E;T=jt(c.call(m,E,u,f,h,d,p)),b=a}else{const E=t;T=jt(E.length>1?E(f,{attrs:a,slots:o,emit:l}):E(f,null)),b=t.props?a:nv(a)}}catch(E){Ps.length=0,Yr(E,e,1),T=Re(it)}let S=T;if(b&&g!==!1){const E=Object.keys(b),{shapeFlag:m}=S;E.length&&m&7&&(i&&E.some(Al)&&(b=rv(b,i)),S=qn(S,b,!1,!0))}return n.dirs&&(S=qn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&fr(S,n.transition),T=S,Bi(y),T}function tv(e,t=!0){let n;for(let r=0;r<e.length;r++){const s=e[r];if(Hs(s)){if(s.type!==it||s.children==="v-if"){if(n)return;n=s}}else return}return n}const nv=e=>{let t;for(const n in e)(n==="class"||n==="style"||yo(n))&&((t||(t={}))[n]=e[n]);return t},rv=(e,t)=>{const n={};for(const r in e)(!Al(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,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?zc(r,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const d=u[f];if(sh(o,r,d)&&!Co(c,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?zc(r,o,c):!0:!!o;return!1}function zc(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(sh(t,e,i)&&!Co(n,i))return!0}return!1}function sh(e,t,n){const r=e[n],s=t[n];return n==="style"&&me(r)&&me(s)?!Wn(r,s):r!==s}function Bl({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 ih={},oh=()=>Object.create(ih),ah=e=>Object.getPrototypeOf(e)===ih;function iv(e,t,n,r=!1){const s={},i=oh();e.propsDefaults=Object.create(null),lh(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Id(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function ov(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ge(s),[l]=e.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let d=u[f];if(Co(e.emitsOptions,d))continue;const h=t[d];if(l)if(we(i,d))h!==i[d]&&(i[d]=h,c=!0);else{const p=zt(d);s[p]=Ma(l,a,p,h,e,!1)}else h!==i[d]&&(i[d]=h,c=!0)}}}else{lh(e,t,s,i)&&(c=!0);let u;for(const f in a)(!t||!we(t,f)&&((u=Jn(f))===f||!we(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=Ma(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],c=!0)}c&&gn(e.attrs,"set","")}function lh(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Ts(l))continue;const c=t[l];let u;s&&we(s,u=zt(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:Co(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(i){const l=ge(n),c=a||Te;for(let u=0;u<i.length;u++){const f=i[u];n[f]=Ma(s,l,f,c[f],e,!we(c,f))}}return o}function Ma(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&&oe(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=ai(s);r=c[n]=l.call(null,t),u()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Jn(n))&&(r=!0))}return r}const av=new WeakMap;function ch(e,t,n=!1){const r=n?av:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!oe(e)){const u=f=>{l=!0;const[d,h]=ch(f,t,!0);We(o,d),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return me(e)&&r.set(e,Rr),Rr;if(ee(i))for(let u=0;u<i.length;u++){const f=zt(i[u]);Uc(f)&&(o[f]=Te)}else if(i)for(const u in i){const f=zt(u);if(Uc(f)){const d=i[u],h=o[f]=ee(d)||oe(d)?{type:d}:We({},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=oe(b)&&b.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(y=!1)}else g=oe(p)&&p.name==="Boolean";h[0]=g,h[1]=y,(g||we(h,"default"))&&a.push(f)}}const c=[o,a];return me(e)&&r.set(e,c),c}function Uc(e){return e[0]!=="$"&&!Ts(e)}const Vl=e=>e==="_"||e==="_ctx"||e==="$stable",Zl=e=>ee(e)?e.map(jt):[jt(e)],lv=(e,t,n)=>{if(t._n)return t;const r=Bs((...s)=>Zl(t(...s)),n);return r._c=!1,r},uh=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Vl(s))continue;const i=e[s];if(oe(i))t[s]=lv(s,i,r);else if(i!=null){const o=Zl(i);t[s]=()=>o}}},fh=(e,t)=>{const n=Zl(t);e.slots.default=()=>n},dh=(e,t,n)=>{for(const r in t)(n||!Vl(r))&&(e[r]=t[r])},cv=(e,t,n)=>{const r=e.slots=oh();if(e.vnode.shapeFlag&32){const s=t._;s?(dh(r,t,n),n&&cd(r,"_",s,!0)):uh(t,r)}else t&&fh(e,t)},uv=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Te;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:dh(s,t,n):(i=!t.$stable,uh(t,s)),o=t}else t&&(fh(e,t),o={default:1});if(i)for(const a in s)!Vl(a)&&o[a]==null&&delete s[a]},nt=bv;function fv(e){return dv(e)}function dv(e,t){const n=ko();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=sn,insertStaticContent:p}=e,g=(_,v,w,x=null,N=null,A=null,G=void 0,U=null,z=!!v.dynamicChildren)=>{if(_===v)return;_&&!tn(_,v)&&(x=I(_),ye(_,N,A,!0),_=null),v.patchFlag===-2&&(z=!1,v.dynamicChildren=null);const{type:D,ref:ie,shapeFlag:q}=v;switch(D){case Ro:y(_,v,w,x);break;case it:T(_,v,w,x);break;case Pi:_==null&&b(v,w,x,G);break;case dt:M(_,v,w,x,N,A,G,U,z);break;default:q&1?m(_,v,w,x,N,A,G,U,z):q&6?te(_,v,w,x,N,A,G,U,z):(q&64||q&128)&&D.process(_,v,w,x,N,A,G,U,z,J)}ie!=null&&N?Cs(ie,_&&_.ref,A,v||_,!v):ie==null&&_&&_.ref!=null&&Cs(_.ref,null,A,_,!0)},y=(_,v,w,x)=>{if(_==null)r(v.el=a(v.children),w,x);else{const N=v.el=_.el;v.children!==_.children&&c(N,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 N;for(;_&&_!==v;)N=d(_),r(_,w,x),_=N;r(v,w,x)},E=({el:_,anchor:v})=>{let w;for(;_&&_!==v;)w=d(_),s(_),_=w;s(v)},m=(_,v,w,x,N,A,G,U,z)=>{if(v.type==="svg"?G="svg":v.type==="math"&&(G="mathml"),_==null)$(v,w,x,N,A,G,U,z);else{const D=_.el&&_.el._isVueCE?_.el:null;try{D&&D._beginPatch(),R(_,v,N,A,G,U,z)}finally{D&&D._endPatch()}}},$=(_,v,w,x,N,A,G,U)=>{let z,D;const{props:ie,shapeFlag:q,transition:ne,dirs:ae}=_;if(z=_.el=o(_.type,A,ie&&ie.is,ie),q&8?u(z,_.children):q&16&&C(_.children,z,null,x,N,Yo(_,A),G,U),ae&&er(_,null,x,"created"),F(z,_,_.scopeId,G,x),ie){for(const Oe in ie)Oe!=="value"&&!Ts(Oe)&&i(z,Oe,null,ie[Oe],A,x);"value"in ie&&i(z,"value",null,ie.value,A),(D=ie.onVnodeBeforeMount)&&Jt(D,x,_)}ae&&er(_,null,x,"beforeMount");const pe=hv(N,ne);pe&&ne.beforeEnter(z),r(z,v,w),((D=ie&&ie.onVnodeMounted)||pe||ae)&&nt(()=>{D&&Jt(D,x,_),pe&&ne.enter(z),ae&&er(_,null,x,"mounted")},N)},F=(_,v,w,x,N)=>{if(w&&h(_,w),x)for(let A=0;A<x.length;A++)h(_,x[A]);if(N){let A=N.subTree;if(v===A||gh(A.type)&&(A.ssContent===v||A.ssFallback===v)){const G=N.vnode;F(_,G,G.scopeId,G.slotScopeIds,N.parent)}}},C=(_,v,w,x,N,A,G,U,z=0)=>{for(let D=z;D<_.length;D++){const ie=_[D]=U?pn(_[D]):jt(_[D]);g(null,ie,v,w,x,N,A,G,U)}},R=(_,v,w,x,N,A,G)=>{const U=v.el=_.el;let{patchFlag:z,dynamicChildren:D,dirs:ie}=v;z|=_.patchFlag&16;const q=_.props||Te,ne=v.props||Te;let ae;if(w&&tr(w,!1),(ae=ne.onVnodeBeforeUpdate)&&Jt(ae,w,v,_),ie&&er(v,_,w,"beforeUpdate"),w&&tr(w,!0),(q.innerHTML&&ne.innerHTML==null||q.textContent&&ne.textContent==null)&&u(U,""),D?L(_.dynamicChildren,D,U,w,x,Yo(v,N),A):G||se(_,v,U,null,w,x,Yo(v,N),A,!1),z>0){if(z&16)Y(U,q,ne,w,N);else if(z&2&&q.class!==ne.class&&i(U,"class",null,ne.class,N),z&4&&i(U,"style",q.style,ne.style,N),z&8){const pe=v.dynamicProps;for(let Oe=0;Oe<pe.length;Oe++){const Ee=pe[Oe],yt=q[Ee],bt=ne[Ee];(bt!==yt||Ee==="value")&&i(U,Ee,yt,bt,N,w)}}z&1&&_.children!==v.children&&u(U,v.children)}else!G&&D==null&&Y(U,q,ne,w,N);((ae=ne.onVnodeUpdated)||ie)&&nt(()=>{ae&&Jt(ae,w,v,_),ie&&er(v,_,w,"updated")},x)},L=(_,v,w,x,N,A,G)=>{for(let U=0;U<v.length;U++){const z=_[U],D=v[U],ie=z.el&&(z.type===dt||!tn(z,D)||z.shapeFlag&198)?f(z.el):w;g(z,D,ie,null,x,N,A,G,!0)}},Y=(_,v,w,x,N)=>{if(v!==w){if(v!==Te)for(const A in v)!Ts(A)&&!(A in w)&&i(_,A,v[A],null,N,x);for(const A in w){if(Ts(A))continue;const G=w[A],U=v[A];G!==U&&A!=="value"&&i(_,A,U,G,N,x)}"value"in w&&i(_,"value",v.value,w.value,N)}},M=(_,v,w,x,N,A,G,U,z)=>{const D=v.el=_?_.el:a(""),ie=v.anchor=_?_.anchor:a("");let{patchFlag:q,dynamicChildren:ne,slotScopeIds:ae}=v;ae&&(U=U?U.concat(ae):ae),_==null?(r(D,w,x),r(ie,w,x),C(v.children||[],w,ie,N,A,G,U,z)):q>0&&q&64&&ne&&_.dynamicChildren&&_.dynamicChildren.length===ne.length?(L(_.dynamicChildren,ne,w,N,A,G,U),(v.key!=null||N&&v===N.subTree)&&Hl(_,v,!0)):se(_,v,w,ie,N,A,G,U,z)},te=(_,v,w,x,N,A,G,U,z)=>{v.slotScopeIds=U,_==null?v.shapeFlag&512?N.ctx.activate(v,w,x,G,z):ce(v,w,x,N,A,G,z):_e(_,v,z)},ce=(_,v,w,x,N,A,G)=>{const U=_.component=Av(_,x,N);if(ii(_)&&(U.ctx.renderer=J),Cv(U,!1,G),U.asyncDep){if(N&&N.registerDep(U,le,G),!_.el){const z=U.subTree=Re(it);T(null,z,v,w),_.placeholder=z.el}}else le(U,_,v,w,N,A,G)},_e=(_,v,w)=>{const x=v.component=_.component;if(sv(_,v,w))if(x.asyncDep&&!x.asyncResolved){O(x,v,w);return}else x.next=v,x.update();else v.el=_.el,x.vnode=v},le=(_,v,w,x,N,A,G)=>{const U=()=>{if(_.isMounted){let{next:q,bu:ne,u:ae,parent:pe,vnode:Oe}=_;{const qt=hh(_);if(qt){q&&(q.el=Oe.el,O(_,q,G)),qt.asyncDep.then(()=>{nt(()=>{_.isUnmounted||D()},N)});return}}let Ee=q,yt;tr(_,!1),q?(q.el=Oe.el,O(_,q,G)):q=Oe,ne&&Ci(ne),(yt=q.props&&q.props.onVnodeBeforeUpdate)&&Jt(yt,pe,q,Oe),tr(_,!0);const bt=Lc(_),Wt=_.subTree;_.subTree=bt,g(Wt,bt,f(Wt.el),I(Wt),_,N,A),q.el=bt.el,Ee===null&&Bl(_,bt.el),ae&&nt(ae,N),(yt=q.props&&q.props.onVnodeUpdated)&&nt(()=>Jt(yt,pe,q,Oe),N)}else{let q;const{el:ne,props:ae}=v,{bm:pe,m:Oe,parent:Ee,root:yt,type:bt}=_,Wt=Rs(v);tr(_,!1),pe&&Ci(pe),!Wt&&(q=ae&&ae.onVnodeBeforeMount)&&Jt(q,Ee,v),tr(_,!0);{yt.ce&&yt.ce._hasShadowRoot()&&yt.ce._injectChildStyle(bt);const qt=_.subTree=Lc(_);g(null,qt,w,x,_,N,A),v.el=qt.el}if(Oe&&nt(Oe,N),!Wt&&(q=ae&&ae.onVnodeMounted)){const qt=v;nt(()=>Jt(q,Ee,qt),N)}(v.shapeFlag&256||Ee&&Rs(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&_.a&&nt(_.a,N),_.isMounted=!0,v=w=x=null}};_.scope.on();const z=_.effect=new vd(U);_.scope.off();const D=_.update=z.run.bind(z),ie=_.job=z.runIfDirty.bind(z);ie.i=_,ie.id=_.uid,z.scheduler=()=>Ll(ie),tr(_,!0),D()},O=(_,v,w)=>{v.component=_;const x=_.vnode.props;_.vnode=v,_.next=null,ov(_,v.props,x,w),uv(_,v.children,w),On(),kc(_),xn()},se=(_,v,w,x,N,A,G,U,z=!1)=>{const D=_&&_.children,ie=_?_.shapeFlag:0,q=v.children,{patchFlag:ne,shapeFlag:ae}=v;if(ne>0){if(ne&128){et(D,q,w,x,N,A,G,U,z);return}else if(ne&256){Be(D,q,w,x,N,A,G,U,z);return}}ae&8?(ie&16&&Ue(D,N,A),q!==D&&u(w,q)):ie&16?ae&16?et(D,q,w,x,N,A,G,U,z):Ue(D,N,A,!0):(ie&8&&u(w,""),ae&16&&C(q,w,x,N,A,G,U,z))},Be=(_,v,w,x,N,A,G,U,z)=>{_=_||Rr,v=v||Rr;const D=_.length,ie=v.length,q=Math.min(D,ie);let ne;for(ne=0;ne<q;ne++){const ae=v[ne]=z?pn(v[ne]):jt(v[ne]);g(_[ne],ae,w,null,N,A,G,U,z)}D>ie?Ue(_,N,A,!0,!1,q):C(v,w,x,N,A,G,U,z,q)},et=(_,v,w,x,N,A,G,U,z)=>{let D=0;const ie=v.length;let q=_.length-1,ne=ie-1;for(;D<=q&&D<=ne;){const ae=_[D],pe=v[D]=z?pn(v[D]):jt(v[D]);if(tn(ae,pe))g(ae,pe,w,null,N,A,G,U,z);else break;D++}for(;D<=q&&D<=ne;){const ae=_[q],pe=v[ne]=z?pn(v[ne]):jt(v[ne]);if(tn(ae,pe))g(ae,pe,w,null,N,A,G,U,z);else break;q--,ne--}if(D>q){if(D<=ne){const ae=ne+1,pe=ae<ie?v[ae].el:x;for(;D<=ne;)g(null,v[D]=z?pn(v[D]):jt(v[D]),w,pe,N,A,G,U,z),D++}}else if(D>ne)for(;D<=q;)ye(_[D],N,A,!0),D++;else{const ae=D,pe=D,Oe=new Map;for(D=pe;D<=ne;D++){const xt=v[D]=z?pn(v[D]):jt(v[D]);xt.key!=null&&Oe.set(xt.key,D)}let Ee,yt=0;const bt=ne-pe+1;let Wt=!1,qt=0;const es=new Array(bt);for(D=0;D<bt;D++)es[D]=0;for(D=ae;D<=q;D++){const xt=_[D];if(yt>=bt){ye(xt,N,A,!0);continue}let Kt;if(xt.key!=null)Kt=Oe.get(xt.key);else for(Ee=pe;Ee<=ne;Ee++)if(es[Ee-pe]===0&&tn(xt,v[Ee])){Kt=Ee;break}Kt===void 0?ye(xt,N,A,!0):(es[Kt-pe]=D+1,Kt>=qt?qt=Kt:Wt=!0,g(xt,v[Kt],w,null,N,A,G,U,z),yt++)}const vc=Wt?pv(es):Rr;for(Ee=vc.length-1,D=bt-1;D>=0;D--){const xt=pe+D,Kt=v[xt],mc=v[xt+1],yc=xt+1<ie?mc.el||ph(mc):x;es[D]===0?g(null,Kt,w,yc,N,A,G,U,z):Wt&&(Ee<0||D!==vc[Ee]?tt(Kt,w,yc,2):Ee--)}}},tt=(_,v,w,x,N=null)=>{const{el:A,type:G,transition:U,children:z,shapeFlag:D}=_;if(D&6){tt(_.component.subTree,v,w,x);return}if(D&128){_.suspense.move(v,w,x);return}if(D&64){G.move(_,v,w,J);return}if(G===dt){r(A,v,w);for(let q=0;q<z.length;q++)tt(z[q],v,w,x);r(_.anchor,v,w);return}if(G===Pi){S(_,v,w);return}if(x!==2&&D&1&&U)if(x===0)U.beforeEnter(A),r(A,v,w),nt(()=>U.enter(A),N);else{const{leave:q,delayLeave:ne,afterLeave:ae}=U,pe=()=>{_.ctx.isUnmounted?s(A):r(A,v,w)},Oe=()=>{A._isLeaving&&A[Qt](!0),q(A,()=>{pe(),ae&&ae()})};ne?ne(A,pe,Oe):Oe()}else r(A,v,w)},ye=(_,v,w,x=!1,N=!1)=>{const{type:A,props:G,ref:U,children:z,dynamicChildren:D,shapeFlag:ie,patchFlag:q,dirs:ne,cacheIndex:ae}=_;if(q===-2&&(N=!1),U!=null&&(On(),Cs(U,null,w,_,!0),xn()),ae!=null&&(v.renderCache[ae]=void 0),ie&256){v.ctx.deactivate(_);return}const pe=ie&1&&ne,Oe=!Rs(_);let Ee;if(Oe&&(Ee=G&&G.onVnodeBeforeUnmount)&&Jt(Ee,v,_),ie&6)mt(_.component,w,x);else{if(ie&128){_.suspense.unmount(w,x);return}pe&&er(_,null,v,"beforeUnmount"),ie&64?_.type.remove(_,v,w,J,x):D&&!D.hasOnce&&(A!==dt||q>0&&q&64)?Ue(D,v,w,!1,!0):(A===dt&&q&384||!N&&ie&16)&&Ue(z,v,w),x&&Je(_)}(Oe&&(Ee=G&&G.onVnodeUnmounted)||pe)&&nt(()=>{Ee&&Jt(Ee,v,_),pe&&er(_,null,v,"unmounted")},w)},Je=_=>{const{type:v,el:w,anchor:x,transition:N}=_;if(v===dt){Ve(w,x);return}if(v===Pi){E(_);return}const A=()=>{s(w),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(_.shapeFlag&1&&N&&!N.persisted){const{leave:G,delayLeave:U}=N,z=()=>G(w,A);U?U(_.el,A,z):z()}else A()},Ve=(_,v)=>{let w;for(;_!==v;)w=d(_),s(_),_=w;s(v)},mt=(_,v,w)=>{const{bum:x,scope:N,job:A,subTree:G,um:U,m:z,a:D}=_;jc(z),jc(D),x&&Ci(x),N.stop(),A&&(A.flags|=8,ye(G,_,v,w)),U&&nt(U,v),nt(()=>{_.isUnmounted=!0},v)},Ue=(_,v,w,x=!1,N=!1,A=0)=>{for(let G=A;G<_.length;G++)ye(_[G],v,w,x,N)},I=_=>{if(_.shapeFlag&6)return I(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const v=d(_.anchor||_.el),w=v&&v[Vd];return w?d(w):v};let K=!1;const H=(_,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=_,K||(K=!0,kc(x),Fd(),K=!1)},J={p:g,um:ye,m:tt,r:Je,mt:ce,mc:C,pc:se,pbc:L,n:I,o:e};return{render:H,hydrate:void 0,createApp:Y_(H)}}function Yo({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 tr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function hv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Hl(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]=pn(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Hl(o,a)),a.type===Ro&&(a.patchFlag===-1&&(a=s[i]=pn(a)),a.el=o.el),a.type===it&&!a.el&&(a.el=o.el)}}function pv(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<c?i=a+1:o=a;c<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 hh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hh(t)}function jc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ph(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ph(t.subTree):null}const gh=e=>e.__isSuspense;let Fa=0;const gv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,i,o,a,l,c){if(e==null)_v(t,n,r,s,i,o,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}vv(e,t,n,r,s,o,a,l,c)}},hydrate:mv,normalize:yv},ox=gv;function Zs(e,t){const n=e.props&&e.props[t];oe(n)&&n()}function _v(e,t,n,r,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,f=u("div"),d=e.suspense=_h(e,s,r,t,f,n,i,o,a,l);c(null,d.pendingBranch=e.ssContent,f,null,r,d,i,o),d.deps>0?(Zs(e,"onPending"),Zs(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,i,o),$r(d,e.ssFallback)):d.resolve(!1,!0)}function vv(e,t,n,r,s,i,o,a,{p:l,um:c,o:{createElement:u}}){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,tn(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),$r(f,h)))):(f.pendingId=Fa++,T?(f.isHydrating=!1,f.activeBranch=g):c(g,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("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),$r(f,h))):p&&tn(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&&tn(p,d))l(p,d,n,r,s,f,i,o,a),$r(f,d);else if(Zs(t,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=Fa++,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 _h(e,t,n,r,s,i,o,a,l,c,u=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:g,remove:y}}=c;let T;const b=wv(e);b&&t&&t.pendingBranch&&(T=t.pendingId,t.deps++);const S=e.props?ud(e.props.timeout):void 0,E=i,m={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:s,deps:0,pendingId:Fa++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,F=!1){const{vnode:C,activeBranch:R,pendingBranch:L,pendingId:Y,effects:M,parentComponent:te,container:ce,isInFallback:_e}=m;let le=!1;m.isHydrating?m.isHydrating=!1:$||(le=R&&L.transition&&L.transition.mode==="out-in",le&&(R.transition.afterLeave=()=>{Y===m.pendingId&&(d(L,ce,i===E?p(R):i,0),Ra(M),_e&&C.ssFallback&&(C.ssFallback.el=null))}),R&&(g(R.el)===ce&&(i=p(R)),h(R,te,m,!0),!le&&_e&&C.ssFallback&&nt(()=>C.ssFallback.el=null,m)),le||d(L,ce,i,0)),$r(m,L),m.pendingBranch=null,m.isInFallback=!1;let O=m.parent,se=!1;for(;O;){if(O.pendingBranch){O.effects.push(...M),se=!0;break}O=O.parent}!se&&!le&&Ra(M),m.effects=[],b&&t&&t.pendingBranch&&T===t.pendingId&&(t.deps--,t.deps===0&&!F&&t.resolve()),Zs(C,"onResolve")},fallback($){if(!m.pendingBranch)return;const{vnode:F,activeBranch:C,parentComponent:R,container:L,namespace:Y}=m;Zs(F,"onFallback");const M=p(C),te=()=>{m.isInFallback&&(f(null,$,L,M,R,null,Y,a,l),$r(m,$))},ce=$.transition&&$.transition.mode==="out-in";ce&&(C.transition.afterLeave=te),m.isInFallback=!0,h(C,R,null,!0),ce||te()},move($,F,C){m.activeBranch&&d(m.activeBranch,$,F,C),m.container=$},next(){return m.activeBranch&&p(m.activeBranch)},registerDep($,F,C){const R=!!m.pendingBranch;R&&m.deps++;const L=$.vnode.el;$.asyncDep.catch(Y=>{Yr(Y,$,0)}).then(Y=>{if($.isUnmounted||m.isUnmounted||m.pendingId!==$.suspenseId)return;$.asyncResolved=!0;const{vnode:M}=$;za($,Y),L&&(M.el=L);const te=!L&&$.subTree.el;F($,M,g(L||$.subTree.el),L?null:p($.subTree),m,o,C),te&&(M.placeholder=null,y(te)),Bl($,M.el),R&&--m.deps===0&&m.resolve()})},unmount($,F){m.isUnmounted=!0,m.activeBranch&&h(m.activeBranch,n,$,F),m.pendingBranch&&h(m.pendingBranch,n,$,F)}};return m}function mv(e,t,n,r,s,i,o,a,l){const c=t.suspense=_h(t,r,n,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function yv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Bc(r?n.default:n),e.ssFallback=r?Bc(n.fallback):Re(it)}function Bc(e){let t;if(oe(e)){const n=zr&&e._c;n&&(e._d=!1,Pe()),e=e(),n&&(e._d=!0,t=kt,vh())}return ee(e)&&(e=tv(e)),e=jt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function bv(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Ra(e)}function $r(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,Bl(r,s))}function wv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const dt=Symbol.for("v-fgt"),Ro=Symbol.for("v-txt"),it=Symbol.for("v-cmt"),Pi=Symbol.for("v-stc"),Ps=[];let kt=null;function Pe(e=!1){Ps.push(kt=e?null:[])}function vh(){Ps.pop(),kt=Ps[Ps.length-1]||null}let zr=1;function Hi(e,t=!1){zr+=e,e<0&&kt&&t&&(kt.hasOnce=!0)}function mh(e){return e.dynamicChildren=zr>0?kt||Rr:null,vh(),zr>0&&kt&&kt.push(e),e}function Qe(e,t,n,r,s,i){return mh(W(e,t,n,r,s,i,!0))}function Io(e,t,n,r,s){return mh(Re(e,t,n,r,s,!0))}function Hs(e){return e?e.__v_isVNode===!0:!1}function tn(e,t){return e.type===t.type&&e.key===t.key}const yh=({key:e})=>e??null,Ni=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||De(e)||oe(e)?{i:At,r:e,k:t,f:!!n}:e:null);function W(e,t=null,n=null,r=0,s=null,i=e===dt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yh(t),ref:t&&Ni(t),scopeId:zd,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:At};return a?(Gl(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=ze(n)?8:16),zr>0&&!o&&kt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&kt.push(l),l}const Re=Ev;function Ev(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===j_)&&(e=it),Hs(e)){const a=qn(e,t,!0);return n&&Gl(a,n),zr>0&&!i&&kt&&(a.shapeFlag&6?kt[kt.indexOf(e)]=a:kt.push(a)),a.patchFlag=-2,a}if($v(e)&&(e=e.__vccOpts),t){t=Sv(t);let{class:a,style:l}=t;a&&!ze(a)&&(t.class=ur(a)),me(l)&&(Oo(l)&&!ee(l)&&(l=We({},l)),t.style=Sn(l))}const o=ze(e)?1:gh(e)?128:Zd(e)?64:me(e)?4:oe(e)?2:0;return W(e,t,n,r,s,o,i,!0)}function Sv(e){return e?Oo(e)||ah(e)?We({},e):e:null}function qn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?Tv(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&yh(c),ref:t&&t.ref?n&&i?ee(i)?i.concat(Ni(t)):[i,Ni(t)]:Ni(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!==dt?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&&qn(e.ssContent),ssFallback:e.ssFallback&&qn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&fr(u,l.clone(u)),u}function kv(e=" ",t=0){return Re(Ro,null,e,t)}function Vc(e,t){const n=Re(Pi,null,e);return n.staticCount=t,n}function Bn(e="",t=!1){return t?(Pe(),Io(it,null,e)):Re(it,null,e)}function jt(e){return e==null||typeof e=="boolean"?Re(it):ee(e)?Re(dt,null,e.slice()):Hs(e)?pn(e):Re(Ro,null,String(e))}function pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qn(e)}function Gl(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),Gl(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ah(t)?t._ctx=At:s===3&&At&&(At.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:At},n=32):(t=String(t),r&64?(n=16,t=[kv(t)]):n=8);e.children=t,e.shapeFlag|=n}function Tv(...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=ur([t.class,r.class]));else if(s==="style")t.style=Sn([t.style,r.style]);else if(yo(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 Jt(e,t,n,r=null){Zt(e,t,7,[n,r])}const Ov=nh();let xv=0;function Av(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Ov,i={uid:xv++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new pd(!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:ch(r,s),emitsOptions:rh(r,s),emit:null,emitted:null,propsDefaults:Te,inheritAttrs:r.inheritAttrs,ctx:Te,data:Te,props:Te,attrs:Te,slots:Te,refs:Te,setupState:Te,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=Q_.bind(null,i),e.ce&&e.ce(i),i}let ot=null;const oi=()=>ot||At;let Gi,La;{const e=ko(),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)}};Gi=t("__VUE_INSTANCE_SETTERS__",n=>ot=n),La=t("__VUE_SSR_SETTERS__",n=>Ur=n)}const ai=e=>{const t=ot;return Gi(e),e.scope.on(),()=>{e.scope.off(),Gi(t)}},Zc=()=>{ot&&ot.scope.off(),Gi(null)};function bh(e){return e.vnode.shapeFlag&4}let Ur=!1;function Cv(e,t=!1,n=!1){t&&La(t);const{props:r,children:s}=e.vnode,i=bh(e);iv(e,r,i,t),cv(e,s,n||t);const o=i?Rv(e,t):void 0;return t&&La(!1),o}function Rv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Z_);const{setup:r}=n;if(r){On();const s=e.setupContext=r.length>1?Pv(e):null,i=ai(e),o=si(r,e,0,[e.props,s]),a=od(o);if(xn(),i(),(a||e.sp)&&!Rs(e)&&jl(e),a){if(o.then(Zc,Zc),t)return o.then(l=>{za(e,l)}).catch(l=>{Yr(l,e,0)});e.asyncDep=o}else za(e,o)}else wh(e)}function za(e,t,n){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=Nd(t)),wh(e)}function wh(e,t,n){const r=e.type;e.render||(e.render=r.render||sn);{const s=ai(e);On();try{H_(e)}finally{xn(),s()}}}const Iv={get(e,t){return ft(e,"get",""),e[t]}};function Pv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Iv),slots:e.slots,emit:e.emit,expose:t}}function Po(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nd(Fl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Is)return Is[n](e)},has(t,n){return n in t||n in Is}})):e.proxy}function Nv(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function $v(e){return oe(e)&&"__vccOpts"in e}const Ce=(e,t)=>m_(e,t,Ur);function Wl(e,t,n){try{Hi(-1);const r=arguments.length;return r===2?me(t)&&!ee(t)?Hs(t)?Re(e,null,[t]):Re(e,t):Re(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Hs(n)&&(n=[n]),Re(e,t,n))}finally{Hi(1)}}const Dv="3.5.29";/**
14
+ **/function si(e,t,n,r){try{return r?e(...r):e()}catch(s){Yr(s,t,n)}}function Zt(e,t,n,r){if(oe(e)){const s=si(e,t,n,r);return s&&od(s)&&s.catch(i=>{Yr(i,t,n)}),s}if(ee(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Zt(e[i],t,n,r));return s}}function Yr(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Te;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,l,c)===!1)return}a=a.parent}if(i){On(),si(i,null,10,[e,l,c]),xn();return}}w_(e,n,s,r,o)}function w_(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const vt=[];let Xt=-1;const Pr=[];let zn=null,Er=0;const Dd=Promise.resolve();let ji=null;function xo(e){const t=ji||Dd;return e?t.then(this?e.bind(this):e):t}function E_(e){let t=Xt+1,n=vt.length;for(;t<n;){const r=t+n>>>1,s=vt[r],i=js(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Ll(e){if(!(e.flags&1)){const t=js(e),n=vt[vt.length-1];!n||!(e.flags&2)&&t>=js(n)?vt.push(e):vt.splice(E_(t),0,e),e.flags|=1,Md()}}function Md(){ji||(ji=Dd.then(Ld))}function Ra(e){ee(e)?Pr.push(...e):zn&&e.id===-1?zn.splice(Er+1,0,e):e.flags&1||(Pr.push(e),e.flags|=1),Md()}function kc(e,t,n=Xt+1){for(;n<vt.length;n++){const r=vt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;vt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Fd(e){if(Pr.length){const t=[...new Set(Pr)].sort((n,r)=>js(n)-js(r));if(Pr.length=0,zn){zn.push(...t);return}for(zn=t,Er=0;Er<zn.length;Er++){const n=zn[Er];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}zn=null,Er=0}}const js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ld(e){try{for(Xt=0;Xt<vt.length;Xt++){const t=vt[Xt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),si(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xt<vt.length;Xt++){const t=vt[Xt];t&&(t.flags&=-2)}Xt=-1,vt.length=0,Fd(),ji=null,(vt.length||Pr.length)&&Ld()}}let At=null,zd=null;function Bi(e){const t=At;return At=e,zd=e&&e.type.__scopeId||null,t}function Bs(e,t=At,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Hi(-1);const i=Bi(t);let o;try{o=e(...s)}finally{Bi(i),r._d&&Hi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function nx(e,t){if(At===null)return e;const n=Po(At),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Te]=t[s];i&&(oe(i)&&(i={mounted:i,updated:i}),i.deep&&_n(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function er(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&&(On(),Zt(l,n,8,[e.el,a,e,t]),xn())}}function Ri(e,t){if(ot){let n=ot.provides;const r=ot.parent&&ot.parent.provides;r===n&&(n=ot.provides=Object.create(r)),n[e]=t}}function Pt(e,t,n=!1){const r=oi();if(r||cr){let s=cr?cr._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&&oe(t)?t.call(r&&r.proxy):t}}function Ud(){return!!(oi()||cr)}const S_=Symbol.for("v-scx"),k_=()=>Pt(S_);function Nr(e,t,n){return jd(e,t,n)}function jd(e,t,n=Te){const{immediate:r,deep:s,flush:i,once:o}=n,a=We({},n),l=t&&r||!t&&i!=="post";let c;if(Ur){if(i==="sync"){const h=k_();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=sn,h.resume=sn,h.pause=sn,h}}const u=ot;a.call=(h,p,g)=>Zt(h,u,p,g);let f=!1;i==="post"?a.scheduler=h=>{nt(h,u&&u.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(h,p)=>{p?h():Ll(h)}),a.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const d=b_(e,t,a);return Ur&&(c?c.push(d):l&&d()),d}function T_(e,t,n){const r=this.proxy,s=ze(e)?e.includes(".")?Bd(r,e):()=>r[e]:e.bind(r,r);let i;oe(t)?i=t:(i=t.handler,n=t);const o=ai(this),a=jd(s,i.bind(r),n);return o(),a}function Bd(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 Vd=Symbol("_vte"),Zd=e=>e.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),Tc=e=>e&&(e.defer||e.defer===""),Oc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ia=(e,t)=>{const n=e&&e.to;return ze(n)?t?t(n):null:n},Hd={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,c){const{mc:u,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:y}}=c,T=As(t.props);let{shapeFlag:b,children:S,dynamicChildren:E}=t;if(e==null){const m=t.el=g(""),$=t.anchor=g("");h(m,n,r),h($,n,r);const F=(R,L)=>{b&16&&u(S,R,L,s,i,o,a,l)},C=()=>{const R=t.target=Ia(t.props,p),L=Pa(R,t,g,h);R&&(o!=="svg"&&Oc(R)?o="svg":o!=="mathml"&&xc(R)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(R),T||(F(R,L),Ii(t,!1)))};T&&(F(n,$),Ii(t,!0)),Tc(t.props)?(t.el.__isMounted=!1,nt(()=>{C(),delete t.el.__isMounted},i)):C()}else{if(Tc(t.props)&&e.el.__isMounted===!1){nt(()=>{Hd.process(e,t,n,r,s,i,o,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const m=t.anchor=e.anchor,$=t.target=e.target,F=t.targetAnchor=e.targetAnchor,C=As(e.props),R=C?n:$,L=C?m:F;if(o==="svg"||Oc($)?o="svg":(o==="mathml"||xc($))&&(o="mathml"),E?(d(e.dynamicChildren,E,R,s,i,o,a),Hl(e,t,!0)):l||f(e,t,R,L,s,i,o,a,!1),T)C?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):pi(t,n,m,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Y=t.target=Ia(t.props,p);Y&&pi(t,Y,null,c,0)}else C&&pi(t,$,F,c,1);Ii(t,T)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:d}=e;if(f&&(s(c),s(u)),i&&s(l),o&16){const h=i||!As(d);for(let p=0;p<a.length;p++){const g=a[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:pi,hydrate:O_};function pi(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:c,props:u}=e,f=i===2;if(f&&r(o,t,n),(!f||As(u))&&l&16)for(let d=0;d<c.length;d++)s(c[d],t,n,2);f&&r(a,t,n)}function O_(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},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=Ia(t.props,l),g=As(t.props);if(p){const y=p._lpa||p.firstChild;t.shapeFlag&16&&(g?(h(e,t),d(p,y),t.targetAnchor||Pa(p,t,u,c,a(e)===p?e:null)):(t.anchor=o(e),d(p,y),t.targetAnchor||Pa(p,t,u,c),f(y&&o(y),t,p,n,r,s,i))),Ii(t,g)}else g&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const x_=Hd;function Ii(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 Pa(e,t,n,r,s=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Vd]=o,e&&(r(i,e,s),r(o,e,s)),o}const Qt=Symbol("_leaveCb"),ns=Symbol("_enterCb");function Gd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xr(()=>{e.isMounted=!0}),Qd(()=>{e.isUnmounting=!0}),e}const Nt=[Function,Array],Wd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Nt,onEnter:Nt,onAfterEnter:Nt,onEnterCancelled:Nt,onBeforeLeave:Nt,onLeave:Nt,onAfterLeave:Nt,onLeaveCancelled:Nt,onBeforeAppear:Nt,onAppear:Nt,onAfterAppear:Nt,onAppearCancelled:Nt},qd=e=>{const t=e.subTree;return t.component?qd(t.component):t},A_={name:"BaseTransition",props:Wd,setup(e,{slots:t}){const n=oi(),r=Gd();return()=>{const s=t.default&&zl(t.default(),!0);if(!s||!s.length)return;const i=Kd(s),o=ge(e),{mode:a}=o;if(r.isLeaving)return Ko(i);const l=Ac(i);if(!l)return Ko(i);let c=Vs(l,o,r,n,f=>c=f);l.type!==it&&fr(l,c);let u=n.subTree&&Ac(n.subTree);if(u&&u.type!==it&&!tn(u,l)&&qd(n).type!==it){let f=Vs(u,o,r,n);if(fr(u,f),a==="out-in"&&l.type!==it)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},Ko(i);a==="in-out"&&l.type!==it?f.delayLeave=(d,h,p)=>{const g=Jd(r,u);g[String(u.key)]=u,d[Qt]=()=>{h(),d[Qt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Kd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==it){t=n;break}}return t}const C_=A_;function Jd(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 Vs(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:y,onAppear:T,onAfterAppear:b,onAppearCancelled:S}=t,E=String(e.key),m=Jd(n,e),$=(R,L)=>{R&&Zt(R,r,9,L)},F=(R,L)=>{const Y=L[1];$(R,L),ee(R)?R.every(M=>M.length<=1)&&Y():R.length<=1&&Y()},C={mode:o,persisted:a,beforeEnter(R){let L=l;if(!n.isMounted)if(i)L=y||l;else return;R[Qt]&&R[Qt](!0);const Y=m[E];Y&&tn(e,Y)&&Y.el[Qt]&&Y.el[Qt](),$(L,[R])},enter(R){if(m[E]===e)return;let L=c,Y=u,M=f;if(!n.isMounted)if(i)L=T||c,Y=b||u,M=S||f;else return;let te=!1;R[ns]=_e=>{te||(te=!0,_e?$(M,[R]):$(Y,[R]),C.delayedLeave&&C.delayedLeave(),R[ns]=void 0)};const ce=R[ns].bind(null,!1);L?F(L,[R,ce]):ce()},leave(R,L){const Y=String(e.key);if(R[ns]&&R[ns](!0),n.isUnmounting)return L();$(d,[R]);let M=!1;R[Qt]=ce=>{M||(M=!0,L(),ce?$(g,[R]):$(p,[R]),R[Qt]=void 0,m[Y]===e&&delete m[Y])};const te=R[Qt].bind(null,!1);m[Y]=e,h?F(h,[R,te]):te()},clone(R){const L=Vs(R,t,n,r,s);return s&&s(L),L}};return C}function Ko(e){if(ii(e))return e=qn(e),e.children=null,e}function Ac(e){if(!ii(e))return Zd(e.type)&&e.children?Kd(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&&oe(n.default))return n.default()}}function fr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,fr(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 zl(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===dt?(o.patchFlag&128&&s++,r=r.concat(zl(o.children,t,a))):(t||o.type!==it)&&r.push(a!=null?qn(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Ul(e,t){return oe(e)?We({name:e.name},t,{setup:e}):e}function rx(){const e=oi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function jl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Vi=new WeakMap;function Cs(e,t,n,r,s=!1){if(ee(e)){e.forEach((g,y)=>Cs(g,t&&(ee(t)?t[y]:t),n,r,s));return}if(Rs(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Cs(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Po(r.component):r.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Te?a.refs={}:a.refs,f=a.setupState,d=ge(f),h=f===Te?id:g=>Cc(u,g)?!1:we(d,g),p=(g,y)=>!(y&&Cc(u,y));if(c!=null&&c!==l){if(Rc(t),ze(c))u[c]=null,h(c)&&(f[c]=null);else if(De(c)){const g=t;p(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(oe(l))si(l,a,12,[o,u]);else{const g=ze(l),y=De(l);if(g||y){const T=()=>{if(e.f){const b=g?h(l)?f[l]:u[l]:p()||!e.k?l.value:u[e.k];if(s)ee(b)&&Cl(b,i);else if(ee(b))b.includes(i)||b.push(i);else if(g)u[l]=[i],h(l)&&(f[l]=u[l]);else{const S=[i];p(l,e.k)&&(l.value=S),e.k&&(u[e.k]=S)}}else g?(u[l]=o,h(l)&&(f[l]=o)):y&&(p(l,e.k)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const b=()=>{T(),Vi.delete(e)};b.id=-1,Vi.set(e,b),nt(b,n)}else Rc(e),T()}}}function Rc(e){const t=Vi.get(e);t&&(t.flags|=8,Vi.delete(e))}const Ic=e=>e.nodeType===8;ko().requestIdleCallback;ko().cancelIdleCallback;function R_(e,t){if(Ic(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Ic(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Rs=e=>!!e.type.__asyncLoader;function sx(e){oe(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 c=null,u,f=0;const d=()=>(f++,c=null,h()),h=()=>{let p;return c||(p=c=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!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return Ul({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=>R_(p,m));E&&(g.bum||(g.bum=[])).push(E)}:b;u?S():h().then(()=>!g.isUnmounted&&S())},get __asyncResolved(){return u},setup(){const p=ot;if(jl(p),u)return()=>gi(u,p);const g=S=>{c=null,Yr(S,p,13,!r)};if(a&&p.suspense||Ur)return h().then(S=>()=>gi(S,p)).catch(S=>(g(S),()=>r?Re(r,{error:S}):null));const y=It(!1),T=It(),b=It(!!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&&ii(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),T.value=S}),()=>{if(y.value&&u)return gi(u,p);if(T.value&&r)return Re(r,{error:T.value});if(n&&!b.value)return gi(n,p)}}})}function gi(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=Re(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const ii=e=>e.type.__isKeepAlive;function I_(e,t){Yd(e,"a",t)}function P_(e,t){Yd(e,"da",t)}function Yd(e,t,n=ot){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ao(t,r,n),n){let s=n.parent;for(;s&&s.parent;)ii(s.parent.vnode)&&N_(r,t,n,s),s=s.parent}}function N_(e,t,n,r){const s=Ao(t,e,r,!0);Yn(()=>{Cl(r[t],s)},n)}function Ao(e,t,n=ot,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{On();const a=ai(n),l=Zt(t,n,e,o);return a(),xn(),l});return r?s.unshift(i):s.push(i),i}}const Rn=e=>(t,n=ot)=>{(!Ur||e==="sp")&&Ao(e,(...r)=>t(...r),n)},$_=Rn("bm"),Xr=Rn("m"),D_=Rn("bu"),Xd=Rn("u"),Qd=Rn("bum"),Yn=Rn("um"),M_=Rn("sp"),F_=Rn("rtg"),L_=Rn("rtc");function z_(e,t=ot){Ao("ec",e,t)}const U_="components";function Pc(e,t){return B_(U_,e,!0,t)||e}const j_=Symbol.for("v-ndc");function B_(e,t,n=!0,r=!1){const s=At||ot;if(s){const i=s.type;{const a=Nv(i,!1);if(a&&(a===t||a===zt(t)||a===Eo(zt(t))))return i}const o=Nc(s[e]||i[e],t)||Nc(s.appContext[e],t);return!o&&r?i:o}}function Nc(e,t){return e&&(e[t]||e[zt(t)]||e[Eo(zt(t))])}function V_(e,t,n,r){let s;const i=n,o=ee(e);if(o||ze(e)){const a=o&&kn(e);let l=!1,c=!1;a&&(l=!Rt(e),c=An(e),e=To(e)),s=new Array(e.length);for(let u=0,f=e.length;u<f;u++)s[u]=t(l?c?Lr(Vt(e[u])):Vt(e[u]):e[u],u,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,c=a.length;l<c;l++){const u=a[l];s[l]=t(e[u],u,l,i)}}else s=[];return s}const Na=e=>e?bh(e)?Po(e):Na(e.parent):null,Is=We(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=>Na(e.parent),$root:e=>Na(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>th(e),$forceUpdate:e=>e.f||(e.f=()=>{Ll(e.update)}),$nextTick:e=>e.n||(e.n=xo.bind(e.proxy)),$watch:e=>T_.bind(e)}),Jo=(e,t)=>e!==Te&&!e.__isScriptSetup&&we(e,t),Z_={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(Jo(r,t))return o[t]=1,r[t];if(s!==Te&&we(s,t))return o[t]=2,s[t];if(we(i,t))return o[t]=3,i[t];if(n!==Te&&we(n,t))return o[t]=4,n[t];$a&&(o[t]=0)}}const c=Is[t];let u,f;if(c)return t==="$attrs"&&ft(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Te&&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 Jo(s,t)?(s[t]=n,!0):r!==Te&&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!==Te&&a[0]!=="$"&&we(e,a)||Jo(t,a)||we(i,a)||we(r,a)||we(Is,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 $c(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let $a=!0;function H_(e){const t=th(e),n=e.proxy,r=e.ctx;$a=!1,t.beforeCreate&&Dc(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:y,beforeDestroy:T,beforeUnmount:b,destroyed:S,unmounted:E,render:m,renderTracked:$,renderTriggered:F,errorCaptured:C,serverPrefetch:R,expose:L,inheritAttrs:Y,components:M,directives:te,filters:ce}=t;if(c&&G_(c,r,null),o)for(const O in o){const se=o[O];oe(se)&&(r[O]=se.bind(n))}if(s){const O=s.call(n,n);me(O)&&(e.data=ri(O))}if($a=!0,i)for(const O in i){const se=i[O],Be=oe(se)?se.bind(n,n):oe(se.get)?se.get.bind(n,n):sn,et=!oe(se)&&oe(se.set)?se.set.bind(n):sn,tt=Ce({get:Be,set:et});Object.defineProperty(r,O,{enumerable:!0,configurable:!0,get:()=>tt.value,set:ye=>tt.value=ye})}if(a)for(const O in a)eh(a[O],r,n,O);if(l){const O=oe(l)?l.call(n):l;Reflect.ownKeys(O).forEach(se=>{Ri(se,O[se])})}u&&Dc(u,e,"c");function le(O,se){ee(se)?se.forEach(Be=>O(Be.bind(n))):se&&O(se.bind(n))}if(le($_,f),le(Xr,d),le(D_,h),le(Xd,p),le(I_,g),le(P_,y),le(z_,C),le(L_,$),le(F_,F),le(Qd,b),le(Yn,E),le(M_,R),ee(L))if(L.length){const O=e.exposed||(e.exposed={});L.forEach(se=>{Object.defineProperty(O,se,{get:()=>n[se],set:Be=>n[se]=Be,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===sn&&(e.render=m),Y!=null&&(e.inheritAttrs=Y),M&&(e.components=M),te&&(e.directives=te),R&&jl(e)}function G_(e,t,n=sn){ee(e)&&(e=Da(e));for(const r in e){const s=e[r];let i;me(s)?"default"in s?i=Pt(s.from||r,s.default,!0):i=Pt(s.from||r):i=Pt(s),De(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Dc(e,t,n){Zt(ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function eh(e,t,n,r){let s=r.includes(".")?Bd(n,r):()=>n[r];if(ze(e)){const i=t[e];oe(i)&&Nr(s,i)}else if(oe(e))Nr(s,e.bind(n));else if(me(e))if(ee(e))e.forEach(i=>eh(i,t,n,r));else{const i=oe(e.handler)?e.handler.bind(n):t[e.handler];oe(i)&&Nr(s,i,e)}}function th(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(c=>Zi(l,c,o,!0)),Zi(l,t,o)),me(t)&&i.set(t,l),l}function Zi(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Zi(e,i,n,!0),s&&s.forEach(o=>Zi(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=W_[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const W_={data:Mc,props:Fc,emits:Fc,methods:gs,computed:gs,beforeCreate:ht,created:ht,beforeMount:ht,mounted:ht,beforeUpdate:ht,updated:ht,beforeDestroy:ht,beforeUnmount:ht,destroyed:ht,unmounted:ht,activated:ht,deactivated:ht,errorCaptured:ht,serverPrefetch:ht,components:gs,directives:gs,watch:K_,provide:Mc,inject:q_};function Mc(e,t){return t?e?function(){return We(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function q_(e,t){return gs(Da(e),Da(t))}function Da(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ht(e,t){return e?[...new Set([].concat(e,t))]:t}function gs(e,t){return e?We(Object.create(null),e,t):t}function Fc(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:We(Object.create(null),$c(e),$c(t??{})):t}function K_(e,t){if(!e)return t;if(!t)return e;const n=We(Object.create(null),e);for(const r in t)n[r]=ht(e[r],t[r]);return n}function nh(){return{app:null,config:{isNativeTag:id,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 J_=0;function Y_(e,t){return function(r,s=null){oe(r)||(r=We({},r)),s!=null&&!me(s)&&(s=null);const i=nh(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:J_++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:Dv,get config(){return i.config},set config(u){},use(u,...f){return o.has(u)||(u&&oe(u.install)?(o.add(u),u.install(c,...f)):oe(u)&&(o.add(u),u(c,...f))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,f){return f?(i.components[u]=f,c):i.components[u]},directive(u,f){return f?(i.directives[u]=f,c):i.directives[u]},mount(u,f,d){if(!l){const h=c._ceVNode||Re(r,s);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,u,d),l=!0,c._container=u,u.__vue_app__=c,Po(h.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Zt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return i.provides[u]=f,c},runWithContext(u){const f=cr;cr=c;try{return u()}finally{cr=f}}};return c}}let cr=null;const X_=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${zt(t)}Modifiers`]||e[`${Jn(t)}Modifiers`];function Q_(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Te;let s=n;const i=t.startsWith("update:"),o=i&&X_(r,t.slice(7));o&&(o.trim&&(s=n.map(u=>ze(u)?u.trim():u)),o.number&&(s=n.map(So)));let a,l=r[a=Zo(t)]||r[a=Zo(zt(t))];!l&&i&&(l=r[a=Zo(Jn(t))]),l&&Zt(l,e,6,s);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Zt(c,e,6,s)}}const ev=new WeakMap;function rh(e,t,n=!1){const r=n?ev:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!oe(e)){const l=c=>{const u=rh(c,t,!0);u&&(a=!0,We(o,u))};!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):We(o,i),me(e)&&r.set(e,o),o)}function Co(e,t){return!e||!yo(t)?!1:(t=t.slice(2).replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,Jn(t))||we(e,t))}function Lc(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e,y=Bi(e);let T,b;try{if(n.shapeFlag&4){const E=s||r,m=E;T=jt(c.call(m,E,u,f,h,d,p)),b=a}else{const E=t;T=jt(E.length>1?E(f,{attrs:a,slots:o,emit:l}):E(f,null)),b=t.props?a:nv(a)}}catch(E){Ps.length=0,Yr(E,e,1),T=Re(it)}let S=T;if(b&&g!==!1){const E=Object.keys(b),{shapeFlag:m}=S;E.length&&m&7&&(i&&E.some(Al)&&(b=rv(b,i)),S=qn(S,b,!1,!0))}return n.dirs&&(S=qn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&fr(S,n.transition),T=S,Bi(y),T}function tv(e,t=!0){let n;for(let r=0;r<e.length;r++){const s=e[r];if(Hs(s)){if(s.type!==it||s.children==="v-if"){if(n)return;n=s}}else return}return n}const nv=e=>{let t;for(const n in e)(n==="class"||n==="style"||yo(n))&&((t||(t={}))[n]=e[n]);return t},rv=(e,t)=>{const n={};for(const r in e)(!Al(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,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?zc(r,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const d=u[f];if(sh(o,r,d)&&!Co(c,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?zc(r,o,c):!0:!!o;return!1}function zc(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(sh(t,e,i)&&!Co(n,i))return!0}return!1}function sh(e,t,n){const r=e[n],s=t[n];return n==="style"&&me(r)&&me(s)?!Wn(r,s):r!==s}function Bl({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 ih={},oh=()=>Object.create(ih),ah=e=>Object.getPrototypeOf(e)===ih;function iv(e,t,n,r=!1){const s={},i=oh();e.propsDefaults=Object.create(null),lh(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Id(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function ov(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ge(s),[l]=e.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let d=u[f];if(Co(e.emitsOptions,d))continue;const h=t[d];if(l)if(we(i,d))h!==i[d]&&(i[d]=h,c=!0);else{const p=zt(d);s[p]=Ma(l,a,p,h,e,!1)}else h!==i[d]&&(i[d]=h,c=!0)}}}else{lh(e,t,s,i)&&(c=!0);let u;for(const f in a)(!t||!we(t,f)&&((u=Jn(f))===f||!we(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=Ma(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],c=!0)}c&&gn(e.attrs,"set","")}function lh(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Ts(l))continue;const c=t[l];let u;s&&we(s,u=zt(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:Co(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(i){const l=ge(n),c=a||Te;for(let u=0;u<i.length;u++){const f=i[u];n[f]=Ma(s,l,f,c[f],e,!we(c,f))}}return o}function Ma(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&&oe(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=ai(s);r=c[n]=l.call(null,t),u()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Jn(n))&&(r=!0))}return r}const av=new WeakMap;function ch(e,t,n=!1){const r=n?av:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!oe(e)){const u=f=>{l=!0;const[d,h]=ch(f,t,!0);We(o,d),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return me(e)&&r.set(e,Rr),Rr;if(ee(i))for(let u=0;u<i.length;u++){const f=zt(i[u]);Uc(f)&&(o[f]=Te)}else if(i)for(const u in i){const f=zt(u);if(Uc(f)){const d=i[u],h=o[f]=ee(d)||oe(d)?{type:d}:We({},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=oe(b)&&b.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(y=!1)}else g=oe(p)&&p.name==="Boolean";h[0]=g,h[1]=y,(g||we(h,"default"))&&a.push(f)}}const c=[o,a];return me(e)&&r.set(e,c),c}function Uc(e){return e[0]!=="$"&&!Ts(e)}const Vl=e=>e==="_"||e==="_ctx"||e==="$stable",Zl=e=>ee(e)?e.map(jt):[jt(e)],lv=(e,t,n)=>{if(t._n)return t;const r=Bs((...s)=>Zl(t(...s)),n);return r._c=!1,r},uh=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Vl(s))continue;const i=e[s];if(oe(i))t[s]=lv(s,i,r);else if(i!=null){const o=Zl(i);t[s]=()=>o}}},fh=(e,t)=>{const n=Zl(t);e.slots.default=()=>n},dh=(e,t,n)=>{for(const r in t)(n||!Vl(r))&&(e[r]=t[r])},cv=(e,t,n)=>{const r=e.slots=oh();if(e.vnode.shapeFlag&32){const s=t._;s?(dh(r,t,n),n&&cd(r,"_",s,!0)):uh(t,r)}else t&&fh(e,t)},uv=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Te;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:dh(s,t,n):(i=!t.$stable,uh(t,s)),o=t}else t&&(fh(e,t),o={default:1});if(i)for(const a in s)!Vl(a)&&o[a]==null&&delete s[a]},nt=bv;function fv(e){return dv(e)}function dv(e,t){const n=ko();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=sn,insertStaticContent:p}=e,g=(_,v,w,x=null,N=null,A=null,G=void 0,U=null,z=!!v.dynamicChildren)=>{if(_===v)return;_&&!tn(_,v)&&(x=I(_),ye(_,N,A,!0),_=null),v.patchFlag===-2&&(z=!1,v.dynamicChildren=null);const{type:D,ref:ie,shapeFlag:q}=v;switch(D){case Ro:y(_,v,w,x);break;case it:T(_,v,w,x);break;case Pi:_==null&&b(v,w,x,G);break;case dt:M(_,v,w,x,N,A,G,U,z);break;default:q&1?m(_,v,w,x,N,A,G,U,z):q&6?te(_,v,w,x,N,A,G,U,z):(q&64||q&128)&&D.process(_,v,w,x,N,A,G,U,z,J)}ie!=null&&N?Cs(ie,_&&_.ref,A,v||_,!v):ie==null&&_&&_.ref!=null&&Cs(_.ref,null,A,_,!0)},y=(_,v,w,x)=>{if(_==null)r(v.el=a(v.children),w,x);else{const N=v.el=_.el;v.children!==_.children&&c(N,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 N;for(;_&&_!==v;)N=d(_),r(_,w,x),_=N;r(v,w,x)},E=({el:_,anchor:v})=>{let w;for(;_&&_!==v;)w=d(_),s(_),_=w;s(v)},m=(_,v,w,x,N,A,G,U,z)=>{if(v.type==="svg"?G="svg":v.type==="math"&&(G="mathml"),_==null)$(v,w,x,N,A,G,U,z);else{const D=_.el&&_.el._isVueCE?_.el:null;try{D&&D._beginPatch(),R(_,v,N,A,G,U,z)}finally{D&&D._endPatch()}}},$=(_,v,w,x,N,A,G,U)=>{let z,D;const{props:ie,shapeFlag:q,transition:ne,dirs:ae}=_;if(z=_.el=o(_.type,A,ie&&ie.is,ie),q&8?u(z,_.children):q&16&&C(_.children,z,null,x,N,Yo(_,A),G,U),ae&&er(_,null,x,"created"),F(z,_,_.scopeId,G,x),ie){for(const Oe in ie)Oe!=="value"&&!Ts(Oe)&&i(z,Oe,null,ie[Oe],A,x);"value"in ie&&i(z,"value",null,ie.value,A),(D=ie.onVnodeBeforeMount)&&Jt(D,x,_)}ae&&er(_,null,x,"beforeMount");const pe=hv(N,ne);pe&&ne.beforeEnter(z),r(z,v,w),((D=ie&&ie.onVnodeMounted)||pe||ae)&&nt(()=>{D&&Jt(D,x,_),pe&&ne.enter(z),ae&&er(_,null,x,"mounted")},N)},F=(_,v,w,x,N)=>{if(w&&h(_,w),x)for(let A=0;A<x.length;A++)h(_,x[A]);if(N){let A=N.subTree;if(v===A||gh(A.type)&&(A.ssContent===v||A.ssFallback===v)){const G=N.vnode;F(_,G,G.scopeId,G.slotScopeIds,N.parent)}}},C=(_,v,w,x,N,A,G,U,z=0)=>{for(let D=z;D<_.length;D++){const ie=_[D]=U?pn(_[D]):jt(_[D]);g(null,ie,v,w,x,N,A,G,U)}},R=(_,v,w,x,N,A,G)=>{const U=v.el=_.el;let{patchFlag:z,dynamicChildren:D,dirs:ie}=v;z|=_.patchFlag&16;const q=_.props||Te,ne=v.props||Te;let ae;if(w&&tr(w,!1),(ae=ne.onVnodeBeforeUpdate)&&Jt(ae,w,v,_),ie&&er(v,_,w,"beforeUpdate"),w&&tr(w,!0),(q.innerHTML&&ne.innerHTML==null||q.textContent&&ne.textContent==null)&&u(U,""),D?L(_.dynamicChildren,D,U,w,x,Yo(v,N),A):G||se(_,v,U,null,w,x,Yo(v,N),A,!1),z>0){if(z&16)Y(U,q,ne,w,N);else if(z&2&&q.class!==ne.class&&i(U,"class",null,ne.class,N),z&4&&i(U,"style",q.style,ne.style,N),z&8){const pe=v.dynamicProps;for(let Oe=0;Oe<pe.length;Oe++){const Ee=pe[Oe],yt=q[Ee],bt=ne[Ee];(bt!==yt||Ee==="value")&&i(U,Ee,yt,bt,N,w)}}z&1&&_.children!==v.children&&u(U,v.children)}else!G&&D==null&&Y(U,q,ne,w,N);((ae=ne.onVnodeUpdated)||ie)&&nt(()=>{ae&&Jt(ae,w,v,_),ie&&er(v,_,w,"updated")},x)},L=(_,v,w,x,N,A,G)=>{for(let U=0;U<v.length;U++){const z=_[U],D=v[U],ie=z.el&&(z.type===dt||!tn(z,D)||z.shapeFlag&198)?f(z.el):w;g(z,D,ie,null,x,N,A,G,!0)}},Y=(_,v,w,x,N)=>{if(v!==w){if(v!==Te)for(const A in v)!Ts(A)&&!(A in w)&&i(_,A,v[A],null,N,x);for(const A in w){if(Ts(A))continue;const G=w[A],U=v[A];G!==U&&A!=="value"&&i(_,A,U,G,N,x)}"value"in w&&i(_,"value",v.value,w.value,N)}},M=(_,v,w,x,N,A,G,U,z)=>{const D=v.el=_?_.el:a(""),ie=v.anchor=_?_.anchor:a("");let{patchFlag:q,dynamicChildren:ne,slotScopeIds:ae}=v;ae&&(U=U?U.concat(ae):ae),_==null?(r(D,w,x),r(ie,w,x),C(v.children||[],w,ie,N,A,G,U,z)):q>0&&q&64&&ne&&_.dynamicChildren&&_.dynamicChildren.length===ne.length?(L(_.dynamicChildren,ne,w,N,A,G,U),(v.key!=null||N&&v===N.subTree)&&Hl(_,v,!0)):se(_,v,w,ie,N,A,G,U,z)},te=(_,v,w,x,N,A,G,U,z)=>{v.slotScopeIds=U,_==null?v.shapeFlag&512?N.ctx.activate(v,w,x,G,z):ce(v,w,x,N,A,G,z):_e(_,v,z)},ce=(_,v,w,x,N,A,G)=>{const U=_.component=Av(_,x,N);if(ii(_)&&(U.ctx.renderer=J),Cv(U,!1,G),U.asyncDep){if(N&&N.registerDep(U,le,G),!_.el){const z=U.subTree=Re(it);T(null,z,v,w),_.placeholder=z.el}}else le(U,_,v,w,N,A,G)},_e=(_,v,w)=>{const x=v.component=_.component;if(sv(_,v,w))if(x.asyncDep&&!x.asyncResolved){O(x,v,w);return}else x.next=v,x.update();else v.el=_.el,x.vnode=v},le=(_,v,w,x,N,A,G)=>{const U=()=>{if(_.isMounted){let{next:q,bu:ne,u:ae,parent:pe,vnode:Oe}=_;{const qt=hh(_);if(qt){q&&(q.el=Oe.el,O(_,q,G)),qt.asyncDep.then(()=>{nt(()=>{_.isUnmounted||D()},N)});return}}let Ee=q,yt;tr(_,!1),q?(q.el=Oe.el,O(_,q,G)):q=Oe,ne&&Ci(ne),(yt=q.props&&q.props.onVnodeBeforeUpdate)&&Jt(yt,pe,q,Oe),tr(_,!0);const bt=Lc(_),Wt=_.subTree;_.subTree=bt,g(Wt,bt,f(Wt.el),I(Wt),_,N,A),q.el=bt.el,Ee===null&&Bl(_,bt.el),ae&&nt(ae,N),(yt=q.props&&q.props.onVnodeUpdated)&&nt(()=>Jt(yt,pe,q,Oe),N)}else{let q;const{el:ne,props:ae}=v,{bm:pe,m:Oe,parent:Ee,root:yt,type:bt}=_,Wt=Rs(v);tr(_,!1),pe&&Ci(pe),!Wt&&(q=ae&&ae.onVnodeBeforeMount)&&Jt(q,Ee,v),tr(_,!0);{yt.ce&&yt.ce._hasShadowRoot()&&yt.ce._injectChildStyle(bt);const qt=_.subTree=Lc(_);g(null,qt,w,x,_,N,A),v.el=qt.el}if(Oe&&nt(Oe,N),!Wt&&(q=ae&&ae.onVnodeMounted)){const qt=v;nt(()=>Jt(q,Ee,qt),N)}(v.shapeFlag&256||Ee&&Rs(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&_.a&&nt(_.a,N),_.isMounted=!0,v=w=x=null}};_.scope.on();const z=_.effect=new vd(U);_.scope.off();const D=_.update=z.run.bind(z),ie=_.job=z.runIfDirty.bind(z);ie.i=_,ie.id=_.uid,z.scheduler=()=>Ll(ie),tr(_,!0),D()},O=(_,v,w)=>{v.component=_;const x=_.vnode.props;_.vnode=v,_.next=null,ov(_,v.props,x,w),uv(_,v.children,w),On(),kc(_),xn()},se=(_,v,w,x,N,A,G,U,z=!1)=>{const D=_&&_.children,ie=_?_.shapeFlag:0,q=v.children,{patchFlag:ne,shapeFlag:ae}=v;if(ne>0){if(ne&128){et(D,q,w,x,N,A,G,U,z);return}else if(ne&256){Be(D,q,w,x,N,A,G,U,z);return}}ae&8?(ie&16&&Ue(D,N,A),q!==D&&u(w,q)):ie&16?ae&16?et(D,q,w,x,N,A,G,U,z):Ue(D,N,A,!0):(ie&8&&u(w,""),ae&16&&C(q,w,x,N,A,G,U,z))},Be=(_,v,w,x,N,A,G,U,z)=>{_=_||Rr,v=v||Rr;const D=_.length,ie=v.length,q=Math.min(D,ie);let ne;for(ne=0;ne<q;ne++){const ae=v[ne]=z?pn(v[ne]):jt(v[ne]);g(_[ne],ae,w,null,N,A,G,U,z)}D>ie?Ue(_,N,A,!0,!1,q):C(v,w,x,N,A,G,U,z,q)},et=(_,v,w,x,N,A,G,U,z)=>{let D=0;const ie=v.length;let q=_.length-1,ne=ie-1;for(;D<=q&&D<=ne;){const ae=_[D],pe=v[D]=z?pn(v[D]):jt(v[D]);if(tn(ae,pe))g(ae,pe,w,null,N,A,G,U,z);else break;D++}for(;D<=q&&D<=ne;){const ae=_[q],pe=v[ne]=z?pn(v[ne]):jt(v[ne]);if(tn(ae,pe))g(ae,pe,w,null,N,A,G,U,z);else break;q--,ne--}if(D>q){if(D<=ne){const ae=ne+1,pe=ae<ie?v[ae].el:x;for(;D<=ne;)g(null,v[D]=z?pn(v[D]):jt(v[D]),w,pe,N,A,G,U,z),D++}}else if(D>ne)for(;D<=q;)ye(_[D],N,A,!0),D++;else{const ae=D,pe=D,Oe=new Map;for(D=pe;D<=ne;D++){const xt=v[D]=z?pn(v[D]):jt(v[D]);xt.key!=null&&Oe.set(xt.key,D)}let Ee,yt=0;const bt=ne-pe+1;let Wt=!1,qt=0;const es=new Array(bt);for(D=0;D<bt;D++)es[D]=0;for(D=ae;D<=q;D++){const xt=_[D];if(yt>=bt){ye(xt,N,A,!0);continue}let Kt;if(xt.key!=null)Kt=Oe.get(xt.key);else for(Ee=pe;Ee<=ne;Ee++)if(es[Ee-pe]===0&&tn(xt,v[Ee])){Kt=Ee;break}Kt===void 0?ye(xt,N,A,!0):(es[Kt-pe]=D+1,Kt>=qt?qt=Kt:Wt=!0,g(xt,v[Kt],w,null,N,A,G,U,z),yt++)}const vc=Wt?pv(es):Rr;for(Ee=vc.length-1,D=bt-1;D>=0;D--){const xt=pe+D,Kt=v[xt],mc=v[xt+1],yc=xt+1<ie?mc.el||ph(mc):x;es[D]===0?g(null,Kt,w,yc,N,A,G,U,z):Wt&&(Ee<0||D!==vc[Ee]?tt(Kt,w,yc,2):Ee--)}}},tt=(_,v,w,x,N=null)=>{const{el:A,type:G,transition:U,children:z,shapeFlag:D}=_;if(D&6){tt(_.component.subTree,v,w,x);return}if(D&128){_.suspense.move(v,w,x);return}if(D&64){G.move(_,v,w,J);return}if(G===dt){r(A,v,w);for(let q=0;q<z.length;q++)tt(z[q],v,w,x);r(_.anchor,v,w);return}if(G===Pi){S(_,v,w);return}if(x!==2&&D&1&&U)if(x===0)U.beforeEnter(A),r(A,v,w),nt(()=>U.enter(A),N);else{const{leave:q,delayLeave:ne,afterLeave:ae}=U,pe=()=>{_.ctx.isUnmounted?s(A):r(A,v,w)},Oe=()=>{A._isLeaving&&A[Qt](!0),q(A,()=>{pe(),ae&&ae()})};ne?ne(A,pe,Oe):Oe()}else r(A,v,w)},ye=(_,v,w,x=!1,N=!1)=>{const{type:A,props:G,ref:U,children:z,dynamicChildren:D,shapeFlag:ie,patchFlag:q,dirs:ne,cacheIndex:ae}=_;if(q===-2&&(N=!1),U!=null&&(On(),Cs(U,null,w,_,!0),xn()),ae!=null&&(v.renderCache[ae]=void 0),ie&256){v.ctx.deactivate(_);return}const pe=ie&1&&ne,Oe=!Rs(_);let Ee;if(Oe&&(Ee=G&&G.onVnodeBeforeUnmount)&&Jt(Ee,v,_),ie&6)mt(_.component,w,x);else{if(ie&128){_.suspense.unmount(w,x);return}pe&&er(_,null,v,"beforeUnmount"),ie&64?_.type.remove(_,v,w,J,x):D&&!D.hasOnce&&(A!==dt||q>0&&q&64)?Ue(D,v,w,!1,!0):(A===dt&&q&384||!N&&ie&16)&&Ue(z,v,w),x&&Je(_)}(Oe&&(Ee=G&&G.onVnodeUnmounted)||pe)&&nt(()=>{Ee&&Jt(Ee,v,_),pe&&er(_,null,v,"unmounted")},w)},Je=_=>{const{type:v,el:w,anchor:x,transition:N}=_;if(v===dt){Ve(w,x);return}if(v===Pi){E(_);return}const A=()=>{s(w),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(_.shapeFlag&1&&N&&!N.persisted){const{leave:G,delayLeave:U}=N,z=()=>G(w,A);U?U(_.el,A,z):z()}else A()},Ve=(_,v)=>{let w;for(;_!==v;)w=d(_),s(_),_=w;s(v)},mt=(_,v,w)=>{const{bum:x,scope:N,job:A,subTree:G,um:U,m:z,a:D}=_;jc(z),jc(D),x&&Ci(x),N.stop(),A&&(A.flags|=8,ye(G,_,v,w)),U&&nt(U,v),nt(()=>{_.isUnmounted=!0},v)},Ue=(_,v,w,x=!1,N=!1,A=0)=>{for(let G=A;G<_.length;G++)ye(_[G],v,w,x,N)},I=_=>{if(_.shapeFlag&6)return I(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const v=d(_.anchor||_.el),w=v&&v[Vd];return w?d(w):v};let K=!1;const H=(_,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=_,K||(K=!0,kc(x),Fd(),K=!1)},J={p:g,um:ye,m:tt,r:Je,mt:ce,mc:C,pc:se,pbc:L,n:I,o:e};return{render:H,hydrate:void 0,createApp:Y_(H)}}function Yo({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 tr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function hv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Hl(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]=pn(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Hl(o,a)),a.type===Ro&&(a.patchFlag===-1&&(a=s[i]=pn(a)),a.el=o.el),a.type===it&&!a.el&&(a.el=o.el)}}function pv(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<c?i=a+1:o=a;c<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 hh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hh(t)}function jc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ph(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ph(t.subTree):null}const gh=e=>e.__isSuspense;let Fa=0;const gv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,i,o,a,l,c){if(e==null)_v(t,n,r,s,i,o,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}vv(e,t,n,r,s,o,a,l,c)}},hydrate:mv,normalize:yv},ix=gv;function Zs(e,t){const n=e.props&&e.props[t];oe(n)&&n()}function _v(e,t,n,r,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,f=u("div"),d=e.suspense=_h(e,s,r,t,f,n,i,o,a,l);c(null,d.pendingBranch=e.ssContent,f,null,r,d,i,o),d.deps>0?(Zs(e,"onPending"),Zs(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,i,o),$r(d,e.ssFallback)):d.resolve(!1,!0)}function vv(e,t,n,r,s,i,o,a,{p:l,um:c,o:{createElement:u}}){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,tn(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),$r(f,h)))):(f.pendingId=Fa++,T?(f.isHydrating=!1,f.activeBranch=g):c(g,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("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),$r(f,h))):p&&tn(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&&tn(p,d))l(p,d,n,r,s,f,i,o,a),$r(f,d);else if(Zs(t,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=Fa++,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 _h(e,t,n,r,s,i,o,a,l,c,u=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:g,remove:y}}=c;let T;const b=wv(e);b&&t&&t.pendingBranch&&(T=t.pendingId,t.deps++);const S=e.props?ud(e.props.timeout):void 0,E=i,m={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:s,deps:0,pendingId:Fa++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,F=!1){const{vnode:C,activeBranch:R,pendingBranch:L,pendingId:Y,effects:M,parentComponent:te,container:ce,isInFallback:_e}=m;let le=!1;m.isHydrating?m.isHydrating=!1:$||(le=R&&L.transition&&L.transition.mode==="out-in",le&&(R.transition.afterLeave=()=>{Y===m.pendingId&&(d(L,ce,i===E?p(R):i,0),Ra(M),_e&&C.ssFallback&&(C.ssFallback.el=null))}),R&&(g(R.el)===ce&&(i=p(R)),h(R,te,m,!0),!le&&_e&&C.ssFallback&&nt(()=>C.ssFallback.el=null,m)),le||d(L,ce,i,0)),$r(m,L),m.pendingBranch=null,m.isInFallback=!1;let O=m.parent,se=!1;for(;O;){if(O.pendingBranch){O.effects.push(...M),se=!0;break}O=O.parent}!se&&!le&&Ra(M),m.effects=[],b&&t&&t.pendingBranch&&T===t.pendingId&&(t.deps--,t.deps===0&&!F&&t.resolve()),Zs(C,"onResolve")},fallback($){if(!m.pendingBranch)return;const{vnode:F,activeBranch:C,parentComponent:R,container:L,namespace:Y}=m;Zs(F,"onFallback");const M=p(C),te=()=>{m.isInFallback&&(f(null,$,L,M,R,null,Y,a,l),$r(m,$))},ce=$.transition&&$.transition.mode==="out-in";ce&&(C.transition.afterLeave=te),m.isInFallback=!0,h(C,R,null,!0),ce||te()},move($,F,C){m.activeBranch&&d(m.activeBranch,$,F,C),m.container=$},next(){return m.activeBranch&&p(m.activeBranch)},registerDep($,F,C){const R=!!m.pendingBranch;R&&m.deps++;const L=$.vnode.el;$.asyncDep.catch(Y=>{Yr(Y,$,0)}).then(Y=>{if($.isUnmounted||m.isUnmounted||m.pendingId!==$.suspenseId)return;$.asyncResolved=!0;const{vnode:M}=$;za($,Y),L&&(M.el=L);const te=!L&&$.subTree.el;F($,M,g(L||$.subTree.el),L?null:p($.subTree),m,o,C),te&&(M.placeholder=null,y(te)),Bl($,M.el),R&&--m.deps===0&&m.resolve()})},unmount($,F){m.isUnmounted=!0,m.activeBranch&&h(m.activeBranch,n,$,F),m.pendingBranch&&h(m.pendingBranch,n,$,F)}};return m}function mv(e,t,n,r,s,i,o,a,l){const c=t.suspense=_h(t,r,n,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function yv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Bc(r?n.default:n),e.ssFallback=r?Bc(n.fallback):Re(it)}function Bc(e){let t;if(oe(e)){const n=zr&&e._c;n&&(e._d=!1,Pe()),e=e(),n&&(e._d=!0,t=kt,vh())}return ee(e)&&(e=tv(e)),e=jt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function bv(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Ra(e)}function $r(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,Bl(r,s))}function wv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const dt=Symbol.for("v-fgt"),Ro=Symbol.for("v-txt"),it=Symbol.for("v-cmt"),Pi=Symbol.for("v-stc"),Ps=[];let kt=null;function Pe(e=!1){Ps.push(kt=e?null:[])}function vh(){Ps.pop(),kt=Ps[Ps.length-1]||null}let zr=1;function Hi(e,t=!1){zr+=e,e<0&&kt&&t&&(kt.hasOnce=!0)}function mh(e){return e.dynamicChildren=zr>0?kt||Rr:null,vh(),zr>0&&kt&&kt.push(e),e}function Qe(e,t,n,r,s,i){return mh(W(e,t,n,r,s,i,!0))}function Io(e,t,n,r,s){return mh(Re(e,t,n,r,s,!0))}function Hs(e){return e?e.__v_isVNode===!0:!1}function tn(e,t){return e.type===t.type&&e.key===t.key}const yh=({key:e})=>e??null,Ni=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||De(e)||oe(e)?{i:At,r:e,k:t,f:!!n}:e:null);function W(e,t=null,n=null,r=0,s=null,i=e===dt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yh(t),ref:t&&Ni(t),scopeId:zd,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:At};return a?(Gl(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=ze(n)?8:16),zr>0&&!o&&kt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&kt.push(l),l}const Re=Ev;function Ev(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===j_)&&(e=it),Hs(e)){const a=qn(e,t,!0);return n&&Gl(a,n),zr>0&&!i&&kt&&(a.shapeFlag&6?kt[kt.indexOf(e)]=a:kt.push(a)),a.patchFlag=-2,a}if($v(e)&&(e=e.__vccOpts),t){t=Sv(t);let{class:a,style:l}=t;a&&!ze(a)&&(t.class=ur(a)),me(l)&&(Oo(l)&&!ee(l)&&(l=We({},l)),t.style=Sn(l))}const o=ze(e)?1:gh(e)?128:Zd(e)?64:me(e)?4:oe(e)?2:0;return W(e,t,n,r,s,o,i,!0)}function Sv(e){return e?Oo(e)||ah(e)?We({},e):e:null}function qn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?Tv(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&yh(c),ref:t&&t.ref?n&&i?ee(i)?i.concat(Ni(t)):[i,Ni(t)]:Ni(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!==dt?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&&qn(e.ssContent),ssFallback:e.ssFallback&&qn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&fr(u,l.clone(u)),u}function kv(e=" ",t=0){return Re(Ro,null,e,t)}function Vc(e,t){const n=Re(Pi,null,e);return n.staticCount=t,n}function Bn(e="",t=!1){return t?(Pe(),Io(it,null,e)):Re(it,null,e)}function jt(e){return e==null||typeof e=="boolean"?Re(it):ee(e)?Re(dt,null,e.slice()):Hs(e)?pn(e):Re(Ro,null,String(e))}function pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qn(e)}function Gl(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),Gl(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ah(t)?t._ctx=At:s===3&&At&&(At.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:At},n=32):(t=String(t),r&64?(n=16,t=[kv(t)]):n=8);e.children=t,e.shapeFlag|=n}function Tv(...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=ur([t.class,r.class]));else if(s==="style")t.style=Sn([t.style,r.style]);else if(yo(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 Jt(e,t,n,r=null){Zt(e,t,7,[n,r])}const Ov=nh();let xv=0;function Av(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Ov,i={uid:xv++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new pd(!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:ch(r,s),emitsOptions:rh(r,s),emit:null,emitted:null,propsDefaults:Te,inheritAttrs:r.inheritAttrs,ctx:Te,data:Te,props:Te,attrs:Te,slots:Te,refs:Te,setupState:Te,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=Q_.bind(null,i),e.ce&&e.ce(i),i}let ot=null;const oi=()=>ot||At;let Gi,La;{const e=ko(),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)}};Gi=t("__VUE_INSTANCE_SETTERS__",n=>ot=n),La=t("__VUE_SSR_SETTERS__",n=>Ur=n)}const ai=e=>{const t=ot;return Gi(e),e.scope.on(),()=>{e.scope.off(),Gi(t)}},Zc=()=>{ot&&ot.scope.off(),Gi(null)};function bh(e){return e.vnode.shapeFlag&4}let Ur=!1;function Cv(e,t=!1,n=!1){t&&La(t);const{props:r,children:s}=e.vnode,i=bh(e);iv(e,r,i,t),cv(e,s,n||t);const o=i?Rv(e,t):void 0;return t&&La(!1),o}function Rv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Z_);const{setup:r}=n;if(r){On();const s=e.setupContext=r.length>1?Pv(e):null,i=ai(e),o=si(r,e,0,[e.props,s]),a=od(o);if(xn(),i(),(a||e.sp)&&!Rs(e)&&jl(e),a){if(o.then(Zc,Zc),t)return o.then(l=>{za(e,l)}).catch(l=>{Yr(l,e,0)});e.asyncDep=o}else za(e,o)}else wh(e)}function za(e,t,n){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=Nd(t)),wh(e)}function wh(e,t,n){const r=e.type;e.render||(e.render=r.render||sn);{const s=ai(e);On();try{H_(e)}finally{xn(),s()}}}const Iv={get(e,t){return ft(e,"get",""),e[t]}};function Pv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Iv),slots:e.slots,emit:e.emit,expose:t}}function Po(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nd(Fl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Is)return Is[n](e)},has(t,n){return n in t||n in Is}})):e.proxy}function Nv(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function $v(e){return oe(e)&&"__vccOpts"in e}const Ce=(e,t)=>m_(e,t,Ur);function Wl(e,t,n){try{Hi(-1);const r=arguments.length;return r===2?me(t)&&!ee(t)?Hs(t)?Re(e,null,[t]):Re(e,t):Re(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Hs(n)&&(n=[n]),Re(e,t,n))}finally{Hi(1)}}const Dv="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 Ua;const Hc=typeof window<"u"&&window.trustedTypes;if(Hc)try{Ua=Hc.createPolicy("vue",{createHTML:e=>e})}catch{}const Eh=Ua?e=>Ua.createHTML(e):e=>e,Mv="http://www.w3.org/2000/svg",Fv="http://www.w3.org/1998/Math/MathML",un=typeof document<"u"?document:null,Gc=un&&un.createElement("template"),Lv={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"?un.createElementNS(Mv,e):t==="mathml"?un.createElementNS(Fv,e):n?un.createElement(e,{is:n}):un.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>un.createTextNode(e),createComment:e=>un.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>un.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{Gc.innerHTML=Eh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Gc.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]}},In="transition",rs="animation",jr=Symbol("_vtc"),Sh={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},kh=We({},Wd,Sh),zv=e=>(e.displayName="Transition",e.props=kh,e),Uv=zv((e,{slots:t})=>Wl(C_,Th(e),t)),nr=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},Wc=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function Th(e){const t={};for(const M in e)M in Sh||(t[M]=e[M]);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:c=o,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=jv(s),g=p&&p[0],y=p&&p[1],{onBeforeEnter:T,onEnter:b,onEnterCancelled:S,onLeave:E,onLeaveCancelled:m,onBeforeAppear:$=T,onAppear:F=b,onAppearCancelled:C=S}=t,R=(M,te,ce,_e)=>{M._enterCancelled=_e,Dn(M,te?u:a),Dn(M,te?c:o),ce&&ce()},L=(M,te)=>{M._isLeaving=!1,Dn(M,f),Dn(M,h),Dn(M,d),te&&te()},Y=M=>(te,ce)=>{const _e=M?F:b,le=()=>R(te,M,ce);nr(_e,[te,le]),qc(()=>{Dn(te,M?l:i),Yt(te,M?u:a),Wc(_e)||Kc(te,r,g,le)})};return We(t,{onBeforeEnter(M){nr(T,[M]),Yt(M,i),Yt(M,o)},onBeforeAppear(M){nr($,[M]),Yt(M,l),Yt(M,c)},onEnter:Y(!1),onAppear:Y(!0),onLeave(M,te){M._isLeaving=!0;const ce=()=>L(M,te);Yt(M,f),M._enterCancelled?(Yt(M,d),ja(M)):(ja(M),Yt(M,d)),qc(()=>{M._isLeaving&&(Dn(M,f),Yt(M,h),Wc(E)||Kc(M,r,y,ce))}),nr(E,[M,ce])},onEnterCancelled(M){R(M,!1,void 0,!0),nr(S,[M])},onAppearCancelled(M){R(M,!0,void 0,!0),nr(C,[M])},onLeaveCancelled(M){L(M),nr(m,[M])}})}function jv(e){if(e==null)return null;if(me(e))return[Xo(e.enter),Xo(e.leave)];{const t=Xo(e);return[t,t]}}function Xo(e){return ud(e)}function Yt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[jr]||(e[jr]=new Set)).add(t)}function Dn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[jr];n&&(n.delete(t),n.size||(e[jr]=void 0))}function qc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Bv=0;function Kc(e,t,n,r){const s=e._endId=++Bv,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Oh(e,t);if(!o)return r();const c=o+"end";let u=0;const f=()=>{e.removeEventListener(c,d),i()},d=h=>{h.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(c,d)}function Oh(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),s=r(`${In}Delay`),i=r(`${In}Duration`),o=Jc(s,i),a=r(`${rs}Delay`),l=r(`${rs}Duration`),c=Jc(a,l);let u=null,f=0,d=0;t===In?o>0&&(u=In,f=o,d=i.length):t===rs?c>0&&(u=rs,f=c,d=l.length):(f=Math.max(o,c),u=f>0?o>c?In:rs:null,d=u?u===In?i.length:l.length:0);const h=u===In&&/\b(?:transform|all)(?:,|$)/.test(r(`${In}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:h}}function Jc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Yc(n)+Yc(e[r])))}function Yc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ja(e){return(e?e.ownerDocument:document).body.offsetHeight}function Vv(e,t,n){const r=e[jr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wi=Symbol("_vod"),xh=Symbol("_vsh"),ax={name:"show",beforeMount(e,{value:t},{transition:n}){e[Wi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ss(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),ss(e,!0),r.enter(e)):r.leave(e,()=>{ss(e,!1)}):ss(e,t))},beforeUnmount(e,{value:t}){ss(e,t)}};function ss(e,t){e.style.display=t?e[Wi]:"none",e[xh]=!t}const Zv=Symbol(""),Hv=/(?:^|;)\s*display\s*:/;function Gv(e,t,n){const r=e.style,s=ze(n);let i=!1;if(n&&!s){if(t)if(ze(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&$i(r,a,"")}else for(const o in t)n[o]==null&&$i(r,o,"");for(const o in n)o==="display"&&(i=!0),$i(r,o,n[o])}else if(s){if(t!==n){const o=r[Zv];o&&(n+=";"+o),r.cssText=n,i=Hv.test(n)}}else t&&e.removeAttribute("style");Wi in e&&(e[Wi]=i?r.display:"",e[xh]&&(r.display="none"))}const Xc=/\s*!important$/;function $i(e,t,n){if(ee(n))n.forEach(r=>$i(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Wv(e,t);Xc.test(n)?e.setProperty(Jn(r),n.replace(Xc,""),"important"):e[r]=n}}const Qc=["Webkit","Moz","ms"],Qo={};function Wv(e,t){const n=Qo[t];if(n)return n;let r=zt(t);if(r!=="filter"&&r in e)return Qo[t]=r;r=Eo(r);for(let s=0;s<Qc.length;s++){const i=Qc[s]+r;if(i in e)return Qo[t]=i}return t}const eu="http://www.w3.org/1999/xlink";function tu(e,t,n,r,s,i=Vg(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(eu,t.slice(6,t.length)):e.setAttributeNS(eu,t,n):n==null||i&&!fd(n)?e.removeAttribute(t):e.setAttribute(t,i?"":on(n)?String(n):n)}function nu(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Eh(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=fd(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 vn(e,t,n,r){e.addEventListener(t,n,r)}function qv(e,t,n,r){e.removeEventListener(t,n,r)}const ru=Symbol("_vei");function Kv(e,t,n,r,s=null){const i=e[ru]||(e[ru]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=Jv(t);if(r){const c=i[t]=Qv(r,s);vn(e,a,c,l)}else o&&(qv(e,a,o,l),i[t]=void 0)}}const su=/(?:Once|Passive|Capture)$/;function Jv(e){let t;if(su.test(e)){t={};let r;for(;r=e.match(su);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),t]}let ea=0;const Yv=Promise.resolve(),Xv=()=>ea||(Yv.then(()=>ea=0),ea=Date.now());function Qv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Zt(em(r,n.value),t,5,[r])};return n.value=e,n.attached=Xv(),n}function em(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 iu=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"?Vv(e,r,o):t==="style"?Gv(e,n,r):yo(t)?Al(t)||Kv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nm(e,t,r,o))?(nu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&tu(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ze(r))?nu(e,zt(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),tu(e,t,r,o))};function nm(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&iu(t)&&oe(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 iu(t)&&ze(n)?!1:t in e}const Ah=new WeakMap,Ch=new WeakMap,qi=Symbol("_moveCb"),ou=Symbol("_enterCb"),rm=e=>(delete e.props.mode,e),sm=rm({name:"TransitionGroup",props:We({},kh,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=oi(),r=Gd();let s,i;return Xd(()=>{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(om),s.forEach(am);const a=s.filter(lm);ja(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Yt(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[qi]=d=>{d&&d.target!==c||(!d||d.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[qi]=null,Dn(c,o))};c.addEventListener("transitionend",f)}),s=[]}),()=>{const o=ge(e),a=Th(o);let l=o.tag||dt;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),fr(u,Vs(u,a,r,n)),Ah.set(u,Rh(u.el)))}i=t.default?zl(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&fr(u,Vs(u,a,r,n))}return Re(l,null,i)}}}),im=sm;function om(e){const t=e.el;t[qi]&&t[qi](),t[ou]&&t[ou]()}function am(e){Ch.set(e,Rh(e.el))}function lm(e){const t=Ah.get(e),n=Ch.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,c=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(c=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(l-1)<.01&&(l=1),Math.abs(c-1)<.01&&(c=1),o.transform=o.webkitTransform=`translate(${r/l}px,${s/c}px)`,o.transitionDuration="0s",e}}function Rh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function cm(e,t,n){const r=e.cloneNode(),s=e[jr];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}=Oh(r);return i.removeChild(r),o}const Kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Ci(t,n):t};function um(e){e.target.composing=!0}function au(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mt=Symbol("_assign");function lu(e,t,n){return t&&(e=e.trim()),n&&(e=So(e)),e}const cu={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Mt]=Kn(s);const i=r||s.props&&s.props.type==="number";vn(e,t?"change":"input",o=>{o.target.composing||e[Mt](lu(e.value,n,i))}),(n||i)&&vn(e,"change",()=>{e.value=lu(e.value,n,i)}),t||(vn(e,"compositionstart",um),vn(e,"compositionend",au),vn(e,"change",au))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Mt]=Kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?So(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))}},fm={deep:!0,created(e,t,n){e[Mt]=Kn(n),vn(e,"change",()=>{const r=e._modelValue,s=Br(e),i=e.checked,o=e[Mt];if(ee(r)){const a=Rl(r,s),l=a!==-1;if(i&&!l)o(r.concat(s));else if(!i&&l){const c=[...r];c.splice(a,1),o(c)}}else if(Jr(r)){const a=new Set(r);i?a.add(s):a.delete(s),o(a)}else o(Ih(e,i))})},mounted:uu,beforeUpdate(e,t,n){e[Mt]=Kn(n),uu(e,t,n)}};function uu(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(ee(t))s=Rl(t,r.props.value)>-1;else if(Jr(t))s=t.has(r.props.value);else{if(t===n)return;s=Wn(t,Ih(e,!0))}e.checked!==s&&(e.checked=s)}const dm={created(e,{value:t},n){e.checked=Wn(t,n.props.value),e[Mt]=Kn(n),vn(e,"change",()=>{e[Mt](Br(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Mt]=Kn(r),t!==n&&(e.checked=Wn(t,r.props.value))}},hm={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Jr(t);vn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?So(Br(o)):Br(o));e[Mt](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,xo(()=>{e._assigning=!1})}),e[Mt]=Kn(r)},mounted(e,{value:t}){fu(e,t)},beforeUpdate(e,t,n){e[Mt]=Kn(n)},updated(e,{value:t}){e._assigning||fu(e,t)}};function fu(e,t){const n=e.multiple,r=ee(t);if(!(n&&!r&&!Jr(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Br(o);if(n)if(r){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=Rl(t,a)>-1}else o.selected=t.has(a);else if(Wn(Br(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Br(e){return"_value"in e?e._value:e.value}function Ih(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const lx={created(e,t,n){_i(e,t,n,null,"created")},mounted(e,t,n){_i(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){_i(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){_i(e,t,n,r,"updated")}};function pm(e,t){switch(e){case"SELECT":return hm;case"TEXTAREA":return cu;default:switch(t){case"checkbox":return fm;case"radio":return dm;default:return cu}}}function _i(e,t,n,r,s){const o=pm(e.tagName,n.props&&n.props.type)[s];o&&o(e,t,n,r)}const gm=["ctrl","shift","alt","meta"],_m={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)=>gm.some(n=>e[`${n}Key`]&&!t.includes(n))},vm=(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=_m[t[o]];if(a&&a(s,t))return}return e(s,...i)})},mm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ym=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Jn(s.key);if(t.some(o=>o===i||mm[o]===i))return e(s)})},bm=We({patchProp:tm},Lv);let du;function wm(){return du||(du=fv(bm))}const Em=(...e)=>{const t=wm().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=km(r);if(!s)return;const i=t._component;!oe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Sm(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Sm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function km(e){return ze(e)?document.querySelector(e):e}/*!
18
+ **/let Ua;const Hc=typeof window<"u"&&window.trustedTypes;if(Hc)try{Ua=Hc.createPolicy("vue",{createHTML:e=>e})}catch{}const Eh=Ua?e=>Ua.createHTML(e):e=>e,Mv="http://www.w3.org/2000/svg",Fv="http://www.w3.org/1998/Math/MathML",un=typeof document<"u"?document:null,Gc=un&&un.createElement("template"),Lv={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"?un.createElementNS(Mv,e):t==="mathml"?un.createElementNS(Fv,e):n?un.createElement(e,{is:n}):un.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>un.createTextNode(e),createComment:e=>un.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>un.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{Gc.innerHTML=Eh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Gc.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]}},In="transition",rs="animation",jr=Symbol("_vtc"),Sh={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},kh=We({},Wd,Sh),zv=e=>(e.displayName="Transition",e.props=kh,e),Uv=zv((e,{slots:t})=>Wl(C_,Th(e),t)),nr=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},Wc=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function Th(e){const t={};for(const M in e)M in Sh||(t[M]=e[M]);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:c=o,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=jv(s),g=p&&p[0],y=p&&p[1],{onBeforeEnter:T,onEnter:b,onEnterCancelled:S,onLeave:E,onLeaveCancelled:m,onBeforeAppear:$=T,onAppear:F=b,onAppearCancelled:C=S}=t,R=(M,te,ce,_e)=>{M._enterCancelled=_e,Dn(M,te?u:a),Dn(M,te?c:o),ce&&ce()},L=(M,te)=>{M._isLeaving=!1,Dn(M,f),Dn(M,h),Dn(M,d),te&&te()},Y=M=>(te,ce)=>{const _e=M?F:b,le=()=>R(te,M,ce);nr(_e,[te,le]),qc(()=>{Dn(te,M?l:i),Yt(te,M?u:a),Wc(_e)||Kc(te,r,g,le)})};return We(t,{onBeforeEnter(M){nr(T,[M]),Yt(M,i),Yt(M,o)},onBeforeAppear(M){nr($,[M]),Yt(M,l),Yt(M,c)},onEnter:Y(!1),onAppear:Y(!0),onLeave(M,te){M._isLeaving=!0;const ce=()=>L(M,te);Yt(M,f),M._enterCancelled?(Yt(M,d),ja(M)):(ja(M),Yt(M,d)),qc(()=>{M._isLeaving&&(Dn(M,f),Yt(M,h),Wc(E)||Kc(M,r,y,ce))}),nr(E,[M,ce])},onEnterCancelled(M){R(M,!1,void 0,!0),nr(S,[M])},onAppearCancelled(M){R(M,!0,void 0,!0),nr(C,[M])},onLeaveCancelled(M){L(M),nr(m,[M])}})}function jv(e){if(e==null)return null;if(me(e))return[Xo(e.enter),Xo(e.leave)];{const t=Xo(e);return[t,t]}}function Xo(e){return ud(e)}function Yt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[jr]||(e[jr]=new Set)).add(t)}function Dn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[jr];n&&(n.delete(t),n.size||(e[jr]=void 0))}function qc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Bv=0;function Kc(e,t,n,r){const s=e._endId=++Bv,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Oh(e,t);if(!o)return r();const c=o+"end";let u=0;const f=()=>{e.removeEventListener(c,d),i()},d=h=>{h.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(c,d)}function Oh(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),s=r(`${In}Delay`),i=r(`${In}Duration`),o=Jc(s,i),a=r(`${rs}Delay`),l=r(`${rs}Duration`),c=Jc(a,l);let u=null,f=0,d=0;t===In?o>0&&(u=In,f=o,d=i.length):t===rs?c>0&&(u=rs,f=c,d=l.length):(f=Math.max(o,c),u=f>0?o>c?In:rs:null,d=u?u===In?i.length:l.length:0);const h=u===In&&/\b(?:transform|all)(?:,|$)/.test(r(`${In}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:h}}function Jc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Yc(n)+Yc(e[r])))}function Yc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ja(e){return(e?e.ownerDocument:document).body.offsetHeight}function Vv(e,t,n){const r=e[jr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wi=Symbol("_vod"),xh=Symbol("_vsh"),ox={name:"show",beforeMount(e,{value:t},{transition:n}){e[Wi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ss(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),ss(e,!0),r.enter(e)):r.leave(e,()=>{ss(e,!1)}):ss(e,t))},beforeUnmount(e,{value:t}){ss(e,t)}};function ss(e,t){e.style.display=t?e[Wi]:"none",e[xh]=!t}const Zv=Symbol(""),Hv=/(?:^|;)\s*display\s*:/;function Gv(e,t,n){const r=e.style,s=ze(n);let i=!1;if(n&&!s){if(t)if(ze(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&$i(r,a,"")}else for(const o in t)n[o]==null&&$i(r,o,"");for(const o in n)o==="display"&&(i=!0),$i(r,o,n[o])}else if(s){if(t!==n){const o=r[Zv];o&&(n+=";"+o),r.cssText=n,i=Hv.test(n)}}else t&&e.removeAttribute("style");Wi in e&&(e[Wi]=i?r.display:"",e[xh]&&(r.display="none"))}const Xc=/\s*!important$/;function $i(e,t,n){if(ee(n))n.forEach(r=>$i(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Wv(e,t);Xc.test(n)?e.setProperty(Jn(r),n.replace(Xc,""),"important"):e[r]=n}}const Qc=["Webkit","Moz","ms"],Qo={};function Wv(e,t){const n=Qo[t];if(n)return n;let r=zt(t);if(r!=="filter"&&r in e)return Qo[t]=r;r=Eo(r);for(let s=0;s<Qc.length;s++){const i=Qc[s]+r;if(i in e)return Qo[t]=i}return t}const eu="http://www.w3.org/1999/xlink";function tu(e,t,n,r,s,i=Vg(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(eu,t.slice(6,t.length)):e.setAttributeNS(eu,t,n):n==null||i&&!fd(n)?e.removeAttribute(t):e.setAttribute(t,i?"":on(n)?String(n):n)}function nu(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Eh(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=fd(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 vn(e,t,n,r){e.addEventListener(t,n,r)}function qv(e,t,n,r){e.removeEventListener(t,n,r)}const ru=Symbol("_vei");function Kv(e,t,n,r,s=null){const i=e[ru]||(e[ru]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=Jv(t);if(r){const c=i[t]=Qv(r,s);vn(e,a,c,l)}else o&&(qv(e,a,o,l),i[t]=void 0)}}const su=/(?:Once|Passive|Capture)$/;function Jv(e){let t;if(su.test(e)){t={};let r;for(;r=e.match(su);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),t]}let ea=0;const Yv=Promise.resolve(),Xv=()=>ea||(Yv.then(()=>ea=0),ea=Date.now());function Qv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Zt(em(r,n.value),t,5,[r])};return n.value=e,n.attached=Xv(),n}function em(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 iu=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"?Vv(e,r,o):t==="style"?Gv(e,n,r):yo(t)?Al(t)||Kv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nm(e,t,r,o))?(nu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&tu(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ze(r))?nu(e,zt(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),tu(e,t,r,o))};function nm(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&iu(t)&&oe(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 iu(t)&&ze(n)?!1:t in e}const Ah=new WeakMap,Ch=new WeakMap,qi=Symbol("_moveCb"),ou=Symbol("_enterCb"),rm=e=>(delete e.props.mode,e),sm=rm({name:"TransitionGroup",props:We({},kh,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=oi(),r=Gd();let s,i;return Xd(()=>{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(om),s.forEach(am);const a=s.filter(lm);ja(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Yt(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[qi]=d=>{d&&d.target!==c||(!d||d.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[qi]=null,Dn(c,o))};c.addEventListener("transitionend",f)}),s=[]}),()=>{const o=ge(e),a=Th(o);let l=o.tag||dt;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),fr(u,Vs(u,a,r,n)),Ah.set(u,Rh(u.el)))}i=t.default?zl(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&fr(u,Vs(u,a,r,n))}return Re(l,null,i)}}}),im=sm;function om(e){const t=e.el;t[qi]&&t[qi](),t[ou]&&t[ou]()}function am(e){Ch.set(e,Rh(e.el))}function lm(e){const t=Ah.get(e),n=Ch.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,c=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(c=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(l-1)<.01&&(l=1),Math.abs(c-1)<.01&&(c=1),o.transform=o.webkitTransform=`translate(${r/l}px,${s/c}px)`,o.transitionDuration="0s",e}}function Rh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function cm(e,t,n){const r=e.cloneNode(),s=e[jr];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}=Oh(r);return i.removeChild(r),o}const Kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Ci(t,n):t};function um(e){e.target.composing=!0}function au(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mt=Symbol("_assign");function lu(e,t,n){return t&&(e=e.trim()),n&&(e=So(e)),e}const cu={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Mt]=Kn(s);const i=r||s.props&&s.props.type==="number";vn(e,t?"change":"input",o=>{o.target.composing||e[Mt](lu(e.value,n,i))}),(n||i)&&vn(e,"change",()=>{e.value=lu(e.value,n,i)}),t||(vn(e,"compositionstart",um),vn(e,"compositionend",au),vn(e,"change",au))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Mt]=Kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?So(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))}},fm={deep:!0,created(e,t,n){e[Mt]=Kn(n),vn(e,"change",()=>{const r=e._modelValue,s=Br(e),i=e.checked,o=e[Mt];if(ee(r)){const a=Rl(r,s),l=a!==-1;if(i&&!l)o(r.concat(s));else if(!i&&l){const c=[...r];c.splice(a,1),o(c)}}else if(Jr(r)){const a=new Set(r);i?a.add(s):a.delete(s),o(a)}else o(Ih(e,i))})},mounted:uu,beforeUpdate(e,t,n){e[Mt]=Kn(n),uu(e,t,n)}};function uu(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(ee(t))s=Rl(t,r.props.value)>-1;else if(Jr(t))s=t.has(r.props.value);else{if(t===n)return;s=Wn(t,Ih(e,!0))}e.checked!==s&&(e.checked=s)}const dm={created(e,{value:t},n){e.checked=Wn(t,n.props.value),e[Mt]=Kn(n),vn(e,"change",()=>{e[Mt](Br(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Mt]=Kn(r),t!==n&&(e.checked=Wn(t,r.props.value))}},hm={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Jr(t);vn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?So(Br(o)):Br(o));e[Mt](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,xo(()=>{e._assigning=!1})}),e[Mt]=Kn(r)},mounted(e,{value:t}){fu(e,t)},beforeUpdate(e,t,n){e[Mt]=Kn(n)},updated(e,{value:t}){e._assigning||fu(e,t)}};function fu(e,t){const n=e.multiple,r=ee(t);if(!(n&&!r&&!Jr(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Br(o);if(n)if(r){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=Rl(t,a)>-1}else o.selected=t.has(a);else if(Wn(Br(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Br(e){return"_value"in e?e._value:e.value}function Ih(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ax={created(e,t,n){_i(e,t,n,null,"created")},mounted(e,t,n){_i(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){_i(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){_i(e,t,n,r,"updated")}};function pm(e,t){switch(e){case"SELECT":return hm;case"TEXTAREA":return cu;default:switch(t){case"checkbox":return fm;case"radio":return dm;default:return cu}}}function _i(e,t,n,r,s){const o=pm(e.tagName,n.props&&n.props.type)[s];o&&o(e,t,n,r)}const gm=["ctrl","shift","alt","meta"],_m={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)=>gm.some(n=>e[`${n}Key`]&&!t.includes(n))},vm=(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=_m[t[o]];if(a&&a(s,t))return}return e(s,...i)})},mm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ym=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Jn(s.key);if(t.some(o=>o===i||mm[o]===i))return e(s)})},bm=We({patchProp:tm},Lv);let du;function wm(){return du||(du=fv(bm))}const Em=(...e)=>{const t=wm().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=km(r);if(!s)return;const i=t._component;!oe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Sm(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Sm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function km(e){return ze(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 ql;const No=e=>ql=e,cx=()=>Ud()&&Pt(Kl)||ql,Kl=Symbol();function Ba(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ns;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ns||(Ns={}));function Tm(){const e=gd(!0),t=e.run(()=>It({}));let n=[],r=[];const s=Fl({install(i){No(s),s._a=i,i.provide(Kl,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 Ph=()=>{};function hu(e,t,n,r=Ph){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&_d()&&Hg(s),s}function mr(e,...t){e.slice().forEach(n=>{n(...t)})}const Om=e=>e(),pu=Symbol(),ta=Symbol();function Va(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];Ba(s)&&Ba(r)&&e.hasOwnProperty(n)&&!De(r)&&!kn(r)?e[n]=Va(s,r):e[n]=r}return e}const xm=Symbol();function Am(e){return!Ba(e)||!e.hasOwnProperty(xm)}const{assign:Mn}=Object;function Cm(e){return!!(De(e)&&e.effect)}function Rm(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=s?s():{});const u=p_(n.state.value[e]);return Mn(u,i,Object.keys(o||{}).reduce((f,d)=>(f[d]=Fl(Ce(()=>{No(n);const h=n._s.get(e);return o[d].call(h,h)})),f),{}))}return l=Nh(e,c,t,n,r,!0),l}function Nh(e,t,n={},r,s,i){let o;const a=Mn({actions:{}},n),l={deep:!0};let c,u,f=[],d=[],h;const p=r.state.value[e];!i&&!p&&(r.state.value[e]={});let g;function y(C){let R;c=u=!1,typeof C=="function"?(C(r.state.value[e]),R={type:Ns.patchFunction,storeId:e,events:h}):(Va(r.state.value[e],C),R={type:Ns.patchObject,payload:C,storeId:e,events:h});const L=g=Symbol();xo().then(()=>{g===L&&(c=!0)}),u=!0,mr(f,R,r.state.value[e])}const T=i?function(){const{state:R}=n,L=R?R():{};this.$patch(Y=>{Mn(Y,L)})}:Ph;function b(){o.stop(),f=[],d=[],r._s.delete(e)}const S=(C,R="")=>{if(pu in C)return C[ta]=R,C;const L=function(){No(r);const Y=Array.from(arguments),M=[],te=[];function ce(O){M.push(O)}function _e(O){te.push(O)}mr(d,{args:Y,name:L[ta],store:m,after:ce,onError:_e});let le;try{le=C.apply(this&&this.$id===e?this:m,Y)}catch(O){throw mr(te,O),O}return le instanceof Promise?le.then(O=>(mr(M,O),O)).catch(O=>(mr(te,O),Promise.reject(O))):(mr(M,le),le)};return L[pu]=!0,L[ta]=R,L},E={_p:r,$id:e,$onAction:hu.bind(null,d),$patch:y,$reset:T,$subscribe(C,R={}){const L=hu(f,C,R.detached,()=>Y()),Y=o.run(()=>Nr(()=>r.state.value[e],M=>{(R.flush==="sync"?u:c)&&C({storeId:e,type:Ns.direct,events:h},M)},Mn({},l,R)));return L},$dispose:b},m=ri(E);r._s.set(e,m);const F=(r._a&&r._a.runWithContext||Om)(()=>r._e.run(()=>(o=gd()).run(()=>t({action:S}))));for(const C in F){const R=F[C];if(De(R)&&!Cm(R)||kn(R))i||(p&&Am(R)&&(De(R)?R.value=p[C]:Va(R,p[C])),r.state.value[e][C]=R);else if(typeof R=="function"){const L=S(R,C);F[C]=L,a.actions[C]=R}}return Mn(m,F),Mn(ge(m),F),Object.defineProperty(m,"$state",{get:()=>r.state.value[e],set:C=>{y(R=>{Mn(R,C)})}}),r._p.forEach(C=>{Mn(m,o.run(()=>C({store:m,app:r._a,pinia:r,options:a})))}),p&&i&&n.hydrate&&n.hydrate(m.$state,p),c=!0,u=!0,m}/*! #__NO_SIDE_EFFECTS__ */function Im(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 c=Ud();return a=a||(c?Pt(Kl,null):null),a&&No(a),a=ql,a._s.has(r)||(i?Nh(r,t,s,a):Rm(r,s,a)),a._s.get(r)}return o.$id=r,o}const Pm="/logo.png",X={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 Za(e,t){return JSON.stringify({type:e,...t})}function Nm(e){try{return JSON.parse(e)}catch{return null}}const ux={input:1,output:5,cacheRead:.1,cacheCreation:1.25},$h=2e3,$m=3e4,Dm=5e3,fx=`You are Claude Code, 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.
22
+ */let ql;const No=e=>ql=e,lx=()=>Ud()&&Pt(Kl)||ql,Kl=Symbol();function Ba(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ns;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ns||(Ns={}));function Tm(){const e=gd(!0),t=e.run(()=>It({}));let n=[],r=[];const s=Fl({install(i){No(s),s._a=i,i.provide(Kl,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 Ph=()=>{};function hu(e,t,n,r=Ph){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&_d()&&Hg(s),s}function mr(e,...t){e.slice().forEach(n=>{n(...t)})}const Om=e=>e(),pu=Symbol(),ta=Symbol();function Va(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];Ba(s)&&Ba(r)&&e.hasOwnProperty(n)&&!De(r)&&!kn(r)?e[n]=Va(s,r):e[n]=r}return e}const xm=Symbol();function Am(e){return!Ba(e)||!e.hasOwnProperty(xm)}const{assign:Mn}=Object;function Cm(e){return!!(De(e)&&e.effect)}function Rm(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=s?s():{});const u=p_(n.state.value[e]);return Mn(u,i,Object.keys(o||{}).reduce((f,d)=>(f[d]=Fl(Ce(()=>{No(n);const h=n._s.get(e);return o[d].call(h,h)})),f),{}))}return l=Nh(e,c,t,n,r,!0),l}function Nh(e,t,n={},r,s,i){let o;const a=Mn({actions:{}},n),l={deep:!0};let c,u,f=[],d=[],h;const p=r.state.value[e];!i&&!p&&(r.state.value[e]={});let g;function y(C){let R;c=u=!1,typeof C=="function"?(C(r.state.value[e]),R={type:Ns.patchFunction,storeId:e,events:h}):(Va(r.state.value[e],C),R={type:Ns.patchObject,payload:C,storeId:e,events:h});const L=g=Symbol();xo().then(()=>{g===L&&(c=!0)}),u=!0,mr(f,R,r.state.value[e])}const T=i?function(){const{state:R}=n,L=R?R():{};this.$patch(Y=>{Mn(Y,L)})}:Ph;function b(){o.stop(),f=[],d=[],r._s.delete(e)}const S=(C,R="")=>{if(pu in C)return C[ta]=R,C;const L=function(){No(r);const Y=Array.from(arguments),M=[],te=[];function ce(O){M.push(O)}function _e(O){te.push(O)}mr(d,{args:Y,name:L[ta],store:m,after:ce,onError:_e});let le;try{le=C.apply(this&&this.$id===e?this:m,Y)}catch(O){throw mr(te,O),O}return le instanceof Promise?le.then(O=>(mr(M,O),O)).catch(O=>(mr(te,O),Promise.reject(O))):(mr(M,le),le)};return L[pu]=!0,L[ta]=R,L},E={_p:r,$id:e,$onAction:hu.bind(null,d),$patch:y,$reset:T,$subscribe(C,R={}){const L=hu(f,C,R.detached,()=>Y()),Y=o.run(()=>Nr(()=>r.state.value[e],M=>{(R.flush==="sync"?u:c)&&C({storeId:e,type:Ns.direct,events:h},M)},Mn({},l,R)));return L},$dispose:b},m=ri(E);r._s.set(e,m);const F=(r._a&&r._a.runWithContext||Om)(()=>r._e.run(()=>(o=gd()).run(()=>t({action:S}))));for(const C in F){const R=F[C];if(De(R)&&!Cm(R)||kn(R))i||(p&&Am(R)&&(De(R)?R.value=p[C]:Va(R,p[C])),r.state.value[e][C]=R);else if(typeof R=="function"){const L=S(R,C);F[C]=L,a.actions[C]=R}}return Mn(m,F),Mn(ge(m),F),Object.defineProperty(m,"$state",{get:()=>r.state.value[e],set:C=>{y(R=>{Mn(R,C)})}}),r._p.forEach(C=>{Mn(m,o.run(()=>C({store:m,app:r._a,pinia:r,options:a})))}),p&&i&&n.hydrate&&n.hydrate(m.$state,p),c=!0,u=!0,m}/*! #__NO_SIDE_EFFECTS__ */function Im(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 c=Ud();return a=a||(c?Pt(Kl,null):null),a&&No(a),a=ql,a._s.has(r)||(i?Nh(r,t,s,a):Rm(r,s,a)),a._s.get(r)}return o.$id=r,o}const Pm="/logo.png",X={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 Za(e,t){return JSON.stringify({type:e,...t})}function Nm(e){try{return JSON.parse(e)}catch{return null}}const cx={input:1,output:5,cacheRead:.1,cacheCreation:1.25},$h=2e3,$m=3e4,Dm=5e3,ux=`You are Claude Code, 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
 
@@ -68,7 +68,7 @@ When creating plan files or design documents, always write them to a temporary d
68
68
 
69
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=Ki,a=!Mh.jitless,c=a&&Lm.value,u=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const p=d.value;return o(p)?a&&c&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(i||(i=s(t.shape)),d=i(d,h),u?Qh([],p,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function yu(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=>!xr(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=>hr(o,r,dr())))}),t)}const Sb=P("$ZodUnion",(e,t)=>{qe.init(e,t),Se(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Se(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Se(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Se(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=>Xl(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 c=l._zod.run({value:s.value,issues:[]},i);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>yu(l,s,e,i)):yu(a,s,e,i)}}),kb=P("$ZodIntersection",(e,t)=>{qe.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,c])=>bu(n,l,c)):bu(n,i,o)}});function Ga(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(Gs(e)&&Gs(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=Ga(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=Ga(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 bu(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}),xr(e))return e;const o=Ga(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 Tb=P("$ZodEnum",(e,t)=>{qe.init(e,t);const n=Fh(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>zm.has(typeof s)).map(s=>typeof s=="string"?$o(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}}),Ob=P("$ZodTransform",(e,t)=>{qe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Dh(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 Dr;return n.value=s,n}});function wu(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ep=P("$ZodOptional",(e,t)=>{qe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Se(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xl(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=>wu(i,n.value)):wu(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),xb=P("$ZodExactOptional",(e,t)=>{ep.init(e,t),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Ab=P("$ZodNullable",(e,t)=>{qe.init(e,t),Se(e._zod,"optin",()=>t.innerType._zod.optin),Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xl(n.source)}|null)$`):void 0}),Se(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)}),Cb=P("$ZodDefault",(e,t)=>{qe.init(e,t),e._zod.optin="optional",Se(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=>Eu(i,t)):Eu(s,t)}});function Eu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Rb=P("$ZodPrefault",(e,t)=>{qe.init(e,t),e._zod.optin="optional",Se(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))}),Ib=P("$ZodNonOptional",(e,t)=>{qe.init(e,t),Se(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=>Su(i,e)):Su(s,e)}});function Su(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 Pb=P("$ZodCatch",(e,t)=>{qe.init(e,t),Se(e._zod,"optin",()=>t.innerType._zod.optin),Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(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=>hr(o,r,dr()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>hr(i,r,dr()))},input:n.value}),n.issues=[]),n)}}),Nb=P("$ZodPipe",(e,t)=>{qe.init(e,t),Se(e._zod,"values",()=>t.in._zod.values),Se(e._zod,"optin",()=>t.in._zod.optin),Se(e._zod,"optout",()=>t.out._zod.optout),Se(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=>mi(o,t.in,r)):mi(i,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>mi(i,t.out,r)):mi(s,t.out,r)}});function mi(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $b=P("$ZodReadonly",(e,t)=>{qe.init(e,t),Se(e._zod,"propValues",()=>t.innerType._zod.propValues),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),Se(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(ku):ku(s)}});function ku(e){return e.value=Object.freeze(e.value),e}const Db=P("$ZodCustom",(e,t)=>{Ot.init(e,t),qe.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=>Tu(i,n,r,e));Tu(s,n,r,e)}});function Tu(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(Ws(s))}}var Ou;class Mb{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 Fb(){return new Mb}(Ou=globalThis).__zod_globalRegistry??(Ou.__zod_globalRegistry=Fb());const _s=globalThis.__zod_globalRegistry;function Lb(e,t){return new e({type:"string",...re(t)})}function zb(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(t)})}function xu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(t)})}function Ub(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(t)})}function jb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(t)})}function Bb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(t)})}function Vb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(t)})}function Zb(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(t)})}function Hb(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(t)})}function Gb(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(t)})}function Wb(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(t)})}function qb(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(t)})}function Kb(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(t)})}function Jb(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(t)})}function Yb(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(t)})}function Xb(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(t)})}function Qb(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(t)})}function e0(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(t)})}function t0(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(t)})}function n0(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(t)})}function r0(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(t)})}function s0(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(t)})}function i0(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(t)})}function o0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(t)})}function a0(e,t){return new e({type:"string",format:"date",check:"string_format",...re(t)})}function l0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(t)})}function c0(e,t){return new e({type:"string",format:"duration",check:"string_format",...re(t)})}function u0(e,t){return new e({type:"number",checks:[],...re(t)})}function f0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...re(t)})}function d0(e){return new e({type:"unknown"})}function h0(e,t){return new e({type:"never",...re(t)})}function Au(e,t){return new qh({check:"less_than",...re(t),value:e,inclusive:!1})}function na(e,t){return new qh({check:"less_than",...re(t),value:e,inclusive:!0})}function Cu(e,t){return new Kh({check:"greater_than",...re(t),value:e,inclusive:!1})}function ra(e,t){return new Kh({check:"greater_than",...re(t),value:e,inclusive:!0})}function Ru(e,t){return new Py({check:"multiple_of",...re(t),value:e})}function tp(e,t){return new $y({check:"max_length",...re(t),maximum:e})}function Yi(e,t){return new Dy({check:"min_length",...re(t),minimum:e})}function np(e,t){return new My({check:"length_equals",...re(t),length:e})}function p0(e,t){return new Fy({check:"string_format",format:"regex",...re(t),pattern:e})}function g0(e){return new Ly({check:"string_format",format:"lowercase",...re(e)})}function _0(e){return new zy({check:"string_format",format:"uppercase",...re(e)})}function v0(e,t){return new Uy({check:"string_format",format:"includes",...re(t),includes:e})}function m0(e,t){return new jy({check:"string_format",format:"starts_with",...re(t),prefix:e})}function y0(e,t){return new By({check:"string_format",format:"ends_with",...re(t),suffix:e})}function Qr(e){return new Vy({check:"overwrite",tx:e})}function b0(e){return Qr(t=>t.normalize(e))}function w0(){return Qr(e=>e.trim())}function E0(){return Qr(e=>e.toLowerCase())}function S0(){return Qr(e=>e.toUpperCase())}function k0(){return Qr(e=>Fm(e))}function T0(e,t,n){return new e({type:"array",element:t,...re(n)})}function O0(e,t,n){return new e({type:"custom",check:"custom",fn:t,...re(n)})}function x0(e){const t=A0(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ws(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(Ws(s))}},e(n.value,n)));return t}function A0(e,t){const n=new Ot({check:"custom",...re(t)});return n._zod.check=e,n}function rp(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)??_s,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 lt(e,t,n={path:[],schemaPath:[]}){var u,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=(u=e._zod).toJSONSchema)==null?void 0:f.call(u);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),lt(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"&&pt(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 sp(e,t){var o,a,l,c;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 u of e.seen.entries()){const f=(o=e.metadataRegistry.get(u[0]))==null?void 0:o.id;if(f){const d=r.get(f);if(d&&d!==u[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,u[0])}}const s=u=>{var g;const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(g=e.external.registry.get(u[0]))==null?void 0:g.id,T=e.external.uri??(S=>S);if(y)return{ref:T(y)};const b=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=b,{defId:b,ref:`${T("__shared")}#/${f}/${b}`}}if(u[1]===n)return{ref:"#"};const h=`#/${f}/`,p=u[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},i=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:d,defId:h}=s(u);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 u of e.seen.entries()){const f=u[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 u of e.seen.entries()){const f=u[1];if(t===u[0]){i(u);continue}if(e.external){const h=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&h){i(u);continue}}if((c=e.metadataRegistry.get(u[0]))==null?void 0:c.id){i(u);continue}if(f.cycle){i(u);continue}if(f.count>1&&e.reused==="ref"){i(u);continue}}}function ip(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=c=>{const u=e.seen.get(c);if(u.ref===null)return;const f=u.def??u.schema,d={...f},h=u.ref;if(u.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),c._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=c._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:c,jsonSchema:f,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[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 c=(a=e.external.registry.get(t))==null?void 0:a.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xi(t,"input",e.processors),output:Xi(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function pt(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 pt(r.element,n);if(r.type==="set")return pt(r.valueType,n);if(r.type==="lazy")return pt(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 pt(r.innerType,n);if(r.type==="intersection")return pt(r.left,n)||pt(r.right,n);if(r.type==="record"||r.type==="map")return pt(r.keyType,n)||pt(r.valueType,n);if(r.type==="pipe")return pt(r.in,n)||pt(r.out,n);if(r.type==="object"){for(const s in r.shape)if(pt(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(pt(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(pt(s,n))return!0;return!!(r.rest&&pt(r.rest,n))}return!1}const C0=(e,t={})=>n=>{const r=rp({...n,processors:t});return lt(e,r),sp(r,e),ip(r,e)},Xi=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},o=rp({...s??{},target:i,io:t,processors:n});return lt(e,o),sp(o,e),ip(o,e)},R0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},I0=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof o=="number"&&(s.maxLength=o),a&&(s.format=R0[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),c&&(s.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},P0=(e,t,n,r)=>{const s=n,{minimum:i,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u),typeof i=="number"&&(s.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c),typeof o=="number"&&(s.maximum=o,typeof c=="number"&&t.target!=="draft-04"&&(c<=o?delete s.maximum:delete s.exclusiveMaximum)),typeof l=="number"&&(s.multipleOf=l)},N0=(e,t,n,r)=>{n.not={}},$0=(e,t,n,r)=>{},D0=(e,t,n,r)=>{const s=e._zod.def,i=Fh(s.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},M0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},F0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},L0=(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=lt(i.element,t,{...r,path:[...r.path,"items"]})},z0=(e,t,n,r)=>{var c;const s=n,i=e._zod.def;s.type="object",s.properties={};const o=i.shape;for(const u in o)s.properties[u]=lt(o[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(u=>{const f=i.shape[u]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(s.required=Array.from(l)),((c=i.catchall)==null?void 0:c._zod.def.type)==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=lt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},U0=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,o=s.options.map((a,l)=>lt(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=o:n.anyOf=o},j0=(e,t,n,r)=>{const s=e._zod.def,i=lt(s.left,t,{...r,path:[...r.path,"allOf",0]}),o=lt(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=l},B0=(e,t,n,r)=>{const s=e._zod.def,i=lt(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"}]},V0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Z0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},H0=(e,t,n,r)=>{const s=e._zod.def;lt(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)))},G0=(e,t,n,r)=>{const s=e._zod.def;lt(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},W0=(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;lt(i,t,r);const o=t.seen.get(e);o.ref=i},q0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},op=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},K0=P("ZodISODateTime",(e,t)=>{rb.init(e,t),Me.init(e,t)});function J0(e){return o0(K0,e)}const Y0=P("ZodISODate",(e,t)=>{sb.init(e,t),Me.init(e,t)});function X0(e){return a0(Y0,e)}const Q0=P("ZodISOTime",(e,t)=>{ib.init(e,t),Me.init(e,t)});function ew(e){return l0(Q0,e)}const tw=P("ZodISODuration",(e,t)=>{ob.init(e,t),Me.init(e,t)});function nw(e){return c0(tw,e)}const rw=(e,t)=>{Bh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Jm(e,n)},flatten:{value:n=>Km(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ha,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ha,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ut=P("ZodError",rw,{Parent:Error}),sw=ec(Ut),iw=tc(Ut),ow=Do(Ut),aw=Mo(Ut),lw=Qm(Ut),cw=ey(Ut),uw=ty(Ut),fw=ny(Ut),dw=ry(Ut),hw=sy(Ut),pw=iy(Ut),gw=oy(Ut),Ke=P("ZodType",(e,t)=>(qe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xi(e,"input"),output:Xi(e,"output")}}),e.toJSONSchema=C0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Xn(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)=>Qn(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>sw(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ow(e,n,r),e.parseAsync=async(n,r)=>iw(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>aw(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>lw(e,n,r),e.decode=(n,r)=>cw(e,n,r),e.encodeAsync=async(n,r)=>uw(e,n,r),e.decodeAsync=async(n,r)=>fw(e,n,r),e.safeEncode=(n,r)=>dw(e,n,r),e.safeDecode=(n,r)=>hw(e,n,r),e.safeEncodeAsync=async(n,r)=>pw(e,n,r),e.safeDecodeAsync=async(n,r)=>gw(e,n,r),e.refine=(n,r)=>e.check(aE(n,r)),e.superRefine=n=>e.check(lE(n)),e.overwrite=n=>e.check(Qr(n)),e.optional=()=>$u(e),e.exactOptional=()=>qw(e),e.nullable=()=>Du(e),e.nullish=()=>$u(Du(e)),e.nonoptional=n=>eE(e,n),e.array=()=>zw(e),e.or=n=>Bw([e,n]),e.and=n=>Zw(e,n),e.transform=n=>Mu(e,Gw(n)),e.default=n=>Yw(e,n),e.prefault=n=>Qw(e,n),e.catch=n=>nE(e,n),e.pipe=n=>Mu(e,n),e.readonly=()=>iE(e),e.describe=n=>{const r=e.clone();return _s.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=_s.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _s.get(e);const r=e.clone();return _s.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),ap=P("_ZodString",(e,t)=>{nc.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>I0(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(p0(...r)),e.includes=(...r)=>e.check(v0(...r)),e.startsWith=(...r)=>e.check(m0(...r)),e.endsWith=(...r)=>e.check(y0(...r)),e.min=(...r)=>e.check(Yi(...r)),e.max=(...r)=>e.check(tp(...r)),e.length=(...r)=>e.check(np(...r)),e.nonempty=(...r)=>e.check(Yi(1,...r)),e.lowercase=r=>e.check(g0(r)),e.uppercase=r=>e.check(_0(r)),e.trim=()=>e.check(w0()),e.normalize=(...r)=>e.check(b0(...r)),e.toLowerCase=()=>e.check(E0()),e.toUpperCase=()=>e.check(S0()),e.slugify=()=>e.check(k0())}),_w=P("ZodString",(e,t)=>{nc.init(e,t),ap.init(e,t),e.email=n=>e.check(zb(vw,n)),e.url=n=>e.check(Zb(mw,n)),e.jwt=n=>e.check(i0(Nw,n)),e.emoji=n=>e.check(Hb(yw,n)),e.guid=n=>e.check(xu(Iu,n)),e.uuid=n=>e.check(Ub(yi,n)),e.uuidv4=n=>e.check(jb(yi,n)),e.uuidv6=n=>e.check(Bb(yi,n)),e.uuidv7=n=>e.check(Vb(yi,n)),e.nanoid=n=>e.check(Gb(bw,n)),e.guid=n=>e.check(xu(Iu,n)),e.cuid=n=>e.check(Wb(ww,n)),e.cuid2=n=>e.check(qb(Ew,n)),e.ulid=n=>e.check(Kb(Sw,n)),e.base64=n=>e.check(n0(Rw,n)),e.base64url=n=>e.check(r0(Iw,n)),e.xid=n=>e.check(Jb(kw,n)),e.ksuid=n=>e.check(Yb(Tw,n)),e.ipv4=n=>e.check(Xb(Ow,n)),e.ipv6=n=>e.check(Qb(xw,n)),e.cidrv4=n=>e.check(e0(Aw,n)),e.cidrv6=n=>e.check(t0(Cw,n)),e.e164=n=>e.check(s0(Pw,n)),e.datetime=n=>e.check(J0(n)),e.date=n=>e.check(X0(n)),e.time=n=>e.check(ew(n)),e.duration=n=>e.check(nw(n))});function Un(e){return Lb(_w,e)}const Me=P("ZodStringFormat",(e,t)=>{Ne.init(e,t),ap.init(e,t)}),vw=P("ZodEmail",(e,t)=>{qy.init(e,t),Me.init(e,t)}),Iu=P("ZodGUID",(e,t)=>{Gy.init(e,t),Me.init(e,t)}),yi=P("ZodUUID",(e,t)=>{Wy.init(e,t),Me.init(e,t)}),mw=P("ZodURL",(e,t)=>{Ky.init(e,t),Me.init(e,t)}),yw=P("ZodEmoji",(e,t)=>{Jy.init(e,t),Me.init(e,t)}),bw=P("ZodNanoID",(e,t)=>{Yy.init(e,t),Me.init(e,t)}),ww=P("ZodCUID",(e,t)=>{Xy.init(e,t),Me.init(e,t)}),Ew=P("ZodCUID2",(e,t)=>{Qy.init(e,t),Me.init(e,t)}),Sw=P("ZodULID",(e,t)=>{eb.init(e,t),Me.init(e,t)}),kw=P("ZodXID",(e,t)=>{tb.init(e,t),Me.init(e,t)}),Tw=P("ZodKSUID",(e,t)=>{nb.init(e,t),Me.init(e,t)}),Ow=P("ZodIPv4",(e,t)=>{ab.init(e,t),Me.init(e,t)}),xw=P("ZodIPv6",(e,t)=>{lb.init(e,t),Me.init(e,t)}),Aw=P("ZodCIDRv4",(e,t)=>{cb.init(e,t),Me.init(e,t)}),Cw=P("ZodCIDRv6",(e,t)=>{ub.init(e,t),Me.init(e,t)}),Rw=P("ZodBase64",(e,t)=>{fb.init(e,t),Me.init(e,t)}),Iw=P("ZodBase64URL",(e,t)=>{hb.init(e,t),Me.init(e,t)}),Pw=P("ZodE164",(e,t)=>{pb.init(e,t),Me.init(e,t)}),Nw=P("ZodJWT",(e,t)=>{_b.init(e,t),Me.init(e,t)}),lp=P("ZodNumber",(e,t)=>{Yh.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>P0(e,r,s),e.gt=(r,s)=>e.check(Cu(r,s)),e.gte=(r,s)=>e.check(ra(r,s)),e.min=(r,s)=>e.check(ra(r,s)),e.lt=(r,s)=>e.check(Au(r,s)),e.lte=(r,s)=>e.check(na(r,s)),e.max=(r,s)=>e.check(na(r,s)),e.int=r=>e.check(Pu(r)),e.safe=r=>e.check(Pu(r)),e.positive=r=>e.check(Cu(0,r)),e.nonnegative=r=>e.check(ra(0,r)),e.negative=r=>e.check(Au(0,r)),e.nonpositive=r=>e.check(na(0,r)),e.multipleOf=(r,s)=>e.check(Ru(r,s)),e.step=(r,s)=>e.check(Ru(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 bi(e){return u0(lp,e)}const $w=P("ZodNumberFormat",(e,t)=>{vb.init(e,t),lp.init(e,t)});function Pu(e){return f0($w,e)}const Dw=P("ZodUnknown",(e,t)=>{mb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>$0()});function Nu(){return d0(Dw)}const Mw=P("ZodNever",(e,t)=>{yb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>N0(e,n,r)});function Fw(e){return h0(Mw,e)}const Lw=P("ZodArray",(e,t)=>{bb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>L0(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(Yi(n,r)),e.nonempty=n=>e.check(Yi(1,n)),e.max=(n,r)=>e.check(tp(n,r)),e.length=(n,r)=>e.check(np(n,r)),e.unwrap=()=>e.element});function zw(e,t){return T0(Lw,e,t)}const Uw=P("ZodObject",(e,t)=>{Eb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>z0(e,n,r,s),Se(e,"shape",()=>t.shape),e.keyof=()=>cp(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fw()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Zm(e,n),e.safeExtend=n=>Hm(e,n),e.merge=n=>Gm(e,n),e.pick=n=>Bm(e,n),e.omit=n=>Vm(e,n),e.partial=(...n)=>Wm(up,e,n[0]),e.required=(...n)=>qm(fp,e,n[0])});function rc(e,t){const n={type:"object",shape:e??{},...re(t)};return new Uw(n)}const jw=P("ZodUnion",(e,t)=>{Sb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>U0(e,n,r,s),e.options=t.options});function Bw(e,t){return new jw({type:"union",options:e,...re(t)})}const Vw=P("ZodIntersection",(e,t)=>{kb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>j0(e,n,r,s)});function Zw(e,t){return new Vw({type:"intersection",left:e,right:t})}const Wa=P("ZodEnum",(e,t)=>{Tb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>D0(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 Wa({...t,checks:[],...re(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 Wa({...t,checks:[],...re(s),entries:i})}});function cp(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Wa({type:"enum",entries:n,...re(t)})}const Hw=P("ZodTransform",(e,t)=>{Ob.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>F0(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Dh(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ws(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(Ws(o))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function Gw(e){return new Hw({type:"transform",transform:e})}const up=P("ZodOptional",(e,t)=>{ep.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>op(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function $u(e){return new up({type:"optional",innerType:e})}const Ww=P("ZodExactOptional",(e,t)=>{xb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>op(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function qw(e){return new Ww({type:"optional",innerType:e})}const Kw=P("ZodNullable",(e,t)=>{Ab.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>B0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Du(e){return new Kw({type:"nullable",innerType:e})}const Jw=P("ZodDefault",(e,t)=>{Cb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Z0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yw(e,t){return new Jw({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zh(t)}})}const Xw=P("ZodPrefault",(e,t)=>{Rb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>H0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Qw(e,t){return new Xw({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zh(t)}})}const fp=P("ZodNonOptional",(e,t)=>{Ib.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>V0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function eE(e,t){return new fp({type:"nonoptional",innerType:e,...re(t)})}const tE=P("ZodCatch",(e,t)=>{Pb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>G0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nE(e,t){return new tE({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rE=P("ZodPipe",(e,t)=>{Nb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>W0(e,n,r,s),e.in=t.in,e.out=t.out});function Mu(e,t){return new rE({type:"pipe",in:e,out:t})}const sE=P("ZodReadonly",(e,t)=>{$b.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>q0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function iE(e){return new sE({type:"readonly",innerType:e})}const oE=P("ZodCustom",(e,t)=>{Db.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>M0(e,n)});function aE(e,t={}){return O0(oE,e,t)}function lE(e){return x0(e)}rc({filePath:Un()});rc({id:Un().uuid(),sessionId:Un().uuid().nullable(),type:cp(["image","markdown","text","json","pdf","code"]),content:Un().nullable(),data:Un().nullable(),mimeType:Un().nullable(),filename:Un().nullable(),width:bi().nullable(),height:bi().nullable(),createdAt:bi(),updatedAt:bi()});rc({content:Un().min(0)});let cE=0;const uE=Im("ui",{state:()=>({toasts:[],modalOpen:null,loading:!1}),actions:{addToast(e,t,n=Dm){const r=++cE;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}}}),li=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},fE={class:"toast-container"},dE={class:"toast-icon"},hE={key:0},pE={key:1},gE={key:2},_E={key:3},vE={class:"toast-message"},mE=["onClick"],yE={__name:"ToastContainer",setup(e){const t=uE(),n=Ce(()=>t.toasts);return(r,s)=>(Pe(),Qe("div",fE,[Re(im,{name:"toast"},{default:Bs(()=>[(Pe(!0),Qe(dt,null,V_(n.value,i=>(Pe(),Qe("div",{key:i.id,class:ur(["toast",`toast-${i.type}`])},[W("span",dE,[i.type==="success"?(Pe(),Qe("span",hE,"✓")):i.type==="error"?(Pe(),Qe("span",pE,"✗")):i.type==="warning"?(Pe(),Qe("span",gE,"⚠")):(Pe(),Qe("span",_E,"ℹ"))]),W("span",vE,Et(i.message),1),W("button",{class:"toast-close",onClick:o=>Dt(t).removeToast(i.id)}," × ",8,mE)],2))),128))]),_:1})]))}},bE=li(yE,[["__scopeId","data-v-b6357017"]]),Sr=new Map;function wE(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 dx(e){const{send:t,on:n,off:r,clearSessionBuffer:s}=ci();let i=!1;const o=()=>{if(i)return;i=!0;const O=Sr.get(e)||0;Sr.set(e,O+1),O===0&&t(X.SUBSCRIBE_SESSION,{sessionId:e})},a=()=>{if(!i)return;i=!1;const O=Sr.get(e)||0;O<=1?(Sr.delete(e),t(X.UNSUBSCRIBE_SESSION,{sessionId:e}),s(e)):Sr.set(e,O-1)},l=O=>O.sessionId===e,c=wE(n,r),u=c(X.SESSION_STATUS,{filter:l,args:O=>[O.status]}),f=c(X.SESSION_MESSAGE,{filter:O=>{var se;return((se=O.message)==null?void 0:se.sessionId)===e},args:O=>[O.message]}),d=c(X.SESSION_ERROR,{filter:l,args:O=>[O.error]}),h=c(X.CANVAS_ADD,{filter:O=>{var se;return((se=O.item)==null?void 0:se.sessionId)===e},args:O=>[O.item]}),p=c(X.CANVAS_REMOVE,{filter:l,args:O=>[O.itemId]}),g=c(X.CANVAS_UPDATE,{filter:O=>{var se;return((se=O.item)==null?void 0:se.sessionId)===e},args:O=>[O.item]}),y=c(X.SESSION_PARTIAL,{filter:l,args:O=>[O.text]}),T=c(X.TODOS_UPDATE,{filter:l,args:O=>[O.todos,O.conversationId]}),b=c(X.SESSION_WORK_LOG,{filter:O=>l(O)&&O.log,args:O=>[O.log]}),S=c(X.SESSION_WORK_LOGS_ASSOCIATED,{filter:l,args:O=>[O.messageId]}),E=c(X.SESSION_THINKING_PARTIAL,{filter:l,args:O=>[O.thinking]}),m=c(X.SESSION_SUMMARY_UPDATED,{filter:l,args:O=>[O.summary]}),$=c(X.SESSION_SUMMARY_GENERATING,{filter:l,args:O=>[O.generating]}),F=c(X.SESSION_UPDATED,{filter:l,args:O=>[O.session]}),C=c(X.CONVERSATION_CREATED,{filter:l,args:O=>[O.conversation]}),R=c(X.CONVERSATION_UPDATED,{filter:l,args:O=>[O.conversation]}),L=c(X.CONVERSATION_DELETED,{filter:l,args:O=>[O.conversationId,O.newActiveConversation]}),Y=c(X.SESSION_USAGE_UPDATE,{filter:l,args:O=>[O]},{replaySessionId:e}),M=c(X.COMMAND_RUN_OUTPUT,{filter:l,args:O=>[O.runId,O.buttonId,O.output]}),te=c(X.COMMAND_RUN_COMPLETE,{filter:l,args:O=>[O.runId,O.buttonId,O.exitCode,O.output]}),ce=c(X.COMMAND_RUN_ERROR,{filter:l,args:O=>[O.runId,O.buttonId,O.error||O.message]}),_e=c(X.COMMAND_RUN_DELETED,{filter:l,args:O=>[O.runId,O.buttonId]}),le=c(X.CHANGES_UPDATE,{filter:l,args:O=>[O.changeCount,O.hasChanges]});return Yn(()=>{a()}),{subscribe:o,unsubscribe:a,onStatus:u,onMessage:f,onPartial:y,onError:d,onCanvasAdd:h,onCanvasRemove:p,onCanvasUpdate:g,onTodosUpdate:T,onWorkLog:b,onWorkLogsAssociated:S,onThinkingPartial:E,onSummaryUpdate:m,onSummaryGenerating:$,onSessionUpdate:F,onConversationCreated:C,onConversationUpdated:R,onConversationDeleted:L,onUsageUpdate:Y,onCommandOutput:M,onCommandComplete:te,onCommandError:ce,onCommandRunDeleted:_e,onChangesUpdate:le}}const qa=new Set;function hx(e){const{send:t,on:n,off:r}=ci(),s=()=>{qa.add(e),t(X.SUBSCRIBE_PROJECT,{projectId:e})},i=()=>{qa.delete(e),t(X.UNSUBSCRIBE_PROJECT,{projectId:e})},o=S=>E=>{const m=$=>{$.projectId===e&&E($.session)};return n(S,m),()=>r(S,m)},a=o(X.SESSION_CREATED),l=o(X.SESSION_UPDATED),c=S=>{const E=m=>{m.projectId===e&&S(m.sessionId)};return n(X.SESSION_DELETED,E),()=>r(X.SESSION_DELETED,E)},u=S=>{const E=m=>{m.projectId===e&&S(m.sessionId,m.summary)};return n(X.SESSION_SUMMARY_UPDATED,E),()=>r(X.SESSION_SUMMARY_UPDATED,E)},f=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.output)};return n(X.COMMAND_RUN_OUTPUT,E),()=>r(X.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(X.COMMAND_RUN_COMPLETE,E),()=>r(X.COMMAND_RUN_COMPLETE,E)},h=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.error)};return n(X.COMMAND_RUN_ERROR,E),()=>r(X.COMMAND_RUN_ERROR,E)},p=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId)};return n(X.COMMAND_RUN_DELETED,E),()=>r(X.COMMAND_RUN_DELETED,E)},g=S=>{const E=m=>{m.projectId===e&&S(m.board)};return n(X.KANBAN_BOARD_UPDATED,E),()=>r(X.KANBAN_BOARD_UPDATED,E)},y=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.fromLaneId,m.toLaneId,m.card)};return n(X.KANBAN_CARD_MOVED,E),()=>r(X.KANBAN_CARD_MOVED,E)},T=S=>{const E=m=>{m.projectId===e&&S(m.card,m.laneId)};return n(X.KANBAN_CARD_ADDED,E),()=>r(X.KANBAN_CARD_ADDED,E)},b=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.laneId)};return n(X.KANBAN_CARD_REMOVED,E),()=>r(X.KANBAN_CARD_REMOVED,E)};return Yn(()=>{i()}),{subscribe:s,unsubscribe:i,onSessionCreated:a,onSessionUpdated:l,onSessionDeleted:c,onSessionSummaryUpdated:u,onCommandRunOutput:f,onCommandRunComplete:d,onCommandRunError:h,onCommandRunDeleted:p,onKanbanBoardUpdated:g,onKanbanCardMoved:y,onKanbanCardAdded:T,onKanbanCardRemoved:b}}let he=null,Di=null,wi=$h,Fu=!1;const $s=new Map,Qi=It(!1),Ds=It("disconnected"),eo=It(0),mn=new Map,to=[],Ka=new Set;function EE(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Lo(){(he==null?void 0:he.readyState)!==WebSocket.OPEN&&(he=new WebSocket(EE()),he.onopen=()=>{for(console.log("WebSocket connected"),Qi.value=!0,Ds.value="connected",eo.value=0,wi=$h;to.length>0;){const e=to.shift();he.send(e)}for(const e of Sr.keys())he.send(Za(X.SUBSCRIBE_SESSION,{sessionId:e}));for(const e of qa)he.send(Za(X.SUBSCRIBE_PROJECT,{projectId:e}));if(Fu)for(const e of Ka)e();Fu=!0},he.onmessage=e=>{const t=Nm(e.data);if(!t)return;const n=$s.get(t.type);if(t.type===X.SESSION_USAGE_UPDATE&&(!n||n.size===0)){const r=t.sessionId;mn.has(r)||mn.set(r,[]),mn.get(r).push(t),mn.get(r).length>100&&mn.get(r).shift();return}if(n)for(const r of n)r(t)},he.onclose=e=>{if(console.log("WebSocket closed",e.code),Qi.value=!1,he=null,e.code===1e3){Ds.value="disconnected";return}Ds.value="reconnecting",eo.value++,Di=setTimeout(()=>{wi=Math.min(wi*2,$m),Lo()},wi)},he.onerror=e=>{console.error("WebSocket error:",e)})}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(!he||he.readyState!==WebSocket.OPEN)&&(he&&(he.onclose=null,he.close(),he=null),Ds.value="reconnecting",eo.value++,Lo())});function SE(e){return Ka.add(e),()=>Ka.delete(e)}function kE(){Di&&(clearTimeout(Di),Di=null),he&&(he.close(1e3),he=null),mn.clear(),to.length=0}function TE(e){mn.delete(e)}function dp(e,t){const n=Za(e,t);(he==null?void 0:he.readyState)===WebSocket.OPEN?he.send(n):(to.push(n),he||Lo())}function OE(e,t,n=null){if($s.has(e)||$s.set(e,new Set),$s.get(e).add(t),e===X.SESSION_USAGE_UPDATE&&n){const r=mn.get(n);if(r&&r.length>0){for(const s of r)t(s);mn.delete(n)}}}function xE(e,t){const n=$s.get(e);n&&n.delete(t)}function ci(){return he||Lo(),{isConnected:Qi,connectionStatus:Ds,reconnectAttempt:eo,send:dp,on:OE,off:xE,disconnect:kE,clearSessionBuffer:TE,onReconnect:SE}}async function px(e){const{send:t}=ci();if((he==null?void 0:he.readyState)===WebSocket.OPEN){t(X.SUBSCRIBE_SESSION,{sessionId:e});return}return he&&he.readyState!==WebSocket.CONNECTING&&(he.onclose=null,he.close(),he=null),dp(X.SUBSCRIBE_SESSION,{sessionId:e}),new Promise((n,r)=>{const s=setTimeout(()=>{r(new Error(`Subscription timeout for session ${e}`))},5e3),i=()=>{Qi.value?(clearTimeout(s),n()):setTimeout(i,100)};i()})}function Mi(e){return e>=80?"var(--color-error)":e>=60?"var(--color-warning)":"var(--color-success)"}const AE={class:"modal-content"},CE={class:"modal-header"},RE={class:"modal-title","data-testid":"stat-detail-title"},IE={class:"modal-body"},PE={key:0,class:"stat-unavailable"},NE={key:1,class:"stat-details"},$E={class:"stat-bar-track"},DE={class:"stat-status-row"},ME={class:"stat-detail-rows"},FE={class:"stat-detail-row","data-testid":"stat-detail-row-cores"},LE={class:"detail-value"},zE={class:"stat-detail-row","data-testid":"stat-detail-row-model"},UE={class:"detail-value"},jE={class:"stat-detail-row","data-testid":"stat-detail-row-used"},BE={class:"detail-value"},VE={class:"stat-detail-row","data-testid":"stat-detail-row-total"},ZE={class:"detail-value"},HE={class:"stat-detail-row","data-testid":"stat-detail-row-free"},GE={class:"detail-value"},WE={class:"stat-detail-row","data-testid":"stat-detail-row-free"},qE={class:"detail-value"},KE={class:"stat-detail-row","data-testid":"stat-detail-row-total"},JE={class:"detail-value"},YE={class:"stat-detail-row","data-testid":"stat-detail-row-used"},XE={class:"detail-value"},QE={__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=Ce(()=>{switch(n.statType){case"cpu":return"CPU Usage";case"memory":return"Memory Usage";case"disk":return"Disk Usage";default:return""}}),i=Ce(()=>{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=Ce(()=>Mi(i.value)),a=Ce(()=>{const d=i.value;return d>=80?"High":d>=60?"Elevated":"Normal"}),l=Ce(()=>n.metrics.memory.totalGB-n.metrics.memory.usedGB),c=Ce(()=>n.metrics.disk?n.metrics.disk.totalGB-n.metrics.disk.freeGB:0);function u(){r("close")}function f(d){d.key==="Escape"&&n.isOpen&&u()}return Xr(()=>{window.addEventListener("keydown",f)}),Yn(()=>{window.removeEventListener("keydown",f)}),(d,h)=>(Pe(),Io(x_,{to:"body"},[e.isOpen?(Pe(),Qe("div",{key:0,class:"modal-backdrop","data-testid":"system-stat-modal",onClick:vm(u,["self"]),onKeydown:ym(f,["escape"])},[W("div",AE,[W("div",CE,[W("h2",RE,Et(s.value),1),W("button",{class:"close-btn","aria-label":"Close",onClick:u}," × ")]),W("div",IE,[e.statType==="disk"&&!e.metrics.disk?(Pe(),Qe("div",PE," Disk data unavailable ")):(Pe(),Qe("div",NE,[W("div",{class:"stat-percentage","data-testid":"stat-detail-percentage",style:Sn({color:o.value})},Et(i.value)+"% ",5),W("div",$E,[W("div",{class:"stat-bar-fill","data-testid":"stat-detail-bar",style:Sn({width:`${i.value}%`,backgroundColor:o.value})},null,4)]),W("div",DE,[W("span",{class:"stat-status","data-testid":"stat-detail-status",style:Sn({color:o.value})},Et(a.value),5)]),W("div",ME,[e.statType==="cpu"?(Pe(),Qe(dt,{key:0},[W("div",FE,[h[0]||(h[0]=W("span",{class:"detail-label"},"Cores",-1)),W("span",LE,Et(e.metrics.cpu.coreCount),1)]),W("div",zE,[h[1]||(h[1]=W("span",{class:"detail-label"},"Model",-1)),W("span",UE,Et(e.metrics.cpu.model),1)])],64)):Bn("",!0),e.statType==="memory"?(Pe(),Qe(dt,{key:1},[W("div",jE,[h[2]||(h[2]=W("span",{class:"detail-label"},"Used",-1)),W("span",BE,Et(e.metrics.memory.usedGB.toFixed(1))+" GB",1)]),W("div",VE,[h[3]||(h[3]=W("span",{class:"detail-label"},"Total",-1)),W("span",ZE,Et(e.metrics.memory.totalGB.toFixed(1))+" GB",1)]),W("div",HE,[h[4]||(h[4]=W("span",{class:"detail-label"},"Free",-1)),W("span",GE,Et(l.value.toFixed(1))+" GB",1)])],64)):Bn("",!0),e.statType==="disk"&&e.metrics.disk?(Pe(),Qe(dt,{key:2},[W("div",WE,[h[5]||(h[5]=W("span",{class:"detail-label"},"Free",-1)),W("span",qE,Et(e.metrics.disk.freeGB.toFixed(1))+" GB",1)]),W("div",KE,[h[6]||(h[6]=W("span",{class:"detail-label"},"Total",-1)),W("span",JE,Et(e.metrics.disk.totalGB.toFixed(1))+" GB",1)]),W("div",YE,[h[7]||(h[7]=W("span",{class:"detail-label"},"Used",-1)),W("span",XE,Et(c.value.toFixed(1))+" GB",1)])],64)):Bn("",!0)])]))]),W("div",{class:"modal-footer"},[W("button",{class:"btn btn-secondary",onClick:u}," Close ")])])],32)):Bn("",!0)]))}},eS=li(QE,[["__scopeId","data-v-4efd7d7f"]]),tS=["title"],nS={key:1,class:"system-indicators","data-testid":"system-indicators"},rS=["title"],sS={class:"indicator-bar-track"},iS=["title"],oS={class:"indicator-bar-track"},aS=["title"],lS={class:"indicator-bar-track"},cS={__name:"SystemIndicators",setup(e){const{on:t,off:n,connectionStatus:r,reconnectAttempt:s}=ci(),i=It(null),o=Ce(()=>i.value!==null),a=It(null),l=Ce(()=>r.value==="reconnecting"?"dot-amber dot-pulse":r.value==="disconnected"?"dot-red":""),c=Ce(()=>{if(r.value==="reconnecting"){const f=s.value;return`Reconnecting${f>0?` (attempt ${f})`:""}...`}return r.value==="disconnected"?"Disconnected":""});function u(f){i.value=f}return Xr(()=>{t(X.SYSTEM_METRICS,u)}),Yn(()=>{n(X.SYSTEM_METRICS,u)}),(f,d)=>(Pe(),Qe(dt,null,[Dt(r)!=="connected"?(Pe(),Qe("span",{key:0,class:ur(["connection-status-dot",l.value]),title:c.value,"data-testid":"connection-status-dot"},null,10,tS)):Bn("",!0),o.value?(Pe(),Qe("div",nS,[W("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]=Vc('<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)),W("div",sS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-cpu",style:Sn({width:`${i.value.cpu.usagePercent}%`,backgroundColor:Dt(Mi)(i.value.cpu.usagePercent)})},null,4)])],8,rS),W("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]=Vc('<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)),W("div",oS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-memory",style:Sn({width:`${i.value.memory.usedPercent}%`,backgroundColor:Dt(Mi)(i.value.memory.usedPercent)})},null,4)])],8,iS),i.value.disk?(Pe(),Qe("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]=W("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"},[W("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),W("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),W("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)),W("div",lS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-disk",style:Sn({width:`${i.value.disk.usedPercent}%`,backgroundColor:Dt(Mi)(i.value.disk.usedPercent)})},null,4)])],8,aS)):Bn("",!0)])):Bn("",!0),Re(eS,{"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))}},uS=li(cS,[["__scopeId","data-v-f8935b47"]]),fS=2e3,{connectionStatus:hp,reconnectAttempt:dS}=ci(),Ja=It(!1);let Ei=null;Nr(hp,e=>{e==="connected"?(clearTimeout(Ei),Ei=null,Ja.value=!1):Ei||(Ei=setTimeout(()=>{Ja.value=!0},fS))},{immediate:!0});function hS(){return{isStale:Ja,connectionStatus:hp,reconnectAttempt:dS}}const pS={class:"banner-text"},gS={__name:"ConnectionBanner",setup(e){const{isStale:t,connectionStatus:n,reconnectAttempt:r}=hS(),s=Ce(()=>t.value),i=Ce(()=>n.value==="reconnecting"?"banner-warning":n.value==="disconnected"?"banner-error":""),o=Ce(()=>n.value==="reconnecting"?"dot-pulse":""),a=Ce(()=>{if(n.value==="reconnecting"){const l=r.value;return`Connection lost — reconnecting${l>0?` (attempt ${l})`:""}...`}return"Disconnected from server"});return(l,c)=>(Pe(),Io(Uv,{name:"banner-slide"},{default:Bs(()=>[s.value?(Pe(),Qe("div",{key:0,class:ur(["connection-banner",i.value]),"data-testid":"connection-banner",role:"alert"},[W("span",{class:ur(["banner-dot",o.value])},null,2),W("span",pS,Et(a.value),1)],2)):Bn("",!0)]),_:1}))}},_S=li(gS,[["__scopeId","data-v-2fc9161b"]]);function vS(){let e=null;function t(){e||(e=requestAnimationFrame(()=>{if(window.visualViewport){const r=window.visualViewport.offsetTop||0;document.documentElement.style.setProperty("--viewport-offset-top",`${r}px`)}e=null}))}function n(){t()}return Xr(()=>{window.visualViewport&&(t(),window.visualViewport.addEventListener("scroll",n),window.visualViewport.addEventListener("resize",n))}),Yn(()=>{window.visualViewport&&(window.visualViewport.removeEventListener("scroll",n),window.visualViewport.removeEventListener("resize",n)),e&&(cancelAnimationFrame(e),e=null)}),{updateViewportOffset:t}}const mS={class:"app"},yS={class:"container"},bS={class:"nav"},wS={class:"app-main"},ES={__name:"App",setup(e){vS();const t=It(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 Xr(()=>{s(),typeof ResizeObserver<"u"&&t.value&&(n=new ResizeObserver(()=>{r()}),n.observe(t.value)),window.addEventListener("resize",r),window.addEventListener("orientationchange",s)}),Yn(()=>{n&&n.disconnect(),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",s)}),(i,o)=>{const a=Pc("router-link"),l=Pc("router-view");return Pe(),Qe("div",mS,[W("header",{ref_key:"headerRef",ref:t,class:"app-header"},[W("div",yS,[Re(a,{to:"/",class:"logo"},{default:Bs(()=>[...o[0]||(o[0]=[W("img",{src:Pm,alt:"Circus Chief Logo",class:"logo-image"},null,-1),W("span",{class:"logo-text"},"Circus Chief",-1)])]),_:1}),W("nav",bS,[Re(uS),Re(a,{to:"/settings",class:"nav-link",title:"Settings"},{default:Bs(()=>[...o[1]||(o[1]=[W("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"},[W("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),W("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),W("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),W("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),W("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),W("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),W("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),W("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),W("line",{x1:"17",y1:"16",x2:"23",y2:"16"})],-1)])]),_:1})])])],512),Re(_S),W("main",wS,[(Pe(),Io(l,{key:i.$route.path}))]),Re(bE)])}}},SS=li(ES,[["__scopeId","data-v-f51d3e8c"]]),kS="modulepreload",TS=function(e){return"/"+e},Lu={},Ze=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=TS(l),l in Lu)return;Lu[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":kS,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)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 u of e.seen.entries()){const f=u[1];if(t===u[0]){i(u);continue}if(e.external){const h=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&h){i(u);continue}}if((c=e.metadataRegistry.get(u[0]))==null?void 0:c.id){i(u);continue}if(f.cycle){i(u);continue}if(f.count>1&&e.reused==="ref"){i(u);continue}}}function ip(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=c=>{const u=e.seen.get(c);if(u.ref===null)return;const f=u.def??u.schema,d={...f},h=u.ref;if(u.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),c._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=c._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:c,jsonSchema:f,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[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 c=(a=e.external.registry.get(t))==null?void 0:a.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,n.def??n.schema);const i=((l=e.external)==null?void 0:l.defs)??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xi(t,"input",e.processors),output:Xi(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function pt(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 pt(r.element,n);if(r.type==="set")return pt(r.valueType,n);if(r.type==="lazy")return pt(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 pt(r.innerType,n);if(r.type==="intersection")return pt(r.left,n)||pt(r.right,n);if(r.type==="record"||r.type==="map")return pt(r.keyType,n)||pt(r.valueType,n);if(r.type==="pipe")return pt(r.in,n)||pt(r.out,n);if(r.type==="object"){for(const s in r.shape)if(pt(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(pt(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(pt(s,n))return!0;return!!(r.rest&&pt(r.rest,n))}return!1}const C0=(e,t={})=>n=>{const r=rp({...n,processors:t});return lt(e,r),sp(r,e),ip(r,e)},Xi=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},o=rp({...s??{},target:i,io:t,processors:n});return lt(e,o),sp(o,e),ip(o,e)},R0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},I0=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof o=="number"&&(s.maxLength=o),a&&(s.format=R0[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),c&&(s.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},P0=(e,t,n,r)=>{const s=n,{minimum:i,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u),typeof i=="number"&&(s.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c),typeof o=="number"&&(s.maximum=o,typeof c=="number"&&t.target!=="draft-04"&&(c<=o?delete s.maximum:delete s.exclusiveMaximum)),typeof l=="number"&&(s.multipleOf=l)},N0=(e,t,n,r)=>{n.not={}},$0=(e,t,n,r)=>{},D0=(e,t,n,r)=>{const s=e._zod.def,i=Fh(s.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},M0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},F0=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},L0=(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=lt(i.element,t,{...r,path:[...r.path,"items"]})},z0=(e,t,n,r)=>{var c;const s=n,i=e._zod.def;s.type="object",s.properties={};const o=i.shape;for(const u in o)s.properties[u]=lt(o[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(u=>{const f=i.shape[u]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(s.required=Array.from(l)),((c=i.catchall)==null?void 0:c._zod.def.type)==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=lt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},U0=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,o=s.options.map((a,l)=>lt(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=o:n.anyOf=o},j0=(e,t,n,r)=>{const s=e._zod.def,i=lt(s.left,t,{...r,path:[...r.path,"allOf",0]}),o=lt(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=l},B0=(e,t,n,r)=>{const s=e._zod.def,i=lt(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"}]},V0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Z0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},H0=(e,t,n,r)=>{const s=e._zod.def;lt(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)))},G0=(e,t,n,r)=>{const s=e._zod.def;lt(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},W0=(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;lt(i,t,r);const o=t.seen.get(e);o.ref=i},q0=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},op=(e,t,n,r)=>{const s=e._zod.def;lt(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},K0=P("ZodISODateTime",(e,t)=>{rb.init(e,t),Me.init(e,t)});function J0(e){return o0(K0,e)}const Y0=P("ZodISODate",(e,t)=>{sb.init(e,t),Me.init(e,t)});function X0(e){return a0(Y0,e)}const Q0=P("ZodISOTime",(e,t)=>{ib.init(e,t),Me.init(e,t)});function ew(e){return l0(Q0,e)}const tw=P("ZodISODuration",(e,t)=>{ob.init(e,t),Me.init(e,t)});function nw(e){return c0(tw,e)}const rw=(e,t)=>{Bh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Jm(e,n)},flatten:{value:n=>Km(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ha,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ha,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ut=P("ZodError",rw,{Parent:Error}),sw=ec(Ut),iw=tc(Ut),ow=Do(Ut),aw=Mo(Ut),lw=Qm(Ut),cw=ey(Ut),uw=ty(Ut),fw=ny(Ut),dw=ry(Ut),hw=sy(Ut),pw=iy(Ut),gw=oy(Ut),Ke=P("ZodType",(e,t)=>(qe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xi(e,"input"),output:Xi(e,"output")}}),e.toJSONSchema=C0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Xn(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)=>Qn(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>sw(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ow(e,n,r),e.parseAsync=async(n,r)=>iw(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>aw(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>lw(e,n,r),e.decode=(n,r)=>cw(e,n,r),e.encodeAsync=async(n,r)=>uw(e,n,r),e.decodeAsync=async(n,r)=>fw(e,n,r),e.safeEncode=(n,r)=>dw(e,n,r),e.safeDecode=(n,r)=>hw(e,n,r),e.safeEncodeAsync=async(n,r)=>pw(e,n,r),e.safeDecodeAsync=async(n,r)=>gw(e,n,r),e.refine=(n,r)=>e.check(aE(n,r)),e.superRefine=n=>e.check(lE(n)),e.overwrite=n=>e.check(Qr(n)),e.optional=()=>$u(e),e.exactOptional=()=>qw(e),e.nullable=()=>Du(e),e.nullish=()=>$u(Du(e)),e.nonoptional=n=>eE(e,n),e.array=()=>zw(e),e.or=n=>Bw([e,n]),e.and=n=>Zw(e,n),e.transform=n=>Mu(e,Gw(n)),e.default=n=>Yw(e,n),e.prefault=n=>Qw(e,n),e.catch=n=>nE(e,n),e.pipe=n=>Mu(e,n),e.readonly=()=>iE(e),e.describe=n=>{const r=e.clone();return _s.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=_s.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _s.get(e);const r=e.clone();return _s.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),ap=P("_ZodString",(e,t)=>{nc.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>I0(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(p0(...r)),e.includes=(...r)=>e.check(v0(...r)),e.startsWith=(...r)=>e.check(m0(...r)),e.endsWith=(...r)=>e.check(y0(...r)),e.min=(...r)=>e.check(Yi(...r)),e.max=(...r)=>e.check(tp(...r)),e.length=(...r)=>e.check(np(...r)),e.nonempty=(...r)=>e.check(Yi(1,...r)),e.lowercase=r=>e.check(g0(r)),e.uppercase=r=>e.check(_0(r)),e.trim=()=>e.check(w0()),e.normalize=(...r)=>e.check(b0(...r)),e.toLowerCase=()=>e.check(E0()),e.toUpperCase=()=>e.check(S0()),e.slugify=()=>e.check(k0())}),_w=P("ZodString",(e,t)=>{nc.init(e,t),ap.init(e,t),e.email=n=>e.check(zb(vw,n)),e.url=n=>e.check(Zb(mw,n)),e.jwt=n=>e.check(i0(Nw,n)),e.emoji=n=>e.check(Hb(yw,n)),e.guid=n=>e.check(xu(Iu,n)),e.uuid=n=>e.check(Ub(yi,n)),e.uuidv4=n=>e.check(jb(yi,n)),e.uuidv6=n=>e.check(Bb(yi,n)),e.uuidv7=n=>e.check(Vb(yi,n)),e.nanoid=n=>e.check(Gb(bw,n)),e.guid=n=>e.check(xu(Iu,n)),e.cuid=n=>e.check(Wb(ww,n)),e.cuid2=n=>e.check(qb(Ew,n)),e.ulid=n=>e.check(Kb(Sw,n)),e.base64=n=>e.check(n0(Rw,n)),e.base64url=n=>e.check(r0(Iw,n)),e.xid=n=>e.check(Jb(kw,n)),e.ksuid=n=>e.check(Yb(Tw,n)),e.ipv4=n=>e.check(Xb(Ow,n)),e.ipv6=n=>e.check(Qb(xw,n)),e.cidrv4=n=>e.check(e0(Aw,n)),e.cidrv6=n=>e.check(t0(Cw,n)),e.e164=n=>e.check(s0(Pw,n)),e.datetime=n=>e.check(J0(n)),e.date=n=>e.check(X0(n)),e.time=n=>e.check(ew(n)),e.duration=n=>e.check(nw(n))});function Un(e){return Lb(_w,e)}const Me=P("ZodStringFormat",(e,t)=>{Ne.init(e,t),ap.init(e,t)}),vw=P("ZodEmail",(e,t)=>{qy.init(e,t),Me.init(e,t)}),Iu=P("ZodGUID",(e,t)=>{Gy.init(e,t),Me.init(e,t)}),yi=P("ZodUUID",(e,t)=>{Wy.init(e,t),Me.init(e,t)}),mw=P("ZodURL",(e,t)=>{Ky.init(e,t),Me.init(e,t)}),yw=P("ZodEmoji",(e,t)=>{Jy.init(e,t),Me.init(e,t)}),bw=P("ZodNanoID",(e,t)=>{Yy.init(e,t),Me.init(e,t)}),ww=P("ZodCUID",(e,t)=>{Xy.init(e,t),Me.init(e,t)}),Ew=P("ZodCUID2",(e,t)=>{Qy.init(e,t),Me.init(e,t)}),Sw=P("ZodULID",(e,t)=>{eb.init(e,t),Me.init(e,t)}),kw=P("ZodXID",(e,t)=>{tb.init(e,t),Me.init(e,t)}),Tw=P("ZodKSUID",(e,t)=>{nb.init(e,t),Me.init(e,t)}),Ow=P("ZodIPv4",(e,t)=>{ab.init(e,t),Me.init(e,t)}),xw=P("ZodIPv6",(e,t)=>{lb.init(e,t),Me.init(e,t)}),Aw=P("ZodCIDRv4",(e,t)=>{cb.init(e,t),Me.init(e,t)}),Cw=P("ZodCIDRv6",(e,t)=>{ub.init(e,t),Me.init(e,t)}),Rw=P("ZodBase64",(e,t)=>{fb.init(e,t),Me.init(e,t)}),Iw=P("ZodBase64URL",(e,t)=>{hb.init(e,t),Me.init(e,t)}),Pw=P("ZodE164",(e,t)=>{pb.init(e,t),Me.init(e,t)}),Nw=P("ZodJWT",(e,t)=>{_b.init(e,t),Me.init(e,t)}),lp=P("ZodNumber",(e,t)=>{Yh.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>P0(e,r,s),e.gt=(r,s)=>e.check(Cu(r,s)),e.gte=(r,s)=>e.check(ra(r,s)),e.min=(r,s)=>e.check(ra(r,s)),e.lt=(r,s)=>e.check(Au(r,s)),e.lte=(r,s)=>e.check(na(r,s)),e.max=(r,s)=>e.check(na(r,s)),e.int=r=>e.check(Pu(r)),e.safe=r=>e.check(Pu(r)),e.positive=r=>e.check(Cu(0,r)),e.nonnegative=r=>e.check(ra(0,r)),e.negative=r=>e.check(Au(0,r)),e.nonpositive=r=>e.check(na(0,r)),e.multipleOf=(r,s)=>e.check(Ru(r,s)),e.step=(r,s)=>e.check(Ru(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 bi(e){return u0(lp,e)}const $w=P("ZodNumberFormat",(e,t)=>{vb.init(e,t),lp.init(e,t)});function Pu(e){return f0($w,e)}const Dw=P("ZodUnknown",(e,t)=>{mb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>$0()});function Nu(){return d0(Dw)}const Mw=P("ZodNever",(e,t)=>{yb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>N0(e,n,r)});function Fw(e){return h0(Mw,e)}const Lw=P("ZodArray",(e,t)=>{bb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>L0(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(Yi(n,r)),e.nonempty=n=>e.check(Yi(1,n)),e.max=(n,r)=>e.check(tp(n,r)),e.length=(n,r)=>e.check(np(n,r)),e.unwrap=()=>e.element});function zw(e,t){return T0(Lw,e,t)}const Uw=P("ZodObject",(e,t)=>{Eb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>z0(e,n,r,s),Se(e,"shape",()=>t.shape),e.keyof=()=>cp(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fw()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Zm(e,n),e.safeExtend=n=>Hm(e,n),e.merge=n=>Gm(e,n),e.pick=n=>Bm(e,n),e.omit=n=>Vm(e,n),e.partial=(...n)=>Wm(up,e,n[0]),e.required=(...n)=>qm(fp,e,n[0])});function rc(e,t){const n={type:"object",shape:e??{},...re(t)};return new Uw(n)}const jw=P("ZodUnion",(e,t)=>{Sb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>U0(e,n,r,s),e.options=t.options});function Bw(e,t){return new jw({type:"union",options:e,...re(t)})}const Vw=P("ZodIntersection",(e,t)=>{kb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>j0(e,n,r,s)});function Zw(e,t){return new Vw({type:"intersection",left:e,right:t})}const Wa=P("ZodEnum",(e,t)=>{Tb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,s,i)=>D0(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 Wa({...t,checks:[],...re(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 Wa({...t,checks:[],...re(s),entries:i})}});function cp(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Wa({type:"enum",entries:n,...re(t)})}const Hw=P("ZodTransform",(e,t)=>{Ob.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>F0(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Dh(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ws(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(Ws(o))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function Gw(e){return new Hw({type:"transform",transform:e})}const up=P("ZodOptional",(e,t)=>{ep.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>op(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function $u(e){return new up({type:"optional",innerType:e})}const Ww=P("ZodExactOptional",(e,t)=>{xb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>op(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function qw(e){return new Ww({type:"optional",innerType:e})}const Kw=P("ZodNullable",(e,t)=>{Ab.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>B0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Du(e){return new Kw({type:"nullable",innerType:e})}const Jw=P("ZodDefault",(e,t)=>{Cb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Z0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yw(e,t){return new Jw({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zh(t)}})}const Xw=P("ZodPrefault",(e,t)=>{Rb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>H0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function Qw(e,t){return new Xw({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zh(t)}})}const fp=P("ZodNonOptional",(e,t)=>{Ib.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>V0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function eE(e,t){return new fp({type:"nonoptional",innerType:e,...re(t)})}const tE=P("ZodCatch",(e,t)=>{Pb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>G0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nE(e,t){return new tE({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rE=P("ZodPipe",(e,t)=>{Nb.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>W0(e,n,r,s),e.in=t.in,e.out=t.out});function Mu(e,t){return new rE({type:"pipe",in:e,out:t})}const sE=P("ZodReadonly",(e,t)=>{$b.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>q0(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function iE(e){return new sE({type:"readonly",innerType:e})}const oE=P("ZodCustom",(e,t)=>{Db.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,r,s)=>M0(e,n)});function aE(e,t={}){return O0(oE,e,t)}function lE(e){return x0(e)}rc({filePath:Un()});rc({id:Un().uuid(),sessionId:Un().uuid().nullable(),type:cp(["image","markdown","text","json","pdf","code"]),content:Un().nullable(),data:Un().nullable(),mimeType:Un().nullable(),filename:Un().nullable(),width:bi().nullable(),height:bi().nullable(),createdAt:bi(),updatedAt:bi()});rc({content:Un().min(0)});let cE=0;const uE=Im("ui",{state:()=>({toasts:[],modalOpen:null,loading:!1}),actions:{addToast(e,t,n=Dm){const r=++cE;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}}}),li=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},fE={class:"toast-container"},dE={class:"toast-icon"},hE={key:0},pE={key:1},gE={key:2},_E={key:3},vE={class:"toast-message"},mE=["onClick"],yE={__name:"ToastContainer",setup(e){const t=uE(),n=Ce(()=>t.toasts);return(r,s)=>(Pe(),Qe("div",fE,[Re(im,{name:"toast"},{default:Bs(()=>[(Pe(!0),Qe(dt,null,V_(n.value,i=>(Pe(),Qe("div",{key:i.id,class:ur(["toast",`toast-${i.type}`])},[W("span",dE,[i.type==="success"?(Pe(),Qe("span",hE,"✓")):i.type==="error"?(Pe(),Qe("span",pE,"✗")):i.type==="warning"?(Pe(),Qe("span",gE,"⚠")):(Pe(),Qe("span",_E,"ℹ"))]),W("span",vE,Et(i.message),1),W("button",{class:"toast-close",onClick:o=>Dt(t).removeToast(i.id)}," × ",8,mE)],2))),128))]),_:1})]))}},bE=li(yE,[["__scopeId","data-v-b6357017"]]),Sr=new Map;function wE(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 fx(e){const{send:t,on:n,off:r,clearSessionBuffer:s}=ci();let i=!1;const o=()=>{if(i)return;i=!0;const O=Sr.get(e)||0;Sr.set(e,O+1),O===0&&t(X.SUBSCRIBE_SESSION,{sessionId:e})},a=()=>{if(!i)return;i=!1;const O=Sr.get(e)||0;O<=1?(Sr.delete(e),t(X.UNSUBSCRIBE_SESSION,{sessionId:e}),s(e)):Sr.set(e,O-1)},l=O=>O.sessionId===e,c=wE(n,r),u=c(X.SESSION_STATUS,{filter:l,args:O=>[O.status]}),f=c(X.SESSION_MESSAGE,{filter:O=>{var se;return((se=O.message)==null?void 0:se.sessionId)===e},args:O=>[O.message]}),d=c(X.SESSION_ERROR,{filter:l,args:O=>[O.error]}),h=c(X.CANVAS_ADD,{filter:O=>{var se;return((se=O.item)==null?void 0:se.sessionId)===e},args:O=>[O.item]}),p=c(X.CANVAS_REMOVE,{filter:l,args:O=>[O.itemId]}),g=c(X.CANVAS_UPDATE,{filter:O=>{var se;return((se=O.item)==null?void 0:se.sessionId)===e},args:O=>[O.item]}),y=c(X.SESSION_PARTIAL,{filter:l,args:O=>[O.text]}),T=c(X.TODOS_UPDATE,{filter:l,args:O=>[O.todos,O.conversationId]}),b=c(X.SESSION_WORK_LOG,{filter:O=>l(O)&&O.log,args:O=>[O.log]}),S=c(X.SESSION_WORK_LOGS_ASSOCIATED,{filter:l,args:O=>[O.messageId]}),E=c(X.SESSION_THINKING_PARTIAL,{filter:l,args:O=>[O.thinking]}),m=c(X.SESSION_SUMMARY_UPDATED,{filter:l,args:O=>[O.summary]}),$=c(X.SESSION_SUMMARY_GENERATING,{filter:l,args:O=>[O.generating]}),F=c(X.SESSION_UPDATED,{filter:l,args:O=>[O.session]}),C=c(X.CONVERSATION_CREATED,{filter:l,args:O=>[O.conversation]}),R=c(X.CONVERSATION_UPDATED,{filter:l,args:O=>[O.conversation]}),L=c(X.CONVERSATION_DELETED,{filter:l,args:O=>[O.conversationId,O.newActiveConversation]}),Y=c(X.SESSION_USAGE_UPDATE,{filter:l,args:O=>[O]},{replaySessionId:e}),M=c(X.COMMAND_RUN_OUTPUT,{filter:l,args:O=>[O.runId,O.buttonId,O.output]}),te=c(X.COMMAND_RUN_COMPLETE,{filter:l,args:O=>[O.runId,O.buttonId,O.exitCode,O.output]}),ce=c(X.COMMAND_RUN_ERROR,{filter:l,args:O=>[O.runId,O.buttonId,O.error||O.message]}),_e=c(X.COMMAND_RUN_DELETED,{filter:l,args:O=>[O.runId,O.buttonId]}),le=c(X.CHANGES_UPDATE,{filter:l,args:O=>[O.changeCount,O.hasChanges]});return Yn(()=>{a()}),{subscribe:o,unsubscribe:a,onStatus:u,onMessage:f,onPartial:y,onError:d,onCanvasAdd:h,onCanvasRemove:p,onCanvasUpdate:g,onTodosUpdate:T,onWorkLog:b,onWorkLogsAssociated:S,onThinkingPartial:E,onSummaryUpdate:m,onSummaryGenerating:$,onSessionUpdate:F,onConversationCreated:C,onConversationUpdated:R,onConversationDeleted:L,onUsageUpdate:Y,onCommandOutput:M,onCommandComplete:te,onCommandError:ce,onCommandRunDeleted:_e,onChangesUpdate:le}}const qa=new Set;function dx(e){const{send:t,on:n,off:r}=ci(),s=()=>{qa.add(e),t(X.SUBSCRIBE_PROJECT,{projectId:e})},i=()=>{qa.delete(e),t(X.UNSUBSCRIBE_PROJECT,{projectId:e})},o=S=>E=>{const m=$=>{$.projectId===e&&E($.session)};return n(S,m),()=>r(S,m)},a=o(X.SESSION_CREATED),l=o(X.SESSION_UPDATED),c=S=>{const E=m=>{m.projectId===e&&S(m.sessionId)};return n(X.SESSION_DELETED,E),()=>r(X.SESSION_DELETED,E)},u=S=>{const E=m=>{m.projectId===e&&S(m.sessionId,m.summary)};return n(X.SESSION_SUMMARY_UPDATED,E),()=>r(X.SESSION_SUMMARY_UPDATED,E)},f=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.output)};return n(X.COMMAND_RUN_OUTPUT,E),()=>r(X.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(X.COMMAND_RUN_COMPLETE,E),()=>r(X.COMMAND_RUN_COMPLETE,E)},h=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId,m.error)};return n(X.COMMAND_RUN_ERROR,E),()=>r(X.COMMAND_RUN_ERROR,E)},p=S=>{const E=m=>{m.projectId===e&&S(m.runId,m.sessionId,m.buttonId)};return n(X.COMMAND_RUN_DELETED,E),()=>r(X.COMMAND_RUN_DELETED,E)},g=S=>{const E=m=>{m.projectId===e&&S(m.board)};return n(X.KANBAN_BOARD_UPDATED,E),()=>r(X.KANBAN_BOARD_UPDATED,E)},y=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.fromLaneId,m.toLaneId,m.card)};return n(X.KANBAN_CARD_MOVED,E),()=>r(X.KANBAN_CARD_MOVED,E)},T=S=>{const E=m=>{m.projectId===e&&S(m.card,m.laneId)};return n(X.KANBAN_CARD_ADDED,E),()=>r(X.KANBAN_CARD_ADDED,E)},b=S=>{const E=m=>{m.projectId===e&&S(m.cardId,m.laneId)};return n(X.KANBAN_CARD_REMOVED,E),()=>r(X.KANBAN_CARD_REMOVED,E)};return Yn(()=>{i()}),{subscribe:s,unsubscribe:i,onSessionCreated:a,onSessionUpdated:l,onSessionDeleted:c,onSessionSummaryUpdated:u,onCommandRunOutput:f,onCommandRunComplete:d,onCommandRunError:h,onCommandRunDeleted:p,onKanbanBoardUpdated:g,onKanbanCardMoved:y,onKanbanCardAdded:T,onKanbanCardRemoved:b}}let he=null,Di=null,wi=$h,Fu=!1;const $s=new Map,Qi=It(!1),Ds=It("disconnected"),eo=It(0),mn=new Map,to=[],Ka=new Set;function EE(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Lo(){(he==null?void 0:he.readyState)!==WebSocket.OPEN&&(he=new WebSocket(EE()),he.onopen=()=>{for(console.log("WebSocket connected"),Qi.value=!0,Ds.value="connected",eo.value=0,wi=$h;to.length>0;){const e=to.shift();he.send(e)}for(const e of Sr.keys())he.send(Za(X.SUBSCRIBE_SESSION,{sessionId:e}));for(const e of qa)he.send(Za(X.SUBSCRIBE_PROJECT,{projectId:e}));if(Fu)for(const e of Ka)e();Fu=!0},he.onmessage=e=>{const t=Nm(e.data);if(!t)return;const n=$s.get(t.type);if(t.type===X.SESSION_USAGE_UPDATE&&(!n||n.size===0)){const r=t.sessionId;mn.has(r)||mn.set(r,[]),mn.get(r).push(t),mn.get(r).length>100&&mn.get(r).shift();return}if(n)for(const r of n)r(t)},he.onclose=e=>{if(console.log("WebSocket closed",e.code),Qi.value=!1,he=null,e.code===1e3){Ds.value="disconnected";return}Ds.value="reconnecting",eo.value++,Di=setTimeout(()=>{wi=Math.min(wi*2,$m),Lo()},wi)},he.onerror=e=>{console.error("WebSocket error:",e)})}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(!he||he.readyState!==WebSocket.OPEN)&&(he&&(he.onclose=null,he.close(),he=null),Ds.value="reconnecting",eo.value++,Lo())});function SE(e){return Ka.add(e),()=>Ka.delete(e)}function kE(){Di&&(clearTimeout(Di),Di=null),he&&(he.close(1e3),he=null),mn.clear(),to.length=0}function TE(e){mn.delete(e)}function dp(e,t){const n=Za(e,t);(he==null?void 0:he.readyState)===WebSocket.OPEN?he.send(n):(to.push(n),he||Lo())}function OE(e,t,n=null){if($s.has(e)||$s.set(e,new Set),$s.get(e).add(t),e===X.SESSION_USAGE_UPDATE&&n){const r=mn.get(n);if(r&&r.length>0){for(const s of r)t(s);mn.delete(n)}}}function xE(e,t){const n=$s.get(e);n&&n.delete(t)}function ci(){return he||Lo(),{isConnected:Qi,connectionStatus:Ds,reconnectAttempt:eo,send:dp,on:OE,off:xE,disconnect:kE,clearSessionBuffer:TE,onReconnect:SE}}async function hx(e){const{send:t}=ci();if((he==null?void 0:he.readyState)===WebSocket.OPEN){t(X.SUBSCRIBE_SESSION,{sessionId:e});return}return he&&he.readyState!==WebSocket.CONNECTING&&(he.onclose=null,he.close(),he=null),dp(X.SUBSCRIBE_SESSION,{sessionId:e}),new Promise((n,r)=>{const s=setTimeout(()=>{r(new Error(`Subscription timeout for session ${e}`))},5e3),i=()=>{Qi.value?(clearTimeout(s),n()):setTimeout(i,100)};i()})}function Mi(e){return e>=80?"var(--color-error)":e>=60?"var(--color-warning)":"var(--color-success)"}const AE={class:"modal-content"},CE={class:"modal-header"},RE={class:"modal-title","data-testid":"stat-detail-title"},IE={class:"modal-body"},PE={key:0,class:"stat-unavailable"},NE={key:1,class:"stat-details"},$E={class:"stat-bar-track"},DE={class:"stat-status-row"},ME={class:"stat-detail-rows"},FE={class:"stat-detail-row","data-testid":"stat-detail-row-cores"},LE={class:"detail-value"},zE={class:"stat-detail-row","data-testid":"stat-detail-row-model"},UE={class:"detail-value"},jE={class:"stat-detail-row","data-testid":"stat-detail-row-used"},BE={class:"detail-value"},VE={class:"stat-detail-row","data-testid":"stat-detail-row-total"},ZE={class:"detail-value"},HE={class:"stat-detail-row","data-testid":"stat-detail-row-free"},GE={class:"detail-value"},WE={class:"stat-detail-row","data-testid":"stat-detail-row-free"},qE={class:"detail-value"},KE={class:"stat-detail-row","data-testid":"stat-detail-row-total"},JE={class:"detail-value"},YE={class:"stat-detail-row","data-testid":"stat-detail-row-used"},XE={class:"detail-value"},QE={__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=Ce(()=>{switch(n.statType){case"cpu":return"CPU Usage";case"memory":return"Memory Usage";case"disk":return"Disk Usage";default:return""}}),i=Ce(()=>{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=Ce(()=>Mi(i.value)),a=Ce(()=>{const d=i.value;return d>=80?"High":d>=60?"Elevated":"Normal"}),l=Ce(()=>n.metrics.memory.totalGB-n.metrics.memory.usedGB),c=Ce(()=>n.metrics.disk?n.metrics.disk.totalGB-n.metrics.disk.freeGB:0);function u(){r("close")}function f(d){d.key==="Escape"&&n.isOpen&&u()}return Xr(()=>{window.addEventListener("keydown",f)}),Yn(()=>{window.removeEventListener("keydown",f)}),(d,h)=>(Pe(),Io(x_,{to:"body"},[e.isOpen?(Pe(),Qe("div",{key:0,class:"modal-backdrop","data-testid":"system-stat-modal",onClick:vm(u,["self"]),onKeydown:ym(f,["escape"])},[W("div",AE,[W("div",CE,[W("h2",RE,Et(s.value),1),W("button",{class:"close-btn","aria-label":"Close",onClick:u}," × ")]),W("div",IE,[e.statType==="disk"&&!e.metrics.disk?(Pe(),Qe("div",PE," Disk data unavailable ")):(Pe(),Qe("div",NE,[W("div",{class:"stat-percentage","data-testid":"stat-detail-percentage",style:Sn({color:o.value})},Et(i.value)+"% ",5),W("div",$E,[W("div",{class:"stat-bar-fill","data-testid":"stat-detail-bar",style:Sn({width:`${i.value}%`,backgroundColor:o.value})},null,4)]),W("div",DE,[W("span",{class:"stat-status","data-testid":"stat-detail-status",style:Sn({color:o.value})},Et(a.value),5)]),W("div",ME,[e.statType==="cpu"?(Pe(),Qe(dt,{key:0},[W("div",FE,[h[0]||(h[0]=W("span",{class:"detail-label"},"Cores",-1)),W("span",LE,Et(e.metrics.cpu.coreCount),1)]),W("div",zE,[h[1]||(h[1]=W("span",{class:"detail-label"},"Model",-1)),W("span",UE,Et(e.metrics.cpu.model),1)])],64)):Bn("",!0),e.statType==="memory"?(Pe(),Qe(dt,{key:1},[W("div",jE,[h[2]||(h[2]=W("span",{class:"detail-label"},"Used",-1)),W("span",BE,Et(e.metrics.memory.usedGB.toFixed(1))+" GB",1)]),W("div",VE,[h[3]||(h[3]=W("span",{class:"detail-label"},"Total",-1)),W("span",ZE,Et(e.metrics.memory.totalGB.toFixed(1))+" GB",1)]),W("div",HE,[h[4]||(h[4]=W("span",{class:"detail-label"},"Free",-1)),W("span",GE,Et(l.value.toFixed(1))+" GB",1)])],64)):Bn("",!0),e.statType==="disk"&&e.metrics.disk?(Pe(),Qe(dt,{key:2},[W("div",WE,[h[5]||(h[5]=W("span",{class:"detail-label"},"Free",-1)),W("span",qE,Et(e.metrics.disk.freeGB.toFixed(1))+" GB",1)]),W("div",KE,[h[6]||(h[6]=W("span",{class:"detail-label"},"Total",-1)),W("span",JE,Et(e.metrics.disk.totalGB.toFixed(1))+" GB",1)]),W("div",YE,[h[7]||(h[7]=W("span",{class:"detail-label"},"Used",-1)),W("span",XE,Et(c.value.toFixed(1))+" GB",1)])],64)):Bn("",!0)])]))]),W("div",{class:"modal-footer"},[W("button",{class:"btn btn-secondary",onClick:u}," Close ")])])],32)):Bn("",!0)]))}},eS=li(QE,[["__scopeId","data-v-4efd7d7f"]]),tS=["title"],nS={key:1,class:"system-indicators","data-testid":"system-indicators"},rS=["title"],sS={class:"indicator-bar-track"},iS=["title"],oS={class:"indicator-bar-track"},aS=["title"],lS={class:"indicator-bar-track"},cS={__name:"SystemIndicators",setup(e){const{on:t,off:n,connectionStatus:r,reconnectAttempt:s}=ci(),i=It(null),o=Ce(()=>i.value!==null),a=It(null),l=Ce(()=>r.value==="reconnecting"?"dot-amber dot-pulse":r.value==="disconnected"?"dot-red":""),c=Ce(()=>{if(r.value==="reconnecting"){const f=s.value;return`Reconnecting${f>0?` (attempt ${f})`:""}...`}return r.value==="disconnected"?"Disconnected":""});function u(f){i.value=f}return Xr(()=>{t(X.SYSTEM_METRICS,u)}),Yn(()=>{n(X.SYSTEM_METRICS,u)}),(f,d)=>(Pe(),Qe(dt,null,[Dt(r)!=="connected"?(Pe(),Qe("span",{key:0,class:ur(["connection-status-dot",l.value]),title:c.value,"data-testid":"connection-status-dot"},null,10,tS)):Bn("",!0),o.value?(Pe(),Qe("div",nS,[W("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]=Vc('<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)),W("div",sS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-cpu",style:Sn({width:`${i.value.cpu.usagePercent}%`,backgroundColor:Dt(Mi)(i.value.cpu.usagePercent)})},null,4)])],8,rS),W("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]=Vc('<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)),W("div",oS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-memory",style:Sn({width:`${i.value.memory.usedPercent}%`,backgroundColor:Dt(Mi)(i.value.memory.usedPercent)})},null,4)])],8,iS),i.value.disk?(Pe(),Qe("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]=W("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"},[W("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),W("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),W("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)),W("div",lS,[W("div",{class:"indicator-bar-fill","data-testid":"indicator-bar-disk",style:Sn({width:`${i.value.disk.usedPercent}%`,backgroundColor:Dt(Mi)(i.value.disk.usedPercent)})},null,4)])],8,aS)):Bn("",!0)])):Bn("",!0),Re(eS,{"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))}},uS=li(cS,[["__scopeId","data-v-f8935b47"]]),fS=2e3,{connectionStatus:hp,reconnectAttempt:dS}=ci(),Ja=It(!1);let Ei=null;Nr(hp,e=>{e==="connected"?(clearTimeout(Ei),Ei=null,Ja.value=!1):Ei||(Ei=setTimeout(()=>{Ja.value=!0},fS))},{immediate:!0});function hS(){return{isStale:Ja,connectionStatus:hp,reconnectAttempt:dS}}const pS={class:"banner-text"},gS={__name:"ConnectionBanner",setup(e){const{isStale:t,connectionStatus:n,reconnectAttempt:r}=hS(),s=Ce(()=>t.value),i=Ce(()=>n.value==="reconnecting"?"banner-warning":n.value==="disconnected"?"banner-error":""),o=Ce(()=>n.value==="reconnecting"?"dot-pulse":""),a=Ce(()=>{if(n.value==="reconnecting"){const l=r.value;return`Connection lost — reconnecting${l>0?` (attempt ${l})`:""}...`}return"Disconnected from server"});return(l,c)=>(Pe(),Io(Uv,{name:"banner-slide"},{default:Bs(()=>[s.value?(Pe(),Qe("div",{key:0,class:ur(["connection-banner",i.value]),"data-testid":"connection-banner",role:"alert"},[W("span",{class:ur(["banner-dot",o.value])},null,2),W("span",pS,Et(a.value),1)],2)):Bn("",!0)]),_:1}))}},_S=li(gS,[["__scopeId","data-v-2fc9161b"]]);function vS(){let e=null;function t(){e||(e=requestAnimationFrame(()=>{if(window.visualViewport){const r=window.visualViewport.offsetTop||0;document.documentElement.style.setProperty("--viewport-offset-top",`${r}px`)}e=null}))}function n(){t()}return Xr(()=>{window.visualViewport&&(t(),window.visualViewport.addEventListener("scroll",n),window.visualViewport.addEventListener("resize",n))}),Yn(()=>{window.visualViewport&&(window.visualViewport.removeEventListener("scroll",n),window.visualViewport.removeEventListener("resize",n)),e&&(cancelAnimationFrame(e),e=null)}),{updateViewportOffset:t}}const mS={class:"app"},yS={class:"container"},bS={class:"nav"},wS={class:"app-main"},ES={__name:"App",setup(e){vS();const t=It(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 Xr(()=>{s(),typeof ResizeObserver<"u"&&t.value&&(n=new ResizeObserver(()=>{r()}),n.observe(t.value)),window.addEventListener("resize",r),window.addEventListener("orientationchange",s)}),Yn(()=>{n&&n.disconnect(),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",s)}),(i,o)=>{const a=Pc("router-link"),l=Pc("router-view");return Pe(),Qe("div",mS,[W("header",{ref_key:"headerRef",ref:t,class:"app-header"},[W("div",yS,[Re(a,{to:"/",class:"logo"},{default:Bs(()=>[...o[0]||(o[0]=[W("img",{src:Pm,alt:"Circus Chief Logo",class:"logo-image"},null,-1),W("span",{class:"logo-text"},"Circus Chief",-1)])]),_:1}),W("nav",bS,[Re(uS),Re(a,{to:"/settings",class:"nav-link",title:"Settings"},{default:Bs(()=>[...o[1]||(o[1]=[W("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"},[W("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),W("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),W("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),W("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),W("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),W("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),W("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),W("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),W("line",{x1:"17",y1:"16",x2:"23",y2:"16"})],-1)])]),_:1})])])],512),Re(_S),W("main",wS,[(Pe(),Io(l,{key:i.$route.path}))]),Re(bE)])}}},SS=li(ES,[["__scopeId","data-v-f51d3e8c"]]),kS="modulepreload",TS=function(e){return"/"+e},Lu={},Ze=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=TS(l),l in Lu)return;Lu[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":kS,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)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)})};/*!
72
72
  * vue-router v4.6.4
73
73
  * (c) 2025 Eduardo San Martin Morote
74
74
  * @license MIT
@@ -76,7 +76,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
76
76
  * vue-router v4.6.4
77
77
  * (c) 2025 Eduardo San Martin Morote
78
78
  * @license MIT
79
- */let ok=()=>location.protocol+"//"+location.host;function Sp(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),Uu(a,"")}return Uu(n,e)+r+s}function ak(e,t,n,r){let s=[],i=[],o=null;const a=({state:d})=>{const h=Sp(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:Xa.pop,direction:y?y>0?oa.forward:oa.back:oa.unknown})})};function l(){o=n.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(be({},d.state,{scroll:zo()}),"")}}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:f}}function Hu(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?zo():null}}function lk(e){const{history:t,location:n}=window,r={value:Sp(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,c,u){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:ok()+e+l;try{t[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),n[u?"replace":"assign"](d)}}function o(l,c){i(l,be({},t.state,Hu(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=l}function a(l,c){const u=be({},s.value,t.state,{forward:l,scroll:zo()});i(u.current,u,!0),i(l,be({},Hu(r.value,l,null),{position:u.position+1},c),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function ck(e){e=GS(e);const t=lk(e),n=ak(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:qS.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 ar=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Ye=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}(Ye||{});const uk={type:ar.Static,value:""},fk=/[a-zA-Z0-9_]/;function dk(e){if(!e)return[[]];if(e==="/")return[[uk]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=Ye.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function f(){c&&(n===Ye.Static?i.push({type:ar.Static,value:c}):n===Ye.Param||n===Ye.ParamRegExp||n===Ye.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:ar.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==Ye.ParamRegExp){r=n,n=Ye.EscapeNext;continue}switch(n){case Ye.Static:l==="/"?(c&&f(),o()):l===":"?(f(),n=Ye.Param):d();break;case Ye.EscapeNext:d(),n=r;break;case Ye.Param:l==="("?n=Ye.ParamRegExp:fk.test(l)?d():(f(),n=Ye.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Ye.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=Ye.ParamRegExpEnd:u+=l;break;case Ye.ParamRegExpEnd:f(),n=Ye.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===Ye.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),o(),s}const Gu="[^/]+?",hk={sensitive:!1,strict:!1,start:!0,end:!0};var _t=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}(_t||{});const pk=/[.+*?^${}()[\]/\\]/g;function gk(e,t){const n=be({},hk,t),r=[];let s=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[_t.Root];n.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const d=c[f];let h=_t.Segment+(n.sensitive?_t.BonusCaseSensitive:0);if(d.type===ar.Static)f||(s+="/"),s+=d.value.replace(pk,"\\$&"),h+=_t.Static;else if(d.type===ar.Param){const{value:p,repeatable:g,optional:y,regexp:T}=d;i.push({name:p,repeatable:g,optional:y});const b=T||Gu;if(b!==Gu){h+=_t.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&&c.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,h+=_t.Dynamic,y&&(h+=_t.BonusOptional),g&&(h+=_t.BonusRepeatable),b===".*"&&(h+=_t.BonusWildcard)}u.push(h)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=_t.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let d=1;d<u.length;d++){const h=u[d]||"",p=i[d-1];f[p.name]=h&&p.repeatable?h.split("/"):h}return f}function l(c){let u="",f=!1;for(const d of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const h of d)if(h.type===ar.Static)u+=h.value;else if(h.type===ar.Param){const{value:p,repeatable:g,optional:y}=h,T=p in c?c[p]:"";if(Ht(T)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const b=Ht(T)?T.join("/"):T;if(!b)if(y)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);u+=b}}return u||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function _k(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]===_t.Static+_t.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===_t.Static+_t.Segment?1:-1:0}function kp(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=_k(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(Wu(r))return 1;if(Wu(s))return-1}return s.length-r.length}function Wu(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const vk={strict:!1,end:!0,sensitive:!1};function mk(e,t,n){const r=gk(dk(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 yk(e,t){const n=[],r=new Map;t=zu(vk,t);function s(f){return r.get(f)}function i(f,d,h){const p=!h,g=Ku(f);g.aliasOf=h&&h.record;const y=zu(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(Ku(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 $=d.record.path,F=$[$.length-1]==="/"?"":"/";E.path=d.record.path+(m&&F+m)}if(b=mk(E,d,y),h?h.alias.push(b):(S=S||b,S!==b&&S.alias.push(b),p&&f.name&&!Ju(b)&&o(f.name)),Tp(b)&&l(b),g.children){const $=g.children;for(let F=0;F<$.length;F++)i($[F],b,h&&h.children[F])}h=h||b}return S?()=>{o(S)}:Ms}function o(f){if(wp(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=Ek(f,n);n.splice(d,0,f),f.record.name&&!Ju(f)&&r.set(f.record.name,f)}function c(f,d){let h,p={},g,y;if("name"in f&&f.name){if(h=r.get(f.name),!h)throw Zr(Le.MATCHER_NOT_FOUND,{location:f});y=h.record.name,p=be(qu(d.params,h.keys.filter(S=>!S.optional).concat(h.parent?h.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),f.params&&qu(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 Zr(Le.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:wk(T)}}e.forEach(f=>i(f));function u(){n.length=0,r.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function qu(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ku(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bk(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 bk(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 Ju(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wk(e){return e.reduce((t,n)=>be(t,n.meta),{})}function Ek(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;kp(e,t[i])<0?r=i:n=i+1}const s=Sk(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Sk(e){let t=e;for(;t=t.parent;)if(Tp(t)&&kp(e,t)===0)return t}function Tp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Yu(e){const t=Pt(Uo),n=Pt(ic),r=Ce(()=>{const l=Dt(e.to);return t.resolve(l)}),s=Ce(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],f=n.matched;if(!u||!f.length)return-1;const d=f.findIndex(Vr.bind(null,u));if(d>-1)return d;const h=Xu(l[c-2]);return c>1&&Xu(u)===h&&f[f.length-1].path!==h?f.findIndex(Vr.bind(null,l[c-2])):d}),i=Ce(()=>s.value>-1&&Ak(n.params,r.value.params)),o=Ce(()=>s.value>-1&&s.value===n.matched.length-1&&bp(n.params,r.value.params));function a(l={}){if(xk(l)){const c=t[Dt(e.replace)?"replace":"push"](Dt(e.to)).catch(Ms);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:Ce(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function kk(e){return e.length===1?e[0]:e}const Tk=Ul({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:Yu,setup(e,{slots:t}){const n=ri(Yu(e)),{options:r}=Pt(Uo),s=Ce(()=>({[Qu(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Qu(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&kk(t.default(n));return e.custom?i:Wl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Ok=Tk;function xk(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 Ak(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(!Ht(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Xu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qu=(e,t,n)=>e??t??n,Ck=Ul({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Pt(el),s=Ce(()=>e.route||r.value),i=Pt(Zu,0),o=Ce(()=>{let c=Dt(i);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ce(()=>s.value.matched[o.value]);Ri(Zu,Ce(()=>o.value+1)),Ri(sk,a),Ri(el,s);const l=It();return Nr(()=>[l.value,a.value,e.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Vr(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(g=>g(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,f=a.value,d=f&&f.components[u];if(!d)return ef(n.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,y=Wl(d,be({},p,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return ef(n.default,{Component:y,route:c})||y}}});function ef(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Rk=Ck;function Ik(e){const t=yk(e.routes,e),n=e.parseQuery||nk,r=e.stringifyQuery||Vu,s=e.history,i=is(),o=is(),a=is(),l=f_(Pn);let c=Pn;kr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=sa.bind(null,I=>""+I),f=sa.bind(null,zS),d=sa.bind(null,qs);function h(I,K){let H,J;return wp(I)?(H=t.getRecordMatcher(I),J=K):J=I,t.addRoute(J,H)}function p(I){const K=t.getRecordMatcher(I);K&&t.removeRoute(K)}function g(){return t.getRoutes().map(I=>I.record)}function y(I){return!!t.getRecordMatcher(I)}function T(I,K){if(K=be({},K||l.value),typeof I=="string"){const w=ia(n,I,K.path),x=t.resolve({path:w.path},K),N=s.createHref(w.fullPath);return be(w,x,{params:d(x.params),hash:qs(w.hash),redirectedFrom:void 0,href:N})}let H;if(I.path!=null)H=be({},I,{path:ia(n,I.path,K.path).path});else{const w=be({},I.params);for(const x in w)w[x]==null&&delete w[x];H=be({},I,{params:f(w)}),K.params=f(K.params)}const J=t.resolve(H,K),fe=I.hash||"";J.params=u(d(J.params));const _=BS(r,be({},I,{hash:MS(fe),path:J.path})),v=s.createHref(_);return be({fullPath:_,hash:fe,query:r===Vu?rk(I.query):I.query||{}},J,{redirectedFrom:void 0,href:v})}function b(I){return typeof I=="string"?ia(n,I,l.value.path):be({},I)}function S(I,K){if(c!==I)return Zr(Le.NAVIGATION_CANCELLED,{from:K,to:I})}function E(I){return F(I)}function m(I){return E(be(b(I),{replace:!0}))}function $(I,K){const H=I.matched[I.matched.length-1];if(H&&H.redirect){const{redirect:J}=H;let fe=typeof J=="function"?J(I,K):J;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=b(fe):{path:fe},fe.params={}),be({query:I.query,hash:I.hash,params:fe.path!=null?{}:I.params},fe)}}function F(I,K){const H=c=T(I),J=l.value,fe=I.state,_=I.force,v=I.replace===!0,w=$(H,J);if(w)return F(be(b(w),{state:typeof w=="object"?be({},fe,w.state):fe,force:_,replace:v}),K||H);const x=H;x.redirectedFrom=K;let N;return!_&&VS(r,J,H)&&(N=Zr(Le.NAVIGATION_DUPLICATED,{to:x,from:J}),tt(J,J,!0,!1)),(N?Promise.resolve(N):L(x,J)).catch(A=>ln(A)?ln(A,Le.NAVIGATION_GUARD_REDIRECT)?A:et(A):se(A,x,J)).then(A=>{if(A){if(ln(A,Le.NAVIGATION_GUARD_REDIRECT))return F(be({replace:v},b(A.to),{state:typeof A.to=="object"?be({},fe,A.to.state):fe,force:_}),K||x)}else A=M(x,J,!0,v,fe);return Y(x,J,A),A})}function C(I,K){const H=S(I,K);return H?Promise.reject(H):Promise.resolve()}function R(I){const K=Ve.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(I):I()}function L(I,K){let H;const[J,fe,_]=ik(I,K);H=aa(J.reverse(),"beforeRouteLeave",I,K);for(const w of J)w.leaveGuards.forEach(x=>{H.push(jn(x,I,K))});const v=C.bind(null,I,K);return H.push(v),Ue(H).then(()=>{H=[];for(const w of i.list())H.push(jn(w,I,K));return H.push(v),Ue(H)}).then(()=>{H=aa(fe,"beforeRouteUpdate",I,K);for(const w of fe)w.updateGuards.forEach(x=>{H.push(jn(x,I,K))});return H.push(v),Ue(H)}).then(()=>{H=[];for(const w of _)if(w.beforeEnter)if(Ht(w.beforeEnter))for(const x of w.beforeEnter)H.push(jn(x,I,K));else H.push(jn(w.beforeEnter,I,K));return H.push(v),Ue(H)}).then(()=>(I.matched.forEach(w=>w.enterCallbacks={}),H=aa(_,"beforeRouteEnter",I,K,R),H.push(v),Ue(H))).then(()=>{H=[];for(const w of o.list())H.push(jn(w,I,K));return H.push(v),Ue(H)}).catch(w=>ln(w,Le.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function Y(I,K,H){a.list().forEach(J=>R(()=>J(I,K,H)))}function M(I,K,H,J,fe){const _=S(I,K);if(_)return _;const v=K===Pn,w=kr?history.state:{};H&&(J||v?s.replace(I.fullPath,be({scroll:v&&w&&w.scroll},fe)):s.push(I.fullPath,fe)),l.value=I,tt(I,K,H,v),et()}let te;function ce(){te||(te=s.listen((I,K,H)=>{if(!mt.listening)return;const J=T(I),fe=$(J,mt.currentRoute.value);if(fe){F(be(fe,{replace:!0,force:!0}),J).catch(Ms);return}c=J;const _=l.value;kr&&YS(Bu(_.fullPath,H.delta),zo()),L(J,_).catch(v=>ln(v,Le.NAVIGATION_ABORTED|Le.NAVIGATION_CANCELLED)?v:ln(v,Le.NAVIGATION_GUARD_REDIRECT)?(F(be(b(v.to),{force:!0}),J).then(w=>{ln(w,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&!H.delta&&H.type===Xa.pop&&s.go(-1,!1)}).catch(Ms),Promise.reject()):(H.delta&&s.go(-H.delta,!1),se(v,J,_))).then(v=>{v=v||M(J,_,!1),v&&(H.delta&&!ln(v,Le.NAVIGATION_CANCELLED)?s.go(-H.delta,!1):H.type===Xa.pop&&ln(v,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),Y(J,_,v)}).catch(Ms)}))}let _e=is(),le=is(),O;function se(I,K,H){et(I);const J=le.list();return J.length?J.forEach(fe=>fe(I,K,H)):console.error(I),Promise.reject(I)}function Be(){return O&&l.value!==Pn?Promise.resolve():new Promise((I,K)=>{_e.add([I,K])})}function et(I){return O||(O=!I,ce(),_e.list().forEach(([K,H])=>I?H(I):K()),_e.reset()),I}function tt(I,K,H,J){const{scrollBehavior:fe}=e;if(!kr||!fe)return Promise.resolve();const _=!H&&XS(Bu(I.fullPath,0))||(J||!H)&&history.state&&history.state.scroll||null;return xo().then(()=>fe(I,K,_)).then(v=>v&&JS(v)).catch(v=>se(v,I,K))}const ye=I=>s.go(I);let Je;const Ve=new Set,mt={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:le.add,isReady:Be,install(I){I.component("RouterLink",Ok),I.component("RouterView",Rk),I.config.globalProperties.$router=mt,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Dt(l)}),kr&&!Je&&l.value===Pn&&(Je=!0,E(s.location).catch(J=>{}));const K={};for(const J in Pn)Object.defineProperty(K,J,{get:()=>l.value[J],enumerable:!0});I.provide(Uo,mt),I.provide(ic,Id(K)),I.provide(el,l);const H=I.unmount;Ve.add(I),I.unmount=function(){Ve.delete(I),Ve.size<1&&(c=Pn,te&&te(),te=null,l.value=Pn,Je=!1,O=!1),H()}}};function Ue(I){return I.reduce((K,H)=>K.then(()=>R(H)),Promise.resolve())}return mt}function gx(){return Pt(Uo)}function _x(e){return Pt(ic)}const Pk=[{path:"/",name:"ProjectList",component:()=>Ze(()=>import("./ProjectListView-C_yWe1QB.js"),__vite__mapDeps([0,1,2,3]))},{path:"/projects/new",name:"ProjectNew",component:()=>Ze(()=>import("./ProjectNewView-ONPpDPNA.js"),__vite__mapDeps([4,1,2,5,6,7]))},{path:"/projects/:id/edit",name:"ProjectEdit",component:()=>Ze(()=>import("./ProjectEditView-ZnWKaSqt.js"),__vite__mapDeps([8,1,2,9,10,5,6,11,12,13,14]))},{path:"/projects/:projectId/command-buttons/new",name:"CommandButtonNew",component:()=>Ze(()=>import("./CommandButtonDetailView-TMSVeeLH.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:projectId/command-buttons/:buttonId",name:"CommandButtonEdit",component:()=>Ze(()=>import("./CommandButtonDetailView-TMSVeeLH.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:id/sessions",name:"SessionList",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/archived",name:"ArchivedSessions",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/templates",name:"ProjectTemplates",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/commands",name:"ProjectCommands",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/scheduled",name:"ScheduledSessions",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/kanban",name:"ProjectKanban",component:()=>Ze(()=>import("./SessionListView-B6emPw4T.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:projectId/templates/:templateId",name:"TemplateDetail",component:()=>Ze(()=>import("./TemplateDetailView-DqA7M5Pe.js"),__vite__mapDeps([38,26,2,19,20,27,11,12,13,31,32,33,34,39]))},{path:"/projects/:id/sessions/new",name:"NewSession",component:()=>Ze(()=>import("./NewSessionView-B9W_35D0.js"),__vite__mapDeps([40,19,2,20,26,27,9,10,41,42,35,11,12,13,28,29,36,33,34,1,43]))},{path:"/sessions/active",name:"ActiveSessions",component:()=>Ze(()=>import("./ActiveSessionsView-2qqzd1tM.js"),__vite__mapDeps([44,19,2,20,16,23,21,22,24,45]))},{path:"/sessions/:id/:tab?",name:"SessionDetail",component:()=>Ze(()=>import("./SessionDetailView-lNqco-dG.js").then(e=>e.S),__vite__mapDeps([46,19,2,20,1,26,27,21,16,22,25,11,12,13,28,29,30,9,10,41,42,33,34,47]))},{path:"/settings",name:"Settings",component:()=>Ze(()=>import("./SettingsView-CJNMi4aJ.js"),__vite__mapDeps([48,49])),redirect:"/settings/providers",children:[{path:"providers",name:"Providers",component:()=>Ze(()=>import("./ProvidersView-BPd0xozI.js"),__vite__mapDeps([50,12,2,51]))},{path:"summary",name:"SummarySettings",component:()=>Ze(()=>import("./SummarySettingsView-DGjXv3Px.js"),__vite__mapDeps([52,20,2,33,34,53]))},{path:"general",name:"GeneralSettings",component:()=>Ze(()=>import("./GeneralSettingsView-1a3MKUwM.js"),__vite__mapDeps([54,20,2,55]))},{path:"logs",name:"AgentLogs",component:()=>Ze(()=>import("./AgentLogsView-DbulYJ7p.js"),__vite__mapDeps([56,2,57]))}]}],Nk=Ik({history:ck(),routes:Pk});var k=typeof window<"u"?window:void 0,at=typeof globalThis<"u"?globalThis:k;typeof self>"u"&&(at.self=at),typeof File>"u"&&(at.File=function(){});var Op=Array.prototype,tf=Op.forEach,nf=Op.indexOf,Ct=at==null?void 0:at.navigator,B=at==null?void 0:at.document,st=at==null?void 0:at.location,tl=at==null?void 0:at.fetch,nl=at!=null&&at.XMLHttpRequest&&"withCredentials"in new at.XMLHttpRequest?at.XMLHttpRequest:void 0,rf=at==null?void 0:at.AbortController,St=Ct==null?void 0:Ct.userAgent,Q=k??{},fn={DEBUG:!1,LIB_VERSION:"1.356.1"};function sf(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,s)}function dn(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){sf(i,r,s,o,a,"next",l)}function a(l){sf(i,r,s,o,a,"throw",l)}o(void 0)})}}function j(){return j=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},j.apply(null,arguments)}function xp(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 $k=["$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"],Dk=["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"],of=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return Dk.concat(t).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})};function ue(e,t){return e.indexOf(t)!==-1}var jo=function(e){return e.trim()},rl=function(e){return e.replace(/^\$/,"")},Mk=Array.isArray,Ap=Object.prototype,Cp=Ap.hasOwnProperty,Bo=Ap.toString,ve=Mk||function(e){return Bo.call(e)==="[object Array]"},bn=e=>typeof e=="function",Xe=e=>e===Object(e)&&!ve(e),Ar=e=>{if(Xe(e)){for(var t in e)if(Cp.call(e,t))return!1;return!0}return!1},V=e=>e===void 0,Ge=e=>Bo.call(e)=="[object String]",sl=e=>Ge(e)&&e.trim().length===0,Gt=e=>e===null,de=e=>V(e)||Gt(e),Cn=e=>Bo.call(e)=="[object Number]"&&e==e,Tr=e=>Cn(e)&&e>0,Tn=e=>Bo.call(e)==="[object Boolean]",Fk=e=>e instanceof FormData,Lk=e=>ue($k,e);function il(e){return e===null||typeof e!="object"}function no(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Rp(e){return!V(Event)&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var zk=[!0,"true",1,"1","yes"],la=e=>ue(zk,e),Uk=[!1,"false",0,"0","no"];function rn(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),rn(s||n,t,n,r))}class jk{constructor(t){this.t={},this.i=t.i,this.o=rn(t.bucketSize,0,100,t.h),this.m=rn(t.refillRate,0,this.o,t.h),this.$=rn(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 Ft="Mobile",ro="iOS",wn="Android",Ks="Tablet",Ip=wn+" "+Ks,Pp="iPad",Np="Apple",$p=Np+" Watch",Js="Safari",Hr="BlackBerry",Dp="Samsung",Mp=Dp+"Browser",Fp=Dp+" Internet",pr="Chrome",Bk=pr+" OS",Lp=pr+" "+ro,oc="Internet Explorer",zp=oc+" "+Ft,ac="Opera",Vk=ac+" Mini",lc="Edge",Up="Microsoft "+lc,Mr="Firefox",jp=Mr+" "+ro,Ys="Nintendo",Xs="PlayStation",Fr="Xbox",Bp=wn+" "+Ft,Vp=Ft+" "+Js,vs="Windows",ol=vs+" Phone",af="Nokia",al="Ouya",Zp="Generic",Zk=Zp+" "+Ft.toLowerCase(),Hp=Zp+" "+Ks.toLowerCase(),ll="Konqueror",gt="(\\d+(\\.\\d+)?)",ca=new RegExp("Version/"+gt),Hk=new RegExp(Fr,"i"),Gk=new RegExp(Xs+" \\w+","i"),Wk=new RegExp(Ys+" \\w+","i"),cc=new RegExp(Hr+"|PlayBook|BB10","i"),qk={"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"},Si,lf,ua,Kk=(e,t)=>t&&ue(t,Np)||function(n){return ue(n,Js)&&!ue(n,pr)&&!ue(n,wn)}(e),Gp=function(e,t){return t=t||"",ue(e," OPR/")&&ue(e,"Mini")?Vk:ue(e," OPR/")?ac:cc.test(e)?Hr:ue(e,"IE"+Ft)||ue(e,"WPDesktop")?zp:ue(e,Mp)?Fp:ue(e,lc)||ue(e,"Edg/")?Up:ue(e,"FBIOS")?"Facebook "+Ft:ue(e,"UCWEB")||ue(e,"UCBrowser")?"UC Browser":ue(e,"CriOS")?Lp:ue(e,"CrMo")||ue(e,pr)?pr:ue(e,wn)&&ue(e,Js)?Bp:ue(e,"FxiOS")?jp:ue(e.toLowerCase(),ll.toLowerCase())?ll:Kk(e,t)?ue(e,Ft)?Vp:Js:ue(e,Mr)?Mr:ue(e,"MSIE")||ue(e,"Trident/")?oc:ue(e,"Gecko")?Mr:""},Jk={[zp]:[new RegExp("rv:"+gt)],[Up]:[new RegExp(lc+"?\\/"+gt)],[pr]:[new RegExp("("+pr+"|CrMo)\\/"+gt)],[Lp]:[new RegExp("CriOS\\/"+gt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+gt)],[Js]:[ca],[Vp]:[ca],[ac]:[new RegExp("(Opera|OPR)\\/"+gt)],[Mr]:[new RegExp(Mr+"\\/"+gt)],[jp]:[new RegExp("FxiOS\\/"+gt)],[ll]:[new RegExp("Konqueror[:/]?"+gt,"i")],[Hr]:[new RegExp(Hr+" "+gt),ca],[Bp]:[new RegExp("android\\s"+gt,"i")],[Fp]:[new RegExp(Mp+"\\/"+gt)],[oc]:[new RegExp("(rv:|MSIE )"+gt)],Mozilla:[new RegExp("rv:"+gt)]},Yk=function(e,t){var n=Gp(e,t),r=Jk[n];if(V(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},cf=[[new RegExp(Fr+"; "+Fr+" (.*?)[);]","i"),e=>[Fr,e&&e[1]||""]],[new RegExp(Ys,"i"),[Ys,""]],[new RegExp(Xs,"i"),[Xs,""]],[cc,[Hr,""]],[new RegExp(vs,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ol,""];if(new RegExp(Ft).test(t)&&!/IEMobile\b/.test(t))return[vs+" "+Ft,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],s=qk[r]||"";return/arm/i.test(t)&&(s="RT"),[vs,s]}return[vs,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[ro,t.join(".")]}return[ro,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=V(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+wn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+wn+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[wn,t.join(".")]}return[wn,""]}],[/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/,[Bk,""]],[/Linux|debian/i,["Linux",""]]],uf=function(e){return Wk.test(e)?Ys:Gk.test(e)?Xs:Hk.test(e)?Fr:new RegExp(al,"i").test(e)?al:new RegExp("("+ol+"|WPDesktop)","i").test(e)?ol:/iPad/.test(e)?Pp:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?$p:cc.test(e)?Hr:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(af,"i").test(e)?af:/(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(Ft).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)?wn:Ip:new RegExp("(pda|"+Ft+")","i").test(e)?Zk:new RegExp(Ks,"i").test(e)&&!new RegExp(Ks+" pc","i").test(e)?Hp:""},Xk=e=>e instanceof Error;function Qk(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ua&&n.length===lf||(lf=n.length,ua=n.reduce((r,s)=>{Si||(Si={});var i=Si[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],c=l==null?void 0:l.filename,u=t[s];if(c&&u){r[c]=u,Si[s]=[c,u];break}}return r},{})),ua}}class eT{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 dn(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)),j({},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 dn(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,j({},n,{handled:!0}))),a}buildParsingContext(t){var n;return{chunkIdMap:Qk(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 j({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Gr="?";function cl(e,t,n,r,s){var i={platform:e,filename:t,function:n==="<anonymous>"?Gr:n,in_app:!0};return V(r)||(i.lineno=r),V(s)||(i.colno=s),i}var Wp=(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]:Gr,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},tT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rT=/\((\S*)(?::(\d+))(?::(\d+))\)/,sT=(e,t)=>{var n=tT.exec(e);if(n){var[,r,s,i]=n;return cl(t,r,Gr,+s,+i)}var o=nT.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=rT.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=Wp(o[1]||Gr,o[2]);return cl(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},iT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,oT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,aT=(e,t)=>{var n=iT.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=oT.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]||Gr;return[i,s]=Wp(i,s),cl(t,s,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},ff=/\(error: (.*)\)/,df=50;function lT(){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(`
79
+ */let ok=()=>location.protocol+"//"+location.host;function Sp(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),Uu(a,"")}return Uu(n,e)+r+s}function ak(e,t,n,r){let s=[],i=[],o=null;const a=({state:d})=>{const h=Sp(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:Xa.pop,direction:y?y>0?oa.forward:oa.back:oa.unknown})})};function l(){o=n.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(be({},d.state,{scroll:zo()}),"")}}function f(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:f}}function Hu(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?zo():null}}function lk(e){const{history:t,location:n}=window,r={value:Sp(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,c,u){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:ok()+e+l;try{t[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),n[u?"replace":"assign"](d)}}function o(l,c){i(l,be({},t.state,Hu(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=l}function a(l,c){const u=be({},s.value,t.state,{forward:l,scroll:zo()});i(u.current,u,!0),i(l,be({},Hu(r.value,l,null),{position:u.position+1},c),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function ck(e){e=GS(e);const t=lk(e),n=ak(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:qS.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 ar=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Ye=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}(Ye||{});const uk={type:ar.Static,value:""},fk=/[a-zA-Z0-9_]/;function dk(e){if(!e)return[[]];if(e==="/")return[[uk]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=Ye.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function f(){c&&(n===Ye.Static?i.push({type:ar.Static,value:c}):n===Ye.Param||n===Ye.ParamRegExp||n===Ye.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:ar.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==Ye.ParamRegExp){r=n,n=Ye.EscapeNext;continue}switch(n){case Ye.Static:l==="/"?(c&&f(),o()):l===":"?(f(),n=Ye.Param):d();break;case Ye.EscapeNext:d(),n=r;break;case Ye.Param:l==="("?n=Ye.ParamRegExp:fk.test(l)?d():(f(),n=Ye.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Ye.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=Ye.ParamRegExpEnd:u+=l;break;case Ye.ParamRegExpEnd:f(),n=Ye.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===Ye.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),o(),s}const Gu="[^/]+?",hk={sensitive:!1,strict:!1,start:!0,end:!0};var _t=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}(_t||{});const pk=/[.+*?^${}()[\]/\\]/g;function gk(e,t){const n=be({},hk,t),r=[];let s=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[_t.Root];n.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const d=c[f];let h=_t.Segment+(n.sensitive?_t.BonusCaseSensitive:0);if(d.type===ar.Static)f||(s+="/"),s+=d.value.replace(pk,"\\$&"),h+=_t.Static;else if(d.type===ar.Param){const{value:p,repeatable:g,optional:y,regexp:T}=d;i.push({name:p,repeatable:g,optional:y});const b=T||Gu;if(b!==Gu){h+=_t.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&&c.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,h+=_t.Dynamic,y&&(h+=_t.BonusOptional),g&&(h+=_t.BonusRepeatable),b===".*"&&(h+=_t.BonusWildcard)}u.push(h)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=_t.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let d=1;d<u.length;d++){const h=u[d]||"",p=i[d-1];f[p.name]=h&&p.repeatable?h.split("/"):h}return f}function l(c){let u="",f=!1;for(const d of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const h of d)if(h.type===ar.Static)u+=h.value;else if(h.type===ar.Param){const{value:p,repeatable:g,optional:y}=h,T=p in c?c[p]:"";if(Ht(T)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const b=Ht(T)?T.join("/"):T;if(!b)if(y)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);u+=b}}return u||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function _k(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]===_t.Static+_t.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===_t.Static+_t.Segment?1:-1:0}function kp(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=_k(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(Wu(r))return 1;if(Wu(s))return-1}return s.length-r.length}function Wu(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const vk={strict:!1,end:!0,sensitive:!1};function mk(e,t,n){const r=gk(dk(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 yk(e,t){const n=[],r=new Map;t=zu(vk,t);function s(f){return r.get(f)}function i(f,d,h){const p=!h,g=Ku(f);g.aliasOf=h&&h.record;const y=zu(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(Ku(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 $=d.record.path,F=$[$.length-1]==="/"?"":"/";E.path=d.record.path+(m&&F+m)}if(b=mk(E,d,y),h?h.alias.push(b):(S=S||b,S!==b&&S.alias.push(b),p&&f.name&&!Ju(b)&&o(f.name)),Tp(b)&&l(b),g.children){const $=g.children;for(let F=0;F<$.length;F++)i($[F],b,h&&h.children[F])}h=h||b}return S?()=>{o(S)}:Ms}function o(f){if(wp(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=Ek(f,n);n.splice(d,0,f),f.record.name&&!Ju(f)&&r.set(f.record.name,f)}function c(f,d){let h,p={},g,y;if("name"in f&&f.name){if(h=r.get(f.name),!h)throw Zr(Le.MATCHER_NOT_FOUND,{location:f});y=h.record.name,p=be(qu(d.params,h.keys.filter(S=>!S.optional).concat(h.parent?h.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),f.params&&qu(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 Zr(Le.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:wk(T)}}e.forEach(f=>i(f));function u(){n.length=0,r.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function qu(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ku(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bk(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 bk(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 Ju(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wk(e){return e.reduce((t,n)=>be(t,n.meta),{})}function Ek(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;kp(e,t[i])<0?r=i:n=i+1}const s=Sk(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Sk(e){let t=e;for(;t=t.parent;)if(Tp(t)&&kp(e,t)===0)return t}function Tp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Yu(e){const t=Pt(Uo),n=Pt(ic),r=Ce(()=>{const l=Dt(e.to);return t.resolve(l)}),s=Ce(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],f=n.matched;if(!u||!f.length)return-1;const d=f.findIndex(Vr.bind(null,u));if(d>-1)return d;const h=Xu(l[c-2]);return c>1&&Xu(u)===h&&f[f.length-1].path!==h?f.findIndex(Vr.bind(null,l[c-2])):d}),i=Ce(()=>s.value>-1&&Ak(n.params,r.value.params)),o=Ce(()=>s.value>-1&&s.value===n.matched.length-1&&bp(n.params,r.value.params));function a(l={}){if(xk(l)){const c=t[Dt(e.replace)?"replace":"push"](Dt(e.to)).catch(Ms);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:Ce(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function kk(e){return e.length===1?e[0]:e}const Tk=Ul({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:Yu,setup(e,{slots:t}){const n=ri(Yu(e)),{options:r}=Pt(Uo),s=Ce(()=>({[Qu(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Qu(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&kk(t.default(n));return e.custom?i:Wl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Ok=Tk;function xk(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 Ak(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(!Ht(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Xu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qu=(e,t,n)=>e??t??n,Ck=Ul({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Pt(el),s=Ce(()=>e.route||r.value),i=Pt(Zu,0),o=Ce(()=>{let c=Dt(i);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ce(()=>s.value.matched[o.value]);Ri(Zu,Ce(()=>o.value+1)),Ri(sk,a),Ri(el,s);const l=It();return Nr(()=>[l.value,a.value,e.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Vr(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(g=>g(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,f=a.value,d=f&&f.components[u];if(!d)return ef(n.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,y=Wl(d,be({},p,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return ef(n.default,{Component:y,route:c})||y}}});function ef(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Rk=Ck;function Ik(e){const t=yk(e.routes,e),n=e.parseQuery||nk,r=e.stringifyQuery||Vu,s=e.history,i=is(),o=is(),a=is(),l=f_(Pn);let c=Pn;kr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=sa.bind(null,I=>""+I),f=sa.bind(null,zS),d=sa.bind(null,qs);function h(I,K){let H,J;return wp(I)?(H=t.getRecordMatcher(I),J=K):J=I,t.addRoute(J,H)}function p(I){const K=t.getRecordMatcher(I);K&&t.removeRoute(K)}function g(){return t.getRoutes().map(I=>I.record)}function y(I){return!!t.getRecordMatcher(I)}function T(I,K){if(K=be({},K||l.value),typeof I=="string"){const w=ia(n,I,K.path),x=t.resolve({path:w.path},K),N=s.createHref(w.fullPath);return be(w,x,{params:d(x.params),hash:qs(w.hash),redirectedFrom:void 0,href:N})}let H;if(I.path!=null)H=be({},I,{path:ia(n,I.path,K.path).path});else{const w=be({},I.params);for(const x in w)w[x]==null&&delete w[x];H=be({},I,{params:f(w)}),K.params=f(K.params)}const J=t.resolve(H,K),fe=I.hash||"";J.params=u(d(J.params));const _=BS(r,be({},I,{hash:MS(fe),path:J.path})),v=s.createHref(_);return be({fullPath:_,hash:fe,query:r===Vu?rk(I.query):I.query||{}},J,{redirectedFrom:void 0,href:v})}function b(I){return typeof I=="string"?ia(n,I,l.value.path):be({},I)}function S(I,K){if(c!==I)return Zr(Le.NAVIGATION_CANCELLED,{from:K,to:I})}function E(I){return F(I)}function m(I){return E(be(b(I),{replace:!0}))}function $(I,K){const H=I.matched[I.matched.length-1];if(H&&H.redirect){const{redirect:J}=H;let fe=typeof J=="function"?J(I,K):J;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=b(fe):{path:fe},fe.params={}),be({query:I.query,hash:I.hash,params:fe.path!=null?{}:I.params},fe)}}function F(I,K){const H=c=T(I),J=l.value,fe=I.state,_=I.force,v=I.replace===!0,w=$(H,J);if(w)return F(be(b(w),{state:typeof w=="object"?be({},fe,w.state):fe,force:_,replace:v}),K||H);const x=H;x.redirectedFrom=K;let N;return!_&&VS(r,J,H)&&(N=Zr(Le.NAVIGATION_DUPLICATED,{to:x,from:J}),tt(J,J,!0,!1)),(N?Promise.resolve(N):L(x,J)).catch(A=>ln(A)?ln(A,Le.NAVIGATION_GUARD_REDIRECT)?A:et(A):se(A,x,J)).then(A=>{if(A){if(ln(A,Le.NAVIGATION_GUARD_REDIRECT))return F(be({replace:v},b(A.to),{state:typeof A.to=="object"?be({},fe,A.to.state):fe,force:_}),K||x)}else A=M(x,J,!0,v,fe);return Y(x,J,A),A})}function C(I,K){const H=S(I,K);return H?Promise.reject(H):Promise.resolve()}function R(I){const K=Ve.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(I):I()}function L(I,K){let H;const[J,fe,_]=ik(I,K);H=aa(J.reverse(),"beforeRouteLeave",I,K);for(const w of J)w.leaveGuards.forEach(x=>{H.push(jn(x,I,K))});const v=C.bind(null,I,K);return H.push(v),Ue(H).then(()=>{H=[];for(const w of i.list())H.push(jn(w,I,K));return H.push(v),Ue(H)}).then(()=>{H=aa(fe,"beforeRouteUpdate",I,K);for(const w of fe)w.updateGuards.forEach(x=>{H.push(jn(x,I,K))});return H.push(v),Ue(H)}).then(()=>{H=[];for(const w of _)if(w.beforeEnter)if(Ht(w.beforeEnter))for(const x of w.beforeEnter)H.push(jn(x,I,K));else H.push(jn(w.beforeEnter,I,K));return H.push(v),Ue(H)}).then(()=>(I.matched.forEach(w=>w.enterCallbacks={}),H=aa(_,"beforeRouteEnter",I,K,R),H.push(v),Ue(H))).then(()=>{H=[];for(const w of o.list())H.push(jn(w,I,K));return H.push(v),Ue(H)}).catch(w=>ln(w,Le.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function Y(I,K,H){a.list().forEach(J=>R(()=>J(I,K,H)))}function M(I,K,H,J,fe){const _=S(I,K);if(_)return _;const v=K===Pn,w=kr?history.state:{};H&&(J||v?s.replace(I.fullPath,be({scroll:v&&w&&w.scroll},fe)):s.push(I.fullPath,fe)),l.value=I,tt(I,K,H,v),et()}let te;function ce(){te||(te=s.listen((I,K,H)=>{if(!mt.listening)return;const J=T(I),fe=$(J,mt.currentRoute.value);if(fe){F(be(fe,{replace:!0,force:!0}),J).catch(Ms);return}c=J;const _=l.value;kr&&YS(Bu(_.fullPath,H.delta),zo()),L(J,_).catch(v=>ln(v,Le.NAVIGATION_ABORTED|Le.NAVIGATION_CANCELLED)?v:ln(v,Le.NAVIGATION_GUARD_REDIRECT)?(F(be(b(v.to),{force:!0}),J).then(w=>{ln(w,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&!H.delta&&H.type===Xa.pop&&s.go(-1,!1)}).catch(Ms),Promise.reject()):(H.delta&&s.go(-H.delta,!1),se(v,J,_))).then(v=>{v=v||M(J,_,!1),v&&(H.delta&&!ln(v,Le.NAVIGATION_CANCELLED)?s.go(-H.delta,!1):H.type===Xa.pop&&ln(v,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),Y(J,_,v)}).catch(Ms)}))}let _e=is(),le=is(),O;function se(I,K,H){et(I);const J=le.list();return J.length?J.forEach(fe=>fe(I,K,H)):console.error(I),Promise.reject(I)}function Be(){return O&&l.value!==Pn?Promise.resolve():new Promise((I,K)=>{_e.add([I,K])})}function et(I){return O||(O=!I,ce(),_e.list().forEach(([K,H])=>I?H(I):K()),_e.reset()),I}function tt(I,K,H,J){const{scrollBehavior:fe}=e;if(!kr||!fe)return Promise.resolve();const _=!H&&XS(Bu(I.fullPath,0))||(J||!H)&&history.state&&history.state.scroll||null;return xo().then(()=>fe(I,K,_)).then(v=>v&&JS(v)).catch(v=>se(v,I,K))}const ye=I=>s.go(I);let Je;const Ve=new Set,mt={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:le.add,isReady:Be,install(I){I.component("RouterLink",Ok),I.component("RouterView",Rk),I.config.globalProperties.$router=mt,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Dt(l)}),kr&&!Je&&l.value===Pn&&(Je=!0,E(s.location).catch(J=>{}));const K={};for(const J in Pn)Object.defineProperty(K,J,{get:()=>l.value[J],enumerable:!0});I.provide(Uo,mt),I.provide(ic,Id(K)),I.provide(el,l);const H=I.unmount;Ve.add(I),I.unmount=function(){Ve.delete(I),Ve.size<1&&(c=Pn,te&&te(),te=null,l.value=Pn,Je=!1,O=!1),H()}}};function Ue(I){return I.reduce((K,H)=>K.then(()=>R(H)),Promise.resolve())}return mt}function px(){return Pt(Uo)}function gx(e){return Pt(ic)}const Pk=[{path:"/",name:"ProjectList",component:()=>Ze(()=>import("./ProjectListView-BOWbfoXQ.js"),__vite__mapDeps([0,1,2,3]))},{path:"/projects/new",name:"ProjectNew",component:()=>Ze(()=>import("./ProjectNewView-DC4uvSn2.js"),__vite__mapDeps([4,1,2,5,6,7]))},{path:"/projects/:id/edit",name:"ProjectEdit",component:()=>Ze(()=>import("./ProjectEditView-DD-2_VrW.js"),__vite__mapDeps([8,1,2,9,10,5,6,11,12,13,14]))},{path:"/projects/:projectId/command-buttons/new",name:"CommandButtonNew",component:()=>Ze(()=>import("./CommandButtonDetailView-CkKJ3Htz.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:projectId/command-buttons/:buttonId",name:"CommandButtonEdit",component:()=>Ze(()=>import("./CommandButtonDetailView-CkKJ3Htz.js"),__vite__mapDeps([15,16,2,17]))},{path:"/projects/:id/sessions",name:"SessionList",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/archived",name:"ArchivedSessions",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/templates",name:"ProjectTemplates",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/commands",name:"ProjectCommands",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/scheduled",name:"ScheduledSessions",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:id/kanban",name:"ProjectKanban",component:()=>Ze(()=>import("./SessionListView-927Yq6Il.js"),__vite__mapDeps([18,1,2,19,20,21,16,22,23,24,25,26,27,11,12,13,28,29,30,31,32,33,34,35,36,37]))},{path:"/projects/:projectId/templates/:templateId",name:"TemplateDetail",component:()=>Ze(()=>import("./TemplateDetailView-BOnhkdtH.js"),__vite__mapDeps([38,26,2,19,20,27,11,12,13,31,32,33,34,39]))},{path:"/projects/:id/sessions/new",name:"NewSession",component:()=>Ze(()=>import("./NewSessionView-BIZl8QlH.js"),__vite__mapDeps([40,19,2,20,26,27,9,10,41,42,35,11,12,13,28,29,36,33,34,1,43]))},{path:"/sessions/active",name:"ActiveSessions",component:()=>Ze(()=>import("./ActiveSessionsView-BryJ-V3f.js"),__vite__mapDeps([44,19,2,20,16,23,21,22,24,45]))},{path:"/sessions/:id/:tab?",name:"SessionDetail",component:()=>Ze(()=>import("./SessionDetailView-CHYrx2Ab.js").then(e=>e.S),__vite__mapDeps([46,19,2,20,1,26,27,21,16,22,25,11,12,13,28,29,30,9,10,41,42,33,34,47]))},{path:"/settings",name:"Settings",component:()=>Ze(()=>import("./SettingsView-Dd0ZJ4Nv.js"),__vite__mapDeps([48,49])),redirect:"/settings/providers",children:[{path:"providers",name:"Providers",component:()=>Ze(()=>import("./ProvidersView-DT5afh1V.js"),__vite__mapDeps([50,12,2,51]))},{path:"summary",name:"SummarySettings",component:()=>Ze(()=>import("./SummarySettingsView-DTbh7uAF.js"),__vite__mapDeps([52,20,2,33,34,53]))},{path:"general",name:"GeneralSettings",component:()=>Ze(()=>import("./GeneralSettingsView-CdxfteZ2.js"),__vite__mapDeps([54,20,2,55]))},{path:"logs",name:"AgentLogs",component:()=>Ze(()=>import("./AgentLogsView-c42v_j_5.js"),__vite__mapDeps([56,2,57]))}]}],Nk=Ik({history:ck(),routes:Pk});var k=typeof window<"u"?window:void 0,at=typeof globalThis<"u"?globalThis:k;typeof self>"u"&&(at.self=at),typeof File>"u"&&(at.File=function(){});var Op=Array.prototype,tf=Op.forEach,nf=Op.indexOf,Ct=at==null?void 0:at.navigator,B=at==null?void 0:at.document,st=at==null?void 0:at.location,tl=at==null?void 0:at.fetch,nl=at!=null&&at.XMLHttpRequest&&"withCredentials"in new at.XMLHttpRequest?at.XMLHttpRequest:void 0,rf=at==null?void 0:at.AbortController,St=Ct==null?void 0:Ct.userAgent,Q=k??{},fn={DEBUG:!1,LIB_VERSION:"1.356.1"};function sf(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,s)}function dn(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){sf(i,r,s,o,a,"next",l)}function a(l){sf(i,r,s,o,a,"throw",l)}o(void 0)})}}function j(){return j=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},j.apply(null,arguments)}function xp(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 $k=["$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"],Dk=["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"],of=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return Dk.concat(t).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})};function ue(e,t){return e.indexOf(t)!==-1}var jo=function(e){return e.trim()},rl=function(e){return e.replace(/^\$/,"")},Mk=Array.isArray,Ap=Object.prototype,Cp=Ap.hasOwnProperty,Bo=Ap.toString,ve=Mk||function(e){return Bo.call(e)==="[object Array]"},bn=e=>typeof e=="function",Xe=e=>e===Object(e)&&!ve(e),Ar=e=>{if(Xe(e)){for(var t in e)if(Cp.call(e,t))return!1;return!0}return!1},V=e=>e===void 0,Ge=e=>Bo.call(e)=="[object String]",sl=e=>Ge(e)&&e.trim().length===0,Gt=e=>e===null,de=e=>V(e)||Gt(e),Cn=e=>Bo.call(e)=="[object Number]"&&e==e,Tr=e=>Cn(e)&&e>0,Tn=e=>Bo.call(e)==="[object Boolean]",Fk=e=>e instanceof FormData,Lk=e=>ue($k,e);function il(e){return e===null||typeof e!="object"}function no(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Rp(e){return!V(Event)&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var zk=[!0,"true",1,"1","yes"],la=e=>ue(zk,e),Uk=[!1,"false",0,"0","no"];function rn(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),rn(s||n,t,n,r))}class jk{constructor(t){this.t={},this.i=t.i,this.o=rn(t.bucketSize,0,100,t.h),this.m=rn(t.refillRate,0,this.o,t.h),this.$=rn(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 Ft="Mobile",ro="iOS",wn="Android",Ks="Tablet",Ip=wn+" "+Ks,Pp="iPad",Np="Apple",$p=Np+" Watch",Js="Safari",Hr="BlackBerry",Dp="Samsung",Mp=Dp+"Browser",Fp=Dp+" Internet",pr="Chrome",Bk=pr+" OS",Lp=pr+" "+ro,oc="Internet Explorer",zp=oc+" "+Ft,ac="Opera",Vk=ac+" Mini",lc="Edge",Up="Microsoft "+lc,Mr="Firefox",jp=Mr+" "+ro,Ys="Nintendo",Xs="PlayStation",Fr="Xbox",Bp=wn+" "+Ft,Vp=Ft+" "+Js,vs="Windows",ol=vs+" Phone",af="Nokia",al="Ouya",Zp="Generic",Zk=Zp+" "+Ft.toLowerCase(),Hp=Zp+" "+Ks.toLowerCase(),ll="Konqueror",gt="(\\d+(\\.\\d+)?)",ca=new RegExp("Version/"+gt),Hk=new RegExp(Fr,"i"),Gk=new RegExp(Xs+" \\w+","i"),Wk=new RegExp(Ys+" \\w+","i"),cc=new RegExp(Hr+"|PlayBook|BB10","i"),qk={"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"},Si,lf,ua,Kk=(e,t)=>t&&ue(t,Np)||function(n){return ue(n,Js)&&!ue(n,pr)&&!ue(n,wn)}(e),Gp=function(e,t){return t=t||"",ue(e," OPR/")&&ue(e,"Mini")?Vk:ue(e," OPR/")?ac:cc.test(e)?Hr:ue(e,"IE"+Ft)||ue(e,"WPDesktop")?zp:ue(e,Mp)?Fp:ue(e,lc)||ue(e,"Edg/")?Up:ue(e,"FBIOS")?"Facebook "+Ft:ue(e,"UCWEB")||ue(e,"UCBrowser")?"UC Browser":ue(e,"CriOS")?Lp:ue(e,"CrMo")||ue(e,pr)?pr:ue(e,wn)&&ue(e,Js)?Bp:ue(e,"FxiOS")?jp:ue(e.toLowerCase(),ll.toLowerCase())?ll:Kk(e,t)?ue(e,Ft)?Vp:Js:ue(e,Mr)?Mr:ue(e,"MSIE")||ue(e,"Trident/")?oc:ue(e,"Gecko")?Mr:""},Jk={[zp]:[new RegExp("rv:"+gt)],[Up]:[new RegExp(lc+"?\\/"+gt)],[pr]:[new RegExp("("+pr+"|CrMo)\\/"+gt)],[Lp]:[new RegExp("CriOS\\/"+gt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+gt)],[Js]:[ca],[Vp]:[ca],[ac]:[new RegExp("(Opera|OPR)\\/"+gt)],[Mr]:[new RegExp(Mr+"\\/"+gt)],[jp]:[new RegExp("FxiOS\\/"+gt)],[ll]:[new RegExp("Konqueror[:/]?"+gt,"i")],[Hr]:[new RegExp(Hr+" "+gt),ca],[Bp]:[new RegExp("android\\s"+gt,"i")],[Fp]:[new RegExp(Mp+"\\/"+gt)],[oc]:[new RegExp("(rv:|MSIE )"+gt)],Mozilla:[new RegExp("rv:"+gt)]},Yk=function(e,t){var n=Gp(e,t),r=Jk[n];if(V(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},cf=[[new RegExp(Fr+"; "+Fr+" (.*?)[);]","i"),e=>[Fr,e&&e[1]||""]],[new RegExp(Ys,"i"),[Ys,""]],[new RegExp(Xs,"i"),[Xs,""]],[cc,[Hr,""]],[new RegExp(vs,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ol,""];if(new RegExp(Ft).test(t)&&!/IEMobile\b/.test(t))return[vs+" "+Ft,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],s=qk[r]||"";return/arm/i.test(t)&&(s="RT"),[vs,s]}return[vs,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[ro,t.join(".")]}return[ro,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=V(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+wn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+wn+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[wn,t.join(".")]}return[wn,""]}],[/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/,[Bk,""]],[/Linux|debian/i,["Linux",""]]],uf=function(e){return Wk.test(e)?Ys:Gk.test(e)?Xs:Hk.test(e)?Fr:new RegExp(al,"i").test(e)?al:new RegExp("("+ol+"|WPDesktop)","i").test(e)?ol:/iPad/.test(e)?Pp:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?$p:cc.test(e)?Hr:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(af,"i").test(e)?af:/(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(Ft).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)?wn:Ip:new RegExp("(pda|"+Ft+")","i").test(e)?Zk:new RegExp(Ks,"i").test(e)&&!new RegExp(Ks+" pc","i").test(e)?Hp:""},Xk=e=>e instanceof Error;function Qk(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ua&&n.length===lf||(lf=n.length,ua=n.reduce((r,s)=>{Si||(Si={});var i=Si[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],c=l==null?void 0:l.filename,u=t[s];if(c&&u){r[c]=u,Si[s]=[c,u];break}}return r},{})),ua}}class eT{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 dn(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)),j({},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 dn(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,j({},n,{handled:!0}))),a}buildParsingContext(t){var n;return{chunkIdMap:Qk(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 j({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Gr="?";function cl(e,t,n,r,s){var i={platform:e,filename:t,function:n==="<anonymous>"?Gr:n,in_app:!0};return V(r)||(i.lineno=r),V(s)||(i.colno=s),i}var Wp=(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]:Gr,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},tT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rT=/\((\S*)(?::(\d+))(?::(\d+))\)/,sT=(e,t)=>{var n=tT.exec(e);if(n){var[,r,s,i]=n;return cl(t,r,Gr,+s,+i)}var o=nT.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=rT.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=Wp(o[1]||Gr,o[2]);return cl(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},iT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,oT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,aT=(e,t)=>{var n=iT.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=oT.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]||Gr;return[i,s]=Wp(i,s),cl(t,s,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},ff=/\(error: (.*)\)/,df=50;function lT(){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(`
80
80
  `),l=i;l<a.length;l++){var c=a[l];if(!(c.length>1024)){var u=ff.test(c)?c.replace(ff,"$1"):c;if(!u.match(/\S*Error: /)){for(var f of n){var d=f(u,e);if(d){o.push(d);break}}if(o.length>=df)break}}}return function(h){if(!h.length)return[];var p=Array.from(h);return p.reverse(),p.slice(0,df).map(g=>{return j({},g,{filename:g.filename||(y=p,y[y.length-1]||{}).filename,function:g.function||Gr});var y})}(o)}}("web:javascript",sT,aT)}class cT{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=Ge(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 no(t,"DOMException")}isDOMError(t){return no(t,"DOMError")}}class uT{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 fT{constructor(){}match(t){return no(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 dT=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class hT{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(dT);return s&&(n=s[1],r=s[2]),[n,r]}}var pT=["fatal","error","warning","log","info","debug"];function qp(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 gT{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 Rp(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: "+qp(t)}isSeverityLevel(t){return Ge(t)&&!sl(t)&&pT.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(Xk(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class _T{match(t){return Rp(t)}coerce(t,n){var r,s=t.constructor.name;return{type:s,value:s+" captured as exception with keys: "+qp(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class vT{match(t){return il(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 mT{match(t){return no(t,"PromiseRejectionEvent")}coerce(t,n){var r,s=this.getUnhandledRejectionReason(t);return il(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(il(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 Kp=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k:function(s){if(k&&(fn.DEBUG||Q.POSTHOG_DEBUG||n)&&!V(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)=>Kp(e+" "+s,i)};return r},Z=Kp("[PostHog.js]"),Fe=Z.createLogger,yT=Fe("[ExternalScriptsLoader]"),hf=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return yT.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=B==null?void 0:B.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",c=>{l.__posthog_loading_callback_fired=!0,n(void 0,c)}),l.onerror=c=>n(c),{v:void 0})}},o=0;o<r.length;o++)if(s=i())return s.v}var a=()=>{if(!B)return n("document not found");var l=B.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")B.head.appendChild(l);else{var c,u=B.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):B.body.appendChild(l)}};B!=null&&B.body?a():B==null||B.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);hf(e,i,n)},Q.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);hf(e,r,n)};var so={};function Hn(e,t,n){if(ve(e)){if(tf&&e.forEach===tf)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)===so)return}}}function Ae(e,t,n){if(!de(e)){if(ve(e))return Hn(e,t,n);if(Fk(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===so)return}else for(var s in e)if(Cp.call(e,s)&&t.call(n,e[s],s)===so)return}}var je=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 Hn(n,function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])}),e},Wr=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 Hn(n,function(s){Hn(s,function(i){e.push(i)})}),e};function Fi(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 pf=function(e){try{return e()}catch{return}},bT=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){Z.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Z.critical(s)}}},uc=function(e){var t={};return Ae(e,function(n,r){(Ge(n)&&n.length>0||Cn(n))&&(t[r]=n)}),t};function wT(e,t){return n=e,r=i=>Ge(i)&&!Gt(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=[],Hn(o,c=>{l.push(i(c))})):(l={},Ae(o,(c,u)=>{s.has(c)||(l[u]=i(c,u))})),l);var l}(n);var n,r,s}var ET=["herokuapp.com","vercel.app","netlify.app"];function ST(e){var t=e==null?void 0:e.hostname;if(!Ge(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of ET)if(n===r)return!1;return!0}function Jp(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function He(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}function Yp(e){return e.name==="ph_toolbar_internal"}var Xp="$people_distinct_id",ms="__alias",ys="__timers",gf="$autocapture_disabled_server_side",ul="$heatmaps_enabled_server_side",_f="$exception_capture_enabled_server_side",fl="$error_tracking_suppression_rules",vf="$error_tracking_capture_extension_exceptions",mf="$web_vitals_enabled_server_side",Qp="$dead_clicks_enabled_server_side",yf="$product_tours_enabled_server_side",bf="$web_vitals_allowed_metrics",ki="$session_recording_remote_config",io="$sesid",eg="$session_is_sampled",Cr="$enabled_feature_flags",bs="$early_access_features",dl="$feature_flag_details",ws="$stored_person_properties",or="$stored_group_properties",hl="$surveys",oo="$flag_call_reported",pl="$feature_flag_errors",ao="$feature_flag_evaluated_at",en="$user_state",gl="$client_session_props",_l="$capture_rate_limit",vl="$initial_campaign_params",ml="$initial_referrer_info",lo="$initial_person_info",co="$epp",tg="__POSTHOG_TOOLBAR__",os="$posthog_cookieless",kT=[Xp,ms,"__cmpns",ys,"$session_recording_enabled_server_side",ul,io,Cr,fl,en,bs,dl,or,ws,hl,oo,pl,ao,gl,_l,vl,ml,co,lo];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 wf="0123456789abcdef";class uo{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 uo(i)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+wf.charAt(this.bytes[n]>>>4)+wf.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 uo(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 TT{constructor(){this.P=0,this.T=0,this.C=new OT}generate(){var t=this.generateOrAbort();if(V(t)){this.P=0;var n=this.generateOrAbort();if(V(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 uo.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 Ef,ng=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&&!V(k.crypto)&&crypto.getRandomValues&&(ng=e=>crypto.getRandomValues(e));class OT{constructor(){this.R=new Uint32Array(8),this.F=1/0}nextUint32(){return this.F>=this.R.length&&(ng(this.R),this.F=0),this.R[this.F++]}}var Vn=()=>xT().toString(),xT=()=>(Ef||(Ef=new TT)).generate(),as="",AT=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function CT(e,t){if(t){var n=function(s,i){if(i===void 0&&(i=B),as)return as;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Vn();!as&&a--;){var c=o.slice(a).join("."),u=l+"=1;domain=."+c+";path=/";i.cookie=u+";max-age=3",i.cookie.includes(l)&&(i.cookie=u+";max-age=0",as=c)}return as}(e);if(!n){var r=(s=>{var i=s.match(AT);return i?i[0]:""})(e);r!==n&&Z.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var nn={O:()=>!!B,M:function(e){Z.error("cookieStore error: "+e)},A:function(e){if(B){try{for(var t=e+"=",n=B.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(nn.A(e))||{}}catch{}return t},j:function(e,t,n,r,s){if(B)try{var i="",o="",a=CT(B.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 c=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&Z.warn("cookieStore warning: large cookie, len="+c.length),B.cookie=c,c}catch{return}},L:function(e,t){if(B!=null&&B.cookie)try{nn.j(e,"",-1,t)}catch{return}}},fa=null,$e={O:function(){if(!Gt(fa))return fa;var e=!0;if(V(k))e=!1;else try{var t="__mplssupport__";$e.j(t,"xyz"),$e.A(t)!=='"xyz"'&&(e=!1),$e.L(t)}catch{e=!1}return e||Z.error("localStorage unsupported; falling back to cookie store"),fa=e,e},M:function(e){Z.error("localStorage error: "+e)},A:function(e){try{return k==null?void 0:k.localStorage.getItem(e)}catch(t){$e.M(t)}return null},D:function(e){try{return JSON.parse($e.A(e))||{}}catch{}return null},j:function(e,t){try{k==null||k.localStorage.setItem(e,JSON.stringify(t))}catch(n){$e.M(n)}},L:function(e){try{k==null||k.localStorage.removeItem(e)}catch(t){$e.M(t)}}},RT=["$device_id","distinct_id",io,eg,co,lo,en],Ti={},IT={O:function(){return!0},M:function(e){Z.error("memoryStorage error: "+e)},A:function(e){return Ti[e]||null},D:function(e){return Ti[e]||null},j:function(e,t){Ti[e]=t},L:function(e){delete Ti[e]}},rr=null,rt={O:function(){if(!Gt(rr))return rr;if(rr=!0,V(k))rr=!1;else try{var e="__support__";rt.j(e,"xyz"),rt.A(e)!=='"xyz"'&&(rr=!1),rt.L(e)}catch{rr=!1}return rr},M:function(e){Z.error("sessionStorage error: ",e)},A:function(e){try{return k==null?void 0:k.sessionStorage.getItem(e)}catch(t){rt.M(t)}return null},D:function(e){try{return JSON.parse(rt.A(e))||null}catch{}return null},j:function(e,t){try{k==null||k.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){rt.M(n)}},L:function(e){try{k==null||k.sessionStorage.removeItem(e)}catch(t){rt.M(t)}}},hn=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class PT{constructor(t){this._instance=t}get N(){return this._instance.config}get consent(){return this.U()?hn.DENIED:this.H}isOptedOut(){return this.N.cookieless_mode==="always"||this.consent===hn.DENIED||this.consent===hn.PENDING&&(this.N.opt_out_capturing_by_default||this.N.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===hn.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 la(t)?hn.GRANTED:ue(Uk,t)?hn.DENIED:hn.PENDING}get B(){if(!this.W){var t=this.N.opt_out_capturing_persistence_type;this.W=t==="localStorage"?$e:nn;var n=t==="localStorage"?nn:$e;n.A(this.q)&&(this.W.A(this.q)||this.optInOut(la(n.A(this.q))),n.L(this.q,this.N.cross_subdomain_cookie))}return this.W}U(){return!!this.N.respect_dnt&&!!Jp([Ct==null?void 0:Ct.doNotTrack,Ct==null?void 0:Ct.msDoNotTrack,Q.doNotTrack],t=>la(t))}}var Oi=Fe("[Dead Clicks]"),NT=()=>!0,$T=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(Qp)),r=e.instance.config.capture_dead_clicks;return Tn(r)?r:!!Xe(r)||n};class Sf{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({[Qp]: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?Oi.error("failed to load script",s):t()})}J(){var t;if(B){if(!this.G&&(t=Q.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=Xe(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(B),Oi.info("starting...")}}else Oi.error("`document` not found. Cannot start.")}stop(){this.G&&(this.G.stop(),this.G=void 0,Oi.info("stopping..."))}}var da=Fe("[SegmentIntegration]");function DT(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 c=()=>l.anonymousId()||Vn();r.config.get_device_id=c,l.id()&&(r.register({distinct_id:l.id(),$device_id:c()}),r.persistence.set_property(en,"identified")),s()},a=i.user();"then"in a&&bn(a.then)?a.then(o):o(a)})(e,()=>{n.register((r=>{Promise&&Promise.resolve||da.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()||(da.info("No userId set, resetting PostHog"),r.reset()),i.event.userId&&i.event.userId!==r.get_distinct_id()&&(da.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 rg="posthog-js";function sg(e,t){var{organization:n,projectId:r,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return a=>{var l,c,u,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=>j({},T,{stacktrace:T.stacktrace?j({},T.stacktrace,{type:"raw",frames:(T.stacktrace.frames||[]).map(b=>j({},b,{platform:"web:javascript"}))}):void 0})),y={$exception_message:((c=p[0])==null?void 0:c.value)||a.message,$exception_type:(u=p[0])==null?void 0:u.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 MT{constructor(t,n,r,s,i,o){this.name=rg,this.setupOnce=function(a){a(sg(t,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}var fo=e=>{var t=B==null?void 0:B.createElement("a");return V(t)?null:(t.href=e,t)},FT=function(e,t){var n,r;t===void 0&&(t="&");var s=[];return Ae(e,function(i,o){V(i)||V(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)},ho=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{Z.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},Qs=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],c=(a||"").split("&"),u=[],f=0;f<c.length;f++){var d=c[f].split("=");ve(d)&&(t.includes(d[0])?u.push(d[0]+"="+n):u.push(c[f]))}var h=l;return a!=null&&(h+="?"+u.join("&")),i!=null&&(h+="#"+i),h},po=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},LT=k!=null&&k.location?po(k.location.hash,"__posthog")||po(location.hash,"state"):null,kf="_postHogToolbarParams",Tf=Fe("[Toolbar]"),Fn=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Fn||{});class zT{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:Fn.UNINITIALIZED}maybeLoadToolbar(t,n,r){if(t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),Yp(this.instance.config)||!k||!B)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=LT||po(t.hash,"__posthog")||po(t.hash,"state"),o=i?pf(()=>JSON.parse(atob(decodeURIComponent(i))))||pf(()=>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(kf)||"{}")).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;!de(n)&&bn(n)?n(t,this.instance):Tf.warn("No toolbar load function found")}loadToolbar(t){var n=!(B==null||!B.getElementById(tg));if(!k||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=j({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(k.localStorage.setItem(kf,JSON.stringify(j({},s,{source:void 0}))),this.Y()===Fn.LOADED)this.X(s);else if(this.Y()===Fn.UNINITIALIZED){var i;this.K(Fn.LOADING),(i=Q.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return Tf.error("[Toolbar] Failed to load",o),void this.K(Fn.UNINITIALIZED);this.K(Fn.LOADED),this.X(s)}),He(k,"turbolinks:load",()=>{this.K(Fn.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 Of{constructor(t){this.tt=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength)&&(Z.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:c,lastContentY:u,maxContentY:f}=i;if(!(V(o)||V(a)||V(l)||V(c)||V(u)||V(f))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),f=Math.ceil(f);var d=o<=1?1:rn(a/o,0,1,Z),h=o<=1?1:rn(l/o,0,1,Z),p=c<=1?1:rn(u/c,0,1,Z),g=c<=1?1:rn(f/c,0,1,Z);s=je(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:u,$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 yn=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),Lt=Uint8Array,Tt=Uint16Array,qr=Uint32Array,fc=new Lt([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]),dc=new Lt([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]),xf=new Lt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ig=function(e,t){for(var n=new Tt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var s=new qr(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=ig(fc,2),UT=og[0],yl=og[1];UT[28]=258,yl[258]=28;for(var Af=ig(dc,0)[1],ag=new Tt(32768),Ie=0;Ie<32768;++Ie){var sr=(43690&Ie)>>>1|(21845&Ie)<<1;sr=(61680&(sr=(52428&sr)>>>2|(13107&sr)<<2))>>>4|(3855&sr)<<4,ag[Ie]=((65280&sr)>>>8|(255&sr)<<8)>>>1}var Fs=function(e,t,n){for(var r=e.length,s=0,i=new Tt(t);s<r;++s)++i[e[s]-1];var o,a=new Tt(t);for(s=0;s<t;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Tt(r),s=0;s<r;++s)o[s]=ag[a[e[s]-1]++]>>>15-e[s];return o},gr=new Lt(288);for(Ie=0;Ie<144;++Ie)gr[Ie]=8;for(Ie=144;Ie<256;++Ie)gr[Ie]=9;for(Ie=256;Ie<280;++Ie)gr[Ie]=7;for(Ie=280;Ie<288;++Ie)gr[Ie]=8;var go=new Lt(32);for(Ie=0;Ie<32;++Ie)go[Ie]=5;var jT=Fs(gr,9),BT=Fs(go,5),lg=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 Tt?Tt:e instanceof qr?qr:Lt)(n-t);return r.set(e.subarray(t,n)),r},cn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},ls=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},ha=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 Lt(0),0];if(s==1){var o=new Lt(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(m,$){return m.f-$.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,f=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=n[n[c].f<n[f].f?c++:f++],l=n[c!=u&&n[c].f<n[f].f?c++:f++],n[u++]={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 Tt(d+1),p=bl(n[u-1],h,0);if(p>t){r=0;var g=0,y=p-t,T=1<<y;for(i.sort(function(m,$){return h[$.s]-h[m.s]||m.f-$.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 Lt(h),p]},bl=function(e,t,n){return e.s==-1?Math.max(bl(e.l,t,n+1),bl(e.r,t,n+1)):t[e.s]=n},Cf=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Tt(++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]},cs=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},wl=function(e,t,n){var r=n.length,s=lg(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)},Rf=function(e,t,n,r,s,i,o,a,l,c,u){cn(t,u++,n),++s[256];for(var f=ha(s,15),d=f[0],h=f[1],p=ha(i,15),g=p[0],y=p[1],T=Cf(d),b=T[0],S=T[1],E=Cf(g),m=E[0],$=E[1],F=new Tt(19),C=0;C<b.length;++C)F[31&b[C]]++;for(C=0;C<m.length;++C)F[31&m[C]]++;for(var R=ha(F,7),L=R[0],Y=R[1],M=19;M>4&&!L[xf[M-1]];--M);var te,ce,_e,le,O=c+5<<3,se=cs(s,gr)+cs(i,go)+o,Be=cs(s,d)+cs(i,g)+o+14+3*M+cs(F,L)+(2*F[16]+3*F[17]+7*F[18]);if(O<=se&&O<=Be)return wl(t,u,e.subarray(l,l+c));if(cn(t,u,1+(Be<se)),u+=2,Be<se){te=Fs(d,h),ce=d,_e=Fs(g,y),le=g;var et=Fs(L,Y);for(cn(t,u,S-257),cn(t,u+5,$-1),cn(t,u+10,M-4),u+=14,C=0;C<M;++C)cn(t,u+3*C,L[xf[C]]);u+=3*M;for(var tt=[b,m],ye=0;ye<2;++ye){var Je=tt[ye];for(C=0;C<Je.length;++C){var Ve=31&Je[C];cn(t,u,et[Ve]),u+=L[Ve],Ve>15&&(cn(t,u,Je[C]>>>5&127),u+=Je[C]>>>12)}}}else te=jT,ce=gr,_e=BT,le=go;for(C=0;C<a;++C)if(r[C]>255){Ve=r[C]>>>18&31,ls(t,u,te[Ve+257]),u+=ce[Ve+257],Ve>7&&(cn(t,u,r[C]>>>23&31),u+=fc[Ve]);var mt=31&r[C];ls(t,u,_e[mt]),u+=le[mt],mt>3&&(ls(t,u,r[C]>>>5&8191),u+=dc[mt])}else ls(t,u,te[r[C]]),u+=ce[r[C]];return ls(t,u,te[256]),u+ce[256]},VT=new qr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ZT=function(){for(var e=new qr(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),HT=function(e,t,n,r,s){return function(i,o,a,l,c,u){var f=i.length,d=new Lt(l+f+5*(1+Math.floor(f/7e3))+c),h=d.subarray(l,d.length-c),p=0;if(!o||f<8)for(var g=0;g<=f;g+=65535){var y=g+65535;y<f?p=wl(h,p,i.subarray(g,y)):(h[g]=u,p=wl(h,p,i.subarray(g,f)))}else{for(var T=VT[o-1],b=T>>>13,S=8191&T,E=(1<<a)-1,m=new Tt(32768),$=new Tt(E+1),F=Math.ceil(a/3),C=2*F,R=function(A){return(i[A]^i[A+1]<<F^i[A+2]<<C)&E},L=new qr(25e3),Y=new Tt(288),M=new Tt(32),te=0,ce=0,_e=(g=0,0),le=0,O=0;g<f;++g){var se=R(g),Be=32767&g,et=$[se];if(m[Be]=et,$[se]=Be,le<=g){var tt=f-g;if((te>7e3||_e>24576)&&tt>423){p=Rf(i,h,0,L,Y,M,ce,_e,O,g-O,p),_e=te=ce=0,O=g;for(var ye=0;ye<286;++ye)Y[ye]=0;for(ye=0;ye<30;++ye)M[ye]=0}var Je=2,Ve=0,mt=S,Ue=Be-et&32767;if(tt>2&&se==R(g-Ue))for(var I=Math.min(b,tt)-1,K=Math.min(32767,g),H=Math.min(258,tt);Ue<=K&&--mt&&Be!=et;){if(i[g+Je]==i[g+Je-Ue]){for(var J=0;J<H&&i[g+J]==i[g+J-Ue];++J);if(J>Je){if(Je=J,Ve=Ue,J>I)break;var fe=Math.min(Ue,J-2),_=0;for(ye=0;ye<fe;++ye){var v=g-Ue+ye+32768&32767,w=v-m[v]+32768&32767;w>_&&(_=w,et=v)}}}Ue+=(Be=et)-(et=m[Be])+32768&32767}if(Ve){L[_e++]=268435456|yl[Je]<<18|Af[Ve];var x=31&yl[Je],N=31&Af[Ve];ce+=fc[x]+dc[N],++Y[257+x],++M[N],le=g+Je,++te}else L[_e++]=i[g],++Y[i[g]]}}p=Rf(i,h,u,L,Y,M,ce,_e,O,g-O,p)}return cg(d,0,l+lg(p)+c)}(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)},pa=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function GT(e,t){t===void 0&&(t={});var n=function(){var a=4294967295;return{p:function(l){for(var c=a,u=0;u<l.length;++u)c=ZT[255&c^l[u]]^c>>>8;a=c},d:function(){return 4294967295^a}}}(),r=e.length;n.p(e);var s,i=HT(e,t,10+((s=t).filename&&s.filename.length+1||0),8),o=i.length;return function(a,l){var c=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&&pa(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),c){a[3]=8;for(var u=0;u<=c.length;++u)a[u+10]=c.charCodeAt(u)}}(i,t),pa(i,o-8,n.d()),pa(i,o-4,r),i}var WT=function(e){var t,n,r,s,i="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
81
81
  `).replace(/\r/g,`
82
- `)).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),Gt(a)||(n>t&&(i+=e.substring(t,n)),i+=a,t=n=s+1)}return n>t&&(i+=e.substring(t,e.length)),i},qT=!!nl||!!tl,If="text/plain",_o=function(e,t,n){var r;n===void 0&&(n=!0);var[s,i]=e.split("?"),o=j({},t),a=(r=i==null?void 0:i.split("&").map(c=>{var u,[f,d]=c.split("="),h=n&&(u=o[f])!==null&&u!==void 0?u:d;return delete o[f],f+"="+h}))!==null&&r!==void 0?r:[],l=FT(o);return l&&a.push(l),s+"?"+a.join("&")},Es=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),ga=e=>{var{data:t,compression:n}=e;if(t){if(n===yn.GZipJS){var r=GT(function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var f=new Lt(l.length+(l.length>>>1)),d=0,h=function(T){f[d++]=T},p=0;p<u;++p){if(d+5>f.length){var g=new Lt(d+8+(u-p<<1));g.set(f),f=g}var y=l.charCodeAt(p);y<128||c?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)}(Es(t)),{mtime:0}),s=new Blob([r],{type:If});return{contentType:If,body:s,estimatedSize:s.size}}if(n===yn.Base64){var i=function(l){var c,u,f,d,h,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=0,y=0,T="",b=[];if(!l)return l;l=WT(l);do c=(h=l.charCodeAt(g++)<<16|l.charCodeAt(g++)<<8|l.charCodeAt(g++))>>18&63,u=h>>12&63,f=h>>6&63,d=63&h,b[y++]=p.charAt(c)+p.charAt(u)+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}(Es(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Es(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=Es(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Li=[];tl&&Li.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:s,estimatedSize:i}=(t=ga(e))!==null&&t!==void 0?t:{},o=new Headers;Ae(e.headers,function(u,f){o.append(f,u)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(rf){var c=new rf;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}tl(a,j({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(u=>u.text().then(f=>{var d={statusCode:u.status,text:f};if(u.status===200)try{d.json=JSON.parse(f)}catch(h){Z.error(h)}e.callback==null||e.callback(d)})).catch(u=>{Z.error(u),e.callback==null||e.callback({statusCode:0,error:u})}).finally(()=>l?clearTimeout(l.timeout):null)}}),nl&&Li.push({transport:"XHR",method:e=>{var t,n=new nl;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=(t=ga(e))!==null&&t!==void 0?t:{};Ae(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)}}),Ct!=null&&Ct.sendBeacon&&Li.push({transport:"sendBeacon",method:e=>{var t=_o(e.url,{beacon:"1"});try{var n,{contentType:r,body:s}=(n=ga(e))!==null&&n!==void 0?n:{},i=typeof s=="string"?new Blob([s],{type:r}):s;Ct.sendBeacon(t,i)}catch{}}});var vo=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 Pf(e,t,n){return Es({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var ug={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=>vo(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!vo(n,r))),icontains:(e,t)=>t.map(xi).some(n=>e.map(xi).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(xi).every(n=>e.map(xi).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))})},xi=e=>e.toLowerCase();function fg(e,t){return!e||Object.entries(e).every(n=>{var[r,s]=n,i=t==null?void 0:t[r];if(V(i)||Gt(i))return!1;var o=[String(i)],a=ug[s.operator];return!!a&&a(s.values,o)})}var _a=Fe("[Error tracking]");class KT{constructor(t){var n,r;this.nt=[],this.ot=new eT([new cT,new mT,new fT,new uT,new _T,new gT,new hT,new vT],lT()),this._instance=t,this.nt=(n=(r=this._instance.persistence)==null?void 0:r.get_property(fl))!==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({[fl]:this.nt,[vf]:o})}}get ut(){var t,n=!!this._instance.get_property(vf),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 _a.info("Skipping exception capture because a suppression rule matched");if(!this.ut&&this.vt(n))return void _a.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ct(n))return void _a.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 Ge(i)&&i.length>0&&r.$exception_types.push(i),Ge(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=ug[i.operator],l=ve(i.value)?i.value:[i.value],c=(o=n[i.key])!==null&&o!==void 0?o:[];return l.length>0&&a(l,c)});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!de(t)&&ve(t)}}var Ai="https?://(.*)",Kr=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],JT=Wr(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Kr),ei="<masked>",YT=["li_fat_id"];function dg(e,t,n){if(!B)return{};var r,s=t?Wr([],Kr,n||[]):[],i=hg(Qs(B.URL,s,ei),e),o=(r={},Ae(YT,function(a){var l=nn.A(a);r[a]=l||null}),r);return je(o,i)}function hg(e,t){var n=JT.concat(t||[]),r={};return Ae(n,function(s){var i=ho(e,s);r[s]=i||null}),r}function pg(e){var t=function(i){return i?i.search(Ai+"google.([^/?]*)")===0?"google":i.search(Ai+"bing.com")===0?"bing":i.search(Ai+"yahoo.com")===0?"yahoo":i.search(Ai+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!Gt(t)){r.$search_engine=t;var s=B?ho(B.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function Nf(){return navigator.language||navigator.userLanguage}function gg(){return(B==null?void 0:B.referrer)||"$direct"}function _g(e,t){var n=e?Wr([],Kr,t||[]):[],r=st==null?void 0:st.href.substring(0,1e3);return{r:gg().substring(0,1e3),u:r?Qs(r,n,ei):void 0}}function vg(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=fo(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=fo(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=hg(r);je(s,o)}if(n){var a=pg(n);je(s,a)}return s}function mg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function XT(){try{return new Date().getTimezoneOffset()}catch{return}}function QT(e,t){var n,r;if(!St)return{};var s,i,o=e?Wr([],Kr,t||[]):[],[a,l]=function(T){for(var b=0;b<cf.length;b++){var[S,E]=cf[b],m=S.exec(T),$=m&&(bn(E)?E(m,T):E);if($)return $}return["",""]}(St),c=(s=uf(St))===Pp||s===Ip||s==="Kobo"||s==="Kindle Fire"||s===Hp?Ks:s===Ys||s===Fr||s===Xs||s===al?"Console":s===$p?"Wearable":s?Ft:"Desktop";if(c==="Desktop"&&((n=navigator)==null||(n=n.userAgentData)==null?void 0:n.platform)==="Android"&&((r=navigator)==null?void 0:r.maxTouchPoints)>0){var u,f,d,h,p,g=(u=k==null||(f=k.screen)==null?void 0:f.width)!==null&&u!==void 0?u:0,y=(d=k==null||(h=k.screen)==null?void 0:h.height)!==null&&d!==void 0?d:0;c=Math.min(g,y)/((p=k==null?void 0:k.devicePixelRatio)!==null&&p!==void 0?p:1)>=600?"Tablet":"Mobile"}return je(uc({$os:a,$os_version:l,$browser:Gp(St,navigator.vendor),$device:uf(St),$device_type:c,$timezone:mg(),$timezone_offset:XT()}),{$current_url:Qs(st==null?void 0:st.href,o,ei),$host:st==null?void 0:st.host,$pathname:st==null?void 0:st.pathname,$raw_user_agent:St.length>1e3?St.substring(0,997)+"...":St,$browser_version:Yk(St,navigator.vendor),$browser_language:Nf(),$browser_language_prefix:(i=Nf(),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:fn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var wt=Fe("[FeatureFlags]"),us=Fe("[FeatureFlags]",{debugEnabled:!0}),eO="errors_while_computing_flags",tO="flag_missing",nO="quota_limited",rO="timeout",sO="connection_error",iO="unknown_error",oO=e=>"api_error_"+e,va="$active_feature_flags",yr="$override_feature_flags",$f="$feature_flag_payloads",fs="$override_feature_flag_payloads",Df="$feature_flag_request_id",Mf=e=>{var t={};for(var[n,r]of Fi(e||{}))r&&(t[n]=r);return t},aO=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]}))):wt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},lO=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class cO{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,wt.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||(wt.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||wt.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(dl),n=this._instance.get_property(yr),r=this._instance.get_property(fs);if(!r&&!n)return t||{};var s=je({},t||{}),i=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of i){var a,l,c=s[o],u=n==null?void 0:n[o],f=V(u)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!u,d=V(u)?c.variant:typeof u=="string"?u:void 0,h=r==null?void 0:r[o],p=j({},c,{enabled:f,variant:f?d??(c==null?void 0:c.variant):void 0});f!==(c==null?void 0:c.enabled)&&(p.original_enabled=c==null?void 0:c.enabled),d!==(c==null?void 0:c.variant)&&(p.original_variant=c==null?void 0:c.variant),h&&(p.metadata=j({},c==null?void 0:c.metadata,{payload:h,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),s[o]=p}return this._t||(wt.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(yr);if(!n)return t||{};for(var r=je({},t),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(wt.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._t=!0),r}getFlagPayloads(){var t=this._instance.get_property($f),n=this._instance.get_property(fs);if(!n)return t||{};for(var r=je({},t||{}),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(wt.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:j({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(ws)||{}),group_properties:this._instance.get_property(or),timezone:mg()};Gt(s)||V(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:yn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var c,u,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"?rO:sO):h.push(iO):l.statusCode!==200&&h.push(oO(l.statusCode)),(c=l.json)!=null&&c.errorsWhileComputingFlags&&h.push(eO);var p=!((u=l.json)==null||(u=u.quotaLimited)==null||!u.includes(lO.FeatureFlags));if(p&&h.push(nO),(f=this._instance.persistence)==null||f.register({[pl]:h}),p)wt.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 wt.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(Df)||void 0,c=this._instance.get_property(ao)||void 0,u=this._instance.get_property(oo)||{};if((n.send_event||!("send_event"in n))&&(!(t in u)||!u[t].includes(a))){var f,d,h,p,g,y,T,b,S,E;ve(u[t])?u[t].push(a):u[t]=[a],(f=this._instance.persistence)==null||f.register({[oo]:u});var m=this.getFeatureFlagDetails(t),$=[...(d=this._instance.get_property(pl))!==null&&d!==void 0?d:[]];V(i)&&$.push(tO);var F={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:c,$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};V(m==null||(g=m.metadata)==null?void 0:g.version)||(F.$feature_flag_version=m.metadata.version);var C,R=(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;R&&(F.$feature_flag_reason=R),m!=null&&(S=m.metadata)!=null&&S.id&&(F.$feature_flag_id=m.metadata.id),V(m==null?void 0:m.original_variant)&&V(m==null?void 0:m.original_enabled)||(F.$feature_flag_original_response=V(m.original_variant)?m.original_enabled:m.original_variant),m!=null&&(E=m.metadata)!=null&&E.original_payload&&(F.$feature_flag_original_payload=m==null||(C=m.metadata)==null?void 0:C.original_payload),$.length&&(F.$feature_flag_error=$.join(",")),this._instance.capture("$feature_flag_called",F)}if(s){var L=o;if(!V(o))try{L=JSON.parse(o)}catch{}return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:L}}}}else wt.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:yn.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 V(r)?void 0:!!r}wt.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,c,u){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var f=aO(o),d=f.flags,h=f.featureFlags,p=f.featureFlagPayloads;if(h){var g=o.requestId,y=o.evaluatedAt;if(ve(h)){wt.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({[va]:h,[Cr]:T})}else{var S=h,E=p,m=d;if(o.errorsWhileComputingFlags)if(d){var $=new Set(Object.keys(d).filter(F=>{var C;return!((C=d[F])!=null&&C.failed)}));S=j({},l,Object.fromEntries(Object.entries(S).filter(F=>{var[C]=F;return $.has(C)}))),E=j({},c,Object.fromEntries(Object.entries(E||{}).filter(F=>{var[C]=F;return $.has(C)}))),m=j({},u,Object.fromEntries(Object.entries(m||{}).filter(F=>{var[C]=F;return $.has(C)})))}else S=j({},l,S),E=j({},c,E),m=j({},u,m);a&&a.register(j({[va]:Object.keys(Mf(S)),[Cr]:S||{},[$f]:E||{},[dl]:m||{}},g?{[Df]:g}:{},y?{[ao]:y}:{}))}}})(t,this._instance.persistence,r,s,i),n||(this.St=!1),this.Dt(n)}}override(t,n){n===void 0&&(n=!1),wt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return wt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(yr),this._instance.persistence.unregister(fs),this.Dt(),us.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(yr),us.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({[yr]:s})}else this._instance.persistence.register({[yr]:r.flags});us.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(fs),us.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[fs]:r.payloads}),us.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(bs)||[]).find(c=>c.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=j({},this.getFlagVariants(),{[t]:n});(s=this._instance.persistence)==null||s.register({[va]:Object.keys(Mf(l)),[Cr]:l}),this.Dt()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var s=this._instance.get_property(bs),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 c=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(bs),(l=this._instance.persistence)==null||l.register({[bs]:c}),t(c)}}})}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(ws)||{};this._instance.register({[ws]:j({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(ws)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(or)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(s=>{r[s]=j({},r[s],t[s]),delete t[s]}),this._instance.register({[or]:j({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(or)||{};this._instance.register({[or]:j({},n,{[t]:{}})})}else this._instance.unregister(or)}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 uO=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class ma{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&&Z.info("Persistence loaded",t.persistence,j({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this.zt}Ut(t){uO.indexOf(t.persistence.toLowerCase())===-1&&(Z.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=[...RT,...s];return j({},$e,{D:function(o){try{var a={};try{a=nn.D(o)||{}}catch{}var l=je(a,JSON.parse($e.A(o)||"{}"));return $e.j(o,l),l}catch{}return null},j:function(o,a,l,c,u,f){try{$e.j(o,a,void 0,void 0,f);var d={};i.forEach(h=>{a[h]&&(d[h]=a[h])}),Object.keys(d).length&&nn.j(o,d,l,c,u,f)}catch(h){$e.M(h)}},L:function(o,a){try{k==null||k.localStorage.removeItem(o),nn.L(o,a)}catch(l){$e.M(l)}}})}(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&$e.O()?$e:r==="localstorage+cookie"&&n.O()?n:r==="sessionstorage"&&rt.O()?rt:r==="memory"?IT:r==="cookie"?nn:n.O()?n:nn}Pt(t){var n=t??this.N.feature_flag_cache_ttl_ms;if(!n||n<=0)return!1;var r=this.props[ao];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Ae(this.props,(n,r)=>{if(r===Cr&&Xe(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,(Gt(o=kT)?l:nf&&o.indexOf===nf?o.indexOf(a)!=-1:(Ae(o,function(c){if(l||(l=c===a))return so}),l))||(t[r]=n);var o,a,l}),t}load(){if(!this.zt){var t=this.B.D(this.Nt);t&&(this.props=je({},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(Xe(t)){V(n)&&(n="None"),this.Ht=V(r)?this.Wt:r;var s=!1;if(Ae(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(Xe(t)){this.Ht=V(n)?this.Wt:n;var r=!1;if(Ae(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=dg(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);Ar(uc(t))||this.register(t),this.Lt=!0}}update_search_keyword(){var t;this.register((t=B==null?void 0:B.referrer)?pg(t):{})}update_referrer_info(){var t;this.register_once({$referrer:gg(),$referring_domain:B!=null&&B.referrer&&((t=fo(B.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[vl]||this.props[ml]||this.register_once({[lo]:_g(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Ae([ml,vl],o=>{var a=this.props[o];a&&Ae(a,function(l,c){t["$initial_"+rl(c)]=l})});var n,r,s=this.props[lo];if(s){var i=(n=vg(s),r={},Ae(n,function(o,a){r["$initial_"+rl(a)]=o}),r);je(t,i)}return t}safe_merge(t){return Ae(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(),c=[...a].sort();return l.every((u,f)=>u===c[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[ys]||{};r[t]=n,this.props[ys]=r,this.save()}remove_event_timer(t){var n=(this.props[ys]||{})[t];return V(n)||(delete this.props[ys][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}}var ds=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 ya=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 Ss=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),ba=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}({}),El=function(e){return e.Popover="popover",e.Inline="inline",e}({}),ke=Fe("[Surveys]"),yg="seenSurvey_",fO=(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},Ff=e=>((t,n)=>{var r=""+t+n.id;return n.current_iteration&&n.current_iteration>0&&(r=""+t+n.id+"_"+n.current_iteration),r})(yg,e),dO=[ya.Popover,ya.Widget,ya.API],hO={ignoreConditions:!1,ignoreDelay:!1,displayType:El.Popover};class hc{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 br(e,t,n){if(de(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 pO{constructor(t){this.Vt=new hc,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(!V((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(!V((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(c=>{var u;(u=this.Zt)==null||u.add((c==null?void 0:c.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"||!br(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=>br(a.href,n.href,n.href_matching||"exact"));var i,o=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!o&&br((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(c=>br(c.text,n.text,n.text_matching||"exact")||br(c.$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(c){for(var u,f=[],d=/(?::|")text="(.*?)"/g;!de(u=d.exec(c));)f.includes(u[1])||f.push(u[1]);return f}(l),o=n.text,a=n.text_matching||"exact",i.some(c=>br(c,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||fg(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 gO{constructor(t){this._instance=t,this.ai=new Map,this.li=new Map,this.ui=new Map}hi(t,n){return!!t&&fg(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===ds.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(c=>c.name===t);return this.hi(l,n)})}register(t){var n;V((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 pO(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(c=>{if(c&&c.name){var u=this.ui.get(c.name);u&&u.push(r.id),this.ui.set(c.name,u||[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,ds.Activation),this.li=this.di(t,ds.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,c;s.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:a});var u=(n==null||(l=n.properties)==null?void 0:l.$survey_id)||(n==null||(c=n.properties)==null?void 0:c.$product_tour_id);if(u){var f=a.indexOf(u);f>=0&&(a.splice(f,1),this.wi(a))}}else{if(this.li.has(t)){var d=this.vi(t,n,ds.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,ds.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 _O extends gO{constructor(t){super(t)}bi(){return"$surveys_activated"}yi(){return Ss.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 vO{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(de(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(yg)||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(!V(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 _O(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(hl);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 c={isLoaded:!1,error:l};return t([],c),void(r==null||r({surveys:[],context:c}))}var u,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&&((u=this._surveyEventReceiver)==null||u.register(d)),(o=this._instance.persistence)==null||o.register({[hl]: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),!de(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(de(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(de(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 de(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(de(this._surveyManager))ke.warn("init was not called");else{var i=typeof t=="string"?this.Fi(t):t;if(i!=null&&i.id)if(dO.includes(i.type)){var o=B==null?void 0:B.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(de(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=j({},s,{appearance:j({},s.appearance,{surveyPopupDelaySeconds:0})})),n.displayType!==El.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!==El.Inline?this._surveyManager.handlePopoverSurvey(i,n):this.renderSurvey(i,n.selector,n.properties)}else ke.warn("Survey not found")}}cancelPendingSurvey(t){de(this._surveyManager)?ke.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}var $t=Fe("[Conversations]");class mO{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;de(n)||(Tn(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||Yp(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Q==null?void 0:Q.__PosthogExtensions__;if(t&&!V(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 $t.error("Conversations enabled but missing token in remote config.")}}ji(t){if(this.Di)try{this._conversationsManager=t(this.Di,this._instance),$t.info("Conversations loaded successfully")}catch(n){this.Li("Error completing conversations initialization",n)}else $t.error("Cannot complete initialization: remote config is null")}Li(t,n){$t.error(t,n),this._conversationsManager=null,this.Ai=!1}show(){this._conversationsManager?this._conversationsManager.show():$t.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Mi===!0&&!Gt(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 dn(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(t,n,r):($t.warn("Conversations not available yet."),null)})()}getMessages(t,n){var r=this;return dn(function*(){return r._conversationsManager?r._conversationsManager.getMessages(t,n):($t.warn("Conversations not available yet."),null)})()}markAsRead(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.markAsRead(t):($t.warn("Conversations not available yet."),null)})()}getTickets(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.getTickets(t):($t.warn("Conversations not available yet."),null)})()}requestRestoreLink(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.requestRestoreLink(t):($t.warn("Conversations not available yet."),null)})()}restoreFromToken(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.restoreFromToken(t):($t.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var t=this;return dn(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():($t.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 yO=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}({}),Lf=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 bO{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;!de(r)&&r&&(this.Ni=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ni&&!this.Ui){var t=Fe("[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 zf=Fe("[RateLimiter]");class wO{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=>{zf.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void zf.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(_l))!==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 c=l.tokens<1;return c||t||(l.tokens=Math.max(0,l.tokens-1)),!c||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=c,(s=this.instance.persistence)==null||s.set_property(_l,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var hs=Fe("[RemoteConfig]");class bg{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 hs.info("Using preloaded remote config",this.remoteConfig),this.Bi(this.remoteConfig),void this.qi();if(this._instance.At())return void hs.warn("Remote config is disabled. Falling back to local config.");this.zi(t=>{if(!t)return hs.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){hs.error("Error loading remote config",t)}}stop(){this.Wi&&(clearInterval(this.Wi),this.Wi=void 0)}refresh(){this._instance.At()||(B==null?void 0:B.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||hs.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 Sl=3e3;class EO{constructor(t,n){this.Gi=!0,this.Vi=[],this.Ji=rn((n==null?void 0:n.flush_interval_ms)||Sl,250,5e3,Z.createLogger("flush interval"),Sl),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(j({},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)&&Ae(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 Ae(this.Vi,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;V(t[i])&&(t[i]=j({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.Vi=[],t}}var SO=["retriesPerformedSoFar"];class kO{constructor(t){this.te=!1,this.ie=3e3,this.Vi=[],this._instance=t,this.Vi=[],this.ee=!0,!V(k)&&"onLine"in k.navigator&&(this.ee=k.navigator.onLine,this.re=()=>{this.ee=!0,this.se()},this.ne=()=>{this.ee=!1},He(k,"online",this.re),He(k,"offline",this.ne))}get length(){return this.Vi.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=xp(t,SO);Tr(n)&&(r.url=_o(r.url,{retry_count:n})),this._instance._send_request(j({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?this.oe(j({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,c=Math.min(18e5,a),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)}(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)"),Z.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,V(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(j({},t,{transport:"sendBeacon"}))}catch(n){Z.error(n)}this.Vi=[]}}class TO{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,c=a+((o==null?void 0:o.clientHeight)||0),u=(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=c,this.he.maxContentY=Math.max(c,(s=this.he.maxContentY)!==null&&s!==void 0?s:0),this.he.maxContentHeight=Math.max(u,(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(){He(k,"scroll",this.ue,{capture:!0}),He(k,"scrollend",this.ue,{capture:!0}),He(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 OO=e=>_g(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class Uf{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({[gl]:a})}},this._instance=t,this.pe=n,this.fe=r,this.ce=s||OO,this.pe.onSessionId(this.de)}ve(){return this.fe.props[gl]}getSetOnceProps(){var t,n=(t=this.ve())==null?void 0:t.props;return n?"r"in n?vg(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 Ae(uc(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+rl(r)]=n}),t}}var wa=Fe("[SessionId]");class jf{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 hc,this.be=(u,f)=>!(!Tr(u)||!Tr(f))&&Math.abs(u-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||Vn,this.$e=r||Vn;var i=this.N.persistence_name||this.N.token,o=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*rn(o,60,36e3,wa.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=rt.D(this.Se),l=rt.D(this.ke);a&&!l?this.ye=a:rt.L(this.Se),rt.j(this.ke,!0)}if((s=this.N.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var f=u.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(),c)}catch(u){wa.error("Invalid sessionID in bootstrap",u)}this.Ce()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return V(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&&rt.O()}Ie(t){t!==this.ye&&(this.ye=t,this.Pe()&&rt.j(this.Se,t))}Re(){return this.ye?this.ye:this.Pe()?rt.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({[io]:[n,t,r]}))}Fe(){var t=this.fe.props[io];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()&&rt.L(this.ke)},He(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=Tr(o)&&Math.abs(r-o)>864e5,c=!1,u=!i,f=!u&&!t&&this.be(r,s);u||f||l?(i=this.xe(),a=this.$e(),wa.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:u,activityTimeout:f,sessionPastMaximumLength:l}}),o=r,c=!0):a||(a=this.$e(),c=!0);var d=Tr(s)&&t&&!l?s:r,h=Tr(o)?o:new Date().getTime();return this.Ie(a),this.Te(i,d,h),t||this.Ee(),c&&this.ge.forEach(p=>p(i,a,c?{noSessionId:u,activityTimeout:f,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:c?{noSessionId:u,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 wg=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&of(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>of(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},ks=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),Bf="i.posthog.com";class xO{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("."+Bf,".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]=ks.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=ks.EU:this.Me[this.apiHost]=ks.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===ks.CUSTOM)return this.apiHost+n;var r=Bf+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var AO={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&&vo(t.href,e),not_regex:(e,t)=>!!k&&!vo(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class ct{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{ct.Ae("retrieved web experiments from the server"),n.De=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;n.De&&(ct.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);Ge(a)&&i.variants[a]&&n.je(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];ct.Le(c)&&n.je(i.name,l,c.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(t){if(this._is_bot())ct.Ae("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(de(this.De))return this.De=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ct.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=ct.getWindowLocation();if(t!=null&&t.search){var n=ho(t==null?void 0:t.search,"__experiment_id"),r=ho(t==null?void 0:t.search,"__experiment_variant");n&&r&&(ct.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&&(ct.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!de(t.conditions)&&ct.Ue(t)&&ct.ze(t)}static Ue(t){var n;if(de(t.conditions)||de((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,o=ct.getWindowLocation();return!!o&&((r=t.conditions)==null||!r.url||AO[(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(de(t.conditions)||de((n=t.conditions)==null?void 0:n.utm))return!0;var r=dg();if(r.utm_source){var s,i,o,a,l,c,u,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||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==r.utm_medium,g=(u=t.conditions)==null||(u=u.utm)==null||!u.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];Z.info("[WebExperiments] "+t,r)}je(t,n,r){this._is_bot()?ct.Ae("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(s=>{if(s.selector){var i;ct.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)})}}):ct.Ae("Control variants leave the page unmodified.")}_is_bot(){return Ct&&this._instance?wg(Ct,this._instance.config.custom_blocked_useragents):void 0}}var CO=Fe("[PostHog ExternalIntegrations]"),RO={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class IO{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 CO.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,c;!s||(a=Q.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.V(RO[o],()=>{var u;(u=Q.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(t._instance)}),!s&&(l=Q.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=Q.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var Ls={},Ea=0,kl=()=>{},Or="posthog",Eg=!qT&&(St==null?void 0:St.indexOf("MSIE"))===-1&&(St==null?void 0:St.indexOf("Mozilla"))===-1,Vf=e=>{var t;return j({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ST(B==null?void 0:B.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:kl,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:st&&Ge(st==null?void 0:st.search)&&st.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;Z.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:Sl},error_tracking:{},_onCapture:kl,__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))},Zf=e=>{var t={};V(e.process_person)||(t.person_profiles=e.process_person),V(e.xhr_headers)||(t.request_headers=e.xhr_headers),V(e.cookie_name)||(t.persistence_name=e.cookie_name),V(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),V(e.store_google)||(t.save_campaign_params=e.store_google),V(e.verbose)||(t.debug=e.verbose);var n=je({},t,e);return ve(e.property_blacklist)&&(V(e.property_denylist)?n.property_denylist=e.property_blacklist:ve(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:Z.error("Invalid value for property_denylist config: "+e.property_denylist)),n};class PO{constructor(){this.__forceAllowLocalhost=!1}get He(){return this.__forceAllowLocalhost}set He(t){Z.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class En{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 PO,this.Be=!1,this.version=fn.LIB_VERSION,this.Ft=new hc,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Vf(),this.SentryIntegration=MT,this.sentryIntegration=t=>function(n,r){var s=sg(n,r);return{name:rg,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 cO(this),this.toolbar=new zT(this),this.scrollManager=new TO(this),this.pageViewManager=new Of(this),this.surveys=new vO(this),this.conversations=new mO(this),this.logs=new bO(this),this.experiments=new ct(this),this.exceptions=new KT(this),this.rateLimiter=new wO(this),this.requestRouter=new xO(this),this.consent=new PT(this),this.externalIntegrations=new IO(this),this.people={set:(t,n,r)=>{var s=Ge(t)?{[t]:n}:t;this.setPersonProperties(s),r==null||r({})},set_once:(t,n,r)=>{var s=Ge(t)?{[t]:n}:t;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",t=>Z.info('send "'+(t==null?void 0:t.event)+'"',t))}init(t,n,r){if(r&&r!==Or){var s,i=(s=Ls[r])!==null&&s!==void 0?s:new En;return i._init(t,n,r),Ls[r]=i,Ls[Or][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s;if(n===void 0&&(n={}),V(t)||sl(t))return Z.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(je({},Vf(n.defaults),Zf(n),{name:r,token:t})),this.config.on_xhr_error&&Z.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:yn.GZipJS;var i=this.Xe();this.persistence=new ma(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new ma(j({},this.config,{persistence:"sessionStorage"}),i);var o=j({},this.persistence.props),a=j({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Qe=new EO(b=>this.Ze(b),this.config.request_queue_config),this.tr=new kO(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 jf(this),this.sessionPropsManager=new Uf(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Z.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.ir(l)},0)):(Z.info("Initializing extensions synchronously"),this.ir(l)),fn.DEBUG=fn.DEBUG||this.config.debug,fn.DEBUG&&Z.info("Starting in debug mode",{this:this,config:n,thisC:j({},this.config),p:o,s:a}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,u,f=this.config.get_device_id(Vn()),d=(c=n.bootstrap)!=null&&c.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(en,(u=n.bootstrap)!=null&&u.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:os,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(Vn());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(en,"anonymous")}return He(k,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?DT(this,()=>this.rr()):this.rr(),bn(this.config._onCapture)&&this.config._onCapture!==kl&&(Z.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&Z.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=j({},En.__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,$T),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){Z.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&&Z.info("PostHog extensions initialized ("+s+"ms)")}Bi(t){var n,r,s,i,o,a,l,c,u;if(!B||!B.body)return Z.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=ue(t.supportedCompression,yn.GZipJS)?yn.GZipJS:ue(t.supportedCompression,yn.Base64)?yn.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),(c=this.exceptionObserver)==null||c.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(t)}rr(){try{this.config.loaded(this)}catch(r){Z.critical("`loaded` function failed",r)}if(this.ar(),this.config.internal_or_test_user_hostname&&st!=null&&st.hostname){var t=st.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 bg(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()&&Hn(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&&(Eg?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=_o(t.url,{ip:this.config.ip?1:0}),t.headers=j({},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=j({},n);o.timeout=o.timeout||6e4,o.url=_o(o.url,{_:new Date().getTime().toString(),ver:fn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=Li.filter(u=>!o.disableTransport||!u.transport||!o.disableTransport.includes(u.transport)),c=(s=(i=Jp(l,u=>u.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!c)throw new Error("No available transport method");c(o)})(j({},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){Ea++;try{var n,r=[],s=[],i=[];Hn(t,a=>{a&&(n=a[0],ve(n)?i.push(a):bn(a)?a.call(this):ve(a)&&n==="alias"?r.push(a):ve(a)&&n.indexOf("capture")!==-1&&bn(this[n])?i.push(a):s.push(a))});var o=function(a,l){Hn(a,function(c){if(ve(c[0])){var u=l;Ae(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},l)};o(r,this),o(s,this),o(i,this)}finally{Ea--}}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(Ea>0&&ve(t)&&Ge(t[0])){var n=En.prototype[t[0]];bn(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(!V(t)&&Ge(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&&!Ge(n==null?void 0:n.$current_url)&&(Z.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||Z.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,c=Vn(),u={uuid:c,event:t,properties:this.calculateEventProperties(t,n||{},l,c)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),o&&(u.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),r!=null&&r.$set&&(u.$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&&(u.$set_once=h),(u=wT(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,V(r==null?void 0:r.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),t===Ss.DISMISSED||t===Ss.SENT){var p=n==null?void 0:n[ba.SURVEY_ID],g=n==null?void 0:n[ba.SURVEY_ITERATION];f={id:p,current_iteration:g},localStorage.getItem(Ff(f))||localStorage.setItem(Ff(f),"true"),u.$set=j({},u.$set,{[fO({id:p,current_iteration:g},t===Ss.SENT?"responded":"dismissed")]:!0})}else t===Ss.SHOWN&&(u.$set=j({},u.$set,{[ba.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===yO.SHOWN){var y=n==null?void 0:n[Lf.TOUR_TYPE];y&&(u.$set=j({},u.$set,{[Lf.TOUR_LAST_SEEN_DATE+"/"+y]:new Date().toISOString()}))}var T=j({},u.properties.$set,u.$set);if(Ar(T)||this.setPersonPropertiesForFlags(T),!de(this.config.before_send)){var b=this.vr(u);if(!b)return;u=b}this.Ft.emit("eventCaptured",u);var S={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,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),u}Z.critical("This capture call is ignored due to client rate limiting.")}}else Z.error("No event name provided to posthog.capture")}else Z.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=j({},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=j({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!Ge(a.distinct_id)&&!Cn(a.distinct_id)||sl(a.distinct_id))&&Z.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=QT(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&&je(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&je(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===ks.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),c=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=je(a,c),t==="$pageview"&&B&&(a.title=B.title),!V(o)){var p=r.getTime()-o;a.$duration=parseFloat((p/1e3).toFixed(3))}St&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=je({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ve(this.config.property_denylist)?Ae(this.config.property_denylist,function(T){delete a[T]}):Z.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&&(Z.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=je({},s,i||{},t||{}),a=this.config.sanitize_properties;return a&&(Z.error("sanitize_properties is deprecated. Use before_send instead"),o=a(o,"$set_once")),n&&(this.Be=!0),Ar(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=j({},s,t),a=j({},i,n),l={};for(var[c,u]of Object.entries(o)){var f=typeof u=="string";l[c]={key:c,enabled:!!f||!!u,variant:f?u:void 0,reason:void 0,metadata:V(a==null?void 0:a[c])?void 0:{id:0,version:void 0,description:void 0,payload:a[c]}}}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=hO),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 Z.uninitializedWarning("posthog.identify");if(Cn(t)&&(t=t.toString(),Z.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()))Z.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!==os){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(ms)&&(this.unregister(ms),this.register({distinct_id:t}));var o=(this.persistence.get_property(en)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(en,"identified"),this.setPersonPropertiesForFlags(j({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.Ve=Pf(t,n,r),this.featureFlags.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(oo))}}else Z.critical('The string "'+os+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Z.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.pr("posthog.setPersonProperties")){var r=Pf(this.get_distinct_id(),t,n);this.Ve!==r?(this.setPersonPropertiesForFlags(j({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ve=r):Z.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:j({},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 Z.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(Z.info("reset"),!this.__loaded)return Z.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(en,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ve=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:os,$device_id:null},"");else{var l=this.config.get_device_id(Vn());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(Xp)?(Z.critical("Attempting to create alias for existing People user - aborting."),-2):this.pr("posthog.alias")?(V(n)&&(n=this.get_distinct_id()),t!==n?(this._r(ms,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(Z.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=j({},this.config);if(Xe(t)){var r,s,i,o,a,l,c,u;je(this.config,Zf(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 ma(j({},this.config,{persistence:"sessionStorage"}),f);var d=this.Je(this.config.debug);Tn(d)&&(this.config.debug=d),Tn(this.config.debug)&&(this.config.debug?(fn.DEBUG=!0,$e.O()&&$e.j("ph_debug","true"),Z.info("set_config",{config:t,oldConfig:n,newConfig:j({},this.config)})):(fn.DEBUG=!1,$e.O()&&$e.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(),(c=this.deadClicksAutocapture)==null||c.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.gr(),(u=this.externalIntegrations)==null||u.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(j({},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:Or;return n!==Or&&(n=Or+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(en))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(en))==="identified"}cr(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Ar(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ms])&&((n=this.persistence)==null||(n=n.props)==null||!n[co]))}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"?(Z.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._r(co,!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 jf(this),this.pageViewManager=new Of(this),this.persistence&&(this.sessionPropsManager=new Uf(this,this.sessionManager,this.persistence));var l=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=En.__defaultExtensionClasses)==null?void 0:a.sessionRecording;l&&(this.sessionRecording=new l(this),this.sessionRecording.startIfEnabledOrStop())}var c;this.consent.optInOut(!0),this.gr(),this.ar(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(V(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((c=t==null?void 0:t.captureEventName)!==null&&c!==void 0?c:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.lr()}else Z.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:os,$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())):Z.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===hn.GRANTED?"granted":t===hn.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 Ct?wg(Ct,this.config.custom_blocked_useragents):void 0}lr(){B&&(B.visibilityState==="visible"?this.qe||(this.qe=!0,this.capture("$pageview",{title:B.title},{send_instantly:!0}),this.We&&(B.removeEventListener("visibilitychange",this.We),this.We=null)):this.We||(this.We=this.lr.bind(this),He(B,"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?(Z.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=Z,o=(n="advanced_disable_flags")in(t=l)&&!de(t[n]),a=r in t&&!de(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(de(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),de(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return Lk(t.event)?Z.warn(i+". This can cause unexpected behavior."):Z.info(i),null}r.properties&&!Ar(r.properties)||Z.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=Tn(t)&&!t,r=$e.O()&&$e.A("ph_debug")==="true";return!n&&(!!r||t)}}En.__defaultExtensionClasses={},function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=bT(e.prototype[t[n]])}(En,["identify"]);function Hf(e){return e instanceof Element&&(e.id===tg||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Vo(e){return!!e&&e.nodeType===1}function Gn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Sg(e){return!!e&&e.nodeType===3}function kg(e){return!!e&&e.nodeType===11}function pc(e){return e?jo(e).split(/\s+/):[]}function Gf(e){var t=k==null?void 0:k.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function mo(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 Tg(e){return de(e)?null:jo(e).split(/(\s+)/).filter(t=>ti(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function ui(e){var t="";return Tl(e)&&!Cg(e)&&e.childNodes&&e.childNodes.length&&Ae(e.childNodes,function(n){var r;Sg(n)&&n.textContent&&(t+=(r=Tg(n.textContent))!==null&&r!==void 0?r:"")}),jo(t)}function Wf(e){return V(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var gc=["a","button","form","input","select","textarea","label"];function Og(e,t){if(V(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 xg(e){var t=e.parentNode;return!(!t||!Vo(t))&&t}var NO=["next","previous","prev",">","<"],qf=10,Kf=[".ph-no-rageclick",".ph-no-capture"];function $O(e,t){if(!k||_c(e))return!1;var n,r,s;if(Tn(t)?(n=!!t&&Kf,r=void 0):(n=(s=t==null?void 0:t.css_selector_ignorelist)!==null&&s!==void 0?s:Kf,r=t==null?void 0:t.content_ignorelist),n===!1)return!1;var{targetElementList:i}=Ag(e,!1);return!function(o,a){if(o===!1||V(o))return!1;var l;if(o===!0)l=NO;else{if(!ve(o))return!1;if(o.length>qf)return Z.error("[PostHog] content_ignorelist array cannot exceed "+qf+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map(c=>c.toLowerCase())}return a.some(c=>{var{safeText:u,ariaLabel:f}=c;return l.some(d=>u.includes(d)||f.includes(d))})}(r,i.map(o=>{var a;return{safeText:ui(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}}))&&!Og(i,n)}var _c=e=>!e||Gn(e,"html")||!Vo(e),Ag=(e,t)=>{if(!k||_c(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],s=e;s.parentNode&&!Gn(s,"body");)if(kg(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=xg(s);if(!i)break;if(t||gc.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 DO(e,t,n,r,s){var i,o,a,l;if(n===void 0&&(n=void 0),!k||_c(e)||(i=n)!=null&&i.url_allowlist&&!Gf(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&Gf(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var c=n.dom_event_allowlist;if(c&&!c.some(p=>t.type===p))return!1}var{parentIsUsefulElement:u,targetElementList:f}=Ag(e,r);if(!function(p,g){var y=g==null?void 0:g.element_allowlist;if(V(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)||!Og(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 u?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(gc.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function Tl(e){for(var t=e;t.parentNode&&!Gn(t,"body");t=t.parentNode){var n=mo(t);if(ue(n,"ph-sensitive")||ue(n,"ph-no-capture"))return!1}if(ue(mo(e),"ph-include"))return!0;var r=e.type||"";if(Ge(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(Ge(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 Cg(e){return!!(Gn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Gn(e,"select")||Gn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var Rg="(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})",MO=new RegExp("^(?:"+Rg+")$"),FO=new RegExp(Rg),Ig="\\d{3}-?\\d{2}-?\\d{4}",LO=new RegExp("^("+Ig+")$"),zO=new RegExp("("+Ig+")");function ti(e,t){return t===void 0&&(t=!0),!(de(e)||Ge(e)&&(e=jo(e),(t?MO:FO).test((e||"").replace(/[- ]/g,""))||(t?LO:zO).test(e)))}function Pg(e){var t=ui(e);return ti(t=(t+" "+Ng(e)).trim())?t:""}function Ng(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ae(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=ui(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+Ng(n)).trim())}catch(i){Z.error("[AutoCapture]",i)}}),t}function UO(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=j({},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),c={};return Fi(l).sort((u,f)=>{var[d]=u,[h]=f;return d.localeCompare(h)}).forEach(u=>{var[f,d]=u;return c[Jf(f.toString())]=Jf(d.toString())}),o+=":",o+=Fi(c).map(u=>{var[f,d]=u;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:jO(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return Fi(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 Jf(e){return e.replace(/"|\\"/g,'\\"')}function jO(e){var t=e.attr__class;return t?ve(t)?t:pc(t):void 0}class Yf{constructor(t){this.disabled=t===!1;var n=Xe(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 Sa="$copy_autocapture",Xf=Fe("[AutoCapture]");function ka(e,t){return t.length>e?t.slice(0,e)+"...":t}function BO(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Vo(t));return t}function VO(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};gc.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=ka(1024,Pg(e)):i.$el_text=ka(1024,ui(e)));var o=mo(e);o.length>0&&(i.classes=o.filter(function(u){return u!==""})),Ae(e.attributes,function(u){var f;if((!Cg(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(r==null||!r.includes(u.name))&&!t&&ti(u.value)&&(f=u.name,!Ge(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")){var d=u.value;u.name==="class"&&(d=pc(d).join(" ")),i["attr__"+u.name]=ka(1024,d)}});for(var a=1,l=1,c=e;c=BO(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function ZO(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!Gn(u,"body");)kg(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var f,d=[],h={},p=!1,g=!1;if(Ae(c,E=>{var m=Tl(E);E.tagName.toLowerCase()==="a"&&(p=E.getAttribute("href"),p=m&&p&&ti(p)&&p),ue(mo(E),"ph-no-capture")&&(g=!0),d.push(VO(E,i,o,a));var $=function(F){if(!Tl(F))return{};var C={};return Ae(F.attributes,function(R){if(R.name&&R.name.indexOf("data-ph-capture-attribute")===0){var L=R.name.replace("data-ph-capture-attribute-",""),Y=R.value;L&&Y&&ti(Y)&&(C[L]=Y)}}),C}(E);je(h,$)}),g)return{props:{},explicitNoCapture:g};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?d[0].$el_text=Pg(e):d[0].$el_text=ui(e)),p){var y,T;d[0].attr__href=p;var b=(y=fo(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:je({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:UO(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 ps=Fe("[ExceptionAutocapture]");function Qf(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return bn(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var HO=Fe("[TracingHeaders]"),Nn=Fe("[Web Vitals]"),ed=9e5;Fe("[SessionRecording]");var Ol="[SessionRecording]",wr=Fe(Ol),GO=Fe("[Heatmaps]");function td(e){return Xe(e)&&"clientX"in e&&"clientY"in e&&Cn(e.clientX)&&Cn(e.clientY)}var nd=Fe("[Product Tours]"),Ta="ph_product_tours",WO=["$set_once","$set"],$n=Fe("[SiteApps]"),qO={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 wr.error("started without valid sessionManager"),new Error(Ol+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Ol+' cannot be used with cookieless_mode="always"')}get yr(){var e,t=!((e=this._instance.get_property(ki))==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=!V(Object.assign)&&!V(Array.from);this.yr&&n?(this.Er(e),wr.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 wr.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(eg)}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=de(o)?null:parseFloat(o);de(a)&&this.Pr();var l=i==null?void 0:i.minimumDurationMilliseconds;r.register({[ki]:j({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:j({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:V(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:wr.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):wr.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(ki);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Cr(){var e,t=this._instance.get_property(ki);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,wr.info("persisted remote config is stale, requesting fresh config before starting"),new bg(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))}}},KO={autocapture:class{constructor(e){this.Ir=!1,this.Rr=null,this.Fr=!1,this.instance=e,this.rageclicks=new Yf(e.config.rageclick),this.Or=null}get N(){var e,t,n=Xe(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&&B){var e=n=>{n=n||(k==null?void 0:k.event);try{this.Ar(n)}catch(r){Xf.error("Failed to capture event",r)}};if(He(B,"submit",e,{capture:!0}),He(B,"change",e,{capture:!0}),He(B,"click",e,{capture:!0}),this.N.capture_copied_text){var t=n=>{n=n||(k==null?void 0:k.event),this.Ar(n,Sa)};He(B,"copy",t,{capture:!0}),He(B,"cut",t,{capture:!0})}}}else Xf.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({[gf]:!!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=B==null?void 0:B.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[gf],r=this.Rr;if(Gt(r)&&!Tn(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=Wf(e);Sg(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())&&$O(r,this.instance.config.rageclick)&&this.Ar(e,"$rageclick");var s=t===Sa;if(r&&DO(r,e,this.N,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=ZO(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===Sa){var l,c=Tg(k==null||(l=k.getSelection())==null?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;i.$selected_content=c,i.$copy_type=u}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return bn(B==null?void 0:B.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&&(Z.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.jr&&this.jr(),this.jr=void 0,Z.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(k&&k.history){var n=this;(e=k.history.pushState)!=null&&e.__posthog_wrapped__||Qf(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__||Qf(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){Z.error("Error capturing "+e+" pageview",r)}}Nr(){if(!this.jr){var e=()=>{this.Lr("popstate")};He(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[ul]),this.rageclicks=new Yf(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return Xe(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 de(this.instance.config.capture_heatmaps)?de(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;GO.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({[ul]: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"}(B)?setInterval(this.se.bind(this),this.flushIntervalMilliseconds):null}Hr(){k&&B&&(this.Vr=this.se.bind(this),He(k,"beforeunload",this.Vr),this.Jr=e=>this.Gr(e||(k==null?void 0:k.event)),He(B,"click",this.Jr,{capture:!0}),this.Kr=e=>this.Yr(e||(k==null?void 0:k.event)),He(B,"mousemove",this.Kr,{capture:!0}),this.Xr=new Sf(this.instance,NT,this.Wr.bind(this)),this.Xr.startIfEnabledOrStop(),this.Qr=this.Br.bind(this),He(B,"visibilitychange",this.Qr),this.Ir=!0)}qr(){var e;k&&B&&(this.Vr&&k.removeEventListener("beforeunload",this.Vr),this.Jr&&B.removeEventListener("click",this.Jr,{capture:!0}),this.Kr&&B.removeEventListener("mousemove",this.Kr,{capture:!0}),this.Qr&&B.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 c=o;c&&Vo(c)&&!Gn(c,"body");){if(c===l)return!1;if(ue(a,k==null?void 0:k.getComputedStyle(c).position))return!0;c=xg(c)}return!1}(Wf(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"),!Hf(e.target)&&td(e)){var r=this.ts(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.es(j({},r,{type:"rageclick"})),this.es(r)}}Yr(e){!Hf(e.target)&&td(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?Wr([],Kr,r||[]):[],i=Qs(t,s,ei);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(e)}}se(){this.R&&!Ar(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Sf,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)=>j({},n,{["$web_vitals_"+r.name+"_event"]:j({},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(V(s))Nn.error("Could not read session ID. Dropping metrics!");else{this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.os();V(i)||(de(n==null?void 0:n.name)||de(n==null?void 0:n.value)?Nn.error("Invalid metric received",n):this.ls&&n.value>=this.ls?Nn.error("Ignoring metric with value >= "+this.ls,n):(this.R.url!==i&&(this.rs(),this.ss=setTimeout(this.rs,this.flushToCaptureTimeoutMs)),V(this.R.url)&&(this.R.url=i),this.R.firstMetricTimestamp=V(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.R.metrics.push(j({},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__;V(o)||V(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):Nn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Ur=!((t=this._instance.persistence)==null||!t.props[mf]),this.startIfEnabled()}get allowedMetrics(){var e,t,n=Xe(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return de(n)?((t=this._instance.persistence)==null?void 0:t.props[bf])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return e!=null&&e}get ls(){var e=Xe(this._instance.config.capture_performance)&&Cn(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:ed;return 0<e&&e<=6e4?ed:e}get isEnabled(){var e=st==null?void 0:st.protocol;if(e!=="http:"&&e!=="https:")return Nn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Tn(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Tn(t)?t:this.Ur}startIfEnabled(){this.isEnabled&&!this.Ir&&(Nn.info("enabled, starting..."),this.V(this.us))}onRemoteConfig(e){if("capturePerformance"in e){var t=Xe(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=Xe(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[mf]:t}),this._instance.persistence.register({[bf]: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?Nn.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?Wr([],Kr,n||[]):[];return Qs(e,r,ei)}Nn.error("Could not determine current URL")}}},JO={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){ps.error("failed to start",l),this.cs()}}},this._instance=e,this.fs=!((t=this._instance.persistence)==null||!t.props[_f]),this.ps=new jk({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:ps}),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 Xe(e)?t=j({},t,e):(V(e)?this.fs:e)&&(t=j({},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?(ps.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 ps.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({[_f]: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)?ps.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}},YO={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({[yf]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.gs||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(yf)||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?nd.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[Ta];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 nd.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({[Ta]:a}),e(a,{isLoaded:!0})}})}else e(this.bs,{isLoaded:!0})}getActiveProductTours(e){de(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(Ta)}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)}}},XO={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={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[f,d]of Object.entries(u))l[f]={id:c[f],type:f,properties:d};var{$set_once:h,$set:p}=e;return{event:j({},xp(e,WO),{properties:j({},e.properties,p?{$set:j({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},p)}:{},h?{$set_once:j({},(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&&($n.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,$n.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){$n.error("Error while initializing PostHog app with config id "+e.id,o),s(!1)}if(r&&t.loaded)try{n()}catch(o){$n.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){$n.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 $n.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 c;Q["__$$ph_site_app_"+l]=s._instance,(c=Q.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,a,u=>{if(u)return $n.error("Error while initializing PostHog app with config id "+l,u)})};for(var{id:o,url:a}of e.siteApps)i(o)}else $n.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},QO=j({},qO,KO,JO,YO,XO,{tracingHeaders:class{constructor(e){this.ks=void 0,this.Ps=void 0,this.us=()=>{var t,n;V(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)),V(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 HO.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)}}});En.__defaultExtensionClasses=j({},QO);var rd,ex=(rd=Ls[Or]=new En,function(){function e(){e.done||(e.done=!0,Eg=!1,Ae(Ls,function(t){t._dom_loaded()}))}B!=null&&B.addEventListener?B.readyState==="complete"?e():He(B,"DOMContentLoaded",e,{capture:!1}):k&&Z.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),rd);function sd(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}ex.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 tx(){try{const t=await fetch("/api/settings/general"),{disableAnalytics:n}=await t.json();sd({disableAnalytics:n})}catch{console.log("PostHog: Failed to fetch general settings, using defaults"),sd()}const e=Em(SS);e.use(Tm()),e.use(Nk),e.mount("#app")}tx();export{nx as $,hx as A,ci as B,dx as C,fx as D,ur as E,dt as F,Io as G,dm as H,xo as I,ym as J,De as K,Im as L,px as M,Qd as N,ix as O,Ze as P,hS as Q,Sn as R,cx as S,Uv as T,ux as U,x_ as V,X as W,Ri as X,I_ as Y,ax as Z,li as _,Pe as a,Pt as a0,lx as a1,Tv as a2,ox as a3,Ul as a4,qn as a5,f_ as a6,sx as a7,Wl as a8,Hs as a9,Em as aa,W as b,Qe as c,Re as d,kv as e,Pc as f,gx as g,vm as h,uE as i,rx as j,Bn as k,It as l,Nr as m,hm as n,Xr as o,fm as p,Vc as q,V_ as r,_x as s,Et as t,Dt as u,cu as v,Bs as w,Ce as x,ri as y,Yn as z};
82
+ `)).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),Gt(a)||(n>t&&(i+=e.substring(t,n)),i+=a,t=n=s+1)}return n>t&&(i+=e.substring(t,e.length)),i},qT=!!nl||!!tl,If="text/plain",_o=function(e,t,n){var r;n===void 0&&(n=!0);var[s,i]=e.split("?"),o=j({},t),a=(r=i==null?void 0:i.split("&").map(c=>{var u,[f,d]=c.split("="),h=n&&(u=o[f])!==null&&u!==void 0?u:d;return delete o[f],f+"="+h}))!==null&&r!==void 0?r:[],l=FT(o);return l&&a.push(l),s+"?"+a.join("&")},Es=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),ga=e=>{var{data:t,compression:n}=e;if(t){if(n===yn.GZipJS){var r=GT(function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var f=new Lt(l.length+(l.length>>>1)),d=0,h=function(T){f[d++]=T},p=0;p<u;++p){if(d+5>f.length){var g=new Lt(d+8+(u-p<<1));g.set(f),f=g}var y=l.charCodeAt(p);y<128||c?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)}(Es(t)),{mtime:0}),s=new Blob([r],{type:If});return{contentType:If,body:s,estimatedSize:s.size}}if(n===yn.Base64){var i=function(l){var c,u,f,d,h,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=0,y=0,T="",b=[];if(!l)return l;l=WT(l);do c=(h=l.charCodeAt(g++)<<16|l.charCodeAt(g++)<<8|l.charCodeAt(g++))>>18&63,u=h>>12&63,f=h>>6&63,d=63&h,b[y++]=p.charAt(c)+p.charAt(u)+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}(Es(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Es(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=Es(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Li=[];tl&&Li.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:s,estimatedSize:i}=(t=ga(e))!==null&&t!==void 0?t:{},o=new Headers;Ae(e.headers,function(u,f){o.append(f,u)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(rf){var c=new rf;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}tl(a,j({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(u=>u.text().then(f=>{var d={statusCode:u.status,text:f};if(u.status===200)try{d.json=JSON.parse(f)}catch(h){Z.error(h)}e.callback==null||e.callback(d)})).catch(u=>{Z.error(u),e.callback==null||e.callback({statusCode:0,error:u})}).finally(()=>l?clearTimeout(l.timeout):null)}}),nl&&Li.push({transport:"XHR",method:e=>{var t,n=new nl;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=(t=ga(e))!==null&&t!==void 0?t:{};Ae(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)}}),Ct!=null&&Ct.sendBeacon&&Li.push({transport:"sendBeacon",method:e=>{var t=_o(e.url,{beacon:"1"});try{var n,{contentType:r,body:s}=(n=ga(e))!==null&&n!==void 0?n:{},i=typeof s=="string"?new Blob([s],{type:r}):s;Ct.sendBeacon(t,i)}catch{}}});var vo=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 Pf(e,t,n){return Es({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var ug={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=>vo(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!vo(n,r))),icontains:(e,t)=>t.map(xi).some(n=>e.map(xi).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(xi).every(n=>e.map(xi).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))})},xi=e=>e.toLowerCase();function fg(e,t){return!e||Object.entries(e).every(n=>{var[r,s]=n,i=t==null?void 0:t[r];if(V(i)||Gt(i))return!1;var o=[String(i)],a=ug[s.operator];return!!a&&a(s.values,o)})}var _a=Fe("[Error tracking]");class KT{constructor(t){var n,r;this.nt=[],this.ot=new eT([new cT,new mT,new fT,new uT,new _T,new gT,new hT,new vT],lT()),this._instance=t,this.nt=(n=(r=this._instance.persistence)==null?void 0:r.get_property(fl))!==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({[fl]:this.nt,[vf]:o})}}get ut(){var t,n=!!this._instance.get_property(vf),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 _a.info("Skipping exception capture because a suppression rule matched");if(!this.ut&&this.vt(n))return void _a.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ct(n))return void _a.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 Ge(i)&&i.length>0&&r.$exception_types.push(i),Ge(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=ug[i.operator],l=ve(i.value)?i.value:[i.value],c=(o=n[i.key])!==null&&o!==void 0?o:[];return l.length>0&&a(l,c)});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!de(t)&&ve(t)}}var Ai="https?://(.*)",Kr=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],JT=Wr(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Kr),ei="<masked>",YT=["li_fat_id"];function dg(e,t,n){if(!B)return{};var r,s=t?Wr([],Kr,n||[]):[],i=hg(Qs(B.URL,s,ei),e),o=(r={},Ae(YT,function(a){var l=nn.A(a);r[a]=l||null}),r);return je(o,i)}function hg(e,t){var n=JT.concat(t||[]),r={};return Ae(n,function(s){var i=ho(e,s);r[s]=i||null}),r}function pg(e){var t=function(i){return i?i.search(Ai+"google.([^/?]*)")===0?"google":i.search(Ai+"bing.com")===0?"bing":i.search(Ai+"yahoo.com")===0?"yahoo":i.search(Ai+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!Gt(t)){r.$search_engine=t;var s=B?ho(B.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function Nf(){return navigator.language||navigator.userLanguage}function gg(){return(B==null?void 0:B.referrer)||"$direct"}function _g(e,t){var n=e?Wr([],Kr,t||[]):[],r=st==null?void 0:st.href.substring(0,1e3);return{r:gg().substring(0,1e3),u:r?Qs(r,n,ei):void 0}}function vg(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=fo(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=fo(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=hg(r);je(s,o)}if(n){var a=pg(n);je(s,a)}return s}function mg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function XT(){try{return new Date().getTimezoneOffset()}catch{return}}function QT(e,t){var n,r;if(!St)return{};var s,i,o=e?Wr([],Kr,t||[]):[],[a,l]=function(T){for(var b=0;b<cf.length;b++){var[S,E]=cf[b],m=S.exec(T),$=m&&(bn(E)?E(m,T):E);if($)return $}return["",""]}(St),c=(s=uf(St))===Pp||s===Ip||s==="Kobo"||s==="Kindle Fire"||s===Hp?Ks:s===Ys||s===Fr||s===Xs||s===al?"Console":s===$p?"Wearable":s?Ft:"Desktop";if(c==="Desktop"&&((n=navigator)==null||(n=n.userAgentData)==null?void 0:n.platform)==="Android"&&((r=navigator)==null?void 0:r.maxTouchPoints)>0){var u,f,d,h,p,g=(u=k==null||(f=k.screen)==null?void 0:f.width)!==null&&u!==void 0?u:0,y=(d=k==null||(h=k.screen)==null?void 0:h.height)!==null&&d!==void 0?d:0;c=Math.min(g,y)/((p=k==null?void 0:k.devicePixelRatio)!==null&&p!==void 0?p:1)>=600?"Tablet":"Mobile"}return je(uc({$os:a,$os_version:l,$browser:Gp(St,navigator.vendor),$device:uf(St),$device_type:c,$timezone:mg(),$timezone_offset:XT()}),{$current_url:Qs(st==null?void 0:st.href,o,ei),$host:st==null?void 0:st.host,$pathname:st==null?void 0:st.pathname,$raw_user_agent:St.length>1e3?St.substring(0,997)+"...":St,$browser_version:Yk(St,navigator.vendor),$browser_language:Nf(),$browser_language_prefix:(i=Nf(),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:fn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var wt=Fe("[FeatureFlags]"),us=Fe("[FeatureFlags]",{debugEnabled:!0}),eO="errors_while_computing_flags",tO="flag_missing",nO="quota_limited",rO="timeout",sO="connection_error",iO="unknown_error",oO=e=>"api_error_"+e,va="$active_feature_flags",yr="$override_feature_flags",$f="$feature_flag_payloads",fs="$override_feature_flag_payloads",Df="$feature_flag_request_id",Mf=e=>{var t={};for(var[n,r]of Fi(e||{}))r&&(t[n]=r);return t},aO=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]}))):wt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},lO=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class cO{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,wt.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||(wt.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||wt.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(dl),n=this._instance.get_property(yr),r=this._instance.get_property(fs);if(!r&&!n)return t||{};var s=je({},t||{}),i=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of i){var a,l,c=s[o],u=n==null?void 0:n[o],f=V(u)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!u,d=V(u)?c.variant:typeof u=="string"?u:void 0,h=r==null?void 0:r[o],p=j({},c,{enabled:f,variant:f?d??(c==null?void 0:c.variant):void 0});f!==(c==null?void 0:c.enabled)&&(p.original_enabled=c==null?void 0:c.enabled),d!==(c==null?void 0:c.variant)&&(p.original_variant=c==null?void 0:c.variant),h&&(p.metadata=j({},c==null?void 0:c.metadata,{payload:h,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),s[o]=p}return this._t||(wt.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(yr);if(!n)return t||{};for(var r=je({},t),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(wt.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._t=!0),r}getFlagPayloads(){var t=this._instance.get_property($f),n=this._instance.get_property(fs);if(!n)return t||{};for(var r=je({},t||{}),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this._t||(wt.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:j({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(ws)||{}),group_properties:this._instance.get_property(or),timezone:mg()};Gt(s)||V(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:yn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var c,u,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"?rO:sO):h.push(iO):l.statusCode!==200&&h.push(oO(l.statusCode)),(c=l.json)!=null&&c.errorsWhileComputingFlags&&h.push(eO);var p=!((u=l.json)==null||(u=u.quotaLimited)==null||!u.includes(lO.FeatureFlags));if(p&&h.push(nO),(f=this._instance.persistence)==null||f.register({[pl]:h}),p)wt.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 wt.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(Df)||void 0,c=this._instance.get_property(ao)||void 0,u=this._instance.get_property(oo)||{};if((n.send_event||!("send_event"in n))&&(!(t in u)||!u[t].includes(a))){var f,d,h,p,g,y,T,b,S,E;ve(u[t])?u[t].push(a):u[t]=[a],(f=this._instance.persistence)==null||f.register({[oo]:u});var m=this.getFeatureFlagDetails(t),$=[...(d=this._instance.get_property(pl))!==null&&d!==void 0?d:[]];V(i)&&$.push(tO);var F={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:c,$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};V(m==null||(g=m.metadata)==null?void 0:g.version)||(F.$feature_flag_version=m.metadata.version);var C,R=(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;R&&(F.$feature_flag_reason=R),m!=null&&(S=m.metadata)!=null&&S.id&&(F.$feature_flag_id=m.metadata.id),V(m==null?void 0:m.original_variant)&&V(m==null?void 0:m.original_enabled)||(F.$feature_flag_original_response=V(m.original_variant)?m.original_enabled:m.original_variant),m!=null&&(E=m.metadata)!=null&&E.original_payload&&(F.$feature_flag_original_payload=m==null||(C=m.metadata)==null?void 0:C.original_payload),$.length&&(F.$feature_flag_error=$.join(",")),this._instance.capture("$feature_flag_called",F)}if(s){var L=o;if(!V(o))try{L=JSON.parse(o)}catch{}return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:L}}}}else wt.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:yn.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 V(r)?void 0:!!r}wt.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,c,u){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var f=aO(o),d=f.flags,h=f.featureFlags,p=f.featureFlagPayloads;if(h){var g=o.requestId,y=o.evaluatedAt;if(ve(h)){wt.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({[va]:h,[Cr]:T})}else{var S=h,E=p,m=d;if(o.errorsWhileComputingFlags)if(d){var $=new Set(Object.keys(d).filter(F=>{var C;return!((C=d[F])!=null&&C.failed)}));S=j({},l,Object.fromEntries(Object.entries(S).filter(F=>{var[C]=F;return $.has(C)}))),E=j({},c,Object.fromEntries(Object.entries(E||{}).filter(F=>{var[C]=F;return $.has(C)}))),m=j({},u,Object.fromEntries(Object.entries(m||{}).filter(F=>{var[C]=F;return $.has(C)})))}else S=j({},l,S),E=j({},c,E),m=j({},u,m);a&&a.register(j({[va]:Object.keys(Mf(S)),[Cr]:S||{},[$f]:E||{},[dl]:m||{}},g?{[Df]:g}:{},y?{[ao]:y}:{}))}}})(t,this._instance.persistence,r,s,i),n||(this.St=!1),this.Dt(n)}}override(t,n){n===void 0&&(n=!1),wt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return wt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(yr),this._instance.persistence.unregister(fs),this.Dt(),us.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(yr),us.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({[yr]:s})}else this._instance.persistence.register({[yr]:r.flags});us.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(fs),us.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[fs]:r.payloads}),us.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(bs)||[]).find(c=>c.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=j({},this.getFlagVariants(),{[t]:n});(s=this._instance.persistence)==null||s.register({[va]:Object.keys(Mf(l)),[Cr]:l}),this.Dt()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var s=this._instance.get_property(bs),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 c=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(bs),(l=this._instance.persistence)==null||l.register({[bs]:c}),t(c)}}})}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(ws)||{};this._instance.register({[ws]:j({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(ws)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(or)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(s=>{r[s]=j({},r[s],t[s]),delete t[s]}),this._instance.register({[or]:j({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(or)||{};this._instance.register({[or]:j({},n,{[t]:{}})})}else this._instance.unregister(or)}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 uO=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class ma{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&&Z.info("Persistence loaded",t.persistence,j({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this.zt}Ut(t){uO.indexOf(t.persistence.toLowerCase())===-1&&(Z.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=[...RT,...s];return j({},$e,{D:function(o){try{var a={};try{a=nn.D(o)||{}}catch{}var l=je(a,JSON.parse($e.A(o)||"{}"));return $e.j(o,l),l}catch{}return null},j:function(o,a,l,c,u,f){try{$e.j(o,a,void 0,void 0,f);var d={};i.forEach(h=>{a[h]&&(d[h]=a[h])}),Object.keys(d).length&&nn.j(o,d,l,c,u,f)}catch(h){$e.M(h)}},L:function(o,a){try{k==null||k.localStorage.removeItem(o),nn.L(o,a)}catch(l){$e.M(l)}}})}(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&$e.O()?$e:r==="localstorage+cookie"&&n.O()?n:r==="sessionstorage"&&rt.O()?rt:r==="memory"?IT:r==="cookie"?nn:n.O()?n:nn}Pt(t){var n=t??this.N.feature_flag_cache_ttl_ms;if(!n||n<=0)return!1;var r=this.props[ao];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Ae(this.props,(n,r)=>{if(r===Cr&&Xe(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,(Gt(o=kT)?l:nf&&o.indexOf===nf?o.indexOf(a)!=-1:(Ae(o,function(c){if(l||(l=c===a))return so}),l))||(t[r]=n);var o,a,l}),t}load(){if(!this.zt){var t=this.B.D(this.Nt);t&&(this.props=je({},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(Xe(t)){V(n)&&(n="None"),this.Ht=V(r)?this.Wt:r;var s=!1;if(Ae(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(Xe(t)){this.Ht=V(n)?this.Wt:n;var r=!1;if(Ae(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=dg(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);Ar(uc(t))||this.register(t),this.Lt=!0}}update_search_keyword(){var t;this.register((t=B==null?void 0:B.referrer)?pg(t):{})}update_referrer_info(){var t;this.register_once({$referrer:gg(),$referring_domain:B!=null&&B.referrer&&((t=fo(B.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[vl]||this.props[ml]||this.register_once({[lo]:_g(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Ae([ml,vl],o=>{var a=this.props[o];a&&Ae(a,function(l,c){t["$initial_"+rl(c)]=l})});var n,r,s=this.props[lo];if(s){var i=(n=vg(s),r={},Ae(n,function(o,a){r["$initial_"+rl(a)]=o}),r);je(t,i)}return t}safe_merge(t){return Ae(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(),c=[...a].sort();return l.every((u,f)=>u===c[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[ys]||{};r[t]=n,this.props[ys]=r,this.save()}remove_event_timer(t){var n=(this.props[ys]||{})[t];return V(n)||(delete this.props[ys][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}}var ds=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 ya=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 Ss=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),ba=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}({}),El=function(e){return e.Popover="popover",e.Inline="inline",e}({}),ke=Fe("[Surveys]"),yg="seenSurvey_",fO=(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},Ff=e=>((t,n)=>{var r=""+t+n.id;return n.current_iteration&&n.current_iteration>0&&(r=""+t+n.id+"_"+n.current_iteration),r})(yg,e),dO=[ya.Popover,ya.Widget,ya.API],hO={ignoreConditions:!1,ignoreDelay:!1,displayType:El.Popover};class hc{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 br(e,t,n){if(de(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 pO{constructor(t){this.Vt=new hc,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(!V((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(!V((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(c=>{var u;(u=this.Zt)==null||u.add((c==null?void 0:c.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"||!br(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=>br(a.href,n.href,n.href_matching||"exact"));var i,o=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!o&&br((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(c=>br(c.text,n.text,n.text_matching||"exact")||br(c.$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(c){for(var u,f=[],d=/(?::|")text="(.*?)"/g;!de(u=d.exec(c));)f.includes(u[1])||f.push(u[1]);return f}(l),o=n.text,a=n.text_matching||"exact",i.some(c=>br(c,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||fg(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 gO{constructor(t){this._instance=t,this.ai=new Map,this.li=new Map,this.ui=new Map}hi(t,n){return!!t&&fg(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===ds.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(c=>c.name===t);return this.hi(l,n)})}register(t){var n;V((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 pO(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(c=>{if(c&&c.name){var u=this.ui.get(c.name);u&&u.push(r.id),this.ui.set(c.name,u||[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,ds.Activation),this.li=this.di(t,ds.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,c;s.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:a});var u=(n==null||(l=n.properties)==null?void 0:l.$survey_id)||(n==null||(c=n.properties)==null?void 0:c.$product_tour_id);if(u){var f=a.indexOf(u);f>=0&&(a.splice(f,1),this.wi(a))}}else{if(this.li.has(t)){var d=this.vi(t,n,ds.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,ds.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 _O extends gO{constructor(t){super(t)}bi(){return"$surveys_activated"}yi(){return Ss.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 vO{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(de(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(yg)||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(!V(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 _O(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(hl);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 c={isLoaded:!1,error:l};return t([],c),void(r==null||r({surveys:[],context:c}))}var u,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&&((u=this._surveyEventReceiver)==null||u.register(d)),(o=this._instance.persistence)==null||o.register({[hl]: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),!de(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(de(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(de(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 de(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(de(this._surveyManager))ke.warn("init was not called");else{var i=typeof t=="string"?this.Fi(t):t;if(i!=null&&i.id)if(dO.includes(i.type)){var o=B==null?void 0:B.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(de(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=j({},s,{appearance:j({},s.appearance,{surveyPopupDelaySeconds:0})})),n.displayType!==El.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!==El.Inline?this._surveyManager.handlePopoverSurvey(i,n):this.renderSurvey(i,n.selector,n.properties)}else ke.warn("Survey not found")}}cancelPendingSurvey(t){de(this._surveyManager)?ke.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}var $t=Fe("[Conversations]");class mO{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;de(n)||(Tn(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||Yp(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Q==null?void 0:Q.__PosthogExtensions__;if(t&&!V(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 $t.error("Conversations enabled but missing token in remote config.")}}ji(t){if(this.Di)try{this._conversationsManager=t(this.Di,this._instance),$t.info("Conversations loaded successfully")}catch(n){this.Li("Error completing conversations initialization",n)}else $t.error("Cannot complete initialization: remote config is null")}Li(t,n){$t.error(t,n),this._conversationsManager=null,this.Ai=!1}show(){this._conversationsManager?this._conversationsManager.show():$t.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Mi===!0&&!Gt(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 dn(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(t,n,r):($t.warn("Conversations not available yet."),null)})()}getMessages(t,n){var r=this;return dn(function*(){return r._conversationsManager?r._conversationsManager.getMessages(t,n):($t.warn("Conversations not available yet."),null)})()}markAsRead(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.markAsRead(t):($t.warn("Conversations not available yet."),null)})()}getTickets(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.getTickets(t):($t.warn("Conversations not available yet."),null)})()}requestRestoreLink(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.requestRestoreLink(t):($t.warn("Conversations not available yet."),null)})()}restoreFromToken(t){var n=this;return dn(function*(){return n._conversationsManager?n._conversationsManager.restoreFromToken(t):($t.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var t=this;return dn(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():($t.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 yO=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}({}),Lf=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 bO{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;!de(r)&&r&&(this.Ni=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ni&&!this.Ui){var t=Fe("[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 zf=Fe("[RateLimiter]");class wO{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=>{zf.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void zf.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(_l))!==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 c=l.tokens<1;return c||t||(l.tokens=Math.max(0,l.tokens-1)),!c||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=c,(s=this.instance.persistence)==null||s.set_property(_l,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var hs=Fe("[RemoteConfig]");class bg{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 hs.info("Using preloaded remote config",this.remoteConfig),this.Bi(this.remoteConfig),void this.qi();if(this._instance.At())return void hs.warn("Remote config is disabled. Falling back to local config.");this.zi(t=>{if(!t)return hs.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){hs.error("Error loading remote config",t)}}stop(){this.Wi&&(clearInterval(this.Wi),this.Wi=void 0)}refresh(){this._instance.At()||(B==null?void 0:B.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||hs.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 Sl=3e3;class EO{constructor(t,n){this.Gi=!0,this.Vi=[],this.Ji=rn((n==null?void 0:n.flush_interval_ms)||Sl,250,5e3,Z.createLogger("flush interval"),Sl),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(j({},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)&&Ae(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 Ae(this.Vi,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;V(t[i])&&(t[i]=j({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.Vi=[],t}}var SO=["retriesPerformedSoFar"];class kO{constructor(t){this.te=!1,this.ie=3e3,this.Vi=[],this._instance=t,this.Vi=[],this.ee=!0,!V(k)&&"onLine"in k.navigator&&(this.ee=k.navigator.onLine,this.re=()=>{this.ee=!0,this.se()},this.ne=()=>{this.ee=!1},He(k,"online",this.re),He(k,"offline",this.ne))}get length(){return this.Vi.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=xp(t,SO);Tr(n)&&(r.url=_o(r.url,{retry_count:n})),this._instance._send_request(j({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?this.oe(j({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,c=Math.min(18e5,a),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)}(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)"),Z.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,V(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(j({},t,{transport:"sendBeacon"}))}catch(n){Z.error(n)}this.Vi=[]}}class TO{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,c=a+((o==null?void 0:o.clientHeight)||0),u=(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=c,this.he.maxContentY=Math.max(c,(s=this.he.maxContentY)!==null&&s!==void 0?s:0),this.he.maxContentHeight=Math.max(u,(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(){He(k,"scroll",this.ue,{capture:!0}),He(k,"scrollend",this.ue,{capture:!0}),He(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 OO=e=>_g(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class Uf{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({[gl]:a})}},this._instance=t,this.pe=n,this.fe=r,this.ce=s||OO,this.pe.onSessionId(this.de)}ve(){return this.fe.props[gl]}getSetOnceProps(){var t,n=(t=this.ve())==null?void 0:t.props;return n?"r"in n?vg(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 Ae(uc(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+rl(r)]=n}),t}}var wa=Fe("[SessionId]");class jf{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 hc,this.be=(u,f)=>!(!Tr(u)||!Tr(f))&&Math.abs(u-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||Vn,this.$e=r||Vn;var i=this.N.persistence_name||this.N.token,o=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*rn(o,60,36e3,wa.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=rt.D(this.Se),l=rt.D(this.ke);a&&!l?this.ye=a:rt.L(this.Se),rt.j(this.ke,!0)}if((s=this.N.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var f=u.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(),c)}catch(u){wa.error("Invalid sessionID in bootstrap",u)}this.Ce()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return V(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&&rt.O()}Ie(t){t!==this.ye&&(this.ye=t,this.Pe()&&rt.j(this.Se,t))}Re(){return this.ye?this.ye:this.Pe()?rt.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({[io]:[n,t,r]}))}Fe(){var t=this.fe.props[io];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()&&rt.L(this.ke)},He(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=Tr(o)&&Math.abs(r-o)>864e5,c=!1,u=!i,f=!u&&!t&&this.be(r,s);u||f||l?(i=this.xe(),a=this.$e(),wa.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:u,activityTimeout:f,sessionPastMaximumLength:l}}),o=r,c=!0):a||(a=this.$e(),c=!0);var d=Tr(s)&&t&&!l?s:r,h=Tr(o)?o:new Date().getTime();return this.Ie(a),this.Te(i,d,h),t||this.Ee(),c&&this.ge.forEach(p=>p(i,a,c?{noSessionId:u,activityTimeout:f,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:c?{noSessionId:u,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 wg=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&of(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>of(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},ks=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),Bf="i.posthog.com";class xO{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("."+Bf,".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]=ks.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Me[this.apiHost]=ks.EU:this.Me[this.apiHost]=ks.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===ks.CUSTOM)return this.apiHost+n;var r=Bf+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var AO={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&&vo(t.href,e),not_regex:(e,t)=>!!k&&!vo(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class ct{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{ct.Ae("retrieved web experiments from the server"),n.De=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;n.De&&(ct.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);Ge(a)&&i.variants[a]&&n.je(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];ct.Le(c)&&n.je(i.name,l,c.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(t){if(this._is_bot())ct.Ae("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(de(this.De))return this.De=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ct.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=ct.getWindowLocation();if(t!=null&&t.search){var n=ho(t==null?void 0:t.search,"__experiment_id"),r=ho(t==null?void 0:t.search,"__experiment_variant");n&&r&&(ct.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&&(ct.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!de(t.conditions)&&ct.Ue(t)&&ct.ze(t)}static Ue(t){var n;if(de(t.conditions)||de((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,o=ct.getWindowLocation();return!!o&&((r=t.conditions)==null||!r.url||AO[(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(de(t.conditions)||de((n=t.conditions)==null?void 0:n.utm))return!0;var r=dg();if(r.utm_source){var s,i,o,a,l,c,u,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||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==r.utm_medium,g=(u=t.conditions)==null||(u=u.utm)==null||!u.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];Z.info("[WebExperiments] "+t,r)}je(t,n,r){this._is_bot()?ct.Ae("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(s=>{if(s.selector){var i;ct.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)})}}):ct.Ae("Control variants leave the page unmodified.")}_is_bot(){return Ct&&this._instance?wg(Ct,this._instance.config.custom_blocked_useragents):void 0}}var CO=Fe("[PostHog ExternalIntegrations]"),RO={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class IO{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 CO.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,c;!s||(a=Q.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.V(RO[o],()=>{var u;(u=Q.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(t._instance)}),!s&&(l=Q.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=Q.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var Ls={},Ea=0,kl=()=>{},Or="posthog",Eg=!qT&&(St==null?void 0:St.indexOf("MSIE"))===-1&&(St==null?void 0:St.indexOf("Mozilla"))===-1,Vf=e=>{var t;return j({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ST(B==null?void 0:B.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:kl,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:st&&Ge(st==null?void 0:st.search)&&st.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;Z.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:Sl},error_tracking:{},_onCapture:kl,__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))},Zf=e=>{var t={};V(e.process_person)||(t.person_profiles=e.process_person),V(e.xhr_headers)||(t.request_headers=e.xhr_headers),V(e.cookie_name)||(t.persistence_name=e.cookie_name),V(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),V(e.store_google)||(t.save_campaign_params=e.store_google),V(e.verbose)||(t.debug=e.verbose);var n=je({},t,e);return ve(e.property_blacklist)&&(V(e.property_denylist)?n.property_denylist=e.property_blacklist:ve(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:Z.error("Invalid value for property_denylist config: "+e.property_denylist)),n};class PO{constructor(){this.__forceAllowLocalhost=!1}get He(){return this.__forceAllowLocalhost}set He(t){Z.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class En{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 PO,this.Be=!1,this.version=fn.LIB_VERSION,this.Ft=new hc,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Vf(),this.SentryIntegration=MT,this.sentryIntegration=t=>function(n,r){var s=sg(n,r);return{name:rg,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 cO(this),this.toolbar=new zT(this),this.scrollManager=new TO(this),this.pageViewManager=new Of(this),this.surveys=new vO(this),this.conversations=new mO(this),this.logs=new bO(this),this.experiments=new ct(this),this.exceptions=new KT(this),this.rateLimiter=new wO(this),this.requestRouter=new xO(this),this.consent=new PT(this),this.externalIntegrations=new IO(this),this.people={set:(t,n,r)=>{var s=Ge(t)?{[t]:n}:t;this.setPersonProperties(s),r==null||r({})},set_once:(t,n,r)=>{var s=Ge(t)?{[t]:n}:t;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",t=>Z.info('send "'+(t==null?void 0:t.event)+'"',t))}init(t,n,r){if(r&&r!==Or){var s,i=(s=Ls[r])!==null&&s!==void 0?s:new En;return i._init(t,n,r),Ls[r]=i,Ls[Or][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s;if(n===void 0&&(n={}),V(t)||sl(t))return Z.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(je({},Vf(n.defaults),Zf(n),{name:r,token:t})),this.config.on_xhr_error&&Z.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:yn.GZipJS;var i=this.Xe();this.persistence=new ma(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new ma(j({},this.config,{persistence:"sessionStorage"}),i);var o=j({},this.persistence.props),a=j({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Qe=new EO(b=>this.Ze(b),this.config.request_queue_config),this.tr=new kO(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 jf(this),this.sessionPropsManager=new Uf(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Z.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.ir(l)},0)):(Z.info("Initializing extensions synchronously"),this.ir(l)),fn.DEBUG=fn.DEBUG||this.config.debug,fn.DEBUG&&Z.info("Starting in debug mode",{this:this,config:n,thisC:j({},this.config),p:o,s:a}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,u,f=this.config.get_device_id(Vn()),d=(c=n.bootstrap)!=null&&c.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(en,(u=n.bootstrap)!=null&&u.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:os,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(Vn());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(en,"anonymous")}return He(k,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?DT(this,()=>this.rr()):this.rr(),bn(this.config._onCapture)&&this.config._onCapture!==kl&&(Z.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&Z.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=j({},En.__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,$T),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){Z.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&&Z.info("PostHog extensions initialized ("+s+"ms)")}Bi(t){var n,r,s,i,o,a,l,c,u;if(!B||!B.body)return Z.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=ue(t.supportedCompression,yn.GZipJS)?yn.GZipJS:ue(t.supportedCompression,yn.Base64)?yn.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),(c=this.exceptionObserver)==null||c.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(t)}rr(){try{this.config.loaded(this)}catch(r){Z.critical("`loaded` function failed",r)}if(this.ar(),this.config.internal_or_test_user_hostname&&st!=null&&st.hostname){var t=st.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 bg(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()&&Hn(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&&(Eg?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=_o(t.url,{ip:this.config.ip?1:0}),t.headers=j({},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=j({},n);o.timeout=o.timeout||6e4,o.url=_o(o.url,{_:new Date().getTime().toString(),ver:fn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=Li.filter(u=>!o.disableTransport||!u.transport||!o.disableTransport.includes(u.transport)),c=(s=(i=Jp(l,u=>u.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!c)throw new Error("No available transport method");c(o)})(j({},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){Ea++;try{var n,r=[],s=[],i=[];Hn(t,a=>{a&&(n=a[0],ve(n)?i.push(a):bn(a)?a.call(this):ve(a)&&n==="alias"?r.push(a):ve(a)&&n.indexOf("capture")!==-1&&bn(this[n])?i.push(a):s.push(a))});var o=function(a,l){Hn(a,function(c){if(ve(c[0])){var u=l;Ae(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},l)};o(r,this),o(s,this),o(i,this)}finally{Ea--}}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(Ea>0&&ve(t)&&Ge(t[0])){var n=En.prototype[t[0]];bn(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(!V(t)&&Ge(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&&!Ge(n==null?void 0:n.$current_url)&&(Z.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||Z.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,c=Vn(),u={uuid:c,event:t,properties:this.calculateEventProperties(t,n||{},l,c)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),o&&(u.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),r!=null&&r.$set&&(u.$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&&(u.$set_once=h),(u=wT(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,V(r==null?void 0:r.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),t===Ss.DISMISSED||t===Ss.SENT){var p=n==null?void 0:n[ba.SURVEY_ID],g=n==null?void 0:n[ba.SURVEY_ITERATION];f={id:p,current_iteration:g},localStorage.getItem(Ff(f))||localStorage.setItem(Ff(f),"true"),u.$set=j({},u.$set,{[fO({id:p,current_iteration:g},t===Ss.SENT?"responded":"dismissed")]:!0})}else t===Ss.SHOWN&&(u.$set=j({},u.$set,{[ba.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===yO.SHOWN){var y=n==null?void 0:n[Lf.TOUR_TYPE];y&&(u.$set=j({},u.$set,{[Lf.TOUR_LAST_SEEN_DATE+"/"+y]:new Date().toISOString()}))}var T=j({},u.properties.$set,u.$set);if(Ar(T)||this.setPersonPropertiesForFlags(T),!de(this.config.before_send)){var b=this.vr(u);if(!b)return;u=b}this.Ft.emit("eventCaptured",u);var S={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,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),u}Z.critical("This capture call is ignored due to client rate limiting.")}}else Z.error("No event name provided to posthog.capture")}else Z.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=j({},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=j({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!Ge(a.distinct_id)&&!Cn(a.distinct_id)||sl(a.distinct_id))&&Z.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=QT(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&&je(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&je(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===ks.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),c=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=je(a,c),t==="$pageview"&&B&&(a.title=B.title),!V(o)){var p=r.getTime()-o;a.$duration=parseFloat((p/1e3).toFixed(3))}St&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=je({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ve(this.config.property_denylist)?Ae(this.config.property_denylist,function(T){delete a[T]}):Z.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&&(Z.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=je({},s,i||{},t||{}),a=this.config.sanitize_properties;return a&&(Z.error("sanitize_properties is deprecated. Use before_send instead"),o=a(o,"$set_once")),n&&(this.Be=!0),Ar(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=j({},s,t),a=j({},i,n),l={};for(var[c,u]of Object.entries(o)){var f=typeof u=="string";l[c]={key:c,enabled:!!f||!!u,variant:f?u:void 0,reason:void 0,metadata:V(a==null?void 0:a[c])?void 0:{id:0,version:void 0,description:void 0,payload:a[c]}}}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=hO),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 Z.uninitializedWarning("posthog.identify");if(Cn(t)&&(t=t.toString(),Z.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()))Z.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!==os){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(ms)&&(this.unregister(ms),this.register({distinct_id:t}));var o=(this.persistence.get_property(en)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(en,"identified"),this.setPersonPropertiesForFlags(j({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.Ve=Pf(t,n,r),this.featureFlags.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(oo))}}else Z.critical('The string "'+os+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Z.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.pr("posthog.setPersonProperties")){var r=Pf(this.get_distinct_id(),t,n);this.Ve!==r?(this.setPersonPropertiesForFlags(j({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ve=r):Z.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:j({},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 Z.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(Z.info("reset"),!this.__loaded)return Z.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(en,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Ve=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:os,$device_id:null},"");else{var l=this.config.get_device_id(Vn());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(Xp)?(Z.critical("Attempting to create alias for existing People user - aborting."),-2):this.pr("posthog.alias")?(V(n)&&(n=this.get_distinct_id()),t!==n?(this._r(ms,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(Z.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=j({},this.config);if(Xe(t)){var r,s,i,o,a,l,c,u;je(this.config,Zf(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 ma(j({},this.config,{persistence:"sessionStorage"}),f);var d=this.Je(this.config.debug);Tn(d)&&(this.config.debug=d),Tn(this.config.debug)&&(this.config.debug?(fn.DEBUG=!0,$e.O()&&$e.j("ph_debug","true"),Z.info("set_config",{config:t,oldConfig:n,newConfig:j({},this.config)})):(fn.DEBUG=!1,$e.O()&&$e.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(),(c=this.deadClicksAutocapture)==null||c.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.gr(),(u=this.externalIntegrations)==null||u.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(j({},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:Or;return n!==Or&&(n=Or+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(en))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(en))==="identified"}cr(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Ar(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ms])&&((n=this.persistence)==null||(n=n.props)==null||!n[co]))}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"?(Z.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._r(co,!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 jf(this),this.pageViewManager=new Of(this),this.persistence&&(this.sessionPropsManager=new Uf(this,this.sessionManager,this.persistence));var l=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=En.__defaultExtensionClasses)==null?void 0:a.sessionRecording;l&&(this.sessionRecording=new l(this),this.sessionRecording.startIfEnabledOrStop())}var c;this.consent.optInOut(!0),this.gr(),this.ar(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(V(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((c=t==null?void 0:t.captureEventName)!==null&&c!==void 0?c:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.lr()}else Z.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:os,$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())):Z.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===hn.GRANTED?"granted":t===hn.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 Ct?wg(Ct,this.config.custom_blocked_useragents):void 0}lr(){B&&(B.visibilityState==="visible"?this.qe||(this.qe=!0,this.capture("$pageview",{title:B.title},{send_instantly:!0}),this.We&&(B.removeEventListener("visibilitychange",this.We),this.We=null)):this.We||(this.We=this.lr.bind(this),He(B,"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?(Z.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=Z,o=(n="advanced_disable_flags")in(t=l)&&!de(t[n]),a=r in t&&!de(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(de(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),de(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return Lk(t.event)?Z.warn(i+". This can cause unexpected behavior."):Z.info(i),null}r.properties&&!Ar(r.properties)||Z.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=Tn(t)&&!t,r=$e.O()&&$e.A("ph_debug")==="true";return!n&&(!!r||t)}}En.__defaultExtensionClasses={},function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=bT(e.prototype[t[n]])}(En,["identify"]);function Hf(e){return e instanceof Element&&(e.id===tg||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Vo(e){return!!e&&e.nodeType===1}function Gn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Sg(e){return!!e&&e.nodeType===3}function kg(e){return!!e&&e.nodeType===11}function pc(e){return e?jo(e).split(/\s+/):[]}function Gf(e){var t=k==null?void 0:k.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function mo(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 Tg(e){return de(e)?null:jo(e).split(/(\s+)/).filter(t=>ti(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function ui(e){var t="";return Tl(e)&&!Cg(e)&&e.childNodes&&e.childNodes.length&&Ae(e.childNodes,function(n){var r;Sg(n)&&n.textContent&&(t+=(r=Tg(n.textContent))!==null&&r!==void 0?r:"")}),jo(t)}function Wf(e){return V(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var gc=["a","button","form","input","select","textarea","label"];function Og(e,t){if(V(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 xg(e){var t=e.parentNode;return!(!t||!Vo(t))&&t}var NO=["next","previous","prev",">","<"],qf=10,Kf=[".ph-no-rageclick",".ph-no-capture"];function $O(e,t){if(!k||_c(e))return!1;var n,r,s;if(Tn(t)?(n=!!t&&Kf,r=void 0):(n=(s=t==null?void 0:t.css_selector_ignorelist)!==null&&s!==void 0?s:Kf,r=t==null?void 0:t.content_ignorelist),n===!1)return!1;var{targetElementList:i}=Ag(e,!1);return!function(o,a){if(o===!1||V(o))return!1;var l;if(o===!0)l=NO;else{if(!ve(o))return!1;if(o.length>qf)return Z.error("[PostHog] content_ignorelist array cannot exceed "+qf+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map(c=>c.toLowerCase())}return a.some(c=>{var{safeText:u,ariaLabel:f}=c;return l.some(d=>u.includes(d)||f.includes(d))})}(r,i.map(o=>{var a;return{safeText:ui(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}}))&&!Og(i,n)}var _c=e=>!e||Gn(e,"html")||!Vo(e),Ag=(e,t)=>{if(!k||_c(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],s=e;s.parentNode&&!Gn(s,"body");)if(kg(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=xg(s);if(!i)break;if(t||gc.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 DO(e,t,n,r,s){var i,o,a,l;if(n===void 0&&(n=void 0),!k||_c(e)||(i=n)!=null&&i.url_allowlist&&!Gf(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&Gf(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var c=n.dom_event_allowlist;if(c&&!c.some(p=>t.type===p))return!1}var{parentIsUsefulElement:u,targetElementList:f}=Ag(e,r);if(!function(p,g){var y=g==null?void 0:g.element_allowlist;if(V(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)||!Og(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 u?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(gc.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function Tl(e){for(var t=e;t.parentNode&&!Gn(t,"body");t=t.parentNode){var n=mo(t);if(ue(n,"ph-sensitive")||ue(n,"ph-no-capture"))return!1}if(ue(mo(e),"ph-include"))return!0;var r=e.type||"";if(Ge(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(Ge(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 Cg(e){return!!(Gn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Gn(e,"select")||Gn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var Rg="(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})",MO=new RegExp("^(?:"+Rg+")$"),FO=new RegExp(Rg),Ig="\\d{3}-?\\d{2}-?\\d{4}",LO=new RegExp("^("+Ig+")$"),zO=new RegExp("("+Ig+")");function ti(e,t){return t===void 0&&(t=!0),!(de(e)||Ge(e)&&(e=jo(e),(t?MO:FO).test((e||"").replace(/[- ]/g,""))||(t?LO:zO).test(e)))}function Pg(e){var t=ui(e);return ti(t=(t+" "+Ng(e)).trim())?t:""}function Ng(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ae(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=ui(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+Ng(n)).trim())}catch(i){Z.error("[AutoCapture]",i)}}),t}function UO(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=j({},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),c={};return Fi(l).sort((u,f)=>{var[d]=u,[h]=f;return d.localeCompare(h)}).forEach(u=>{var[f,d]=u;return c[Jf(f.toString())]=Jf(d.toString())}),o+=":",o+=Fi(c).map(u=>{var[f,d]=u;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:jO(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return Fi(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 Jf(e){return e.replace(/"|\\"/g,'\\"')}function jO(e){var t=e.attr__class;return t?ve(t)?t:pc(t):void 0}class Yf{constructor(t){this.disabled=t===!1;var n=Xe(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 Sa="$copy_autocapture",Xf=Fe("[AutoCapture]");function ka(e,t){return t.length>e?t.slice(0,e)+"...":t}function BO(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Vo(t));return t}function VO(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};gc.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=ka(1024,Pg(e)):i.$el_text=ka(1024,ui(e)));var o=mo(e);o.length>0&&(i.classes=o.filter(function(u){return u!==""})),Ae(e.attributes,function(u){var f;if((!Cg(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(r==null||!r.includes(u.name))&&!t&&ti(u.value)&&(f=u.name,!Ge(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")){var d=u.value;u.name==="class"&&(d=pc(d).join(" ")),i["attr__"+u.name]=ka(1024,d)}});for(var a=1,l=1,c=e;c=BO(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function ZO(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!Gn(u,"body");)kg(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var f,d=[],h={},p=!1,g=!1;if(Ae(c,E=>{var m=Tl(E);E.tagName.toLowerCase()==="a"&&(p=E.getAttribute("href"),p=m&&p&&ti(p)&&p),ue(mo(E),"ph-no-capture")&&(g=!0),d.push(VO(E,i,o,a));var $=function(F){if(!Tl(F))return{};var C={};return Ae(F.attributes,function(R){if(R.name&&R.name.indexOf("data-ph-capture-attribute")===0){var L=R.name.replace("data-ph-capture-attribute-",""),Y=R.value;L&&Y&&ti(Y)&&(C[L]=Y)}}),C}(E);je(h,$)}),g)return{props:{},explicitNoCapture:g};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?d[0].$el_text=Pg(e):d[0].$el_text=ui(e)),p){var y,T;d[0].attr__href=p;var b=(y=fo(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:je({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:UO(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 ps=Fe("[ExceptionAutocapture]");function Qf(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return bn(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var HO=Fe("[TracingHeaders]"),Nn=Fe("[Web Vitals]"),ed=9e5;Fe("[SessionRecording]");var Ol="[SessionRecording]",wr=Fe(Ol),GO=Fe("[Heatmaps]");function td(e){return Xe(e)&&"clientX"in e&&"clientY"in e&&Cn(e.clientX)&&Cn(e.clientY)}var nd=Fe("[Product Tours]"),Ta="ph_product_tours",WO=["$set_once","$set"],$n=Fe("[SiteApps]"),qO={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 wr.error("started without valid sessionManager"),new Error(Ol+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Ol+' cannot be used with cookieless_mode="always"')}get yr(){var e,t=!((e=this._instance.get_property(ki))==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=!V(Object.assign)&&!V(Array.from);this.yr&&n?(this.Er(e),wr.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 wr.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(eg)}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=de(o)?null:parseFloat(o);de(a)&&this.Pr();var l=i==null?void 0:i.minimumDurationMilliseconds;r.register({[ki]:j({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:j({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:V(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:wr.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):wr.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(ki);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Cr(){var e,t=this._instance.get_property(ki);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,wr.info("persisted remote config is stale, requesting fresh config before starting"),new bg(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))}}},KO={autocapture:class{constructor(e){this.Ir=!1,this.Rr=null,this.Fr=!1,this.instance=e,this.rageclicks=new Yf(e.config.rageclick),this.Or=null}get N(){var e,t,n=Xe(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&&B){var e=n=>{n=n||(k==null?void 0:k.event);try{this.Ar(n)}catch(r){Xf.error("Failed to capture event",r)}};if(He(B,"submit",e,{capture:!0}),He(B,"change",e,{capture:!0}),He(B,"click",e,{capture:!0}),this.N.capture_copied_text){var t=n=>{n=n||(k==null?void 0:k.event),this.Ar(n,Sa)};He(B,"copy",t,{capture:!0}),He(B,"cut",t,{capture:!0})}}}else Xf.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({[gf]:!!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=B==null?void 0:B.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[gf],r=this.Rr;if(Gt(r)&&!Tn(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=Wf(e);Sg(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())&&$O(r,this.instance.config.rageclick)&&this.Ar(e,"$rageclick");var s=t===Sa;if(r&&DO(r,e,this.N,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=ZO(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===Sa){var l,c=Tg(k==null||(l=k.getSelection())==null?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;i.$selected_content=c,i.$copy_type=u}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return bn(B==null?void 0:B.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&&(Z.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.jr&&this.jr(),this.jr=void 0,Z.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(k&&k.history){var n=this;(e=k.history.pushState)!=null&&e.__posthog_wrapped__||Qf(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__||Qf(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){Z.error("Error capturing "+e+" pageview",r)}}Nr(){if(!this.jr){var e=()=>{this.Lr("popstate")};He(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[ul]),this.rageclicks=new Yf(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return Xe(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 de(this.instance.config.capture_heatmaps)?de(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;GO.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({[ul]: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"}(B)?setInterval(this.se.bind(this),this.flushIntervalMilliseconds):null}Hr(){k&&B&&(this.Vr=this.se.bind(this),He(k,"beforeunload",this.Vr),this.Jr=e=>this.Gr(e||(k==null?void 0:k.event)),He(B,"click",this.Jr,{capture:!0}),this.Kr=e=>this.Yr(e||(k==null?void 0:k.event)),He(B,"mousemove",this.Kr,{capture:!0}),this.Xr=new Sf(this.instance,NT,this.Wr.bind(this)),this.Xr.startIfEnabledOrStop(),this.Qr=this.Br.bind(this),He(B,"visibilitychange",this.Qr),this.Ir=!0)}qr(){var e;k&&B&&(this.Vr&&k.removeEventListener("beforeunload",this.Vr),this.Jr&&B.removeEventListener("click",this.Jr,{capture:!0}),this.Kr&&B.removeEventListener("mousemove",this.Kr,{capture:!0}),this.Qr&&B.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 c=o;c&&Vo(c)&&!Gn(c,"body");){if(c===l)return!1;if(ue(a,k==null?void 0:k.getComputedStyle(c).position))return!0;c=xg(c)}return!1}(Wf(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"),!Hf(e.target)&&td(e)){var r=this.ts(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.es(j({},r,{type:"rageclick"})),this.es(r)}}Yr(e){!Hf(e.target)&&td(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?Wr([],Kr,r||[]):[],i=Qs(t,s,ei);this.R=this.R||{},this.R[i]||(this.R[i]=[]),this.R[i].push(e)}}se(){this.R&&!Ar(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Sf,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)=>j({},n,{["$web_vitals_"+r.name+"_event"]:j({},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(V(s))Nn.error("Could not read session ID. Dropping metrics!");else{this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.os();V(i)||(de(n==null?void 0:n.name)||de(n==null?void 0:n.value)?Nn.error("Invalid metric received",n):this.ls&&n.value>=this.ls?Nn.error("Ignoring metric with value >= "+this.ls,n):(this.R.url!==i&&(this.rs(),this.ss=setTimeout(this.rs,this.flushToCaptureTimeoutMs)),V(this.R.url)&&(this.R.url=i),this.R.firstMetricTimestamp=V(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.R.metrics.push(j({},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__;V(o)||V(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):Nn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Ur=!((t=this._instance.persistence)==null||!t.props[mf]),this.startIfEnabled()}get allowedMetrics(){var e,t,n=Xe(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return de(n)?((t=this._instance.persistence)==null?void 0:t.props[bf])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return e!=null&&e}get ls(){var e=Xe(this._instance.config.capture_performance)&&Cn(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:ed;return 0<e&&e<=6e4?ed:e}get isEnabled(){var e=st==null?void 0:st.protocol;if(e!=="http:"&&e!=="https:")return Nn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Xe(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Tn(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Tn(t)?t:this.Ur}startIfEnabled(){this.isEnabled&&!this.Ir&&(Nn.info("enabled, starting..."),this.V(this.us))}onRemoteConfig(e){if("capturePerformance"in e){var t=Xe(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=Xe(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[mf]:t}),this._instance.persistence.register({[bf]: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?Nn.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?Wr([],Kr,n||[]):[];return Qs(e,r,ei)}Nn.error("Could not determine current URL")}}},JO={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){ps.error("failed to start",l),this.cs()}}},this._instance=e,this.fs=!((t=this._instance.persistence)==null||!t.props[_f]),this.ps=new jk({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:ps}),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 Xe(e)?t=j({},t,e):(V(e)?this.fs:e)&&(t=j({},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?(ps.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 ps.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({[_f]: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)?ps.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}},YO={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({[yf]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.gs||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(yf)||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?nd.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[Ta];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 nd.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({[Ta]:a}),e(a,{isLoaded:!0})}})}else e(this.bs,{isLoaded:!0})}getActiveProductTours(e){de(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(Ta)}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)}}},XO={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={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[f,d]of Object.entries(u))l[f]={id:c[f],type:f,properties:d};var{$set_once:h,$set:p}=e;return{event:j({},xp(e,WO),{properties:j({},e.properties,p?{$set:j({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},p)}:{},h?{$set_once:j({},(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&&($n.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,$n.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){$n.error("Error while initializing PostHog app with config id "+e.id,o),s(!1)}if(r&&t.loaded)try{n()}catch(o){$n.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){$n.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 $n.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 c;Q["__$$ph_site_app_"+l]=s._instance,(c=Q.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,a,u=>{if(u)return $n.error("Error while initializing PostHog app with config id "+l,u)})};for(var{id:o,url:a}of e.siteApps)i(o)}else $n.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},QO=j({},qO,KO,JO,YO,XO,{tracingHeaders:class{constructor(e){this.ks=void 0,this.Ps=void 0,this.us=()=>{var t,n;V(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)),V(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 HO.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)}}});En.__defaultExtensionClasses=j({},QO);var rd;rd=Ls[Or]=new En,function(){function e(){e.done||(e.done=!0,Eg=!1,Ae(Ls,function(t){t._dom_loaded()}))}B!=null&&B.addEventListener?B.readyState==="complete"?e():He(B,"DOMContentLoaded",e,{capture:!1}):k&&Z.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}();function sd(e={}){const{disableAnalytics:t=!1}=e;{console.log("PostHog: No API key configured, analytics disabled");return}}async function ex(){try{const t=await fetch("/api/settings/general"),{disableAnalytics:n}=await t.json();sd({disableAnalytics:n})}catch{console.log("PostHog: Failed to fetch general settings, using defaults"),sd()}const e=Em(SS);e.use(Tm()),e.use(Nk),e.mount("#app")}ex();export{tx as $,dx as A,ci as B,fx as C,ux as D,ur as E,dt as F,Io as G,dm as H,xo as I,ym as J,De as K,Im as L,hx as M,Qd as N,sx as O,Ze as P,hS as Q,Sn as R,lx as S,Uv as T,cx as U,x_ as V,X as W,Ri as X,I_ as Y,ox as Z,li as _,Pe as a,Pt as a0,ax as a1,Tv as a2,ix as a3,Ul as a4,qn as a5,f_ as a6,rx as a7,Wl as a8,Hs as a9,Em as aa,W as b,Qe as c,Re as d,kv as e,Pc as f,px as g,vm as h,uE as i,nx as j,Bn as k,It as l,Nr as m,hm as n,Xr as o,fm as p,Vc as q,V_ as r,gx as s,Et as t,Dt as u,cu as v,Bs as w,Ce as x,ri as y,Yn as z};