@rubytech/create-realagent-code 0.1.29 → 0.1.31

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 (115) hide show
  1. package/dist/__tests__/init-logging.test.js +85 -0
  2. package/dist/index.js +21 -10
  3. package/dist/init-logging.js +28 -0
  4. package/package.json +1 -1
  5. package/payload/platform/lib/persistent-components/dist/index.d.ts +11 -12
  6. package/payload/platform/lib/persistent-components/dist/index.d.ts.map +1 -1
  7. package/payload/platform/lib/persistent-components/dist/index.js +11 -12
  8. package/payload/platform/lib/persistent-components/dist/index.js.map +1 -1
  9. package/payload/platform/lib/persistent-components/src/index.ts +11 -12
  10. package/payload/platform/neo4j/schema.cypher +6 -3
  11. package/payload/platform/plugins/admin/.claude-plugin/plugin.json +1 -1
  12. package/payload/platform/plugins/admin/PLUGIN.md +1 -3
  13. package/payload/platform/plugins/admin/hooks/onboarding-skill-drift.sh +57 -54
  14. package/payload/platform/plugins/admin/mcp/dist/index.js +15 -50
  15. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  16. package/payload/platform/plugins/admin/skills/access-manager/references/operations.md +7 -7
  17. package/payload/platform/plugins/admin/skills/file-presentation/SKILL.md +16 -33
  18. package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +1 -1
  19. package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +2 -2
  20. package/payload/platform/plugins/admin/skills/stream-log-review/references/analysis-patterns.md +2 -2
  21. package/payload/platform/plugins/anthropic/skills/get-api-key/SKILL.md +2 -4
  22. package/payload/platform/plugins/brochures/PLUGIN.md +1 -1
  23. package/payload/platform/plugins/buyers/PLUGIN.md +1 -2
  24. package/payload/platform/plugins/deep-research/skills/book-mirror/SKILL.md +1 -1
  25. package/payload/platform/plugins/deep-research/skills/strategic-reading/SKILL.md +1 -1
  26. package/payload/platform/plugins/docs/references/plugins-guide.md +2 -2
  27. package/payload/platform/plugins/email/references/email-reference.md +3 -7
  28. package/payload/platform/plugins/estate-business/PLUGIN.md +1 -2
  29. package/payload/platform/plugins/estate-coaching/PLUGIN.md +1 -2
  30. package/payload/platform/plugins/estate-onboarding/PLUGIN.md +1 -2
  31. package/payload/platform/plugins/estate-sales/PLUGIN.md +1 -2
  32. package/payload/platform/plugins/estate-teaching/PLUGIN.md +1 -2
  33. package/payload/platform/plugins/leads/PLUGIN.md +1 -2
  34. package/payload/platform/plugins/listings/PLUGIN.md +1 -2
  35. package/payload/platform/plugins/loop/PLUGIN.md +1 -1
  36. package/payload/platform/plugins/scheduling/PLUGIN.md +1 -1
  37. package/payload/platform/plugins/teaching/PLUGIN.md +2 -1
  38. package/payload/platform/plugins/vendors/PLUGIN.md +1 -2
  39. package/payload/platform/plugins/whatsapp/mcp/dist/index.js +1 -1
  40. package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
  41. package/payload/platform/plugins/whatsapp/skills/connect-whatsapp/SKILL.md +1 -1
  42. package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +2 -8
  43. package/payload/platform/plugins/writer-craft/PLUGIN.md +2 -1
  44. package/payload/platform/scripts/component-knowledgedoc-backfill.ts +1 -1
  45. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +1 -1
  46. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  47. package/payload/platform/services/claude-session-manager/dist/http-server.js +45 -31
  48. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  49. package/payload/platform/services/claude-session-manager/dist/index.js +11 -0
  50. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  51. package/payload/platform/services/claude-session-manager/dist/jsonl-observer.d.ts +30 -0
  52. package/payload/platform/services/claude-session-manager/dist/jsonl-observer.d.ts.map +1 -0
  53. package/payload/platform/services/claude-session-manager/dist/jsonl-observer.js +175 -0
  54. package/payload/platform/services/claude-session-manager/dist/jsonl-observer.js.map +1 -0
  55. package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts +4 -2
  56. package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts.map +1 -1
  57. package/payload/platform/services/claude-session-manager/dist/jsonl-path.js +15 -22
  58. package/payload/platform/services/claude-session-manager/dist/jsonl-path.js.map +1 -1
  59. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +13 -0
  60. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  61. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +26 -4
  62. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  63. package/payload/platform/services/claude-session-manager/dist/session-store.d.ts +9 -0
  64. package/payload/platform/services/claude-session-manager/dist/session-store.d.ts.map +1 -1
  65. package/payload/platform/services/claude-session-manager/dist/session-store.js.map +1 -1
  66. package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +10 -7
  67. package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
  68. package/payload/platform/services/claude-session-manager/dist/system-prompt.js +51 -28
  69. package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
  70. package/payload/platform/services/claude-session-manager/scripts/onboarding-advance.sh +61 -0
  71. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-0.md +5 -0
  72. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-1.md +3 -0
  73. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-2.md +3 -0
  74. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-3.md +8 -0
  75. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-4.md +9 -0
  76. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-5.md +3 -0
  77. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-6.md +5 -0
  78. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-7.md +5 -0
  79. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-8.md +5 -0
  80. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-9.md +8 -0
  81. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-complete.md +3 -0
  82. package/payload/platform/services/claude-session-manager/scripts/onboarding-prompts/step-unreachable.md +3 -0
  83. package/payload/platform/templates/agents/public/IDENTITY.md +1 -1
  84. package/payload/platform/templates/specialists/agents/content-producer.md +3 -3
  85. package/payload/platform/templates/specialists/agents/personal-assistant.md +2 -2
  86. package/payload/premium-plugins/real-agent/BUNDLE.md +5 -5
  87. package/payload/premium-plugins/real-agent/agents/compliance.md +1 -1
  88. package/payload/premium-plugins/real-agent/agents/negotiator.md +1 -1
  89. package/payload/premium-plugins/real-agent/agents/valuer.md +1 -1
  90. package/payload/premium-plugins/real-agent/plugins/brochures/PLUGIN.md +1 -1
  91. package/payload/premium-plugins/real-agent/plugins/buyers/PLUGIN.md +1 -2
  92. package/payload/premium-plugins/real-agent/plugins/estate-business/PLUGIN.md +1 -2
  93. package/payload/premium-plugins/real-agent/plugins/estate-coaching/PLUGIN.md +1 -2
  94. package/payload/premium-plugins/real-agent/plugins/estate-onboarding/PLUGIN.md +1 -2
  95. package/payload/premium-plugins/real-agent/plugins/estate-sales/PLUGIN.md +1 -2
  96. package/payload/premium-plugins/real-agent/plugins/estate-teaching/PLUGIN.md +1 -2
  97. package/payload/premium-plugins/real-agent/plugins/leads/PLUGIN.md +1 -2
  98. package/payload/premium-plugins/real-agent/plugins/listings/PLUGIN.md +1 -2
  99. package/payload/premium-plugins/real-agent/plugins/loop/PLUGIN.md +1 -1
  100. package/payload/premium-plugins/real-agent/plugins/vendors/PLUGIN.md +1 -2
  101. package/payload/premium-plugins/teaching/PLUGIN.md +2 -1
  102. package/payload/premium-plugins/writer-craft/PLUGIN.md +2 -1
  103. package/payload/server/public/assets/{admin-CDvF5de6.js → admin-Bk2eXMFD.js} +24 -24
  104. package/payload/server/public/assets/{data-K_kS__sL.js → data-ll_OwVNL.js} +1 -1
  105. package/payload/server/public/assets/{graph-DeEigyO_.js → graph-DJ2VWioQ.js} +1 -1
  106. package/payload/server/public/assets/graph-labels-qhU8xZDH.js +1 -0
  107. package/payload/server/public/assets/{page-qSH972X0.js → page-Dk73ZO1F.js} +1 -1
  108. package/payload/server/public/assets/{page-B_rpjIRr.js → page-DsYsdBUK.js} +1 -1
  109. package/payload/server/public/data.html +3 -3
  110. package/payload/server/public/graph.html +3 -3
  111. package/payload/server/public/index.html +4 -4
  112. package/payload/server/server.js +121 -46
  113. package/payload/platform/plugins/admin/references/contextual-ui.md +0 -107
  114. package/payload/platform/scripts/__tests__/admin-persist-audit.test.ts +0 -182
  115. package/payload/server/public/assets/graph-labels-C7I5QvNv.js +0 -1
