@uniqbit/mate-core 1.0.0-canary.7 → 1.0.0-canary.8

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 (181) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/package.json +6 -3
  3. package/src/cli/commands/artifact/delivery/submit.ts +6 -4
  4. package/src/cli/commands/artifact/finish/command.ts +28 -11
  5. package/src/cli/commands/artifact/pending/command.ts +71 -7
  6. package/src/cli/commands/cap/tokensave.ts +2 -2
  7. package/src/cli/commands/companion/update.ts +2 -3
  8. package/src/cli/commands/doctor.ts +16 -4
  9. package/src/cli/commands/install.ts +8 -4
  10. package/src/cli/commands/plugin/install.ts +82 -35
  11. package/src/cli/commands/studio/service-host.ts +3 -0
  12. package/src/cli/commands/triage.ts +32 -11
  13. package/src/cli/commands/vscode/release-vsix.json +2 -2
  14. package/src/cli/install-plan.tsx +3 -0
  15. package/src/cli/main.ts +51 -7
  16. package/src/cli/usage.ts +3 -3
  17. package/src/factory-host.ts +6 -0
  18. package/src/index.ts +1 -0
  19. package/src/lib/delivery/merge-git.ts +31 -7
  20. package/src/lib/delivery/overlap.ts +14 -1
  21. package/src/lib/delivery/repository-access.ts +11 -6
  22. package/src/lib/delivery/staging/apply-chain.ts +25 -7
  23. package/src/lib/delivery/staging/linked-merges.ts +175 -0
  24. package/src/lib/delivery/staging/naming.ts +3 -0
  25. package/src/lib/delivery/staging/openspec-type.ts +38 -7
  26. package/src/lib/delivery/staging/pending.ts +153 -11
  27. package/src/lib/delivery/staging/preflight.ts +239 -0
  28. package/src/lib/delivery/staging/project.ts +243 -104
  29. package/src/lib/delivery/staging/replay.ts +5 -3
  30. package/src/lib/delivery/staging/settle-linked.ts +5 -119
  31. package/src/lib/delivery/staging/submit.ts +139 -18
  32. package/src/lib/delivery/submit-change.ts +163 -37
  33. package/src/lib/friction/mark.ts +49 -11
  34. package/src/lib/friction/view/read.ts +10 -1
  35. package/src/lib/openspec-cli.ts +10 -5
  36. package/src/lib/skills-cli.ts +38 -0
  37. package/src/lib/tool-manifest.ts +73 -0
  38. package/src/lib/triage/context.ts +138 -12
  39. package/src/lib/triage/prepare.ts +19 -4
  40. package/src/plugin-api.ts +1 -0
  41. package/src/runtime/command-arg.ts +15 -0
  42. package/src/runtime/companion-guidance.ts +1 -1
  43. package/src/runtime/friction-log.ts +41 -17
  44. package/src/runtime/friction-recorder.ts +15 -2
  45. package/src/runtime/git-tracked.ts +13 -2
  46. package/src/studio.ts +6 -1
  47. package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +5 -1
  48. package/src/templates/capabilities/react-doctor/mate-react-doctor/SKILL.md +28 -0
  49. package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +42 -4
  50. package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +27 -2
  51. package/src/templates/mate-skills/agents/mate-backfill-spec/SKILL.md +23 -1
  52. package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +26 -1
  53. package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +28 -0
  54. package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +28 -3
  55. package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +28 -0
  56. package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +28 -0
  57. package/src/templates/mate-skills/agents/mate-grilling/SKILL.md +25 -0
  58. package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +28 -0
  59. package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +28 -3
  60. package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +28 -6
  61. package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +27 -2
  62. package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +28 -0
  63. package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +24 -2
  64. package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +42 -4
  65. package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +27 -2
  66. package/src/templates/mate-skills/claude/mate-backfill-spec/SKILL.md +23 -1
  67. package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +26 -1
  68. package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +28 -0
  69. package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +28 -3
  70. package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +28 -0
  71. package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +28 -0
  72. package/src/templates/mate-skills/claude/mate-grilling/SKILL.md +25 -0
  73. package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +28 -0
  74. package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +28 -3
  75. package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +28 -6
  76. package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +27 -2
  77. package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +28 -0
  78. package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +24 -2
  79. package/src/templates/triage/PLAYBOOK.md +9 -1
  80. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +108 -108
  81. package/src/tools/setup/capabilities/graphify.ts +23 -1
  82. package/src/tools/setup/capabilities/rtk.ts +27 -86
  83. package/src/tools/setup/capabilities/tokensave.ts +76 -54
  84. package/src/tools/setup/dynamic-plugins/audiences.ts +28 -14
  85. package/src/tools/setup/dynamic-plugins/hydrate.ts +32 -14
  86. package/src/tools/setup/dynamic-plugins/install.ts +2 -0
  87. package/src/tools/setup/dynamic-plugins/installed.ts +73 -0
  88. package/src/tools/setup/dynamic-plugins/loader.ts +12 -10
  89. package/src/tools/setup/dynamic-plugins/local.ts +492 -0
  90. package/src/tools/setup/dynamic-plugins/paths.ts +34 -6
  91. package/src/tools/setup/dynamic-plugins/verify.ts +34 -14
  92. package/src/tools/setup/dynamic-plugins/workspaces.ts +17 -8
  93. package/src/tools/setup/mate.ts +26 -1
  94. package/src/tools/setup/plugins/gitignore.ts +45 -12
  95. package/src/tools/setup/service.ts +8 -0
  96. package/src/tools/setup/utils.ts +10 -1
  97. package/studio-dist/client/assets/app-ggXJ_QVh.css +2 -0
  98. package/studio-dist/client/assets/button-amJ3g5oD.js +1 -0
  99. package/studio-dist/client/assets/cn-BQPKiwI4.js +1 -0
  100. package/studio-dist/client/assets/combobox-CJ7aGFid.js +1 -0
  101. package/studio-dist/client/assets/{companion-view-DINdPF-b.js → companion-view-C_N237bf.js} +1 -1
  102. package/studio-dist/client/assets/fields-BAiGkJ5N.js +1 -0
  103. package/studio-dist/client/assets/friction-DqOU59v7.js +1 -0
  104. package/studio-dist/client/assets/getting-started-yp42dj5S.js +1 -0
  105. package/studio-dist/client/assets/{getting-started._topic-DVB8e5R9.js → getting-started._topic-C9zVXz_m.js} +1 -1
  106. package/studio-dist/client/assets/{getting-started.index-DQvLHEr1.js → getting-started.index-DWbDKICP.js} +1 -1
  107. package/studio-dist/client/assets/graph-BYaD_5Bq.js +2 -0
  108. package/studio-dist/client/assets/{graph-canvas-DIcAqwtK.js → graph-canvas-ySGKMhmk.js} +1 -1
  109. package/studio-dist/client/assets/index-Qx7reRPD.js +40 -0
  110. package/studio-dist/client/assets/panel-C4bf_h2W.js +1 -0
  111. package/studio-dist/client/assets/plugins._service._view-y6f2FDAB.js +1 -0
  112. package/studio-dist/client/assets/reports-JFSwSueq.js +1 -0
  113. package/studio-dist/client/assets/routes-BdOWSgzK.js +1 -0
  114. package/studio-dist/client/assets/select-BHYYWPhK.js +1 -0
  115. package/studio-dist/client/assets/skills-Bo9FLsBd.js +1 -0
  116. package/studio-dist/client/assets/{specs-Dl8HfGlU.js → specs-BrCOjOch.js} +1 -1
  117. package/studio-dist/client/assets/specs-view-CdE2rlli.js +1 -0
  118. package/studio-dist/client/assets/{store-DyXbi6o9.js → store-C3vJq8Wj.js} +1 -1
  119. package/studio-dist/client/assets/{usage-Blcl8kA_.js → usage-BLsLy0nN.js} +13 -13
  120. package/studio-dist/client/assets/{useAnchoredPopupScrollLock-BBXJpX5L.js → useAnchoredPopupScrollLock-DC7f8GOp.js} +1 -1
  121. package/studio-dist/client/assets/useMutation-uJUrejsi.js +1 -0
  122. package/studio-dist/client/assets/vault-BB1B_OhR.js +1 -0
  123. package/studio-dist/client/assets/warnings-CqOOGlPD.js +1 -0
  124. package/studio-dist/client/assets/workflow-BFzmI-06.js +1 -0
  125. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-JoHQ5ihx.js → __23tanstack-start-server-fn-resolver-gVfW5vIV.js} +1 -1
  126. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +42 -42
  127. package/studio-dist/server/assets/{button-B7e1fRyW.js → button-D6bvrFmm.js} +3 -3480
  128. package/studio-dist/server/assets/cn-FXJAM0KO.js +5528 -0
  129. package/studio-dist/server/assets/{combobox--S_OmUfh.js → combobox-D2MbYV1O.js} +6 -5
  130. package/studio-dist/server/assets/{companion-view-D-vGM55e.js → companion-view-Mf1ANbMb.js} +2 -2
  131. package/studio-dist/server/assets/{fields-B4qM2ZwC.js → fields-B4mAPETz.js} +2 -1
  132. package/studio-dist/server/assets/{friction-sLxaWY-H.js → friction-9a5S1m7U.js} +54 -14
  133. package/studio-dist/server/assets/{getting-started-Cq5Pcnsr.js → getting-started-RU6tYU2Q.js} +2 -2
  134. package/studio-dist/server/assets/{getting-started._topic-CmWdl3u3.js → getting-started._topic-C02HGrC6.js} +2 -2
  135. package/studio-dist/server/assets/{getting-started.index-AB8xpTFY.js → getting-started.index-EzLRosbb.js} +2 -2
  136. package/studio-dist/server/assets/{graph-C_Hn-Wf_.js → graph-CZ2H9Fzr.js} +7 -6
  137. package/studio-dist/server/assets/{graph-canvas-BthrSmPS.js → graph-canvas-rP5TT14Z.js} +1 -1
  138. package/studio-dist/server/assets/{guides-BVQ4pt5B.js → guides-BGftp4wf.js} +1 -1
  139. package/studio-dist/server/assets/{markdown-view-rwiiVcPC.js → markdown-view-CArpV-CS.js} +1 -1
  140. package/studio-dist/server/assets/{panel-CUxRIpYL.js → panel-DR0iq46J.js} +4 -3
  141. package/studio-dist/server/assets/{plugins._service._view-BSvGnlhU.js → plugins._service._view-n7u2k5dF.js} +7 -4
  142. package/studio-dist/server/assets/{queries-S_Pl90IG.js → queries-D-yVP9i0.js} +1 -1
  143. package/studio-dist/server/assets/{reports-CJpAItPk.js → reports-C2SmTgqh.js} +6 -5
  144. package/studio-dist/server/assets/{router-DF0etoNa.js → router-CPt0TAk_.js} +54 -29
  145. package/studio-dist/server/assets/{routes-6ylCLkyg.js → routes-CwH8LEy2.js} +8 -7
  146. package/studio-dist/server/assets/{select-CjuKScan.js → select-C3i6TTX-.js} +5 -4
  147. package/studio-dist/server/assets/{shell-DLkP7wG9.js → shell-CagqZZMZ.js} +2 -1
  148. package/studio-dist/server/assets/{skills-zeU80A9S.js → skills-C21Mg_8-.js} +7 -6
  149. package/studio-dist/server/assets/{specs-DDBNT_v1.js → specs-DetoMiaB.js} +3 -3
  150. package/studio-dist/server/assets/{specs-view-exvmWdg0.js → specs-view-CmbfLDwN.js} +9 -8
  151. package/studio-dist/server/assets/{store-kS7zk0Hr.js → store-aC-I6f6o.js} +1 -1
  152. package/studio-dist/server/assets/{studio-queries-qOXOYoPt.js → studio-queries-Dqf-3nzj.js} +1 -1
  153. package/studio-dist/server/assets/{usage-C2um7YiV.js → usage-CS4CBK9D.js} +9 -9
  154. package/studio-dist/server/assets/{useAnchoredPopupScrollLock-kQBB3y_b.js → useAnchoredPopupScrollLock-BjMNgXv9.js} +2 -2
  155. package/studio-dist/server/assets/{useMutation-C-WO6hCM.js → useMutation-DpBIuWXt.js} +2 -2
  156. package/studio-dist/server/assets/{vault-B8vgVIH9.js → vault-DVQidlId.js} +6 -6
  157. package/studio-dist/server/assets/{warnings-BxK4VfV5.js → warnings-C7hgXpdk.js} +2 -1
  158. package/studio-dist/server/assets/{workflow-BrTK632u.js → workflow-6dZZ1ofw.js} +7 -6
  159. package/studio-dist/server/server.js +2 -2
  160. package/tool-manifest.yaml +85 -0
  161. package/studio-dist/client/assets/app-aIwDxf48.css +0 -2
  162. package/studio-dist/client/assets/button-CX0sWAJl.js +0 -1
  163. package/studio-dist/client/assets/combobox-BmA8RjOc.js +0 -1
  164. package/studio-dist/client/assets/fields-BobQ7zRF.js +0 -1
  165. package/studio-dist/client/assets/friction-YdYd3zaz.js +0 -1
  166. package/studio-dist/client/assets/getting-started-CY7NEtTw.js +0 -1
  167. package/studio-dist/client/assets/graph-DbNnR884.js +0 -2
  168. package/studio-dist/client/assets/index-CysBCSxM.js +0 -40
  169. package/studio-dist/client/assets/panel-Csr49lBo.js +0 -1
  170. package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +0 -1
  171. package/studio-dist/client/assets/reports-CLdgxxkg.js +0 -1
  172. package/studio-dist/client/assets/routes-DGilWbDE.js +0 -1
  173. package/studio-dist/client/assets/select-DdebbX7K.js +0 -1
  174. package/studio-dist/client/assets/skills-C3zNkU8g.js +0 -1
  175. package/studio-dist/client/assets/specs-view-B_n0Pekv.js +0 -1
  176. package/studio-dist/client/assets/useBaseQuery-C2cjmeH2.js +0 -1
  177. package/studio-dist/client/assets/useMutation-DI6LbvVa.js +0 -1
  178. package/studio-dist/client/assets/vault-Cb9DmM1i.js +0 -1
  179. package/studio-dist/client/assets/warnings-B-rvoW8q.js +0 -1
  180. package/studio-dist/client/assets/workflow-DN5T19jd.js +0 -1
  181. package/studio-dist/server/assets/useBaseQuery--iH3rd-T.js +0 -2051
