@inkeep/open-knowledge 0.71.0-beta.7 → 0.71.0-beta.9

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 (144) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-BkcN7YBN.mjs +1 -0
  3. package/dist/{dist-qYD3pfVS.mjs → dist-C60KosK_.mjs} +1 -1
  4. package/dist/{dist-DKlhl927.mjs → dist-DkpQmJAX.mjs} +1 -1
  5. package/dist/index.d.mts +0 -2
  6. package/dist/index.mjs +190 -190
  7. package/dist/{init-C6uC-pHM.mjs → init-BQ-GPqjL.mjs} +2 -2
  8. package/dist/init-hJ8q1RKv.mjs +1 -0
  9. package/dist/{launch-json-removal-0-LDzwWY.mjs → launch-json-removal-DAYoNJf3.mjs} +1 -1
  10. package/dist/loader-BaQEFCgh.mjs +1 -0
  11. package/dist/{loader-C6YUFXp_.mjs → loader-D01LOcLC.mjs} +1 -1
  12. package/dist/{md-manager-BGnqyqi1-CZVfdoIA.mjs → md-manager-BGnqyqi1-BKxqDqfk.mjs} +134 -134
  13. package/dist/{open-browser-F_j_IYn7.mjs → open-browser-LYl1Ji_P.mjs} +1 -1
  14. package/dist/parse-worker.mjs +1 -1
  15. package/dist/{preview-CEpj7Mao.mjs → preview-BE8B8u3u.mjs} +1 -1
  16. package/dist/preview-CV2uxsGW.mjs +1 -0
  17. package/dist/public/assets/{ActivityModeContent-CrK7FNzo.js → ActivityModeContent-BnYjWHlg.js} +1 -1
  18. package/dist/public/assets/{AddPropertiesButton-AI0vmmaL.js → AddPropertiesButton-BLtA0-KK.js} +2 -2
  19. package/dist/public/assets/{AgentDiffPane-BhVcfw4T.js → AgentDiffPane-DYuWIG33.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-DybMgazg.js → AgentThreadClientBinder-DFOQ285I.js} +1 -1
  21. package/dist/public/assets/{BugReportHistory-DbM8sn96.js → BugReportHistory-DRCNpHKe.js} +1 -1
  22. package/dist/public/assets/{BugReportHistoryDialog-B6I-9wxu.js → BugReportHistoryDialog-DK6kLT1M.js} +1 -1
  23. package/dist/public/assets/{CodeMirrorPropInput-DZ37msDr.js → CodeMirrorPropInput-CPsq6Hlt.js} +1 -1
  24. package/dist/public/assets/{ConsentDialogBody-B_lo3uhI.js → ConsentDialogBody-B420LITa.js} +1 -1
  25. package/dist/public/assets/{DiffViewBoundary-CWJp6t9z.js → DiffViewBoundary-Dm1JTUQH.js} +1 -1
  26. package/dist/public/assets/{DocumentContext-BKydxNvt.js → DocumentContext-B_ZQOW6d.js} +1 -1
  27. package/dist/public/assets/{EditorModeToggle-CS_utqU8.js → EditorModeToggle-BYgixt8u.js} +1 -1
  28. package/dist/public/assets/{EnableSyncConfirmDialog-KyNQgWB6.js → EnableSyncConfirmDialog-Champhbi.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-UVdcaTsJ.js → ExcalidrawDocEditor-J7-b8X7S.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-kAy9_8Y7.js +1 -0
  31. package/dist/public/assets/{GraphPanel-BSDs51EQ.js → GraphPanel-VF5mmCq5.js} +1 -1
  32. package/dist/public/assets/{ImageAttachments-bSsPilJg.js → ImageAttachments-Dj-z_2OA.js} +1 -1
  33. package/dist/public/assets/{ImportSkillDialog-PeOcRH0t.js → ImportSkillDialog-oRItUds1.js} +1 -1
  34. package/dist/public/assets/{LintConfigEditor-D94SABSS.js → LintConfigEditor-DFw5Zp2Y.js} +1 -1
  35. package/dist/public/assets/{ManagedArtifactProperties-CWKnsTBm.js → ManagedArtifactProperties-4tSnYubv.js} +1 -1
  36. package/dist/public/assets/ManagedArtifactProperties-DQ-lspG6.js +1 -0
  37. package/dist/public/assets/{MermaidDocEditor-CcwHIUjb.js → MermaidDocEditor-OPIh9UeG.js} +1 -1
  38. package/dist/public/assets/{PropertyDisplayRow-B4xqYm_E.js → PropertyDisplayRow-DUHDBrwZ.js} +1 -1
  39. package/dist/public/assets/{RegisteredAgentIcon-DMGzGpgO.js → RegisteredAgentIcon-Ctrh4pwP.js} +1 -1
  40. package/dist/public/assets/{ReportBugDialogBody-g5Q3mbZH.js → ReportBugDialogBody-4Jto-8as.js} +1 -1
  41. package/dist/public/assets/{ReportBugMenuTrigger-DYFailxM.js → ReportBugMenuTrigger-C9SETaJd.js} +2 -2
  42. package/dist/public/assets/{SchemaConfigEditor-DjPwBQNE.js → SchemaConfigEditor-BgxA1YxC.js} +1 -1
  43. package/dist/public/assets/{SessionsHost-C0yYRHT8.js → SessionsHost-Ciy5Qq_k.js} +2 -2
  44. package/dist/public/assets/SettingsDialogBody-Duh-3B_4.js +12 -0
  45. package/dist/public/assets/{ShareBranchSwitchDialog-CJQ4GB6s.js → ShareBranchSwitchDialog-YI9g4UYr.js} +1 -1
  46. package/dist/public/assets/{ShareReceiveDialog-D6i_iBQ2.js → ShareReceiveDialog-_Nw6FwBh.js} +1 -1
  47. package/dist/public/assets/{ShareReceiveMissDialog-BG-9weDG.js → ShareReceiveMissDialog-UF9G8ncU.js} +1 -1
  48. package/dist/public/assets/{SkillCostValue-CBfC2ips.js → SkillCostValue-DzSjApnn.js} +1 -1
  49. package/dist/public/assets/{SkillEditBanner-BlIGzLHz.js → SkillEditBanner-CH78FF3A.js} +1 -1
  50. package/dist/public/assets/{SkillForkDialog-CgsMSc30.js → SkillForkDialog-DrnvXSzX.js} +1 -1
  51. package/dist/public/assets/{SkillInstallMenu-uMprT60y.js → SkillInstallMenu-DwZkrP0Z.js} +1 -1
  52. package/dist/public/assets/{SkillOriginInline-enwQuYHp.js → SkillOriginInline-B05XTS5o.js} +1 -1
  53. package/dist/public/assets/{SkillToolbarControls-B-PypQ4o.js → SkillToolbarControls-Ul_8_OQ1.js} +1 -1
  54. package/dist/public/assets/{SlidesToolbarControls-BUC_eJlL.js → SlidesToolbarControls-Bjmc7X3L.js} +1 -1
  55. package/dist/public/assets/{SourceEditor-BNJ55TFa.js → SourceEditor-CV-P4JGm.js} +1 -1
  56. package/dist/public/assets/{TerminalPanel-CBeAAbrl.js → TerminalPanel-Dso8Dm_L.js} +1 -1
  57. package/dist/public/assets/{TerminalWindowApp-DZGUZH3I.js → TerminalWindowApp-D4mDoqP9.js} +1 -1
  58. package/dist/public/assets/{TextDocEditor-brfeinqj.js → TextDocEditor-Bn9Z1nMV.js} +1 -1
  59. package/dist/public/assets/{ThreadView-CkTKdoML.js → ThreadView-CgPgwNXd.js} +1 -1
  60. package/dist/public/assets/{TimelineDiffPane-DKE8nvJu.js → TimelineDiffPane-C1de4maa.js} +1 -1
  61. package/dist/public/assets/{agent-diff-store-DTkGqDNJ.js → agent-diff-store-nznkmJsB.js} +1 -1
  62. package/dist/public/assets/{auth-state-cache-B74qBpm2.js → auth-state-cache-CBzFVGas.js} +1 -1
  63. package/dist/public/assets/{bug-report-send-manager-TbN4yaBB.js → bug-report-send-manager-udnfLaLr.js} +1 -1
  64. package/dist/public/assets/client-version-D207g_G2.js +1 -0
  65. package/dist/public/assets/{comment-chips-_zFbamgQ.js → comment-chips-NCDE85yO.js} +1 -1
  66. package/dist/public/assets/{config-provider-ChXWQGkn.js → config-provider-DBdgHZrX.js} +3 -3
  67. package/dist/public/assets/{dist-D9bF1HlE.js → dist-DyIzmB4e.js} +143 -143
  68. package/dist/public/assets/{doc-hash-8FM9bAVM.js → doc-hash-lEZL1-60.js} +1 -1
  69. package/dist/public/assets/{doc-undo-manager-X-4SK3tE.js → doc-undo-manager-DMdqgz3h.js} +1 -1
  70. package/dist/public/assets/{documents-events-CDRChc0H.js → documents-events-BhD4StGH.js} +1 -1
  71. package/dist/public/assets/{file-tree-adapter-By107gc7.js → file-tree-adapter--ZrXkuQL.js} +1 -1
  72. package/dist/public/assets/{file-tree-utils-DMzGqq6M.js → file-tree-utils-PzrGlJAG.js} +1 -1
  73. package/dist/public/assets/{folder-config-api-CTQSuqyE.js → folder-config-api-DnX5Sb8v.js} +1 -1
  74. package/dist/public/assets/i18n-CaLAeWx-.js +1 -0
  75. package/dist/public/assets/{index-zvWCvjzE.js → index-BYkRbo5F.js} +8 -8
  76. package/dist/public/assets/{launcher-selection-Dq-Iaz-L.js → launcher-selection-CbggkYch.js} +1 -1
  77. package/dist/public/assets/{lint-config-client-DqYHlt4A.js → lint-config-client-CNu_LFu8.js} +1 -1
  78. package/dist/public/assets/{markdownlint-rule-browser-DrdibywL.js → markdownlint-rule-browser-B8lb5cPJ.js} +1 -1
  79. package/dist/public/assets/{messages-CDtZN7oO.js → messages-BA7Sa0Sr.js} +1 -1
  80. package/dist/public/assets/{messages-CoNpmm1Q.js → messages-BeP_647i.js} +1 -1
  81. package/dist/public/assets/{messages-CcvMPPNj.js → messages-BiuEwoMr.js} +1 -1
  82. package/dist/public/assets/{messages-BSC5unlW.js → messages-Ci7CxZBj.js} +1 -1
  83. package/dist/public/assets/{messages-C3--iCKr.js → messages-DAB1lLm1.js} +1 -1
  84. package/dist/public/assets/{messages-Dk1dP4RM.js → messages-DTEf2MXj.js} +1 -1
  85. package/dist/public/assets/{messages-aRsNVdyl.js → messages-DbH22oNW.js} +1 -1
  86. package/dist/public/assets/{messages-C7VPCAvR.js → messages-SnR6-Tcb.js} +1 -1
  87. package/dist/public/assets/{messages-rCFMyEKG.js → messages-Xl6slMcd.js} +1 -1
  88. package/dist/public/assets/{messages-Cn1JY5rt.js → messages-ch0akwPK.js} +1 -1
  89. package/dist/public/assets/{messages-BTgz3B0o.js → messages-cuP9PT9a.js} +1 -1
  90. package/dist/public/assets/{messages-1LOOFG95.js → messages-zm5-i7Sy.js} +1 -1
  91. package/dist/public/assets/{page-list-cache-V-AO2spP.js → page-list-cache-DkwjLHjr.js} +1 -1
  92. package/dist/public/assets/{pending-receive-nav-store-Do6Wyxgf.js → pending-receive-nav-store-Cjz8CfPI.js} +1 -1
  93. package/dist/public/assets/{progress-CsqOEsMm.js → progress-CStHBnNb.js} +1 -1
  94. package/dist/public/assets/{project-paths-B-8h-2Qm.js → project-paths-CsVO01vN.js} +1 -1
  95. package/dist/public/assets/{prop-types-BiZ7iVmx.js → prop-types-Cj_2Q3za.js} +1 -1
  96. package/dist/public/assets/{receive-store-B6Bh7pE6.js → receive-store--XvR7Il6.js} +1 -1
  97. package/dist/public/assets/{selection-context-BO2a7KXC.js → selection-context-DixeQEn_.js} +1 -1
  98. package/dist/public/assets/{skill-scope-fCMVJzDA.js → skill-scope-DUOFVFOe.js} +1 -1
  99. package/dist/public/assets/{skills-api-BS-ceHz7.js → skills-api-Bj-gKz05.js} +1 -1
  100. package/dist/public/assets/{src-nmwU0ldn.js → src-CfFxoWo6.js} +1 -1
  101. package/dist/public/assets/{startup-marks-CobjbgVK.js → startup-marks-BltEnhgt.js} +1 -1
  102. package/dist/public/assets/{tag-pill-input-DJbRn5A_.js → tag-pill-input-CLbsjG2w.js} +1 -1
  103. package/dist/public/assets/{target-navigation-intent-R9KdQ2Fu.js → target-navigation-intent-C78D-fn-.js} +1 -1
  104. package/dist/public/assets/{telemetry-impl-Bi_SKDTr.js → telemetry-impl-BQKcjZge.js} +1 -1
  105. package/dist/public/assets/{telemetry-startup-K2Nstnyj.js → telemetry-startup-DByuWmJt.js} +1 -1
  106. package/dist/public/assets/{terminal-cli-display-BWdubsSN.js → terminal-cli-display-DyFM8MWD.js} +1 -1
  107. package/dist/public/assets/{terminal-command-events-B7Whrr3Y.js → terminal-command-events-kJnF1ofb.js} +1 -1
  108. package/dist/public/assets/{terminal-telemetry-_cBq_q5j.js → terminal-telemetry-DMo9JN4E.js} +1 -1
  109. package/dist/public/assets/{typing-burst-detector-C2nvGXMC.js → typing-burst-detector-CeWkUvO2.js} +1 -1
  110. package/dist/public/assets/{uninstall-TIAWU-c7.js → uninstall-DstKWg6E.js} +1 -1
  111. package/dist/public/assets/{use-activity-panel-C5TZ8RXy.js → use-activity-panel-0IaLfHaa.js} +1 -1
  112. package/dist/public/assets/{use-apply-config-color-theme-Uti0nOvh.js → use-apply-config-color-theme-Eeox4J08.js} +1 -1
  113. package/dist/public/assets/{use-collab-url-ZMEUMnOG.js → use-collab-url-Bu5itY1E.js} +1 -1
  114. package/dist/public/assets/{use-conflicts-BdwovYNz.js → use-conflicts-CjQh_XMo.js} +1 -1
  115. package/dist/public/assets/{use-live-xterm-theme-BochpJxE.js → use-live-xterm-theme-C8H7-nOH.js} +1 -1
  116. package/dist/public/assets/{use-open-skill-KBtbW4Wi.js → use-open-skill-CZUUEOYs.js} +1 -1
  117. package/dist/public/assets/{use-settings-route-CmOczB8a.js → use-settings-route-BCi5InHC.js} +1 -1
  118. package/dist/public/assets/{use-skill-origin-D6OucFH_.js → use-skill-origin-DzYzBhhI.js} +1 -1
  119. package/dist/public/assets/{use-skills-1LOwCFf7.js → use-skills-BuS2riH7.js} +1 -1
  120. package/dist/public/assets/{use-terminal-enabled-D4AOYOMu.js → use-terminal-enabled-qiJUEZ0R.js} +1 -1
  121. package/dist/public/assets/{use-timeline-entry-diff-Ce-Bum_V.js → use-timeline-entry-diff-ZkHeznoO.js} +1 -1
  122. package/dist/public/assets/{use-workspace-BjpBfGfA.js → use-workspace-BrVq04zg.js} +1 -1
  123. package/dist/public/index.html +53 -53
  124. package/dist/public/uninstall.html +4 -4
  125. package/dist/{registry-probes-DGYPCg_v.mjs → registry-probes-CJJfZUQ_.mjs} +1 -1
  126. package/dist/{removal-file-path-Bou0-83a.mjs → removal-file-path-D7l6FGtL.mjs} +1 -1
  127. package/dist/{repair-launch-json-Bhf7WU7n.mjs → repair-launch-json-Blq-nvsa.mjs} +1 -1
  128. package/dist/{repair-mcp-configs-B2C8BilS.mjs → repair-mcp-configs-B31cg1Ne.mjs} +1 -1
  129. package/dist/{src-7BbZKGEP.mjs → src-CPVDBXmL.mjs} +1 -1
  130. package/dist/src-DEYeIFCM.mjs +1 -0
  131. package/dist/start-Bpjsoc41.mjs +1 -0
  132. package/dist/{start-CTaWXsob.mjs → start-DcLYgT-p.mjs} +3 -3
  133. package/package.json +4 -4
  134. package/dist/constants-DwR639Ts.mjs +0 -1
  135. package/dist/init-BzHxbuZn.mjs +0 -1
  136. package/dist/loader-CHRSVq8P.mjs +0 -1
  137. package/dist/preview-UdinIn5O.mjs +0 -1
  138. package/dist/public/assets/FeedbackForm-Cutnpobj.js +0 -1
  139. package/dist/public/assets/ManagedArtifactProperties-MFvwtJu1.js +0 -1
  140. package/dist/public/assets/SettingsDialogBody-BPfLFgw5.js +0 -12
  141. package/dist/public/assets/client-version-Bc5HP7Ed.js +0 -1
  142. package/dist/public/assets/i18n-B_wD5kF7.js +0 -1
  143. package/dist/src-Dq8ubGoV.mjs +0 -1
  144. package/dist/start-DTz0nLjj.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Fr as t,Nn as n,Pr as r,Vr as i,Yn as a,di as o,ii as s,qn as c,si as l}from"./DocumentContext-BKydxNvt.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-DttaCTqz.js";import{Bi as v,Bn as y,nr as b,tr as x,yr as S,zn as C}from"./dist-D9bF1HlE.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as E}from"./local-menu-action-bus-4I1Xm40D.js";import{t as D}from"./createLucideIcon-B6ULg5PN.js";import{Et as O}from"./CodeMirrorPropInput-DZ37msDr.js";import{t as ee}from"./x-CnGRb1ER.js";import{l as te}from"./doc-hash-8FM9bAVM.js";var k=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),A=f(),j=`var(--ok-comment-hue,37,99,235)`,ne=j,re={fill:.22,line:.7},ie={fill:.45,line:1},ae=.45;function oe(e,t){let n=ne,{fill:r,line:i}=t?ie:re;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function M(e){return e.map(e=>e.id??`·`).join(`|`)}function se(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function N(e,t){return e.id===null||e.id===t}function ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:oe(e??a.covering[0],e!==void 0),threadId:se(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&M(a.covering)===M(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var P=`data-comment-reveal`;function F(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function I(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${F(e)}"]`)}function le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${j},${ae})`),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=C(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:S(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:S(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=v(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=S(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||S(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=x({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:y(e,Math.max(0,t-U),t),suffix:y(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,r,i){let a=O(e);if(!a)return!1;let o=K(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,ve=80,ye=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function be(e){let n=!1,i=null,s=null,l=-1,u=()=>{let a=c(e.docName);if(!a||a.isDestroyed)return!1;if(n||(n=!0,r(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),t(e.threadId)),!0;let o=a.state.doc.content.size;return(s===null||o!==l)&&(s=W(a.state.doc,e.quote,e.context),l=o),!s||!J(a,s,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),t(e.threadId)),!0)};o(`comments`),u(),c(e.docName)===null&&window.location.assign(te(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&i!==null&&Date.now()-i>=ye&&f()},h=a(m),g=window.setInterval(m,ve),_=window.setTimeout(()=>{i===null&&w.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function xe(){return s().length}function Se(){let e=(0,A.c)(4),t=s(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=i(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(Ce),e[2]=n,e[3]=r),r}function Ce(e){let[t,n]=e;return{docName:t,count:n}}function we(e){let t=(0,A.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(E,{className:`size-3`}),i=(0,X.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(k,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,X.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,X.jsx)(h,{asChild:!0,children:(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Ee,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,X.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Te)}):(0,X.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,X.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(ee,{className:`size-3`}),t[27]=T):T=t[27];let D;t[28]!==o||t[29]!==w?(D=(0,X.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=D):D=t[30];let O;return t[31]!==D||t[32]!==C?(O=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,D]}),t[31]=D,t[32]=C,t[33]=O):O=t[33],O}function Te(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function Ee(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Q(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){be({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
1
+ import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Fr as t,Nn as n,Pr as r,Vr as i,Yn as a,di as o,ii as s,qn as c,si as l}from"./DocumentContext-B_ZQOW6d.js";import{n as u,r as d}from"./dist-Nvb76hAm.js";import{t as f}from"./compiler-runtime-BfE3aGVn.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./button-Cym3gapE.js";import{i as h,n as g,t as _}from"./tooltip-DttaCTqz.js";import{Bi as v,Bn as y,nr as b,tr as x,yr as S,zn as C}from"./dist-DyIzmB4e.js";import{n as w}from"./dist-CJhtNlOm2.js";import{t as T}from"./dist-Cr4-nBVI.js";import{i as E}from"./local-menu-action-bus-4I1Xm40D.js";import{t as D}from"./createLucideIcon-B6ULg5PN.js";import{Et as O}from"./CodeMirrorPropInput-CPsq6Hlt.js";import{t as ee}from"./x-CnGRb1ER.js";import{l as te}from"./doc-hash-lEZL1-60.js";var k=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),A=f(),j=`var(--ok-comment-hue,37,99,235)`,ne=j,re={fill:.22,line:.7},ie={fill:.45,line:1},ae=.45;function oe(e,t){let n=ne,{fill:r,line:i}=t?ie:re;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function M(e){return e.map(e=>e.id??`·`).join(`|`)}function se(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function N(e,t){return e.id===null||e.id===t}function ce(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>N(e,t));i.push({from:a.from,to:a.to,style:oe(e??a.covering[0],e!==void 0),threadId:se(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&M(a.covering)===M(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var P=`data-comment-reveal`;function F(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function I(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${F(e)}"]`)}function le(e){let t=I(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ue(e){I(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function L(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${F(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=R(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),de(n),!0}return!1}function R(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function de(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${j},${ae})`),e.setAttribute(P,`true`);let t=()=>{e.removeAttribute(P),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function z(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=C(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function fe(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function B(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:S(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:S(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=v(t.length);return c-s>l?null:{start:s,end:c}}function V(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function H(e,t,n){if(t.length===0)return null;let r=fe(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=S(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=B(e.text,t,n);return r===null?null:V(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||S(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=x({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,r[0])}let l=[],u=-1;for(let t of r){let n=b(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=B(e.text,t,n);return r===null?null:V(e,r)}return V(e,l[0])}var U=64;function pe(e,t,n){return{prefix:y(e,Math.max(0,t-U),t),suffix:y(e,n,Math.min(e.content.size,n+U))}}function W(e,t,n){return G(e)(t,n)}function G(e){let t=z(e),n=null;return(r,i)=>{let a=H(t,r,i);return a===null?(n??=z(e,{includeBlockComponents:!0}),H(n,r,i)):a}}var me=220,he=24;function ge(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-me;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+he)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,r,i){let a=O(e);if(!a)return!1;let o=K(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=ge({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:q(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var _e=1e4,ve=80,ye=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function be(e){let n=!1,i=null,s=null,l=-1,u=()=>{let a=c(e.docName);if(!a||a.isDestroyed)return!1;if(n||(n=!0,r(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),t(e.threadId)),!0;let o=a.state.doc.content.size;return(s===null||o!==l)&&(s=W(a.state.doc,e.quote,e.context),l=o),!s||!J(a,s,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),t(e.threadId)),!0)};o(`comments`),u(),c(e.docName)===null&&window.location.assign(te(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&i!==null&&Date.now()-i>=ye&&f()},h=a(m),g=window.setInterval(m,ve),_=window.setTimeout(()=>{i===null&&w.error(n?T._({id:`KeXgA-`}):T._({id:`JDQ5I5`})),f()},_e);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function xe(){return s().length}function Se(){let e=(0,A.c)(4),t=s(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=i(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(Ce),e[2]=n,e[3]=r),r}function Ce(e){let[t,n]=e;return{docName:t,count:n}}function we(e){let t=(0,A.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=d();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=p(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(E,{className:`size-3`}),i=(0,X.jsx)(u,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=p(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=f):f=t[10];let v;t[11]===l?v=t[12]:(v=l({id:`2zvUIK`}),t[11]=l,t[12]=v);let y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(k,{className:`size-3`}),t[13]=y):y=t[13];let b;t[14]!==n||t[15]!==c.length?(b=c.length>1?(0,X.jsx)(u,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(u,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=b):b=t[16];let x;t[17]!==v||t[18]!==b?(x=(0,X.jsx)(h,{asChild:!0,children:(0,X.jsxs)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":v,onClick:Ee,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[y,b]})}),t[17]=v,t[18]=b,t[19]=x):x=t[19];let S;t[20]===c?S=t[21]:(S=(0,X.jsx)(g,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Te)}):(0,X.jsx)(u,{id:`2zvUIK`})}),t[20]=c,t[21]=S);let C;t[22]!==x||t[23]!==S?(C=(0,X.jsxs)(_,{children:[x,S]}),t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]===l?w=t[26]:(w=l({id:`pFRz_E`}),t[25]=l,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(ee,{className:`size-3`}),t[27]=T):T=t[27];let D;t[28]!==o||t[29]!==w?(D=(0,X.jsx)(m,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":w,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:T}),t[28]=o,t[29]=w,t[30]=D):D=t[30];let O;return t[31]!==D||t[32]!==C?(O=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:f,children:[C,D]}),t[31]=D,t[32]=C,t[33]=O):O=t[33],O}function Te(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function Ee(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Q(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function De(e){be({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{L({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Oe)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Oe=30;function ke(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ae(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function je(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Me(e){if(!e.repeats)return null;let t=Ae(e.prefix),n=je(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ne(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
2
2
  `))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
3
3
  `))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=Me(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
4
4
  `))i.push(`> ${e}`)}return i.join(`