@@ -1 +1 @@
1
- import{a as e,p as t}from"./brand-Bm671owU.js";import"./graph-labels-C7I5QvNv.js";import{t as n}from"./page-B_rpjIRr.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
1
+ import{a as e,p as t}from"./brand-Bm671owU.js";import"./graph-labels-qhU8xZDH.js";import{t as n}from"./page-DsYsdBUK.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
@@ -1 +1 @@
1
- import{a as e,p as t}from"./brand-Bm671owU.js";import"./graph-labels-C7I5QvNv.js";import{n}from"./page-qSH972X0.js";import"./Checkbox-YIF0payo.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
1
+ import{a as e,p as t}from"./brand-Bm671owU.js";import"./graph-labels-qhU8xZDH.js";import{n}from"./page-Dk73ZO1F.js";import"./Checkbox-YIF0payo.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DD-I1_y5.js";import{a as t,c as n,d as r,f as i,h as a,l as o,o as s,r as c,s as l,t as u,u as d}from"./brand-Bm671owU.js";var f=i(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),p=i(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),m=i(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),h=i(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),g=i(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),_=i(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),v=i(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),y=i(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),b=i(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),x=i(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),ee=i(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),S=i(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),C=i(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),w=i(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),T=i(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),E=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),D=i(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),te=i(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),O=i(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),k=i(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),A=i(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ne=i(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),re=i(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),j=e(a(),1);function M(e,t,n,r){let i=e===`pane`?`pane-action`:`sidebar-${t}`;console.info(`[admin-ui] ${i} sessionId=${n.slice(0,8)} action=${t} outcome=${r}`)}var N=/session_([A-Za-z0-9_-]+)/;function P(e){if(!e)return null;let t=e.match(N);return t?t[1]:null}async function F(e,t,n,r,i){let a=P(r)??`unknown`,o=e=>e.slice(0,8),s=t===`pane`?`pane-action action=resume-archive`:`sidebar-resume-archive`,c;try{let t=await fetch(`/api/admin/claude-sessions/${encodeURIComponent(n)}/archive?session_key=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({mode:`archive`})});c=t.ok?`ok`:t.status===409?`409`:`error`;let r=`[admin-ui] ${s} sourceSessionId=${o(n)} newSessionId=${o(a)} result=${c}`;c===`error`?console.error(r):console.info(r)}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[admin-ui] ${s} sourceSessionId=${o(n)} newSessionId=${o(a)} result=error detail=${t}`)}finally{i.refetch()}}function ie(e,t,n=`pane`){let[r,i]=(0,j.useState)(null),a=(0,j.useCallback)(async r=>{if(!e)return{ok:!1,error:`no-cache-key`};i(`resume`);try{let i=await fetch(`/api/admin/claude-sessions/resume?session_key=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({claudeSessionId:r,channel:`browser`})}),a=await i.json();if(!i.ok||!(`sessionId`in a)){let e=a.error??`POST returned ${i.status}`;return M(n,`resume`,r,String(i.status)),{ok:!1,error:e}}return t.setSessions(e=>[a,...e.filter(e=>e.sessionId!==r)]),M(n,`resume`,r,`200`),F(e,n,r,a.url,t),{ok:!0}}catch(e){let i=e instanceof Error?e.message:String(e);return M(n,`resume`,r,`threw`),t.refetch(),{ok:!1,error:i}}finally{i(null)}},[e,t,n]),o=(0,j.useCallback)(async r=>{if(!e)return{ok:!1,error:`no-cache-key`};i(`end`),t.setSessions(e=>e.filter(e=>e.sessionId!==r));try{let i=await fetch(`/api/admin/claude-sessions/${encodeURIComponent(r)}?session_key=${encodeURIComponent(e)}`,{method:`DELETE`});if(!i.ok){let e=await i.text().catch(()=>``);return M(n,`end`,r,String(i.status)),t.refetch(),{ok:!1,error:`DELETE ${i.status} ${e.slice(0,200)}`}}return M(n,`end`,r,`200`),{ok:!0}}catch(e){let i=e instanceof Error?e.message:String(e);return M(n,`end`,r,`threw`),t.refetch(),{ok:!1,error:i}}finally{i(null)}},[e,t,n]),s=(0,j.useCallback)(async r=>{if(!e)return{ok:!1,error:`no-cache-key`};i(`purge`);try{let i=await fetch(`/api/admin/claude-sessions/${encodeURIComponent(r)}?purge=1&session_key=${encodeURIComponent(e)}`,{method:`DELETE`});if(!i.ok){let e=await i.json().catch(()=>({})),t=e.detail||e.error||`DELETE ?purge=1 ${i.status}`;return M(n,`purge`,r,String(i.status)),{ok:!1,error:t}}return t.setSessions(e=>e.filter(e=>e.sessionId!==r)),M(n,`purge`,r,`200`),{ok:!0}}catch(e){let t=e instanceof Error?e.message:String(e);return M(n,`purge`,r,`threw`),{ok:!1,error:t}}finally{i(null)}},[e,t,n]),c=(0,j.useCallback)(async(r,a)=>{if(!e)return{ok:!1,error:`no-cache-key`};i(a);try{let i=await fetch(`/api/admin/claude-sessions/${encodeURIComponent(r)}/archive?session_key=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({mode:a})});if(!i.ok){let e=await i.json().catch(()=>({})),t=e.detail||e.error||`POST /archive ${i.status}`;return M(n,a,r,String(i.status)),{ok:!1,error:t}}return a===`archive`?t.setSessions(e=>e.filter(e=>e.sessionId!==r)):t.refetch(),M(n,a,r,`200`),{ok:!0}}catch(e){let t=e instanceof Error?e.message:String(e);return M(n,a,r,`threw`),{ok:!1,error:t}}finally{i(null)}},[e,t,n]);return{inFlight:r,resume:a,end:o,purge:s,archive:(0,j.useCallback)(e=>c(e,`archive`),[c]),unarchive:(0,j.useCallback)(e=>c(e,`unarchive`),[c])}}function I(e){return`code.session.pinned.${e}`}function L(e){if(typeof window>`u`)return new Set;try{let t=window.localStorage.getItem(I(e));if(!t)return new Set;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):new Set}catch{return new Set}}function ae(e,t){if(!(typeof window>`u`))try{window.localStorage.setItem(I(e),JSON.stringify([...t]))}catch{}}function oe(e){let[t,n]=(0,j.useState)(()=>L(e));(0,j.useEffect)(()=>{n(L(e))},[e]);let r=(0,j.useCallback)(t=>{n(n=>{let r=new Set(n);return r.has(t)?r.delete(t):r.add(t),ae(e,r),r})},[e]);return{pinned:t,isPinned:(0,j.useCallback)(e=>t.has(e),[t]),togglePin:r}}var R=t();function z(e){let{businessName:t,cacheKey:n,conversationId:i,onLaunchBrowser:a,onNavigate:s,onToggleSidebar:d,sidebarOpen:f,onLogout:p,browserLaunching:m}=e,[g,y]=(0,j.useState)(!1),S=(0,j.useRef)(null),C=(0,j.useRef)(null),[E,D]=(0,j.useState)(null),[te,k]=(0,j.useState)(!1),[A,ne]=(0,j.useState)(null),[M,N]=(0,j.useState)(null),[P,F]=(0,j.useState)(null),[ie,I]=(0,j.useState)(``);(0,j.useEffect)(()=>{I(window.location.hostname.startsWith(`admin.`)?window.location.origin.replace(`admin.`,`public.`):window.location.origin)},[]),(0,j.useEffect)(()=>{if(!g)return;let e=e=>{S.current&&!S.current.contains(e.target)&&y(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[g]),(0,j.useEffect)(()=>{if(!g)return;let e=e=>{e.key===`Escape`&&y(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]),(0,j.useEffect)(()=>{g&&C.current?.focus()},[g]),(0,j.useEffect)(()=>{if(!g)return;let e=!1;return fetch(`/api/admin/version`).then(e=>e.json()).then(t=>{e||F(t)}).catch(e=>{console.error(`[admin/version] menu-open client fetch failed:`,e)}),()=>{e=!0}},[g]);let L=(0,j.useCallback)(()=>{y(e=>{let t=!e;return t&&console.info(`[admin-ui] header-menu-open`),t})},[]),ae=(0,j.useCallback)(()=>{y(!1),a()},[a]),oe=(0,j.useCallback)(e=>{y(!1),s(e)},[s]),z=(0,j.useCallback)(async()=>{if(E!==null){D(null),N(null);return}k(!0),ne(null);try{let e=await fetch(`/api/admin/agents`);if(!e.ok)throw Error(`Failed to load agents`);D((await e.json()).agents??[])}catch(e){console.error(`[admin/agents] list failed:`,e),ne(e instanceof Error?e.message:String(e)),D([])}finally{k(!1)}},[E]),B=(0,j.useCallback)(e=>{N(null),D(t=>t?.filter(t=>t.slug!==e)??null),fetch(`/api/admin/agents/${encodeURIComponent(e)}`,{method:`DELETE`}).catch(e=>console.error(`[admin/agents] delete failed:`,e))},[]),V=(0,j.useCallback)(async()=>{if(y(!1),!n){console.warn(`[admin-ui] header-menu-report-turn cacheKey=null — skipping POST`);return}try{let e=await fetch(`/api/admin/failure-report`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionKey:n,conversationId:i??``,lastUserMessageId:``,lastAssistantMessageId:``,clickTs:new Date().toISOString(),clientSnapshot:{sseReadyState:``,lastEventType:``,lastAppliedMessageId:``}})});console.info(`[admin-ui] header-menu-report-turn ok=${e.ok} status=${e.status}`)}catch(e){console.error(`[admin-ui] header-menu-report-turn failed:`,e)}},[n,i]),se=(0,j.useCallback)(()=>{y(!1),p()},[p]),H=t||u.productName;return(0,R.jsxs)(`header`,{className:`admin-header`,children:[(0,R.jsx)(`button`,{type:`button`,className:`admin-sidebar-toggle`,"aria-label":f?`Hide sidebar`:`Show sidebar`,title:f?`Hide sidebar`:`Show sidebar`,"aria-expanded":f,onClick:d,children:f?(0,R.jsx)(w,{size:20}):(0,R.jsx)(T,{size:20})}),(0,R.jsxs)(`div`,{className:`chat-header-label`,children:[(0,R.jsx)(`span`,{className:`chat-logo-btn`,"aria-hidden":`true`,children:(0,R.jsx)(`img`,{src:c,alt:``,className:`chat-logo`})}),(0,R.jsx)(`h1`,{className:`chat-tagline`,children:H})]}),(0,R.jsxs)(`div`,{className:`chat-burger-wrap`,ref:S,children:[(0,R.jsx)(`button`,{type:`button`,className:`admin-burger`,onClick:L,"aria-label":`Menu`,"aria-haspopup":`true`,"aria-expanded":g,children:(0,R.jsx)(ee,{size:20})}),g&&(0,R.jsxs)(`div`,{className:`admin-menu`,role:`menu`,children:[(0,R.jsxs)(`button`,{ref:C,type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:ae,disabled:m,children:[(0,R.jsx)(o,{size:14}),` Browser`,m&&(0,R.jsx)(b,{size:12,className:`spin`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>oe(`data`),children:[(0,R.jsx)(h,{size:14}),` Data`]}),(0,R.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>oe(`graph`),children:[(0,R.jsx)(O,{size:14}),` Graph`]}),(0,R.jsx)(`div`,{className:`chat-menu-divider`}),(0,R.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:z,children:[(0,R.jsx)(_,{size:14}),` Public`,te&&(0,R.jsx)(b,{size:12,className:`spin`})]}),E!==null&&(0,R.jsxs)(`div`,{className:`chat-menu-agents`,children:[A&&(0,R.jsx)(`span`,{className:`chat-menu-agent-error`,children:A}),E.length===0&&!A&&(0,R.jsx)(`span`,{className:`chat-menu-agent-empty`,children:`No public agents configured`}),E.map(e=>(0,R.jsxs)(`div`,{className:`chat-menu-item chat-menu-agent-item`,children:[(0,R.jsx)(`span`,{className:`agent-status-dot ${e.status}`}),(0,R.jsxs)(`span`,{className:`agent-text`,children:[(0,R.jsx)(`span`,{className:`agent-display-name`,children:e.displayName}),(0,R.jsxs)(`span`,{className:`agent-slug`,children:[`/`,e.slug]})]}),M===e.slug?(0,R.jsxs)(`span`,{className:`agent-actions agent-confirm`,children:[(0,R.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-yes`,title:`Confirm delete`,onClick:()=>B(e.slug),children:(0,R.jsx)(r,{size:12})}),(0,R.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-no`,title:`Cancel`,onClick:()=>N(null),children:(0,R.jsx)(re,{size:12})})]}):(0,R.jsxs)(`span`,{className:`agent-actions`,children:[(0,R.jsx)(`a`,{href:`${ie}/${e.slug}`,target:`_blank`,rel:`noopener noreferrer`,className:`agent-action-btn`,title:`Open agent`,onClick:()=>y(!1),children:(0,R.jsx)(_,{size:12})}),(0,R.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-delete-btn`,title:`Delete agent`,onClick:()=>N(e.slug),children:(0,R.jsx)(l,{size:12})})]})]},e.slug))]}),(0,R.jsx)(`div`,{className:`chat-menu-divider`}),(0,R.jsxs)(`div`,{className:`chat-menu-version chat-menu-version-passive`,children:[(0,R.jsx)(v,{size:14}),(0,R.jsxs)(`span`,{className:`version-installed`,children:[P?`v${P.installed}`:`…`,P&&!P.updateAvailable&&(0,R.jsx)(`span`,{className:`version-uptodate-dot`}),P?.updateAvailable&&(0,R.jsx)(`span`,{className:`version-update-dot`})]})]}),(0,R.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,"data-testid":`report-turn`,onClick:V,children:[(0,R.jsx)(v,{size:14}),` Report this turn`]}),(0,R.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:se,children:[(0,R.jsx)(x,{size:14}),` Log out`]})]})]})]})}var B=`maxy-admin-session-key`;function V(){let[e,t]=(0,j.useState)(!1),n=(0,j.useCallback)(async()=>{if(e)return;t(!0);let n=null;try{n=sessionStorage.getItem(B)}catch{}if(!n){console.error(`[admin-ui] onboarding-banner-spawn-failed reason=no-session-key`),window.location.assign(`/`);return}console.info(`[admin-ui] onboarding-banner-click sessionId=pending`);try{let e=await fetch(`/api/admin/claude-sessions?session_key=${encodeURIComponent(n)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({onboardingAdvance:!0})});if(!e.ok){console.error(`[admin-ui] onboarding-banner-spawn-failed status=${e.status}`),t(!1);return}let r=await e.json();if(!r.sessionId){console.error(`[admin-ui] onboarding-banner-spawn-failed reason=missing-sessionId`),t(!1);return}console.info(`[admin-ui] onboarding-banner-click sessionId=${r.sessionId.slice(0,8)}`),window.location.assign(`/?sessionId=${encodeURIComponent(r.sessionId)}`)}catch(e){console.error(`[admin-ui] onboarding-banner-spawn-error: ${e instanceof Error?e.message:String(e)}`),t(!1)}},[e]);return(0,j.useEffect)(()=>{console.info(`[admin-ui] onboarding-banner-mount onboardingComplete=false`)},[]),(0,R.jsx)(`div`,{className:`admin-shell-banner`,role:`status`,"aria-live":`polite`,children:(0,R.jsxs)(`button`,{type:`button`,className:`admin-shell-banner-button`,onClick:n,disabled:e,"data-testid":`onboarding-incomplete-banner`,children:[(0,R.jsx)(s,{size:16,"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:`Onboarding is not complete. Continue with your agent.`})]})})}var se=(()=>null),H=(0,j.forwardRef)(function(e,t){let{businessName:r,cacheKey:i,role:a,userName:o,userAvatar:s,sessions:c,sessionsLoading:h,sessionsError:v,ensureSessionsLoaded:x,refetchSessions:ee,onSelectArtefact:w,onSelectProjects:T,onSelectPeople:te,onSelectTasks:O,onSelectAgents:re,onCloseMobileDrawer:M,onSelectSession:N,selectedSessionId:P,collapsed:F,onToggleCollapsed:I,mobileDrawerOpen:L,actions:ae,recentsActions:z}=e,[B,V]=(0,j.useState)(null),[H,U]=(0,j.useState)(null),[W,ce]=(0,j.useState)(!1);(0,j.useEffect)(()=>{x()},[x]);let G=(0,j.useRef)(null),[K,le]=(0,j.useState)(!1),[q,ue]=(0,j.useState)(`default`),[de,J]=(0,j.useState)(null),fe=u.productName,pe=typeof o==`string`?o:o===null?`name unavailable`:r||fe,me=(pe.trim().charAt(0)||`?`).toUpperCase(),he=oe(u.hostname),ge=(0,j.useMemo)(()=>{let e=c;if(he.pinned.size===0)return e;let t=[],n=[];for(let r of e)(he.pinned.has(r.sessionId)?t:n).push(r);return[...t,...n]},[c,he.pinned]),_e=ge.length,[Y,ve]=(0,j.useState)(`chat`),[X,ye]=(0,j.useState)([]),[Z,be]=(0,j.useState)(!1),[xe,Se]=(0,j.useState)(null),[Ce,we]=(0,j.useState)(!1);(0,j.useImperativeHandle)(t,()=>({patchArtefact(e,t){ye(n=>n.map(n=>n.id===e?{...n,...t}:n))}}),[]);let[Te,Ee]=(0,j.useState)(!1),De=(0,j.useRef)(null);(0,j.useEffect)(()=>{if(!Te)return;function e(e){De.current&&!De.current.contains(e.target)&&Ee(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[Te]);let Oe=(0,j.useCallback)(async()=>{if(i){we(!0),Se(null);try{let e=await fetch(`/api/admin/sidebar-artefacts?session_key=${encodeURIComponent(i)}`);if(!e.ok)throw Error(`status ${e.status}`);ye((await e.json()).artefacts??[]),be(!0)}catch(e){let t=e instanceof Error?e.message:String(e);Se(`Failed to load artefacts: ${t}`),console.error(`[admin-ui] sidebar-artefacts fetch failed: ${t}`)}finally{we(!1)}}},[i]),ke=()=>{ve(`chat`),console.info(`[admin-ui] sidebar-nav surface=sessions count=${_e}`)},Ae=()=>{ve(`artefacts`),console.info(`[admin-ui] sidebar-nav surface=artefacts count=${Z?X.length:0} collapsed=${F}`),F&&I(),Z||Oe()},Q=F?24:16,je=Y===`chat`?`Sessions`:`Artefacts`,Me=Y===`chat`?h?`…`:String(_e):Ce?`…`:String(X.length),Ne=Y===`chat`?h:Ce,Pe=()=>{Y===`chat`?ee():Oe(),console.info(`[admin-ui] sidebar-refresh surface=${Y}`)},Fe=(0,j.useCallback)(async()=>{if(!(K||!i)){le(!0),J(null);try{let e=await fetch(`/api/admin/claude-sessions?session_key=${encodeURIComponent(i)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({channel:`browser`,permissionMode:q})}),t=await e.json();if(!e.ok||!(`sessionId`in t)){J(t.error??`POST returned ${e.status}`);return}console.info(`[admin-ui] sidebar-new-session pid=${t.pid} sessionId=${t.sessionId} permissionMode=${q}`),z.setSessions(e=>[t,...e])}catch(e){let t=e instanceof Error?e.message:String(e);J(t),console.error(`[admin-ui] sidebar-new-session failed:`,t)}finally{le(!1)}}},[i,K,z,q]),$=ie(i,z,`sidebar`),Ie=(0,j.useCallback)(async e=>{let t=await $.resume(e);t.ok||console.error(`[admin-ui] sidebar-resume failed: ${t.error}`)},[$]),Le=(0,j.useCallback)(async e=>{ce(!0),U(null);let t=await $.purge(e);t.ok?V(null):U(t.error??`purge failed`),ce(!1)},[$]),Re=(0,j.useCallback)(async e=>{let t=await $.end(e);t.ok||console.error(`[admin-ui] sidebar-end-session failed: ${t.error}`)},[$]);return(0,R.jsxs)(`aside`,{className:`side`,children:[(0,R.jsx)(`div`,{className:`side-head`,children:(0,R.jsx)(`button`,{className:`icon-btn side-head-toggle`,title:L?`Close sidebar`:F?`Expand sidebar`:`Collapse sidebar`,type:`button`,"aria-label":L?`Close sidebar`:F?`Expand sidebar`:`Collapse sidebar`,onClick:()=>{L?(console.info(`[admin-ui] sidebar-head-toggle action=close-drawer state=closed`),M()):(console.info(`[admin-ui] sidebar-head-toggle action=toggle-collapsed state=${F?`expanded`:`collapsed`}`),I())},children:F?(0,R.jsx)(C,{size:28}):(0,R.jsx)(S,{size:28})})}),(0,R.jsxs)(`nav`,{className:`side-nav`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`nav-row${Y===`chat`?` active`:``}`,onClick:ke,children:[(0,R.jsx)(A,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`Sessions`}),(0,R.jsx)(`span`,{className:`kbd`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=people`),te(),M()},children:[(0,R.jsx)(ne,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`People`}),(0,R.jsx)(`span`,{className:`kbd`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=agents`),re(),M()},children:[(0,R.jsx)(f,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`Agents`}),(0,R.jsx)(`span`,{className:`kbd`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=projects`),T(),M()},children:[(0,R.jsx)(p,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`Projects`}),(0,R.jsx)(`span`,{className:`kbd`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=tasks`),O(),M()},children:[(0,R.jsx)(y,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`Tasks`}),(0,R.jsx)(`span`,{className:`kbd`})]}),(0,R.jsxs)(`button`,{type:`button`,className:`nav-row${Y===`artefacts`?` active`:``}`,onClick:Ae,children:[(0,R.jsx)(d,{size:Q}),(0,R.jsx)(`span`,{className:`label`,children:`Artefacts`}),(0,R.jsx)(`span`,{className:`kbd`})]})]}),(0,R.jsxs)(`div`,{className:`side-list`,ref:G,children:[(0,R.jsxs)(`div`,{className:`group-head`,children:[(0,R.jsx)(`span`,{children:je}),(0,R.jsxs)(`span`,{className:`group-head-meta`,children:[Y===`chat`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`select`,{className:`group-head-permission-mode`,value:q,onChange:e=>ue(e.target.value),title:`Permission mode for the next session`,"aria-label":`Permission mode for the next session`,disabled:K,children:[(0,R.jsx)(`option`,{value:`default`,children:`Ask`}),(0,R.jsx)(`option`,{value:`acceptEdits`,children:`Accept edits`}),(0,R.jsx)(`option`,{value:`plan`,children:`Plan`}),(0,R.jsx)(`option`,{value:`auto`,children:`Auto`})]}),(0,R.jsx)(`a`,{className:`group-head-refresh`,href:`/docs/desktop-code-controls`,target:`_blank`,rel:`noopener noreferrer`,title:`Desktop Code-tab controls reference`,"aria-label":`Desktop Code-tab controls reference`,children:(0,R.jsx)(m,{size:12})}),(0,R.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`New session`,"aria-label":`New session`,onClick:()=>void Fe(),disabled:K||!i,children:K?(0,R.jsx)(b,{size:12,className:`spinning`}):(0,R.jsx)(E,{size:12})})]}),(0,R.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh ${je.toLowerCase()}`,"aria-label":`Refresh ${je.toLowerCase()}`,onClick:Pe,disabled:Ne,children:(0,R.jsx)(D,{size:12,className:Ne?`spinning`:void 0})}),(0,R.jsx)(`span`,{children:Me})]})]}),de&&Y===`chat`&&(0,R.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:de}),Y===`chat`&&(0,R.jsxs)(R.Fragment,{children:[v&&(0,R.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:v}),ge.map(e=>{let t=e.status===`ended`,r=t?`${e.turnCount}${e.capped?`+`:``} turns · ended`:`pid ${e.pid??`?`}`;return(0,R.jsxs)(`div`,{className:`conv${P===e.sessionId?` active`:``}`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`conv-name-button`,onClick:()=>{N(e.sessionId),M()},title:`Show metadata`,children:[(0,R.jsx)(A,{size:12,className:`conv-channel-icon`,"aria-label":`claude session`}),(0,R.jsxs)(`span`,{className:`conv-name`,children:[e.displayName,` · `,r]})]}),t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{type:`button`,className:`conversations-action`,title:`Resume session`,"aria-label":`Resume session`,onClick:()=>void Ie(e.sessionId),children:(0,R.jsx)(n,{size:13})}),(0,R.jsx)(`button`,{type:`button`,className:`conversations-action`,title:`Purge JSONL`,"aria-label":`Purge JSONL`,onClick:()=>{U(null),V({sessionId:e.sessionId,displayName:e.displayName})},children:(0,R.jsx)(l,{size:13})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{type:`button`,className:`conversations-action`,title:`Open in new tab`,"aria-label":`Open in new tab`,onClick:()=>{console.info(`[admin-ui] sidebar-open-session sessionId=${e.sessionId}`),e.url&&window.open(e.url,`_blank`,`noopener,noreferrer`)},children:(0,R.jsx)(_,{size:13})}),(0,R.jsx)(`button`,{type:`button`,className:`conversations-action`,title:`End session`,"aria-label":`End session`,onClick:()=>void Re(e.sessionId),children:(0,R.jsx)(k,{size:13})})]})]},e.sessionId)})]}),Y===`artefacts`&&(0,R.jsxs)(R.Fragment,{children:[xe&&(0,R.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:xe}),Z&&!xe&&X.length===0&&(0,R.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No artefacts yet`}),X.map(e=>(0,R.jsxs)(`button`,{type:`button`,className:`conv`,onClick:()=>{w({docId:e.id,name:e.name,content:e.content,editable:e.editable,mimeType:e.mimeType,skipReason:e.skipReason},`sidebar-artefacts`),M()},children:[(0,R.jsx)(`span`,{className:`conv-name`,children:e.name}),(0,R.jsx)(`span`,{className:`conv-kind`,"data-kind":e.kind===`agent-template`?`agent`:`doc`,children:e.kind===`agent-template`?`agent`:`doc`})]},e.id))]})]}),(0,R.jsxs)(`div`,{className:`side-foot`,ref:De,children:[(0,R.jsx)(`div`,{className:`avatar`,children:s?(0,R.jsx)(`img`,{src:s,alt:pe}):me}),(0,R.jsxs)(`div`,{className:`who`,children:[(0,R.jsx)(`span`,{className:`name`,children:pe}),(0,R.jsx)(`span`,{className:`role`,children:a??`operator`})]}),(0,R.jsx)(`button`,{className:`icon-btn side-foot-actions-trigger`,title:`Conversation actions`,type:`button`,"aria-label":`Conversation actions`,"aria-haspopup":`true`,"aria-expanded":Te,onClick:()=>Ee(e=>!e),children:(0,R.jsx)(g,{size:Q})}),Te&&(0,R.jsx)(`div`,{className:`side-foot-actions-popover`,children:(0,R.jsx)(se,{...ae,onAfterAction:()=>Ee(!1)})})]}),B&&(0,R.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`purge-confirm-title`,className:`modal-overlay`,onClick:e=>{e.target===e.currentTarget&&!W&&V(null)},children:(0,R.jsxs)(`div`,{className:`modal-card`,children:[(0,R.jsx)(`h3`,{id:`purge-confirm-title`,style:{margin:0,marginBottom:8,fontSize:16,fontWeight:600},children:`Purge session JSONL?`}),(0,R.jsxs)(`p`,{style:{margin:0,marginBottom:8,fontSize:13},children:[`This hard-deletes the transcript and sidecar for `,(0,R.jsx)(`strong`,{children:B.displayName}),`. The action cannot be undone.`]}),H&&(0,R.jsx)(`p`,{style:{margin:0,marginBottom:8,fontSize:12,color:`var(--text-tertiary)`},children:H}),(0,R.jsxs)(`div`,{className:`modal-action-row`,children:[(0,R.jsx)(`button`,{type:`button`,className:`modal-action-btn`,disabled:W,onClick:()=>V(null),children:`Cancel`}),(0,R.jsx)(`button`,{type:`button`,className:`modal-action-btn`,"data-variant":`danger`,disabled:W,onClick:()=>void Le(B.sessionId),children:W?(0,R.jsx)(b,{size:13,className:`spinning`}):`Purge`})]})]})})]})});function U(e){return e.map(e=>[e.sessionId,e.displayName,e.lastMessageAt,e.status])}function W(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2]||r[3]!==i[3])return!1}return!0}function ce(e){let[t,n]=(0,j.useState)([]),[r,i]=(0,j.useState)(!1),[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)(null),l=(0,j.useRef)([]),u=(0,j.useCallback)(async(t,r)=>{if(e&&!(!t&&s===e)){r||(i(!0),o(null));try{let t=await fetch(`/api/admin/claude-sessions?session_key=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`claude-sessions fetch returned ${t.status}`);let i=await t.json(),a=Array.isArray(i)?i:i.sessions??[],o=U(a),s=W(l.current,o);s||(n(a),l.current=o),c(e),r&&console.info(`[admin-ui] sessions-poll outcome=${s?`unchanged`:`changed`} count=${a.length} cacheKey=${e.slice(0,8)}`)}catch(t){r&&console.info(`[admin-ui] sessions-poll outcome=error count=0 cacheKey=${e.slice(0,8)}`),console.error(`[admin/claude-sessions] fetch failed:`,t),r||o(t instanceof Error?t.message:String(t))}finally{r||i(!1)}}},[e,s]);(0,j.useEffect)(()=>{e||(c(null),n([]),o(null),l.current=[])},[e]);let d=(0,j.useCallback)(()=>u(!1,!1),[u]),f=(0,j.useCallback)(()=>u(!0,!1),[u]),p=(0,j.useCallback)(()=>u(!0,!0),[u]),m=(0,j.useRef)(p);return(0,j.useEffect)(()=>{m.current=p},[p]),(0,j.useEffect)(()=>{if(!e)return;let t=setInterval(()=>{m.current()},3e3);return()=>clearInterval(t)},[e]),{sessions:t,setSessions:n,loading:r,loaded:s!==null&&s===e,error:a,ensureLoaded:d,refetch:f}}var G=`admin-sidebar-collapsed`,K=`admin-sidebar-drawer-open`;function le(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(G)===`1`}catch{return!1}}function q(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(G,`1`):window.sessionStorage.removeItem(G)}catch{}}function ue(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(K)===`1`}catch{return!1}}function de(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(K,`1`):window.sessionStorage.removeItem(K)}catch{}}var J=720;function fe(e){let{cacheKey:t,businessName:n,conversationId:r,onLaunchBrowser:i,onLogout:a,browserLaunching:o=!1,onboardingComplete:s,userName:c,userAvatar:l,role:u,selectedSessionId:d,onSelectSession:f,onSelectArtefact:p,dataArtefact:m=`closed`,children:h,footer:g}=e,[_,v]=(0,j.useState)(()=>le()),[y,b]=(0,j.useState)(()=>ue()),[x,ee]=(0,j.useState)(()=>typeof window<`u`&&window.matchMedia(`(max-width: ${J}px)`).matches);(0,j.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(max-width: ${J}px)`),t=e=>ee(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let S=(0,j.useCallback)(e=>{q(e),v(e)},[]),C=(0,j.useCallback)(e=>{de(e),b(e)},[]);(0,j.useEffect)(()=>{if(typeof window>`u`)return;let e=window.location?.pathname??``;console.info(`[admin-ui] shell-mount route=${e} collapsed=${_} drawer=${y}`)},[]);let w=x?y:!_,T=(0,j.useCallback)(()=>{if(!(typeof window>`u`))if(window.matchMedia(`(max-width: ${J}px)`).matches){let e=y;console.info(`[admin-ui] header-sidebar-toggle from=${e?`open`:`closed`} mode=drawer`),C(!e)}else{let e=_;console.info(`[admin-ui] header-sidebar-toggle from=${e?`closed`:`open`} mode=collapse`),S(!e)}},[_,y,S,C]),E=(0,j.useCallback)(e=>{console.info(`[admin-ui] header-menu-nav target=${e}`),window.location.href=e===`data`?`/data`:`/graph`},[]),D=(0,j.useCallback)(()=>{},[]),te=s===!1,O=ce(t),k=(0,j.useCallback)(e=>{if(f){f(e);return}window.location.assign(`/?sessionId=${encodeURIComponent(e)}`)},[f]),A=(0,j.useCallback)(e=>{p&&p(e)},[p]),ne={collapsed:_,mobileDrawerOpen:y,sidebarOpen:w,onToggleSidebar:T,setMobileDrawerOpen:C,sessionsState:O};return(0,R.jsxs)(`div`,{className:`admin-shell admin-page admin-shell-root`,children:[(0,R.jsx)(z,{businessName:n,cacheKey:t,conversationId:r,onLaunchBrowser:i??D,onNavigate:E,onToggleSidebar:T,sidebarOpen:w,onLogout:a,browserLaunching:o}),te&&(0,R.jsx)(V,{}),(0,R.jsxs)(`div`,{className:`platform${y?` menu-open`:``}${_?` sidebar-collapsed`:``}`,"data-artefact":m,children:[(0,R.jsx)(H,{businessName:n,cacheKey:t,role:u??null,userName:c,userAvatar:l??null,sessions:O.sessions,sessionsLoading:O.loading,sessionsError:O.error,ensureSessionsLoaded:O.ensureLoaded,refetchSessions:O.refetch,onSelectArtefact:A,onSelectProjects:()=>{window.location.href=`/graph?label=Project`},onSelectPeople:()=>{window.location.href=`/graph?label=Person`},onSelectTasks:()=>{window.location.href=`/graph?label=Task`},onSelectAgents:()=>{window.location.href=`/graph?label=Agent`},onCloseMobileDrawer:()=>C(!1),onSelectSession:k,selectedSessionId:d??null,collapsed:_,onToggleCollapsed:()=>{},mobileDrawerOpen:y,actions:{},recentsActions:{setSessions:O.setSessions,refetch:O.refetch}}),typeof h==`function`?h(ne):h]}),y&&(0,R.jsx)(`div`,{className:`sidebar-backdrop menu-open`,"aria-hidden":`true`,onClick:()=>C(!1)}),g]})}var pe=`maxy-admin-session`,me=typeof BroadcastChannel<`u`;function he(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`rotation`&&typeof t.newKey==`string`&&t.newKey.length>0&&(t.surface===`chat`||t.surface===`graph`||t.surface===`data`||t.surface===`sessions`)&&typeof t.ts==`number`}function ge(e){if(!me)return()=>{};let t=new BroadcastChannel(pe),n=t=>{if(!he(t.data)){console.warn(`[admin-session-broadcast] outcome=received-malformed payload=${JSON.stringify(t.data)}`);return}e(t.data)};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}var _e=`maxy-admin-session-key`;function Y(e,t){return`${e}${e.includes(`?`)?`&`:`?`}session_key=${encodeURIComponent(t)}`}async function ve(e){let t;try{t=await e.clone().json()}catch{return`parse-failed`}if(typeof t!=`object`||!t)return`unknown-401`;let n=t.code;return n===`session-missing`||n===`session-not-registered`||n===`session-expired-age`||n===`grant-expired`?n:`unknown-401`}function X(){try{return sessionStorage.getItem(_e)}catch{return null}}function ye(e){let{initialCacheKey:t,surface:n}=e,[r,i]=(0,j.useState)(t),a=(0,j.useRef)(t);(0,j.useEffect)(()=>{a.current=r},[r]),(0,j.useEffect)(()=>{t!==a.current&&(i(t),a.current=t,s(e=>e+1))},[t]);let[o,s]=(0,j.useState)(0),[c,l]=(0,j.useState)(null);(0,j.useEffect)(()=>ge(e=>{let t=a.current.slice(0,8),r=e.newKey.slice(0,8);e.newKey!==a.current&&(console.log(`[admin-session-broadcast] outcome=received oldKey=${t} newKey=${r} surface=${n} senderSurface=${e.surface}`),i(e.newKey),s(e=>e+1),l(null))}),[n]);let u=(0,j.useCallback)(()=>{try{sessionStorage.removeItem(_e)}catch{}window.location.href=`/`},[]);return{adminFetch:(0,j.useCallback)(async(e,t)=>{let r=a.current,o=Y(e,r),c=await fetch(o,t);if(c.status!==401)return c;let d=await ve(c);if(d===`session-missing`)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=${d} surface=${n} path=${e}`),u(),c;if(d!==`session-not-registered`)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=${d} surface=${n} path=${e}`),l({message:`Your admin session has expired. Click to reload and sign in.`,reason:d}),c;let f=X();if(!f||f===r)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=session-not-registered-no-fresh-key surface=${n} path=${e}`),l({message:`Your admin session was renewed in another tab. Click to reload.`,reason:`session-not-registered`}),c;i(f),a.current=f,s(e=>e+1),console.log(`[useAdminFetch] outcome=retry-after-rotation oldKey=${r.slice(0,8)} newKey=${f.slice(0,8)} surface=${n} path=${e}`);let p=Y(e,f),m=await fetch(p,t);return m.status===401&&(console.warn(`[useAdminFetch] outcome=redirect-to-login reason=second-401-after-retry surface=${n} path=${e}`),l({message:`Your admin session has expired. Click to reload and sign in.`,reason:`session-not-registered`})),m},[u,n]),cacheKey:r,sessionRefetchNonce:o,banner:c,reloadToLogin:u}}var Z={LocalBusiness:`#4F6B8A`,Service:`#6B85A0`,PriceSpecification:`#8AA0B8`,OpeningHoursSpecification:`#A8BACE`,Organization:`#8A6B47`,Person:`#B86E4A`,UserProfile:`#D08960`,Preference:`#DFA67A`,AdminUser:`#8C5230`,AccessGrant:`#66381F`,KnowledgeDocument:`#6E8A5A`,ConversationArchive:`#82A06A`,Section:`#8AA876`,Chunk:`#A6C194`,DigitalDocument:`#5A7548`,CreativeWork:`#B5C9A2`,Question:`#C7D6B5`,FAQPage:`#95B385`,DefinedTerm:`#76906A`,Review:`#3F5A2E`,ImageObject:`#A0BB8C`,Conversation:`#6B5A85`,AdminConversation:`#4F4070`,PublicConversation:`#8A75A8`,Message:`#6B7280`,UserMessage:`#DFA67A`,AssistantMessage:`#C9A876`,ToolCall:`#B5ABCB`,Task:`#B0617A`,Project:`#8E4A60`,Event:`#C68095`,Workflow:`#3A6F77`,WorkflowStep:`#5A8E96`,WorkflowRun:`#7AAAB2`,StepResult:`#9CC4CB`,OnboardingState:`#7A5A8A`,Email:`#6F7F4A`,EmailAccount:`#91A063`,Agent:`#B8893D`},be=`#94A3B8`;Object.freeze(Object.keys(Z)),Object.freeze(new Set([`Chunk`,`GraphPreference`]));var xe=Object.freeze(new Set(`LocalBusiness.Service.PriceSpecification.OpeningHoursSpecification.Organization.Person.UserProfile.Preference.AdminUser.AccessGrant.KnowledgeDocument.DigitalDocument.CreativeWork.Question.FAQPage.DefinedTerm.Review.ImageObject.AdminConversation.PublicConversation.Task.Project.Event.Workflow.OnboardingState.Email.EmailAccount.Agent`.split(`.`)));Object.freeze(new Set([`ToolCall`,`StepResult`,`WorkflowStep`,`WorkflowRun`])),Object.freeze(new Set([`HAS_TOOL_CALL`,`RUN_OF`,`HAS_STEP`,`HAS_RESULT`]));function Se(e){for(let t=1;t<e.length;t++)if(Object.prototype.hasOwnProperty.call(Z,e[t]))return e[t];return e[0]??null}function Ce(e){return Z[e]??`#94A3B8`}function we(e){let t=Se(e),n=t?Ce(t):be,r=0;for(let t=1;t<e.length;t++)Object.prototype.hasOwnProperty.call(Z,e[t])&&r++;return{displayLabel:t,colour:n,driftCandidates:r}}export{h as _,ye as a,ie as c,te as d,D as f,g,_ as h,we as i,re as l,b as m,Ce as n,fe as o,E as p,Se as r,oe as s,xe as t,O as u};
@@ -1,4 +1,4 @@
1
- import{o as e,t}from"./chunk-DD-I1_y5.js";import{a as n,f as r,h as i,s as a}from"./brand-Bm671owU.js";import{a as o,d as s,f as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,u as g}from"./graph-labels-C7I5QvNv.js";import{t as _}from"./Checkbox-YIF0payo.js";var v=r(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),y=r(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),b=r(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),x=r(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),S=r(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ee=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},ne=typeof document==`object`&&document.all,re={all:ne,IS_HTMLDDA:ne===void 0&&ne!==void 0},w=re,T=w.all,E=w.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,k=Function.prototype.call,A=ie?k.bind(k):function(){return k.apply(k,arguments)},ae={},oe={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor;ae.f=se&&!oe.call({1:2},1)?function(e){var t=se(this,e);return!!t&&t.enumerable}:oe;var ce=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},le=v,ue=s,de=S,fe=Object,pe=le(``.split),me=ue(function(){return!fe(`z`).propertyIsEnumerable(0)})?function(e){return de(e)===`String`?pe(e,``):fe(e)}:fe,he=function(e){return e==null},ge=he,_e=TypeError,ve=function(e){if(ge(e))throw new _e(`Can't call method on `+e);return e},ye=me,be=ve,xe=function(e){return ye(be(e))},Se=E,Ce=re,j=Ce.all,M=Ce.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===j}:function(e){return typeof e==`object`?e!==null:Se(e)},we={},Te=we,N=o,Ee=E,P=function(e){return Ee(e)?e:void 0},F=function(e,t){return arguments.length<2?P(Te[e])||P(N[e]):Te[e]&&Te[e][t]||N[e]&&N[e][t]},De=v({}.isPrototypeOf),Oe=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=Oe,je=ke.process,Me=ke.Deno,Ne=je&&je.versions||Me&&Me.version,Pe=Ne&&Ne.v8,Fe,Ie;Pe&&(Fe=Pe.split(`.`),Ie=Fe[0]>0&&Fe[0]<4?1:+(Fe[0]+Fe[1])),!Ie&&Ae&&(Fe=Ae.match(/Edge\/(\d+)/),(!Fe||Fe[1]>=74)&&(Fe=Ae.match(/Chrome\/(\d+)/),Fe&&(Ie=+Fe[1])));var Le=Ie,Re=Le,ze=s,Be=o.String,Ve=!!Object.getOwnPropertySymbols&&!ze(function(){var e=Symbol(`symbol detection`);return!Be(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Re&&Re<41}),He=Ve&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Ue=F,We=E,Ge=De,Ke=He,qe=Object,Je=Ke?function(e){return typeof e==`symbol`}:function(e){var t=Ue(`Symbol`);return We(t)&&Ge(t.prototype,qe(e))},Ye=String,Xe=function(e){try{return Ye(e)}catch{return`Object`}},Ze=E,Qe=Xe,$e=TypeError,et=function(e){if(Ze(e))return e;throw new $e(Qe(e)+` is not a function`)},tt=et,nt=he,rt=function(e,t){var n=e[t];return nt(n)?void 0:tt(n)},it=A,at=E,ot=M,st=TypeError,ct=function(e,t){var n,r;if(t===`string`&&at(n=e.toString)&&!ot(r=it(n,e))||at(n=e.valueOf)&&!ot(r=it(n,e))||t!==`string`&&at(n=e.toString)&&!ot(r=it(n,e)))return r;throw new st(`Can't convert object to primitive value`)},lt={exports:{}},ut=!0,dt=o,ft=Object.defineProperty,pt=function(e,t){try{ft(dt,e,{value:t,configurable:!0,writable:!0})}catch{dt[e]=t}return t},mt=o,ht=pt,gt=`__core-js_shared__`,_t=mt[gt]||ht(gt,{}),vt=_t;(lt.exports=function(e,t){return vt[e]||(vt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var yt=lt.exports,bt=ve,xt=Object,St=function(e){return xt(bt(e))},Ct=v,wt=St,Tt=Ct({}.hasOwnProperty),Et=Object.hasOwn||function(e,t){return Tt(wt(e),t)},Dt=v,Ot=0,kt=Math.random(),At=Dt(1 .toString),jt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+At(++Ot+kt,36)},Mt=o,Nt=yt,Pt=Et,Ft=jt,It=Ve,Lt=He,Rt=Mt.Symbol,zt=Nt(`wks`),Bt=Lt?Rt.for||Rt:Rt&&Rt.withoutSetter||Ft,Vt=function(e){return Pt(zt,e)||(zt[e]=It&&Pt(Rt,e)?Rt[e]:Bt(`Symbol.`+e)),zt[e]},Ht=A,Ut=M,Wt=Je,Gt=rt,Kt=ct,qt=Vt,Jt=TypeError,Yt=qt(`toPrimitive`),Xt=function(e,t){if(!Ut(e)||Wt(e))return e;var n=Gt(e,Yt),r;if(n){if(t===void 0&&(t=`default`),r=Ht(n,e,t),!Ut(r)||Wt(r))return r;throw new Jt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Kt(e,t)},Zt=Je,Qt=function(e){var t=Xt(e,`string`);return Zt(t)?t:t+``},$t=o,en=M,tn=$t.document,nn=en(tn)&&en(tn.createElement),rn=function(e){return nn?tn.createElement(e):{}},an=O,on=s,sn=rn,cn=!an&&!on(function(){return Object.defineProperty(sn(`div`),`a`,{get:function(){return 7}}).a!==7}),ln=O,un=A,dn=ae,fn=ce,pn=xe,mn=Qt,hn=Et,gn=cn,_n=Object.getOwnPropertyDescriptor;D.f=ln?_n:function(e,t){if(e=pn(e),t=mn(t),gn)try{return _n(e,t)}catch{}if(hn(e,t))return fn(!un(dn.f,e,t),e[t])};var vn=s,yn=E,bn=/#|\.prototype\./,xn=function(e,t){var n=Cn[Sn(e)];return n===Tn?!0:n===wn?!1:yn(t)?vn(t):!!t},Sn=xn.normalize=function(e){return String(e).replace(bn,`.`).toLowerCase()},Cn=xn.data={},wn=xn.NATIVE=`N`,Tn=xn.POLYFILL=`P`,En=xn,Dn=te,On=et,kn=c,An=Dn(Dn.bind),jn=function(e,t){return On(e),t===void 0?e:kn?An(e,t):function(){return e.apply(t,arguments)}},Mn={},Nn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Pn=M,Fn=String,In=TypeError,Ln=function(e){if(Pn(e))return e;throw new In(Fn(e)+` is not an object`)},Rn=O,zn=cn,Bn=Nn,Vn=Ln,Hn=Qt,Un=TypeError,Wn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Kn=`enumerable`,I=`configurable`,L=`writable`;Mn.f=Rn?Bn?function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&L in n&&!n[L]){var r=Gn(e,t);r&&r[L]&&(e[t]=n.value,n={configurable:I in n?n[I]:r[I],enumerable:Kn in n?n[Kn]:r[Kn],writable:!1})}return Wn(e,t,n)}:Wn:function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),zn)try{return Wn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Un(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var qn=O,Jn=Mn,Yn=ce,Xn=qn?function(e,t,n){return Jn.f(e,t,Yn(1,n))}:function(e,t,n){return e[t]=n,e},Zn=o,Qn=p,$n=te,er=E,tr=D.f,nr=En,rr=we,ir=jn,ar=Xn,or=Et,sr=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Qn(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Zn:i?Zn[n]:(Zn[n]||{}).prototype,s=r?rr:rr[n]||ar(rr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=nr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&or(o,f),m=s[f],u&&(e.dontCallGetSet?(_=tr(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?ir(p,Zn):e.wrap&&u?sr(p):a&&er(p)?$n(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ar(g,`sham`,!0),ar(s,f,g),a&&(d=n+`Prototype`,or(rr,d)||ar(rr,d,{}),ar(rr[d],f,p),e.real&&c&&(l||!c[f])&&ar(c,f,p)))},cr=R,lr=O,ur=Mn.f;cr({target:`Object`,stat:!0,forced:Object.defineProperty!==ur,sham:!lr},{defineProperty:ur});var dr=we.Object,fr=i.exports=function(e,t,n){return dr.defineProperty(e,t,n)};dr.defineProperty.sham&&(fr.sham=!0);var pr=i.exports,mr=pr,hr=r(mr),gr=S,_r=Array.isArray||function(e){return gr(e)===`Array`},vr=Math.ceil,yr=Math.floor,br=Math.trunc||function(e){var t=+e;return(t>0?yr:vr)(t)},xr=function(e){var t=+e;return t!==t||t===0?0:br(t)},Sr=xr,Cr=Math.min,wr=function(e){return e>0?Cr(Sr(e),9007199254740991):0},Tr=function(e){return wr(e.length)},Er=TypeError,Dr=9007199254740991,Or=function(e){if(e>Dr)throw Er(`Maximum allowed index exceeded`);return e},kr=Qt,Ar=Mn,jr=ce,Mr=function(e,t,n){var r=kr(t);r in e?Ar.f(e,r,jr(0,n)):e[r]=n},Nr=Vt(`toStringTag`),Pr={};Pr[Nr]=`z`;var Fr=String(Pr)===`[object z]`,Ir=Fr,Lr=E,Rr=S,zr=Vt(`toStringTag`),Br=Object,Vr=Rr(function(){return arguments}())===`Arguments`,Hr=function(e,t){try{return e[t]}catch{}},Ur=Ir?Rr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Hr(t=Br(e),zr))==`string`?n:Vr?Rr(t):(r=Rr(t))===`Object`&&Lr(t.callee)?`Arguments`:r},Wr=v,Gr=E,Kr=_t,qr=Wr(Function.toString);Gr(Kr.inspectSource)||(Kr.inspectSource=function(e){return qr(e)});var Jr=Kr.inspectSource,Yr=v,Xr=s,Zr=E,Qr=Ur,$r=F,z=Jr,ei=function(){},ti=[],ni=$r(`Reflect`,`construct`),ri=/^\s*(?:class|function)\b/,ii=Yr(ri.exec),ai=!ri.test(ei),oi=function(e){if(!Zr(e))return!1;try{return ni(ei,ti,e),!0}catch{return!1}},si=function(e){if(!Zr(e))return!1;switch(Qr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ai||!!ii(ri,z(e))}catch{return!0}};si.sham=!0;var ci=!ni||Xr(function(){var e;return oi(oi.call)||!oi(Object)||!oi(function(){e=!0})||e})?si:oi,li=_r,ui=ci,di=M,fi=Vt(`species`),pi=Array,mi=function(e){var t;return li(e)&&(t=e.constructor,ui(t)&&(t===pi||li(t.prototype))?t=void 0:di(t)&&(t=t[fi],t===null&&(t=void 0))),t===void 0?pi:t},hi=function(e,t){return new(mi(e))(t===0?0:t)},gi=s,_i=Vt,vi=Le,yi=_i(`species`),bi=function(e){return vi>=51||!gi(function(){var t=[],n=t.constructor={};return n[yi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xi=R,Si=s,Ci=_r,wi=M,Ti=St,Ei=Tr,Di=Or,Oi=Mr,ki=hi,Ai=bi,ji=Vt,Mi=Le,Ni=ji(`isConcatSpreadable`),Pi=Mi>=51||!Si(function(){var e=[];return e[Ni]=!1,e.concat()[0]!==e}),Fi=function(e){if(!wi(e))return!1;var t=e[Ni];return t===void 0?Ci(e):!!t};xi({target:`Array`,proto:!0,arity:1,forced:!Pi||!Ai(`concat`)},{concat:function(e){var t=Ti(this),n=ki(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Fi(c))for(s=Ei(c),Di(r+s),a=0;a<s;a++,r++)a in c&&Oi(n,r,c[a]);else Di(r+1),Oi(n,r++,c);return n.length=r,n}});var Ii=Ur,Li=String,Ri=function(e){if(Ii(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Li(e)},zi={},Bi=xr,Vi=Math.max,Hi=Math.min,Ui=function(e,t){var n=Bi(e);return n<0?Vi(n+t,0):Hi(n,t)},Wi=xe,Gi=Ui,Ki=Tr,qi=function(e){return function(t,n,r){var i=Wi(t),a=Ki(i),o=Gi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ji={includes:qi(!0),indexOf:qi(!1)},Yi={},Xi=v,Zi=Et,Qi=xe,$i=Ji.indexOf,ea=Yi,ta=Xi([].push),na=function(e,t){var n=Qi(e),r=0,i=[],a;for(a in n)!Zi(ea,a)&&Zi(n,a)&&ta(i,a);for(;t.length>r;)Zi(n,a=t[r++])&&(~$i(i,a)||ta(i,a));return i},ra=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ia=na,aa=ra,oa=Object.keys||function(e){return ia(e,aa)},sa=O,ca=Nn,la=Mn,ua=Ln,da=xe,fa=oa;zi.f=sa&&!ca?Object.defineProperties:function(e,t){ua(e);for(var n=da(t),r=fa(t),i=r.length,a=0,o;i>a;)la.f(e,o=r[a++],n[o]);return e};var pa=F(`document`,`documentElement`),ma=yt,ha=jt,ga=ma(`keys`),_a=function(e){return ga[e]||(ga[e]=ha(e))},va=Ln,ya=zi,ba=ra,xa=Yi,Sa=pa,Ca=rn,wa=_a,Ta=`>`,Ea=`<`,Da=`prototype`,Oa=`script`,ka=wa(`IE_PROTO`),Aa=function(){},ja=function(e){return Ea+Oa+Ta+e+Ea+`/`+Oa+Ta},Ma=function(e){e.write(ja(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Na=function(){var e=Ca(`iframe`),t=`java`+Oa+`:`,n;return e.style.display=`none`,Sa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ja(`document.F=Object`)),n.close(),n.F},Pa,Fa=function(){try{Pa=new ActiveXObject(`htmlfile`)}catch{}Fa=typeof document<`u`?document.domain&&Pa?Ma(Pa):Na():Ma(Pa);for(var e=ba.length;e--;)delete Fa[Da][ba[e]];return Fa()};xa[ka]=!0;var Ia=Object.create||function(e,t){var n;return e===null?n=Fa():(Aa[Da]=va(e),n=new Aa,Aa[Da]=null,n[ka]=e),t===void 0?n:ya.f(n,t)},La={},Ra=na,za=ra.concat(`length`,`prototype`);La.f=Object.getOwnPropertyNames||function(e){return Ra(e,za)};var Ba={},Va=Ui,Ha=Tr,Ua=Mr,Wa=Array,Ga=Math.max,Ka=function(e,t,n){for(var r=Ha(e),i=Va(t,r),a=Va(n===void 0?r:n,r),o=Wa(Ga(a-i,0)),s=0;i<a;i++,s++)Ua(o,s,e[i]);return o.length=s,o},qa=S,Ja=xe,Ya=La.f,Xa=Ka,Za=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qa=function(e){try{return Ya(e)}catch{return Xa(Za)}};Ba.f=function(e){return Za&&qa(e)===`Window`?Qa(e):Ya(Ja(e))};var $a={};$a.f=Object.getOwnPropertySymbols;var eo=Xn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Mn,ro=function(e,t,n){return no.f(e,t,n)},io={};io.f=Vt;var ao=we,oo=Et,so=io,co=Mn.f,lo=function(e){var t=ao.Symbol||={};oo(t,e)||co(t,e,{value:so.f(e)})},uo=A,fo=F,po=Vt,mo=to,ho=function(){var e=fo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=po(`toPrimitive`);t&&!t[r]&&mo(t,r,function(e){return uo(n,this)},{arity:1})},go=Fr,_o=Ur,vo=go?{}.toString:function(){return`[object `+_o(this)+`]`},yo=Fr,bo=Mn.f,xo=Xn,So=Et,Co=vo,wo=Vt(`toStringTag`),To=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,wo)||bo(i,wo,{configurable:!0,value:t}),r&&!yo&&xo(i,`toString`,Co)}},Eo=o,Do=E,Oo=Eo.WeakMap,ko=Do(Oo)&&/native code/.test(String(Oo)),Ao=o,jo=M,Mo=Xn,No=Et,Po=_t,Fo=_a,Io=Yi,Lo=`Object already initialized`,Ro=Ao.TypeError,zo=Ao.WeakMap,Bo,Vo,Ho,Uo=function(e){return Ho(e)?Vo(e):Bo(e,{})},Wo=function(e){return function(t){var n;if(!jo(t)||(n=Vo(t)).type!==e)throw new Ro(`Incompatible receiver, `+e+` required`);return n}};if(ko||Po.state){var Go=Po.state||=new zo;Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,Bo=function(e,t){if(Go.has(e))throw new Ro(Lo);return t.facade=e,Go.set(e,t),t},Vo=function(e){return Go.get(e)||{}},Ho=function(e){return Go.has(e)}}else{var Ko=Fo(`state`);Io[Ko]=!0,Bo=function(e,t){if(No(e,Ko))throw new Ro(Lo);return t.facade=e,Mo(e,Ko,t),t},Vo=function(e){return No(e,Ko)?e[Ko]:{}},Ho=function(e){return No(e,Ko)}}var qo={set:Bo,get:Vo,has:Ho,enforce:Uo,getterFor:Wo},Jo=jn,Yo=v,Xo=me,Zo=St,Qo=Tr,$o=hi,es=Yo([].push),ts=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Zo(c),p=Xo(f),m=Jo(l,u),h=Qo(p),g=0,_=d||$o,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:es(v,y)}else switch(e){case 4:return!1;case 7:es(v,y)}return a?-1:r||i?i:v}},ns={forEach:ts(0),map:ts(1),filter:ts(2),some:ts(3),every:ts(4),find:ts(5),findIndex:ts(6),filterReject:ts(7)},rs=R,is=o,as=A,os=v,ss=O,cs=Ve,ls=s,us=Et,ds=De,fs=Ln,ps=xe,ms=Qt,hs=Ri,gs=ce,_s=Ia,vs=oa,ys=La,bs=Ba,xs=$a,Ss=D,Cs=Mn,ws=zi,Ts=ae,Es=to,Ds=ro,Os=yt,ks=_a,As=Yi,js=jt,Ms=Vt,Ns=io,Ps=lo,Fs=ho,Is=To,Ls=qo,Rs=ns.forEach,zs=ks(`hidden`),Bs=`Symbol`,Vs=`prototype`,Hs=Ls.set,Us=Ls.getterFor(Bs),Ws=Object[Vs],Gs=is.Symbol,Ks=Gs&&Gs[Vs],qs=is.RangeError,Js=is.TypeError,Ys=is.QObject,Xs=Ss.f,Zs=Cs.f,Qs=bs.f,$s=Ts.f,ec=os([].push),tc=Os(`symbols`),nc=Os(`op-symbols`),rc=Os(`wks`),ic=!Ys||!Ys[Vs]||!Ys[Vs].findChild,ac=function(e,t,n){var r=Xs(Ws,t);r&&delete Ws[t],Zs(e,t,n),r&&e!==Ws&&Zs(Ws,t,r)},oc=ss&&ls(function(){return _s(Zs({},`a`,{get:function(){return Zs(this,`a`,{value:7}).a}})).a!==7})?ac:Zs,sc=function(e,t){var n=tc[e]=_s(Ks);return Hs(n,{type:Bs,tag:e,description:t}),ss||(n.description=t),n},cc=function(e,t,n){e===Ws&&cc(nc,t,n),fs(e);var r=ms(t);return fs(n),us(tc,r)?(n.enumerable?(us(e,zs)&&e[zs][r]&&(e[zs][r]=!1),n=_s(n,{enumerable:gs(0,!1)})):(us(e,zs)||Zs(e,zs,gs(1,{})),e[zs][r]=!0),oc(e,r,n)):Zs(e,r,n)},lc=function(e,t){fs(e);var n=ps(t);return Rs(vs(n).concat(mc(n)),function(t){(!ss||as(dc,n,t))&&cc(e,t,n[t])}),e},uc=function(e,t){return t===void 0?_s(e):lc(_s(e),t)},dc=function(e){var t=ms(e),n=as($s,this,t);return this===Ws&&us(tc,t)&&!us(nc,t)?!1:n||!us(this,t)||!us(tc,t)||us(this,zs)&&this[zs][t]?n:!0},fc=function(e,t){var n=ps(e),r=ms(t);if(!(n===Ws&&us(tc,r)&&!us(nc,r))){var i=Xs(n,r);return i&&us(tc,r)&&!(us(n,zs)&&n[zs][r])&&(i.enumerable=!0),i}},pc=function(e){var t=Qs(ps(e)),n=[];return Rs(t,function(e){!us(tc,e)&&!us(As,e)&&ec(n,e)}),n},mc=function(e){var t=e===Ws,n=Qs(t?nc:ps(e)),r=[];return Rs(n,function(e){us(tc,e)&&(!t||us(Ws,e))&&ec(r,tc[e])}),r};cs||(Gs=function(){if(ds(Ks,this))throw new Js(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:hs(arguments[0]),t=js(e),n=function(e){var r=this===void 0?is:this;r===Ws&&as(n,nc,e),us(r,zs)&&us(r[zs],t)&&(r[zs][t]=!1);var i=gs(1,e);try{oc(r,t,i)}catch(e){if(!(e instanceof qs))throw e;ac(r,t,i)}};return ss&&ic&&oc(Ws,t,{configurable:!0,set:n}),sc(t,e)},Ks=Gs[Vs],Es(Ks,`toString`,function(){return Us(this).tag}),Es(Gs,`withoutSetter`,function(e){return sc(js(e),e)}),Ts.f=dc,Cs.f=cc,ws.f=lc,Ss.f=fc,ys.f=bs.f=pc,xs.f=mc,Ns.f=function(e){return sc(Ms(e),e)},ss&&Ds(Ks,`description`,{configurable:!0,get:function(){return Us(this).description}})),rs({global:!0,constructor:!0,wrap:!0,forced:!cs,sham:!cs},{Symbol:Gs}),Rs(vs(rc),function(e){Ps(e)}),rs({target:Bs,stat:!0,forced:!cs},{useSetter:function(){ic=!0},useSimple:function(){ic=!1}}),rs({target:`Object`,stat:!0,forced:!cs,sham:!ss},{create:uc,defineProperty:cc,defineProperties:lc,getOwnPropertyDescriptor:fc}),rs({target:`Object`,stat:!0,forced:!cs},{getOwnPropertyNames:pc}),Fs(),Is(Gs,Bs),As[zs]=!0;var hc=Ve&&!!Symbol.for&&!!Symbol.keyFor,gc=R,_c=F,vc=Et,yc=Ri,bc=yt,xc=hc,Sc=bc(`string-to-symbol-registry`),B=bc(`symbol-to-string-registry`);gc({target:`Symbol`,stat:!0,forced:!xc},{for:function(e){var t=yc(e);if(vc(Sc,t))return Sc[t];var n=_c(`Symbol`)(t);return Sc[t]=n,B[n]=t,n}});var Cc=R,wc=Et,Tc=Je,Ec=Xe,Dc=yt,Oc=hc,kc=Dc(`symbol-to-string-registry`);Cc({target:`Symbol`,stat:!0,forced:!Oc},{keyFor:function(e){if(!Tc(e))throw TypeError(Ec(e)+` is not a symbol`);if(wc(kc,e))return kc[e]}});var Ac=v([].slice),jc=v,Mc=_r,Nc=E,Pc=S,Fc=Ri,Ic=jc([].push),Lc=function(e){if(Nc(e))return e;if(Mc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Ic(n,i):(typeof i==`number`||Pc(i)===`Number`||Pc(i)===`String`)&&Ic(n,Fc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Mc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Rc=R,zc=F,Bc=p,Vc=A,Hc=v,Uc=s,Wc=E,Gc=Je,Kc=Ac,qc=Lc,Jc=Ve,Yc=String,Xc=zc(`JSON`,`stringify`),Zc=Hc(/./.exec),Qc=Hc(``.charAt),$c=Hc(``.charCodeAt),el=Hc(``.replace),tl=Hc(1 .toString),nl=/[\uD800-\uDFFF]/g,rl=/^[\uD800-\uDBFF]$/,il=/^[\uDC00-\uDFFF]$/,al=!Jc||Uc(function(){var e=zc(`Symbol`)(`stringify detection`);return Xc([e])!==`[null]`||Xc({a:e})!==`{}`||Xc(Object(e))!==`{}`}),ol=Uc(function(){return Xc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Xc(`\udead`)!==`"\\udead"`}),sl=function(e,t){var n=Kc(arguments),r=qc(t);if(!(!Wc(r)&&(e===void 0||Gc(e))))return n[1]=function(e,t){if(Wc(r)&&(t=Vc(r,this,Yc(e),t)),!Gc(t))return t},Bc(Xc,null,n)},cl=function(e,t,n){var r=Qc(n,t-1),i=Qc(n,t+1);return Zc(rl,e)&&!Zc(il,i)||Zc(il,e)&&!Zc(rl,r)?`\\u`+tl($c(e,0),16):e};Xc&&Rc({target:`JSON`,stat:!0,arity:3,forced:al||ol},{stringify:function(e,t,n){var r=Kc(arguments),i=Bc(al?sl:Xc,null,r);return ol&&typeof i==`string`?el(i,nl,cl):i}});var ll=R,ul=Ve,dl=s,fl=$a,pl=St;ll({target:`Object`,stat:!0,forced:!ul||dl(function(){fl.f(1)})},{getOwnPropertySymbols:function(e){var t=fl.f;return t?t(pl(e)):[]}}),lo(`asyncIterator`),lo(`hasInstance`),lo(`isConcatSpreadable`),lo(`iterator`),lo(`match`),lo(`matchAll`),lo(`replace`),lo(`search`),lo(`species`),lo(`split`);var ml=lo,hl=ho;ml(`toPrimitive`),hl();var gl=F,_l=lo,vl=To;_l(`toStringTag`),vl(gl(`Symbol`),`Symbol`),lo(`unscopables`),To(o.JSON,`JSON`,!0);var yl=we.Symbol,bl={},xl=O,Sl=Et,Cl=Function.prototype,wl=xl&&Object.getOwnPropertyDescriptor,Tl=Sl(Cl,`name`),El={EXISTS:Tl,PROPER:Tl&&(function(){}).name===`something`,CONFIGURABLE:Tl&&(!xl||xl&&wl(Cl,`name`).configurable)},Dl=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ol=Et,kl=E,Al=St,jl=_a,Ml=Dl,Nl=jl(`IE_PROTO`),Pl=Object,Fl=Pl.prototype,Il=Ml?Pl.getPrototypeOf:function(e){var t=Al(e);if(Ol(t,Nl))return t[Nl];var n=t.constructor;return kl(n)&&t instanceof n?n.prototype:t instanceof Pl?Fl:null},Ll=s,Rl=E,zl=M,Bl=Ia,Vl=Il,Hl=to,Ul=Vt(`iterator`),Wl=!1,Gl,Kl,ql;[].keys&&(ql=[].keys(),`next`in ql?(Kl=Vl(Vl(ql)),Kl!==Object.prototype&&(Gl=Kl)):Wl=!0),Gl=!zl(Gl)||Ll(function(){var e={};return Gl[Ul].call(e)!==e})?{}:Bl(Gl),Rl(Gl[Ul])||Hl(Gl,Ul,function(){return this});var Jl={IteratorPrototype:Gl,BUGGY_SAFARI_ITERATORS:Wl},Yl=Jl.IteratorPrototype,Xl=Ia,Zl=ce,Ql=To,$l=bl,eu=function(){return this},tu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Xl(Yl,{next:Zl(+!r,n)}),Ql(e,i,!1,!0),$l[i]=eu,e},nu=v,ru=et,iu=function(e,t,n){try{return nu(ru(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},au=E,ou=String,su=TypeError,cu=function(e){if(typeof e==`object`||au(e))return e;throw new su(`Can't set `+ou(e)+` as a prototype`)},lu=iu,uu=Ln,du=cu,fu=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=lu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return uu(t),du(r),e?n(t,r):t.__proto__=r,t}}():void 0),pu=R,mu=A,hu=El,gu=tu,_u=Il,vu=To,yu=to,bu=Vt,xu=bl,Su=Jl,Cu=hu.PROPER;hu.CONFIGURABLE,Su.IteratorPrototype;var wu=Su.BUGGY_SAFARI_ITERATORS,Tu=bu(`iterator`),Eu=`keys`,Du=`values`,Ou=`entries`,ku=function(){return this},Au=function(e,t,n,r,i,a,o){gu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!wu&&e&&e in u)return u[e];switch(e){case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)};case Ou:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[Tu]||u[`@@iterator`]||i&&u[i],f=!wu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=_u(p.call(new e)),m!==Object.prototype&&m.next&&(vu(m,c,!0,!0),xu[c]=ku)),Cu&&i===Du&&d&&d.name!==Du&&(l=!0,f=function(){return mu(d,this)}),i)if(h={values:s(Du),keys:a?f:s(Eu),entries:s(Ou)},o)for(g in h)(wu||l||!(g in u))&&yu(u,g,h[g]);else pu({target:t,proto:!0,forced:wu||l},h);return o&&u[Tu]!==f&&yu(u,Tu,f,{name:i}),xu[t]=f,h},ju=function(e,t){return{value:e,done:t}},Mu=xe,Nu=bl,Pu=qo;Mn.f;var Fu=Au,Iu=ju,Lu=`Array Iterator`,Ru=Pu.set,zu=Pu.getterFor(Lu);Fu(Array,`Array`,function(e,t){Ru(this,{type:Lu,target:Mu(e),index:0,kind:t})},function(){var e=zu(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Iu(void 0,!0);switch(e.kind){case`keys`:return Iu(n,!1);case`values`:return Iu(t[n],!1)}return Iu([n,t[n]],!1)},`values`),Nu.Arguments=Nu.Array;var Bu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vu=o,Hu=Ur,Uu=Xn,Wu=bl,Gu=Vt(`toStringTag`);for(var Ku in Bu){var qu=Vu[Ku],Ju=qu&&qu.prototype;Ju&&Hu(Ju)!==Gu&&Uu(Ju,Gu,Ku),Wu[Ku]=Wu.Array}var Yu=yl,Xu=Vt,Zu=Mn.f,Qu=Xu(`metadata`),$u=Function.prototype;$u[Qu]===void 0&&Zu($u,Qu,{value:null}),lo(`asyncDispose`),lo(`dispose`),lo(`metadata`);var ed=Yu,td=F,nd=v,rd=td(`Symbol`),id=rd.keyFor,ad=nd(rd.prototype.valueOf),od=rd.isRegisteredSymbol||function(e){try{return id(ad(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:od});for(var sd=yt,cd=F,ld=v,ud=Je,dd=Vt,fd=cd(`Symbol`),pd=fd.isWellKnownSymbol,md=cd(`Object`,`getOwnPropertyNames`),hd=ld(fd.prototype.valueOf),gd=sd(`wks`),_d=0,vd=md(fd),yd=vd.length;_d<yd;_d++)try{var bd=vd[_d];ud(fd[bd])&&dd(bd)}catch{}var xd=function(e){if(pd&&pd(e))return!0;try{for(var t=hd(e),n=0,r=md(gd),i=r.length;n<i;n++)if(gd[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:xd}),lo(`matcher`),lo(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:od}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:xd}),lo(`metadataKey`),lo(`patternMatch`),lo(`replaceAll`);var Sd=ed,Cd=r(Sd),wd=v,Td=xr,Ed=Ri,Dd=ve,Od=wd(``.charAt),kd=wd(``.charCodeAt),Ad=wd(``.slice),jd=function(e){return function(t,n){var r=Ed(Dd(t)),i=Td(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=kd(r,i),o<55296||o>56319||i+1===a||(s=kd(r,i+1))<56320||s>57343?e?Od(r,i):o:e?Ad(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Md={codeAt:jd(!1),charAt:jd(!0)}.charAt,Nd=Ri,Pd=qo,Fd=Au,Id=ju,Ld=`String Iterator`,Rd=Pd.set,zd=Pd.getterFor(Ld);Fd(String,`String`,function(e){Rd(this,{type:Ld,string:Nd(e),index:0})},function(){var e=zd(this),t=e.string,n=e.index,r;return n>=t.length?Id(void 0,!0):(r=Md(t,n),e.index+=r.length,Id(r,!1))});var Bd=io.f(`iterator`),Vd=Bd,Hd=r(Vd);function Ud(e){"@babel/helpers - typeof";return Ud=typeof Cd==`function`&&typeof Hd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Cd==`function`&&e.constructor===Cd&&e!==Cd.prototype?`symbol`:typeof e},Ud(e)}var Wd=r(io.f(`toPrimitive`));function Gd(e,t){if(Ud(e)!==`object`||e===null)return e;var n=e[Wd];if(n!==void 0){var r=n.call(e,t||`default`);if(Ud(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Kd(e){var t=Gd(e,`string`);return Ud(t)===`symbol`?t:String(t)}function qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),hr(e,Kd(r.key),r)}}function Jd(e,t,n){return t&&qd(e.prototype,t),n&&qd(e,n),hr(e,`prototype`,{writable:!1}),e}function Yd(e,t,n){return t=Kd(t),t in e?hr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xd=v,Zd=et,Qd=M,$d=Et,ef=Ac,tf=c,nf=Function,rf=Xd([].concat),af=Xd([].join),of={},sf=function(e,t,n){if(!$d(of,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;of[t]=nf(`C,a`,`return new C(`+af(r,`,`)+`)`)}return of[t](e,n)},cf=tf?nf.bind:function(e){var t=Zd(this),n=t.prototype,r=ef(arguments,1),i=function(){var n=rf(r,ef(arguments));return this instanceof i?sf(t,n.length,n):t.apply(e,n)};return Qd(n)&&(i.prototype=n),i},lf=R,uf=cf;lf({target:`Function`,proto:!0,forced:Function.bind!==uf},{bind:uf});var df=o,ff=we,pf=function(e,t){var n=ff[e+`Prototype`],r=n&&n[t];if(r)return r;var i=df[e],a=i&&i.prototype;return a&&a[t]},mf=pf(`Function`,`bind`),hf=De,gf=mf,_f=Function.prototype,vf=function(e){var t=e.bind;return e===_f||hf(_f,e)&&t===_f.bind?gf:t},yf=r(vf),bf=et,xf=St,Sf=me,Cf=Tr,wf=TypeError,Tf=function(e){return function(t,n,r,i){bf(n);var a=xf(t),o=Sf(a),s=Cf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new wf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Ef={left:Tf(!1),right:Tf(!0)},V=s,Df=function(e,t){var n=[][e];return!!n&&V(function(){n.call(null,t||function(){return 1},1)})},Of=S(o.process)===`process`,kf=R,Af=Ef.left,jf=Df,Mf=Le;kf({target:`Array`,proto:!0,forced:!Of&&Mf>79&&Mf<83||!jf(`reduce`)},{reduce:function(e){var t=arguments.length;return Af(this,e,t,t>1?arguments[1]:void 0)}});var Nf=pf(`Array`,`reduce`),Pf=De,Ff=Nf,If=Array.prototype,Lf=r(function(e){var t=e.reduce;return e===If||Pf(If,e)&&t===If.reduce?Ff:t}),Rf=R,zf=ns.filter;Rf({target:`Array`,proto:!0,forced:!bi(`filter`)},{filter:function(e){return zf(this,e,arguments.length>1?arguments[1]:void 0)}});var Bf=pf(`Array`,`filter`),Vf=De,Hf=Bf,Uf=Array.prototype,Wf=r(function(e){var t=e.filter;return e===Uf||Vf(Uf,e)&&t===Uf.filter?Hf:t}),Gf=R,Kf=ns.map;Gf({target:`Array`,proto:!0,forced:!bi(`map`)},{map:function(e){return Kf(this,e,arguments.length>1?arguments[1]:void 0)}});var qf=pf(`Array`,`map`),Jf=De,Yf=qf,Xf=Array.prototype,Zf=r(function(e){var t=e.map;return e===Xf||Jf(Xf,e)&&t===Xf.map?Yf:t}),Qf=_r,$f=Tr,ep=Or,tp=jn,np=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?tp(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Qf(d)?(f=$f(d),c=np(e,t,d,f,c,a-1)-1):(ep(c+1),e[c]=d),c++),l++;return c},rp=np,ip=R,ap=rp,op=et,sp=St,cp=Tr,lp=hi;ip({target:`Array`,proto:!0},{flatMap:function(e){var t=sp(this),n=cp(t),r;return op(e),r=lp(t,0),r.length=ap(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var up=pf(`Array`,`flatMap`),dp=De,fp=up,pp=Array.prototype,mp=r(function(e){var t=e.flatMap;return e===pp||dp(pp,e)&&t===pp.flatMap?fp:t});function hp(e){return new _p(e)}var gp=function(){function e(n,r,i){var a,o,s;t(this,e),Yd(this,`_listeners`,{add:yf(a=this._add).call(a,this),remove:yf(o=this._remove).call(o,this),update:yf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Jd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Lf(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),_p=function(){function e(n){t(this,e),Yd(this,`_transformers`,[]),this._source=n}return Jd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Wf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Zf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return mp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new gp(this._source,this._transformers,e)}}]),e}(),vp=A,yp=Ln,bp=rt,xp=function(e,t,n){var r,i;yp(e);try{if(r=bp(e,`return`),!r){if(t===`throw`)throw n;return n}r=vp(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return yp(r),n},Sp=Ln,Cp=xp,wp=function(e,t,n,r){try{return r?t(Sp(n)[0],n[1]):t(n)}catch(t){Cp(e,`throw`,t)}},Tp=Vt,Ep=bl,Dp=Tp(`iterator`),Op=Array.prototype,kp=function(e){return e!==void 0&&(Ep.Array===e||Op[Dp]===e)},Ap=Ur,jp=rt,Mp=he,Np=bl,Pp=Vt(`iterator`),Fp=function(e){if(!Mp(e))return jp(e,Pp)||jp(e,`@@iterator`)||Np[Ap(e)]},Ip=A,Lp=et,Rp=Ln,zp=Xe,Bp=Fp,Vp=TypeError,Hp=function(e,t){var n=arguments.length<2?Bp(e):t;if(Lp(n))return Rp(Ip(n,e));throw new Vp(zp(e)+` is not iterable`)},Up=jn,Wp=A,Gp=St,Kp=wp,qp=kp,Jp=ci,Yp=Tr,Xp=Mr,Zp=Hp,Qp=Fp,$p=Array,em=function(e){var t=Gp(e),n=Jp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Up(i,r>2?arguments[2]:void 0));var o=Qp(t),s=0,c,l,u,d,f,p;if(o&&!(this===$p&&qp(o)))for(d=Zp(t,o),f=d.next,l=n?new this:[];!(u=Wp(f,d)).done;s++)p=a?Kp(d,i,[u.value,s],!0):u.value,Xp(l,s,p);else for(c=Yp(t),l=n?new this(c):$p(c);c>s;s++)p=a?i(t[s],s):t[s],Xp(l,s,p);return l.length=s,l},tm=Vt(`iterator`),nm=!1;try{var rm=0,im={next:function(){return{done:!!rm++}},return:function(){nm=!0}};im[tm]=function(){return this},Array.from(im,function(){throw 2})}catch{}var am=function(e,t){try{if(!t&&!nm)return!1}catch{return!1}var n=!1;try{var r={};r[tm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},om=R,sm=em;om({target:`Array`,stat:!0,forced:!am(function(e){Array.from(e)})},{from:sm});var cm=we.Array.from,lm=r(cm),um=Fp,dm=r(um),fm=r(um);R({target:`Array`,stat:!0},{isArray:_r});var pm=we.Array.isArray,mm=r(pm);function hm(e){if(mm(e))return e}var gm=O,_m=_r,vm=TypeError,ym=Object.getOwnPropertyDescriptor,bm=gm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(_m(e)&&!ym(e,`length`).writable)throw new vm(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},xm=R,Sm=St,Cm=Tr,wm=bm,Tm=Or;xm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Sm(this),n=Cm(t),r=arguments.length;Tm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return wm(t,n),n}});var Em=pf(`Array`,`push`),Dm=De,Om=Em,km=Array.prototype,Am=function(e){var t=e.push;return e===km||Dm(km,e)&&t===km.push?Om:t},jm=r(Am);function Mm(e,t){var n=e==null?null:Cd!==void 0&&dm(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(jm(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Nm=R,Pm=_r,Fm=ci,Im=M,Lm=Ui,Rm=Tr,zm=xe,Bm=Mr,Vm=Vt,Hm=bi,Um=Ac,Wm=Hm(`slice`),Gm=Vm(`species`),Km=Array,qm=Math.max;Nm({target:`Array`,proto:!0,forced:!Wm},{slice:function(e,t){var n=zm(this),r=Rm(n),i=Lm(e,r),a=Lm(t===void 0?r:t,r),o,s,c;if(Pm(n)&&(o=n.constructor,Fm(o)&&(o===Km||Pm(o.prototype))?o=void 0:Im(o)&&(o=o[Gm],o===null&&(o=void 0)),o===Km||o===void 0))return Um(n,i,a);for(s=new(o===void 0?Km:o)(qm(a-i,0)),c=0;i<a;i++,c++)i in n&&Bm(s,c,n[i]);return s.length=c,s}});var Jm=pf(`Array`,`slice`),Ym=De,Xm=Jm,Zm=Array.prototype,Qm=function(e){var t=e.slice;return e===Zm||Ym(Zm,e)&&t===Zm.slice?Xm:t},$m=Qm,eh=r($m),th=r(cm);function nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n;if(e){if(typeof e==`string`)return nh(e,t);var r=eh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return th(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nh(e,t)}}function ih(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{o as e,t}from"./chunk-DD-I1_y5.js";import{a as n,f as r,h as i,s as a}from"./brand-Bm671owU.js";import{a as o,d as s,f as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,u as g}from"./graph-labels-qhU8xZDH.js";import{t as _}from"./Checkbox-YIF0payo.js";var v=r(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),y=r(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),b=r(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),x=r(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),S=r(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ee=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},ne=typeof document==`object`&&document.all,re={all:ne,IS_HTMLDDA:ne===void 0&&ne!==void 0},w=re,T=w.all,E=w.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,k=Function.prototype.call,A=ie?k.bind(k):function(){return k.apply(k,arguments)},ae={},oe={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor;ae.f=se&&!oe.call({1:2},1)?function(e){var t=se(this,e);return!!t&&t.enumerable}:oe;var ce=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},le=v,ue=s,de=S,fe=Object,pe=le(``.split),me=ue(function(){return!fe(`z`).propertyIsEnumerable(0)})?function(e){return de(e)===`String`?pe(e,``):fe(e)}:fe,he=function(e){return e==null},ge=he,_e=TypeError,ve=function(e){if(ge(e))throw new _e(`Can't call method on `+e);return e},ye=me,be=ve,xe=function(e){return ye(be(e))},Se=E,Ce=re,j=Ce.all,M=Ce.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===j}:function(e){return typeof e==`object`?e!==null:Se(e)},we={},Te=we,N=o,Ee=E,P=function(e){return Ee(e)?e:void 0},F=function(e,t){return arguments.length<2?P(Te[e])||P(N[e]):Te[e]&&Te[e][t]||N[e]&&N[e][t]},De=v({}.isPrototypeOf),Oe=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=Oe,je=ke.process,Me=ke.Deno,Ne=je&&je.versions||Me&&Me.version,Pe=Ne&&Ne.v8,Fe,Ie;Pe&&(Fe=Pe.split(`.`),Ie=Fe[0]>0&&Fe[0]<4?1:+(Fe[0]+Fe[1])),!Ie&&Ae&&(Fe=Ae.match(/Edge\/(\d+)/),(!Fe||Fe[1]>=74)&&(Fe=Ae.match(/Chrome\/(\d+)/),Fe&&(Ie=+Fe[1])));var Le=Ie,Re=Le,ze=s,Be=o.String,Ve=!!Object.getOwnPropertySymbols&&!ze(function(){var e=Symbol(`symbol detection`);return!Be(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Re&&Re<41}),He=Ve&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Ue=F,We=E,Ge=De,Ke=He,qe=Object,Je=Ke?function(e){return typeof e==`symbol`}:function(e){var t=Ue(`Symbol`);return We(t)&&Ge(t.prototype,qe(e))},Ye=String,Xe=function(e){try{return Ye(e)}catch{return`Object`}},Ze=E,Qe=Xe,$e=TypeError,et=function(e){if(Ze(e))return e;throw new $e(Qe(e)+` is not a function`)},tt=et,nt=he,rt=function(e,t){var n=e[t];return nt(n)?void 0:tt(n)},it=A,at=E,ot=M,st=TypeError,ct=function(e,t){var n,r;if(t===`string`&&at(n=e.toString)&&!ot(r=it(n,e))||at(n=e.valueOf)&&!ot(r=it(n,e))||t!==`string`&&at(n=e.toString)&&!ot(r=it(n,e)))return r;throw new st(`Can't convert object to primitive value`)},lt={exports:{}},ut=!0,dt=o,ft=Object.defineProperty,pt=function(e,t){try{ft(dt,e,{value:t,configurable:!0,writable:!0})}catch{dt[e]=t}return t},mt=o,ht=pt,gt=`__core-js_shared__`,_t=mt[gt]||ht(gt,{}),vt=_t;(lt.exports=function(e,t){return vt[e]||(vt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var yt=lt.exports,bt=ve,xt=Object,St=function(e){return xt(bt(e))},Ct=v,wt=St,Tt=Ct({}.hasOwnProperty),Et=Object.hasOwn||function(e,t){return Tt(wt(e),t)},Dt=v,Ot=0,kt=Math.random(),At=Dt(1 .toString),jt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+At(++Ot+kt,36)},Mt=o,Nt=yt,Pt=Et,Ft=jt,It=Ve,Lt=He,Rt=Mt.Symbol,zt=Nt(`wks`),Bt=Lt?Rt.for||Rt:Rt&&Rt.withoutSetter||Ft,Vt=function(e){return Pt(zt,e)||(zt[e]=It&&Pt(Rt,e)?Rt[e]:Bt(`Symbol.`+e)),zt[e]},Ht=A,Ut=M,Wt=Je,Gt=rt,Kt=ct,qt=Vt,Jt=TypeError,Yt=qt(`toPrimitive`),Xt=function(e,t){if(!Ut(e)||Wt(e))return e;var n=Gt(e,Yt),r;if(n){if(t===void 0&&(t=`default`),r=Ht(n,e,t),!Ut(r)||Wt(r))return r;throw new Jt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Kt(e,t)},Zt=Je,Qt=function(e){var t=Xt(e,`string`);return Zt(t)?t:t+``},$t=o,en=M,tn=$t.document,nn=en(tn)&&en(tn.createElement),rn=function(e){return nn?tn.createElement(e):{}},an=O,on=s,sn=rn,cn=!an&&!on(function(){return Object.defineProperty(sn(`div`),`a`,{get:function(){return 7}}).a!==7}),ln=O,un=A,dn=ae,fn=ce,pn=xe,mn=Qt,hn=Et,gn=cn,_n=Object.getOwnPropertyDescriptor;D.f=ln?_n:function(e,t){if(e=pn(e),t=mn(t),gn)try{return _n(e,t)}catch{}if(hn(e,t))return fn(!un(dn.f,e,t),e[t])};var vn=s,yn=E,bn=/#|\.prototype\./,xn=function(e,t){var n=Cn[Sn(e)];return n===Tn?!0:n===wn?!1:yn(t)?vn(t):!!t},Sn=xn.normalize=function(e){return String(e).replace(bn,`.`).toLowerCase()},Cn=xn.data={},wn=xn.NATIVE=`N`,Tn=xn.POLYFILL=`P`,En=xn,Dn=te,On=et,kn=c,An=Dn(Dn.bind),jn=function(e,t){return On(e),t===void 0?e:kn?An(e,t):function(){return e.apply(t,arguments)}},Mn={},Nn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Pn=M,Fn=String,In=TypeError,Ln=function(e){if(Pn(e))return e;throw new In(Fn(e)+` is not an object`)},Rn=O,zn=cn,Bn=Nn,Vn=Ln,Hn=Qt,Un=TypeError,Wn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Kn=`enumerable`,I=`configurable`,L=`writable`;Mn.f=Rn?Bn?function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&L in n&&!n[L]){var r=Gn(e,t);r&&r[L]&&(e[t]=n.value,n={configurable:I in n?n[I]:r[I],enumerable:Kn in n?n[Kn]:r[Kn],writable:!1})}return Wn(e,t,n)}:Wn:function(e,t,n){if(Vn(e),t=Hn(t),Vn(n),zn)try{return Wn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Un(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var qn=O,Jn=Mn,Yn=ce,Xn=qn?function(e,t,n){return Jn.f(e,t,Yn(1,n))}:function(e,t,n){return e[t]=n,e},Zn=o,Qn=p,$n=te,er=E,tr=D.f,nr=En,rr=we,ir=jn,ar=Xn,or=Et,sr=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Qn(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Zn:i?Zn[n]:(Zn[n]||{}).prototype,s=r?rr:rr[n]||ar(rr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=nr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&or(o,f),m=s[f],u&&(e.dontCallGetSet?(_=tr(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?ir(p,Zn):e.wrap&&u?sr(p):a&&er(p)?$n(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ar(g,`sham`,!0),ar(s,f,g),a&&(d=n+`Prototype`,or(rr,d)||ar(rr,d,{}),ar(rr[d],f,p),e.real&&c&&(l||!c[f])&&ar(c,f,p)))},cr=R,lr=O,ur=Mn.f;cr({target:`Object`,stat:!0,forced:Object.defineProperty!==ur,sham:!lr},{defineProperty:ur});var dr=we.Object,fr=i.exports=function(e,t,n){return dr.defineProperty(e,t,n)};dr.defineProperty.sham&&(fr.sham=!0);var pr=i.exports,mr=pr,hr=r(mr),gr=S,_r=Array.isArray||function(e){return gr(e)===`Array`},vr=Math.ceil,yr=Math.floor,br=Math.trunc||function(e){var t=+e;return(t>0?yr:vr)(t)},xr=function(e){var t=+e;return t!==t||t===0?0:br(t)},Sr=xr,Cr=Math.min,wr=function(e){return e>0?Cr(Sr(e),9007199254740991):0},Tr=function(e){return wr(e.length)},Er=TypeError,Dr=9007199254740991,Or=function(e){if(e>Dr)throw Er(`Maximum allowed index exceeded`);return e},kr=Qt,Ar=Mn,jr=ce,Mr=function(e,t,n){var r=kr(t);r in e?Ar.f(e,r,jr(0,n)):e[r]=n},Nr=Vt(`toStringTag`),Pr={};Pr[Nr]=`z`;var Fr=String(Pr)===`[object z]`,Ir=Fr,Lr=E,Rr=S,zr=Vt(`toStringTag`),Br=Object,Vr=Rr(function(){return arguments}())===`Arguments`,Hr=function(e,t){try{return e[t]}catch{}},Ur=Ir?Rr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Hr(t=Br(e),zr))==`string`?n:Vr?Rr(t):(r=Rr(t))===`Object`&&Lr(t.callee)?`Arguments`:r},Wr=v,Gr=E,Kr=_t,qr=Wr(Function.toString);Gr(Kr.inspectSource)||(Kr.inspectSource=function(e){return qr(e)});var Jr=Kr.inspectSource,Yr=v,Xr=s,Zr=E,Qr=Ur,$r=F,z=Jr,ei=function(){},ti=[],ni=$r(`Reflect`,`construct`),ri=/^\s*(?:class|function)\b/,ii=Yr(ri.exec),ai=!ri.test(ei),oi=function(e){if(!Zr(e))return!1;try{return ni(ei,ti,e),!0}catch{return!1}},si=function(e){if(!Zr(e))return!1;switch(Qr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ai||!!ii(ri,z(e))}catch{return!0}};si.sham=!0;var ci=!ni||Xr(function(){var e;return oi(oi.call)||!oi(Object)||!oi(function(){e=!0})||e})?si:oi,li=_r,ui=ci,di=M,fi=Vt(`species`),pi=Array,mi=function(e){var t;return li(e)&&(t=e.constructor,ui(t)&&(t===pi||li(t.prototype))?t=void 0:di(t)&&(t=t[fi],t===null&&(t=void 0))),t===void 0?pi:t},hi=function(e,t){return new(mi(e))(t===0?0:t)},gi=s,_i=Vt,vi=Le,yi=_i(`species`),bi=function(e){return vi>=51||!gi(function(){var t=[],n=t.constructor={};return n[yi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xi=R,Si=s,Ci=_r,wi=M,Ti=St,Ei=Tr,Di=Or,Oi=Mr,ki=hi,Ai=bi,ji=Vt,Mi=Le,Ni=ji(`isConcatSpreadable`),Pi=Mi>=51||!Si(function(){var e=[];return e[Ni]=!1,e.concat()[0]!==e}),Fi=function(e){if(!wi(e))return!1;var t=e[Ni];return t===void 0?Ci(e):!!t};xi({target:`Array`,proto:!0,arity:1,forced:!Pi||!Ai(`concat`)},{concat:function(e){var t=Ti(this),n=ki(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Fi(c))for(s=Ei(c),Di(r+s),a=0;a<s;a++,r++)a in c&&Oi(n,r,c[a]);else Di(r+1),Oi(n,r++,c);return n.length=r,n}});var Ii=Ur,Li=String,Ri=function(e){if(Ii(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Li(e)},zi={},Bi=xr,Vi=Math.max,Hi=Math.min,Ui=function(e,t){var n=Bi(e);return n<0?Vi(n+t,0):Hi(n,t)},Wi=xe,Gi=Ui,Ki=Tr,qi=function(e){return function(t,n,r){var i=Wi(t),a=Ki(i),o=Gi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ji={includes:qi(!0),indexOf:qi(!1)},Yi={},Xi=v,Zi=Et,Qi=xe,$i=Ji.indexOf,ea=Yi,ta=Xi([].push),na=function(e,t){var n=Qi(e),r=0,i=[],a;for(a in n)!Zi(ea,a)&&Zi(n,a)&&ta(i,a);for(;t.length>r;)Zi(n,a=t[r++])&&(~$i(i,a)||ta(i,a));return i},ra=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ia=na,aa=ra,oa=Object.keys||function(e){return ia(e,aa)},sa=O,ca=Nn,la=Mn,ua=Ln,da=xe,fa=oa;zi.f=sa&&!ca?Object.defineProperties:function(e,t){ua(e);for(var n=da(t),r=fa(t),i=r.length,a=0,o;i>a;)la.f(e,o=r[a++],n[o]);return e};var pa=F(`document`,`documentElement`),ma=yt,ha=jt,ga=ma(`keys`),_a=function(e){return ga[e]||(ga[e]=ha(e))},va=Ln,ya=zi,ba=ra,xa=Yi,Sa=pa,Ca=rn,wa=_a,Ta=`>`,Ea=`<`,Da=`prototype`,Oa=`script`,ka=wa(`IE_PROTO`),Aa=function(){},ja=function(e){return Ea+Oa+Ta+e+Ea+`/`+Oa+Ta},Ma=function(e){e.write(ja(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Na=function(){var e=Ca(`iframe`),t=`java`+Oa+`:`,n;return e.style.display=`none`,Sa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ja(`document.F=Object`)),n.close(),n.F},Pa,Fa=function(){try{Pa=new ActiveXObject(`htmlfile`)}catch{}Fa=typeof document<`u`?document.domain&&Pa?Ma(Pa):Na():Ma(Pa);for(var e=ba.length;e--;)delete Fa[Da][ba[e]];return Fa()};xa[ka]=!0;var Ia=Object.create||function(e,t){var n;return e===null?n=Fa():(Aa[Da]=va(e),n=new Aa,Aa[Da]=null,n[ka]=e),t===void 0?n:ya.f(n,t)},La={},Ra=na,za=ra.concat(`length`,`prototype`);La.f=Object.getOwnPropertyNames||function(e){return Ra(e,za)};var Ba={},Va=Ui,Ha=Tr,Ua=Mr,Wa=Array,Ga=Math.max,Ka=function(e,t,n){for(var r=Ha(e),i=Va(t,r),a=Va(n===void 0?r:n,r),o=Wa(Ga(a-i,0)),s=0;i<a;i++,s++)Ua(o,s,e[i]);return o.length=s,o},qa=S,Ja=xe,Ya=La.f,Xa=Ka,Za=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qa=function(e){try{return Ya(e)}catch{return Xa(Za)}};Ba.f=function(e){return Za&&qa(e)===`Window`?Qa(e):Ya(Ja(e))};var $a={};$a.f=Object.getOwnPropertySymbols;var eo=Xn,to=function(e,t,n,r){return r&&r.enumerable?e[t]=n:eo(e,t,n),e},no=Mn,ro=function(e,t,n){return no.f(e,t,n)},io={};io.f=Vt;var ao=we,oo=Et,so=io,co=Mn.f,lo=function(e){var t=ao.Symbol||={};oo(t,e)||co(t,e,{value:so.f(e)})},uo=A,fo=F,po=Vt,mo=to,ho=function(){var e=fo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=po(`toPrimitive`);t&&!t[r]&&mo(t,r,function(e){return uo(n,this)},{arity:1})},go=Fr,_o=Ur,vo=go?{}.toString:function(){return`[object `+_o(this)+`]`},yo=Fr,bo=Mn.f,xo=Xn,So=Et,Co=vo,wo=Vt(`toStringTag`),To=function(e,t,n,r){if(e){var i=n?e:e.prototype;So(i,wo)||bo(i,wo,{configurable:!0,value:t}),r&&!yo&&xo(i,`toString`,Co)}},Eo=o,Do=E,Oo=Eo.WeakMap,ko=Do(Oo)&&/native code/.test(String(Oo)),Ao=o,jo=M,Mo=Xn,No=Et,Po=_t,Fo=_a,Io=Yi,Lo=`Object already initialized`,Ro=Ao.TypeError,zo=Ao.WeakMap,Bo,Vo,Ho,Uo=function(e){return Ho(e)?Vo(e):Bo(e,{})},Wo=function(e){return function(t){var n;if(!jo(t)||(n=Vo(t)).type!==e)throw new Ro(`Incompatible receiver, `+e+` required`);return n}};if(ko||Po.state){var Go=Po.state||=new zo;Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,Bo=function(e,t){if(Go.has(e))throw new Ro(Lo);return t.facade=e,Go.set(e,t),t},Vo=function(e){return Go.get(e)||{}},Ho=function(e){return Go.has(e)}}else{var Ko=Fo(`state`);Io[Ko]=!0,Bo=function(e,t){if(No(e,Ko))throw new Ro(Lo);return t.facade=e,Mo(e,Ko,t),t},Vo=function(e){return No(e,Ko)?e[Ko]:{}},Ho=function(e){return No(e,Ko)}}var qo={set:Bo,get:Vo,has:Ho,enforce:Uo,getterFor:Wo},Jo=jn,Yo=v,Xo=me,Zo=St,Qo=Tr,$o=hi,es=Yo([].push),ts=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Zo(c),p=Xo(f),m=Jo(l,u),h=Qo(p),g=0,_=d||$o,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:es(v,y)}else switch(e){case 4:return!1;case 7:es(v,y)}return a?-1:r||i?i:v}},ns={forEach:ts(0),map:ts(1),filter:ts(2),some:ts(3),every:ts(4),find:ts(5),findIndex:ts(6),filterReject:ts(7)},rs=R,is=o,as=A,os=v,ss=O,cs=Ve,ls=s,us=Et,ds=De,fs=Ln,ps=xe,ms=Qt,hs=Ri,gs=ce,_s=Ia,vs=oa,ys=La,bs=Ba,xs=$a,Ss=D,Cs=Mn,ws=zi,Ts=ae,Es=to,Ds=ro,Os=yt,ks=_a,As=Yi,js=jt,Ms=Vt,Ns=io,Ps=lo,Fs=ho,Is=To,Ls=qo,Rs=ns.forEach,zs=ks(`hidden`),Bs=`Symbol`,Vs=`prototype`,Hs=Ls.set,Us=Ls.getterFor(Bs),Ws=Object[Vs],Gs=is.Symbol,Ks=Gs&&Gs[Vs],qs=is.RangeError,Js=is.TypeError,Ys=is.QObject,Xs=Ss.f,Zs=Cs.f,Qs=bs.f,$s=Ts.f,ec=os([].push),tc=Os(`symbols`),nc=Os(`op-symbols`),rc=Os(`wks`),ic=!Ys||!Ys[Vs]||!Ys[Vs].findChild,ac=function(e,t,n){var r=Xs(Ws,t);r&&delete Ws[t],Zs(e,t,n),r&&e!==Ws&&Zs(Ws,t,r)},oc=ss&&ls(function(){return _s(Zs({},`a`,{get:function(){return Zs(this,`a`,{value:7}).a}})).a!==7})?ac:Zs,sc=function(e,t){var n=tc[e]=_s(Ks);return Hs(n,{type:Bs,tag:e,description:t}),ss||(n.description=t),n},cc=function(e,t,n){e===Ws&&cc(nc,t,n),fs(e);var r=ms(t);return fs(n),us(tc,r)?(n.enumerable?(us(e,zs)&&e[zs][r]&&(e[zs][r]=!1),n=_s(n,{enumerable:gs(0,!1)})):(us(e,zs)||Zs(e,zs,gs(1,{})),e[zs][r]=!0),oc(e,r,n)):Zs(e,r,n)},lc=function(e,t){fs(e);var n=ps(t);return Rs(vs(n).concat(mc(n)),function(t){(!ss||as(dc,n,t))&&cc(e,t,n[t])}),e},uc=function(e,t){return t===void 0?_s(e):lc(_s(e),t)},dc=function(e){var t=ms(e),n=as($s,this,t);return this===Ws&&us(tc,t)&&!us(nc,t)?!1:n||!us(this,t)||!us(tc,t)||us(this,zs)&&this[zs][t]?n:!0},fc=function(e,t){var n=ps(e),r=ms(t);if(!(n===Ws&&us(tc,r)&&!us(nc,r))){var i=Xs(n,r);return i&&us(tc,r)&&!(us(n,zs)&&n[zs][r])&&(i.enumerable=!0),i}},pc=function(e){var t=Qs(ps(e)),n=[];return Rs(t,function(e){!us(tc,e)&&!us(As,e)&&ec(n,e)}),n},mc=function(e){var t=e===Ws,n=Qs(t?nc:ps(e)),r=[];return Rs(n,function(e){us(tc,e)&&(!t||us(Ws,e))&&ec(r,tc[e])}),r};cs||(Gs=function(){if(ds(Ks,this))throw new Js(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:hs(arguments[0]),t=js(e),n=function(e){var r=this===void 0?is:this;r===Ws&&as(n,nc,e),us(r,zs)&&us(r[zs],t)&&(r[zs][t]=!1);var i=gs(1,e);try{oc(r,t,i)}catch(e){if(!(e instanceof qs))throw e;ac(r,t,i)}};return ss&&ic&&oc(Ws,t,{configurable:!0,set:n}),sc(t,e)},Ks=Gs[Vs],Es(Ks,`toString`,function(){return Us(this).tag}),Es(Gs,`withoutSetter`,function(e){return sc(js(e),e)}),Ts.f=dc,Cs.f=cc,ws.f=lc,Ss.f=fc,ys.f=bs.f=pc,xs.f=mc,Ns.f=function(e){return sc(Ms(e),e)},ss&&Ds(Ks,`description`,{configurable:!0,get:function(){return Us(this).description}})),rs({global:!0,constructor:!0,wrap:!0,forced:!cs,sham:!cs},{Symbol:Gs}),Rs(vs(rc),function(e){Ps(e)}),rs({target:Bs,stat:!0,forced:!cs},{useSetter:function(){ic=!0},useSimple:function(){ic=!1}}),rs({target:`Object`,stat:!0,forced:!cs,sham:!ss},{create:uc,defineProperty:cc,defineProperties:lc,getOwnPropertyDescriptor:fc}),rs({target:`Object`,stat:!0,forced:!cs},{getOwnPropertyNames:pc}),Fs(),Is(Gs,Bs),As[zs]=!0;var hc=Ve&&!!Symbol.for&&!!Symbol.keyFor,gc=R,_c=F,vc=Et,yc=Ri,bc=yt,xc=hc,Sc=bc(`string-to-symbol-registry`),B=bc(`symbol-to-string-registry`);gc({target:`Symbol`,stat:!0,forced:!xc},{for:function(e){var t=yc(e);if(vc(Sc,t))return Sc[t];var n=_c(`Symbol`)(t);return Sc[t]=n,B[n]=t,n}});var Cc=R,wc=Et,Tc=Je,Ec=Xe,Dc=yt,Oc=hc,kc=Dc(`symbol-to-string-registry`);Cc({target:`Symbol`,stat:!0,forced:!Oc},{keyFor:function(e){if(!Tc(e))throw TypeError(Ec(e)+` is not a symbol`);if(wc(kc,e))return kc[e]}});var Ac=v([].slice),jc=v,Mc=_r,Nc=E,Pc=S,Fc=Ri,Ic=jc([].push),Lc=function(e){if(Nc(e))return e;if(Mc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Ic(n,i):(typeof i==`number`||Pc(i)===`Number`||Pc(i)===`String`)&&Ic(n,Fc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Mc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Rc=R,zc=F,Bc=p,Vc=A,Hc=v,Uc=s,Wc=E,Gc=Je,Kc=Ac,qc=Lc,Jc=Ve,Yc=String,Xc=zc(`JSON`,`stringify`),Zc=Hc(/./.exec),Qc=Hc(``.charAt),$c=Hc(``.charCodeAt),el=Hc(``.replace),tl=Hc(1 .toString),nl=/[\uD800-\uDFFF]/g,rl=/^[\uD800-\uDBFF]$/,il=/^[\uDC00-\uDFFF]$/,al=!Jc||Uc(function(){var e=zc(`Symbol`)(`stringify detection`);return Xc([e])!==`[null]`||Xc({a:e})!==`{}`||Xc(Object(e))!==`{}`}),ol=Uc(function(){return Xc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Xc(`\udead`)!==`"\\udead"`}),sl=function(e,t){var n=Kc(arguments),r=qc(t);if(!(!Wc(r)&&(e===void 0||Gc(e))))return n[1]=function(e,t){if(Wc(r)&&(t=Vc(r,this,Yc(e),t)),!Gc(t))return t},Bc(Xc,null,n)},cl=function(e,t,n){var r=Qc(n,t-1),i=Qc(n,t+1);return Zc(rl,e)&&!Zc(il,i)||Zc(il,e)&&!Zc(rl,r)?`\\u`+tl($c(e,0),16):e};Xc&&Rc({target:`JSON`,stat:!0,arity:3,forced:al||ol},{stringify:function(e,t,n){var r=Kc(arguments),i=Bc(al?sl:Xc,null,r);return ol&&typeof i==`string`?el(i,nl,cl):i}});var ll=R,ul=Ve,dl=s,fl=$a,pl=St;ll({target:`Object`,stat:!0,forced:!ul||dl(function(){fl.f(1)})},{getOwnPropertySymbols:function(e){var t=fl.f;return t?t(pl(e)):[]}}),lo(`asyncIterator`),lo(`hasInstance`),lo(`isConcatSpreadable`),lo(`iterator`),lo(`match`),lo(`matchAll`),lo(`replace`),lo(`search`),lo(`species`),lo(`split`);var ml=lo,hl=ho;ml(`toPrimitive`),hl();var gl=F,_l=lo,vl=To;_l(`toStringTag`),vl(gl(`Symbol`),`Symbol`),lo(`unscopables`),To(o.JSON,`JSON`,!0);var yl=we.Symbol,bl={},xl=O,Sl=Et,Cl=Function.prototype,wl=xl&&Object.getOwnPropertyDescriptor,Tl=Sl(Cl,`name`),El={EXISTS:Tl,PROPER:Tl&&(function(){}).name===`something`,CONFIGURABLE:Tl&&(!xl||xl&&wl(Cl,`name`).configurable)},Dl=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ol=Et,kl=E,Al=St,jl=_a,Ml=Dl,Nl=jl(`IE_PROTO`),Pl=Object,Fl=Pl.prototype,Il=Ml?Pl.getPrototypeOf:function(e){var t=Al(e);if(Ol(t,Nl))return t[Nl];var n=t.constructor;return kl(n)&&t instanceof n?n.prototype:t instanceof Pl?Fl:null},Ll=s,Rl=E,zl=M,Bl=Ia,Vl=Il,Hl=to,Ul=Vt(`iterator`),Wl=!1,Gl,Kl,ql;[].keys&&(ql=[].keys(),`next`in ql?(Kl=Vl(Vl(ql)),Kl!==Object.prototype&&(Gl=Kl)):Wl=!0),Gl=!zl(Gl)||Ll(function(){var e={};return Gl[Ul].call(e)!==e})?{}:Bl(Gl),Rl(Gl[Ul])||Hl(Gl,Ul,function(){return this});var Jl={IteratorPrototype:Gl,BUGGY_SAFARI_ITERATORS:Wl},Yl=Jl.IteratorPrototype,Xl=Ia,Zl=ce,Ql=To,$l=bl,eu=function(){return this},tu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Xl(Yl,{next:Zl(+!r,n)}),Ql(e,i,!1,!0),$l[i]=eu,e},nu=v,ru=et,iu=function(e,t,n){try{return nu(ru(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},au=E,ou=String,su=TypeError,cu=function(e){if(typeof e==`object`||au(e))return e;throw new su(`Can't set `+ou(e)+` as a prototype`)},lu=iu,uu=Ln,du=cu,fu=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=lu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return uu(t),du(r),e?n(t,r):t.__proto__=r,t}}():void 0),pu=R,mu=A,hu=El,gu=tu,_u=Il,vu=To,yu=to,bu=Vt,xu=bl,Su=Jl,Cu=hu.PROPER;hu.CONFIGURABLE,Su.IteratorPrototype;var wu=Su.BUGGY_SAFARI_ITERATORS,Tu=bu(`iterator`),Eu=`keys`,Du=`values`,Ou=`entries`,ku=function(){return this},Au=function(e,t,n,r,i,a,o){gu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!wu&&e&&e in u)return u[e];switch(e){case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)};case Ou:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[Tu]||u[`@@iterator`]||i&&u[i],f=!wu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=_u(p.call(new e)),m!==Object.prototype&&m.next&&(vu(m,c,!0,!0),xu[c]=ku)),Cu&&i===Du&&d&&d.name!==Du&&(l=!0,f=function(){return mu(d,this)}),i)if(h={values:s(Du),keys:a?f:s(Eu),entries:s(Ou)},o)for(g in h)(wu||l||!(g in u))&&yu(u,g,h[g]);else pu({target:t,proto:!0,forced:wu||l},h);return o&&u[Tu]!==f&&yu(u,Tu,f,{name:i}),xu[t]=f,h},ju=function(e,t){return{value:e,done:t}},Mu=xe,Nu=bl,Pu=qo;Mn.f;var Fu=Au,Iu=ju,Lu=`Array Iterator`,Ru=Pu.set,zu=Pu.getterFor(Lu);Fu(Array,`Array`,function(e,t){Ru(this,{type:Lu,target:Mu(e),index:0,kind:t})},function(){var e=zu(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Iu(void 0,!0);switch(e.kind){case`keys`:return Iu(n,!1);case`values`:return Iu(t[n],!1)}return Iu([n,t[n]],!1)},`values`),Nu.Arguments=Nu.Array;var Bu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vu=o,Hu=Ur,Uu=Xn,Wu=bl,Gu=Vt(`toStringTag`);for(var Ku in Bu){var qu=Vu[Ku],Ju=qu&&qu.prototype;Ju&&Hu(Ju)!==Gu&&Uu(Ju,Gu,Ku),Wu[Ku]=Wu.Array}var Yu=yl,Xu=Vt,Zu=Mn.f,Qu=Xu(`metadata`),$u=Function.prototype;$u[Qu]===void 0&&Zu($u,Qu,{value:null}),lo(`asyncDispose`),lo(`dispose`),lo(`metadata`);var ed=Yu,td=F,nd=v,rd=td(`Symbol`),id=rd.keyFor,ad=nd(rd.prototype.valueOf),od=rd.isRegisteredSymbol||function(e){try{return id(ad(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:od});for(var sd=yt,cd=F,ld=v,ud=Je,dd=Vt,fd=cd(`Symbol`),pd=fd.isWellKnownSymbol,md=cd(`Object`,`getOwnPropertyNames`),hd=ld(fd.prototype.valueOf),gd=sd(`wks`),_d=0,vd=md(fd),yd=vd.length;_d<yd;_d++)try{var bd=vd[_d];ud(fd[bd])&&dd(bd)}catch{}var xd=function(e){if(pd&&pd(e))return!0;try{for(var t=hd(e),n=0,r=md(gd),i=r.length;n<i;n++)if(gd[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:xd}),lo(`matcher`),lo(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:od}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:xd}),lo(`metadataKey`),lo(`patternMatch`),lo(`replaceAll`);var Sd=ed,Cd=r(Sd),wd=v,Td=xr,Ed=Ri,Dd=ve,Od=wd(``.charAt),kd=wd(``.charCodeAt),Ad=wd(``.slice),jd=function(e){return function(t,n){var r=Ed(Dd(t)),i=Td(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=kd(r,i),o<55296||o>56319||i+1===a||(s=kd(r,i+1))<56320||s>57343?e?Od(r,i):o:e?Ad(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Md={codeAt:jd(!1),charAt:jd(!0)}.charAt,Nd=Ri,Pd=qo,Fd=Au,Id=ju,Ld=`String Iterator`,Rd=Pd.set,zd=Pd.getterFor(Ld);Fd(String,`String`,function(e){Rd(this,{type:Ld,string:Nd(e),index:0})},function(){var e=zd(this),t=e.string,n=e.index,r;return n>=t.length?Id(void 0,!0):(r=Md(t,n),e.index+=r.length,Id(r,!1))});var Bd=io.f(`iterator`),Vd=Bd,Hd=r(Vd);function Ud(e){"@babel/helpers - typeof";return Ud=typeof Cd==`function`&&typeof Hd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Cd==`function`&&e.constructor===Cd&&e!==Cd.prototype?`symbol`:typeof e},Ud(e)}var Wd=r(io.f(`toPrimitive`));function Gd(e,t){if(Ud(e)!==`object`||e===null)return e;var n=e[Wd];if(n!==void 0){var r=n.call(e,t||`default`);if(Ud(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Kd(e){var t=Gd(e,`string`);return Ud(t)===`symbol`?t:String(t)}function qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),hr(e,Kd(r.key),r)}}function Jd(e,t,n){return t&&qd(e.prototype,t),n&&qd(e,n),hr(e,`prototype`,{writable:!1}),e}function Yd(e,t,n){return t=Kd(t),t in e?hr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xd=v,Zd=et,Qd=M,$d=Et,ef=Ac,tf=c,nf=Function,rf=Xd([].concat),af=Xd([].join),of={},sf=function(e,t,n){if(!$d(of,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;of[t]=nf(`C,a`,`return new C(`+af(r,`,`)+`)`)}return of[t](e,n)},cf=tf?nf.bind:function(e){var t=Zd(this),n=t.prototype,r=ef(arguments,1),i=function(){var n=rf(r,ef(arguments));return this instanceof i?sf(t,n.length,n):t.apply(e,n)};return Qd(n)&&(i.prototype=n),i},lf=R,uf=cf;lf({target:`Function`,proto:!0,forced:Function.bind!==uf},{bind:uf});var df=o,ff=we,pf=function(e,t){var n=ff[e+`Prototype`],r=n&&n[t];if(r)return r;var i=df[e],a=i&&i.prototype;return a&&a[t]},mf=pf(`Function`,`bind`),hf=De,gf=mf,_f=Function.prototype,vf=function(e){var t=e.bind;return e===_f||hf(_f,e)&&t===_f.bind?gf:t},yf=r(vf),bf=et,xf=St,Sf=me,Cf=Tr,wf=TypeError,Tf=function(e){return function(t,n,r,i){bf(n);var a=xf(t),o=Sf(a),s=Cf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new wf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Ef={left:Tf(!1),right:Tf(!0)},V=s,Df=function(e,t){var n=[][e];return!!n&&V(function(){n.call(null,t||function(){return 1},1)})},Of=S(o.process)===`process`,kf=R,Af=Ef.left,jf=Df,Mf=Le;kf({target:`Array`,proto:!0,forced:!Of&&Mf>79&&Mf<83||!jf(`reduce`)},{reduce:function(e){var t=arguments.length;return Af(this,e,t,t>1?arguments[1]:void 0)}});var Nf=pf(`Array`,`reduce`),Pf=De,Ff=Nf,If=Array.prototype,Lf=r(function(e){var t=e.reduce;return e===If||Pf(If,e)&&t===If.reduce?Ff:t}),Rf=R,zf=ns.filter;Rf({target:`Array`,proto:!0,forced:!bi(`filter`)},{filter:function(e){return zf(this,e,arguments.length>1?arguments[1]:void 0)}});var Bf=pf(`Array`,`filter`),Vf=De,Hf=Bf,Uf=Array.prototype,Wf=r(function(e){var t=e.filter;return e===Uf||Vf(Uf,e)&&t===Uf.filter?Hf:t}),Gf=R,Kf=ns.map;Gf({target:`Array`,proto:!0,forced:!bi(`map`)},{map:function(e){return Kf(this,e,arguments.length>1?arguments[1]:void 0)}});var qf=pf(`Array`,`map`),Jf=De,Yf=qf,Xf=Array.prototype,Zf=r(function(e){var t=e.map;return e===Xf||Jf(Xf,e)&&t===Xf.map?Yf:t}),Qf=_r,$f=Tr,ep=Or,tp=jn,np=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?tp(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Qf(d)?(f=$f(d),c=np(e,t,d,f,c,a-1)-1):(ep(c+1),e[c]=d),c++),l++;return c},rp=np,ip=R,ap=rp,op=et,sp=St,cp=Tr,lp=hi;ip({target:`Array`,proto:!0},{flatMap:function(e){var t=sp(this),n=cp(t),r;return op(e),r=lp(t,0),r.length=ap(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var up=pf(`Array`,`flatMap`),dp=De,fp=up,pp=Array.prototype,mp=r(function(e){var t=e.flatMap;return e===pp||dp(pp,e)&&t===pp.flatMap?fp:t});function hp(e){return new _p(e)}var gp=function(){function e(n,r,i){var a,o,s;t(this,e),Yd(this,`_listeners`,{add:yf(a=this._add).call(a,this),remove:yf(o=this._remove).call(o,this),update:yf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Jd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Lf(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),_p=function(){function e(n){t(this,e),Yd(this,`_transformers`,[]),this._source=n}return Jd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Wf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Zf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return mp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new gp(this._source,this._transformers,e)}}]),e}(),vp=A,yp=Ln,bp=rt,xp=function(e,t,n){var r,i;yp(e);try{if(r=bp(e,`return`),!r){if(t===`throw`)throw n;return n}r=vp(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return yp(r),n},Sp=Ln,Cp=xp,wp=function(e,t,n,r){try{return r?t(Sp(n)[0],n[1]):t(n)}catch(t){Cp(e,`throw`,t)}},Tp=Vt,Ep=bl,Dp=Tp(`iterator`),Op=Array.prototype,kp=function(e){return e!==void 0&&(Ep.Array===e||Op[Dp]===e)},Ap=Ur,jp=rt,Mp=he,Np=bl,Pp=Vt(`iterator`),Fp=function(e){if(!Mp(e))return jp(e,Pp)||jp(e,`@@iterator`)||Np[Ap(e)]},Ip=A,Lp=et,Rp=Ln,zp=Xe,Bp=Fp,Vp=TypeError,Hp=function(e,t){var n=arguments.length<2?Bp(e):t;if(Lp(n))return Rp(Ip(n,e));throw new Vp(zp(e)+` is not iterable`)},Up=jn,Wp=A,Gp=St,Kp=wp,qp=kp,Jp=ci,Yp=Tr,Xp=Mr,Zp=Hp,Qp=Fp,$p=Array,em=function(e){var t=Gp(e),n=Jp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Up(i,r>2?arguments[2]:void 0));var o=Qp(t),s=0,c,l,u,d,f,p;if(o&&!(this===$p&&qp(o)))for(d=Zp(t,o),f=d.next,l=n?new this:[];!(u=Wp(f,d)).done;s++)p=a?Kp(d,i,[u.value,s],!0):u.value,Xp(l,s,p);else for(c=Yp(t),l=n?new this(c):$p(c);c>s;s++)p=a?i(t[s],s):t[s],Xp(l,s,p);return l.length=s,l},tm=Vt(`iterator`),nm=!1;try{var rm=0,im={next:function(){return{done:!!rm++}},return:function(){nm=!0}};im[tm]=function(){return this},Array.from(im,function(){throw 2})}catch{}var am=function(e,t){try{if(!t&&!nm)return!1}catch{return!1}var n=!1;try{var r={};r[tm]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},om=R,sm=em;om({target:`Array`,stat:!0,forced:!am(function(e){Array.from(e)})},{from:sm});var cm=we.Array.from,lm=r(cm),um=Fp,dm=r(um),fm=r(um);R({target:`Array`,stat:!0},{isArray:_r});var pm=we.Array.isArray,mm=r(pm);function hm(e){if(mm(e))return e}var gm=O,_m=_r,vm=TypeError,ym=Object.getOwnPropertyDescriptor,bm=gm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(_m(e)&&!ym(e,`length`).writable)throw new vm(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},xm=R,Sm=St,Cm=Tr,wm=bm,Tm=Or;xm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Sm(this),n=Cm(t),r=arguments.length;Tm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return wm(t,n),n}});var Em=pf(`Array`,`push`),Dm=De,Om=Em,km=Array.prototype,Am=function(e){var t=e.push;return e===km||Dm(km,e)&&t===km.push?Om:t},jm=r(Am);function Mm(e,t){var n=e==null?null:Cd!==void 0&&dm(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(jm(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Nm=R,Pm=_r,Fm=ci,Im=M,Lm=Ui,Rm=Tr,zm=xe,Bm=Mr,Vm=Vt,Hm=bi,Um=Ac,Wm=Hm(`slice`),Gm=Vm(`species`),Km=Array,qm=Math.max;Nm({target:`Array`,proto:!0,forced:!Wm},{slice:function(e,t){var n=zm(this),r=Rm(n),i=Lm(e,r),a=Lm(t===void 0?r:t,r),o,s,c;if(Pm(n)&&(o=n.constructor,Fm(o)&&(o===Km||Pm(o.prototype))?o=void 0:Im(o)&&(o=o[Gm],o===null&&(o=void 0)),o===Km||o===void 0))return Um(n,i,a);for(s=new(o===void 0?Km:o)(qm(a-i,0)),c=0;i<a;i++,c++)i in n&&Bm(s,c,n[i]);return s.length=c,s}});var Jm=pf(`Array`,`slice`),Ym=De,Xm=Jm,Zm=Array.prototype,Qm=function(e){var t=e.slice;return e===Zm||Ym(Zm,e)&&t===Zm.slice?Xm:t},$m=Qm,eh=r($m),th=r(cm);function nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n;if(e){if(typeof e==`string`)return nh(e,t);var r=eh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return th(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nh(e,t)}}function ih(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ah(e,t){return hm(e)||Mm(e,t)||rh(e,t)||ih()}function oh(e){if(mm(e))return nh(e)}function sh(e){if(Cd!==void 0&&dm(e)!=null||e[`@@iterator`]!=null)return th(e)}function ch(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lh(e){return oh(e)||sh(e)||rh(e)||ch()}var uh=r(Yu),dh=pf(`Array`,`concat`),fh=De,ph=dh,mh=Array.prototype,hh=r(function(e){var t=e.concat;return e===mh||fh(mh,e)&&t===mh.concat?ph:t}),gh=r(Qm),_h=F,vh=v,yh=La,bh=$a,xh=Ln,Sh=vh([].concat),Ch=_h(`Reflect`,`ownKeys`)||function(e){var t=yh.f(xh(e)),n=bh.f;return n?Sh(t,n(e)):t};R({target:`Reflect`,stat:!0},{ownKeys:Ch});var wh=we.Reflect.ownKeys,Th=r(wh),Eh=r(pm),Dh=R,Oh=St,kh=oa;Dh({target:`Object`,stat:!0,forced:s(function(){kh(1)})},{keys:function(e){return kh(Oh(e))}});var Ah=we.Object.keys,jh=r(Ah),Mh=ns.forEach,Nh=Df(`forEach`)?[].forEach:function(e){return Mh(this,e,arguments.length>1?arguments[1]:void 0)},Ph=R,Fh=Nh;Ph({target:`Array`,proto:!0,forced:[].forEach!==Fh},{forEach:Fh});var Ih=pf(`Array`,`forEach`),Lh=Ur,H=Et,Rh=De,zh=Ih,Bh=Array.prototype,Vh={DOMTokenList:!0,NodeList:!0},Hh=function(e){var t=e.forEach;return e===Bh||Rh(Bh,e)&&t===Bh.forEach||H(Vh,Lh(e))?zh:t},Uh=r(Hh),Wh=R,Gh=v,Kh=_r,qh=Gh([].reverse),Jh=[1,2];Wh({target:`Array`,proto:!0,forced:String(Jh)===String(Jh.reverse())},{reverse:function(){return Kh(this)&&(this.length=this.length),qh(this)}});var Yh=pf(`Array`,`reverse`),Xh=De,Zh=Yh,Qh=Array.prototype,$h=function(e){var t=e.reverse;return e===Qh||Xh(Qh,e)&&t===Qh.reverse?Zh:t},eg=r($h),tg=Xe,ng=TypeError,rg=function(e,t){if(!delete e[t])throw new ng(`Cannot delete property `+tg(t)+` of `+tg(e))},ig=R,ag=St,og=Ui,sg=xr,cg=Tr,lg=bm,ug=Or,dg=hi,fg=Mr,pg=rg,mg=bi(`splice`),hg=Math.max,gg=Math.min;ig({target:`Array`,proto:!0,forced:!mg},{splice:function(e,t){var n=ag(this),r=cg(n),i=og(e,r),a=arguments.length,o,s,c,l,u,d;for(a===0?o=s=0:a===1?(o=0,s=r-i):(o=a-2,s=gg(hg(sg(t),0),r-i)),ug(r+o-s),c=dg(n,s),l=0;l<s;l++)u=i+l,u in n&&fg(c,l,n[u]);if(c.length=s,o<s){for(l=i;l<r-s;l++)u=l+s,d=l+o,u in n?n[d]=n[u]:pg(n,d);for(l=r;l>r-s+o;l--)pg(n,l-1)}else if(o>s)for(l=r-s;l>i;l--)u=l+s-1,d=l+o-1,u in n?n[d]=n[u]:pg(n,d);for(l=0;l<o;l++)n[l+i]=arguments[l+2];return lg(n,r-s+o),c}});var _g=pf(`Array`,`splice`),vg=De,yg=_g,bg=Array.prototype,xg=r(function(e){var t=e.splice;return e===bg||vg(bg,e)&&t===bg.splice?yg:t}),Sg=O,Cg=v,wg=A,Tg=s,Eg=oa,Dg=$a,Og=ae,kg=St,Ag=me,jg=Object.assign,Mg=Object.defineProperty,Ng=Cg([].concat),Pg=!jg||Tg(function(){if(Sg&&jg({b:1},jg(Mg({},`a`,{enumerable:!0,get:function(){Mg(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),jg({},e)[n]!==7||Eg(jg({},t)).join(``)!==r})?function(e,t){for(var n=kg(e),r=arguments.length,i=1,a=Dg.f,o=Og.f;r>i;)for(var s=Ag(arguments[i++]),c=a?Ng(Eg(s),a(s)):Eg(s),l=c.length,u=0,d;l>u;)d=c[u++],(!Sg||wg(o,s,d))&&(n[d]=s[d]);return n}:jg,Fg=R,Ig=Pg;Fg({target:`Object`,stat:!0,arity:2,forced:Object.assign!==Ig},{assign:Ig});var Lg=we.Object.assign,Rg=r(Lg),zg=R,Bg=s,Vg=St,Hg=Il,Ug=Dl;zg({target:`Object`,stat:!0,forced:Bg(function(){Hg(1)}),sham:!Ug},{getPrototypeOf:function(e){return Hg(Vg(e))}});var Wg=we.Object.getPrototypeOf;R({target:`Object`,stat:!0,sham:!O},{create:Ia});var Gg=we.Object,Kg=function(e,t){return Gg.create(e,t)},qg=r(Kg),Jg=we,Yg=p;Jg.JSON||={stringify:JSON.stringify};var Xg=r(function(e,t,n){return Yg(Jg.JSON.stringify,null,arguments)}),Zg=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Qg=TypeError,$g=function(e,t){if(e<t)throw new Qg(`Not enough arguments`);return e},e_=o,t_=p,n_=E,r_=Zg,i_=Oe,a_=Ac,o_=$g,s_=e_.Function,c_=/MSIE .\./.test(i_)||r_&&(function(){var e=e_.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)})(),l_=function(e,t){var n=t?2:1;return c_?function(r,i){var a=o_(arguments.length,1)>n,o=n_(r)?r:s_(r),s=a?a_(arguments,n):[],c=a?function(){t_(o,this,s)}:o;return t?e(c,i):e(c)}:e},u_=R,d_=o,f_=l_(d_.setInterval,!0);u_({global:!0,bind:!0,forced:d_.setInterval!==f_},{setInterval:f_});var p_=R,m_=o,h_=l_(m_.setTimeout,!0);p_({global:!0,bind:!0,forced:m_.setTimeout!==h_},{setTimeout:h_});var g_=we.setTimeout,__=r(g_),v_={exports:{}};(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(v_);var y_=v_.exports,b_=r(y_);function x_(){return x_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x_.apply(this,arguments)}function S_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function C_(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var w_=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},T_=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],E_=typeof document>`u`?{style:{}}:document.createElement(`div`),D_=`function`,O_=Math.round,k_=Math.abs,A_=Date.now;function j_(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<T_.length;){if(n=T_[a],r=n?n+i:t,r in e)return r;a++}}var M_=typeof window>`u`?{}:window,N_=j_(E_.style,`touchAction`),P_=N_!==void 0;function F_(){if(!P_)return!1;var e={},t=M_.CSS&&M_.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?M_.CSS.supports(`touch-action`,n):!0}),e}var I_=`compute`,L_=`auto`,R_=`manipulation`,z_=`none`,B_=`pan-x`,V_=`pan-y`,H_=F_(),U_=/mobile|tablet|ip(ad|hone|od)|android/i,W_=`ontouchstart`in M_,G_=j_(M_,`PointerEvent`)!==void 0,K_=W_&&U_.test(navigator.userAgent),q_=`touch`,J_=`pen`,Y_=`mouse`,X_=`kinect`,Z_=25,Q_=1,$_=2,ev=4,tv=8,nv=1,rv=2,iv=4,av=8,ov=16,sv=rv|iv,cv=av|ov,lv=sv|cv,uv=[`x`,`y`],dv=[`clientX`,`clientY`];function fv(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function pv(e,t){return typeof e===D_?e.apply(t&&t[0]||void 0,t):e}function mv(e,t){return e.indexOf(t)>-1}function hv(e){if(mv(e,z_))return z_;var t=mv(e,B_),n=mv(e,V_);return t&&n?z_:t||n?t?B_:V_:mv(e,R_)?R_:L_}var gv=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===I_&&(e=this.compute()),P_&&this.manager.element.style&&H_[e]&&(this.manager.element.style[N_]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fv(this.manager.recognizers,function(t){pv(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),hv(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=mv(r,z_)&&!H_[z_],a=mv(r,V_)&&!H_[V_],o=mv(r,B_)&&!H_[B_];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&sv||o&&n&cv))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function _v(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function vv(e){var t=e.length;if(t===1)return{x:O_(e[0].clientX),y:O_(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:O_(n/t),y:O_(r/t)}}function yv(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:O_(e.pointers[n].clientX),clientY:O_(e.pointers[n].clientY)},n++;return{timeStamp:A_(),pointers:t,center:vv(t),deltaX:e.deltaX,deltaY:e.deltaY}}function bv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function xv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Sv(e,t){return e===t?nv:k_(e)>=k_(t)?e<0?rv:iv:t<0?av:ov}function Cv(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Q_||a.eventType===ev)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function wv(e,t,n){return{x:t/e||0,y:n/e||0}}function Tv(e,t){return bv(t[0],t[1],dv)/bv(e[0],e[1],dv)}function Ev(e,t){return xv(t[1],t[0],dv)+xv(e[1],e[0],dv)}function Dv(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==tv&&(r>Z_||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=wv(r,c,l);a=u.x,o=u.y,i=k_(u.x)>k_(u.y)?u.x:u.y,s=Sv(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Ov(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=yv(t),i>1&&!n.firstMultiple?n.firstMultiple=yv(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=vv(r);t.timeStamp=A_(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=xv(s,c),t.distance=bv(s,c),Cv(n,t),t.offsetDirection=Sv(t.deltaX,t.deltaY);var l=wv(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=k_(l.x)>k_(l.y)?l.x:l.y,t.scale=o?Tv(o.pointers,r):1,t.rotation=o?Ev(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Dv(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;_v(f,u)&&(u=f),t.target=u}function kv(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Q_&&r-i===0,o=t&(ev|tv)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ov(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Av(e){return e.trim().split(/\s+/g)}function jv(e,t,n){fv(Av(t),function(t){e.addEventListener(t,n,!1)})}function U(e,t,n){fv(Av(t),function(t){e.removeEventListener(t,n,!1)})}function Mv(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Nv=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){pv(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&jv(this.element,this.evEl,this.domHandler),this.evTarget&&jv(this.target,this.evTarget,this.domHandler),this.evWin&&jv(Mv(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&U(this.element,this.evEl,this.domHandler),this.evTarget&&U(this.target,this.evTarget,this.domHandler),this.evWin&&U(Mv(this.element),this.evWin,this.domHandler)},e}();function Pv(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Fv={pointerdown:Q_,pointermove:$_,pointerup:ev,pointercancel:tv,pointerout:tv},Iv={2:q_,3:J_,4:Y_,5:X_},Lv=`pointerdown`,Rv=`pointermove pointerup pointercancel`;M_.MSPointerEvent&&!M_.PointerEvent&&(Lv=`MSPointerDown`,Rv=`MSPointerMove MSPointerUp MSPointerCancel`);var zv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=Lv,r.evWin=Rv,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Fv[e.type.toLowerCase().replace(`ms`,``)],i=Iv[e.pointerType]||e.pointerType,a=i===q_,o=Pv(t,e.pointerId,`pointerId`);r&Q_&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(ev|tv)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Nv);function Bv(e){return Array.prototype.slice.call(e,0)}function Vv(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Pv(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var Hv={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Uv=`touchstart touchmove touchend touchcancel`,Wv=function(e){S_(t,e);function t(){var n;return t.prototype.evTarget=Uv,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Hv[e.type],n=Gv.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})},t}(Nv);function Gv(e,t){var n=Bv(e.touches),r=this.targetIds;if(t&(Q_|$_)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Bv(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return _v(e.target,c)}),t===Q_)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(ev|tv)&&delete r[o[i].identifier],i++;if(s.length)return[Vv(a.concat(s),`identifier`,!0),s]}var Kv={mousedown:Q_,mousemove:$_,mouseup:ev},qv=`mousedown`,Jv=`mousemove mouseup`,Yv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=qv,r.evWin=Jv,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Kv[e.type];t&Q_&&e.button===0&&(this.pressed=!0),t&$_&&e.which!==1&&(t=ev),this.pressed&&(t&ev&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Y_,srcEvent:e}))},t}(Nv),Xv=2500,Zv=25;function Qv(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Xv)}}function $v(e,t){e&Q_?(this.primaryTouch=t.changedPointers[0].identifier,Qv.call(this,t)):e&(ev|tv)&&Qv.call(this,t)}function ey(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Zv&&o<=Zv)return!0}return!1}var ty=function(){return function(e){S_(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===q_,a=n.pointerType===Y_;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)$v.call(C_(C_(r)),t,n);else if(a&&ey.call(C_(C_(r)),n))return;r.callback(e,t,n)}},r.touch=new Wv(r.manager,r.handler),r.mouse=new Yv(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Nv)}();function ny(e){var t;return t=e.options.inputClass||(G_?zv:K_?Wv:W_?ty:Yv),new t(e,kv)}function ry(e,t,n){return Array.isArray(e)?(fv(e,n[t],n),!0):!1}var iy=1,ay=2,oy=4,sy=8,cy=sy,ly=16,uy=32,dy=1;function fy(){return dy++}function W(e,t){var n=t.manager;return n?n.get(e):e}function G(e){return e&ly?`cancel`:e&sy?`end`:e&oy?`move`:e&ay?`start`:``}var py=function(){function e(e){e===void 0&&(e={}),this.options=x_({enable:!0},e),this.id=fy(),this.manager=null,this.state=iy,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return w_(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ry(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=W(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ry(e,`dropRecognizeWith`,this)?this:(e=W(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ry(e,`requireFailure`,this))return this;var t=this.requireFail;return e=W(e,this),Pv(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ry(e,`dropRequireFailure`,this))return this;e=W(e,this);var t=Pv(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<sy&&r(t.options.event+G(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=sy&&r(t.options.event+G(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=uy},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(uy|iy)))return!1;e++}return!0},t.recognize=function(e){var t=w_({},e);if(!pv(this.options.enable,[this,t])){this.reset(),this.state=uy;return}this.state&(cy|ly|uy)&&(this.state=iy),this.state=this.process(t),this.state&(ay|oy|sy|ly)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),my=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[R_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Q_&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==ev)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||bv(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.interval),ay):cy}return uy},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=uy},this.options.interval),uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===cy&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(py),hy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(ay|oy),i=this.attrTest(e);return r&&(n&tv||!i)?t|ly:r||i?n&ev?t|sy:t&ay?t|oy:ay:uy},t}(py);function gy(e){return e===ov?`down`:e===av?`up`:e===rv?`left`:e===iv?`right`:``}var _y=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`pan`,threshold:10,pointers:1,direction:lv},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sv&&t.push(V_),e&cv&&t.push(B_),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&sv?(i=a===0?nv:a<0?rv:iv,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?nv:o<0?av:ov,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return hy.prototype.attrTest.call(this,e)&&(this.state&ay||!(this.state&ay)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=gy(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(hy),vy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`swipe`,threshold:10,velocity:.3,direction:sv|cv,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return _y.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(sv|cv)?r=t.overallVelocity:n&sv?r=t.overallVelocityX:n&cv&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&k_(r)>this.options.velocity&&t.eventType&ev},n.emit=function(e){var t=gy(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(hy),yy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ay)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(hy),by=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ay)},t}(hy),xy=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[L_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(ev|tv)&&!a)this.reset();else if(e.eventType&Q_)this.reset(),this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.time);else if(e.eventType&ev)return cy;return uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===cy&&(e&&e.eventType&ev?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=A_(),this.manager.emit(this.options.event,this._input)))},t}(py),Sy={domEvents:!1,touchAction:I_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Cy=[[by,{enable:!1}],[yy,{enable:!1},[`rotate`]],[vy,{direction:sv}],[_y,{direction:sv},[`swipe`]],[my],[my,{event:`doubletap`,taps:2},[`tap`]],[xy]],wy=1,Ty=2;function Ey(e,t){var n=e.element;if(n.style){var r;fv(e.options.cssProps,function(i,a){r=j_(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Dy(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Oy=function(){function e(e,t){var n=this;this.options=w_({},Sy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ny(this),this.touchAction=new gv(this,this.options.touchAction),Ey(this,!0),fv(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return w_(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Ty:wy},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&cy)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Ty&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(ay|oy|sy)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof py)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ry(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ry(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Pv(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){t?n[e]&&n[e].splice(Pv(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Dy(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Ey(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),ky={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Ay=`touchstart`,jy=`touchstart touchmove touchend touchcancel`,My=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evTarget=Ay,r.evWin=jy,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=ky[e.type];if(t===Q_&&(this.started=!0),this.started){var n=Ny.call(this,e,t);t&(ev|tv)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})}},t}(Nv);function Ny(e,t){var n=Bv(e.touches),r=Bv(e.changedTouches);return t&(ev|tv)&&(n=Vv(n.concat(r),`identifier`,!0)),[n,r]}function Py(e,t,n){var r=`DEPRECATED METHOD: `+t+`
4
4
  `+n+` AT
@@ -1 +1 @@
1
- import{o as e}from"./chunk-DD-I1_y5.js";import{a as t,f as n,h as r,s as i}from"./brand-Bm671owU.js";import{_ as a,a as o,d as s,m as c,o as l,t as u}from"./graph-labels-C7I5QvNv.js";var d=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),f=n(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),p=n(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),m=n(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),h=n(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);function g(e){let t=new Set,n=[];for(let r of e)for(let e of r.labels)e&&(t.has(e)||u.has(e)&&(t.add(e),n.push(e)));return n}var _=80;function v(e){let t=y(e.properties)??e.labels[0]??``,n=t.length>_?t.slice(0,_):t;return`/graph?${new URLSearchParams({nodeId:e.nodeId,label:n}).toString()}`}function y(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}var b=e(r(),1),x=t();function S(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(!1),[i,o]=(0,b.useState)(void 0),[s,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(void 0),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(null);(0,b.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.onboardingComplete==`boolean`&&f(e.onboardingComplete),typeof e.businessName==`string`&&o(e.businessName),e.conversationId!==void 0&&u(e.conversationId??null),v(e.role??null),m(e.userName===void 0?null:e.userName),g(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let y=(0,b.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]);return n?e?(0,x.jsx)(l,{cacheKey:e,businessName:i,conversationId:s,onLogout:y,onboardingComplete:d,userName:p,userAvatar:h,role:_,children:(0,x.jsxs)(`div`,{className:`data-page`,children:[(0,x.jsx)(`header`,{className:`data-header`,children:(0,x.jsxs)(`h1`,{className:`data-title`,children:[(0,x.jsx)(a,{size:18}),` Data`]})}),(0,x.jsx)(C,{cacheKey:e})]})}):(0,x.jsxs)(`div`,{className:`data-page`,children:[(0,x.jsx)(`header`,{className:`data-header`,children:(0,x.jsxs)(`h1`,{className:`data-title`,children:[(0,x.jsx)(a,{size:18}),` Data`]})}),(0,x.jsxs)(`div`,{className:`data-empty`,children:[(0,x.jsx)(`p`,{children:`You are not signed in.`}),(0,x.jsxs)(`p`,{children:[`Open the `,(0,x.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,x.jsx)(`div`,{className:`data-page`,children:(0,x.jsxs)(`div`,{className:`data-loading`,children:[(0,x.jsx)(c,{size:18,className:`spin`}),` Loading…`]})})}function C({cacheKey:e,onOpenInGraph:t}){let{adminFetch:n,cacheKey:r,sessionRefetchNonce:i,banner:a,reloadToLogin:s}=o({initialCacheKey:e,surface:`data`});return(0,x.jsxs)(`main`,{className:`data-main`,children:[a&&(0,x.jsx)(`button`,{type:`button`,className:`data-session-banner`,onClick:s,"data-reason":a.reason,children:a.message}),(0,x.jsx)(w,{adminFetch:n,sessionRefetchNonce:i,onOpenInGraph:t}),(0,x.jsx)(k,{adminFetch:n,cacheKey:r,sessionRefetchNonce:i})]})}function w({adminFetch:e,sessionRefetchNonce:t,onOpenInGraph:n}){let[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(``),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(`hybrid`),[p,m]=(0,b.useState)(!1),[h,_]=(0,b.useState)(null),[y,S]=(0,b.useState)(null),[C,w]=(0,b.useState)(0),[D,O]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=r.trim();if(!e){o(``),u(null);return}O(!1);let t=setTimeout(()=>o(e),300);return()=>clearTimeout(t)},[r]),(0,b.useEffect)(()=>{if(!a)return;let t=!1;return m(!0),_(null),e(`/api/admin/graph-search?q=${encodeURIComponent(a)}&labels=*&limit=20${D?`&threshold=0`:``}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(u(e.results),f(e.mode??`hybrid`),w(typeof e.suppressed==`number`?e.suppressed:0))}).catch(e=>{t||_(e instanceof Error?e.message:String(e))}).finally(()=>{t||m(!1)}),()=>{t=!0}},[a,e,t,D]);let k=(0,b.useMemo)(()=>l?g(l):[],[l]),A=y&&k.includes(y)?y:null,j=(0,b.useMemo)(()=>l?A?l.filter(e=>e.labels.includes(A)):l:null,[l,A]),M=(0,b.useCallback)(e=>{if(n){n(e);return}window.location.href=v(e)},[n]);return(0,x.jsxs)(`section`,{className:`data-panel`,children:[(0,x.jsx)(`h2`,{className:`data-panel-title`,children:`Search`}),(0,x.jsx)(`p`,{className:`data-panel-subtitle`,children:`Find anything in your knowledge base by keyword.`}),(0,x.jsxs)(`div`,{className:`data-search-input`,children:[(0,x.jsx)(s,{size:14}),(0,x.jsx)(`input`,{type:`text`,placeholder:`Search your knowledge…`,value:r,onChange:e=>i(e.target.value),autoFocus:!0,autoComplete:`off`,spellCheck:!1}),p&&(0,x.jsx)(c,{size:14,className:`spin`})]}),h&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Search failed: `,h]}),k.length>0&&(0,x.jsx)(`div`,{className:`data-chip-row`,role:`group`,"aria-label":`Filter by type`,children:k.map(e=>{let t=e===A;return(0,x.jsx)(`button`,{type:`button`,className:`data-chip`,"data-active":t,onClick:()=>S(t?null:e),children:E([e])??e},e)})}),l&&!p&&(0,x.jsxs)(`div`,{className:`data-results-meta`,children:[j.length,` of `,l.length,` result`,l.length===1?``:`s`]}),l&&!p&&!A&&C>0&&!D&&(0,x.jsxs)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>O(!0),children:[C,` low-confidence result`,C===1?``:`s`,` hidden — show all`]}),l&&!p&&!A&&D&&(0,x.jsx)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>O(!1),children:`Showing all results — hide low-confidence`}),l&&l.length===0&&!p&&(0,x.jsx)(`div`,{className:`data-empty-results`,children:`No matches. Try a different keyword.`}),j&&j.length>0&&(0,x.jsx)(`ul`,{className:`data-results`,children:j.map(e=>(0,x.jsx)(T,{hit:e,mode:d,onOpenInGraph:M},e.nodeId))})]})}function T({hit:e,mode:t,onOpenInGraph:n}){let r=D(e.properties),i=O(e.properties),a=E(e.labels),[o,s]=(0,b.useState)(!1),c=i&&i.length>280,l=o||!c?i:i?.slice(0,280)+`…`,u=t===`bm25`?`bm25 ${e.bm25Score.toFixed(2)}`:`vector ${e.vectorScore.toFixed(2)} · bm25 ${e.bm25Score.toFixed(2)} · combined ${e.score.toFixed(2)}`;return(0,x.jsxs)(`li`,{className:`data-result`,children:[(0,x.jsxs)(`div`,{role:`button`,tabIndex:0,className:`data-result-open`,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e))},"aria-label":`Open ${r??a??`node`} in graph`,children:[a&&(0,x.jsx)(`div`,{className:`data-result-header`,children:(0,x.jsx)(`span`,{className:`data-result-labels`,children:a})}),r&&(0,x.jsx)(`div`,{className:`data-result-title`,children:r}),i&&(0,x.jsx)(`pre`,{className:`data-result-body`,children:l}),(0,x.jsx)(`div`,{className:`data-result-scores`,children:u})]}),c&&(0,x.jsx)(`button`,{type:`button`,className:`data-result-toggle`,onClick:()=>s(e=>!e),children:o?`Show less`:`Show more`})]})}function E(e){if(e.length===0)return null;let t=e[0].replace(/([a-z])([A-Z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function D(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n.length>140?n.slice(0,140)+`…`:n}return null}function O(e){for(let t of[`content`,`summary`,`body`,`description`,`text`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}function k({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,a]=(0,b.useState)(`.`),[o,s]=(0,b.useState)(null),[l,u]=(0,b.useState)([]),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(null),[E,D]=(0,b.useState)(null),[O,k]=(0,b.useState)(null),[M,N]=(0,b.useState)(null),P=(0,b.useRef)(null),[F,I]=(0,b.useState)(0);(0,b.useEffect)(()=>{let t=!1;return _(!0),y(null),e(`/api/admin/files?path=${encodeURIComponent(r===`.`?``:r)}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(s(e.entries),u(e.displayPath??[]))}).catch(e=>{t||(s([]),u([]),y(e instanceof Error?e.message:String(e)))}).finally(()=>{t||_(!1)}),()=>{t=!0}},[e,r,F,n]);let L=(0,b.useCallback)(e=>{a(e)},[]),R=(0,b.useCallback)(()=>{if(r===`.`||r===``)return;let e=r.split(`/`).filter(Boolean);e.pop(),a(e.length===0?`.`:e.join(`/`))},[r]),z=(0,b.useCallback)(e=>{let n=r===`.`?e.name:`${r}/${e.name}`,i=`/api/admin/files/download?session_key=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}`,a=document.createElement(`a`);a.href=i,a.rel=`noopener noreferrer`,document.body.appendChild(a),a.click(),a.remove()},[r,t]),B=(0,b.useCallback)(()=>{P.current?.click()},[]),V=(0,b.useCallback)(e=>{D(null),N(e.name)},[]),H=(0,b.useCallback)(()=>{N(null)},[]),U=(0,b.useCallback)(async t=>{let n=r===`.`?t.name:`${r}/${t.name}`;D(null),N(null),k(t.name);try{let t=await e(`/api/admin/files?path=${encodeURIComponent(n)}`,{method:`DELETE`}),r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(r.error??`HTTP ${t.status}`);I(e=>e+1)}catch(e){D(e instanceof Error?e.message:String(e))}finally{k(null)}},[r,e]);(0,b.useEffect)(()=>{if(!M)return;let e=e=>{e.key===`Escape`&&N(null)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[M]);let W=(0,b.useCallback)(async e=>{T(null),C(!0);try{let n=new FormData;n.append(`session_key`,t),n.append(`file`,e);let r=await fetch(`/api/admin/files/upload`,{method:`POST`,body:n}),i=await r.json().catch(()=>({error:`HTTP ${r.status}`}));if(!r.ok)throw Error(i.error??`HTTP ${r.status}`);a(i.path.split(`/`).slice(0,-1).join(`/`)||`.`),I(e=>e+1)}catch(e){T(e instanceof Error?e.message:String(e))}finally{C(!1),P.current&&(P.current.value=``)}},[t]);return(0,x.jsxs)(`section`,{className:`data-panel`,children:[(0,x.jsxs)(`div`,{className:`data-panel-heading`,children:[(0,x.jsx)(`h2`,{className:`data-panel-title`,children:`Files`}),(0,x.jsxs)(`div`,{className:`data-file-actions`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`data-btn`,onClick:B,disabled:S,children:[S?(0,x.jsx)(c,{size:14,className:`spin`}):(0,x.jsx)(h,{size:14}),` Upload`]}),(0,x.jsx)(`input`,{type:`file`,ref:P,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&W(t)}})]})]}),(0,x.jsxs)(`p`,{className:`data-panel-subtitle`,children:[`Everything under your install's `,(0,x.jsx)(`code`,{children:`data/`}),` directory. Click a folder to open it, a file to download it. Uploads go to `,(0,x.jsx)(`code`,{children:`data/uploads/`}),`.`]}),(0,x.jsxs)(`div`,{className:`data-breadcrumbs`,children:[(0,x.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>L(`.`),children:`data`}),l.map((e,t)=>{let n=l.slice(0,t+1).map(e=>e.name).join(`/`);return(0,x.jsxs)(`span`,{className:`data-crumb-wrap`,children:[(0,x.jsx)(`span`,{className:`data-crumb-sep`,children:`/`}),(0,x.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>L(n),title:e.name,children:e.displayName??e.name})]},n)}),r!==`.`&&(0,x.jsxs)(`button`,{type:`button`,className:`data-btn data-btn-ghost data-up-btn`,onClick:R,children:[(0,x.jsx)(d,{size:14}),` Up`]})]}),w&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Upload failed: `,w]}),E&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Delete failed: `,E]}),v&&(0,x.jsx)(`div`,{className:`data-error`,children:v}),g&&(0,x.jsxs)(`div`,{className:`data-loading`,children:[(0,x.jsx)(c,{size:14,className:`spin`}),` Loading…`]}),!g&&o&&o.length===0&&!v&&(0,x.jsx)(`div`,{className:`data-empty-results`,children:`Empty directory.`}),!g&&o&&o.length>0&&(0,x.jsx)(`ul`,{className:`data-entries`,children:o.map(e=>{let t=e.displayName??e.name,n=O===e.name,a=M===e.name;return(0,x.jsx)(`li`,{className:`data-entry`,children:e.kind===`directory`?(0,x.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>L(r===`.`?e.name:`${r}/${e.name}`),children:[(0,x.jsx)(m,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t})]}):e.kind===`file`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>z(e),title:`Download ${t}`,disabled:a,children:[(0,x.jsx)(p,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t}),(0,x.jsxs)(`span`,{className:`data-entry-meta`,title:`Modified ${j(e.modifiedAt)}`,children:[A(e.sizeBytes),` · `,j(e.modifiedAt)]}),(0,x.jsx)(f,{size:12,className:`data-entry-download-icon`})]}),a?(0,x.jsxs)(`div`,{className:`data-entry-confirm`,role:`group`,"aria-label":`Confirm delete ${t}`,children:[(0,x.jsx)(`span`,{className:`data-entry-confirm-label`,children:`Delete?`}),(0,x.jsx)(`button`,{type:`button`,className:`data-entry-confirm-yes`,onClick:()=>U(e),autoFocus:!0,children:`Yes`}),(0,x.jsx)(`button`,{type:`button`,className:`data-entry-confirm-no`,onClick:H,children:`No`})]}):(0,x.jsx)(`button`,{type:`button`,className:`data-entry-delete`,onClick:()=>V(e),disabled:n,title:`Delete ${t}`,"aria-label":`Delete ${t}`,children:n?(0,x.jsx)(c,{size:14,className:`spin`}):(0,x.jsx)(i,{size:14})})]}):(0,x.jsxs)(`div`,{className:`data-entry-btn data-entry-disabled`,children:[(0,x.jsx)(p,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,children:t}),(0,x.jsx)(`span`,{className:`data-entry-meta`,children:`special`})]})},e.name)})})]})}function A(e){return e==null?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(1)} GB`}function j(e){try{let t=new Date(e);if(isNaN(t.getTime()))return`—`;let n=typeof navigator<`u`?navigator.languages&&navigator.languages.length>0?[...navigator.languages]:[navigator.language]:void 0;return t.toLocaleString(n,{dateStyle:`medium`,timeStyle:`short`})}catch{return`—`}}export{f as i,C as n,y as r,S as t};
1
+ import{o as e}from"./chunk-DD-I1_y5.js";import{a as t,f as n,h as r,s as i}from"./brand-Bm671owU.js";import{_ as a,a as o,d as s,m as c,o as l,t as u}from"./graph-labels-qhU8xZDH.js";var d=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),f=n(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),p=n(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),m=n(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),h=n(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);function g(e){let t=new Set,n=[];for(let r of e)for(let e of r.labels)e&&(t.has(e)||u.has(e)&&(t.add(e),n.push(e)));return n}var _=80;function v(e){let t=y(e.properties)??e.labels[0]??``,n=t.length>_?t.slice(0,_):t;return`/graph?${new URLSearchParams({nodeId:e.nodeId,label:n}).toString()}`}function y(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}var b=e(r(),1),x=t();function S(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(!1),[i,o]=(0,b.useState)(void 0),[s,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(void 0),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(null);(0,b.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.onboardingComplete==`boolean`&&f(e.onboardingComplete),typeof e.businessName==`string`&&o(e.businessName),e.conversationId!==void 0&&u(e.conversationId??null),v(e.role??null),m(e.userName===void 0?null:e.userName),g(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let y=(0,b.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]);return n?e?(0,x.jsx)(l,{cacheKey:e,businessName:i,conversationId:s,onLogout:y,onboardingComplete:d,userName:p,userAvatar:h,role:_,children:(0,x.jsxs)(`div`,{className:`data-page`,children:[(0,x.jsx)(`header`,{className:`data-header`,children:(0,x.jsxs)(`h1`,{className:`data-title`,children:[(0,x.jsx)(a,{size:18}),` Data`]})}),(0,x.jsx)(C,{cacheKey:e})]})}):(0,x.jsxs)(`div`,{className:`data-page`,children:[(0,x.jsx)(`header`,{className:`data-header`,children:(0,x.jsxs)(`h1`,{className:`data-title`,children:[(0,x.jsx)(a,{size:18}),` Data`]})}),(0,x.jsxs)(`div`,{className:`data-empty`,children:[(0,x.jsx)(`p`,{children:`You are not signed in.`}),(0,x.jsxs)(`p`,{children:[`Open the `,(0,x.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,x.jsx)(`div`,{className:`data-page`,children:(0,x.jsxs)(`div`,{className:`data-loading`,children:[(0,x.jsx)(c,{size:18,className:`spin`}),` Loading…`]})})}function C({cacheKey:e,onOpenInGraph:t}){let{adminFetch:n,cacheKey:r,sessionRefetchNonce:i,banner:a,reloadToLogin:s}=o({initialCacheKey:e,surface:`data`});return(0,x.jsxs)(`main`,{className:`data-main`,children:[a&&(0,x.jsx)(`button`,{type:`button`,className:`data-session-banner`,onClick:s,"data-reason":a.reason,children:a.message}),(0,x.jsx)(w,{adminFetch:n,sessionRefetchNonce:i,onOpenInGraph:t}),(0,x.jsx)(k,{adminFetch:n,cacheKey:r,sessionRefetchNonce:i})]})}function w({adminFetch:e,sessionRefetchNonce:t,onOpenInGraph:n}){let[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(``),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(`hybrid`),[p,m]=(0,b.useState)(!1),[h,_]=(0,b.useState)(null),[y,S]=(0,b.useState)(null),[C,w]=(0,b.useState)(0),[D,O]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=r.trim();if(!e){o(``),u(null);return}O(!1);let t=setTimeout(()=>o(e),300);return()=>clearTimeout(t)},[r]),(0,b.useEffect)(()=>{if(!a)return;let t=!1;return m(!0),_(null),e(`/api/admin/graph-search?q=${encodeURIComponent(a)}&labels=*&limit=20${D?`&threshold=0`:``}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(u(e.results),f(e.mode??`hybrid`),w(typeof e.suppressed==`number`?e.suppressed:0))}).catch(e=>{t||_(e instanceof Error?e.message:String(e))}).finally(()=>{t||m(!1)}),()=>{t=!0}},[a,e,t,D]);let k=(0,b.useMemo)(()=>l?g(l):[],[l]),A=y&&k.includes(y)?y:null,j=(0,b.useMemo)(()=>l?A?l.filter(e=>e.labels.includes(A)):l:null,[l,A]),M=(0,b.useCallback)(e=>{if(n){n(e);return}window.location.href=v(e)},[n]);return(0,x.jsxs)(`section`,{className:`data-panel`,children:[(0,x.jsx)(`h2`,{className:`data-panel-title`,children:`Search`}),(0,x.jsx)(`p`,{className:`data-panel-subtitle`,children:`Find anything in your knowledge base by keyword.`}),(0,x.jsxs)(`div`,{className:`data-search-input`,children:[(0,x.jsx)(s,{size:14}),(0,x.jsx)(`input`,{type:`text`,placeholder:`Search your knowledge…`,value:r,onChange:e=>i(e.target.value),autoFocus:!0,autoComplete:`off`,spellCheck:!1}),p&&(0,x.jsx)(c,{size:14,className:`spin`})]}),h&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Search failed: `,h]}),k.length>0&&(0,x.jsx)(`div`,{className:`data-chip-row`,role:`group`,"aria-label":`Filter by type`,children:k.map(e=>{let t=e===A;return(0,x.jsx)(`button`,{type:`button`,className:`data-chip`,"data-active":t,onClick:()=>S(t?null:e),children:E([e])??e},e)})}),l&&!p&&(0,x.jsxs)(`div`,{className:`data-results-meta`,children:[j.length,` of `,l.length,` result`,l.length===1?``:`s`]}),l&&!p&&!A&&C>0&&!D&&(0,x.jsxs)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>O(!0),children:[C,` low-confidence result`,C===1?``:`s`,` hidden — show all`]}),l&&!p&&!A&&D&&(0,x.jsx)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>O(!1),children:`Showing all results — hide low-confidence`}),l&&l.length===0&&!p&&(0,x.jsx)(`div`,{className:`data-empty-results`,children:`No matches. Try a different keyword.`}),j&&j.length>0&&(0,x.jsx)(`ul`,{className:`data-results`,children:j.map(e=>(0,x.jsx)(T,{hit:e,mode:d,onOpenInGraph:M},e.nodeId))})]})}function T({hit:e,mode:t,onOpenInGraph:n}){let r=D(e.properties),i=O(e.properties),a=E(e.labels),[o,s]=(0,b.useState)(!1),c=i&&i.length>280,l=o||!c?i:i?.slice(0,280)+`…`,u=t===`bm25`?`bm25 ${e.bm25Score.toFixed(2)}`:`vector ${e.vectorScore.toFixed(2)} · bm25 ${e.bm25Score.toFixed(2)} · combined ${e.score.toFixed(2)}`;return(0,x.jsxs)(`li`,{className:`data-result`,children:[(0,x.jsxs)(`div`,{role:`button`,tabIndex:0,className:`data-result-open`,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e))},"aria-label":`Open ${r??a??`node`} in graph`,children:[a&&(0,x.jsx)(`div`,{className:`data-result-header`,children:(0,x.jsx)(`span`,{className:`data-result-labels`,children:a})}),r&&(0,x.jsx)(`div`,{className:`data-result-title`,children:r}),i&&(0,x.jsx)(`pre`,{className:`data-result-body`,children:l}),(0,x.jsx)(`div`,{className:`data-result-scores`,children:u})]}),c&&(0,x.jsx)(`button`,{type:`button`,className:`data-result-toggle`,onClick:()=>s(e=>!e),children:o?`Show less`:`Show more`})]})}function E(e){if(e.length===0)return null;let t=e[0].replace(/([a-z])([A-Z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function D(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n.length>140?n.slice(0,140)+`…`:n}return null}function O(e){for(let t of[`content`,`summary`,`body`,`description`,`text`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}function k({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,a]=(0,b.useState)(`.`),[o,s]=(0,b.useState)(null),[l,u]=(0,b.useState)([]),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(null),[E,D]=(0,b.useState)(null),[O,k]=(0,b.useState)(null),[M,N]=(0,b.useState)(null),P=(0,b.useRef)(null),[F,I]=(0,b.useState)(0);(0,b.useEffect)(()=>{let t=!1;return _(!0),y(null),e(`/api/admin/files?path=${encodeURIComponent(r===`.`?``:r)}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(s(e.entries),u(e.displayPath??[]))}).catch(e=>{t||(s([]),u([]),y(e instanceof Error?e.message:String(e)))}).finally(()=>{t||_(!1)}),()=>{t=!0}},[e,r,F,n]);let L=(0,b.useCallback)(e=>{a(e)},[]),R=(0,b.useCallback)(()=>{if(r===`.`||r===``)return;let e=r.split(`/`).filter(Boolean);e.pop(),a(e.length===0?`.`:e.join(`/`))},[r]),z=(0,b.useCallback)(e=>{let n=r===`.`?e.name:`${r}/${e.name}`,i=`/api/admin/files/download?session_key=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}`,a=document.createElement(`a`);a.href=i,a.rel=`noopener noreferrer`,document.body.appendChild(a),a.click(),a.remove()},[r,t]),B=(0,b.useCallback)(()=>{P.current?.click()},[]),V=(0,b.useCallback)(e=>{D(null),N(e.name)},[]),H=(0,b.useCallback)(()=>{N(null)},[]),U=(0,b.useCallback)(async t=>{let n=r===`.`?t.name:`${r}/${t.name}`;D(null),N(null),k(t.name);try{let t=await e(`/api/admin/files?path=${encodeURIComponent(n)}`,{method:`DELETE`}),r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(r.error??`HTTP ${t.status}`);I(e=>e+1)}catch(e){D(e instanceof Error?e.message:String(e))}finally{k(null)}},[r,e]);(0,b.useEffect)(()=>{if(!M)return;let e=e=>{e.key===`Escape`&&N(null)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[M]);let W=(0,b.useCallback)(async e=>{T(null),C(!0);try{let n=new FormData;n.append(`session_key`,t),n.append(`file`,e);let r=await fetch(`/api/admin/files/upload`,{method:`POST`,body:n}),i=await r.json().catch(()=>({error:`HTTP ${r.status}`}));if(!r.ok)throw Error(i.error??`HTTP ${r.status}`);a(i.path.split(`/`).slice(0,-1).join(`/`)||`.`),I(e=>e+1)}catch(e){T(e instanceof Error?e.message:String(e))}finally{C(!1),P.current&&(P.current.value=``)}},[t]);return(0,x.jsxs)(`section`,{className:`data-panel`,children:[(0,x.jsxs)(`div`,{className:`data-panel-heading`,children:[(0,x.jsx)(`h2`,{className:`data-panel-title`,children:`Files`}),(0,x.jsxs)(`div`,{className:`data-file-actions`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`data-btn`,onClick:B,disabled:S,children:[S?(0,x.jsx)(c,{size:14,className:`spin`}):(0,x.jsx)(h,{size:14}),` Upload`]}),(0,x.jsx)(`input`,{type:`file`,ref:P,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&W(t)}})]})]}),(0,x.jsxs)(`p`,{className:`data-panel-subtitle`,children:[`Everything under your install's `,(0,x.jsx)(`code`,{children:`data/`}),` directory. Click a folder to open it, a file to download it. Uploads go to `,(0,x.jsx)(`code`,{children:`data/uploads/`}),`.`]}),(0,x.jsxs)(`div`,{className:`data-breadcrumbs`,children:[(0,x.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>L(`.`),children:`data`}),l.map((e,t)=>{let n=l.slice(0,t+1).map(e=>e.name).join(`/`);return(0,x.jsxs)(`span`,{className:`data-crumb-wrap`,children:[(0,x.jsx)(`span`,{className:`data-crumb-sep`,children:`/`}),(0,x.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>L(n),title:e.name,children:e.displayName??e.name})]},n)}),r!==`.`&&(0,x.jsxs)(`button`,{type:`button`,className:`data-btn data-btn-ghost data-up-btn`,onClick:R,children:[(0,x.jsx)(d,{size:14}),` Up`]})]}),w&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Upload failed: `,w]}),E&&(0,x.jsxs)(`div`,{className:`data-error`,children:[`Delete failed: `,E]}),v&&(0,x.jsx)(`div`,{className:`data-error`,children:v}),g&&(0,x.jsxs)(`div`,{className:`data-loading`,children:[(0,x.jsx)(c,{size:14,className:`spin`}),` Loading…`]}),!g&&o&&o.length===0&&!v&&(0,x.jsx)(`div`,{className:`data-empty-results`,children:`Empty directory.`}),!g&&o&&o.length>0&&(0,x.jsx)(`ul`,{className:`data-entries`,children:o.map(e=>{let t=e.displayName??e.name,n=O===e.name,a=M===e.name;return(0,x.jsx)(`li`,{className:`data-entry`,children:e.kind===`directory`?(0,x.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>L(r===`.`?e.name:`${r}/${e.name}`),children:[(0,x.jsx)(m,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t})]}):e.kind===`file`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>z(e),title:`Download ${t}`,disabled:a,children:[(0,x.jsx)(p,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t}),(0,x.jsxs)(`span`,{className:`data-entry-meta`,title:`Modified ${j(e.modifiedAt)}`,children:[A(e.sizeBytes),` · `,j(e.modifiedAt)]}),(0,x.jsx)(f,{size:12,className:`data-entry-download-icon`})]}),a?(0,x.jsxs)(`div`,{className:`data-entry-confirm`,role:`group`,"aria-label":`Confirm delete ${t}`,children:[(0,x.jsx)(`span`,{className:`data-entry-confirm-label`,children:`Delete?`}),(0,x.jsx)(`button`,{type:`button`,className:`data-entry-confirm-yes`,onClick:()=>U(e),autoFocus:!0,children:`Yes`}),(0,x.jsx)(`button`,{type:`button`,className:`data-entry-confirm-no`,onClick:H,children:`No`})]}):(0,x.jsx)(`button`,{type:`button`,className:`data-entry-delete`,onClick:()=>V(e),disabled:n,title:`Delete ${t}`,"aria-label":`Delete ${t}`,children:n?(0,x.jsx)(c,{size:14,className:`spin`}):(0,x.jsx)(i,{size:14})})]}):(0,x.jsxs)(`div`,{className:`data-entry-btn data-entry-disabled`,children:[(0,x.jsx)(p,{size:14}),(0,x.jsx)(`span`,{className:`data-entry-name`,children:t}),(0,x.jsx)(`span`,{className:`data-entry-meta`,children:`special`})]})},e.name)})})]})}function A(e){return e==null?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(1)} GB`}function j(e){try{let t=new Date(e);if(isNaN(t.getTime()))return`—`;let n=typeof navigator<`u`?navigator.languages&&navigator.languages.length>0?[...navigator.languages]:[navigator.language]:void 0;return t.toLocaleString(n,{dateStyle:`medium`,timeStyle:`short`})}catch{return`—`}}export{f as i,C as n,y as r,S as t};
@@ -5,11 +5,11 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Data — Maxy</title>
7
7
  <link rel="icon" href="/favicon.ico">
8
- <script type="module" crossorigin src="/assets/data-K_kS__sL.js"></script>
8
+ <script type="module" crossorigin src="/assets/data-ll_OwVNL.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/chunk-DD-I1_y5.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/brand-Bm671owU.js">
11
- <link rel="modulepreload" crossorigin href="/assets/graph-labels-C7I5QvNv.js">
12
- <link rel="modulepreload" crossorigin href="/assets/page-B_rpjIRr.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/graph-labels-qhU8xZDH.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/page-DsYsdBUK.js">
13
13
  <link rel="stylesheet" crossorigin href="/assets/brand-DqiRNMlu.css">
14
14
  </head>
15
15
  <body>
@@ -5,12 +5,12 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Graph — Maxy</title>
7
7
  <link rel="icon" href="/favicon.ico">
8
- <script type="module" crossorigin src="/assets/graph-DeEigyO_.js"></script>
8
+ <script type="module" crossorigin src="/assets/graph-DJ2VWioQ.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/chunk-DD-I1_y5.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/brand-Bm671owU.js">
11
- <link rel="modulepreload" crossorigin href="/assets/graph-labels-C7I5QvNv.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/graph-labels-qhU8xZDH.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/Checkbox-YIF0payo.js">
13
- <link rel="modulepreload" crossorigin href="/assets/page-qSH972X0.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/page-Dk73ZO1F.js">
14
14
  <link rel="stylesheet" crossorigin href="/assets/brand-DqiRNMlu.css">
15
15
  </head>
16
16
  <body>
@@ -5,14 +5,14 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Real Agent</title>
7
7
  <link rel="icon" href="/favicon.ico">
8
- <script type="module" crossorigin src="/assets/admin-CDvF5de6.js"></script>
8
+ <script type="module" crossorigin src="/assets/admin-Bk2eXMFD.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/chunk-DD-I1_y5.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/brand-Bm671owU.js">
11
- <link rel="modulepreload" crossorigin href="/assets/graph-labels-C7I5QvNv.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/graph-labels-qhU8xZDH.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/device-url-actions-AcOyLSeF.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/Checkbox-YIF0payo.js">
14
- <link rel="modulepreload" crossorigin href="/assets/page-B_rpjIRr.js">
15
- <link rel="modulepreload" crossorigin href="/assets/page-qSH972X0.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/page-DsYsdBUK.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/page-Dk73ZO1F.js">
16
16
  <link rel="stylesheet" crossorigin href="/assets/brand-DqiRNMlu.css">
17
17
  <link rel="stylesheet" crossorigin href="/assets/admin-CWMpccrR.css">
18
18
  <link rel="stylesheet" href="/brand-defaults.css">