@cursor/july 0.1.109 → 0.1.111

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 (1076) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +0 -15
  3. package/dist/bin/agent-serve.js +81 -66
  4. package/dist/channels/bitbucket/api.js +8 -8
  5. package/dist/channels/bitbucket/binding.js +4 -4
  6. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  7. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  8. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/checks.js +1 -1
  10. package/dist/channels/bitbucket/cursor-account.js +1 -1
  11. package/dist/channels/bitbucket/events.js +1 -1
  12. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  13. package/dist/channels/checks.d.ts.map +1 -1
  14. package/dist/channels/checks.js +2 -2
  15. package/dist/channels/deployments/deployments-channel.js +1 -1
  16. package/dist/channels/github/cursor-account.js +3 -3
  17. package/dist/channels/github/defaults.d.ts.map +1 -1
  18. package/dist/channels/github/defaults.js +5 -3
  19. package/dist/channels/github/events.js +1 -1
  20. package/dist/channels/github/forward.js +8 -8
  21. package/dist/channels/github/github-channel.d.ts.map +1 -1
  22. package/dist/channels/github/github-channel.js +17 -13
  23. package/dist/channels/github/progress.d.ts.map +1 -1
  24. package/dist/channels/github/progress.js +7 -2
  25. package/dist/channels/github/state.d.ts +6 -0
  26. package/dist/channels/github/state.d.ts.map +1 -1
  27. package/dist/channels/github/types.d.ts +6 -0
  28. package/dist/channels/github/types.d.ts.map +1 -1
  29. package/dist/channels/gitlab/binding.js +4 -4
  30. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  31. package/dist/channels/gitlab/checks.js +1 -1
  32. package/dist/channels/gitlab/cursor-account.js +1 -1
  33. package/dist/channels/gitlab/events.js +1 -1
  34. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  35. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  36. package/dist/channels/gitlab/replay.js +2 -2
  37. package/dist/channels/origin/binding.d.ts +2 -0
  38. package/dist/channels/origin/binding.d.ts.map +1 -1
  39. package/dist/channels/origin/binding.js +3 -3
  40. package/dist/channels/origin/checks.d.ts +19 -7
  41. package/dist/channels/origin/checks.d.ts.map +1 -1
  42. package/dist/channels/origin/checks.js +13 -9
  43. package/dist/channels/origin/cursor-account.js +1 -1
  44. package/dist/channels/origin/defaults.d.ts.map +1 -1
  45. package/dist/channels/origin/defaults.js +3 -1
  46. package/dist/channels/origin/events.js +1 -1
  47. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  48. package/dist/channels/origin/origin-channel.js +2 -1
  49. package/dist/channels/origin/origin-webhook.js +2 -2
  50. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  51. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  52. package/dist/channels/slack/agentic-delivery.js +558 -0
  53. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  54. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  55. package/dist/channels/slack/agentic-posted.js +102 -0
  56. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  57. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  58. package/dist/channels/slack/agentic-signals.js +204 -0
  59. package/dist/channels/slack/api.d.ts +20 -1
  60. package/dist/channels/slack/api.d.ts.map +1 -1
  61. package/dist/channels/slack/api.js +43 -11
  62. package/dist/channels/slack/approvals.js +1 -1
  63. package/dist/channels/slack/auth.d.ts.map +1 -1
  64. package/dist/channels/slack/auth.js +3 -1
  65. package/dist/channels/slack/blocks.js +3 -3
  66. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  67. package/dist/channels/slack/bot-mentions.js +5 -5
  68. package/dist/channels/slack/channel-watch.js +1 -1
  69. package/dist/channels/slack/cli-project.js +3 -3
  70. package/dist/channels/slack/defaults.d.ts +3 -0
  71. package/dist/channels/slack/defaults.d.ts.map +1 -1
  72. package/dist/channels/slack/defaults.js +90 -29
  73. package/dist/channels/slack/dispatch.d.ts +34 -1
  74. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  75. package/dist/channels/slack/dispatch.js +219 -106
  76. package/dist/channels/slack/doctor.js +1 -1
  77. package/dist/channels/slack/eval-directive.js +1 -1
  78. package/dist/channels/slack/external-policy.d.ts +2 -1
  79. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  80. package/dist/channels/slack/external-policy.js +13 -2
  81. package/dist/channels/slack/footer.d.ts +30 -0
  82. package/dist/channels/slack/footer.d.ts.map +1 -0
  83. package/dist/channels/slack/footer.js +88 -0
  84. package/dist/channels/slack/index.d.ts +2 -0
  85. package/dist/channels/slack/index.d.ts.map +1 -1
  86. package/dist/channels/slack/index.js +2 -0
  87. package/dist/channels/slack/interactive.d.ts.map +1 -1
  88. package/dist/channels/slack/interactive.js +5 -3
  89. package/dist/channels/slack/live-delivery.d.ts +1 -1
  90. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  91. package/dist/channels/slack/live-delivery.js +20 -6
  92. package/dist/channels/slack/log.d.ts.map +1 -1
  93. package/dist/channels/slack/log.js +1 -1
  94. package/dist/channels/slack/manifest.js +1 -1
  95. package/dist/channels/slack/nudge-carrier.js +1 -1
  96. package/dist/channels/slack/nudge-store.js +2 -2
  97. package/dist/channels/slack/paint-start.d.ts +22 -0
  98. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  99. package/dist/channels/slack/paint-start.js +91 -0
  100. package/dist/channels/slack/placeholder.d.ts +36 -0
  101. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  102. package/dist/channels/slack/placeholder.js +240 -0
  103. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  104. package/dist/channels/slack/progress-delivery.js +13 -4
  105. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  106. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  107. package/dist/channels/slack/reasoning-chip.js +30 -0
  108. package/dist/channels/slack/recording-sink.d.ts +29 -0
  109. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  110. package/dist/channels/slack/recording-sink.js +142 -0
  111. package/dist/channels/slack/reply-options.d.ts +8 -1
  112. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  113. package/dist/channels/slack/reply-options.js +59 -14
  114. package/dist/channels/slack/setup.js +1 -1
  115. package/dist/channels/slack/slack-channel.d.ts +2 -2
  116. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  117. package/dist/channels/slack/slack-channel.js +55 -20
  118. package/dist/channels/slack/socket-mode.js +2 -2
  119. package/dist/channels/slack/thread-context.js +5 -5
  120. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  121. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  122. package/dist/channels/slack/tool-approval-events.js +50 -38
  123. package/dist/channels/slack/tool-cards.js +1 -1
  124. package/dist/channels/slack/tool-chip.d.ts +9 -0
  125. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  126. package/dist/channels/slack/tool-chip.js +25 -0
  127. package/dist/channels/slack/types.d.ts +49 -7
  128. package/dist/channels/slack/types.d.ts.map +1 -1
  129. package/dist/channels/slack/upload.d.ts +13 -0
  130. package/dist/channels/slack/upload.d.ts.map +1 -0
  131. package/dist/channels/slack/upload.js +135 -0
  132. package/dist/channels.d.ts +10 -14
  133. package/dist/channels.d.ts.map +1 -1
  134. package/dist/channels.js +9 -21
  135. package/dist/dashboard-session-url.d.ts +15 -0
  136. package/dist/dashboard-session-url.d.ts.map +1 -0
  137. package/dist/dashboard-session-url.js +25 -0
  138. package/dist/docs/404.html +3 -3
  139. package/dist/docs/architecture.svg +59 -0
  140. package/dist/docs/assets/app.Drol6mi6.js +309 -0
  141. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.js → building-with-agents.md.CEGVXkmO.js} +2 -2
  142. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.lean.js → building-with-agents.md.CEGVXkmO.lean.js} +1 -1
  143. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +1 -0
  144. package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CdqoBZJX.js} +2 -2
  145. package/dist/docs/assets/chunks/arc.BVX3ycTn.js +1 -0
  146. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CcChnMxX.js +36 -0
  147. package/dist/docs/assets/chunks/baseUniq.xwtXO-yt.js +1 -0
  148. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.CijZ_taK.js +132 -0
  149. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.0FBvwBvK.js +10 -0
  150. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +1 -0
  151. package/dist/docs/assets/chunks/chunk-4BX2VUAB.CELMmMDA.js +1 -0
  152. package/dist/docs/assets/chunks/chunk-4TB4RGXK.C4bhFtSm.js +206 -0
  153. package/dist/docs/assets/chunks/chunk-55IACEB6.ZnQ9gRRQ.js +1 -0
  154. package/dist/docs/assets/chunks/chunk-EDXVE4YY.DPlmglG-.js +1 -0
  155. package/dist/docs/assets/chunks/chunk-FMBD7UC4.BrUk8pff.js +15 -0
  156. package/dist/docs/assets/chunks/chunk-OYMX7WX6.CcmWIncu.js +231 -0
  157. package/dist/docs/assets/chunks/chunk-QZHKN3VN.D65-cs8I.js +1 -0
  158. package/dist/docs/assets/chunks/chunk-YZCP3GAM.qoXZpG9F.js +1 -0
  159. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +1 -0
  160. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +1 -0
  161. package/dist/docs/assets/chunks/clone.YSt_40_s.js +1 -0
  162. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.8rYtqudO.js +1 -0
  163. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  164. package/dist/docs/assets/chunks/dagre-KV5264BT.DrRP1fOh.js +4 -0
  165. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  166. package/dist/docs/assets/chunks/diagram-5BDNPKRD.DHj_xA2_.js +10 -0
  167. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.Bz_6nAKj.js +24 -0
  168. package/dist/docs/assets/chunks/diagram-MMDJMWI5.BWA0xSW9.js +43 -0
  169. package/dist/docs/assets/chunks/diagram-TYMM5635.CpTJLNJI.js +24 -0
  170. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.-7AWWSrP.js +85 -0
  171. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BTnQ742_.js +162 -0
  172. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +19 -0
  173. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.B5_HiiQ5.js +292 -0
  174. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CZcNTFZd.js +106 -0
  175. package/dist/docs/assets/chunks/graph.V2GLaab4.js +1 -0
  176. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.7pZOkCCU.js +2 -0
  177. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  178. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js +70 -0
  179. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.BNEgWN1S.js +139 -0
  180. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.B-4d4tC7.js +89 -0
  181. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  182. package/dist/docs/assets/chunks/layout.Dvbn9nSb.js +1 -0
  183. package/dist/docs/assets/chunks/linear.D2GM4p4b.js +1 -0
  184. package/dist/docs/assets/chunks/min.DVBtLK-B.js +1 -0
  185. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.CnJRI55x.js +96 -0
  186. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  187. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CtoaTFlA.js +30 -0
  188. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.DtT24_vN.js +7 -0
  189. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.CjSO4o8f.js +84 -0
  190. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.-wWiIVWa.js +10 -0
  191. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.DSk8s4gX.js +157 -0
  192. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.BFKAsdkN.js +1 -0
  193. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +1 -0
  194. package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.C0MctGaz.js} +2 -2
  195. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.TUNJbAFe.js +120 -0
  196. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.C-RGNnk4.js +34 -0
  197. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  198. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +162 -0
  199. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DH4zt73Y.js +20 -0
  200. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.B-3k6bF6.js +7 -0
  201. package/dist/docs/assets/{deployment.md.JenwuCCB.js → deployment.md.Dm4Qo3hp.js} +5 -5
  202. package/dist/docs/assets/{deployment.md.JenwuCCB.lean.js → deployment.md.Dm4Qo3hp.lean.js} +1 -1
  203. package/dist/docs/assets/{evals.md.C7JLjoEP.js → evals.md.BLDRt5LH.js} +4 -4
  204. package/dist/docs/assets/{evals.md.C7JLjoEP.lean.js → evals.md.BLDRt5LH.lean.js} +1 -1
  205. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +14 -0
  206. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +1 -0
  207. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.js → guides_bitbucket.md.CTpCl__f.js} +1 -1
  208. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.lean.js → guides_bitbucket.md.CTpCl__f.lean.js} +1 -1
  209. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.js → guides_cloud-agents.md.lSE_l7lH.js} +2 -2
  210. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.lean.js → guides_cloud-agents.md.lSE_l7lH.lean.js} +1 -1
  211. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.js → guides_convert-automation.md.Ck6Cr68A.js} +1 -1
  212. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.lean.js → guides_convert-automation.md.Ck6Cr68A.lean.js} +1 -1
  213. package/dist/docs/assets/{guides_github.md.TZaTZlfz.js → guides_github.md.D6ER29dG.js} +1 -1
  214. package/dist/docs/assets/{guides_github.md.TZaTZlfz.lean.js → guides_github.md.D6ER29dG.lean.js} +1 -1
  215. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.js → guides_gitlab.md.P-TjBnS5.js} +1 -1
  216. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.lean.js → guides_gitlab.md.P-TjBnS5.lean.js} +1 -1
  217. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +9 -0
  218. package/dist/docs/assets/{guides_grokbot-agents.md.DyV-WArv.lean.js → guides_grokbot-agents.md.WBZIOvkz.lean.js} +1 -1
  219. package/dist/docs/assets/{guides_improve.md.BGVk32bK.js → guides_improve.md.BKaDuKKK.js} +1 -1
  220. package/dist/docs/assets/{guides_improve.md.BGVk32bK.lean.js → guides_improve.md.BKaDuKKK.lean.js} +1 -1
  221. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.js → guides_mcp-oauth.md.DMNMpXtO.js} +1 -1
  222. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.lean.js → guides_mcp-oauth.md.DMNMpXtO.lean.js} +1 -1
  223. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.js → guides_opentelemetry.md._CRfDyzH.js} +14 -14
  224. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.lean.js → guides_opentelemetry.md._CRfDyzH.lean.js} +1 -1
  225. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.js → guides_slack.md.DdT8rmsj.js} +12 -4
  226. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.lean.js → guides_slack.md.DdT8rmsj.lean.js} +1 -1
  227. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.js → guides_webhooks.md.aQW10HRe.js} +2 -2
  228. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.lean.js → guides_webhooks.md.aQW10HRe.lean.js} +1 -1
  229. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +1 -0
  230. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +1 -0
  231. package/dist/docs/assets/index.md.BFVyY2KT.js +17 -0
  232. package/dist/docs/assets/index.md.BFVyY2KT.lean.js +1 -0
  233. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.D3MjSZN-.js} +30 -38
  234. package/dist/docs/assets/quickstart.md.D3MjSZN-.lean.js +1 -0
  235. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.CfVA-LZJ.js} +1 -1
  236. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.CfVA-LZJ.lean.js} +1 -1
  237. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Vf7qyIZ-.js} +1 -1
  238. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Vf7qyIZ-.lean.js} +1 -1
  239. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.icqLKcTc.js} +2 -12
  240. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.icqLKcTc.lean.js} +1 -1
  241. package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.B2dBL6L8.js} +3 -3
  242. package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.B2dBL6L8.lean.js} +1 -1
  243. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.Cb3U_c8n.js} +4 -4
  244. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.Cb3U_c8n.lean.js} +1 -1
  245. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.js → reference_extensions.md.wlFD3cUR.js} +2 -2
  246. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.lean.js → reference_extensions.md.wlFD3cUR.lean.js} +1 -1
  247. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.CZuynAxj.js} +3 -3
  248. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.CZuynAxj.lean.js} +1 -1
  249. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.DTKcYE6L.js} +3 -3
  250. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.DTKcYE6L.lean.js} +1 -1
  251. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.D7gkckK-.js} +1 -1
  252. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.D7gkckK-.lean.js} +1 -1
  253. package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.D2YExv5K.js} +1 -1
  254. package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.D2YExv5K.lean.js} +1 -1
  255. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.DPxbUJyt.js} +3 -3
  256. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.DPxbUJyt.lean.js} +1 -1
  257. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.BQ5uAv1F.js} +1 -1
  258. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.BQ5uAv1F.lean.js} +1 -1
  259. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.BasfZWO-.js} +1 -1
  260. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.BasfZWO-.lean.js} +1 -1
  261. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.YKvIsWAx.js} +1 -1
  262. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.YKvIsWAx.lean.js} +1 -1
  263. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.rNgpsGd0.js} +1 -1
  264. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.rNgpsGd0.lean.js} +1 -1
  265. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.e5qitjJt.js} +2 -2
  266. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.e5qitjJt.lean.js} +1 -1
  267. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BdCO2aHZ.js} +4 -4
  268. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BdCO2aHZ.lean.js} +1 -1
  269. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  270. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.Da_AGDlH.js} +1 -1
  271. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.Da_AGDlH.lean.js} +1 -1
  272. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.DqxocIGh.js} +1 -1
  273. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.DqxocIGh.lean.js} +1 -1
  274. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.Bhnvd8VE.js} +1 -1
  275. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.Bhnvd8VE.lean.js} +1 -1
  276. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.BdBWO9Ic.js} +1 -1
  277. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.BdBWO9Ic.lean.js} +1 -1
  278. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.js → troubleshooting.md.BcgNoYtJ.js} +1 -1
  279. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.lean.js → troubleshooting.md.BcgNoYtJ.lean.js} +1 -1
  280. package/dist/docs/building-with-agents.html +41 -8
  281. package/dist/docs/building-with-agents.md +13 -15
  282. package/dist/docs/deployment.html +44 -11
  283. package/dist/docs/deployment.md +6 -7
  284. package/dist/docs/evals.html +44 -11
  285. package/dist/docs/evals.md +5 -5
  286. package/dist/docs/guides/agent-to-agent.html +48 -11
  287. package/dist/docs/guides/agent-to-agent.md +40 -83
  288. package/dist/docs/guides/bitbucket.html +41 -8
  289. package/dist/docs/guides/cloud-agents.html +41 -8
  290. package/dist/docs/guides/cloud-agents.md +24 -20
  291. package/dist/docs/guides/convert-automation.html +41 -8
  292. package/dist/docs/guides/github.html +41 -8
  293. package/dist/docs/guides/github.md +1 -1
  294. package/dist/docs/guides/gitlab.html +41 -8
  295. package/dist/docs/guides/grokbot-agents.html +41 -8
  296. package/dist/docs/guides/grokbot-agents.md +26 -19
  297. package/dist/docs/guides/improve.html +41 -8
  298. package/dist/docs/guides/mcp-oauth.html +41 -8
  299. package/dist/docs/guides/mcp-oauth.md +1 -1
  300. package/dist/docs/guides/opentelemetry.html +53 -20
  301. package/dist/docs/guides/opentelemetry.md +28 -41
  302. package/dist/docs/guides/slack.html +51 -10
  303. package/dist/docs/guides/slack.md +53 -4
  304. package/dist/docs/guides/webhooks.html +42 -9
  305. package/dist/docs/guides/webhooks.md +3 -4
  306. package/dist/docs/hashmap.json +1 -1
  307. package/dist/docs/hillclimbing.html +40 -10
  308. package/dist/docs/hillclimbing.md +5 -5
  309. package/dist/docs/index.html +57 -12
  310. package/dist/docs/index.md +81 -150
  311. package/dist/docs/llms-full.txt +5779 -10297
  312. package/dist/docs/llms.txt +3 -29
  313. package/dist/docs/quickstart.html +70 -45
  314. package/dist/docs/quickstart.md +44 -105
  315. package/dist/docs/reference/agent-config.html +41 -8
  316. package/dist/docs/reference/artifacts.html +41 -8
  317. package/dist/docs/reference/channels.html +41 -18
  318. package/dist/docs/reference/channels.md +0 -16
  319. package/dist/docs/reference/cli.html +42 -9
  320. package/dist/docs/reference/cli.md +0 -16
  321. package/dist/docs/reference/connections.html +43 -10
  322. package/dist/docs/reference/connections.md +3 -5
  323. package/dist/docs/reference/extensions.html +42 -9
  324. package/dist/docs/reference/extensions.md +2 -2
  325. package/dist/docs/reference/hooks.html +42 -9
  326. package/dist/docs/reference/hooks.md +2 -4
  327. package/dist/docs/reference/http-api.html +42 -9
  328. package/dist/docs/reference/http-api.md +5 -5
  329. package/dist/docs/reference/instructions.html +41 -8
  330. package/dist/docs/reference/playground.html +40 -7
  331. package/dist/docs/reference/playground.md +2 -2
  332. package/dist/docs/reference/project-layout.html +42 -9
  333. package/dist/docs/reference/project-layout.md +3 -4
  334. package/dist/docs/reference/prompt.html +41 -8
  335. package/dist/docs/reference/schedules.html +41 -8
  336. package/dist/docs/reference/sessions.html +40 -7
  337. package/dist/docs/reference/sessions.md +5 -4
  338. package/dist/docs/reference/skills.html +41 -8
  339. package/dist/docs/reference/subagents.html +41 -8
  340. package/dist/docs/reference/subagents.md +2 -4
  341. package/dist/docs/reference/tools.html +43 -10
  342. package/dist/docs/reference/tools.md +2 -5
  343. package/dist/docs/templates/agentic-owners.html +41 -8
  344. package/dist/docs/templates/pr-autofixer.html +41 -8
  345. package/dist/docs/templates/security-reviewer.html +41 -8
  346. package/dist/docs/templates/triage.html +41 -8
  347. package/dist/docs/troubleshooting.html +40 -7
  348. package/dist/docs/troubleshooting.md +1 -2
  349. package/dist/evals/assertions.js +19 -19
  350. package/dist/evals/expect.js +1 -1
  351. package/dist/evals/judge.js +1 -1
  352. package/dist/evals/reporters.d.ts.map +1 -1
  353. package/dist/evals/reporters.js +8 -8
  354. package/dist/evals/run-facts.js +2 -2
  355. package/dist/evals.d.ts +1 -1
  356. package/dist/evals.d.ts.map +1 -1
  357. package/dist/evals.js +7 -7
  358. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  359. package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
  360. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  361. package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
  362. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  363. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  364. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  365. package/dist/extensions/improve/skills/yourself.js +1 -1
  366. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  367. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  368. package/dist/extensions/slack-communication/extension.js +32 -0
  369. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  370. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  371. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  372. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  373. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  374. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  375. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  376. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  377. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  378. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  379. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  380. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  381. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  382. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  383. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  384. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  385. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  386. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  387. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  388. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  389. package/dist/extensions/slack-communication/tools/react.js +27 -0
  390. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  391. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  392. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  393. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  394. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  395. package/dist/files-backends/cursor-hosted.js +357 -74
  396. package/dist/files-backends/local-fs.js +1 -1
  397. package/dist/files.d.ts +15 -0
  398. package/dist/files.d.ts.map +1 -1
  399. package/dist/filesystem.d.ts.map +1 -1
  400. package/dist/filesystem.js +15 -15
  401. package/dist/index.d.ts +5 -8
  402. package/dist/index.d.ts.map +1 -1
  403. package/dist/index.js +4 -6
  404. package/dist/internal/advertise-tools.js +6 -6
  405. package/dist/internal/approval-gate.js +1 -1
  406. package/dist/internal/artifacts-store.js +3 -3
  407. package/dist/internal/as-of.js +2 -2
  408. package/dist/internal/authored-alias-hooks.js +1 -1
  409. package/dist/internal/builtin-tools/reminders.js +2 -2
  410. package/dist/internal/chat-client.js +5 -5
  411. package/dist/internal/cli-ax.d.ts +1 -0
  412. package/dist/internal/cli-ax.d.ts.map +1 -1
  413. package/dist/internal/cli-ax.js +68 -13
  414. package/dist/internal/cli-bitbucket.js +10 -10
  415. package/dist/internal/cli-convert-automation.js +2 -2
  416. package/dist/internal/cli-cursor.d.ts +3 -11
  417. package/dist/internal/cli-cursor.d.ts.map +1 -1
  418. package/dist/internal/cli-cursor.js +5 -10
  419. package/dist/internal/cli-deploy.d.ts +12 -2
  420. package/dist/internal/cli-deploy.d.ts.map +1 -1
  421. package/dist/internal/cli-deploy.js +328 -96
  422. package/dist/internal/cli-docs.js +5 -5
  423. package/dist/internal/cli-github.js +15 -16
  424. package/dist/internal/cli-gitlab.js +10 -10
  425. package/dist/internal/cli-manifest.js +1 -1
  426. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  427. package/dist/internal/cli-mcp-oauth.js +5 -5
  428. package/dist/internal/cli-mcp.js +3 -3
  429. package/dist/internal/cli-skills.js +2 -2
  430. package/dist/internal/cli-slack.js +5 -5
  431. package/dist/internal/cloud-turn-cost.js +1 -1
  432. package/dist/internal/continuation-identity.d.ts.map +1 -1
  433. package/dist/internal/continuation-identity.js +14 -9
  434. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  435. package/dist/internal/conversation-mirror.js +33 -2
  436. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  437. package/dist/internal/convert-automation/types.d.ts +8 -0
  438. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  439. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  440. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  441. package/dist/internal/cursor/account-mcp.js +32 -27
  442. package/dist/internal/cursor/backend-client.d.ts +15 -10
  443. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  444. package/dist/internal/cursor/backend-client.js +17 -11
  445. package/dist/internal/cursor/credentials.js +1 -1
  446. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  447. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  448. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  449. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  450. package/dist/internal/cursor-deployment-relay.js +9 -9
  451. package/dist/internal/cursor-event-relay.js +10 -10
  452. package/dist/internal/cursor-relay-core.js +2 -2
  453. package/dist/internal/deploy-client.d.ts +106 -9
  454. package/dist/internal/deploy-client.d.ts.map +1 -1
  455. package/dist/internal/deploy-client.js +171 -23
  456. package/dist/internal/deploy-manifest.d.ts +13 -0
  457. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  458. package/dist/internal/deploy-manifest.js +32 -16
  459. package/dist/internal/discovery/agent-config.d.ts +5 -0
  460. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  461. package/dist/internal/discovery/agent-config.js +27 -0
  462. package/dist/internal/discovery/agent.d.ts.map +1 -1
  463. package/dist/internal/discovery/agent.js +10 -8
  464. package/dist/internal/discovery/channels.js +4 -4
  465. package/dist/internal/discovery/connections.js +4 -4
  466. package/dist/internal/discovery/cursor-plugin.js +12 -12
  467. package/dist/internal/discovery/extension-overlay.js +3 -3
  468. package/dist/internal/discovery/extensions.js +6 -6
  469. package/dist/internal/discovery/info.js +9 -9
  470. package/dist/internal/discovery/instructions.js +1 -1
  471. package/dist/internal/discovery/project.d.ts.map +1 -1
  472. package/dist/internal/discovery/project.js +4 -4
  473. package/dist/internal/discovery/services.js +1 -1
  474. package/dist/internal/discovery/tools.js +1 -1
  475. package/dist/internal/docs-site.js +2 -2
  476. package/dist/internal/env-file.js +1 -1
  477. package/dist/internal/eval-run-store.d.ts.map +1 -1
  478. package/dist/internal/eval-run-store.js +7 -7
  479. package/dist/internal/eval-runner.js +14 -14
  480. package/dist/internal/evals-client.js +4 -4
  481. package/dist/internal/event-log.js +8 -8
  482. package/dist/internal/event-mapper.d.ts +18 -0
  483. package/dist/internal/event-mapper.d.ts.map +1 -1
  484. package/dist/internal/event-mapper.js +34 -2
  485. package/dist/internal/filesystem/format.d.ts.map +1 -1
  486. package/dist/internal/filesystem/format.js +6 -3
  487. package/dist/internal/filesystem/scratch.js +3 -3
  488. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  489. package/dist/internal/filesystem/tools.js +6 -6
  490. package/dist/internal/filesystem/walk.js +1 -1
  491. package/dist/internal/framework-file-storage.d.ts +6 -2
  492. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  493. package/dist/internal/framework-file-storage.js +91 -2
  494. package/dist/internal/framework-storage-selection.d.ts +0 -6
  495. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  496. package/dist/internal/framework-storage-selection.js +2 -11
  497. package/dist/internal/github-fanout.js +3 -3
  498. package/dist/internal/guest-network.js +4 -4
  499. package/dist/internal/host-files.js +1 -1
  500. package/dist/internal/host-kv.js +2 -2
  501. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  502. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  503. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  504. package/dist/internal/hosted-catch-protocol.js +2 -4
  505. package/dist/internal/hosted-catch.js +1 -1
  506. package/dist/internal/hosted-delivery-protocol.d.ts +29 -0
  507. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  508. package/dist/internal/hosted-delivery-protocol.js +76 -8
  509. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  510. package/dist/internal/hosted-delivery.js +201 -64
  511. package/dist/internal/hosted-execution-diag.js +3 -3
  512. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  513. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  514. package/dist/internal/hosted-execution-latency.js +220 -0
  515. package/dist/internal/hosting.d.ts +5 -5
  516. package/dist/internal/hosting.d.ts.map +1 -1
  517. package/dist/internal/hosting.js +5 -6
  518. package/dist/internal/http-channel-define.d.ts +11 -0
  519. package/dist/internal/http-channel-define.d.ts.map +1 -0
  520. package/dist/internal/http-channel-define.js +18 -0
  521. package/dist/internal/http-channel.d.ts +2 -3
  522. package/dist/internal/http-channel.d.ts.map +1 -1
  523. package/dist/internal/http-channel.js +3 -4
  524. package/dist/internal/http-control-plane-session.d.ts +7 -3
  525. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  526. package/dist/internal/http-control-plane-session.js +22 -10
  527. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  528. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  529. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  530. package/dist/internal/init-interview.js +7 -7
  531. package/dist/internal/init-project.d.ts.map +1 -1
  532. package/dist/internal/init-project.js +14 -14
  533. package/dist/internal/init-scaffold.js +1 -1
  534. package/dist/internal/inline-stdio-mcp.js +2 -2
  535. package/dist/internal/install-cursor-skills.js +10 -10
  536. package/dist/internal/json-schema.js +1 -1
  537. package/dist/internal/local-control-plane.d.ts.map +1 -1
  538. package/dist/internal/local-control-plane.js +3 -3
  539. package/dist/internal/local-env.js +3 -3
  540. package/dist/internal/log-ring.js +1 -1
  541. package/dist/internal/logs-client.js +1 -1
  542. package/dist/internal/mcp-endpoint.js +8 -8
  543. package/dist/internal/mcp-host.js +4 -4
  544. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  545. package/dist/internal/mcp-oauth.js +5 -5
  546. package/dist/internal/net.js +2 -2
  547. package/dist/internal/otel/config.js +3 -3
  548. package/dist/internal/otel/runtime.js +13 -13
  549. package/dist/internal/peer-connections.js +2 -2
  550. package/dist/internal/platform-schedule-sync.js +1 -1
  551. package/dist/internal/platform-timers.js +1 -1
  552. package/dist/internal/playground/static.js +2 -2
  553. package/dist/internal/playground/toolchain.js +2 -2
  554. package/dist/internal/playground-proxy.js +3 -3
  555. package/dist/internal/process-memory-telemetry.js +1 -1
  556. package/dist/internal/reminder-runner.d.ts.map +1 -1
  557. package/dist/internal/reminder-runner.js +7 -7
  558. package/dist/internal/reminder-store.js +1 -1
  559. package/dist/internal/request-error-status.d.ts.map +1 -1
  560. package/dist/internal/request-error-status.js +9 -0
  561. package/dist/internal/resolved-connections.js +8 -8
  562. package/dist/internal/result-output.d.ts +14 -2
  563. package/dist/internal/result-output.d.ts.map +1 -1
  564. package/dist/internal/result-output.js +45 -2
  565. package/dist/internal/router.js +4 -4
  566. package/dist/internal/run-client.js +2 -2
  567. package/dist/internal/schedule-runner.js +6 -6
  568. package/dist/internal/scm/pr-url.d.ts +3 -1
  569. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  570. package/dist/internal/scm/pr-url.js +10 -2
  571. package/dist/internal/sdk-runner.d.ts.map +1 -1
  572. package/dist/internal/sdk-runner.js +14 -15
  573. package/dist/internal/serve-restart.js +1 -1
  574. package/dist/internal/server.d.ts.map +1 -1
  575. package/dist/internal/server.js +81 -87
  576. package/dist/internal/session-cost.js +3 -3
  577. package/dist/internal/session-engine.d.ts +34 -0
  578. package/dist/internal/session-engine.d.ts.map +1 -1
  579. package/dist/internal/session-engine.js +380 -184
  580. package/dist/internal/session-run-log.d.ts.map +1 -1
  581. package/dist/internal/session-run-log.js +4 -4
  582. package/dist/internal/session-store.d.ts +47 -3
  583. package/dist/internal/session-store.d.ts.map +1 -1
  584. package/dist/internal/session-store.js +198 -33
  585. package/dist/internal/sessions-client.js +3 -3
  586. package/dist/internal/slack-thread-key.d.ts +7 -0
  587. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  588. package/dist/internal/slack-thread-key.js +10 -0
  589. package/dist/internal/sleep.js +1 -1
  590. package/dist/internal/storage-coordinator.d.ts +17 -0
  591. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  592. package/dist/internal/storage-coordinator.js +111 -11
  593. package/dist/internal/storage.d.ts +2 -0
  594. package/dist/internal/storage.d.ts.map +1 -0
  595. package/dist/internal/storage.js +1 -0
  596. package/dist/internal/store-mirror.js +4 -4
  597. package/dist/internal/terminal-style.js +2 -2
  598. package/dist/internal/tool-result.js +3 -3
  599. package/dist/internal/trajectory.js +7 -7
  600. package/dist/internal/turn-governor.js +2 -2
  601. package/dist/internal/turn-outbox.js +1 -1
  602. package/dist/internal/update-check.js +2 -2
  603. package/dist/internal/v2-hosting.d.ts +9 -0
  604. package/dist/internal/v2-hosting.d.ts.map +1 -1
  605. package/dist/internal/v2-hosting.js +10 -0
  606. package/dist/internal/workspace.d.ts +13 -10
  607. package/dist/internal/workspace.d.ts.map +1 -1
  608. package/dist/internal/workspace.js +17 -16
  609. package/dist/kv/memory-kv.d.ts +6 -4
  610. package/dist/kv/memory-kv.d.ts.map +1 -1
  611. package/dist/kv/memory-kv.js +9 -7
  612. package/dist/kv.d.ts +4 -7
  613. package/dist/kv.d.ts.map +1 -1
  614. package/dist/kv.js +4 -7
  615. package/dist/otel-public.d.ts +7 -0
  616. package/dist/otel-public.d.ts.map +1 -0
  617. package/dist/otel-public.js +5 -0
  618. package/dist/otel.d.ts +7 -2
  619. package/dist/otel.d.ts.map +1 -1
  620. package/dist/otel.js +7 -2
  621. package/dist/playground/assets/index-BLlKgZtI.css +1 -0
  622. package/dist/playground/assets/index-CDS5p9sR.js +67 -0
  623. package/dist/playground/index.html +2 -2
  624. package/dist/prompt.js +1 -1
  625. package/dist/result.d.ts +10 -4
  626. package/dist/result.d.ts.map +1 -1
  627. package/dist/result.js +9 -3
  628. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  629. package/dist/storage-backends/cursor-hosted.d.ts +5 -17
  630. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  631. package/dist/storage-backends/cursor-hosted.js +6 -20
  632. package/dist/storage-backends/file-kv.js +7 -7
  633. package/dist/storage.d.ts +20 -2
  634. package/dist/storage.d.ts.map +1 -1
  635. package/dist/storage.js +7 -6
  636. package/dist/types.d.ts +67 -11
  637. package/dist/types.d.ts.map +1 -1
  638. package/dist/types.js +12 -4
  639. package/docs/README.md +83 -152
  640. package/docs/building-with-agents.md +13 -15
  641. package/docs/deployment.md +6 -7
  642. package/docs/evals.md +5 -5
  643. package/docs/guides/agent-to-agent.md +41 -84
  644. package/docs/guides/cloud-agents.md +25 -20
  645. package/docs/guides/github.md +1 -1
  646. package/docs/guides/grokbot-agents.md +27 -19
  647. package/docs/guides/mcp-oauth.md +1 -1
  648. package/docs/guides/opentelemetry.md +28 -41
  649. package/docs/guides/slack.md +53 -4
  650. package/docs/guides/webhooks.md +3 -4
  651. package/docs/hillclimbing.md +5 -5
  652. package/docs/quickstart.md +45 -106
  653. package/docs/reference/channels.md +0 -16
  654. package/docs/reference/cli.md +0 -16
  655. package/docs/reference/connections.md +3 -5
  656. package/docs/reference/extensions.md +2 -2
  657. package/docs/reference/hooks.md +2 -4
  658. package/docs/reference/http-api.md +5 -5
  659. package/docs/reference/playground.md +2 -2
  660. package/docs/reference/project-layout.md +3 -4
  661. package/docs/reference/sessions.md +5 -4
  662. package/docs/reference/subagents.md +2 -4
  663. package/docs/reference/tools.md +2 -5
  664. package/docs/troubleshooting.md +1 -2
  665. package/package.json +55 -37
  666. package/skills/framework-map/SKILL.md +2 -2
  667. package/skills/otel/SKILL.md +8 -18
  668. package/src/bin/agent-serve.ts +93 -72
  669. package/src/channels/bitbucket/api.ts +8 -8
  670. package/src/channels/bitbucket/binding.ts +4 -4
  671. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  672. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  673. package/src/channels/bitbucket/checks.ts +3 -4
  674. package/src/channels/bitbucket/cursor-account.ts +1 -1
  675. package/src/channels/bitbucket/events.ts +1 -1
  676. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  677. package/src/channels/checks.ts +5 -4
  678. package/src/channels/deployments/deployments-channel.ts +1 -1
  679. package/src/channels/github/api.ts +1 -1
  680. package/src/channels/github/checks.ts +1 -1
  681. package/src/channels/github/cursor-account.ts +3 -3
  682. package/src/channels/github/defaults.ts +8 -4
  683. package/src/channels/github/events.ts +1 -1
  684. package/src/channels/github/forward.ts +8 -8
  685. package/src/channels/github/github-channel.ts +19 -2
  686. package/src/channels/github/progress.ts +7 -2
  687. package/src/channels/github/state.ts +6 -0
  688. package/src/channels/github/types.ts +6 -0
  689. package/src/channels/gitlab/binding.ts +4 -4
  690. package/src/channels/gitlab/checks.ts +3 -4
  691. package/src/channels/gitlab/cursor-account.ts +1 -1
  692. package/src/channels/gitlab/events.ts +1 -1
  693. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  694. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  695. package/src/channels/gitlab/replay.ts +2 -2
  696. package/src/channels/origin/binding.ts +6 -3
  697. package/src/channels/origin/checks.ts +27 -17
  698. package/src/channels/origin/cursor-account.ts +1 -1
  699. package/src/channels/origin/defaults.ts +5 -1
  700. package/src/channels/origin/events.ts +1 -1
  701. package/src/channels/origin/origin-channel.ts +2 -1
  702. package/src/channels/origin/origin-webhook.ts +2 -2
  703. package/src/channels/slack/agentic-delivery.ts +659 -0
  704. package/src/channels/slack/agentic-posted.ts +148 -0
  705. package/src/channels/slack/agentic-signals.ts +248 -0
  706. package/src/channels/slack/api.ts +51 -11
  707. package/src/channels/slack/approvals.ts +1 -1
  708. package/src/channels/slack/attachments.ts +1 -1
  709. package/src/channels/slack/auth.ts +3 -1
  710. package/src/channels/slack/blocks.ts +3 -3
  711. package/src/channels/slack/bot-mentions.ts +5 -7
  712. package/src/channels/slack/channel-watch.ts +1 -1
  713. package/src/channels/slack/cli-project.ts +3 -3
  714. package/src/channels/slack/defaults.ts +109 -37
  715. package/src/channels/slack/dispatch.ts +299 -170
  716. package/src/channels/slack/doctor.ts +1 -1
  717. package/src/channels/slack/eval-directive.ts +1 -1
  718. package/src/channels/slack/external-policy.ts +15 -2
  719. package/src/channels/slack/footer.ts +108 -0
  720. package/src/channels/slack/index.ts +2 -0
  721. package/src/channels/slack/interactive.ts +4 -2
  722. package/src/channels/slack/live-delivery.ts +23 -7
  723. package/src/channels/slack/log.ts +1 -1
  724. package/src/channels/slack/manifest.ts +1 -1
  725. package/src/channels/slack/nudge-carrier.ts +1 -1
  726. package/src/channels/slack/nudge-store.ts +2 -2
  727. package/src/channels/slack/paint-start.ts +93 -0
  728. package/src/channels/slack/placeholder.ts +315 -0
  729. package/src/channels/slack/progress-delivery.ts +14 -1
  730. package/src/channels/slack/reasoning-chip.ts +48 -0
  731. package/src/channels/slack/recording-sink.ts +176 -0
  732. package/src/channels/slack/reply-options.ts +71 -15
  733. package/src/channels/slack/setup.ts +1 -1
  734. package/src/channels/slack/slack-channel.ts +73 -13
  735. package/src/channels/slack/socket-mode.ts +2 -2
  736. package/src/channels/slack/thread-context.ts +5 -5
  737. package/src/channels/slack/tool-approval-events.ts +54 -38
  738. package/src/channels/slack/tool-cards.ts +1 -1
  739. package/src/channels/slack/tool-chip.ts +36 -0
  740. package/src/channels/slack/types.ts +47 -7
  741. package/src/channels/slack/upload.ts +142 -0
  742. package/src/channels.ts +12 -30
  743. package/src/dashboard-session-url.ts +32 -0
  744. package/src/evals/assertions.ts +19 -19
  745. package/src/evals/expect.ts +1 -1
  746. package/src/evals/judge.ts +1 -1
  747. package/src/evals/reporters.ts +8 -9
  748. package/src/evals/run-facts.ts +2 -2
  749. package/src/evals.ts +7 -10
  750. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  751. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  752. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  753. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  754. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  755. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  756. package/src/extensions/improve/skills/yourself.ts +1 -1
  757. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  758. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  759. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  760. package/src/extensions/slack-communication/extension.ts +45 -0
  761. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  762. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  763. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  764. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  765. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  766. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  767. package/src/extensions/slack-communication/tools/react.ts +33 -0
  768. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  769. package/src/files-backends/cursor-hosted.ts +502 -98
  770. package/src/files-backends/local-fs.ts +1 -1
  771. package/src/files.ts +15 -0
  772. package/src/filesystem.ts +16 -18
  773. package/src/index.ts +4 -36
  774. package/src/internal/advertise-tools.ts +6 -6
  775. package/src/internal/approval-gate.ts +1 -1
  776. package/src/internal/artifacts-store.ts +3 -3
  777. package/src/internal/as-of.ts +2 -2
  778. package/src/internal/authored-alias-hooks.ts +1 -1
  779. package/src/internal/authored-loaders.ts +2 -3
  780. package/src/internal/builtin-tools/reminders.ts +2 -2
  781. package/src/internal/chat-client.ts +5 -5
  782. package/src/internal/cli-ax.ts +84 -14
  783. package/src/internal/cli-bitbucket.ts +11 -11
  784. package/src/internal/cli-convert-automation.ts +2 -2
  785. package/src/internal/cli-cursor.ts +5 -16
  786. package/src/internal/cli-deploy.ts +389 -104
  787. package/src/internal/cli-docs.ts +5 -5
  788. package/src/internal/cli-github.ts +16 -19
  789. package/src/internal/cli-gitlab.ts +11 -11
  790. package/src/internal/cli-manifest.ts +1 -1
  791. package/src/internal/cli-mcp-oauth.ts +5 -7
  792. package/src/internal/cli-mcp.ts +3 -3
  793. package/src/internal/cli-skills.ts +2 -2
  794. package/src/internal/cli-slack.ts +5 -5
  795. package/src/internal/cloud-turn-cost.ts +1 -1
  796. package/src/internal/continuation-identity.ts +13 -9
  797. package/src/internal/conversation-mirror.ts +36 -3
  798. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  799. package/src/internal/convert-automation/types.ts +9 -0
  800. package/src/internal/cursor/account-mcp.ts +48 -31
  801. package/src/internal/cursor/backend-client.ts +28 -17
  802. package/src/internal/cursor/credentials.ts +1 -1
  803. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  804. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  805. package/src/internal/cursor-deployment-relay.ts +10 -10
  806. package/src/internal/cursor-event-relay.ts +10 -10
  807. package/src/internal/cursor-relay-core.ts +2 -2
  808. package/src/internal/deploy-client.ts +266 -24
  809. package/src/internal/deploy-manifest.ts +46 -8
  810. package/src/internal/discovery/agent-config.ts +34 -0
  811. package/src/internal/discovery/agent.ts +14 -6
  812. package/src/internal/discovery/channels.ts +4 -4
  813. package/src/internal/discovery/connections.ts +4 -4
  814. package/src/internal/discovery/cursor-plugin.ts +12 -12
  815. package/src/internal/discovery/extension-overlay.ts +3 -3
  816. package/src/internal/discovery/extensions.ts +6 -6
  817. package/src/internal/discovery/info.ts +9 -9
  818. package/src/internal/discovery/instructions.ts +1 -1
  819. package/src/internal/discovery/project.ts +4 -4
  820. package/src/internal/discovery/services.ts +1 -1
  821. package/src/internal/discovery/tools.ts +1 -1
  822. package/src/internal/docs-site.ts +2 -2
  823. package/src/internal/env-file.ts +2 -2
  824. package/src/internal/eval-run-store.ts +7 -9
  825. package/src/internal/eval-runner.ts +20 -20
  826. package/src/internal/evals-client.ts +6 -6
  827. package/src/internal/event-log.ts +10 -10
  828. package/src/internal/event-mapper.ts +37 -2
  829. package/src/internal/filesystem/format.ts +11 -12
  830. package/src/internal/filesystem/scratch.ts +3 -3
  831. package/src/internal/filesystem/tools.ts +6 -8
  832. package/src/internal/filesystem/walk.ts +1 -1
  833. package/src/internal/framework-file-storage.ts +104 -4
  834. package/src/internal/framework-storage-selection.ts +2 -12
  835. package/src/internal/github-fanout.ts +4 -4
  836. package/src/internal/guest-network.ts +4 -4
  837. package/src/internal/host-files.ts +1 -1
  838. package/src/internal/host-kv.ts +2 -2
  839. package/src/internal/hosted-admission-adapter.ts +2 -0
  840. package/src/internal/hosted-catch-protocol.ts +3 -5
  841. package/src/internal/hosted-catch.ts +1 -1
  842. package/src/internal/hosted-delivery-protocol.ts +111 -13
  843. package/src/internal/hosted-delivery.ts +286 -81
  844. package/src/internal/hosted-execution-diag.ts +3 -3
  845. package/src/internal/hosted-execution-latency.ts +334 -0
  846. package/src/internal/hosting.ts +5 -6
  847. package/src/internal/http-channel-define.ts +27 -0
  848. package/src/internal/http-channel.ts +3 -4
  849. package/src/internal/http-control-plane-session.ts +24 -11
  850. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  851. package/src/internal/init-interview.ts +7 -7
  852. package/src/internal/init-project.ts +14 -16
  853. package/src/internal/init-scaffold.ts +1 -1
  854. package/src/internal/inline-stdio-mcp.ts +2 -2
  855. package/src/internal/install-cursor-skills.ts +11 -11
  856. package/src/internal/json-schema.ts +1 -1
  857. package/src/internal/local-control-plane.ts +4 -5
  858. package/src/internal/local-env.ts +3 -3
  859. package/src/internal/log-ring.ts +1 -1
  860. package/src/internal/logs-client.ts +1 -1
  861. package/src/internal/mcp-endpoint.ts +10 -10
  862. package/src/internal/mcp-host.ts +9 -9
  863. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  864. package/src/internal/mcp-oauth.ts +5 -5
  865. package/src/internal/net.ts +2 -2
  866. package/src/internal/otel/config.ts +3 -3
  867. package/src/internal/otel/runtime.ts +14 -14
  868. package/src/internal/peer-connections.ts +2 -2
  869. package/src/internal/platform-schedule-sync.ts +1 -1
  870. package/src/internal/platform-timers.ts +1 -1
  871. package/src/internal/playground/static.ts +2 -2
  872. package/src/internal/playground/toolchain.ts +2 -2
  873. package/src/internal/playground-proxy.ts +3 -3
  874. package/src/internal/process-memory-telemetry.ts +1 -1
  875. package/src/internal/reminder-runner.ts +8 -10
  876. package/src/internal/reminder-store.ts +1 -1
  877. package/src/internal/request-error-status.ts +9 -0
  878. package/src/internal/resolved-connections.ts +8 -8
  879. package/src/internal/result-output.ts +62 -5
  880. package/src/internal/router.ts +4 -4
  881. package/src/internal/run-client.ts +2 -2
  882. package/src/internal/schedule-runner.ts +6 -6
  883. package/src/internal/scm/pr-url.ts +11 -2
  884. package/src/internal/sdk-runner.ts +14 -28
  885. package/src/internal/serve-restart.ts +1 -1
  886. package/src/internal/server.ts +97 -99
  887. package/src/internal/session-cost.ts +3 -3
  888. package/src/internal/session-engine.ts +504 -244
  889. package/src/internal/session-run-log.ts +4 -6
  890. package/src/internal/session-store.ts +213 -39
  891. package/src/internal/sessions-client.ts +3 -3
  892. package/src/internal/slack-thread-key.ts +11 -0
  893. package/src/internal/sleep.ts +1 -1
  894. package/src/internal/storage-coordinator.ts +118 -21
  895. package/src/internal/storage.ts +1 -0
  896. package/src/internal/store-mirror.ts +4 -4
  897. package/src/internal/terminal-style.ts +2 -2
  898. package/src/internal/tool-result.ts +3 -3
  899. package/src/internal/trajectory.ts +7 -7
  900. package/src/internal/turn-governor.ts +2 -2
  901. package/src/internal/turn-outbox.ts +1 -1
  902. package/src/internal/update-check.ts +2 -2
  903. package/src/internal/v2-hosting.ts +14 -0
  904. package/src/internal/workspace.ts +17 -17
  905. package/src/kv/memory-kv.ts +9 -7
  906. package/src/kv.ts +4 -7
  907. package/src/otel-public.ts +24 -0
  908. package/src/otel.ts +7 -2
  909. package/src/prompt.ts +1 -1
  910. package/src/result.ts +10 -8
  911. package/src/storage-backends/cursor-hosted-v2.ts +2 -2
  912. package/src/storage-backends/cursor-hosted.ts +6 -23
  913. package/src/storage-backends/file-kv.ts +7 -7
  914. package/src/storage.ts +22 -7
  915. package/src/types.ts +82 -17
  916. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  917. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  918. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  919. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  920. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  921. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  922. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  923. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  924. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  925. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  926. package/templates/agentic-owners/package.json +1 -1
  927. package/templates/agents-md/agent/lib/collect.ts +16 -10
  928. package/templates/agents-md/agent/lib/config.ts +1 -1
  929. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  930. package/templates/agents-md/package.json +1 -1
  931. package/templates/code-wiki/agent/channels/github.ts +4 -7
  932. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  933. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  934. package/templates/code-wiki/package.json +1 -1
  935. package/templates/demo/agent/lib/collect.ts +6 -2
  936. package/templates/demo/agent/lib/repos.ts +1 -1
  937. package/templates/demo/agent/tools/record_demo.ts +1 -1
  938. package/templates/demo/evals/demo.eval.ts +1 -5
  939. package/templates/demo/package.json +1 -1
  940. package/templates/grokbot-agents/package.json +1 -1
  941. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  942. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  943. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  944. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  945. package/templates/pr-autofixer/package.json +1 -1
  946. package/templates/security-help/agent/lib/repos.ts +1 -1
  947. package/templates/security-help/package.json +1 -1
  948. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  949. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  950. package/templates/security-reviewer/package.json +1 -1
  951. package/templates/triage/agent/lib/actuate.ts +26 -41
  952. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  953. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  954. package/templates/triage/agent/tools/record_triage.ts +1 -4
  955. package/templates/triage/package.json +1 -1
  956. package/dist/client.d.ts +0 -14
  957. package/dist/client.d.ts.map +0 -1
  958. package/dist/client.js +0 -12
  959. package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
  960. package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
  961. package/dist/docs/assets/chunks/framework.BCISBCiQ.js +0 -19
  962. package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
  963. package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
  964. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  965. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  966. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  967. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  968. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  969. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
  970. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
  971. package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
  972. package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
  973. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  974. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  975. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  976. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  977. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  978. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  979. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  980. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  981. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  982. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
  983. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
  984. package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
  985. package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
  986. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
  987. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
  988. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  989. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  990. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  991. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  992. package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
  993. package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
  994. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  995. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  996. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  997. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  998. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  999. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1000. package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
  1001. package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
  1002. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1003. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1004. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1005. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1006. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1007. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1008. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1009. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1010. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1011. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1012. package/dist/docs/concepts.html +0 -27
  1013. package/dist/docs/concepts.md +0 -166
  1014. package/dist/docs/design/filesystem.md +0 -376
  1015. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1016. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1017. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1018. package/dist/docs/reference/result.html +0 -45
  1019. package/dist/docs/reference/result.md +0 -89
  1020. package/dist/docs/scaffolding-agents.html +0 -27
  1021. package/dist/docs/scaffolding-agents.md +0 -130
  1022. package/dist/docs/skills/create-agent.html +0 -34
  1023. package/dist/docs/skills/create-agent.md +0 -160
  1024. package/dist/docs/skills/debug.html +0 -27
  1025. package/dist/docs/skills/debug.md +0 -36
  1026. package/dist/docs/skills/deploy.html +0 -61
  1027. package/dist/docs/skills/deploy.md +0 -161
  1028. package/dist/docs/skills/evals.html +0 -51
  1029. package/dist/docs/skills/evals.md +0 -137
  1030. package/dist/docs/skills/framework-map.html +0 -27
  1031. package/dist/docs/skills/framework-map.md +0 -99
  1032. package/dist/docs/skills/github.html +0 -42
  1033. package/dist/docs/skills/github.md +0 -93
  1034. package/dist/docs/skills/hillclimb.html +0 -33
  1035. package/dist/docs/skills/hillclimb.md +0 -55
  1036. package/dist/docs/skills/index.html +0 -27
  1037. package/dist/docs/skills/index.md +0 -21
  1038. package/dist/docs/skills/mcp-auth.html +0 -44
  1039. package/dist/docs/skills/mcp-auth.md +0 -76
  1040. package/dist/docs/skills/otel.html +0 -34
  1041. package/dist/docs/skills/otel.md +0 -53
  1042. package/dist/docs/skills/setup-slack.html +0 -46
  1043. package/dist/docs/skills/setup-slack.md +0 -141
  1044. package/dist/docs/storage.html +0 -56
  1045. package/dist/docs/storage.md +0 -167
  1046. package/dist/docs/templates/agents-md.html +0 -28
  1047. package/dist/docs/templates/agents-md.md +0 -105
  1048. package/dist/docs/templates/code-wiki.html +0 -28
  1049. package/dist/docs/templates/code-wiki.md +0 -91
  1050. package/dist/docs/templates/demo.html +0 -30
  1051. package/dist/docs/templates/demo.md +0 -80
  1052. package/dist/docs/templates/grokbot-agents.html +0 -29
  1053. package/dist/docs/templates/grokbot-agents.md +0 -48
  1054. package/dist/docs/templates/security-help.html +0 -30
  1055. package/dist/docs/templates/security-help.md +0 -65
  1056. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1057. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1058. package/dist/internal/tenant-slack/relay.js +0 -148
  1059. package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
  1060. package/dist/playground/assets/index-CqLX5uF3.js +0 -67
  1061. package/docs/concepts.md +0 -171
  1062. package/docs/design/filesystem.md +0 -376
  1063. package/docs/design/runtime-abstraction.md +0 -1756
  1064. package/docs/guides/human-in-the-loop.md +0 -131
  1065. package/docs/reference/result.md +0 -94
  1066. package/docs/scaffolding-agents.md +0 -135
  1067. package/docs/skills/index.md +0 -26
  1068. package/docs/storage.md +0 -172
  1069. package/docs/templates/agents-md.md +0 -110
  1070. package/docs/templates/code-wiki.md +0 -96
  1071. package/docs/templates/demo.md +0 -85
  1072. package/docs/templates/grokbot-agents.md +0 -53
  1073. package/docs/templates/security-help.md +0 -70
  1074. package/src/client.ts +0 -23
  1075. package/src/internal/tenant-slack/relay.ts +0 -203
  1076. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -1,4 +1,4 @@