@@ -1 +0,0 @@
1
- import{a as e,n as t,r as n,t as r}from"./jsx-runtime-MZURdZre.js";import{r as i,t as a}from"./useBaseQuery-C2cjmeH2.js";var o=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),s=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()}));function c(e,t){return a(e,i,t)}var l=e(t(),1),u=r();function d(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function f(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d(e))&&(r&&(r+=` `),r+=t);return r}var p=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},m=(e,t)=>({classGroupId:e,validator:t}),h=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),g=`-`,_=[],v=`arbitrary..`,y=e=>{let t=S(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return x(e);let n=e.split(g);return b(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?p(i,t):t:i||_}return n[e]||_}}},b=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=b(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(g):e.slice(t).join(g),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},x=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?v+r:void 0})(),S=e=>{let{theme:t,classGroups:n}=e;return C(n,t)},C=(e,t)=>{let n=h();for(let r in e){let i=e[r];w(i,n,r,t)}return n},w=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];T(i,t,n,r)}},T=(e,t,n,r)=>{typeof e==`string`?E(e,t,n):typeof e==`function`?D(e,t,n,r):O(e,t,n,r)},E=(e,t,n)=>{let r=e===``?t:k(t,e);r.classGroupId=n},D=(e,t,n,r)=>{ee(e)?w(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(m(n,e)))},O=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];w(o,k(t,a),n,r)}},k=(e,t)=>{let n=e,r=t.split(g),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=h(),n.nextPart.set(t,i)),n=i}return n},ee=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,A=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},j=`!`,M=`:`,te=[],N=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),P=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===M){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(j)?(c=s.slice(0,-1),l=!0):s.startsWith(j)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return N(t,l,c,u)};if(t){let e=t+M,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):N(te,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},F=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ne=e=>({cache:A(e.cacheSize),parseClassName:P(e),sortModifiers:F(e),postfixLookupClassGroupIds:re(e),...y(e)}),re=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ie=/\s+/,I=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ie),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+j:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},L=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ae(n))&&(i&&(i+=` `),i+=r);return i},ae=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ae(e[r]))&&(n&&(n+=` `),n+=t);return n},oe=(e,...t)=>{let n,r,i,a,o=o=>(n=ne(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=I(e,n);return i(e,a),a};return a=o,(...e)=>a(L(...e))},R=[],z=e=>{let t=t=>t[e]||R;return t.isThemeGetter=!0,t.themeKey=e,t},se=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ce=/^\((?:(\w[\w-]*):)?(.+)\)$/i,le=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,de=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,pe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,me=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,he=e=>le.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),V=e=>!!e&&Number.isInteger(Number(e)),ge=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),_e=e=>ue.test(e),ve=()=>!0,ye=e=>de.test(e)&&!fe.test(e),be=()=>!1,xe=e=>pe.test(e),Se=e=>me.test(e),Ce=e=>!H(e)&&!U(e),we=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Te=e=>Be(e,We,be),H=e=>se.test(e),Ee=e=>Be(e,Ge,ye),De=e=>Be(e,Ke,B),Oe=e=>Be(e,Je,ve),ke=e=>Be(e,qe,be),Ae=e=>Be(e,He,be),je=e=>Be(e,Ue,Se),Me=e=>Be(e,Ye,xe),U=e=>ce.test(e),Ne=e=>Ve(e,Ge),Pe=e=>Ve(e,qe),Fe=e=>Ve(e,He),Ie=e=>Ve(e,We),Le=e=>Ve(e,Ue),Re=e=>Ve(e,Ye,!0),ze=e=>Ve(e,Je,!0),Be=(e,t,n)=>{let r=se.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ve=(e,t,n=!1)=>{let r=ce.exec(e);return r?r[1]?t(r[1]):n:!1},He=e=>e===`position`||e===`percentage`,Ue=e=>e===`image`||e===`url`,We=e=>e===`length`||e===`size`||e===`bg-size`,Ge=e=>e===`length`,Ke=e=>e===`number`,qe=e=>e===`family-name`,Je=e=>e===`number`||e===`weight`,Ye=e=>e===`shadow`,Xe=oe(()=>{let e=z(`color`),t=z(`font`),n=z(`text`),r=z(`font-weight`),i=z(`tracking`),a=z(`leading`),o=z(`breakpoint`),s=z(`container`),c=z(`spacing`),l=z(`radius`),u=z(`shadow`),d=z(`inset-shadow`),f=z(`text-shadow`),p=z(`drop-shadow`),m=z(`blur`),h=z(`perspective`),g=z(`aspect`),_=z(`ease`),v=z(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[he,`full`,`auto`,...w()],E=()=>[V,`none`,`subgrid`,U,H],D=()=>[`auto`,{span:[`full`,V,U,H]},V,U,H],O=()=>[V,`auto`,U,H],k=()=>[`auto`,`min`,`max`,`fr`,U,H],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[he,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[s,he,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[he,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,U,H],F=()=>[...b(),Fe,Ae,{position:[U,H]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Ie,Te,{size:[U,H]}],ie=()=>[ge,Ne,Ee],I=()=>[``,`none`,`full`,l,U,H],L=()=>[``,B,Ne,Ee],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[B,ge,Fe,Ae],se=()=>[``,`none`,m,U,H],ce=()=>[`none`,B,U,H],le=()=>[`none`,B,U,H],ue=()=>[B,U,H],de=()=>[he,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[_e],breakpoint:[_e],color:[ve],container:[_e],"drop-shadow":[_e],ease:[`in`,`out`,`in-out`],font:[Ce],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[_e],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[_e],shadow:[_e],spacing:[`px`,B],text:[_e],"text-shadow":[_e],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,he,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[we],columns:[{columns:[B,`auto`,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[V,`auto`,U,H]}],basis:[{basis:[he,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,he,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,B,U,H]}],shrink:[{shrink:[``,B,U,H]}],order:[{order:[V,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...M()]}],"font-size":[{text:[`base`,n,Ne,Ee]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ze,Oe]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ge,H]}],"font-family":[{font:[Pe,ke,t]}],"font-features":[{"font-features":[H]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,U,H]}],"line-clamp":[{"line-clamp":[B,`none`,U,De]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,U,Ee]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[B,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[V,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},V,U,H],radial:[``,U,H],conic:[``,V,U,H]},Le,je]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,U,H]}],"outline-w":[{outline:[``,B,Ne,Ee]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,Re,Me]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Re,Me]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[B,Ee]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,Re,Me]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[B,U,H]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:se()}],brightness:[{brightness:[B,U,H]}],contrast:[{contrast:[B,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Re,Me]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,B,U,H]}],"hue-rotate":[{"hue-rotate":[B,U,H]}],invert:[{invert:[``,B,U,H]}],saturate:[{saturate:[B,U,H]}],sepia:[{sepia:[``,B,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[B,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[B,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,B,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[B,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[B,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[B,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],zoom:[{zoom:[V,U,H]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,U,H]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,U,H]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[B,Ne,Ee,De]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function W(...e){return Xe(f(e))}function Ze({className:e,...t}){return(0,u.jsx)(`svg`,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,className:W(`size-4 shrink-0 animate-spin motion-reduce:animate-none`,e),...t,children:(0,u.jsx)(`path`,{d:`M12 3a9 9 0 1 1-9 9`})})}function Qe({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=l.useRef(e!==void 0),[a,o]=l.useState(()=>t);return[i&&e!==void 0?e:a,l.useCallback(e=>{i||o(e)},[])]}var $e={...l};function et(){let[,e]=l.useState({});return l.useCallback(()=>{e({})},[])}var tt=0;function nt(e,t=`mui`){let n=l.useRef(void 0),r=et(),i=e??n.current;return l.useEffect(()=>{n.current??(tt+=1,n.current=`${t}-${tt}`,e??r())},[e,t,r]),i}var rt=$e.useId;function it(e,t){if(rt!==void 0){let n=rt();return e??(t?`${t}-${n}`:n)}return nt(e,t)}function at(e){return it(e,`base-ui`)}var ot={};function G(e,t){let n=l.useRef(ot);return n.current===ot&&(n.current=e(t)),n}function st(e,t,n,r){let i=G(lt).current;return ut(i,e,t,n,r)&&ft(i,[e,t,n,r]),i.callback}function ct(e){let t=G(lt).current;return dt(t,e)&&ft(t,e),t.callback}function lt(){return{callback:null,cleanup:null,refs:[]}}function ut(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function dt(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function ft(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var pt=19;function mt(e){return pt>=e}function ht(e){if(!l.isValidElement(e))return null;let t=e,n=t.props;return(mt(19)?n?.ref:t.ref)??null}function gt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _t(){}var vt=Object.freeze([]),K=Object.freeze({});function yt(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function bt(e,t){return typeof e==`function`?e(t):e}function xt(e,t){return typeof e==`function`?e(t):e}var St={};function Ct(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Tt(t);let a=Tt(e);return t&&(a=Et(a,t)),n&&(a=Et(a,n)),r&&(a=Et(a,r)),i&&(a=Et(a,i)),a}function wt(e){if(e.length===0)return St;if(e.length===1)return Tt(e[0]);let t=Tt(e[0]);for(let n=1;n<e.length;n+=1)t=Et(t,e[n]);return t}function Tt(e){return At(e)?{...e(St)}:Dt(e)}function Et(e,t){return At(t)?t(e):Ot(e,t)}function Dt(e){let t={...e};for(let e in t){let n=t[e];kt(e,n)&&(t[e]=Mt(n))}return t}function Ot(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=gt(e.style,r);break;case`className`:e[n]=Pt(e.className,r);break;default:e[n]=kt(n,r)?jt(e[n],r):r}}return e}function kt(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function At(e){return typeof e==`function`}function jt(e,t){return t?e?(...n)=>{let r=n[0];if(Ft(r)){let i=r;Nt(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Mt(t):e}function Mt(e){return e&&((...t)=>{let n=t[0];return Ft(n)&&Nt(n),e(...t)})}function Nt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Pt(e,t){return t?e?t+` `+e:t:e}function Ft(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function It(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Bt(r));let i=Lt(t,n,r);if(n.enabled===!1)return null;let a=n.state??K;return Vt(e,r,i,a)}function Lt(e,t,n){let{className:r,style:i}=e,{state:a=K,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?bt(r,a):void 0,d=l?xt(i,a):void 0,f=l?yt(a,c):K,p=l&&s?Rt(s):void 0,m=l?gt(f,p)??{}:K;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?ct([m.ref,ht(n),...o]):st(m.ref,ht(n),o):st(null,null)),l?(u!==void 0&&(m.className=Pt(m.className,u)),d!==void 0&&(m.style=gt(m.style,d)),m):K}function Rt(e){return Array.isArray(e)?wt(e):Ct(void 0,e)}var zt=Symbol.for(`react.lazy`);function Bt(e){if(e?.$$typeof!==zt)return e;let t=l.Children.toArray(e)[0];return l.isValidElement(t)?t:e}function Vt(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Ct(n,t.props);return e.ref=n.ref,l.cloneElement(t,e)}return Ht(e,n)}function Ht(e,t){return e===`button`?(0,l.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,l.createElement)(`img`,{alt:``,...t,key:t.key}):l.createElement(e,t)}var Ut=l.createContext(void 0);function Wt(){return l.useContext(Ut)}function Gt(){return typeof window<`u`}function q(e){return Jt(e)?(e.nodeName||``).toLowerCase():`#document`}function Kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qt(e){return((Jt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Jt(e){return Gt()?e instanceof Node||e instanceof Kt(e).Node:!1}function J(e){return Gt()?e instanceof Element||e instanceof Kt(e).Element:!1}function Y(e){return Gt()?e instanceof HTMLElement||e instanceof Kt(e).HTMLElement:!1}function Yt(e){return!Gt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot}function Xt(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Zt(e){return/^(table|td|th)$/.test(q(e))}function Qt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var $t=/transform|translate|scale|rotate|perspective|filter/,en=/paint|layout|strict|content/,tn=e=>!!e&&e!==`none`,nn;function rn(e){let t=J(e)?cn(e):e;return tn(t.transform)||tn(t.translate)||tn(t.scale)||tn(t.rotate)||tn(t.perspective)||!on()&&(tn(t.backdropFilter)||tn(t.filter))||$t.test(t.willChange||``)||en.test(t.contain||``)}function an(e){let t=un(e);for(;Y(t)&&!sn(t);){if(rn(t))return t;if(Qt(t))return null;t=un(t)}return null}function on(){return nn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),nn}function sn(e){return/^(html|body|#document)$/.test(q(e))}function cn(e){return Kt(e).getComputedStyle(e)}function ln(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function un(e){if(q(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yt(e)&&e.host||qt(e);return Yt(t)?t.host:t}function dn(e){let t=un(e);return sn(t)?(e.ownerDocument||e).body:Y(t)&&Xt(t)?t:dn(t)}function fn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=dn(e),i=r===e.ownerDocument?.body,a=Kt(r);if(i){let e=pn(a);return t.concat(a,a.visualViewport||[],Xt(r)?r:[],e&&n?fn(e):[])}return t.concat(r,fn(r,[],n))}function pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var mn=$e.useInsertionEffect,hn=mn&&mn!==$e.useLayoutEffect?mn:e=>e();function X(e){let t=G(gn).current;return t.next=e,hn(t.effect),t.trampoline}function gn(){let e={next:void 0,callback:_n,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function _n(){}var Z=typeof document<`u`?l.useLayoutEffect:()=>{};function vn(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var yn=vn(`https://base-ui.com/production-error`,`Base UI`),bn=l.createContext(void 0);function xn(e=!1){let t=l.useContext(bn);if(t===void 0&&!e)throw Error(yn(16));return t}function Sn(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:l.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Cn(e){return e?.ownerDocument||document}function wn(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Kt(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Tn(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=l.useRef(null),s=xn(!0),c=a??s!==void 0,{props:u}=Sn({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),d=l.useCallback(()=>{let e=o.current;En(e)&&c&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,c]);return Z(d,[d]),{getButtonProps:l.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...l}=e;return Ct({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Nt(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=En(r),s=!i&&Dn(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),wn(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),wn(r,e)))},onKeyUp(e){t||(Nt(e),a?.(e),e.target===e.currentTarget&&i&&c&&En(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),wn(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},u,l)},[t,u,c,i]),buttonRef:X(e=>{o.current=e,d()})}}function En(e){return Y(e)&&e.tagName===`BUTTON`}function Dn(e){return Y(e)&&e.tagName===`A`&&!!e.href}var On=l.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function kn(){return l.useContext(On)}function An(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:u}=kn(),d=l.useRef(-1),[f,p]=l.useState(a==null&&t?()=>{if(d.current===-1){let e=u.current;u.current+=1,d.current=e}return d.current}:-1),m=a??f,h=l.useRef(null),g=l.useCallback(e=>{let t=h.current;t&&s(t),h.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return Z(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&p(t)})},[a,c]),{ref:g,index:m}}function jn(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=xn(),{ref:i,index:a}=An(e),o=n===a,s=l.useRef(null),c=st(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function Mn(e){let{render:t,className:n,style:r,state:i=K,props:a=vt,refs:o=vt,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=jn({metadata:s});return It(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Nn(e,t,n,r){let i=!1,a=!1,o=r??K;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Pn(e,t,n){let r=n??K;return{reason:e,event:t??new Event(`base-ui`),...r}}var Fn=`none`,In=`trigger-press`,Ln=`trigger-hover`,Rn=`trigger-focus`,zn=`outside-press`,Bn=`item-press`,Vn=`close-press`,Hn=`input-change`,Un=`input-clear`,Wn=`input-press`,Gn=`focus-out`,Kn=`escape-key`,qn=`list-navigation`,Jn=`keyboard`,Yn=`pointer`,Xn=`cancel-open`,Zn=`disabled`,Qn=`imperative-action`,$n=`window-resize`,er=l.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:d,value:f,nativeButton:p=!0,style:m,...h}=e,g=at(f||void 0),_=Wt(),v=_?.value??[],y=(i||_?.disabled)??!1,[b,x]=Qe({controlled:_?g!==void 0&&v.indexOf(g)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:S,buttonRef:C}=Tn({disabled:y,native:p}),w={disabled:y,pressed:b},T=[C,t],E=[{"aria-pressed":b,onClick(e){let t=!b,n=Nn(Fn,e.nativeEvent);o?.(t,n),n.isCanceled||(g&&_?.setGroupValue?.(g,t,n),n.isCanceled||x(t))}},h,S],D=It(`button`,e,{enabled:!_,state:w,ref:T,props:E}),O=l.useMemo(()=>({disabled:y,focusableWhenDisabled:!1}),[y]);return _?(0,u.jsx)(Mn,{tag:`button`,render:c,className:n,style:m,metadata:O,state:w,refs:T,props:E}):D});function tr(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),[,o]=l.useState(0),s=G(rr).current,c=G(nr).current,d=l.useRef(0),f=l.useRef(!0),p=l.useRef(null),m=l.useRef(null),h=X(()=>{f.current||(f.current=!0,o(e=>e+1))}),g=X((e,t)=>{c.set(e,t),h()}),_=X(e=>{c.delete(e),h()}),v=X(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),d.current=n.current.length,t});function y(e){if(m.current?.disconnect(),m.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!or(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&sr(r,n)>0){t.disconnect(),h();return}r=n}});m.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=ar(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let b=X(()=>{let[e,t]=ir(c),n=v(e),r=p.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});y(t),p.current=e,f.current=!1,i&&(s.forEach(e=>e(n)),a(n))});Z(()=>(!f.current&&p.current&&v(p.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,v]),Z(()=>{f.current&&b()}),Z(()=>()=>{m.current?.disconnect(),f.current=!0},[]);let x=X(e=>(s.add(e),()=>{s.delete(e)})),S=l.useMemo(()=>({register:g,unregister:_,subscribeMapChange:x,nextIndexRef:d}),[g,_,x,d]);return(0,u.jsx)(On.Provider,{value:S,children:t})}function nr(){return new Map}function rr(){return new Set}function ir(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>sr(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function ar(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function or(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function sr(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function cr(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function lr(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ur,platform:dr,maxTouchPoints:fr}=lr(),pr=ur.toLowerCase(),mr=dr.toLowerCase(),hr=/^i(os$|p)/.test(mr)||mr===`macintel`&&fr>1,gr=`android`,_r=mr===gr||pr.includes(gr),vr=!hr&&mr.startsWith(`mac`);mr.startsWith(`win`),!_r&&/^(linux|chrome os)/.test(mr);var yr=vr||hr,br=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),xr=!br&&pr.includes(`firefox`);!br&&pr.includes(`chrom`);var Sr=yr,Cr=/jsdom|happydom/.test(pr),wr=e(s(),1);function Tr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Er(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Yt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Dr(e,t){let n=e;for(;n;){if(J(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Yt(n)?n.host:null)}return null}function Or(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var kr=`data-base-ui-focusable`,Ar=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,jr=`ArrowLeft`,Mr=`ArrowRight`,Nr=`ArrowUp`,Pr=`ArrowDown`,Fr=`data-starting-style`,Ir=`data-ending-style`,Lr={[Fr]:``},Rr={[Ir]:``},zr={transitionStatus(e){return e===`starting`?Lr:e===`ending`?Rr:null}},Br=`data-open`,Vr=`data-closed`,Hr=Fr,Ur=Ir,Wr=`data-anchor-hidden`,Gr=`data-popup-open`,Kr=`data-pressed`,qr={[Gr]:``},Jr={[Gr]:``,[Kr]:``},Yr={[Br]:``},Xr={[Vr]:``},Zr={[Wr]:``},Qr={open(e){return e?qr:null}},$r={open(e){return e?Jr:null}},ei={open(e){return e?Yr:Xr},anchorHidden(e){return e?Zr:null}},ti={...ei,...zr},ni=`data-trigger-disabled`;function ri(e,t){if(!J(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ni);for(let[,e]of t.entries())if(Er(e,n))return!e.hasAttribute(ni);return!1}function ii(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ai(e){return e.matches(`html,body`)}function oi(e){return Y(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function si(e){return Dr(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ar}`)!=null}function ci(e){return e?e.getAttribute(`role`)===`combobox`&&oi(e):!1}function li(e){if(!e||Cr)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ui(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function di(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...di(e,t.id,n)])}function fi(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function pi(e){e.preventDefault(),e.stopPropagation()}function mi(e){return`nativeEvent`in e}function hi(e){return e.pointerType===``&&e.isTrusted?!0:_r&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function gi(e){return Cr?!1:!_r&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(_r||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function _i(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function vi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var yi=Math.min,bi=Math.max,xi=Math.round,Si=Math.floor,Ci=e=>({x:e,y:e}),wi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ti(e,t,n){return bi(e,yi(t,n))}function Ei(e,t){return typeof e==`function`?e(t):e}function Di(e){return e.split(`-`)[0]}function Oi(e){return e.split(`-`)[1]}function ki(e){return e===`x`?`y`:`x`}function Ai(e){return e===`y`?`height`:`width`}function ji(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Mi(e){return ki(ji(e))}function Ni(e,t,n){n===void 0&&(n=!1);let r=Oi(e),i=Mi(e),a=Ai(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Hi(o)),[o,Hi(o)]}function Pi(e){let t=Hi(e);return[Fi(e),t,Fi(t)]}function Fi(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ii=[`left`,`right`],Li=[`right`,`left`],Ri=[`top`,`bottom`],zi=[`bottom`,`top`];function Bi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Li:Ii:t?Ii:Li;case`left`:case`right`:return t?Ri:zi;default:return[]}}function Vi(e,t,n,r){let i=Oi(e),a=Bi(Di(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Fi)))),a}function Hi(e){let t=Di(e);return wi[t]+e.slice(t.length)}function Ui(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Wi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ui(e)}function Gi(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ki(e,t,n){return Math.floor(e/t)!==n}function qi(e,t){return t<0||t>=e.length}function Ji(e,t){return Q(e.current,{disabledIndices:t})}function Yi(e,t){return Q(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xi(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Q(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:qi(e,u)?-1:u,wrapped:d}}function Q(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Qi(e,a,r));return a}function Zi(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=Dr(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Qi(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Si(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Qi(e,r,s))return r}};d&&pi(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Q(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Q(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}qi(e,f)&&(f=u)}if(n===`both`){let n=Si(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&pi(t),u%o===o-1?r&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,disabledIndices:s}),r&&Ki(f,o,n)&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Ki(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&pi(t),u%o===0?r&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Ki(f,o,n)&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Ki(f,o,n)&&(f=u));let c=Si(l/o)===n;qi(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Qi(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!ea(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function $i(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ea(e,t=e?cn(e):null){return!e||!e.isConnected||!t||$i(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ta=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function na(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Yt(n)?n.host:null}function ra(e){for(let t of Array.from(e.children))if(q(t)===`summary`)return t;return null}function ia(e,t){let n=ra(t);return!!n&&(e===n||Er(n,e))}function aa(e){let t=e?q(e):``;return e!=null&&e.matches(ta)&&(t!==`summary`||e.parentElement!=null&&q(e.parentElement)===`details`&&ra(e.parentElement)===e)&&(t!==`details`||ra(e)==null)&&(t!==`input`||e.type!==`hidden`)}function oa(e){if(!aa(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=na(t)){let n=t!==e,r=q(t)===`slot`;if(t.hasAttribute(`inert`)||n&&q(t)===`details`&&!t.open&&!ia(e,t)||t.hasAttribute(`hidden`)||!r&&!sa(t,n))return!1}return!0}function sa(e,t){let n=cn(e);return t?n.display!==`none`:ea(e,n)}function ca(e){let t=e.tabIndex;if(t<0){let t=q(e);if(t===`details`||t===`audio`||t===`video`||Y(e)&&e.isContentEditable)return 0}return t}function la(e){if(q(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function ua(e,t){let n=la(e);if(!n)return!0;let r=t.find(e=>{let t=la(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=la(e);return t?.name===n.name&&t.form===n.form})===n}function da(e){if(Y(e)&&q(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Y(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function fa(e,t){da(e).forEach(e=>{aa(e)&&t.push(e),fa(e,t)})}function pa(e,t,n){da(e).forEach(e=>{Y(e)&&e.matches(t)&&n.push(e),pa(e,t,n)})}function ma(e){return oa(e)&&ca(e)>=0}function ha(e){let t=[];return fa(e,t),t.filter(oa)}function ga(e){let t=ha(e);return t.filter(e=>ca(e)>=0&&ua(e,t))}function _a(e,t){let n=ga(e),r=n.length;if(r===0)return;let i=Tr(Cn(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function va(e){return _a(Cn(e).body,1)||e}function ya(e){return _a(Cn(e).body,-1)||e}function ba(e,t,n){if(!e)return null;let r=[];fa(Cn(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(oa);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Er(n,o)&&ma(o)&&ua(o,a))return o}return r[i]}function xa(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Er(n,r)}function Sa(e){ga(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Ca(e){let t=[];pa(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var wa=`ArrowUp`,Ta=`ArrowDown`,Ea=`ArrowLeft`,Da=`ArrowRight`,Oa=new Set([wa,Ta,Ea,Da,`Home`,`End`]),ka=[`Shift`,`Control`,`Alt`,`Meta`];function Aa(e){return Y(e)&&e.tagName===`INPUT`}function ja(e){return!!(Aa(e)&&e.selectionStart!=null||Y(e)&&e.tagName===`TEXTAREA`)}function Ma(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Na(e,t,`left`),a=Pa(e),o=Pa(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Na(e,t,`top`),r=Pa(e),i=Pa(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Na(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Pa(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function Fa(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:u=!1,stopEventPropagation:d,disabledIndices:f,modifierKeys:p=vt}=e,[m,h]=l.useState(0),g=r!=null,_=l.useRef(null),v=st(_,c),y=l.useRef([]),b=l.useRef(!1),x=l.useRef(null),S=o??m,C=X((e,t=!1)=>{if(x.current=y.current[e]??null,(s??h)(e),t){let t=y.current[e];Ma(_.current,t,a,n)}}),w=X(e=>{if(e.size===0)return;if(b.current){let e=y.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||Qi(e,S,f)?C(Ia(e,f)):x.current=t}else t!==S&&C(t);return}b.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(Qi(t,S,f)){let e=Q(t,{disabledIndices:f});qi(t,e)||C(e)}Ma(_.current,r,a,n)});Z(()=>{if(f==null||o!=null||!b.current)return;let e=y.current;if(Qi(e,S,f)){let t=Q(e,{disabledIndices:f});qi(e,t)||C(t)}},[f,o,S,y,C]);let T=X((e,t,n)=>i?i(e,t,n,y):n),E=X(e=>{let o=e.key===`Home`||e.key===`End`;if(!Oa.has(e.key)||!u&&o||La(e,p)||!_.current)return;let s=a===`rtl`,c=s?Ea:Da,l=s?Da:Ea,m=n===`vertical`?Ta:c,h=n===`vertical`?wa:l,v=Or(e.nativeEvent);if(v!=null&&ja(v)&&!cr(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==h&&t<r.length||e.key!==m&&t>0)return}let b=S,x=Ji(y,f),w=Yi(y,f);r!=null&&(b=r({disabledIndices:f,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===l||n!==`horizontal`&&e.key===`ArrowUp`;u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(E||D)&&(t&&b===w&&E?(b=x,i&&(b=i(e,S,b,y))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,y))):b=Q(y.current,{startingIndex:b,decrement:D,disabledIndices:f})),b!==S&&!qi(y.current,b)&&(d&&e.stopPropagation(),(g||o||E||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:v,onFocus(e){let t=_.current,n=Or(e.nativeEvent);t&&n!=null&&ja(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,onMapChange:w,relayKeyboardEvent:E}}function Ia(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!Qi(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function La(e,t){for(let n of ka)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Ra=l.createContext(void 0);function za(){return l.useContext(Ra)?.direction??`ltr`}function Ba(e){let{render:t,className:n,style:r,refs:i=vt,props:a=vt,state:o=K,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:d,orientation:f,grid:p,loopFocus:m,onLoop:h,enableHomeAndEndKeys:g,onMapChange:_,stopEventPropagation:v=!0,rootRef:y,disabledIndices:b,modifierKeys:x,highlightItemOnHover:S=!1,tag:C=`div`,...w}=e,{props:T,highlightedIndex:E,onHighlightedIndexChange:D,elementsRef:O,onMapChange:k,relayKeyboardEvent:ee}=Fa({grid:p,loopFocus:m,onLoop:h,orientation:f,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:y,stopEventPropagation:v,enableHomeAndEndKeys:g,direction:za(),disabledIndices:b,modifierKeys:x}),A=It(C,e,{state:o,ref:i,props:[T,...a,w],stateAttributesMapping:s}),j=l.useMemo(()=>({highlightedIndex:E,onHighlightedIndexChange:D,highlightItemOnHover:S,relayKeyboardEvent:ee}),[E,D,S,ee]);return(0,u.jsx)(bn.Provider,{value:j,children:(0,u.jsx)(tr,{elementsRef:O,onMapChange:e=>{_?.(e),k(e)},children:A})})}var Va=l.createContext(void 0);function Ha(e){let t=l.useContext(Va);if(t===void 0&&!e)throw Error(yn(69));return t}var Ua=l.createContext(void 0);function Wa(){return l.useContext(Ua)}var Ga=l.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:d,render:f,style:p,...m}=e,h=Ha(!0),g=Wa(),_=n??vt,v=c!==void 0||n!==void 0,y=(h?.disabled??!1)||(g?.disabled??!1)||r,[b,x]=Qe({controlled:c,default:_,name:`ToggleGroup`,state:`value`}),S=X((e,t,n)=>{let r;s?(r=b.slice(),t?r.push(e):r.splice(b.indexOf(e),1)):r=t?[e]:[],a?.(r,n),n.isCanceled||x(r)}),C={disabled:y,multiple:s,orientation:o},w=l.useMemo(()=>({disabled:y,setGroupValue:S,value:b,isValueInitialized:v}),[y,S,b,v]),T={role:`group`},E=It(`div`,e,{enabled:!!h,state:C,ref:t,props:[T,m]});return(0,u.jsx)(Ut.Provider,{value:w,children:h?E:(0,u.jsx)(Ba,{render:f,className:d,style:p,state:C,refs:[t],props:[T,m],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})});function Ka({className:e,...t}){return(0,u.jsx)(Ga,{"data-slot":`toggle-group`,className:W(`flex flex-wrap items-center gap-1.5`,e),...t})}var qa={pill:`inline-flex h-7 items-center gap-2 rounded-control border border-rule bg-transparent px-3 text-sm text-muted transition-colors hover:border-accent hover:text-text data-pressed:border-accent data-pressed:bg-accent-soft data-pressed:font-semibold data-pressed:text-text`,segment:`inline-flex h-7 items-center justify-center gap-1.5 rounded-[6px] border-0 bg-transparent px-2 text-xs text-muted transition-colors hover:text-text data-pressed:bg-surface data-pressed:font-semibold data-pressed:text-text data-pressed:ring-1 data-pressed:ring-rule disabled:cursor-not-allowed disabled:line-through disabled:opacity-60`};function Ja({className:e,look:t=`pill`,...n}){return(0,u.jsx)(er,{"data-slot":`toggle-group-item`,className:W(qa[t],e),...n})}function Ya({title:e,description:t,actions:n}){return(0,u.jsxs)(`header`,{className:`page-header flex flex-wrap items-end gap-x-4 gap-y-2 px-6 pt-5 pb-1 max-sm:px-4`,children:[(0,u.jsxs)(`div`,{className:`min-w-0`,children:[(0,u.jsx)(`h1`,{className:`m-0 text-xl font-semibold tracking-[-0.015em]`,children:e}),(0,u.jsx)(`p`,{className:`m-0 mt-0.5 text-sm text-muted`,children:t})]}),n?(0,u.jsx)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:n}):null]})}var Xa=`px-6 max-sm:px-4`,Za={warn:`text-warn`,bad:`text-bad`,accent:`text-accent`,why:`text-why`,muted:`text-muted`};function Qa({value:e,tone:t,className:n,label:r}){return(0,u.jsx)(`span`,{className:W(`count inline-grid h-[18px] min-w-[18px] flex-none place-items-center rounded-full px-1.5 font-mono text-2xs leading-none font-medium tabular-nums`,t===`warn`&&e>0?`bg-warn-soft text-warn`:`bg-[color-mix(in_srgb,var(--muted)_16%,transparent)] text-muted`,n),"aria-label":r,children:e})}function $a({id:e,title:t,count:n,hint:r,tone:i,children:a,className:o,label:s,level:c=2}){let l=c===3?`h3`:`h2`;return(0,u.jsxs)(`section`,{id:e,className:W(`list-card overflow-hidden rounded-card border border-rule`,o),"aria-label":s??(typeof t==`string`?t:void 0),children:[(0,u.jsxs)(`div`,{className:W(`list-card-head flex items-center gap-2.5 border-b border-rule bg-surface px-4 py-2 text-[0.9rem] font-semibold`,i?Za[i]:null),children:[(0,u.jsx)(l,{className:`m-0 text-[inherit] font-[inherit]`,children:t}),n===void 0?null:(0,u.jsx)(Qa,{value:n,tone:i===`warn`?`warn`:void 0}),r?(0,u.jsx)(`span`,{className:`ml-auto text-xs font-normal text-muted`,children:r}):null]}),a]})}var eo=`list-row flex w-full min-w-0 items-center gap-4 border-0 border-t border-rule-soft bg-transparent px-4 py-2 text-left text-base text-text no-underline transition-colors first:border-t-0 hover:bg-surface aria-[current=true]:bg-surface aria-[current=true]:shadow-[inset_2px_0_0_var(--accent)]`;function to({label:e,options:t,value:n,onChange:r,className:i}){return(0,u.jsx)(Ka,{"aria-label":e,value:[n],onValueChange:e=>{let t=e[0];t&&r(t)},className:i,children:t.map(e=>(0,u.jsxs)(Ja,{value:e.value,children:[e.label,e.count===void 0?null:(0,u.jsx)(Qa,{value:e.count,tone:e.tone===`warn`?`warn`:void 0})]},e.value))})}var no={review:`rotate-45 rounded-[2px] size-[7px] bg-why`,build:`rotate-45 rounded-[2px] size-[7px] bg-accent`,done:`rounded-full size-2 bg-accent`,issue:`rounded-[1px] size-2 bg-bad`,idle:`rounded-full size-2 ring-[1.5px] ring-muted ring-inset`,warn:`rounded-full size-2 bg-warn`},ro={review:`text-why`,build:`text-accent`,done:`text-accent`,issue:`text-bad`,idle:`text-muted`,warn:`text-warn`};function io({marker:e,children:t}){return(0,u.jsxs)(`span`,{className:W(`status-word inline-flex items-center gap-2 text-xs whitespace-nowrap`,ro[e]),children:[(0,u.jsx)(`span`,{className:W(`flex-none`,no[e]),"aria-hidden":`true`}),t]})}function ao({done:e,total:t,unit:n=`tasks`}){if(t===0)return(0,u.jsxs)(`span`,{className:`text-xs text-muted`,children:[`No `,n]});let r=Math.min(100,Math.round(e/t*100)),i=`${e} of ${t} ${n}`;return(0,u.jsxs)(`span`,{className:`grid min-w-[120px] gap-1.5 text-xs text-muted`,children:[(0,u.jsx)(`span`,{children:i}),(0,u.jsx)(`span`,{className:`relative block h-1 w-full max-w-[140px] overflow-hidden rounded-full bg-rule`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-label":i,children:(0,u.jsx)(`span`,{className:`absolute inset-y-0 left-0 rounded-full bg-accent`,style:{width:`${r}%`}})})]})}var oo=()=>()=>{};function so({at:e,className:t}){let n=(0,l.useSyncExternalStore)(oo,()=>e===void 0?``:co(e,Date.now()),()=>``);if(e===void 0)return null;let r=new Date(e);return Number.isNaN(r.getTime())?null:(0,u.jsx)(`time`,{dateTime:r.toISOString(),className:W(`font-mono text-xs whitespace-nowrap text-muted`,t),children:n})}function co(e,t){let n=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return n<60?`just now`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}function lo({children:e,className:t}){return(0,u.jsx)(`p`,{className:W(`empty m-0 rounded-card border border-dashed border-rule px-5 py-5 text-base text-muted`,t),children:e})}function uo({text:e,copy:t=e,label:n=`prompt`}){return(0,u.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 rounded-control border border-rule bg-page py-1.5 pr-1.5 pl-3 font-mono text-xs`,children:[(0,u.jsx)(`code`,{className:`min-w-0 flex-1 truncate`,children:e}),(0,u.jsx)(`button`,{type:`button`,className:`inline-flex h-7 flex-none items-center rounded-[6px] border border-rule bg-surface px-2.5 font-sans text-xs text-text hover:border-accent hover:bg-accent-soft`,"data-copy":t,"data-copy-label":n,children:`Copy`})]})}function fo({title:e,detail:t}){return(0,u.jsx)(`div`,{className:`grid min-h-64 flex-1 place-items-center px-6 py-12`,role:`status`,children:(0,u.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-3 text-center`,children:[(0,u.jsx)(Ze,{"aria-hidden":`true`,className:`size-7 text-accent`}),(0,u.jsx)(`p`,{className:`text-sm font-medium`,children:e}),t?(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-muted`,children:t}):null]})})}var po=[],mo=void 0;function ho(){return mo}function go(e){po.push(e)}function _o(e){let t=(t,n)=>{let r=G(yo).current,i;try{mo=r;for(let e of po)e.before(r);i=e(t,n);for(let e of po)e.after(r);r.didInitialize=!0}finally{mo=void 0}return i};return t.displayName=e.displayName||e.name,t}function vo(e){return l.forwardRef(_o(e))}function yo(){return{didInitialize:!1}}function bo(e){l.useEffect(e,vt)}var xo=0,So=class e{static create(){return new e}currentId=xo;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=xo,t()},e)}isStarted(){return this.currentId!==xo}clear=()=>{this.currentId!==xo&&(clearTimeout(this.currentId),this.currentId=xo)};disposeEffect=()=>this.clear};function Co(){let e=G(So.create).current;return bo(e.disposeEffect),e}function $(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function wo(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function To(e){let t=G(Eo,e).current;return t.next=e,Z(t.effect),t}function Eo(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Do=null;globalThis.requestAnimationFrame;var Oo=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},ko=class e{static create(){return new e}static request(e){return Oo.request(e)}static cancel(e){return Oo.cancel(e)}currentId=Do;request(e){this.cancel(),this.currentId=Oo.request(()=>{this.currentId=Do,e()})}cancel=()=>{this.currentId!==Do&&(Oo.cancel(this.currentId),this.currentId=Do)};disposeEffect=()=>this.cancel};function Ao(){let e=G(ko.create).current;return bo(e.disposeEffect),e}var jo={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Mo={...jo,position:`fixed`,margin:0,top:0,left:0},No={...jo,position:`absolute`},Po=l.forwardRef(function(e,t){let[n,r]=l.useState();Z(()=>{Sr&&br&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,u.jsx)(`span`,{...e,ref:t,style:Mo,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function Fo(e){return`data-base-ui-${e}`}var Io={style:{transition:`none`}},Lo=`data-base-ui-click-trigger`,Ro={fallbackAxisSide:`none`},zo={fallbackAxisSide:`end`},Bo={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Vo=l.createContext(null),Ho=()=>l.useContext(Vo),Uo=Fo(`portal`);function Wo(e={}){let{ref:t,container:n,componentProps:r=K,elementProps:i}=e,a=it(),o=Ho()?.portalNode,[s,c]=l.useState(null),[u,d]=l.useState(null),f=X(e=>{e!==null&&d(e)}),p=l.useRef(null);Z(()=>{if(n===null){p.current&&(p.current=null,d(null),c(null));return}let e=(n&&(Jt(n)?n:n.current))??o??document.body;e==null?p.current&&(p.current=null,d(null),c(null)):p.current!==e&&(p.current=e,d(null),c(e))},[n,o]);let m=It(`div`,r,{ref:[t,f],props:[{id:a,[Uo]:``},i]}),h=s&&m?wr.createPortal(m,s):null;return{node:u,nodeId:l.isValidElement(m)?m.props.id:void 0,subtree:h}}var Go=l.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:d,nodeId:f,subtree:p}=Wo({container:o,ref:t,componentProps:e,elementProps:c}),m=l.useRef(null),h=l.useRef(null),g=l.useRef(null),_=l.useRef(null),[v,y]=l.useState(null),b=l.useRef(!1),x=v?.modal,S=v?.open,C=!!v&&!v.modal&&v.open&&!!d;l.useEffect(()=>{if(!d||x)return;function e(e){d&&e.relatedTarget&&xa(e)&&(e.type===`focusin`?b.current&&=(Ca(d),!1):(Sa(d),b.current=!0))}return wo($(d,`focusin`,e,!0),$(d,`focusout`,e,!0))},[d,x]),Z(()=>{d&&S===!0&&b.current&&(Ca(d),b.current=!1)},[S,d]);let w=l.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:h,beforeInsideRef:g,afterInsideRef:_,portalNode:d,setFocusManagerState:y}),[d]);return(0,u.jsxs)(l.Fragment,{children:[p,(0,u.jsxs)(Vo.Provider,{value:w,children:[C&&d&&(0,u.jsx)(Po,{"data-type":`outside`,ref:m,onFocus:e=>{xa(e,d)?g.current?.focus():ya(v?v.domReference:null)?.focus()}}),C&&d&&(0,u.jsx)(`span`,{role:s,"aria-owns":f,style:Bo}),d&&wr.createPortal(a,d),C&&d&&(0,u.jsx)(Po,{"data-type":`outside`,ref:h,onFocus:e=>{xa(e,d)?_.current?.focus():(va(v?v.domReference:null)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,Nn(`focus-out`,e.nativeEvent)))}})]})]})});function Ko(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var qo=class{nodesRef={current:[]};events=Ko();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Jo=l.createContext(null),Yo=l.createContext(null),Xo=()=>l.useContext(Jo)?.id||null,Zo=e=>{let t=l.useContext(Yo);return e??t};function Qo(e){let t=it(),n=Zo(e),r=Xo();return Z(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function $o(e){let{children:t,id:n}=e,r=Xo();return(0,u.jsx)(Jo.Provider,{value:l.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function es(e){let{children:t,externalTree:n}=e,r=G(()=>n??new qo).current;return(0,u.jsx)(Yo.Provider,{value:r,children:t})}function ts(e){return e==null?e:`current`in e?e.current:e}function ns(){return!1}function rs(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function is(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=ns,bubbles:s,externalTree:c}=t,u=e.useState(`open`),d=e.useState(`floatingElement`),{dataRef:f,events:p}=e.context,m=Zo(c),h=X(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=X(()=>a),{escapeKey:y,outsidePress:b}=rs(s),x=l.useRef(!1),S=l.useRef(!1),C=l.useRef(!1),w=l.useRef(!1),T=l.useRef(!1),E=l.useRef(``),D=l.useRef(null),O=Co(),k=Co(),ee=Co(),A=X(()=>{k.clear(),f.current.insideReactTree=!1}),j=X(e=>{let t=f.current.floatingContext?.nodeId;return(m?di(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=X(t=>ii(t,e.select(`floatingElement`))||ii(t,e.select(`domReferenceElement`))),te=X(t=>{o()&&e.setOpen(!1,Nn(In,t.nativeEvent))}),N=X(t=>{if(!u||!n||!r||t.key!==`Escape`)return;let i=mi(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&j(`__escapeKeyBubbles`))return;let a=Nn(Kn,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),P=X(()=>{f.current.insideReactTree=!0,k.start(0,A)}),F=X(t=>{if(!u||!n||t.button!==0)return;let r=Or(t.nativeEvent);Er(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),ne=X(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});l.useEffect(()=>{function e(e){e.open||(w.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),l.useEffect(()=>A,[A]),l.useEffect(()=>{if(!u||!n)return u||(w.current=!1,T.current=!1,E.current=``,D.current=null),A;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=b;let t=new So,i=Cn(d);function a(){ee.clear(),T.current=!0}function o(){T.current=!0,ee.start(br?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function l(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=l();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=f.current.floatingContext?.nodeId,n=m&&di(m.nodesRef.current,t).some(t=>ii(e,t.context?.elements.floating));return M(e)||n}function k(n){if(p(n)){n.type!==`click`&&!M(n)&&(t.clear(),C.current=!1),A();return}if(f.current.insideReactTree){A();return}let r=Or(n),i=`[${Fo(`inert`)}]`,a=J(r)?r.getRootNode():null,o=Array.from((Yt(a)?a:Cn(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Er(e,r))))return;let c=J(r)?r:null;for(;c&&!sn(c);){let e=un(c);if(sn(e)||!J(e))break;c=e}if(!(o.length&&J(r)&&!ai(r)&&!Er(r,e.select(`floatingElement`))&&o.every(e=>!Er(c,e)))){if(Y(r)&&!(`touches`in n)){let e=sn(r),t=cn(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!h(n)){if(l()===`intentional`){if(n.detail!==0&&!hi(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof g==`function`&&!g(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Nn(zn,n)),A())}}}function te(t){l()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&k(t)}function P(t){if(l()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function F(e,t){let n=Or(e);if(!n)return;let r=$(n,e.type,()=>{t(e),r()})}function ne(e){E.current=`touch`,F(e,P)}function re(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&F(e,e=>{e.type===`pointerdown`?te(e):k(e)})}function ie(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),l()===`intentional`&&(e.type===`pointercancel`?n&&s():h(e)||(n?s():(typeof g!=`function`||g(e))&&(t.clear(),C.current=!0,A())))}function I(e){if(l()!==`sloppy`||!D.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function L(e){F(e,I)}function ae(e){l()===`sloppy`&&D.current&&!M(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function oe(e){F(e,ae)}let R=wo(r&&wo($(i,`keydown`,N),$(i,`compositionstart`,a),$(i,`compositionend`,o)),_&&wo($(i,`click`,re,!0),$(i,`pointerdown`,re,!0),$(i,`pointerup`,ie,!0),$(i,`pointercancel`,ie,!0),$(i,`mousedown`,re,!0),$(i,`mouseup`,ie,!0),$(i,`touchstart`,ne,{capture:!0,passive:!0}),$(i,`touchmove`,L,{capture:!0,passive:!0}),$(i,`touchend`,oe,{capture:!0,passive:!0})));return()=>{R(),t.clear(),c(),C.current=!1}},[f,d,r,_,g,u,n,y,b,N,A,v,j,M,m,e,O,ee]);let re=l.useMemo(()=>({onKeyDown:N,onPointerDown:te,onClick:te}),[N,te]),ie=l.useMemo(()=>({onKeyDown:N,onPointerDown:ne,onMouseDown:ne,onClickCapture:P,onMouseDownCapture(e){P(),F(e)},onPointerDownCapture(e){P(),F(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,F,ne]);return l.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function as(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),Z(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};J(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function os(e,t=!1,n=!1,r=!1){let[i,a]=l.useState(e&&t?`idle`:void 0),[o,s]=l.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),Z(()=>{if(!e&&o&&i!==`ending`&&n){let e=ko.request(()=>{a(`ending`)});return()=>{ko.cancel(e)}}},[e,o,i,n]),Z(()=>{if(!e||t||i===void 0)return;let n=ko.request(()=>{a(void 0)});return()=>{ko.cancel(n)}},[t,e,i]),Z(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=ko.request(()=>{a(`idle`)});return()=>{ko.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function ss(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var cs=null;function ls(e){if(!cs){let e=[];cs=e,queueMicrotask(()=>{cs=null,wr.flushSync(()=>{for(let t of e)t()})})}cs.push(e)}function us(e,t=!1,n=!1){let r=Ao();return X((i,a=null)=>{r.cancel();let o=ts(e);if(o==null)return;let s=o,c=()=>{n?ls(()=>{a?.aborted||i()}):wr.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(ss(s).map(e=>e.finished.then(_t))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(ss(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Fr;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function ds(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=X(a),s=us(r,n,i);l.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function fs(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=X(i),{mounted:c,setMounted:u,transitionStatus:d}=os(t,!1,!1,o),f=!t&&r;Z(()=>{t&&s(!1)},[t,s]);let p=l.useRef(c),m=l.useRef(!1),h=et(),g=()=>{p.current=!1,u(!1),a()};Z(()=>{p.current=c,m.current&&(m.current=!1,!t&&c&&g())});let _=X(()=>{p.current&&(t?(m.current=!0,h()):g())});return ds({enabled:c&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:c,transitionStatus:d,preventUnmountingOnClose:f,forceUnmount:_}}var ps={tabIndex:-1,[kr]:``};function ms(e){return t=>t!==`touch`||e.current}function hs(e,t=!1){let n=it(),r=Xo()!=null,i=G(()=>e(n,r)).current;return as({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function gs({handle:e,store:t}){return Z(()=>e.attachStore(t),[e,t]),null}function _s(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function vs(e,t){let n=l.useRef(null);return X(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),_s(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),_s(t))})}function ys(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function bs(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function xs(e,t,n,r={}){let i=n.reason,a=i===Ln,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=bs(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=ys(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?wr.flushSync(l):l()}function Ss(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=vs(e,n),o=X(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=X(e=>{a(e),e&&o(e)});return Z(()=>(s(t.current),()=>s(null)),[s,t,n,e]),Z(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Cs(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=l.useRef(null),i=e.useState(`open`);Z(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Nn(Fn);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function ws(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=fs({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return G(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Ts(e,t){e.useSyncedValues(t),Z(()=>()=>{e.update({activeTriggerProps:K,inactiveTriggerProps:K,popupProps:K})},[e])}function Es(e,t){Z(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),Z(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Ds=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Os=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),ks=n(((e,t)=>{t.exports=Os()})),As=n((e=>{var n=t(),r=ks();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),js=n(((e,t)=>{t.exports=As()})),Ms=ks(),Ns=js(),Ps=mt(19)?Ls:Rs;function Fs(e,t,n,r,i){return Ps(e,t,n,r,i)}function Is(e,t,n,r,i){let a=l.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Ms.useSyncExternalStore)(e.subscribe,a,a)}go({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Ms.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ls(e,t,n,r,i){let a=ho();if(!a)return Is(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Rs(e,t,n,r,i){return(0,Ns.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var zs=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Fs(this,e,t,n,r)}},Bs=class extends zs{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){l.useDebugValue(e);let n=this;Z(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Z(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Z(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){l.useDebugValue(e);let n=this,r=t!==void 0;Z(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return l.useDebugValue(e),Fs(this,this.selectors[e],t,n,r)}useContextCallback(e,t){l.useDebugValue(e);let n=X(t??_t);this.context[e]=n}useStateSetter(e){let t=l.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Vs={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Hs=class extends Bs{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ko(),nested:n,triggerElements:i},Vs),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&vi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}},Us={home:`M3 10.5 10 4l7 6.5M5 9v7h4v-4h2v4h4V9`,flow:`M6 4v4m0 4v4M6 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm0 0h5a3 3 0 0 1 3 3v1m0 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z`,spark:`M10 3v3m0 8v3M3 10h3m8 0h3M5.5 5.5l2 2m5 5 2 2m0-9-2 2m-5 5-2 2`,doc:`M6 3h5l4 4v10H6zM11 3v4h4M8.5 11h4M8.5 14h4`,folder:`M3 6.5V15h14V8H9.5L8 6H3.5`,chart:`M4 16V9m4 7V5m4 11v-5m4 5V8`,graph:`M3 6a2 2 0 1 0 4 0 2 2 0 1 0-4 0m10-1a2 2 0 1 0 4 0 2 2 0 1 0-4 0m-5 10a2 2 0 1 0 4 0 2 2 0 1 0-4 0M7 5.8l6-.6M5.7 7.9l3.6 5.3m5-6.3-3.4 6.3`,search:`M9 15a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm4.5-1.5L17 17`,chevron:`m7 8 3 3 3-3`,right:`m8 6 4 4-4 4`,left:`m12 6-4 4 4 4`,close:`m6 6 8 8m0-8-8 8`,copy:`M7 7V4h9v9h-3M4 7h9v9H4z`,refresh:`M16 10a6 6 0 1 1-1.8-4.3M16 4v3h-3`,theme:`M10 3a7 7 0 1 0 7 7 5 5 0 0 1-7-7Z`,terminal:`M3 4h14v12H3zM6 8l2.5 2L6 12m4 0h4`,check:`m5 10.5 3 3 7-7`,play:`M7 5v10l8-5z`,plus:`M10 4v12M4 10h12`,external:`M11 4h5v5M16 4l-7 7M14 12v4H4V6h4`,sidebar:`M3 4h14v12H3zM8 4v12`,code:`m7 6-4 4 4 4m6-8 4 4-4 4`,eye:`M2.5 10S5 4.5 10 4.5 17.5 10 17.5 10 15 15.5 10 15.5 2.5 10 2.5 10Zm7.5 2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,pencil:`m12.5 4.5 3 3L7 16H4v-3zM11 6l3 3`,more:`M5 10h.01M10 10h.01M15 10h.01`,trash:`M4 6h12M8 6V4h4v2M6 6l1 10h6l1-10M9 9v4m2-4v4`,alert:`M10 3.5 17 16H3zM10 8.5v3.5m0 2h.01`};function Ws({name:e,className:t}){return(0,u.jsx)(`svg`,{className:W(`size-4 flex-none fill-none stroke-current [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:1.6]`,t),viewBox:`0 0 20 20`,"aria-hidden":`true`,focusable:`false`,children:(0,u.jsx)(`path`,{d:Us[e]})})}var Gs=l.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Tn({disabled:i,focusableWhenDisabled:a,native:o});return It(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),Ks=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qs=f,Js=((e,t)=>n=>{if(t?.variants==null)return qs(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ks(t)||Ks(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qs(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex shrink-0 items-center justify-center gap-2 rounded-control border font-medium whitespace-nowrap transition-colors select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none`,{variants:{variant:{default:`border-rule bg-surface text-text hover:border-accent hover:bg-accent-soft`,primary:`border-accent bg-accent-soft font-semibold text-text hover:bg-accent hover:text-on-accent`,ghost:`border-transparent bg-transparent text-muted hover:border-rule hover:bg-surface hover:text-text`,link:`border-transparent bg-transparent px-0 text-accent underline-offset-3 hover:underline`,danger:`border-bad bg-bad-soft font-semibold text-bad hover:bg-bad hover:text-page`},size:{default:`h-8 px-3 text-sm`,sm:`h-7 px-2.5 text-xs`,icon:`size-8`,"icon-sm":`size-7`}},defaultVariants:{variant:`default`,size:`default`}});function Ys({className:e,variant:t,size:n,type:r=`button`,...i}){return(0,u.jsx)(Gs,{"data-slot":`button`,type:r,className:W(Js({variant:t,size:n}),e),...i})}export{so as $,$n,fi as $t,Xo as A,_r as An,_t as Ar,Ti as At,Po as B,Qn as Bn,s as Br,Vi as Bt,us as C,Tr as Cn,Zt as Cr,Zi as Ct,$o as D,Cr as Dn,Ct as Dr,ea as Dt,ts as E,Or as En,It as Er,Xi as Et,Lo as F,Xn as Fn,it as Fr,Mi as Ft,To as G,Jn as Gn,bi as Gt,No as H,Un as Hn,Wi as Ht,Io as I,Vn as In,Qe as Ir,Ni as It,So as J,zn as Jn,xi as Jt,wo as K,qn as Kn,yi as Kt,Ro as L,Zn as Ln,W as Lr,Ai as Lt,Go as M,vr as Mn,st as Mr,Ei as Mt,Wo as N,cr as Nn,G as Nr,Si as Nt,es as O,xr as On,vt as Or,qi as Ot,Ho as P,tr as Pn,at as Pr,Oi as Pt,vo as Q,In as Qn,pi as Qt,zo as R,Kn as Rn,f as Rr,Pi as Rt,ds as S,Nr as Sn,Yt as Sr,ga as St,is as T,Er as Tn,on as Tr,Ji as Tt,ko as U,Wn as Un,Di as Ut,Mo as V,Hn as Vn,Hi as Vt,Ao as W,Bn as Wn,ji as Wt,bo as X,Rn as Xn,hi as Xt,Co as Y,Yn,_i as Yt,_o as Z,Ln as Zn,gi as Zt,Ts as _,Hr as _n,rn as _r,va as _t,Bs as a,oi as an,yn as ar,Ya as at,Ss as b,jr as bn,sn as br,xa as bt,Ds as c,ei as cn,cn as cr,eo as ct,xs as d,Qr as dn,pn as dr,Ka as dt,di as en,Nn as er,uo as et,bs as f,Gr as fn,q as fr,Ja as ft,ws as g,Br as gn,Kt as gr,ha as gt,Cs as h,Ur as hn,un as hr,Oa as ht,Hs as i,ci as in,Cn as ir,Xa as it,Zo as j,hr as jn,mt as jr,Ci as jt,Qo as k,br as kn,K as kr,Qi as kt,ps as l,ti as ln,an as lr,io as lt,ys as m,Vr as mn,fn as mr,za as mt,Js as n,si as nn,An as nr,lo as nt,js as o,li as on,Z as or,to as ot,ms as p,Kr as pn,ln as pr,Ha as pt,$ as q,Fn as qn,Gi as qt,Ws as r,ri as rn,Tn as rr,$a as rt,ks as s,ni as sn,X as sr,ao as st,Ys as t,ui as tn,Pn as tr,Qa as tt,gs as u,$r as un,qt as ur,fo as ut,hs as v,zr as vn,J as vr,ya as vt,os as w,Dr as wn,Qt as wr,Yi as wt,fs as x,Mr as xn,Xt as xr,ma as xt,Es as y,Pr as yn,Y as yr,ba as yt,Fo as z,Gn as zn,c as zr,ki as zt};
@@ -1 +0,0 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{En as r,Er as i,Fn as a,Kn as o,L as s,Lr as c,M as l,Qt as u,S as d,Tn as f,Un as p,Y as m,ar as h,cn as g,er as _,ir as v,nn as y,or as b,qn as x,r as S,rr as C,sr as w,vn as T,vr as E}from"./button-CX0sWAJl.js";import{_ as D,a as O,c as k,l as A,m as j,o as M,v as N}from"./fields-BobQ7zRF.js";import{S as ee,t as P}from"./useAnchoredPopupScrollLock-BBXJpX5L.js";import{d as F,f as te,i as I,m as ne,n as L,p as re,r as ie,t as ae,u as R}from"./select-DdebbX7K.js";import{$ as z,B,G as oe,H as V,J as se,K as H,Q as ce,R as le,U as ue,V as de,W as fe,X as pe,Y as U,Z as W,at as me,ot as he,q as ge,st as G,z as K}from"./index-CysBCSxM.js";var q=e(t(),1),_e=q.forwardRef(function(e,t){let{render:n,className:s,nativeButton:c=!0,disabled:l=!1,id:d,style:p,...h}=e,{state:g,disabled:y,setTouched:b,validationMode:S,validation:T}=j(),{labelId:E}=A(),D=z(),O=D.useState(`selectionMode`),N=D.useState(`disabled`),P=D.useState(`readOnly`),F=D.useState(`required`),I=D.useState(`positionerElement`),L=D.useState(`listElement`),ie=D.useState(`popupId`),ae=D.useState(`triggerProps`),R=D.useState(`inputInsidePopup`),B=D.useState(`id`),oe=D.useState(`labelId`),V=D.useState(`open`),le=D.useState(`selectedValue`),ue=D.useState(`activeIndex`),de=D.useState(`selectedIndex`),fe=D.useState(`hasSelectedValue`),U=W(),me=ce(),he=m(),G=y||N||l,K=H(),_e=ge(D),J=q.useRef(null),Y=M(G,J);k({id:R?d:void 0});let X=R?d??B:d,ve=te(E,oe),Z;V&&R?Z=ie??pe(B):V&&(Z=L?.id);let Q=q.useRef(``);function $(e){Q.current=e.pointerType}let{reference:ye}=ne(U,{enabled:!V&&!P&&!N&&O===`single`,listRef:D.context.labelsRef,activeIndex:ue,selectedIndex:de,onMatch(e){let t=D.context.valuesRef.current[e];t!==void 0&&D.context.setSelectedValue(t,_(x))}}),{reference:be}=ee(U,{enabled:!N,event:`mousedown`}),{buttonRef:xe,getButtonProps:Se}=C({native:c,disabled:G}),Ce={...g,readOnly:P,open:V,disabled:G,popupSide:_e,listEmpty:K,placeholder:O!==`none`&&!fe},we=w(e=>{D.set(`triggerElement`,e)});return i(`button`,e,{ref:[t,xe,J,we],state:Ce,props:[ae,be,ye,{id:X,tabIndex:R?0:-1,role:R?`combobox`:void 0,"aria-expanded":V,"aria-haspopup":R?`dialog`:`listbox`,"aria-controls":Z,"aria-required":R&&F||void 0,"aria-readonly":R&&P||void 0,"aria-labelledby":ve,onPointerDown:$,onPointerEnter:$,onFocus(){Y(!0),G||he.start(0,D.context.forceMount)},onBlur(e){if(!f(I,e.relatedTarget)&&(b(!0),Y(!1),S===`onBlur`)){let e=O===`none`?me:le;T.commit(e)}},onMouseDown(e){if(G||(R||U.set(`domReferenceElement`,e.currentTarget),D.context.forceMount(),Q.current!==`touch`&&(D.context.inputRef.current?.focus(),R||e.preventDefault()),V))return;let t=v(e.currentTarget);function n(e){let t=D.state.triggerElement;if(!t)return;let n=r(e),i=D.state.positionerElement,o=D.state.listElement;f(t,n)||f(i,n)||f(o,n)||re(e,t)||D.context.setOpen(!1,_(a,e))}R&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(u(e),D.context.setOpen(!0,_(o,e.nativeEvent)),D.context.inputRef.current?.focus())}},T.getValidationProps(G,h),Se],stateAttributesMapping:se})});function J(e,t,n,i){if(e.baseUIHandlerPrevented)return;let a=r(e.nativeEvent),o=E(a)?a:null;(o===e.currentTarget||!i?.(o)&&!y(o))&&(e.preventDefault(),n||(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,_(p,e.nativeEvent))))}var Y=q.forwardRef(function(e,t){let{render:n,className:r,style:a,...o}=e,{state:s}=j(),c=z(),l=c.useState(`open`),u=c.useState(`disabled`),d=c.useState(`readOnly`),p=c.useState(`hasSelectedValue`),m=c.useState(`selectionMode`),h=ge(c),g=u,_=H(),v=m!==`none`&&!p,y={...s,open:l,disabled:g,readOnly:d,popupSide:h,listEmpty:_,placeholder:v},b=w(e=>{c.set(`inputGroupElement`,e)});return i(`div`,e,{ref:[t,b],props:[{role:`group`,onMouseDown(e){J(e,c,g,e=>f(c.context.chipsContainerRef.current,e))}},o],state:y,stateAttributesMapping:se})}),X=q.createContext(void 0);function ve(){let e=q.useContext(X);if(e===void 0)throw Error(h(20));return e}var Z=n(),Q=q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=z(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Z.jsx)(X.Provider,{value:n,children:(0,Z.jsx)(l,{ref:t,...r})}):null}),$=q.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=s,style:_,...v}=e,y=z(),x=W(),S=ve(),C=y.useState(`modal`),T=y.useState(`open`),E=y.useState(`mounted`),k=y.useState(`openMethod`),A=y.useState(`positionerElement`),j=y.useState(`triggerElement`),M=y.useState(`inputElement`),N=y.useState(`inputGroupElement`),ee=y.useState(`inputInsidePopup`),F=y.useState(`transitionStatus`),te=H(),I=G({anchor:i??(ee?j:N??M),floatingRootContext:x,positionMethod:a,mounted:E,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,lazyFlip:!0});P(T&&C,k===`touch`,A,j);let ne={open:T,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:te};b(()=>{y.set(`popupSide`,I.side)},[y,I.side]);let L=w(e=>{y.set(`positionerElement`,e)}),re=me(e,ne,{styles:I.positionerStyles,transitionStatus:F,props:v,refs:[t,L],hidden:!E,inert:!T});return(0,Z.jsxs)(fe.Provider,{value:I,children:[E&&C&&(0,Z.jsx)(O,{inert:D(!T),cutout:N??M??j}),re]})}),ye={...g,...T},be=q.forwardRef(function(e,t){let{render:n,className:a,style:o,initialFocus:s,finalFocus:c,...l}=e,u=z(),p=oe(),m=W(),h=u.useState(`mounted`),g=u.useState(`open`),_=u.useState(`openMethod`),v=u.useState(`popupProps`),y=u.useState(`transitionStatus`),x=u.useState(`inputInsidePopup`),S=u.useState(`inputElement`),C=u.useState(`modal`),w=u.useState(`id`),T=H(),E=l.id??(x?pe(w):void 0);b(()=>(u.set(`popupId`,u.context.popupRef.current?.id||E),()=>{u.set(`popupId`,void 0)}),[u,E]),d({open:g,ref:u.context.popupRef,onComplete(){g&&u.context.onOpenChangeComplete(!0)}});let D={open:g,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:y,empty:T},O=i(`div`,e,{state:D,ref:[t,u.context.popupRef],props:[v,{id:E,role:x?`dialog`:`presentation`,onFocus(e){let t=r(e.nativeEvent);_!==`touch`&&(f(u.state.listElement,t)||t===e.currentTarget)&&u.context.inputRef.current?.focus()}},he(y),l],stateAttributesMapping:ye}),k=s===void 0?x?e=>e===`touch`?u.context.popupRef.current:S:!1:s,A;A=c??(x?void 0:!1);let j=!x||C;return(0,Z.jsx)(N,{context:m,disabled:!h,modal:j,openInteractionType:_,initialFocus:k,returnFocus:A,getInsideElements:()=>[u.context.startDismissRef.current,u.context.endDismissRef.current],children:(0,Z.jsxs)(q.Fragment,{children:[O,j&&(0,Z.jsx)(ue,{ref:u.context.endDismissRef})]})})});function xe(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Z.jsx)(U,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Se=q.forwardRef(function(e,t){let{selected:n}=B();return e.keepMounted||n?(0,Z.jsx)(F,{...e,selected:n,ref:t}):null}),Ce=xe;function we({className:e,...t}){return(0,Z.jsxs)(Y,{"data-slot":`combobox-input-group`,className:c(`relative flex items-center`,e),children:[(0,Z.jsx)(V,{"data-slot":`combobox-input`,className:c(R,`placeholder:text-muted focus:border-accent`),...t}),(0,Z.jsx)(_e,{"data-slot":`combobox-trigger`,"aria-label":`Show options`,className:`absolute inset-y-0 right-0 flex w-9 items-center justify-center outline-none`,children:(0,Z.jsx)(S,{name:`chevron`,className:ae})})]})}function Te({className:e,...t}){return(0,Z.jsx)(Q,{children:(0,Z.jsx)($,{sideOffset:6,className:`z-40`,children:(0,Z.jsx)(be,{"data-slot":`combobox-content`,className:c(I,e),...t})})})}var Ee=de;function De({className:e,...t}){return(0,Z.jsx)(le,{"data-slot":`combobox-empty`,className:c(`px-2.5 py-1.5 text-sm text-muted empty:hidden`,e),...t})}function Oe({className:e,children:t,...n}){return(0,Z.jsxs)(K,{"data-slot":`combobox-item`,className:c(L,e),...n,children:[(0,Z.jsx)(`span`,{className:`truncate`,children:t}),(0,Z.jsx)(Se,{className:ie,children:(0,Z.jsx)(S,{name:`check`,className:`size-4`})})]})}export{Oe as a,we as i,Te as n,Ee as o,De as r,Ce as t};
@@ -1 +0,0 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{$t as r,Ar as i,B as a,Cn as o,Dt as s,E as c,En as l,Er as u,G as d,J as f,K as p,Lr as m,Mr as ee,Nr as h,P as g,Pr as _,Qt as te,Sr as v,St as ne,Tn as y,U as re,W as ie,Xt as b,Y as ae,Zt as x,_t as oe,an as se,ar as S,bt as ce,en as le,er as ue,fr as C,gr as w,gt as de,in as fe,ir as T,j as pe,jn as me,jr as he,kn as ge,kr as E,or as D,q as O,qn as k,sr as A,tn as _e,vt as ve,wn as ye,xr as j,xt as be,yr as M,z as xe,zn as Se}from"./button-CX0sWAJl.js";var N=e(t(),1),P=0;function Ce(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:a}=t;cancelAnimationFrame(P);function o(){(!a||a())&&e?.focus({preventScroll:n})}if(r)return o(),i;let s=requestAnimationFrame(o);return P=s,()=>{P===s&&(cancelAnimationFrame(s),P=0)}}var F=`data-base-ui-inert`,I=new WeakMap,L=new WeakSet,R=new WeakMap,z=0;function B(e){return e?v(e)?e.host:B(e.parentNode):null}var we=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=B(t);return e.contains(n)?n:null}).filter(e=>e!=null),V=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Te=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{C(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function H(e,t,n,{mark:r=!0}){let i=we(t,e),a=r?Te(t,V(i),new Set(i)):[],o=[],s=[];if(n){let e=we(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Te(t,V(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(I.get(e)||0)+1;I.set(e,r),o.push(e),r===1&&n&&L.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(R.get(e)||0)+1;R.set(e,t),s.push(e),t===1&&e.setAttribute(F,``)}),z+=1,()=>{o.forEach(e=>{let t=(I.get(e)||0)-1;I.set(e,t),t||(L.has(e)||e.removeAttribute(`aria-hidden`),L.delete(e))}),r&&s.forEach(e=>{let t=(R.get(e)||0)-1;R.set(e,t),t||e.removeAttribute(F)}),--z,z||(I=new WeakMap,L=new WeakSet,R=new WeakMap)}}function Ee(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=T(e[0]).body;return H(e,i,n,{mark:r})}var U=n();function De(e,t){let n=w(l(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(b(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var W=20,G=[];function Oe(){G=G.filter(e=>e.deref()?.isConnected)}function ke(e){Oe(),e&&C(e)!==`body`&&(G.push(new WeakRef(e)),G.length>W&&(G=G.slice(-20)))}function Ae(){return Oe(),G[G.length-1]?.deref()}function je(e){return e?be(e)?e:ne(e)[0]||e:null}function Me(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=de(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return be(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function K(e){let{context:t,children:n,disabled:i=!1,initialFocus:u=!0,returnFocus:f=!0,explicitReturnFocus:m,restoreFocus:h=!1,modal:_=!0,closeOnFocusOut:v=!0,openInteractionType:re=``,nextFocusableElement:S,previousFocusableElement:w,beforeContentFocusGuardRef:de,externalTree:me,getInsideElements:he}=e,E=t.useState(`open`),k=t.useState(`domReferenceElement`),j=t.useState(`floatingElement`),{events:P,dataRef:F}=t.context,I=A(()=>F.current.floatingContext?.nodeId),L=u===!1,R=fe(k)&&L,z=d(u),B=d(f),we=d(m),V=d(re),Te=d(E),H=pe(me),W=g(),G=N.useRef(!1),K=N.useRef(!1),Ne=N.useRef(!1),Pe=N.useRef(null),Fe=N.useRef(``),q=N.useRef(``),J=N.useRef(null),Ie=N.useRef(null),Le=ee(J,de,W?.beforeInsideRef),Re=ee(Ie,W?.afterInsideRef),ze=ae(),Y=ae(),Be=ie(),Ve=W!=null,X=_e(j),Z=A((e=X)=>e?ne(e):[]),Q=A(()=>he?.().filter(e=>e!=null)??[]);N.useEffect(()=>{if(i||!_)return;function e(e){e.key===`Tab`&&y(X,o(T(X)))&&Z().length===0&&!R&&te(e)}let t=T(X);return O(t,`keydown`,e)},[i,X,_,R,Z]),N.useEffect(()=>{if(i||!E)return;let e=T(X);function t(){Ne.current=!1}function n(e){let t=l(e),n=Q(),r=y(j,t)||y(k,t)||y(W?.portalNode,t)||n.some(e=>e===t||y(e,t));Ne.current=!r,q.current=e.pointerType||`keyboard`,ye(t,`[data-base-ui-click-trigger]`)&&(K.current=!0,Y.start(0,()=>{K.current=!1}))}function r(){q.current=`keyboard`}return p(O(e,`pointerdown`,n,!0),O(e,`pointerup`,t,!0),O(e,`pointercancel`,t,!0),O(e,`keydown`,r,!0),t)},[i,j,k,X,E,W,Y,Q]),N.useEffect(()=>{if(i||!v)return;let e=T(X);function n(){K.current=!0,Y.start(0,()=>{K.current=!1})}function a(e){let t=l(e);be(t)&&(Pe.current=t)}function u(n){let i=n.relatedTarget,a=n.currentTarget,u=l(n);_&&i==null&&u!=null&&y(j,u)&&ke(u),queueMicrotask(()=>{let l=I(),d=t.context.triggerElements,f=Q(),p=i?.hasAttribute(xe(`focus-guard`))&&[J.current,Ie.current,W?.beforeInsideRef.current,W?.afterInsideRef.current,W?.beforeOutsideRef.current,W?.afterOutsideRef.current,c(w),c(S)].includes(i),m=!(y(k,i)||y(j,i)||y(i,j)||y(W?.portalNode,i)||f.some(e=>e===i||y(e,i))||d.hasMatchingElement(e=>y(e,i))||p||H&&(le(H.nodesRef.current,l).find(e=>y(e.context?.elements.floating,i)||y(e.context?.elements.domReference,i))||r(H.nodesRef.current,l).find(e=>[e.context?.elements.floating,_e(e.context?.elements.floating)].includes(i)||e.context?.elements.domReference===i)));if(a===k&&X&&Me(X),h&&a!==k&&!s(u)&&o(e)===e.body){if(M(X)&&(X.focus(),h===`popup`)){Be.request(()=>{X.focus()});return}let e=Z(),t=Pe.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||X;M(n)&&n.focus()}F.current.insideReactTree?F.current.insideReactTree=!1:(R||!_)&&i&&m&&!K.current&&(R||i!==Ae())&&(G.current=!0,t.setOpen(!1,ue(Se,n)))})}function d(){Ne.current||(F.current.insideReactTree=!0,ze.start(0,()=>{F.current.insideReactTree=!1}))}let f=M(k)?k:null;if(j||f)return p(f&&O(f,`focusout`,u),f&&O(f,`pointerdown`,n),j&&O(j,`focusin`,a),j&&O(j,`focusout`,u),j&&W&&O(j,`focusout`,d,!0))},[i,k,j,X,_,H,W,t,v,h,Z,R,I,F,ze,Y,Be,S,w,Q]),N.useEffect(()=>{if(i||!j||!E)return;let e=Array.from(W?.portalNode?.querySelectorAll(`[${xe(`portal`)}]`)||[]),t=(H?r(H.nodesRef.current,I()):[]).find(e=>fe(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Ee([j,...e,J.current,Ie.current,W?.beforeOutsideRef.current,W?.afterOutsideRef.current,...Q(),t,c(w),c(S),R?k:null].filter(e=>e!=null),{ariaHidden:_||R,mark:!1}),a=Ee([j,...e].filter(e=>e!=null));return()=>{a(),n()}},[E,i,k,j,_,W,R,H,I,S,w,Q]),D(()=>{if(!E||i||!M(X))return;Fe.current=``,q.current=``;let e=T(X),t=o(e);queueMicrotask(()=>{let n=z.current,r=typeof n==`function`?n(V.current||``):n;if(r===void 0||r===!1||y(X,t))return;let i=null,a=()=>(i??=Z(X),i[0]||X),s;s=r===!0||r===null?a():c(r),s||=a();let l=y(X,o(e)),u=F.current.openEvent,d=u?.type===`mousedown`&&b(u);Ce(s,{sync:d,preventScroll:s===X,shouldFocus(){if(!Te.current)return!1;if(l)return!0;let t=o(e);return!(t!==s&&y(X,t))}})})},[i,E,X,Z,z,V,Te,F]);let $=N.useRef(null);D(()=>{if(i||!X){$.current=null;return}$.current&&=($.current.cancelled=!0,null);let e=T(X),t=o(e),n=V.current==null;ke(t);function r(e){if(e.open||(Fe.current=De(e.nativeEvent,q.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(xe(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(G.current=!0),e.reason===`outside-press`){if(e.nested)G.current=!1;else if(b(e.nativeEvent)||x(e.nativeEvent))G.current=!1;else{let e=!1;T(X).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?G.current=!1:G.current=!0}}}P.on(`openchange`,r);function a(e){let r=B.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=k?.isConnected?k:null,o=t?.isConnected&&C(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Ae()||null,typeof i==`boolean`?s:c(i)||s||null}return()=>{P.off(`openchange`,r);let t=o(e),n=Q(),i=y(j,t)||n.some(e=>e===t||y(e,t))||H&&le(H.nodesRef.current,I(),!1).some(e=>y(e.context?.elements.floating,t)),s=B.current,c=Fe.current,l=a(c),u={cancelled:!1};$.current=u,queueMicrotask(()=>{$.current===u&&($.current=null);let n=je(l),r=we.current??typeof s!=`boolean`;if(!u.cancelled&&s&&!G.current&&M(n)&&(r||n===t||t===e.body||i)){let e={preventScroll:!0};c===`keyboard`&&(e.focusVisible=!0),n.focus(e)}G.current=!1})}},[i,j,X,B,we,V,P,H,k,I,Q]),D(()=>{if(!ge||E||!j)return;let e=o(T(j));M(e)&&se(e)&&y(j,e)&&e.blur()},[E,j]),D(()=>{if(!i&&W)return W.setFocusManagerState({modal:_,closeOnFocusOut:v,open:E,onOpenChange:t.setOpen,domReference:k}),()=>{W.setFocusManagerState(null)}},[i,W,_,E,t,v,k]),D(()=>{if(!i&&X)return Me(X),()=>{queueMicrotask(Oe)}},[i,X]);let He=!i&&(!_||!R)&&(Ve||_);return(0,U.jsxs)(N.Fragment,{children:[He&&(0,U.jsx)(a,{"data-type":`inside`,ref:Le,onFocus:e=>{if(_){let e=Z();Ce(e[e.length-1])}else W?.portalNode&&(G.current=!1,ce(e,W.portalNode)?oe(k)?.focus():c(w??W.beforeOutsideRef)?.focus())}}),n,He&&(0,U.jsx)(a,{"data-type":`inside`,ref:Re,onFocus:e=>{_?Ce(Z()[0]):W?.portalNode&&(v&&(G.current=!0),ce(e,W.portalNode)?ve(k)?.focus():c(S??W.afterOutsideRef)?.focus())}})]})}function Ne(e){return he(19)?e:e?`true`:void 0}var Pe=`data-valid`,Fe=`data-invalid`,q={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},J={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ie={disabled:!1,...J},Le={valid(e){return e===null?null:e?{[Pe]:``}:{[Fe]:``}}},Re={invalid:void 0,name:void 0,validityData:{state:q,errors:[],error:``,value:``,initialValue:null},setValidityData:i,disabled:void 0,setTouched:i,setDirty:i,setFilled:i,setFocused:i,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ie,registerFieldControl:i,validation:{getValidationProps:(e,t=E)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:i,getInputControl:()=>null,commit:async()=>{},change:i}},ze=N.createContext(Re);function Y(e=!0){let t=N.useContext(ze);if(t.setValidityData===i&&!e)throw Error(S(28));return t}function Be(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Y(),s=h(()=>Symbol());D(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),D(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ve=N.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:i,validationMode:`onSubmit`,submitCountRef:{current:0}});function X(){return N.useContext(Ve)}var Z=N.createContext({controlId:void 0,registerControlId:i,resetControlId:i,labelId:void 0,setLabelId:i,messageIds:[],setMessageIds:i,getDescriptionProps:e=>e});function Q(){return N.useContext(Z)}function $(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:a,resetControlId:o}=Q(),s=_(),c=h(()=>Symbol()),l=N.useRef(!1),u=N.useRef(!1),d=A(()=>{l.current&&a!==i&&(l.current=!1,a(c.current,void 0))});return D(()=>{if(!n||a===i){d();return}let e;if(t!==void 0)u.current=!0,e=t;else if(u.current)e=s;else{o();return}e===void 0?d():(l.current=!0,a(c.current,e))},[t,n,a,o,s,c,d]),D(()=>d,[d]),(n?r:void 0)??t??s}function He(e,t){let n=N.useRef(e),r=A(t);D(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Ue(e,t,n){let{setFocused:r,focusOwnerRef:i}=Y(),a=A(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return D(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var We=N.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,U.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ge={},Ke={},qe=``;function Je(e,t){return j(e)?e:t}function Ye(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Je(t,n)).overflowY)}function Xe(e){if(typeof document>`u`)return!1;let t=T(e);return w(t).innerWidth-t.documentElement.clientWidth>0}function Ze(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=T(e),n=t.documentElement,r=t.body,i=Je(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Qe(e){let t=T(e),n=t.documentElement,r=t.body,i=Je(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function $e(e){let t=T(e),n=t.documentElement,r=t.body,i=w(n),a=0,o=0,s=!1,c=re.create();if(ge&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ge={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qe=n.style.scrollBehavior,Ke={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),ee=Math.max(0,i.innerHeight-r.clientHeight),h=parseFloat(c.marginTop)+parseFloat(c.marginBottom),g=parseFloat(c.marginLeft)+parseFloat(c.marginRight),_=Je(n,r);s=Ze(e),s?(n.style.scrollbarGutter=l,_.style.overflowY=`hidden`,_.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:h||ee?`calc(100dvh - ${h+ee}px)`:`100dvh`,width:g||m?`calc(100vw - ${g+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Ge),Object.assign(r.style,Ke),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=qe)}function d(){u(),c.request(l)}l();let f=O(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var et=new class{lockCount=0;restore=null;timeoutLock=f.create();timeoutUnlock=f.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=T(e),n=t.documentElement,r=t.body,i=w(n);if(Ye(i,n,r)){let t=new i.MutationObserver(()=>{Ye(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=me||!Xe(e);this.restore=a?Qe(e):$e(e)}};function tt(e=!0,t=null){D(()=>{if(e)return et.acquire(t)},[e,t])}var nt=N.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:d=!1,style:f,...p}=e,{state:m,name:ee,disabled:h,setTouched:g,setDirty:_,validityData:te,setFilled:v,validationMode:ne,validation:y}=Y(),{clearErrors:re,elementRef:ie,submitCountRef:b}=X(),x=h||s,oe=ee??a,se={...m,disabled:x},{labelId:S}=Q(),ce=$({id:i}),le=o!==void 0,C=o==null?void 0:String(o),w=A(()=>y.inputRef.current?.value);Be(y.inputRef,ce,C,w,!x,a),D(()=>{let e=C??y.inputRef.current?.value;e!==void 0&&v(e!==``)},[C,l,y.inputRef,v]),He(C,()=>{C!==void 0&&(re(oe),_(C!==(te.initialValue??``)),y.change(C))});let de=N.useRef(null),fe=Ue(x,de),T=ae();return u(`input`,e,{ref:[t,de],state:se,props:[{id:ce,disabled:x,name:oe,ref:y.inputRef,"aria-labelledby":S,autoFocus:d,...le?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=ue(k,e.nativeEvent);c?.(t,n),le||(_(t!==(te.initialValue??``)),v(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(re(oe),y.change(t)))},onFocus(){fe(!0)},onBlur(e){if(g(!0),fe(!1),ne===`onBlur`){let t=e.currentTarget.value;y.commit(t),le&&queueMicrotask(()=>{let e=y.inputRef.current?.value;e!==void 0&&e!==t&&e!==(te.initialValue??``)&&y.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===ie.current&&!e.defaultPrevented){let t=e.currentTarget,n=b.current;T.start(0,()=>{b.current===n&&y.commit(t.value)})}else y.commit(t)}}},p,e=>y.getValidationProps(x,e)],stateAttributesMapping:Le})}),rt=N.forwardRef(function(e,t){return(0,U.jsx)(nt,{ref:t,...e})}),it=N.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return u(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function at({className:e,...t}){return(0,U.jsx)(`kbd`,{"data-slot":`kbd`,className:m(`inline-grid h-[18px] min-w-[18px] place-items-center rounded-[4px] border border-b-2 border-rule bg-page px-1 font-mono text-[0.66rem] leading-none font-semibold text-muted select-none`,e),...t})}var ot=`w-full min-w-0 rounded-control border border-rule bg-page px-3 text-sm text-text outline-none transition-colors placeholder:text-muted focus:border-accent disabled:cursor-not-allowed disabled:opacity-60`;function st({className:e,...t}){return(0,U.jsx)(rt,{"data-slot":`input`,className:m(ot,`h-9`,e),...t})}function ct({className:e,orientation:t=`horizontal`,...n}){return(0,U.jsx)(it,{"data-slot":`separator`,orientation:t,className:m(`shrink-0 bg-rule-soft data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,e),...n})}export{Ne as _,We as a,$ as c,Be as d,Re as f,Le as g,J as h,tt as i,Q as l,Y as m,at as n,Ue as o,ze as p,ct as r,He as s,st as t,X as u,K as v,Ce as y};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,d as n,g as r,h as i,m as a,v as o,x as s,y as c}from"./index-CysBCSxM.js";import{z as l}from"./studio-queries-BflKt9va.js";import{Lr as u,et as d,it as f,lt as p,nt as m,ot as h,r as g,rt as _,t as v,tt as y,ut as ee,zr as te}from"./button-CX0sWAJl.js";import{g as b,h as ne,m as re,v as ie}from"./studio-0ueISxwP.js";import{a as x,n as ae,t as oe}from"./jsx-runtime-MZURdZre.js";import{a as se,c as ce,l as le,o as ue,s as de}from"./select-DdebbX7K.js";import{a as fe,n as S}from"./search-CXosfvYh.js";import{t as pe}from"./fields-BobQ7zRF.js";var C=`mate`,w=x(ae(),1),T=oe(),E={fixed:{label:`Fixed`,marker:`done`},reported:{label:`Reported`,marker:`review`},dismissed:{label:`Dismissed`,marker:`idle`}},me={person:`by a person`,triage:`by triage`,studio:`in Studio`},D=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function O({state:e}){if(!e)return null;let t=E[e.state];return e.reopened?(0,T.jsx)(p,{marker:`warn`,children:`Reopened`}):(0,T.jsx)(p,{marker:t.marker,children:t.label})}function he({state:e,time:t}){let n=E[e.state];return(0,T.jsxs)(`p`,{className:`m-0 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs text-muted`,children:[(0,T.jsx)(O,{state:e}),(0,T.jsxs)(`span`,{children:[e.reopened?`Fixed, then recorded again; marked `:`${n.label} `,me[e.by],` `,t]}),e.state===`reported`&&e.eventsSince!==void 0?(0,T.jsxs)(`span`,{className:`tabular-nums`,children:[D(e.eventsSince,`event`),` since reported`]}):null,e.link?(0,T.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,className:`text-text underline`,children:e.link}):null,e.note?(0,T.jsx)(`span`,{className:`text-text`,children:e.note}):null]})}var k={label:`Note (optional)`,key:`note`,type:`text`},A={fixed:{action:`Mark fixed`,field:k},reported:{action:`Mark reported`,field:{label:`Issue link (optional)`,key:`link`,type:`url`}},dismissed:{action:`Dismiss`,field:k}};function ge({name:e,handled:t,onMark:n}){let[r,i]=(0,w.useState)(null),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(!1),[l,u]=(0,w.useState)(null),d=(0,w.useId)(),f=(0,w.useRef)(null),p=(0,w.useRef)({}),m=(0,w.useRef)(null);(0,w.useEffect)(()=>{r?f.current?.focus():m.current&&p.current[m.current]?.focus(),m.current=null},[r]);let h=()=>{i(null),o(``),u(null)},g=()=>{s||(m.current=r,h())};async function _(e,t={}){c(!0),u(null);let r=await n(e,t);c(!1),r?u(r):h()}return(0,T.jsxs)(`div`,{className:`grid gap-1.5`,children:[r?(0,T.jsxs)(`form`,{"aria-label":`${A[r].action}: ${e}`,className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),_(r,{[A[r].field.key]:a})},onKeyDown:e=>{e.key===`Escape`&&g()},children:[(0,T.jsxs)(`label`,{htmlFor:d,className:`grid gap-1 text-xs text-muted`,children:[A[r].field.label,(0,T.jsx)(pe,{id:d,ref:f,type:A[r].field.type,value:a,onChange:e=>o(e.target.value),className:`h-8 w-72 max-w-full`})]}),(0,T.jsx)(v,{size:`sm`,variant:`primary`,type:`submit`,disabled:s,children:A[r].action}),(0,T.jsx)(v,{size:`sm`,onClick:g,disabled:s,children:`Cancel`})]}):(0,T.jsxs)(`div`,{role:`group`,"aria-label":`Mark ${e}`,className:`flex flex-wrap gap-2`,children:[ne.map(e=>(0,T.jsx)(v,{ref:t=>{p.current[e]=t},size:`sm`,disabled:s,onClick:()=>i(e),children:A[e].action},e)),t?(0,T.jsx)(v,{size:`sm`,disabled:s,onClick:()=>void _(`open`),children:`Reopen`}):null]}),l?(0,T.jsx)(`p`,{className:`m-0 max-w-[70ch] text-xs text-bad`,role:`alert`,children:l}):null]})}var j={state:`open`,sort:`repeats`};function _e(e){return{state:e.frictionState??j.state,type:e.frictionType,kind:e.frictionKind,sort:e.frictionSort??j.sort}}function ve(e){return{frictionState:e.state===j.state?void 0:e.state,frictionType:e.type,frictionKind:e.kind,frictionSort:e.sort===j.sort?void 0:e.sort}}function M(e,t){let n=re(e,t);return t.sort===`recent`?{...n,groups:n.groups.toSorted((e,t)=>e.lastSeen<t.lastSeen?1:e.lastSeen>t.lastSeen?-1:0)}:n}var ye=fe.map(e=>({value:String(e),label:`${e} days`})),N=[{value:`open`,label:`Open`},{value:`handled`,label:`Handled`},{value:`all`,label:`All`}],P=`any`,be=[{value:P,label:`All kinds`},...b.map(e=>({value:e,label:e}))],xe=[{value:`repeats`,label:`Most repeated in one session`},{value:`recent`,label:`Most recent`}],F={id:`friction-recorded`,title:`Recorded friction`},I={id:`friction-agent-reports`,title:`Agent reports`},L=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function R({at:e}){let t=a();return(0,T.jsx)(`time`,{dateTime:e,children:t?L.format(Date.parse(e)):``})}var z=`m-0 grid grid-cols-[max-content_minmax(0,1fr)] items-baseline gap-x-3 gap-y-1 @md:grid-cols-[6rem_minmax(0,1fr)]`;function B({label:e,children:t}){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`dt`,{className:`text-muted`,children:e}),(0,T.jsx)(`dd`,{className:`m-0 min-w-0`,children:t})]})}function V({label:e,counts:t}){let n=Object.entries(t);return n.length===0?null:(0,T.jsx)(B,{label:e,children:(0,T.jsx)(`span`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:n.map(([e,t])=>(0,T.jsxs)(`span`,{className:`font-mono tabular-nums`,children:[e,` `,(0,T.jsxs)(`span`,{className:`text-muted`,children:[`×`,t]})]},e))})})}function H({name:e,item:t,onMark:n}){return(0,T.jsxs)(`div`,{className:`mt-1 grid gap-1.5`,children:[t.state?(0,T.jsx)(he,{state:t.state,time:(0,T.jsx)(R,{at:t.state.at})}):null,(0,T.jsx)(ge,{name:e,handled:!t.open,onMark:n})]})}function U({fields:e}){let t=e.filter(([,e])=>e);return t.length===0?null:(0,T.jsx)(`dl`,{className:u(z,`max-w-[70ch] text-sm`),children:t.map(([e,t])=>(0,T.jsx)(B,{label:e,children:t},e))})}function W({focusKey:e,line:t,summary:n,children:r}){return(0,T.jsx)(`li`,{className:`border-t border-rule-soft first:border-t-0`,"data-friction-item":e,children:(0,T.jsxs)(`details`,{className:`group/friction`,children:[(0,T.jsxs)(`summary`,{className:`grid cursor-pointer list-none grid-cols-[auto_minmax(0,1fr)] gap-x-2 px-4 py-2.5 hover:bg-surface focus-visible:-outline-offset-2 [&::-webkit-details-marker]:hidden`,children:[(0,T.jsx)(g,{name:`right`,className:`mt-1 size-3.5 text-muted transition-transform group-open/friction:rotate-90 motion-reduce:transition-none`}),(0,T.jsx)(`div`,{className:u(`flex min-w-0 flex-wrap items-baseline gap-x-4 gap-y-1`,t),children:n})]}),(0,T.jsx)(`div`,{className:`mr-4 mb-3 ml-9.5 grid gap-1.5 border-l border-rule-soft pl-3`,children:r})]})})}var G=`flex flex-wrap items-baseline gap-x-3 gap-y-0.5 font-mono text-xs whitespace-nowrap text-muted tabular-nums`,Se=`minmax(32ch,max-content)`,K=`minmax(22ch,max-content)`,q=`11ch`;function J({wide:e}){return(0,T.jsx)(`span`,{"aria-hidden":`true`,className:u(`hidden`,e)})}function Y(e){return[`at most ${e.maxPerSession} in one session`,D(e.events,`event`),D(e.sessions,`session`),e.reports.length>0?D(e.reports.length,`report`):null]}function Ce(e,t){let n=e.map(Y),r=e=>Math.max(...n.map(t=>t[e]?.length??0),0),i=[0,1,2].map(e=>`${r(e)}ch`);return t.reports&&i.push(`${r(3)}ch`),i.push(Se),t.state&&i.push(q),i.join(` `)}function we(e){return e?`${K} ${q}`:K}var X=e=>({"--friction-facts":e});function Z({state:e,column:t,wide:n}){return e?(0,T.jsx)(`span`,{className:`font-sans`,children:(0,T.jsx)(O,{state:e})}):t?(0,T.jsx)(J,{wide:n}):null}function Te({group:e,columns:t,onMark:n}){let[r,i,a,o]=Y(e);return(0,T.jsxs)(W,{focusKey:e.fingerprint,line:`@5xl:grid @5xl:grid-cols-[minmax(0,1fr)_auto]`,summary:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`h3`,{className:`m-0 min-w-0 flex-[1_1_16rem] text-base font-semibold`,children:e.title}),(0,T.jsxs)(`span`,{className:u(G,`@3xl:grid @3xl:grid-cols-(--friction-facts)`),children:[(0,T.jsx)(`span`,{children:r}),(0,T.jsx)(`span`,{children:i}),(0,T.jsx)(`span`,{children:a}),o?(0,T.jsx)(`span`,{children:o}):t.reports?(0,T.jsx)(J,{wide:`@3xl:block`}):null,(0,T.jsxs)(`span`,{children:[`last seen `,(0,T.jsx)(R,{at:e.lastSeen})]}),(0,T.jsx)(Z,{state:e.state,column:t.state,wide:`@3xl:block`})]})]}),children:[(0,T.jsxs)(`dl`,{className:u(z,`text-xs`),children:[(0,T.jsx)(B,{label:`Fingerprint`,children:(0,T.jsx)(`code`,{className:`font-mono`,children:e.fingerprint})}),(0,T.jsx)(B,{label:`First seen`,children:(0,T.jsx)(R,{at:e.firstSeen})}),(0,T.jsx)(B,{label:`Last seen`,children:(0,T.jsx)(R,{at:e.lastSeen})}),(0,T.jsx)(V,{label:`Mate`,counts:e.versions}),(0,T.jsx)(V,{label:`Paths`,counts:e.paths}),(0,T.jsx)(V,{label:`Flags`,counts:e.flags})]}),e.reports.length>0?(0,T.jsxs)(`section`,{"aria-label":`Reports on ${e.title}`,className:`mt-1`,children:[(0,T.jsx)(`h4`,{className:`m-0 text-xs font-semibold text-muted`,children:D(e.reports.length,`report`)}),(0,T.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.reports.map(e=>(0,T.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft py-2 first:border-t-0`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 text-xs text-muted`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-text`,children:e.kind}),e.cost?(0,T.jsx)(`span`,{children:e.cost}):null,(0,T.jsx)(R,{at:e.at})]}),(0,T.jsx)(U,{fields:[[`Expected`,e.expected],[`Evidence`,e.evidence],[`Workaround`,e.workaround]]})]},e.id))})]}):null,(0,T.jsx)(H,{name:e.title,item:e,onMark:n})]})}function Ee({report:e,stateColumn:t,onMark:n}){return(0,T.jsxs)(W,{focusKey:e.id,line:`@3xl:grid @3xl:grid-cols-[minmax(0,1fr)_auto]`,summary:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1`,children:[(0,T.jsx)(`h3`,{className:`m-0 min-w-0 font-mono text-sm leading-[1.375rem] font-semibold`,children:e.subject}),(0,T.jsx)(`span`,{className:`rounded-full border border-rule bg-page px-2 font-mono text-[0.7rem] text-text`,children:e.kind})]}),(0,T.jsxs)(`span`,{className:u(G,`@3xl:grid @3xl:grid-cols-(--friction-facts)`),children:[(0,T.jsx)(R,{at:e.at}),(0,T.jsx)(Z,{state:e.state,column:t,wide:`@3xl:block`})]})]}),children:[(0,T.jsx)(U,{fields:[[`Expected`,e.expected],[`Cost`,e.cost],[`Evidence`,e.evidence],[`Workaround`,e.workaround]]}),(0,T.jsx)(H,{name:e.subject,item:e,onMark:n})]})}function Q({hidden:e,onShowAll:t}){return(0,T.jsxs)(T.Fragment,{children:[e===1?`1 item is`:`${e} items are`,` hidden by the filters.`,(0,T.jsx)(v,{size:`sm`,onClick:t,"data-show-all":!0,"aria-label":`Show all, including ${D(e,`hidden item`)}`,children:`Show all`})]})}function De({view:e,shown:t,empty:n,onShowAll:r}){let i=[[F,t.groups.length],[I,t.freeReports.length]];return(0,T.jsxs)(`section`,{"aria-label":`Overview`,className:`grid gap-2 text-sm`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-5 gap-y-1`,children:[(0,T.jsxs)(`p`,{className:`m-0`,children:[D(e.events,`event`),` in `,D(e.sessions,`session`),` in the last`,` `,e.days,` days for the selected companion.`]}),(0,T.jsx)(`nav`,{"aria-label":`Friction sections`,className:`flex flex-wrap gap-x-4 gap-y-1`,children:i.map(([{id:e,title:t},n])=>n>0?(0,T.jsxs)(`a`,{href:`#${e}`,className:`inline-flex items-center gap-1.5 rounded-control underline`,children:[t,(0,T.jsx)(y,{value:n})]},e):null)})]}),!n&&t.hidden>0?(0,T.jsx)(`p`,{className:`m-0 flex flex-wrap items-center gap-2 text-muted`,children:(0,T.jsx)(Q,{hidden:t.hidden,onShowAll:r})}):null,(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,T.jsx)(`p`,{className:`m-0 text-muted`,children:`To investigate, run this in your own terminal, inside the affected repository:`}),(0,T.jsx)(`div`,{className:`w-48 max-w-full`,children:(0,T.jsx)(d,{text:`${C} triage`,label:`command`})})]})]})}function Oe({recording:e,toggle:n,button:r}){return(0,T.jsxs)(`div`,{className:`grid gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(t,{recording:e}),(0,T.jsx)(o,{ref:r,recording:e,toggle:n})]}),(0,T.jsx)(c,{}),n.error?(0,T.jsx)(`p`,{className:`m-0 text-sm text-bad`,role:`alert`,children:n.error}):null]})}function $({label:e,options:t,value:n,onChange:r,note:i,disabled:a}){let o=(0,w.useId)();return(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`label`,{htmlFor:o,className:`text-xs text-muted`,children:e}),(0,T.jsxs)(se,{items:t,value:n,disabled:a,onValueChange:e=>{e!==null&&r(e)},children:[(0,T.jsx)(ce,{id:o,"aria-describedby":i?`${o}-note`:void 0,className:`h-7 w-auto`,children:(0,T.jsx)(le,{})}),(0,T.jsx)(ue,{children:t.map(e=>(0,T.jsx)(de,{value:e.value,children:e.label},e.value))})]}),i?(0,T.jsx)(`span`,{id:`${o}-note`,className:`text-xs text-muted`,children:i}):null]})}function ke({view:e,shown:t,filters:n,onFilters:r}){let i=[{value:P,label:`All types`},...t.types.map(e=>({value:e,label:e}))],a=M(e,{...n,kind:void 0}).freeReports.length===0;return(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2`,children:[(0,T.jsx)($,{label:`Type`,options:i,value:t.type??P,onChange:e=>r({...n,type:S(ie,e)})}),(0,T.jsx)($,{label:`Kind`,options:be,value:n.kind??P,onChange:e=>r({...n,kind:S(b,e)}),note:`Agent reports only`,disabled:a&&n.kind===void 0}),(0,T.jsx)($,{label:`Sort`,options:xe,value:n.sort,onChange:e=>r({...n,sort:e})})]})}function Ae({shown:e,empty:t,markItem:n,onShowAll:r}){if(t)return(0,T.jsxs)(m,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[`No item matches the filters. `,(0,T.jsx)(Q,{hidden:e.hidden,onShowAll:r})]});let i={reports:e.groups.some(e=>e.reports.length>0),state:e.groups.some(e=>e.state!==null)},a=e.freeReports.some(e=>e.state!==null);return(0,T.jsxs)(`div`,{className:`grid gap-4`,children:[e.groups.length>0?(0,T.jsx)(_,{...F,count:e.groups.length,className:`wrap-anywhere`,children:(0,T.jsx)(`ul`,{className:`@container m-0 list-none p-0`,style:X(Ce(e.groups,i)),children:e.groups.map(e=>(0,T.jsx)(Te,{group:e,columns:i,onMark:n(e.fingerprint,e.title)},e.fingerprint))})}):null,e.freeReports.length>0?(0,T.jsx)(_,{...I,count:e.freeReports.length,hint:`These reports are not attached to a recorded event.`,className:`wrap-anywhere`,children:(0,T.jsx)(`ul`,{className:`@container m-0 list-none p-0`,style:X(we(a)),children:e.freeReports.map(e=>(0,T.jsx)(Ee,{report:e,stateColumn:a,onMark:n(e.id,e.subject)},e.id))})}):null]})}function je({view:e,days:t,onDays:n,toggle:r,filters:i,onFilters:a,mark:o,recordingButton:s}){let c=e.events>0||e.freeReports.length>0,l=M(e,i),[d,p]=(0,w.useState)(null),g=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!d)return;let e=e=>e===null?null:g.current?.querySelector(`[data-friction-item="${CSS.escape(e)}"] summary`);(e(d.key)??e(d.next)??g.current?.querySelector(`[data-show-all]`))?.focus()},[d]);let _=(e,t)=>async(n,r)=>{let i=[...l.groups.map(e=>e.fingerprint),...l.freeReports.map(e=>e.id)],a=i.indexOf(e),s=i[a+1]??i[a-1]??null,c;try{c=await o({target:e,state:n,...r})}catch(e){return`The mark could not be saved: ${e instanceof Error?e.message:String(e)}`}return c.ok?(p(r=>({announcementKey:(r?.announcementKey??0)+1,key:e,next:s,message:`${t}: ${n===`open`?`reopened`:`marked ${n}`}.`})),null):c.reason},v=()=>{[...g.current?.querySelectorAll(`[aria-label="State"] button`)??[]].find(e=>e.textContent===`All`)?.focus(),a({state:`all`,sort:i.sort})},y=l.groups.length===0&&l.freeReports.length===0;return(0,T.jsxs)(`div`,{ref:g,className:u(f,`grid min-w-0 gap-4 pt-3 pb-6`),children:[(0,T.jsx)(Oe,{recording:e.recording,toggle:r,button:s}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2`,children:[(0,T.jsx)(h,{label:`Period`,options:ye,value:String(t),onChange:e=>n(Number(e))}),c?(0,T.jsx)(h,{label:`State`,options:N,value:i.state,onChange:e=>a({...i,state:e})}):null]}),c?(0,T.jsx)(ke,{view:e,shown:l,filters:i,onFilters:a}):null]}),(0,T.jsx)(`div`,{"aria-live":`polite`,className:`sr-only`,children:d?(0,T.jsx)(`p`,{children:d.message},d.announcementKey):null}),c?(0,T.jsxs)(T.Fragment,{children:[e.recording?null:(0,T.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Recording is off: nothing new is recorded. The records below were made while it was on.`}),(0,T.jsx)(De,{view:e,shown:l,empty:y,onShowAll:v}),(0,T.jsx)(Ae,{shown:l,empty:y,markItem:_,onShowAll:v})]}):(0,T.jsx)(m,{children:e.recording?`No friction was recorded in the last ${e.days} days.`:`Friction recording shows where Mate gets in an agent's way: its refusals and the ${C} commands that fail in agent sessions on this machine. Recording is off; turn it on to start.`})]})}function Me({companion:t,days:n,onDays:o,filters:c,onFilters:d}){let p=te({...i(t,n),enabled:a(),placeholderData:l}),m=e(),h=r(),{button:g,retried:_}=s(p.isSuccess);if(!p.data&&!p.isError)return(0,T.jsx)(ee,{title:`Reading the Friction Log…`});let y=p.isError?(0,T.jsxs)(`div`,{className:u(f,`pt-3 text-sm`),role:`alert`,children:[(0,T.jsx)(`p`,{className:`m-0 text-bad`,children:`The Friction Log could not be read.`}),(0,T.jsx)(v,{className:`mt-3`,onClick:()=>{_(),p.refetch()},disabled:p.isFetching,children:`Retry`})]}):null;return p.data?(0,T.jsxs)(T.Fragment,{children:[y,(0,T.jsx)(je,{view:p.data,days:n,onDays:o,toggle:m,filters:c,onFilters:d,mark:h,recordingButton:g})]}):y}var Ne=function(){let e=n.useSearch(),t=n.useNavigate();return e.companion?(0,T.jsx)(Me,{companion:e.companion,days:e.frictionDays??30,onDays:e=>void t({search:t=>({...t,frictionDays:e})}),filters:_e(e),onFilters:e=>void t({search:t=>({...t,...ve(e)})})},e.companion):null};export{Ne as component};
@@ -1 +0,0 @@
1
- import{ut as e}from"./index-CysBCSxM.js";var t=e;export{t as component};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-canvas-DIcAqwtK.js","assets/studio-0ueISxwP.js","assets/jsx-runtime-MZURdZre.js"])))=>i.map(i=>d[i]);
2
- import{Lr as e,it as t,nt as n,r,zr as i}from"./button-CX0sWAJl.js";import"./studio-0ueISxwP.js";import{a,i as o,n as s,t as c}from"./jsx-runtime-MZURdZre.js";import{it as l,o as u}from"./studio-queries-BflKt9va.js";import{n as d,r as f,t as p}from"./panel-Csr49lBo.js";import{a as m,i as h,o as g,s as _,t as v}from"./specs-view-B_n0Pekv.js";import{t as y}from"./preload-helper-BLdHbfdN.js";import{u as b}from"./index-CysBCSxM.js";var x=a(s(),1),S={repository:8,area:5,capability:2.5},C=e=>`e${e}`;function w(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n>>>0)%1e5/1e5}function T(e,t,n){let r=w(t,1)*Math.PI*2,i=n*(.35+.65*w(t,2));return{x:e.x+Math.cos(r)*i,y:e.y+Math.sin(r)*i}}function E(e){let t=e.nodes.map(()=>({x:0,y:0})),n=e.nodes.flatMap((e,t)=>e.kind===`repository`?[t]:[]),r=Math.sqrt(e.nodes.length)*10;n.forEach((e,i)=>{let a=i/Math.max(1,n.length)*Math.PI*2;t[e]=n.length===1?{x:0,y:0}:{x:Math.cos(a)*r,y:Math.sin(a)*r}});let i=new Map,a=new Map;return O(e,(e,t,n)=>{n===`in`&&a.set(e,t),n===`binds`&&!i.has(e)&&i.set(e,t)}),e.nodes.forEach((e,n)=>{if(e.kind!==`area`)return;let i=a.get(n);t[n]=T(i===void 0?{x:0,y:0}:t[i],e.id,r/2)}),e.nodes.forEach((e,n)=>{if(e.kind!==`capability`)return;let a=i.get(n);t[n]=a===void 0?T({x:0,y:0},e.id,r*1.4):T(t[a],e.id,r/5)}),t}function D(e,t){if(!t)return{positions:E(e),missing:e.nodes.length};let n=e.nodes.map(e=>t.get(e.id)),r=n.filter(e=>!e).length;if(r===0)return{positions:n,missing:r};let i=new Map,a=(e,t)=>{let r=n[t];if(n[e]||!r)return;let a=i.get(e)??{x:0,y:0,count:0};i.set(e,{x:a.x+r.x,y:a.y+r.y,count:a.count+1})};O(e,(e,t)=>{a(e,t),a(t,e)});let o=E(e);return{positions:n.map((t,n)=>{if(t)return t;let r=i.get(n);return r?T({x:r.x/r.count,y:r.y/r.count},e.nodes[n].id,1):o[n]}),missing:r}}function O(e,t){for(let n=0,r=0;n<e.edges.length;n+=4,r++)t(e.edges[n],e.edges[n+1],h[e.edges[n+2]],e.edges[n+3],r)}var k={hidden:new Set,minWeight:1};function A(e,t){return t.hidden.has(e.kind)?!1:e.kind!==`co-change`||e.weight>=t.minWeight}function j(e){return e.kind===`binds`||e.kind===`in`?.3:e.kind===`mentions`?1:Math.min(4,e.weight)}function M(e,t,n=8){let r=t.trim().toLowerCase();if(!r)return[];let i={capability:0,area:1,repository:2};return e.nodes.filter(e=>[e.label,e.area,e.repository].some(e=>e?.toLowerCase().includes(r))).toSorted((e,t)=>Number(t.label.toLowerCase()===r)-Number(e.label.toLowerCase()===r)||i[e.kind]-i[t.kind]||e.label.localeCompare(t.label)).slice(0,n)}function ee(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.nodes.map(()=>[]);return O(e,(e,t,r,i,a)=>{n[e].push({other:t,kind:r,edge:a,outgoing:!0}),n[t].push({other:e,kind:r,edge:a,outgoing:!1})}),{byId:t,links:n}}function te(e,t,n){let r=new Set(e.history[n]);return e.history[t].flatMap(t=>r.has(t)?[e.archives[t]]:[])}function N(e,t){let n=t*4;return!Number.isInteger(t)||t<0||n>=e.edges.length?null:{source:e.edges[n],target:e.edges[n+1],kind:h[e.edges[n+2]],weight:e.edges[n+3]}}function P(e,t,n){if(`edge`in n){let t=N(e,n.edge);return t?`Connection ${e.nodes[t.source].label} and ${e.nodes[t.target].label}`:`Connection`}let r=t.byId.get(n.node);if(r===void 0)return`Graph`;let i=e.nodes[r];return`${F[i.kind]} ${i.label}`}var F={capability:`Spec`,area:`Area`,repository:`Repository`};function I(e){return e?`edge`in e?`edge:${e.edge}`:e.node:null}function L(e){return e.kind===`capability`?`spec`:e.kind===`area`?e.repository??``:`repository`}var R=c(),z={"proposal.md":`proposal`,"design.md":`design`,"tasks.md":`tasks`,"verification.md":`verification`},B=e=>e.label;function V({search:e,path:t,children:n}){return(0,R.jsx)(l,{className:`text-sm`,to:`/vault`,search:{companion:e.companion,studioMode:e.studioMode,path:t},children:n})}function H({archive:e,capabilities:t,search:n}){return(0,R.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft py-2 first:border-t-0`,"data-archive":e.anchor,children:[(0,R.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono text-sm`,children:e.name}),(0,R.jsx)(`time`,{className:`ml-auto font-mono text-2xs text-muted`,dateTime:e.archivedOn,children:e.archivedOn})]}),(0,R.jsxs)(`span`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:[e.artifacts.map(t=>(0,R.jsx)(V,{search:n,path:g(e.anchor,t),children:z[t]??t},t)),t.map(r=>(0,R.jsx)(V,{search:n,path:g(e.anchor,`specs/${r}/spec.md`),children:t.length>1?`${r} delta`:`delta spec`},r))]})]})}function U({archives:e,capabilities:t,search:n,empty:r}){return e.length===0?(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:r}):(0,R.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.map(e=>(0,R.jsx)(H,{archive:e,capabilities:t,search:n},e.anchor))})}function W({nodes:t,onSelectNode:n}){return(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0`,children:t.map(t=>(0,R.jsx)(`li`,{children:(0,R.jsx)(`button`,{type:`button`,className:e(`w-full truncate rounded-[4px] border-0 bg-transparent px-1.5 py-0.5 text-left text-sm text-text hover:bg-surface`,t.kind===`capability`&&`font-mono`),"data-graph-node":t.id,onClick:()=>n(t.id),children:t.label})},t.id))})}function G(e,t,n,r,i){return t.links[n].flatMap(t=>t.kind===r&&(i===void 0||t.outgoing===i)?[e.nodes[t.other]]:[]).toSorted((e,t)=>e.label.localeCompare(t.label))}function K({wire:e,index:t,search:n,onSelectNode:r,node:i}){let a=B(e.nodes[i]),o=G(e,t,i,`binds`,!0).map(({repository:e,area:t})=>({repository:e,area:t})),s=e.history[i].map(t=>e.archives[t]),c=G(e,t,i,`mentions`,!0),l=G(e,t,i,`mentions`,!1),u=G(e,t,i,`co-change`);return(0,R.jsxs)(v,{spec:{capability:a,scopes:o},companion:n.companion,withStatus:!1,children:[(0,R.jsx)(d,{title:`History`,aside:`${s.length} archived`,children:(0,R.jsx)(U,{archives:s,capabilities:[a],search:n,empty:`No archived change names this spec.`})}),c.length+l.length+u.length>0?(0,R.jsxs)(d,{title:`Connected specs`,children:[c.length>0?(0,R.jsx)(q,{label:`Mentions`,nodes:c,onSelectNode:r}):null,l.length>0?(0,R.jsx)(q,{label:`Mentioned by`,nodes:l,onSelectNode:r}):null,u.length>0?(0,R.jsx)(q,{label:`Changed together`,nodes:u,onSelectNode:r}):null]}):null]})}function q({label:e,nodes:t,onSelectNode:n}){return(0,R.jsxs)(`div`,{className:`grid gap-1`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,R.jsx)(W,{nodes:t,onSelectNode:n})]})}function J({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`binds`,!1),o=G(e,t,r,`in`,!0)[0];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:i.area!==`.`,title:i.label,kicker:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`Area`}),o?(0,R.jsx)(`button`,{type:`button`,className:`ml-auto border-0 bg-transparent p-0 font-mono text-xs text-muted hover:text-text`,onClick:()=>n(o.id),children:o.label}):null]})}),(0,R.jsx)(d,{title:`Capabilities`,aside:a.length,children:(0,R.jsx)(W,{nodes:a,onSelectNode:n})})]})}function Y({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`in`,!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:!0,title:i.label,kicker:(0,R.jsx)(`span`,{children:`Repository`})}),a.map(r=>{let i=G(e,t,t.byId.get(r.id),`binds`,!1);return(0,R.jsxs)(d,{title:r.area===`.`?m:r.label,aside:i.length,children:[(0,R.jsx)(`button`,{type:`button`,className:`justify-self-start border-0 bg-transparent p-0 text-xs text-muted hover:text-text`,onClick:()=>n(r.id),children:`Open Area`}),(0,R.jsx)(W,{nodes:i,onSelectNode:n})]},r.id)})]})}var X={binds:`Binds`,in:`In repository`,mentions:`Mentions`,"co-change":`Changed together`};function Z({wire:e,search:t,onSelectNode:n,edge:r}){let i=N(e,r);if(!i)return(0,R.jsx)(`p`,{className:`m-0 px-5 py-4 text-sm text-muted`,children:`This connection is no longer in the graph.`});let a=e.nodes[i.source],o=e.nodes[i.target],s=i.kind===`co-change`?te(e,i.source,i.target):[];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{title:X[i.kind],kicker:i.kind===`co-change`?(0,R.jsx)(`span`,{children:`${i.weight} shared archived ${i.weight===1?`change`:`changes`}`}):null,children:(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5 font-mono text-sm`,children:[(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(a.id),children:a.label}),(0,R.jsx)(`span`,{className:`text-muted`,"aria-hidden":`true`,children:i.kind===`co-change`?`↔`:`→`}),(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(o.id),children:o.label})]})}),i.kind===`co-change`?(0,R.jsx)(d,{title:`Archived changes`,aside:s.length,children:(0,R.jsx)(U,{archives:s,capabilities:[a.label,o.label],search:t,empty:`No archive names both specs.`})}):null]})}function ne({selection:e,...t}){if(`edge`in e)return(0,R.jsx)(Z,{...t,edge:e.edge});let n=t.index.byId.get(e.node);if(n===void 0)return null;let r=t.wire.nodes[n].kind;return r===`capability`?(0,R.jsx)(K,{...t,node:n}):r===`area`?(0,R.jsx)(J,{...t,node:n}):(0,R.jsx)(Y,{...t,node:n})}var re=(0,x.lazy)(()=>y(()=>import(`./graph-canvas-DIcAqwtK.js`),__vite__mapDeps([0,1,2]))),ie={binds:`Areas`,in:`Repositories`,mentions:`Mentions`,"co-change":`Changed together`};function ae({search:r,node:a,onNodeChange:o}){let s=i({...u(r.companion??``),enabled:!!r.companion});return s.data?(0,R.jsx)(oe,{wire:s.data,search:r,node:a,onNodeChange:o}):s.isError?(0,R.jsx)(`section`,{className:e(t,`pb-10`),children:(0,R.jsxs)(n,{children:[`The spec graph could not be built: `,s.error.message]})}):(0,R.jsx)(`section`,{className:e(t,`pb-10`),children:(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Building the spec graph…`})})}function oe({wire:r,search:i,node:a,onNodeChange:o}){let s=(0,x.useMemo)(()=>ee(r),[r]),[c,l]=(0,x.useState)(k),[u,d]=(0,x.useState)(null),p=u?.wire===r?u.edge:null,[m,h]=(0,x.useState)(null),g=r.nodes.filter(e=>e.kind===`capability`).length,_=a!==void 0&&s.byId.has(a)?a:null,v=p===null?_?{node:_}:null:{edge:p},y=e=>{d(null),o(e??void 0)},b=e=>{y(e),h(t=>({id:e,nonce:(t?.nonce??0)+1}))};if(g===0)return(0,R.jsx)(`section`,{className:e(t,`pb-10`),children:(0,R.jsx)(n,{children:`No specs in this companion.`})});let S=I(v);return(0,R.jsxs)(`section`,{className:e(t,`flex min-h-[480px] flex-1 flex-col gap-2 pb-4`),"aria-label":`Spec graph`,"data-graph-view":!0,children:[(0,R.jsx)(se,{wire:r,filter:c,onFilter:l,onFocus:b}),(0,R.jsx)(Q,{wire:r,onSelectNode:b}),(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden rounded-card border border-rule`,children:[(0,R.jsx)(x.Suspense,{fallback:(0,R.jsx)(`p`,{className:`m-0 p-4 text-sm text-muted`,children:`Loading the renderer…`}),children:(0,R.jsx)(re,{wire:r,layoutKey:i.companion??``,filter:c,selected:_,focus:m,onSelectNode:y,onSelectEdge:e=>{o(void 0),d({wire:r,edge:e})}})}),(0,R.jsx)(ce,{})]}),(0,R.jsx)(f,{items:S?[S]:[],current:S,onSelect:e=>{e===null&&y(null)},wide:!0,title:v?P(r,s,v):`Graph`,children:v?(0,R.jsx)(ne,{selection:v,wire:r,index:s,search:i,onSelectNode:b}):null})]})}function se({wire:e,filter:t,onFilter:n,onFocus:i}){let[a,o]=(0,x.useState)(``),s=(0,x.useId)(),c=(0,x.useMemo)(()=>M(e,a),[e,a]),l=(0,x.useMemo)(()=>{let t=1;return O(e,(e,n,r,i)=>{r===`co-change`&&(t=Math.max(t,i))}),t},[e]),u=e=>{let r=new Set(t.hidden);r.has(e)?r.delete(e):r.add(e),n({...t,hidden:r})};return(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,role:`toolbar`,"aria-label":`Graph controls`,children:[(0,R.jsxs)(`form`,{className:`relative`,role:`search`,onSubmit:e=>{e.preventDefault(),c[0]&&(i(c[0].id),o(``))},children:[(0,R.jsxs)(`label`,{className:`flex h-8 items-center gap-2 rounded-control border border-rule bg-surface px-2.5`,children:[(0,R.jsx)(r,{name:`search`,className:`size-3.5 text-muted`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Find a spec, Area or repository`}),(0,R.jsx)(`input`,{className:`w-56 border-0 bg-transparent text-sm text-text outline-none placeholder:text-muted`,placeholder:`Find a spec, Area or repository`,value:a,onChange:e=>o(e.target.value),"aria-controls":s,"aria-autocomplete":`list`,"data-graph-search":!0})]}),c.length>0?(0,R.jsx)(`ul`,{id:s,className:`absolute top-9 left-0 z-20 m-0 grid w-80 list-none gap-0.5 rounded-control border border-rule bg-surface p-1 shadow-float`,"aria-label":`Matches`,children:c.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,className:`flex w-full items-baseline gap-2 rounded-[4px] border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-page`,onClick:()=>{i(e.id),o(``)},children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e.label}),(0,R.jsx)(`span`,{className:`ml-auto text-2xs text-muted`,children:L(e)})]})},e.id))}):null]}),(0,R.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap items-center gap-3 border-0 p-0`,children:[(0,R.jsx)(`legend`,{className:`sr-only`,children:`Connections shown`}),h.map(e=>(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-xs text-muted`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:!t.hidden.has(e),onChange:()=>u(e),"data-graph-edge-kind":e}),ie[e]]},e))]}),l>1?(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-xs text-muted`,children:[`Changed together at least`,(0,R.jsx)(`input`,{type:`range`,min:1,max:l,value:t.minWeight,onChange:e=>n({...t,minWeight:Number(e.target.value)}),disabled:t.hidden.has(`co-change`),"data-graph-min-weight":!0}),(0,R.jsxs)(`span`,{className:`w-4 font-mono tabular-nums`,children:[t.minWeight,`×`]})]}):null]})}function Q({wire:e,onSelectNode:t}){if(e.unbound.length===0&&e.broken.length===0)return null;let n=[e.unbound.length>0?`${e.unbound.length} unbound ${e.unbound.length===1?`spec`:`specs`}`:null,e.broken.length>0?`${e.broken.length} broken ${e.broken.length===1?`link`:`links`}`:null].filter(Boolean);return(0,R.jsxs)(`details`,{className:`text-xs text-muted`,"data-graph-problems":!0,children:[(0,R.jsx)(`summary`,{className:`cursor-pointer text-warn`,children:n.join(` · `)}),(0,R.jsxs)(`div`,{className:`grid gap-2 pt-2`,children:[e.unbound.length>0?(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`m-0`,children:`They name no repository/Area pair, so they bind nothing:`}),(0,R.jsx)(`p`,{className:`m-0 flex flex-wrap gap-x-2 font-mono`,children:e.unbound.map(e=>(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-text hover:text-accent`,onClick:()=>t(_(e)),children:e},e))})]}):null,e.broken.length>0?(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0 font-mono`,"aria-label":`Broken links`,children:e.broken.map(e=>(0,R.jsxs)(`li`,{children:[e.from,` → `,(0,R.jsx)(`span`,{className:`text-bad`,children:e.target})]},`${e.from}>${e.target}`))}):null]})]})}function ce(){return(0,R.jsxs)(`ul`,{className:`pointer-events-none absolute top-2 left-2 m-0 flex list-none gap-3 rounded-control bg-[color-mix(in_srgb,var(--panel)_85%,transparent)] px-2 py-1 text-2xs text-muted`,"aria-label":`Legend`,children:[(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`,"aria-hidden":`true`}),` Spec`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2 rounded-full bg-info`,"aria-hidden":`true`}),` Area`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2.5 rounded-full bg-why`,"aria-hidden":`true`}),` Repository`]})]})}var le=o({component:()=>$}),$=function(){let e=b.useSearch(),t=b.useNavigate();return e.companion?(0,R.jsx)(ae,{search:{companion:e.companion,studioMode:e.studioMode},node:e.node,onNodeChange:e=>void t({search:t=>({...t,node:e}),replace:!1})}):null};export{O as a,E as c,$ as component,A as i,S as n,j as o,C as r,D as s,le as t};