1
- var Ot=Object.defineProperty;var At=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Me=(a,e,t)=>At(a,typeof e!="symbol"?e+"":e,t);import{V as Ct,q as Be,h as be,ah as Mt,E as ce,ai as nt,aj as Lt,ak as Dt,al as Pt,d as zt,am as rt,p as he,an as Vt,ao as jt,s as $t,ap as Bt,v as Le,P as ve,O as xe,aq as Wt,ar as Kt,W as Jt,R as qt,$ as Ut,b as Ht,o as q,j as T,a0 as Gt,as as Qt,k as P,at as Yt,au as Zt,c as Q,e as _e,n as st,B as it,F as at,a as pe,t as me,av as Xt,aw as ot,ax as en,a6 as tn,ab as nn,ay as rn,_ as sn}from"./framework.BCISBCiQ.js";import{u as an,c as on}from"./theme.Dnsd3XOn.js";const ln={root:()=>Ct(()=>import("./@localSearchIndexroot.CFVQ4S17.js"),[])};/*!
1
+ var Ot=Object.defineProperty;var At=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Me=(a,e,t)=>At(a,typeof e!="symbol"?e+"":e,t);import{V as Ct,q as Be,h as be,a5 as Mt,E as ce,a6 as nt,a7 as Lt,a8 as Dt,a9 as Pt,d as zt,aa as rt,p as he,ab as Vt,ac as jt,s as $t,ad as Bt,v as Le,P as ve,O as xe,ae as Wt,af as Kt,W as Jt,R as Ut,$ as qt,b as Ht,o as U,j as T,a0 as Gt,ag as Qt,k as P,ah as Yt,ai as Zt,c as Q,e as _e,n as st,B as it,F as at,a as pe,t as me,aj as Xt,ak as ot,al as en,am as tn,an as nn,ao as rn,_ as sn}from"./framework.dypDpWZ3.js";import{u as an,c as on}from"./theme.C0MctGaz.js";const ln={root:()=>Ct(()=>import("./@localSearchIndexroot.DtXk1hy-.js"),[])};/*!
2
2
  * tabbable 6.4.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
4
  */var gt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ke=gt.join(","),bt=typeof Element>"u",ae=bt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ne=!bt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},Fe=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=r===""||r==="true",s=i||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Fe(e.parentNode));return s},cn=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},yt=function(e,t,n){if(Fe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ke));return t&&ae.call(e,ke)&&r.unshift(e),r=r.filter(n),r},Re=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var s=i.shift();if(!Fe(s,!1))if(s.tagName==="SLOT"){var o=s.assignedElements(),l=o.length?o:s.children,c=Re(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:s,candidates:c})}else{var h=ae.call(s,ke);h&&n.filter(s)&&(t||!e.includes(s))&&r.push(s);var m=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),p=!Fe(m,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(m&&p){var b=Re(m===!0?s.children:m.children,!0,n);n.flatten?r.push.apply(r,b):r.push({scopeParent:s,candidates:b})}else i.unshift.apply(i,s.children)}}return r},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ie=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||cn(e))&&!wt(e)?0:e.tabIndex},un=function(e,t){var n=ie(e);return n<0&&t&&!wt(e)?0:n},dn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},St=function(e){return e.tagName==="INPUT"},fn=function(e){return St(e)&&e.type==="hidden"},hn=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},vn=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},pn=function(e){if(!e.name)return!0;var t=e.form||Ne(e),n=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=vn(r,e.form);return!i||i===e},mn=function(e){return St(e)&&e.type==="radio"},gn=function(e){return mn(e)&&!pn(e)},bn=function(e){var t,n=e&&Ne(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var s,o,l;for(i=!!((s=r)!==null&&s!==void 0&&(o=s.ownerDocument)!==null&&o!==void 0&&o.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&r;){var c,h,m;n=Ne(r),r=(c=n)===null||c===void 0?void 0:c.host,i=!!((h=r)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(r))}}return i},lt=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},yn=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var i=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(e).visibility==="hidden")return!0;var s=ae.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(ae.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,h=Ne(e);if(c&&!c.shadowRoot&&r(c)===!0)return lt(e);e.assignedSlot?e=e.assignedSlot:!c&&h!==e.ownerDocument?e=h.host:e=c}e=l}if(bn(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return lt(e);return!1},wn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return ae.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Oe=function(e,t){return!(t.disabled||fn(t)||yn(t,e)||hn(t)||wn(t))},We=function(e,t){return!(gn(t)||ie(t)<0||!Oe(e,t))},Sn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xt=function(e){var t=[],n=[];return e.forEach(function(r,i){var s=!!r.scopeParent,o=s?r.scopeParent:r,l=un(o,s),c=s?xt(r.candidates):o;l===0?s?t.push.apply(t,c):t.push(o):n.push({documentOrder:i,tabIndex:l,item:r,isScope:s,content:c})}),n.sort(dn).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},xn=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Re([e],t.includeContainer,{filter:We.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Sn}):n=yt(e,t.includeContainer,We.bind(null,t)),xt(n)},_n=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Re([e],t.includeContainer,{filter:Oe.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=yt(e,t.includeContainer,Oe.bind(null,t)),n},oe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,ke)===!1?!1:We(t,e)},Tn=gt.concat("iframe:not([inert]):not([inert] *)").join(","),De=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,Tn)===!1?!1:Oe(t,e)};/*!
@@ -6,4 +6,4 @@ var Ot=Object.defineProperty;var At=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,config
6
6
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
7
7
  */function Ke(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function En(a){if(Array.isArray(a))return Ke(a)}function ct(a,e){var t=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!t){if(Array.isArray(a)||(t=_t(a))||e){t&&(a=t);var n=0,r=function(){};return{s:r,n:function(){return n>=a.length?{done:!0}:{done:!1,value:a[n++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(a)},n:function(){var l=t.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function In(a,e,t){return(e=On(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function kn(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Nn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function dt(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(t),!0).forEach(function(n){In(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function Fn(a){return En(a)||kn(a)||_t(a)||Nn()}function Rn(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function On(a){var e=Rn(a,"string");return typeof e=="symbol"?e:e+""}function _t(a,e){if(a){if(typeof a=="string")return Ke(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ke(a,e):void 0}}var U={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){var n=U.getActiveTrap(e);t!==n&&U.pauseTrap(e);var r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),U.unpauseTrap(e)},pauseTrap:function(e){var t=U.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=U.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},An=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cn=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ye=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Mn=function(e){return ye(e)&&!e.shiftKey},Ln=function(e){return ye(e)&&e.shiftKey},ft=function(e){return setTimeout(e,0)},ge=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},Te=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Dn=[],Pn=function(e,t){var n=(t==null?void 0:t.document)||document,r=(t==null?void 0:t.trapStack)||Dn,i=dt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Mn,isKeyBackward:Ln},t),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,l=function(u,f,g){return u&&u[f]!==void 0?u[f]:i[g||f]},c=function(u,f){var g=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return s.containerGroups.findIndex(function(E){var _=E.container,I=E.tabbableNodes;return _.contains(u)||(g==null?void 0:g.includes(_))||I.find(function(S){return S===u})})},h=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=f.hasFallback,E=g===void 0?!1:g,_=f.params,I=_===void 0?[]:_,S=i[u];if(typeof S=="function"&&(S=S.apply(void 0,Fn(I))),S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var v=S;if(typeof S=="string"){try{v=n.querySelector(S)}catch(d){throw new Error("`".concat(u,'` appears to be an invalid selector; error="').concat(d.message,'"'))}if(!v&&!E)throw new Error("`".concat(u,"` as selector refers to no known node"))}return v},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!De(u,i.tabbableOptions))if(c(n.activeElement)>=0)u=n.activeElement;else{var f=s.tabbableGroups[0],g=f&&f.firstTabbableNode;u=g||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},p=function(){if(s.containerGroups=s.containers.map(function(u){var f=xn(u,i.tabbableOptions),g=_n(u,i.tabbableOptions),E=f.length>0?f[0]:void 0,_=f.length>0?f[f.length-1]:void 0,I=g.find(function(d){return oe(d)}),S=g.slice().reverse().find(function(d){return oe(d)}),v=!!f.find(function(d){return ie(d)>0});return{container:u,tabbableNodes:f,focusableNodes:g,posTabIndexesFound:v,firstTabbableNode:E,lastTabbableNode:_,firstDomTabbableNode:I,lastDomTabbableNode:S,nextTabbableNode:function(x){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,A=f.indexOf(x);return A<0?R?g.slice(g.indexOf(x)+1).find(function(C){return oe(C)}):g.slice(0,g.indexOf(x)).reverse().find(function(C){return oe(C)}):f[A+(R?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(u){return u.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(u){var f=u.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?b(f.shadowRoot):f},w=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){w(m());return}u.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=u,An(u)&&u.select()}},k=function(u){var f=h("setReturnFocus",{params:[u]});return f||(f===!1?!1:u)},y=function(u){var f=u.target,g=u.event,E=u.isBackward,_=E===void 0?!1:E;f=f||Te(g),p();var I=null;if(s.tabbableGroups.length>0){var S=c(f,g),v=S>=0?s.containerGroups[S]:void 0;if(S<0)_?I=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:I=s.tabbableGroups[0].firstTabbableNode;else if(_){var d=s.tabbableGroups.findIndex(function(F){var V=F.firstTabbableNode;return f===V});if(d<0&&(v.container===f||De(f,i.tabbableOptions)&&!oe(f,i.tabbableOptions)&&!v.nextTabbableNode(f,!1))&&(d=S),d>=0){var x=d===0?s.tabbableGroups.length-1:d-1,R=s.tabbableGroups[x];I=ie(f)>=0?R.lastTabbableNode:R.lastDomTabbableNode}else ye(g)||(I=v.nextTabbableNode(f,!1))}else{var A=s.tabbableGroups.findIndex(function(F){var V=F.lastTabbableNode;return f===V});if(A<0&&(v.container===f||De(f,i.tabbableOptions)&&!oe(f,i.tabbableOptions)&&!v.nextTabbableNode(f))&&(A=S),A>=0){var C=A===s.tabbableGroups.length-1?0:A+1,D=s.tabbableGroups[C];I=ie(f)>=0?D.firstTabbableNode:D.firstDomTabbableNode}else ye(g)||(I=v.nextTabbableNode(f))}}else I=h("fallbackFocus");return I},O=function(u){var f=Te(u);if(!(c(f,u)>=0)){if(ge(i.clickOutsideDeactivates,u)){o.deactivate({returnFocus:i.returnFocusOnDeactivate});return}ge(i.allowOutsideClick,u)||u.preventDefault()}},L=function(u){var f=Te(u),g=c(f,u)>=0;if(g||f instanceof Document)g&&(s.mostRecentlyFocusedNode=f);else{u.stopImmediatePropagation();var E,_=!0;if(s.mostRecentlyFocusedNode)if(ie(s.mostRecentlyFocusedNode)>0){var I=c(s.mostRecentlyFocusedNode),S=s.containerGroups[I].tabbableNodes;if(S.length>0){var v=S.findIndex(function(d){return d===s.mostRecentlyFocusedNode});v>=0&&(i.isKeyForward(s.recentNavEvent)?v+1<S.length&&(E=S[v+1],_=!1):v-1>=0&&(E=S[v-1],_=!1))}}else s.containerGroups.some(function(d){return d.tabbableNodes.some(function(x){return ie(x)>0})})||(_=!1);else _=!1;_&&(E=y({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),w(E||s.mostRecentlyFocusedNode||m())}s.recentNavEvent=void 0},K=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=u;var g=y({event:u,isBackward:f});g&&(ye(u)&&u.preventDefault(),w(g))},H=function(u){(i.isKeyForward(u)||i.isKeyBackward(u))&&K(u,i.isKeyBackward(u))},W=function(u){Cn(u)&&ge(i.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},j=function(u){var f=Te(u);c(f,u)>=0||ge(i.clickOutsideDeactivates,u)||ge(i.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},$=function(){if(s.active)return U.activateTrap(r,o),s.delayInitialFocusTimer=i.delayInitialFocus?ft(function(){w(m())}):w(m()),n.addEventListener("focusin",L,!0),n.addEventListener("mousedown",O,{capture:!0,passive:!1}),n.addEventListener("touchstart",O,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",H,{capture:!0,passive:!1}),n.addEventListener("keydown",W),o},Ce=function(u){s.active&&!s.paused&&o._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadySilent.clear();var f=new Set,g=new Set,E=ct(u),_;try{for(E.s();!(_=E.n()).done;){var I=_.value;f.add(I);for(var S=typeof ShadowRoot<"u"&&I.getRootNode()instanceof ShadowRoot,v=I;v;){f.add(v);var d=v.parentElement,x=[];d?x=d.children:!d&&S&&(x=v.getRootNode().children,d=v.getRootNode().host,S=typeof ShadowRoot<"u"&&d.getRootNode()instanceof ShadowRoot);var R=ct(x),A;try{for(R.s();!(A=R.n()).done;){var C=A.value;g.add(C)}}catch(D){R.e(D)}finally{R.f()}v=d}}}catch(D){E.e(D)}finally{E.f()}f.forEach(function(D){g.delete(D)}),s.adjacentElements=g},M=function(){if(s.active)return n.removeEventListener("focusin",L,!0),n.removeEventListener("mousedown",O,!0),n.removeEventListener("touchstart",O,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",H,!0),n.removeEventListener("keydown",W),o},Z=function(u){var f=u.some(function(g){var E=Array.from(g.removedNodes);return E.some(function(_){return _===s.mostRecentlyFocusedNode})});f&&w(m())},X=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Z):void 0,ee=function(){X&&(X.disconnect(),s.active&&!s.paused&&s.containers.map(function(u){X.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return s.active},get paused(){return s.paused},activate:function(u){if(s.active)return this;var f=l(u,"onActivate"),g=l(u,"onPostActivate"),E=l(u,"checkCanFocusTrap"),_=U.getActiveTrap(r),I=!1;if(_&&!_.paused){var S;(S=_._setSubtreeIsolation)===null||S===void 0||S.call(_,!1),I=!0}try{E||p(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=b(n),f==null||f();var v=function(){E&&p(),$(),ee(),i.isolateSubtrees&&o._setSubtreeIsolation(!0),g==null||g()};if(E)return E(s.containers.concat()).then(v,v),this;v()}catch(x){if(_===U.getActiveTrap(r)&&I){var d;(d=_._setSubtreeIsolation)===null||d===void 0||d.call(_,!0)}throw x}return this},deactivate:function(u){if(!s.active)return this;var f=dt({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},u);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||o._setSubtreeIsolation(!1),s.alreadySilent.clear(),M(),s.active=!1,s.paused=!1,ee(),U.deactivateTrap(r,o);var g=l(f,"onDeactivate"),E=l(f,"onPostDeactivate"),_=l(f,"checkCanReturnFocus"),I=l(f,"returnFocus","returnFocusOnDeactivate");g==null||g();var S=function(){ft(function(){I&&w(k(s.nodeFocusedBeforeActivation)),E==null||E()})};return I&&_?(_(k(s.nodeFocusedBeforeActivation)).then(S,S),this):(S(),this)},pause:function(u){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,u)):this},unpause:function(u){return s.active?(s.manuallyPaused=!1,r[r.length-1]!==this?this:this._setPausedState(!1,u)):this},updateContainerElements:function(u){var f=[].concat(u).filter(Boolean);return s.containers=f.map(function(g){return typeof g=="string"?n.querySelector(g):g}),i.isolateSubtrees&&Ce(s.containers),s.active&&(p(),i.isolateSubtrees&&!s.paused&&o._setSubtreeIsolation(!0)),ee(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(u,f){if(s.paused===u)return this;if(s.paused=u,u){var g=l(f,"onPause"),E=l(f,"onPostPause");g==null||g(),M(),ee(),o._setSubtreeIsolation(!1),E==null||E()}else{var _=l(f,"onUnpause"),I=l(f,"onPostUnpause");_==null||_(),o._setSubtreeIsolation(!0),p(),$(),ee(),I==null||I()}return this}},_setSubtreeIsolation:{value:function(u){i.isolateSubtrees&&s.adjacentElements.forEach(function(f){var g;if(u)switch(i.isolateSubtrees){case"aria-hidden":(f.ariaHidden==="true"||((g=f.getAttribute("aria-hidden"))===null||g===void 0?void 0:g.toLowerCase())==="true")&&s.alreadySilent.add(f),f.setAttribute("aria-hidden","true");break;default:(f.inert||f.hasAttribute("inert"))&&s.alreadySilent.add(f),f.setAttribute("inert",!0);break}else if(!s.alreadySilent.has(f))switch(i.isolateSubtrees){case"aria-hidden":f.removeAttribute("aria-hidden");break;default:f.removeAttribute("inert");break}})}}}),o.updateContainerElements(e),o};function zn(a,e={}){let t;const{immediate:n,...r}=e,i=ce(!1),s=ce(!1),o=p=>t&&t.activate(p),l=p=>t&&t.deactivate(p),c=()=>{t&&(t.pause(),s.value=!0)},h=()=>{t&&(t.unpause(),s.value=!1)},m=be(()=>{const p=nt(a);return Lt(p).map(b=>{const w=nt(b);return typeof w=="string"?w:Dt(w)}).filter(Pt)});return Be(m,p=>{p.length&&(t=Pn(p,{...r,onActivate(){i.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){i.value=!1,e.onDeactivate&&e.onDeactivate()}}),n&&o())},{flush:"post"}),Mt(()=>l()),{hasFocus:i,isPaused:s,activate:o,deactivate:l,pause:c,unpause:h}}class ue{constructor(e,t=!0,n=[],r=5e3){this.ctx=e,this.iframes=t,this.exclude=n,this.iframesTimeout=r}static matches(e,t){const n=typeof t=="string"?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){let i=!1;return n.every(s=>r.call(e,s)?(i=!0,!1):!0),i}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(n=>{const r=t.filter(i=>i.contains(n)).length>0;t.indexOf(n)===-1&&!r&&t.push(n)}),t}getIframeContents(e,t,n=()=>{}){let r;try{const i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch{n()}r&&t(r)}isIframeBlank(e){const t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}observeIframeLoad(e,t,n){let r=!1,i=null;const s=()=>{if(!r){r=!0,clearTimeout(i);try{this.isIframeBlank(e)||(e.removeEventListener("load",s),this.getIframeContents(e,t,n))}catch{n()}}};e.addEventListener("load",s),i=setTimeout(s,this.iframesTimeout)}onIframeReady(e,t,n){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch{n()}}waitForIframes(e,t){let n=0;this.forEachIframe(e,()=>!0,r=>{n++,this.waitForIframes(r.querySelector("html"),()=>{--n||t()})},r=>{r||t()})}forEachIframe(e,t,n,r=()=>{}){let i=e.querySelectorAll("iframe"),s=i.length,o=0;i=Array.prototype.slice.call(i);const l=()=>{--s<=0&&r(o)};s||l(),i.forEach(c=>{ue.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,n(h)),l()},l)})}createIterator(e,t,n){return document.createNodeIterator(e,t,n,!1)}createInstanceOnIframe(e){return new ue(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,n){const r=e.compareDocumentPosition(n),i=Node.DOCUMENT_POSITION_PRECEDING;if(r&i)if(t!==null){const s=t.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_FOLLOWING;if(s&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let n;return t===null?n=e.nextNode():n=e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}checkIframeFilter(e,t,n,r){let i=!1,s=!1;return r.forEach((o,l)=>{o.val===n&&(i=l,s=o.handled)}),this.compareNodeIframe(e,t,n)?(i===!1&&!s?r.push({val:n,handled:!0}):i!==!1&&!s&&(r[i].handled=!0),!0):(i===!1&&r.push({val:n,handled:!1}),!1)}handleOpenIframes(e,t,n,r){e.forEach(i=>{i.handled||this.getIframeContents(i.val,s=>{this.createInstanceOnIframe(s).forEachNode(t,n,r)})})}iterateThroughNodes(e,t,n,r,i){const s=this.createIterator(t,e,r);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(s),c);for(;m();)this.iframes&&this.forEachIframe(t,p=>this.checkIframeFilter(c,h,p,o),p=>{this.createInstanceOnIframe(p).forEachNode(e,b=>l.push(b),r)}),l.push(c);l.forEach(p=>{n(p)}),this.iframes&&this.handleOpenIframes(o,e,n,r),i()}forEachNode(e,t,n,r=()=>{}){const i=this.getContexts();let s=i.length;s||r(),i.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,n,()=>{--s<=0&&r()})};this.iframes?this.waitForIframes(o,l):l()})}}let Vn=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ue(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const n=this.opt.log;this.opt.debug&&typeof n=="object"&&typeof n[t]=="function"&&n[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let i in t)if(t.hasOwnProperty(i)){const s=t[i],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(s):this.escapeStr(s);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${n}`),r+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+r))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,n,r)=>{let i=r.charAt(n+1);return/[(|)\\]/.test(i)||i===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let r=[];return e.split("").forEach(i=>{n.every(s=>{if(s.indexOf(i)!==-1){if(r.indexOf(s)>-1)return!1;e=e.replace(new RegExp(`[${s}]`,`gm${t}`),`[${s}]`),r.push(s)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let n=this.opt.accuracy,r=typeof n=="string"?n:n.value,i=typeof n=="string"?[]:n.limiters,s="";switch(i.forEach(o=>{s+=`|${this.escapeStr(o)}`}),r){case"partially":default:return`()(${e})`;case"complementary":return s="\\s"+(s||this.escapeStr(t)),`()([^${s}]*${e}[^${s}]*)`;case"exactly":return`(^|\\s${s})(${e})(?=$|\\s${s})`}}getSeparatedKeywords(e){let t=[];return e.forEach(n=>{this.opt.separateWordSearch?n.split(" ").forEach(r=>{r.trim()&&t.indexOf(r)===-1&&t.push(r)}):n.trim()&&t.indexOf(n)===-1&&t.push(n)}),{keywords:t.sort((n,r)=>r.length-n.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let n=0;return e.sort((r,i)=>r.start-i.start).forEach(r=>{let{start:i,end:s,valid:o}=this.callNoMatchOnInvalidRanges(r,n);o&&(r.start=i,r.length=s-i,t.push(r),n=s)}),t}callNoMatchOnInvalidRanges(e,t){let n,r,i=!1;return e&&typeof e.start<"u"?(n=parseInt(e.start,10),r=n+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:n,end:r,valid:i}}checkWhitespaceRanges(e,t,n){let r,i=!0,s=n.length,o=t-s,l=parseInt(e.start,10)-o;return l=l>s?s:l,r=l+parseInt(e.length,10),r>s&&(r=s,this.log(`End range automatically set to the max value of ${s}`)),l<0||r-l<0||l>s||r>s?(i=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):n.substring(l,r).replace(/\s+/g,"")===""&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:r,valid:i}}getTextNodes(e){let t="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,r=>{n.push({start:t.length,end:(t+=r.textContent).length,node:r})},r=>this.matchesExclude(r.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:n})})}matchesExclude(e){return ue.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,n){const r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),s=i.splitText(n-t);let o=document.createElement(r);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),s}wrapRangeInMappedTextNode(e,t,n,r,i){e.nodes.every((s,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!r(s.node))return!1;const c=t-s.start,h=(n>s.end?s.end:n)-s.start,m=e.value.substr(0,s.start),p=e.value.substr(h+s.start);if(s.node=this.wrapRangeInTextNode(s.node,c,h),e.value=m+p,e.nodes.forEach((b,w)=>{w>=o&&(e.nodes[w].start>0&&w!==o&&(e.nodes[w].start-=h),e.nodes[w].end-=h)}),n-=h,i(s.node.previousSibling,s.start),n>s.end)t=s.end;else return!1}return!0})}wrapMatches(e,t,n,r,i){const s=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[s]!=="";){if(!n(c[s],l))continue;let h=c.index;if(s!==0)for(let m=1;m<s;m++)h+=c[m].length;l=this.wrapRangeInTextNode(l,h,h+c[s].length),r(l.previousSibling),e.lastIndex=0}}),i()})}wrapMatchesAcrossElements(e,t,n,r,i){const s=t===0?0:t+1;this.getTextNodes(o=>{let l;for(;(l=e.exec(o.value))!==null&&l[s]!=="";){let c=l.index;if(s!==0)for(let m=1;m<s;m++)c+=l[m].length;const h=c+l[s].length;this.wrapRangeInMappedTextNode(o,c,h,m=>n(l[s],m),(m,p)=>{e.lastIndex=p,r(m)})}i()})}wrapRangeFromIndex(e,t,n,r){this.getTextNodes(i=>{const s=i.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,s,i.value);m&&this.wrapRangeInMappedTextNode(i,c,h,p=>t(p,o,i.value.substring(c,h),l),p=>{n(p,o)})}),r()})}unwrapMatches(e){const t=e.parentNode;let n=document.createDocumentFragment();for(;e.firstChild;)n.appendChild(e.removeChild(e.firstChild));t.replaceChild(n,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let n=0,r="wrapMatches";const i=s=>{n++,this.opt.each(s)};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),this[r](e,this.opt.ignoreGroups,(s,o)=>this.opt.filter(o,s,n),i,()=>{n===0&&this.opt.noMatch(e),this.opt.done(n)})}mark(e,t){this.opt=t;let n=0,r="wrapMatches";const{keywords:i,length:s}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[r](h,1,(p,b)=>this.opt.filter(b,c,n,m),p=>{m++,n++,this.opt.each(p)},()=>{m===0&&this.opt.noMatch(c),i[s-1]===c?this.opt.done(n):l(i[i.indexOf(c)+1])})};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),s===0?this.opt.done(n):l(i[0])}markRanges(e,t){this.opt=t;let n=0,r=this.checkRanges(e);r&&r.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(r)),this.wrapRangeFromIndex(r,(i,s,o,l)=>this.opt.filter(i,s,o,l),(i,s)=>{n++,this.opt.each(i,s)},()=>{this.opt.done(n)})):this.opt.done(n)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,n=>{this.unwrapMatches(n)},n=>{const r=ue.matches(n,t),i=this.matchesExclude(n);return!r||i?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function jn(a){const e=new Vn(a);return this.mark=(t,n)=>(e.mark(t,n),this),this.markRegExp=(t,n)=>(e.markRegExp(t,n),this),this.markRanges=(t,n)=>(e.markRanges(t,n),this),this.unmark=t=>(e.unmark(t),this),this}const $n="ENTRIES",Tt="KEYS",Et="VALUES",z="";class Pe{constructor(e,t){const n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=le(this._path);if(le(t)===z)return{done:!1,value:this.result()};const n=e.get(le(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>le(e)).filter(e=>e!==z).join("")}value(){return le(this._path).node.get(z)}result(){switch(this._type){case Et:return this.value();case Tt:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const le=a=>a[a.length-1],Bn=(a,e,t)=>{const n=new Map;if(e===void 0)return n;const r=e.length+1,i=r+t,s=new Uint8Array(i*r).fill(t+1);for(let o=0;o<r;++o)s[o]=o;for(let o=1;o<i;++o)s[o*r]=o;return It(a,e,t,n,s,1,r,""),n},It=(a,e,t,n,r,i,s,o)=>{const l=i*s;e:for(const c of a.keys())if(c===z){const h=r[l-1];h<=t&&n.set(o,[a.get(c),h])}else{let h=i;for(let m=0;m<c.length;++m,++h){const p=c[m],b=s*h,w=b-s;let k=r[b];const y=Math.max(0,h-t-1),O=Math.min(s-1,h+t);for(let L=y;L<O;++L){const K=p!==e[L],H=r[w+L]+ +K,W=r[w+L+1]+1,j=r[b+L]+1,$=r[b+L+1]=Math.min(H,W,j);$<k&&(k=$)}if(k>t)continue e}It(a.get(c),e,t,n,r,h,s,o+c)}};class Y{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,n]=Ae(this._tree,e.slice(this._prefix.length));if(t===void 0){const[r,i]=He(n);for(const s of r.keys())if(s!==z&&s.startsWith(i)){const o=new Map;return o.set(s.slice(i.length),r.get(s)),new Y(o,e)}}return new Y(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Wn(this._tree,e)}entries(){return new Pe(this,$n)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return Bn(this._tree,e,t)}get(e){const t=Je(this._tree,e);return t!==void 0?t.get(z):void 0}has(e){const t=Je(this._tree,e);return t!==void 0&&t.has(z)}keys(){return new Pe(this,Tt)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(z,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ze(this._tree,e);return n.set(z,t(n.get(z))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ze(this._tree,e);let r=n.get(z);return r===void 0&&n.set(z,r=t()),r}values(){return new Pe(this,Et)}[Symbol.iterator](){return this.entries()}static from(e){const t=new Y;for(const[n,r]of e)t.set(n,r);return t}static fromObject(e){return Y.from(Object.entries(e))}}const Ae=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const n of a.keys())if(n!==z&&e.startsWith(n))return t.push([a,n]),Ae(a.get(n),e.slice(n.length),t);return t.push([a,e]),Ae(void 0,"",t)},Je=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==z&&e.startsWith(t))return Je(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let n=0;a&&n<t;){for(const i of a.keys())if(i!==z&&e[n]===i[0]){const s=Math.min(t-n,i.length);let o=1;for(;o<s&&e[n+o]===i[o];)++o;const l=a.get(i);if(o===i.length)a=l;else{const c=new Map;c.set(i.slice(o),l),a.set(e.slice(n,n+o),c),a.delete(i),a=c}n+=o;continue e}const r=new Map;return a.set(e.slice(n),r),r}return a},Wn=(a,e)=>{const[t,n]=Ae(a,e);if(t!==void 0){if(t.delete(z),t.size===0)kt(n);else if(t.size===1){const[r,i]=t.entries().next().value;Nt(n,r,i)}}},kt=a=>{if(a.length===0)return;const[e,t]=He(a);if(e.delete(t),e.size===0)kt(a.slice(0,-1));else if(e.size===1){const[n,r]=e.entries().next().value;n!==z&&Nt(a.slice(0,-1),n,r)}},Nt=(a,e,t)=>{if(a.length===0)return;const[n,r]=He(a);n.set(r+e,t),n.delete(r)},He=a=>a[a.length-1],Ge="or",Ft="and",Kn="and_not";class de{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?$e:e.autoVacuum;this._options={...je,...e,autoVacuum:t,searchOptions:{...ht,...e.searchOptions||{}},autoSuggestOptions:{...Gn,...e.autoSuggestOptions||{}}},this._index=new Y,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ue,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:n,tokenize:r,processTerm:i,fields:s,idField:o}=this._options,l=t(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,e);for(const h of s){const m=t(e,h);if(m==null)continue;const p=r(n(m,h),h),b=this._fieldIds[h],w=new Set(p).size;this.addFieldLength(c,b,this._documentCount-1,w);for(const k of p){const y=i(k,h);if(Array.isArray(y))for(const O of y)this.addTerm(b,c,O);else y&&this.addTerm(b,c,y)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,r={chunk:[],promise:Promise.resolve()},{chunk:i,promise:s}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),r);return s.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:n,extractField:r,stringifyField:i,fields:s,idField:o}=this._options,l=r(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const h of s){const m=r(e,h);if(m==null)continue;const p=t(i(m,h),h),b=this._fieldIds[h],w=new Set(p).size;this.removeFieldLength(c,b,this._documentCount,w);for(const k of p){const y=n(k,h);if(Array.isArray(y))for(const O of y)this.removeTerm(b,c,O);else y&&this.removeTerm(b,c,y)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Y,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((n,r)=>{this.removeFieldLength(t,r,this._documentCount,n)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:r}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:r},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of e)this.discard(n)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:n}=this._options,r=n(e,t);this.discard(r),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ue,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const r=e.batchSize||qe.batchSize,i=e.batchWait||qe.batchWait;let s=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),s%r===0&&await new Promise(c=>setTimeout(c,i)),s+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||$e.minDirtCount,n=n||$e.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:n}=this._options,r={...n,...t},i=this.executeQuery(e,t),s=[];for(const[o,{score:l,terms:c,match:h}]of i){const m=c.length||1,p={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(p,this._storedFields.get(o)),(r.filter==null||r.filter(p))&&s.push(p)}return e===de.wildcard&&r.boostDocument==null||s.sort(pt),s}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:i,terms:s}of this.search(e,t)){const o=s.join(" "),l=n.get(o);l!=null?(l.score+=i,l.count+=1):n.set(o,{score:i,terms:s,count:1})}const r=[];for(const[i,{score:s,terms:o,count:l}]of n)r.push({suggestion:i,terms:o,score:s/l});return r.sort(pt),r}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(je.hasOwnProperty(e))return Ve(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:r,fieldLength:i,storedFields:s,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Ee(r),l._fieldLength=Ee(i),l._storedFields=Ee(s);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of n){const m=new Map;for(const p of Object.keys(h)){let b=h[p];o===1&&(b=b.ds),m.set(parseInt(p,10),Ee(b))}l._index.set(c,m)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:r,fieldLength:i,storedFields:s,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await Ie(r),l._fieldLength=await Ie(i),l._storedFields=await Ie(s);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of n){const p=new Map;for(const b of Object.keys(m)){let w=m[b];o===1&&(w=w.ds),p.set(parseInt(b,10),await Ie(w))}++c%1e3===0&&await Rt(0),l._index.set(h,p)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:r,fieldIds:i,averageFieldLength:s,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new de(t);return c._documentCount=n,c._nextId=r,c._idToShortId=new Map,c._fieldIds=i,c._avgFieldLength=s,c._dirtCount=o||0,c._index=new Y,c}executeQuery(e,t={}){if(e===de.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const p={...t,...e,queries:void 0},b=e.queries.map(w=>this.executeQuery(w,p));return this.combineResults(b,p.combineWith)}const{tokenize:n,processTerm:r,searchOptions:i}=this._options,s={tokenize:n,processTerm:r,...i,...t},{tokenize:o,processTerm:l}=s,m=o(e).flatMap(p=>l(p)).filter(p=>!!p).map(Hn(s)).map(p=>this.executeQuerySpec(p,s));return this.combineResults(m,s.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},r=(n.fields||this._options.fields).reduce((k,y)=>({...k,[y]:Ve(n.boost,y)||1}),{}),{boostDocument:i,weights:s,maxFuzzy:o,bm25:l}=n,{fuzzy:c,prefix:h}={...ht.weights,...s},m=this._index.get(e.term),p=this.termResults(e.term,e.term,1,e.termBoost,m,r,i,l);let b,w;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const k=e.fuzzy===!0?.2:e.fuzzy,y=k<1?Math.min(o,Math.round(e.term.length*k)):k;y&&(w=this._index.fuzzyGet(e.term,y))}if(b)for(const[k,y]of b){const O=k.length-e.term.length;if(!O)continue;w==null||w.delete(k);const L=h*k.length/(k.length+.3*O);this.termResults(e.term,k,L,e.termBoost,y,r,i,l,p)}if(w)for(const k of w.keys()){const[y,O]=w.get(k);if(!O)continue;const L=c*k.length/(k.length+O);this.termResults(e.term,k,L,e.termBoost,y,r,i,l,p)}return p}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[r,i]of this._documentIds){const s=n.boostDocument?n.boostDocument(i,"",this._storedFields.get(r)):1;t.set(r,{score:s,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const n=t.toLowerCase(),r=Jn[n];if(!r)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(r)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const r={};for(const[i,s]of n)r[i]=Object.fromEntries(s);e.push([t,r])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,n,r,i,s,o,l,c=new Map){if(i==null)return c;for(const h of Object.keys(s)){const m=s[h],p=this._fieldIds[h],b=i.get(p);if(b==null)continue;let w=b.size;const k=this._avgFieldLength[p];for(const y of b.keys()){if(!this._documentIds.has(y)){this.removeTerm(p,y,t),w-=1;continue}const O=o?o(this._documentIds.get(y),t,this._storedFields.get(y)):1;if(!O)continue;const L=b.get(y),K=this._fieldLength.get(y)[p],H=Un(L,w,this._documentCount,K,k,l),W=n*r*m*O*H,j=c.get(y);if(j){j.score+=W,Qn(j.terms,e);const $=Ve(j.match,t);$?$.push(h):j.match[t]=[h]}else c.set(y,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,n){const r=this._index.fetch(n,mt);let i=r.get(e);if(i==null)i=new Map,i.set(t,1),r.set(e,i);else{const s=i.get(t);i.set(t,(s||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const r=this._index.fetch(n,mt),i=r.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const r of Object.keys(this._fieldIds))if(this._fieldIds[r]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${r}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,r){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=r;const o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)}removeFieldLength(e,t,n,r){if(n===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:r}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const s of n){const o=r(t,s);o!==void 0&&(i[s]=o)}}}de.wildcard=Symbol("*");const Ve=(a,e)=>Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Jn={[Ge]:(a,e)=>{for(const t of e.keys()){const n=a.get(t);if(n==null)a.set(t,e.get(t));else{const{score:r,terms:i,match:s}=e.get(t);n.score=n.score+r,n.match=Object.assign(n.match,s),vt(n.terms,i)}}return a},[Ft]:(a,e)=>{const t=new Map;for(const n of e.keys()){const r=a.get(n);if(r==null)continue;const{score:i,terms:s,match:o}=e.get(n);vt(r.terms,s),t.set(n,{score:r.score+i,terms:r.terms,match:Object.assign(r.match,o)})}return t},[Kn]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},qn={k:1.2,b:.7,d:.5},Un=(a,e,t,n,r,i)=>{const{k:s,b:o,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(s+1)/(a+s*(1-o+o*n/r)))},Hn=a=>(e,t,n)=>{const r=typeof a.fuzzy=="function"?a.fuzzy(e,t,n):a.fuzzy||!1,i=typeof a.prefix=="function"?a.prefix(e,t,n):a.prefix===!0,s=typeof a.boostTerm=="function"?a.boostTerm(e,t,n):1;return{term:e,fuzzy:r,prefix:i,termBoost:s}},je={idField:"id",extractField:(a,e)=>a[e],stringifyField:(a,e)=>a.toString(),tokenize:a=>a.split(Yn),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:qn},Gn={combineWith:Ft,prefix:(a,e,t)=>e===t.length-1},qe={batchSize:1e3,batchWait:10},Ue={minDirtFactor:.1,minDirtCount:20},$e={...qe,...Ue},Qn=(a,e)=>{a.includes(e)||a.push(e)},vt=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},pt=({score:a},{score:e})=>e-a,mt=()=>new Map,Ee=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=async a=>{const e=new Map;let t=0;for(const n of Object.keys(a))e.set(parseInt(n,10),a[n]),++t%1e3===0&&await Rt(0);return e},Rt=a=>new Promise(e=>setTimeout(e,a)),Yn=/[\n\r\p{Z}\p{P}]+/u;class Zn{constructor(e=10){Me(this,"max");Me(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Xn=["aria-owns"],er={class:"shell"},tr=["title"],nr={class:"search-actions before"},rr=["title"],sr=["aria-activedescendant","aria-controls","placeholder"],ir={class:"search-actions"},ar=["title"],or=["disabled","title"],lr=["id","role","aria-labelledby"],cr=["id","aria-selected"],ur=["href","aria-label","onMouseenter","onFocusin","data-index"],dr={class:"titles"},fr=["innerHTML"],hr={class:"title main"},vr=["innerHTML"],pr={key:0,class:"excerpt-wrapper"},mr={key:0,class:"excerpt",inert:""},gr=["innerHTML"],br={key:0,class:"no-results"},yr={class:"search-keyboard-shortcuts"},wr=["aria-label"],Sr=["aria-label"],xr=["aria-label"],_r=["aria-label"],Tr=zt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var I,S;const t=e,n=ce(),r=ce(),i=ce(ln),s=an(),{activate:o}=zn(n,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=s,h=rt(async()=>{var v,d,x,R,A,C,D,F,V;return ot(de.loadJSON((x=await((d=(v=i.value)[l.value])==null?void 0:d.call(v)))==null?void 0:x.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((R=c.value.search)==null?void 0:R.provider)==="local"&&((C=(A=c.value.search.options)==null?void 0:A.miniSearch)==null?void 0:C.searchOptions)},...((D=c.value.search)==null?void 0:D.provider)==="local"&&((V=(F=c.value.search.options)==null?void 0:F.miniSearch)==null?void 0:V.options)}))}),p=be(()=>{var v,d;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((d=c.value.search.options)==null?void 0:d.disableQueryPersistence)===!0}).value?he(""):Vt("vitepress:local-search-filter",""),b=jt("vitepress:local-search-detailed-list",((I=c.value.search)==null?void 0:I.provider)==="local"&&((S=c.value.search.options)==null?void 0:S.detailedView)===!0),w=be(()=>{var v,d,x;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((d=c.value.search.options)==null?void 0:d.disableDetailedView)===!0||((x=c.value.search.options)==null?void 0:x.detailedView)===!1)}),k=be(()=>{var d,x,R,A,C,D,F;const v=((d=c.value.search)==null?void 0:d.options)??c.value.algolia;return((C=(A=(R=(x=v==null?void 0:v.locales)==null?void 0:x[l.value])==null?void 0:R.translations)==null?void 0:A.button)==null?void 0:C.buttonText)||((F=(D=v==null?void 0:v.translations)==null?void 0:D.button)==null?void 0:F.buttonText)||"Search"});$t(()=>{w.value&&(b.value=!1)});const y=ce([]),O=he(!1);Be(p,()=>{O.value=!1});const L=rt(async()=>{if(r.value)return ot(new jn(r.value))},null),K=new Zn(16);Bt(()=>[h.value,p.value,b.value],async([v,d,x],R,A)=>{var te,we,Qe,Ye;(R==null?void 0:R[0])!==v&&K.clear();let C=!1;if(A(()=>{C=!0}),!v)return;y.value=v.search(d).slice(0,16),O.value=!0;const D=x?await Promise.all(y.value.map(B=>H(B.id))):[];if(C)return;for(const{id:B,mod:ne}of D){const re=B.slice(0,B.indexOf("#"));let G=K.get(re);if(G)continue;G=new Map,K.set(re,G);const J=ne.default??ne;if(J!=null&&J.render||J!=null&&J.setup){const se=en(J);se.config.warnHandler=()=>{},se.provide(tn,s),Object.defineProperties(se.config.globalProperties,{$frontmatter:{get(){return s.frontmatter.value}},$params:{get(){return s.page.value.params}}});const Ze=document.createElement("div");se.mount(Ze),Ze.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(fe=>{var tt;const Se=(tt=fe.querySelector("a"))==null?void 0:tt.getAttribute("href"),Xe=(Se==null?void 0:Se.startsWith("#"))&&Se.slice(1);if(!Xe)return;let et="";for(;(fe=fe.nextElementSibling)&&!/^h[1-6]$/i.test(fe.tagName);)et+=fe.outerHTML;G.set(Xe,et)}),se.unmount()}if(C)return}const F=new Set;if(y.value=y.value.map(B=>{const[ne,re]=B.id.split("#"),G=K.get(ne),J=(G==null?void 0:G.get(re))??"";for(const se in B.match)F.add(se);return{...B,text:J}}),await ve(),C)return;await new Promise(B=>{var ne;(ne=L.value)==null||ne.unmark({done:()=>{var re;(re=L.value)==null||re.markRegExp(E(F),{done:B})}})});const V=((te=n.value)==null?void 0:te.querySelectorAll(".result .excerpt"))??[];for(const B of V)(we=B.querySelector('mark[data-markjs="true"]'))==null||we.scrollIntoView({block:"center"});(Ye=(Qe=r.value)==null?void 0:Qe.firstElementChild)==null||Ye.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function H(v){const d=nn(v.slice(0,v.indexOf("#")));try{if(!d)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(d)}}catch(x){return console.error(x),{id:v,mod:{}}}}const W=he(),j=be(()=>{var v;return((v=p.value)==null?void 0:v.length)<=0});function $(v=!0){var d,x;(d=W.value)==null||d.focus(),v&&((x=W.value)==null||x.select())}Le(()=>{$()});function Ce(v){v.pointerType==="mouse"&&$()}const M=he(-1),Z=he(!0);Be(y,v=>{M.value=v.length?0:-1,X()});function X(){ve(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}xe("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=y.value.length-1),Z.value=!0,X()}),xe("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=y.value.length&&(M.value=0),Z.value=!0,X()});const ee=Wt();xe("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const d=y.value[M.value];if(v.target instanceof HTMLInputElement&&!d){v.preventDefault();return}d&&(ee.go(d.id),t("close"))}),xe("Escape",()=>{t("close")});const u=on({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Le(()=>{window.history.pushState(null,"",null)}),Kt("popstate",v=>{v.preventDefault(),t("close")});const f=Jt(qt?document.body:null);Le(()=>{ve(()=>{f.value=!0,ve().then(()=>o())})}),Ut(()=>{f.value=!1});function g(){p.value="",ve().then(()=>$(!1))}function E(v){return new RegExp([...v].sort((d,x)=>x.length-d.length).map(d=>`(${rn(d)})`).join("|"),"gi")}function _(v){var R;if(!Z.value)return;const d=(R=v.target)==null?void 0:R.closest(".result"),x=Number.parseInt(d==null?void 0:d.dataset.index);x>=0&&x!==M.value&&(M.value=x),Z.value=!1}return(v,d)=>{var x,R,A,C,D;return q(),Ht(Xt,{to:"body"},[T("div",{ref_key:"el",ref:n,role:"button","aria-owns":(x=y.value)!=null&&x.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[T("div",{class:"backdrop",onClick:d[0]||(d[0]=F=>v.$emit("close"))}),T("div",er,[T("form",{class:"search-bar",onPointerup:d[4]||(d[4]=F=>Ce(F)),onSubmit:d[5]||(d[5]=Gt(()=>{},["prevent"]))},[T("label",{title:k.value,id:"localsearch-label",for:"localsearch-input"},[...d[7]||(d[7]=[T("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)])],8,tr),T("div",nr,[T("button",{class:"back-button",title:P(u)("modal.backButtonTitle"),onClick:d[1]||(d[1]=F=>v.$emit("close"))},[...d[8]||(d[8]=[T("span",{class:"vpi-arrow-left local-search-icon"},null,-1)])],8,rr)]),Qt(T("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":d[2]||(d[2]=F=>Zt(p)?p.value=F:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(R=y.value)!=null&&R.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:k.value,spellcheck:"false",type:"search"},null,8,sr),[[Yt,P(p)]]),T("div",ir,[w.value?_e("",!0):(q(),Q("button",{key:0,class:st(["toggle-layout-button",{"detailed-list":P(b)}]),type:"button",title:P(u)("modal.displayDetails"),onClick:d[3]||(d[3]=F=>M.value>-1&&(b.value=!P(b)))},[...d[9]||(d[9]=[T("span",{class:"vpi-layout-list local-search-icon"},null,-1)])],10,ar)),T("button",{class:"clear-button",type:"reset",disabled:j.value,title:P(u)("modal.resetButtonTitle"),onClick:g},[...d[10]||(d[10]=[T("span",{class:"vpi-delete local-search-icon"},null,-1)])],8,or)])],32),T("ul",{ref_key:"resultsEl",ref:r,id:(A=y.value)!=null&&A.length?"localsearch-list":void 0,role:(C=y.value)!=null&&C.length?"listbox":void 0,"aria-labelledby":(D=y.value)!=null&&D.length?"localsearch-label":void 0,class:"results",onMousemove:_},[(q(!0),Q(at,null,it(y.value,(F,V)=>(q(),Q("li",{key:F.id,id:"localsearch-item-"+V,"aria-selected":M.value===V?"true":"false",role:"option"},[T("a",{href:F.id,class:st(["result",{selected:M.value===V}]),"aria-label":[...F.titles,F.title].join(" > "),onMouseenter:te=>!Z.value&&(M.value=V),onFocusin:te=>M.value=V,onClick:d[6]||(d[6]=te=>v.$emit("close")),"data-index":V},[T("div",null,[T("div",dr,[d[12]||(d[12]=T("span",{class:"title-icon"},"#",-1)),(q(!0),Q(at,null,it(F.titles,(te,we)=>(q(),Q("span",{key:we,class:"title"},[T("span",{class:"text",innerHTML:te},null,8,fr),d[11]||(d[11]=T("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),T("span",hr,[T("span",{class:"text",innerHTML:F.title},null,8,vr)])]),P(b)?(q(),Q("div",pr,[F.text?(q(),Q("div",mr,[T("div",{class:"vp-doc",innerHTML:F.text},null,8,gr)])):_e("",!0),d[13]||(d[13]=T("div",{class:"excerpt-gradient-bottom"},null,-1)),d[14]||(d[14]=T("div",{class:"excerpt-gradient-top"},null,-1))])):_e("",!0)])],42,ur)],8,cr))),128)),P(p)&&!y.value.length&&O.value?(q(),Q("li",br,[pe(me(P(u)("modal.noResultsText"))+' "',1),T("strong",null,me(P(p)),1),d[15]||(d[15]=pe('" ',-1))])):_e("",!0)],40,lr),T("div",yr,[T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.navigateUpKeyAriaLabel")},[...d[16]||(d[16]=[T("span",{class:"vpi-arrow-up navigate-icon"},null,-1)])],8,wr),T("kbd",{"aria-label":P(u)("modal.footer.navigateDownKeyAriaLabel")},[...d[17]||(d[17]=[T("span",{class:"vpi-arrow-down navigate-icon"},null,-1)])],8,Sr),pe(" "+me(P(u)("modal.footer.navigateText")),1)]),T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.selectKeyAriaLabel")},[...d[18]||(d[18]=[T("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)])],8,xr),pe(" "+me(P(u)("modal.footer.selectText")),1)]),T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.closeKeyAriaLabel")},"esc",8,_r),pe(" "+me(P(u)("modal.footer.closeText")),1)])])])],8,Xn)])}}}),Rr=sn(Tr,[["__scopeId","data-v-2b3edf82"]]);export{Rr as default};
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function dt(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(t),!0).forEach(function(n){In(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function Fn(a){return En(a)||kn(a)||_t(a)||Nn()}function Rn(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function On(a){var e=Rn(a,"string");return typeof e=="symbol"?e:e+""}function _t(a,e){if(a){if(typeof a=="string")return Ke(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ke(a,e):void 0}}var q={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){var n=q.getActiveTrap(e);t!==n&&q.pauseTrap(e);var r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),q.unpauseTrap(e)},pauseTrap:function(e){var t=q.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=q.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},An=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cn=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ye=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Mn=function(e){return ye(e)&&!e.shiftKey},Ln=function(e){return ye(e)&&e.shiftKey},ft=function(e){return setTimeout(e,0)},ge=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},Te=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Dn=[],Pn=function(e,t){var n=(t==null?void 0:t.document)||document,r=(t==null?void 0:t.trapStack)||Dn,i=dt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Mn,isKeyBackward:Ln},t),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,l=function(u,f,g){return u&&u[f]!==void 0?u[f]:i[g||f]},c=function(u,f){var g=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return s.containerGroups.findIndex(function(E){var _=E.container,I=E.tabbableNodes;return _.contains(u)||(g==null?void 0:g.includes(_))||I.find(function(S){return S===u})})},h=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=f.hasFallback,E=g===void 0?!1:g,_=f.params,I=_===void 0?[]:_,S=i[u];if(typeof S=="function"&&(S=S.apply(void 0,Fn(I))),S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var v=S;if(typeof S=="string"){try{v=n.querySelector(S)}catch(d){throw new Error("`".concat(u,'` appears to be an invalid selector; error="').concat(d.message,'"'))}if(!v&&!E)throw new Error("`".concat(u,"` as selector refers to no known node"))}return v},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!De(u,i.tabbableOptions))if(c(n.activeElement)>=0)u=n.activeElement;else{var f=s.tabbableGroups[0],g=f&&f.firstTabbableNode;u=g||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},p=function(){if(s.containerGroups=s.containers.map(function(u){var f=xn(u,i.tabbableOptions),g=_n(u,i.tabbableOptions),E=f.length>0?f[0]:void 0,_=f.length>0?f[f.length-1]:void 0,I=g.find(function(d){return oe(d)}),S=g.slice().reverse().find(function(d){return oe(d)}),v=!!f.find(function(d){return ie(d)>0});return{container:u,tabbableNodes:f,focusableNodes:g,posTabIndexesFound:v,firstTabbableNode:E,lastTabbableNode:_,firstDomTabbableNode:I,lastDomTabbableNode:S,nextTabbableNode:function(x){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,A=f.indexOf(x);return A<0?R?g.slice(g.indexOf(x)+1).find(function(C){return oe(C)}):g.slice(0,g.indexOf(x)).reverse().find(function(C){return oe(C)}):f[A+(R?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(u){return u.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(u){var f=u.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?b(f.shadowRoot):f},w=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){w(m());return}u.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=u,An(u)&&u.select()}},k=function(u){var f=h("setReturnFocus",{params:[u]});return f||(f===!1?!1:u)},y=function(u){var f=u.target,g=u.event,E=u.isBackward,_=E===void 0?!1:E;f=f||Te(g),p();var I=null;if(s.tabbableGroups.length>0){var S=c(f,g),v=S>=0?s.containerGroups[S]:void 0;if(S<0)_?I=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:I=s.tabbableGroups[0].firstTabbableNode;else if(_){var d=s.tabbableGroups.findIndex(function(F){var V=F.firstTabbableNode;return f===V});if(d<0&&(v.container===f||De(f,i.tabbableOptions)&&!oe(f,i.tabbableOptions)&&!v.nextTabbableNode(f,!1))&&(d=S),d>=0){var x=d===0?s.tabbableGroups.length-1:d-1,R=s.tabbableGroups[x];I=ie(f)>=0?R.lastTabbableNode:R.lastDomTabbableNode}else ye(g)||(I=v.nextTabbableNode(f,!1))}else{var A=s.tabbableGroups.findIndex(function(F){var V=F.lastTabbableNode;return f===V});if(A<0&&(v.container===f||De(f,i.tabbableOptions)&&!oe(f,i.tabbableOptions)&&!v.nextTabbableNode(f))&&(A=S),A>=0){var C=A===s.tabbableGroups.length-1?0:A+1,D=s.tabbableGroups[C];I=ie(f)>=0?D.firstTabbableNode:D.firstDomTabbableNode}else ye(g)||(I=v.nextTabbableNode(f))}}else I=h("fallbackFocus");return I},O=function(u){var f=Te(u);if(!(c(f,u)>=0)){if(ge(i.clickOutsideDeactivates,u)){o.deactivate({returnFocus:i.returnFocusOnDeactivate});return}ge(i.allowOutsideClick,u)||u.preventDefault()}},L=function(u){var f=Te(u),g=c(f,u)>=0;if(g||f instanceof Document)g&&(s.mostRecentlyFocusedNode=f);else{u.stopImmediatePropagation();var E,_=!0;if(s.mostRecentlyFocusedNode)if(ie(s.mostRecentlyFocusedNode)>0){var I=c(s.mostRecentlyFocusedNode),S=s.containerGroups[I].tabbableNodes;if(S.length>0){var v=S.findIndex(function(d){return d===s.mostRecentlyFocusedNode});v>=0&&(i.isKeyForward(s.recentNavEvent)?v+1<S.length&&(E=S[v+1],_=!1):v-1>=0&&(E=S[v-1],_=!1))}}else s.containerGroups.some(function(d){return d.tabbableNodes.some(function(x){return ie(x)>0})})||(_=!1);else _=!1;_&&(E=y({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),w(E||s.mostRecentlyFocusedNode||m())}s.recentNavEvent=void 0},K=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=u;var g=y({event:u,isBackward:f});g&&(ye(u)&&u.preventDefault(),w(g))},H=function(u){(i.isKeyForward(u)||i.isKeyBackward(u))&&K(u,i.isKeyBackward(u))},W=function(u){Cn(u)&&ge(i.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},j=function(u){var f=Te(u);c(f,u)>=0||ge(i.clickOutsideDeactivates,u)||ge(i.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},$=function(){if(s.active)return q.activateTrap(r,o),s.delayInitialFocusTimer=i.delayInitialFocus?ft(function(){w(m())}):w(m()),n.addEventListener("focusin",L,!0),n.addEventListener("mousedown",O,{capture:!0,passive:!1}),n.addEventListener("touchstart",O,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",H,{capture:!0,passive:!1}),n.addEventListener("keydown",W),o},Ce=function(u){s.active&&!s.paused&&o._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadySilent.clear();var f=new Set,g=new Set,E=ct(u),_;try{for(E.s();!(_=E.n()).done;){var I=_.value;f.add(I);for(var S=typeof ShadowRoot<"u"&&I.getRootNode()instanceof ShadowRoot,v=I;v;){f.add(v);var d=v.parentElement,x=[];d?x=d.children:!d&&S&&(x=v.getRootNode().children,d=v.getRootNode().host,S=typeof ShadowRoot<"u"&&d.getRootNode()instanceof ShadowRoot);var R=ct(x),A;try{for(R.s();!(A=R.n()).done;){var C=A.value;g.add(C)}}catch(D){R.e(D)}finally{R.f()}v=d}}}catch(D){E.e(D)}finally{E.f()}f.forEach(function(D){g.delete(D)}),s.adjacentElements=g},M=function(){if(s.active)return n.removeEventListener("focusin",L,!0),n.removeEventListener("mousedown",O,!0),n.removeEventListener("touchstart",O,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",H,!0),n.removeEventListener("keydown",W),o},Z=function(u){var f=u.some(function(g){var E=Array.from(g.removedNodes);return E.some(function(_){return _===s.mostRecentlyFocusedNode})});f&&w(m())},X=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Z):void 0,ee=function(){X&&(X.disconnect(),s.active&&!s.paused&&s.containers.map(function(u){X.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return s.active},get paused(){return s.paused},activate:function(u){if(s.active)return this;var f=l(u,"onActivate"),g=l(u,"onPostActivate"),E=l(u,"checkCanFocusTrap"),_=q.getActiveTrap(r),I=!1;if(_&&!_.paused){var S;(S=_._setSubtreeIsolation)===null||S===void 0||S.call(_,!1),I=!0}try{E||p(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=b(n),f==null||f();var v=function(){E&&p(),$(),ee(),i.isolateSubtrees&&o._setSubtreeIsolation(!0),g==null||g()};if(E)return E(s.containers.concat()).then(v,v),this;v()}catch(x){if(_===q.getActiveTrap(r)&&I){var d;(d=_._setSubtreeIsolation)===null||d===void 0||d.call(_,!0)}throw x}return this},deactivate:function(u){if(!s.active)return this;var f=dt({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},u);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||o._setSubtreeIsolation(!1),s.alreadySilent.clear(),M(),s.active=!1,s.paused=!1,ee(),q.deactivateTrap(r,o);var g=l(f,"onDeactivate"),E=l(f,"onPostDeactivate"),_=l(f,"checkCanReturnFocus"),I=l(f,"returnFocus","returnFocusOnDeactivate");g==null||g();var S=function(){ft(function(){I&&w(k(s.nodeFocusedBeforeActivation)),E==null||E()})};return I&&_?(_(k(s.nodeFocusedBeforeActivation)).then(S,S),this):(S(),this)},pause:function(u){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,u)):this},unpause:function(u){return s.active?(s.manuallyPaused=!1,r[r.length-1]!==this?this:this._setPausedState(!1,u)):this},updateContainerElements:function(u){var f=[].concat(u).filter(Boolean);return s.containers=f.map(function(g){return typeof g=="string"?n.querySelector(g):g}),i.isolateSubtrees&&Ce(s.containers),s.active&&(p(),i.isolateSubtrees&&!s.paused&&o._setSubtreeIsolation(!0)),ee(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(u,f){if(s.paused===u)return this;if(s.paused=u,u){var g=l(f,"onPause"),E=l(f,"onPostPause");g==null||g(),M(),ee(),o._setSubtreeIsolation(!1),E==null||E()}else{var _=l(f,"onUnpause"),I=l(f,"onPostUnpause");_==null||_(),o._setSubtreeIsolation(!0),p(),$(),ee(),I==null||I()}return this}},_setSubtreeIsolation:{value:function(u){i.isolateSubtrees&&s.adjacentElements.forEach(function(f){var g;if(u)switch(i.isolateSubtrees){case"aria-hidden":(f.ariaHidden==="true"||((g=f.getAttribute("aria-hidden"))===null||g===void 0?void 0:g.toLowerCase())==="true")&&s.alreadySilent.add(f),f.setAttribute("aria-hidden","true");break;default:(f.inert||f.hasAttribute("inert"))&&s.alreadySilent.add(f),f.setAttribute("inert",!0);break}else if(!s.alreadySilent.has(f))switch(i.isolateSubtrees){case"aria-hidden":f.removeAttribute("aria-hidden");break;default:f.removeAttribute("inert");break}})}}}),o.updateContainerElements(e),o};function zn(a,e={}){let t;const{immediate:n,...r}=e,i=ce(!1),s=ce(!1),o=p=>t&&t.activate(p),l=p=>t&&t.deactivate(p),c=()=>{t&&(t.pause(),s.value=!0)},h=()=>{t&&(t.unpause(),s.value=!1)},m=be(()=>{const p=nt(a);return Lt(p).map(b=>{const w=nt(b);return typeof w=="string"?w:Dt(w)}).filter(Pt)});return Be(m,p=>{p.length&&(t=Pn(p,{...r,onActivate(){i.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){i.value=!1,e.onDeactivate&&e.onDeactivate()}}),n&&o())},{flush:"post"}),Mt(()=>l()),{hasFocus:i,isPaused:s,activate:o,deactivate:l,pause:c,unpause:h}}class ue{constructor(e,t=!0,n=[],r=5e3){this.ctx=e,this.iframes=t,this.exclude=n,this.iframesTimeout=r}static matches(e,t){const n=typeof t=="string"?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){let i=!1;return n.every(s=>r.call(e,s)?(i=!0,!1):!0),i}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(n=>{const r=t.filter(i=>i.contains(n)).length>0;t.indexOf(n)===-1&&!r&&t.push(n)}),t}getIframeContents(e,t,n=()=>{}){let r;try{const i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch{n()}r&&t(r)}isIframeBlank(e){const t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}observeIframeLoad(e,t,n){let r=!1,i=null;const s=()=>{if(!r){r=!0,clearTimeout(i);try{this.isIframeBlank(e)||(e.removeEventListener("load",s),this.getIframeContents(e,t,n))}catch{n()}}};e.addEventListener("load",s),i=setTimeout(s,this.iframesTimeout)}onIframeReady(e,t,n){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch{n()}}waitForIframes(e,t){let n=0;this.forEachIframe(e,()=>!0,r=>{n++,this.waitForIframes(r.querySelector("html"),()=>{--n||t()})},r=>{r||t()})}forEachIframe(e,t,n,r=()=>{}){let i=e.querySelectorAll("iframe"),s=i.length,o=0;i=Array.prototype.slice.call(i);const l=()=>{--s<=0&&r(o)};s||l(),i.forEach(c=>{ue.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,n(h)),l()},l)})}createIterator(e,t,n){return document.createNodeIterator(e,t,n,!1)}createInstanceOnIframe(e){return new ue(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,n){const r=e.compareDocumentPosition(n),i=Node.DOCUMENT_POSITION_PRECEDING;if(r&i)if(t!==null){const s=t.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_FOLLOWING;if(s&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let n;return t===null?n=e.nextNode():n=e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}checkIframeFilter(e,t,n,r){let i=!1,s=!1;return r.forEach((o,l)=>{o.val===n&&(i=l,s=o.handled)}),this.compareNodeIframe(e,t,n)?(i===!1&&!s?r.push({val:n,handled:!0}):i!==!1&&!s&&(r[i].handled=!0),!0):(i===!1&&r.push({val:n,handled:!1}),!1)}handleOpenIframes(e,t,n,r){e.forEach(i=>{i.handled||this.getIframeContents(i.val,s=>{this.createInstanceOnIframe(s).forEachNode(t,n,r)})})}iterateThroughNodes(e,t,n,r,i){const s=this.createIterator(t,e,r);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(s),c);for(;m();)this.iframes&&this.forEachIframe(t,p=>this.checkIframeFilter(c,h,p,o),p=>{this.createInstanceOnIframe(p).forEachNode(e,b=>l.push(b),r)}),l.push(c);l.forEach(p=>{n(p)}),this.iframes&&this.handleOpenIframes(o,e,n,r),i()}forEachNode(e,t,n,r=()=>{}){const i=this.getContexts();let s=i.length;s||r(),i.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,n,()=>{--s<=0&&r()})};this.iframes?this.waitForIframes(o,l):l()})}}let Vn=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ue(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const n=this.opt.log;this.opt.debug&&typeof n=="object"&&typeof n[t]=="function"&&n[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let i in t)if(t.hasOwnProperty(i)){const s=t[i],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(s):this.escapeStr(s);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${n}`),r+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+r))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,n,r)=>{let i=r.charAt(n+1);return/[(|)\\]/.test(i)||i===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let r=[];return e.split("").forEach(i=>{n.every(s=>{if(s.indexOf(i)!==-1){if(r.indexOf(s)>-1)return!1;e=e.replace(new RegExp(`[${s}]`,`gm${t}`),`[${s}]`),r.push(s)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let n=this.opt.accuracy,r=typeof n=="string"?n:n.value,i=typeof n=="string"?[]:n.limiters,s="";switch(i.forEach(o=>{s+=`|${this.escapeStr(o)}`}),r){case"partially":default:return`()(${e})`;case"complementary":return s="\\s"+(s||this.escapeStr(t)),`()([^${s}]*${e}[^${s}]*)`;case"exactly":return`(^|\\s${s})(${e})(?=$|\\s${s})`}}getSeparatedKeywords(e){let t=[];return e.forEach(n=>{this.opt.separateWordSearch?n.split(" ").forEach(r=>{r.trim()&&t.indexOf(r)===-1&&t.push(r)}):n.trim()&&t.indexOf(n)===-1&&t.push(n)}),{keywords:t.sort((n,r)=>r.length-n.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let n=0;return e.sort((r,i)=>r.start-i.start).forEach(r=>{let{start:i,end:s,valid:o}=this.callNoMatchOnInvalidRanges(r,n);o&&(r.start=i,r.length=s-i,t.push(r),n=s)}),t}callNoMatchOnInvalidRanges(e,t){let n,r,i=!1;return e&&typeof e.start<"u"?(n=parseInt(e.start,10),r=n+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:n,end:r,valid:i}}checkWhitespaceRanges(e,t,n){let r,i=!0,s=n.length,o=t-s,l=parseInt(e.start,10)-o;return l=l>s?s:l,r=l+parseInt(e.length,10),r>s&&(r=s,this.log(`End range automatically set to the max value of ${s}`)),l<0||r-l<0||l>s||r>s?(i=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):n.substring(l,r).replace(/\s+/g,"")===""&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:r,valid:i}}getTextNodes(e){let t="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,r=>{n.push({start:t.length,end:(t+=r.textContent).length,node:r})},r=>this.matchesExclude(r.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:n})})}matchesExclude(e){return ue.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,n){const r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),s=i.splitText(n-t);let o=document.createElement(r);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),s}wrapRangeInMappedTextNode(e,t,n,r,i){e.nodes.every((s,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!r(s.node))return!1;const c=t-s.start,h=(n>s.end?s.end:n)-s.start,m=e.value.substr(0,s.start),p=e.value.substr(h+s.start);if(s.node=this.wrapRangeInTextNode(s.node,c,h),e.value=m+p,e.nodes.forEach((b,w)=>{w>=o&&(e.nodes[w].start>0&&w!==o&&(e.nodes[w].start-=h),e.nodes[w].end-=h)}),n-=h,i(s.node.previousSibling,s.start),n>s.end)t=s.end;else return!1}return!0})}wrapMatches(e,t,n,r,i){const s=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[s]!=="";){if(!n(c[s],l))continue;let h=c.index;if(s!==0)for(let m=1;m<s;m++)h+=c[m].length;l=this.wrapRangeInTextNode(l,h,h+c[s].length),r(l.previousSibling),e.lastIndex=0}}),i()})}wrapMatchesAcrossElements(e,t,n,r,i){const s=t===0?0:t+1;this.getTextNodes(o=>{let l;for(;(l=e.exec(o.value))!==null&&l[s]!=="";){let c=l.index;if(s!==0)for(let m=1;m<s;m++)c+=l[m].length;const h=c+l[s].length;this.wrapRangeInMappedTextNode(o,c,h,m=>n(l[s],m),(m,p)=>{e.lastIndex=p,r(m)})}i()})}wrapRangeFromIndex(e,t,n,r){this.getTextNodes(i=>{const s=i.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,s,i.value);m&&this.wrapRangeInMappedTextNode(i,c,h,p=>t(p,o,i.value.substring(c,h),l),p=>{n(p,o)})}),r()})}unwrapMatches(e){const t=e.parentNode;let n=document.createDocumentFragment();for(;e.firstChild;)n.appendChild(e.removeChild(e.firstChild));t.replaceChild(n,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let n=0,r="wrapMatches";const i=s=>{n++,this.opt.each(s)};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),this[r](e,this.opt.ignoreGroups,(s,o)=>this.opt.filter(o,s,n),i,()=>{n===0&&this.opt.noMatch(e),this.opt.done(n)})}mark(e,t){this.opt=t;let n=0,r="wrapMatches";const{keywords:i,length:s}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[r](h,1,(p,b)=>this.opt.filter(b,c,n,m),p=>{m++,n++,this.opt.each(p)},()=>{m===0&&this.opt.noMatch(c),i[s-1]===c?this.opt.done(n):l(i[i.indexOf(c)+1])})};this.opt.acrossElements&&(r="wrapMatchesAcrossElements"),s===0?this.opt.done(n):l(i[0])}markRanges(e,t){this.opt=t;let n=0,r=this.checkRanges(e);r&&r.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(r)),this.wrapRangeFromIndex(r,(i,s,o,l)=>this.opt.filter(i,s,o,l),(i,s)=>{n++,this.opt.each(i,s)},()=>{this.opt.done(n)})):this.opt.done(n)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,n=>{this.unwrapMatches(n)},n=>{const r=ue.matches(n,t),i=this.matchesExclude(n);return!r||i?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function jn(a){const e=new Vn(a);return this.mark=(t,n)=>(e.mark(t,n),this),this.markRegExp=(t,n)=>(e.markRegExp(t,n),this),this.markRanges=(t,n)=>(e.markRanges(t,n),this),this.unmark=t=>(e.unmark(t),this),this}const $n="ENTRIES",Tt="KEYS",Et="VALUES",z="";class Pe{constructor(e,t){const n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=le(this._path);if(le(t)===z)return{done:!1,value:this.result()};const n=e.get(le(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>le(e)).filter(e=>e!==z).join("")}value(){return le(this._path).node.get(z)}result(){switch(this._type){case Et:return this.value();case Tt:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const le=a=>a[a.length-1],Bn=(a,e,t)=>{const n=new Map;if(e===void 0)return n;const r=e.length+1,i=r+t,s=new Uint8Array(i*r).fill(t+1);for(let o=0;o<r;++o)s[o]=o;for(let o=1;o<i;++o)s[o*r]=o;return It(a,e,t,n,s,1,r,""),n},It=(a,e,t,n,r,i,s,o)=>{const l=i*s;e:for(const c of a.keys())if(c===z){const h=r[l-1];h<=t&&n.set(o,[a.get(c),h])}else{let h=i;for(let m=0;m<c.length;++m,++h){const p=c[m],b=s*h,w=b-s;let k=r[b];const y=Math.max(0,h-t-1),O=Math.min(s-1,h+t);for(let L=y;L<O;++L){const K=p!==e[L],H=r[w+L]+ +K,W=r[w+L+1]+1,j=r[b+L]+1,$=r[b+L+1]=Math.min(H,W,j);$<k&&(k=$)}if(k>t)continue e}It(a.get(c),e,t,n,r,h,s,o+c)}};class Y{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,n]=Ae(this._tree,e.slice(this._prefix.length));if(t===void 0){const[r,i]=He(n);for(const s of r.keys())if(s!==z&&s.startsWith(i)){const o=new Map;return o.set(s.slice(i.length),r.get(s)),new Y(o,e)}}return new Y(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Wn(this._tree,e)}entries(){return new Pe(this,$n)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return Bn(this._tree,e,t)}get(e){const t=Je(this._tree,e);return t!==void 0?t.get(z):void 0}has(e){const t=Je(this._tree,e);return t!==void 0&&t.has(z)}keys(){return new Pe(this,Tt)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(z,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ze(this._tree,e);return n.set(z,t(n.get(z))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ze(this._tree,e);let r=n.get(z);return r===void 0&&n.set(z,r=t()),r}values(){return new Pe(this,Et)}[Symbol.iterator](){return this.entries()}static from(e){const t=new Y;for(const[n,r]of e)t.set(n,r);return t}static fromObject(e){return Y.from(Object.entries(e))}}const Ae=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const n of a.keys())if(n!==z&&e.startsWith(n))return t.push([a,n]),Ae(a.get(n),e.slice(n.length),t);return t.push([a,e]),Ae(void 0,"",t)},Je=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==z&&e.startsWith(t))return Je(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let n=0;a&&n<t;){for(const i of a.keys())if(i!==z&&e[n]===i[0]){const s=Math.min(t-n,i.length);let o=1;for(;o<s&&e[n+o]===i[o];)++o;const l=a.get(i);if(o===i.length)a=l;else{const c=new Map;c.set(i.slice(o),l),a.set(e.slice(n,n+o),c),a.delete(i),a=c}n+=o;continue e}const r=new Map;return a.set(e.slice(n),r),r}return a},Wn=(a,e)=>{const[t,n]=Ae(a,e);if(t!==void 0){if(t.delete(z),t.size===0)kt(n);else if(t.size===1){const[r,i]=t.entries().next().value;Nt(n,r,i)}}},kt=a=>{if(a.length===0)return;const[e,t]=He(a);if(e.delete(t),e.size===0)kt(a.slice(0,-1));else if(e.size===1){const[n,r]=e.entries().next().value;n!==z&&Nt(a.slice(0,-1),n,r)}},Nt=(a,e,t)=>{if(a.length===0)return;const[n,r]=He(a);n.set(r+e,t),n.delete(r)},He=a=>a[a.length-1],Ge="or",Ft="and",Kn="and_not";class de{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?$e:e.autoVacuum;this._options={...je,...e,autoVacuum:t,searchOptions:{...ht,...e.searchOptions||{}},autoSuggestOptions:{...Gn,...e.autoSuggestOptions||{}}},this._index=new Y,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=qe,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:n,tokenize:r,processTerm:i,fields:s,idField:o}=this._options,l=t(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,e);for(const h of s){const m=t(e,h);if(m==null)continue;const p=r(n(m,h),h),b=this._fieldIds[h],w=new Set(p).size;this.addFieldLength(c,b,this._documentCount-1,w);for(const k of p){const y=i(k,h);if(Array.isArray(y))for(const O of y)this.addTerm(b,c,O);else y&&this.addTerm(b,c,y)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,r={chunk:[],promise:Promise.resolve()},{chunk:i,promise:s}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),r);return s.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:n,extractField:r,stringifyField:i,fields:s,idField:o}=this._options,l=r(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const h of s){const m=r(e,h);if(m==null)continue;const p=t(i(m,h),h),b=this._fieldIds[h],w=new Set(p).size;this.removeFieldLength(c,b,this._documentCount,w);for(const k of p){const y=n(k,h);if(Array.isArray(y))for(const O of y)this.removeTerm(b,c,O);else y&&this.removeTerm(b,c,y)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Y,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((n,r)=>{this.removeFieldLength(t,r,this._documentCount,n)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:r}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:r},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of e)this.discard(n)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:n}=this._options,r=n(e,t);this.discard(r),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=qe,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const r=e.batchSize||Ue.batchSize,i=e.batchWait||Ue.batchWait;let s=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),s%r===0&&await new Promise(c=>setTimeout(c,i)),s+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||$e.minDirtCount,n=n||$e.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:n}=this._options,r={...n,...t},i=this.executeQuery(e,t),s=[];for(const[o,{score:l,terms:c,match:h}]of i){const m=c.length||1,p={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(p,this._storedFields.get(o)),(r.filter==null||r.filter(p))&&s.push(p)}return e===de.wildcard&&r.boostDocument==null||s.sort(pt),s}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:i,terms:s}of this.search(e,t)){const o=s.join(" "),l=n.get(o);l!=null?(l.score+=i,l.count+=1):n.set(o,{score:i,terms:s,count:1})}const r=[];for(const[i,{score:s,terms:o,count:l}]of n)r.push({suggestion:i,terms:o,score:s/l});return r.sort(pt),r}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(je.hasOwnProperty(e))return Ve(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:r,fieldLength:i,storedFields:s,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Ee(r),l._fieldLength=Ee(i),l._storedFields=Ee(s);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of n){const m=new Map;for(const p of Object.keys(h)){let b=h[p];o===1&&(b=b.ds),m.set(parseInt(p,10),Ee(b))}l._index.set(c,m)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:r,fieldLength:i,storedFields:s,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await Ie(r),l._fieldLength=await Ie(i),l._storedFields=await Ie(s);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of n){const p=new Map;for(const b of Object.keys(m)){let w=m[b];o===1&&(w=w.ds),p.set(parseInt(b,10),await Ie(w))}++c%1e3===0&&await Rt(0),l._index.set(h,p)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:r,fieldIds:i,averageFieldLength:s,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new de(t);return c._documentCount=n,c._nextId=r,c._idToShortId=new Map,c._fieldIds=i,c._avgFieldLength=s,c._dirtCount=o||0,c._index=new Y,c}executeQuery(e,t={}){if(e===de.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const p={...t,...e,queries:void 0},b=e.queries.map(w=>this.executeQuery(w,p));return this.combineResults(b,p.combineWith)}const{tokenize:n,processTerm:r,searchOptions:i}=this._options,s={tokenize:n,processTerm:r,...i,...t},{tokenize:o,processTerm:l}=s,m=o(e).flatMap(p=>l(p)).filter(p=>!!p).map(Hn(s)).map(p=>this.executeQuerySpec(p,s));return this.combineResults(m,s.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},r=(n.fields||this._options.fields).reduce((k,y)=>({...k,[y]:Ve(n.boost,y)||1}),{}),{boostDocument:i,weights:s,maxFuzzy:o,bm25:l}=n,{fuzzy:c,prefix:h}={...ht.weights,...s},m=this._index.get(e.term),p=this.termResults(e.term,e.term,1,e.termBoost,m,r,i,l);let b,w;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const k=e.fuzzy===!0?.2:e.fuzzy,y=k<1?Math.min(o,Math.round(e.term.length*k)):k;y&&(w=this._index.fuzzyGet(e.term,y))}if(b)for(const[k,y]of b){const O=k.length-e.term.length;if(!O)continue;w==null||w.delete(k);const L=h*k.length/(k.length+.3*O);this.termResults(e.term,k,L,e.termBoost,y,r,i,l,p)}if(w)for(const k of w.keys()){const[y,O]=w.get(k);if(!O)continue;const L=c*k.length/(k.length+O);this.termResults(e.term,k,L,e.termBoost,y,r,i,l,p)}return p}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[r,i]of this._documentIds){const s=n.boostDocument?n.boostDocument(i,"",this._storedFields.get(r)):1;t.set(r,{score:s,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const n=t.toLowerCase(),r=Jn[n];if(!r)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(r)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const r={};for(const[i,s]of n)r[i]=Object.fromEntries(s);e.push([t,r])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,n,r,i,s,o,l,c=new Map){if(i==null)return c;for(const h of Object.keys(s)){const m=s[h],p=this._fieldIds[h],b=i.get(p);if(b==null)continue;let w=b.size;const k=this._avgFieldLength[p];for(const y of b.keys()){if(!this._documentIds.has(y)){this.removeTerm(p,y,t),w-=1;continue}const O=o?o(this._documentIds.get(y),t,this._storedFields.get(y)):1;if(!O)continue;const L=b.get(y),K=this._fieldLength.get(y)[p],H=qn(L,w,this._documentCount,K,k,l),W=n*r*m*O*H,j=c.get(y);if(j){j.score+=W,Qn(j.terms,e);const $=Ve(j.match,t);$?$.push(h):j.match[t]=[h]}else c.set(y,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,n){const r=this._index.fetch(n,mt);let i=r.get(e);if(i==null)i=new Map,i.set(t,1),r.set(e,i);else{const s=i.get(t);i.set(t,(s||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const r=this._index.fetch(n,mt),i=r.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const r of Object.keys(this._fieldIds))if(this._fieldIds[r]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${r}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,r){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=r;const o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)}removeFieldLength(e,t,n,r){if(n===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:r}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const s of n){const o=r(t,s);o!==void 0&&(i[s]=o)}}}de.wildcard=Symbol("*");const Ve=(a,e)=>Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Jn={[Ge]:(a,e)=>{for(const t of e.keys()){const n=a.get(t);if(n==null)a.set(t,e.get(t));else{const{score:r,terms:i,match:s}=e.get(t);n.score=n.score+r,n.match=Object.assign(n.match,s),vt(n.terms,i)}}return a},[Ft]:(a,e)=>{const t=new Map;for(const n of e.keys()){const r=a.get(n);if(r==null)continue;const{score:i,terms:s,match:o}=e.get(n);vt(r.terms,s),t.set(n,{score:r.score+i,terms:r.terms,match:Object.assign(r.match,o)})}return t},[Kn]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},Un={k:1.2,b:.7,d:.5},qn=(a,e,t,n,r,i)=>{const{k:s,b:o,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(s+1)/(a+s*(1-o+o*n/r)))},Hn=a=>(e,t,n)=>{const r=typeof a.fuzzy=="function"?a.fuzzy(e,t,n):a.fuzzy||!1,i=typeof a.prefix=="function"?a.prefix(e,t,n):a.prefix===!0,s=typeof a.boostTerm=="function"?a.boostTerm(e,t,n):1;return{term:e,fuzzy:r,prefix:i,termBoost:s}},je={idField:"id",extractField:(a,e)=>a[e],stringifyField:(a,e)=>a.toString(),tokenize:a=>a.split(Yn),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Un},Gn={combineWith:Ft,prefix:(a,e,t)=>e===t.length-1},Ue={batchSize:1e3,batchWait:10},qe={minDirtFactor:.1,minDirtCount:20},$e={...Ue,...qe},Qn=(a,e)=>{a.includes(e)||a.push(e)},vt=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},pt=({score:a},{score:e})=>e-a,mt=()=>new Map,Ee=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=async a=>{const e=new Map;let t=0;for(const n of Object.keys(a))e.set(parseInt(n,10),a[n]),++t%1e3===0&&await Rt(0);return e},Rt=a=>new Promise(e=>setTimeout(e,a)),Yn=/[\n\r\p{Z}\p{P}]+/u;class Zn{constructor(e=10){Me(this,"max");Me(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Xn=["aria-owns"],er={class:"shell"},tr=["title"],nr={class:"search-actions before"},rr=["title"],sr=["aria-activedescendant","aria-controls","placeholder"],ir={class:"search-actions"},ar=["title"],or=["disabled","title"],lr=["id","role","aria-labelledby"],cr=["id","aria-selected"],ur=["href","aria-label","onMouseenter","onFocusin","data-index"],dr={class:"titles"},fr=["innerHTML"],hr={class:"title main"},vr=["innerHTML"],pr={key:0,class:"excerpt-wrapper"},mr={key:0,class:"excerpt",inert:""},gr=["innerHTML"],br={key:0,class:"no-results"},yr={class:"search-keyboard-shortcuts"},wr=["aria-label"],Sr=["aria-label"],xr=["aria-label"],_r=["aria-label"],Tr=zt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var I,S;const t=e,n=ce(),r=ce(),i=ce(ln),s=an(),{activate:o}=zn(n,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=s,h=rt(async()=>{var v,d,x,R,A,C,D,F,V;return ot(de.loadJSON((x=await((d=(v=i.value)[l.value])==null?void 0:d.call(v)))==null?void 0:x.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((R=c.value.search)==null?void 0:R.provider)==="local"&&((C=(A=c.value.search.options)==null?void 0:A.miniSearch)==null?void 0:C.searchOptions)},...((D=c.value.search)==null?void 0:D.provider)==="local"&&((V=(F=c.value.search.options)==null?void 0:F.miniSearch)==null?void 0:V.options)}))}),p=be(()=>{var v,d;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((d=c.value.search.options)==null?void 0:d.disableQueryPersistence)===!0}).value?he(""):Vt("vitepress:local-search-filter",""),b=jt("vitepress:local-search-detailed-list",((I=c.value.search)==null?void 0:I.provider)==="local"&&((S=c.value.search.options)==null?void 0:S.detailedView)===!0),w=be(()=>{var v,d,x;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((d=c.value.search.options)==null?void 0:d.disableDetailedView)===!0||((x=c.value.search.options)==null?void 0:x.detailedView)===!1)}),k=be(()=>{var d,x,R,A,C,D,F;const v=((d=c.value.search)==null?void 0:d.options)??c.value.algolia;return((C=(A=(R=(x=v==null?void 0:v.locales)==null?void 0:x[l.value])==null?void 0:R.translations)==null?void 0:A.button)==null?void 0:C.buttonText)||((F=(D=v==null?void 0:v.translations)==null?void 0:D.button)==null?void 0:F.buttonText)||"Search"});$t(()=>{w.value&&(b.value=!1)});const y=ce([]),O=he(!1);Be(p,()=>{O.value=!1});const L=rt(async()=>{if(r.value)return ot(new jn(r.value))},null),K=new Zn(16);Bt(()=>[h.value,p.value,b.value],async([v,d,x],R,A)=>{var te,we,Qe,Ye;(R==null?void 0:R[0])!==v&&K.clear();let C=!1;if(A(()=>{C=!0}),!v)return;y.value=v.search(d).slice(0,16),O.value=!0;const D=x?await Promise.all(y.value.map(B=>H(B.id))):[];if(C)return;for(const{id:B,mod:ne}of D){const re=B.slice(0,B.indexOf("#"));let G=K.get(re);if(G)continue;G=new Map,K.set(re,G);const J=ne.default??ne;if(J!=null&&J.render||J!=null&&J.setup){const se=en(J);se.config.warnHandler=()=>{},se.provide(tn,s),Object.defineProperties(se.config.globalProperties,{$frontmatter:{get(){return s.frontmatter.value}},$params:{get(){return s.page.value.params}}});const Ze=document.createElement("div");se.mount(Ze),Ze.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(fe=>{var tt;const Se=(tt=fe.querySelector("a"))==null?void 0:tt.getAttribute("href"),Xe=(Se==null?void 0:Se.startsWith("#"))&&Se.slice(1);if(!Xe)return;let et="";for(;(fe=fe.nextElementSibling)&&!/^h[1-6]$/i.test(fe.tagName);)et+=fe.outerHTML;G.set(Xe,et)}),se.unmount()}if(C)return}const F=new Set;if(y.value=y.value.map(B=>{const[ne,re]=B.id.split("#"),G=K.get(ne),J=(G==null?void 0:G.get(re))??"";for(const se in B.match)F.add(se);return{...B,text:J}}),await ve(),C)return;await new Promise(B=>{var ne;(ne=L.value)==null||ne.unmark({done:()=>{var re;(re=L.value)==null||re.markRegExp(E(F),{done:B})}})});const V=((te=n.value)==null?void 0:te.querySelectorAll(".result .excerpt"))??[];for(const B of V)(we=B.querySelector('mark[data-markjs="true"]'))==null||we.scrollIntoView({block:"center"});(Ye=(Qe=r.value)==null?void 0:Qe.firstElementChild)==null||Ye.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function H(v){const d=nn(v.slice(0,v.indexOf("#")));try{if(!d)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(d)}}catch(x){return console.error(x),{id:v,mod:{}}}}const W=he(),j=be(()=>{var v;return((v=p.value)==null?void 0:v.length)<=0});function $(v=!0){var d,x;(d=W.value)==null||d.focus(),v&&((x=W.value)==null||x.select())}Le(()=>{$()});function Ce(v){v.pointerType==="mouse"&&$()}const M=he(-1),Z=he(!0);Be(y,v=>{M.value=v.length?0:-1,X()});function X(){ve(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}xe("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=y.value.length-1),Z.value=!0,X()}),xe("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=y.value.length&&(M.value=0),Z.value=!0,X()});const ee=Wt();xe("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const d=y.value[M.value];if(v.target instanceof HTMLInputElement&&!d){v.preventDefault();return}d&&(ee.go(d.id),t("close"))}),xe("Escape",()=>{t("close")});const u=on({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Le(()=>{window.history.pushState(null,"",null)}),Kt("popstate",v=>{v.preventDefault(),t("close")});const f=Jt(Ut?document.body:null);Le(()=>{ve(()=>{f.value=!0,ve().then(()=>o())})}),qt(()=>{f.value=!1});function g(){p.value="",ve().then(()=>$(!1))}function E(v){return new RegExp([...v].sort((d,x)=>x.length-d.length).map(d=>`(${rn(d)})`).join("|"),"gi")}function _(v){var R;if(!Z.value)return;const d=(R=v.target)==null?void 0:R.closest(".result"),x=Number.parseInt(d==null?void 0:d.dataset.index);x>=0&&x!==M.value&&(M.value=x),Z.value=!1}return(v,d)=>{var x,R,A,C,D;return U(),Ht(Xt,{to:"body"},[T("div",{ref_key:"el",ref:n,role:"button","aria-owns":(x=y.value)!=null&&x.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[T("div",{class:"backdrop",onClick:d[0]||(d[0]=F=>v.$emit("close"))}),T("div",er,[T("form",{class:"search-bar",onPointerup:d[4]||(d[4]=F=>Ce(F)),onSubmit:d[5]||(d[5]=Gt(()=>{},["prevent"]))},[T("label",{title:k.value,id:"localsearch-label",for:"localsearch-input"},[...d[7]||(d[7]=[T("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)])],8,tr),T("div",nr,[T("button",{class:"back-button",title:P(u)("modal.backButtonTitle"),onClick:d[1]||(d[1]=F=>v.$emit("close"))},[...d[8]||(d[8]=[T("span",{class:"vpi-arrow-left local-search-icon"},null,-1)])],8,rr)]),Qt(T("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":d[2]||(d[2]=F=>Zt(p)?p.value=F:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(R=y.value)!=null&&R.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:k.value,spellcheck:"false",type:"search"},null,8,sr),[[Yt,P(p)]]),T("div",ir,[w.value?_e("",!0):(U(),Q("button",{key:0,class:st(["toggle-layout-button",{"detailed-list":P(b)}]),type:"button",title:P(u)("modal.displayDetails"),onClick:d[3]||(d[3]=F=>M.value>-1&&(b.value=!P(b)))},[...d[9]||(d[9]=[T("span",{class:"vpi-layout-list local-search-icon"},null,-1)])],10,ar)),T("button",{class:"clear-button",type:"reset",disabled:j.value,title:P(u)("modal.resetButtonTitle"),onClick:g},[...d[10]||(d[10]=[T("span",{class:"vpi-delete local-search-icon"},null,-1)])],8,or)])],32),T("ul",{ref_key:"resultsEl",ref:r,id:(A=y.value)!=null&&A.length?"localsearch-list":void 0,role:(C=y.value)!=null&&C.length?"listbox":void 0,"aria-labelledby":(D=y.value)!=null&&D.length?"localsearch-label":void 0,class:"results",onMousemove:_},[(U(!0),Q(at,null,it(y.value,(F,V)=>(U(),Q("li",{key:F.id,id:"localsearch-item-"+V,"aria-selected":M.value===V?"true":"false",role:"option"},[T("a",{href:F.id,class:st(["result",{selected:M.value===V}]),"aria-label":[...F.titles,F.title].join(" > "),onMouseenter:te=>!Z.value&&(M.value=V),onFocusin:te=>M.value=V,onClick:d[6]||(d[6]=te=>v.$emit("close")),"data-index":V},[T("div",null,[T("div",dr,[d[12]||(d[12]=T("span",{class:"title-icon"},"#",-1)),(U(!0),Q(at,null,it(F.titles,(te,we)=>(U(),Q("span",{key:we,class:"title"},[T("span",{class:"text",innerHTML:te},null,8,fr),d[11]||(d[11]=T("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),T("span",hr,[T("span",{class:"text",innerHTML:F.title},null,8,vr)])]),P(b)?(U(),Q("div",pr,[F.text?(U(),Q("div",mr,[T("div",{class:"vp-doc",innerHTML:F.text},null,8,gr)])):_e("",!0),d[13]||(d[13]=T("div",{class:"excerpt-gradient-bottom"},null,-1)),d[14]||(d[14]=T("div",{class:"excerpt-gradient-top"},null,-1))])):_e("",!0)])],42,ur)],8,cr))),128)),P(p)&&!y.value.length&&O.value?(U(),Q("li",br,[pe(me(P(u)("modal.noResultsText"))+' "',1),T("strong",null,me(P(p)),1),d[15]||(d[15]=pe('" ',-1))])):_e("",!0)],40,lr),T("div",yr,[T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.navigateUpKeyAriaLabel")},[...d[16]||(d[16]=[T("span",{class:"vpi-arrow-up navigate-icon"},null,-1)])],8,wr),T("kbd",{"aria-label":P(u)("modal.footer.navigateDownKeyAriaLabel")},[...d[17]||(d[17]=[T("span",{class:"vpi-arrow-down navigate-icon"},null,-1)])],8,Sr),pe(" "+me(P(u)("modal.footer.navigateText")),1)]),T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.selectKeyAriaLabel")},[...d[18]||(d[18]=[T("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)])],8,xr),pe(" "+me(P(u)("modal.footer.selectText")),1)]),T("span",null,[T("kbd",{"aria-label":P(u)("modal.footer.closeKeyAriaLabel")},"esc",8,_r),pe(" "+me(P(u)("modal.footer.closeText")),1)])])])],8,Xn)])}}}),Rr=sn(Tr,[["__scopeId","data-v-de1bce2a"]]);export{Rr as default};
@@ -0,0 +1 @@
1
+ import{M as ln,N as an,O as y,P as tn,Q as Y,R as O,S as _,T as un,V as Q,W as rn,X as j,Y as o,Z as sn,$ as on,a0 as fn}from"../app.Drol6mi6.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*u<y))return u=(n*(h-R)-d*(l-v))/u,[l+u*E,h+u*i]}function H(l,h,D,S,v,R,V){var a=l-D,E=h-S,i=(V?R:-R)/j(a*a+E*E),n=i*E,d=-i*a,u=l+n,s=h+d,f=D+n,c=S+d,W=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,A=m*m+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*j(fn(0,T*T*A-P*P)),M=(P*g-m*I)/A,N=(-P*m-g*I)/A,w=(P*g+m*I)/A,p=(-P*m+g*I)/A,x=M-W,e=N-t,r=w-W,X=p-t;return x*x+e*e>r*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,W=un(c-f),t=c>f;if(a||(a=n=E()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(un(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(W<rn)if(q=pn(Z,$,J,K,F,G,B,C)){var L=Z-q[0],U=$-q[1],k=F-q[0],b=G-q[1],nn=1/O(on((L*k+U*b)/(j(L*L+U*U)*j(k*k+b*b)))/2),en=j(q[0]*q[0]+q[1]*q[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}I>y?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(Z,$),a.arc(0,0,s,m,g,!t)):a.moveTo(Z,$),!(u>y)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-rn/2;return[Y(d)*n,O(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Q(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Q(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Q(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:Q(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Q(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Q(+n),i):R},i.padAngle=function(n){return arguments.length?(V=typeof n=="function"?n:Q(+n),i):V},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};