pi-webapp 0.1.51 → 0.1.52-alpha.10
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.
- package/README.md +12 -8
- package/README.zh-CN.md +12 -8
- package/bin/pi-webapp.mjs +47 -2
- package/bin/upgrade-transaction.d.mts +17 -0
- package/bin/upgrade-transaction.mjs +122 -0
- package/dist/extension.js +31 -31
- package/dist/hosted-recovery.js +5 -4
- package/dist/hosted-worker.js +2 -2
- package/docs/desktop-testing.md +1 -1
- package/docs/desktop.md +8 -3
- package/docs/hosted-paired-updater.md +7 -0
- package/docs/hosted-update-recovery.md +42 -12
- package/package.json +4 -4
- package/web/dist/.vite/manifest.json +264 -241
- package/web/dist/assets/CodeBlock-BdAsIj3e.js +159 -0
- package/web/dist/assets/CodeBlock.css +1 -0
- package/web/dist/assets/MarkdownText-NoTY0xls.js +280 -0
- package/web/dist/assets/MarkdownText.css +1 -0
- package/web/dist/assets/app-DDY_2HbQ.js +38 -0
- package/web/dist/assets/app.css +1 -1
- package/web/dist/assets/app.js +4 -4
- package/web/dist/assets/c-vzw8O3dF.js +2 -0
- package/web/dist/assets/clsx-h-WltqkG.js +2 -0
- package/web/dist/assets/{cpp-M92QQ27h.js → cpp-DKT7ktbv.js} +2 -2
- package/web/dist/assets/css-TMM_5IvK.js +2 -0
- package/web/dist/assets/{elixir-DIe8-kxb.js → elixir-BUI7oAoL.js} +2 -2
- package/web/dist/assets/graphql-DIl_ZhLK.js +2 -0
- package/web/dist/assets/html-CFUZAbjn.js +2 -0
- package/web/dist/assets/{html-derivative-B-zMOKjI.js → html-derivative-Di3X0LuZ.js} +2 -2
- package/web/dist/assets/http-BwEAzFe-.js +2 -0
- package/web/dist/assets/icons-C-HoxwKl.js +7 -0
- package/web/dist/assets/java-BLj8-EuU.js +2 -0
- package/web/dist/assets/{julia-CTkez5_b.js → julia-DR93JiX6.js} +2 -2
- package/web/dist/assets/{latex--YAwAQ5f.js → latex-D2AiaQEH.js} +2 -2
- package/web/dist/assets/lua-DVAEEjUj.js +2 -0
- package/web/dist/assets/{perl-C6cfY4X6.js → perl-B8jsoAXk.js} +2 -2
- package/web/dist/assets/php-BGmvzxwe.js +2 -0
- package/web/dist/assets/plugin-B2Gl-6V6.js +2 -0
- package/web/dist/assets/{plugin-Cw0h9Dlw.js → plugin-C9-V_VLi.js} +4 -4
- package/web/dist/assets/plugin-e6UWq_j6.js +4 -0
- package/web/dist/assets/r-BpV6ph8o.js +2 -0
- package/web/dist/assets/rolldown-runtime-CgmABjMJ.js +1 -0
- package/web/dist/assets/rst-C4gxDDt3.js +2 -0
- package/web/dist/assets/ruby-BzF-keyw.js +2 -0
- package/web/dist/assets/{scss-DOxJ7xu_.js → scss-D6FyrCGQ.js} +2 -2
- package/web/dist/assets/sql-r_e_QA5-.js +2 -0
- package/web/dist/assets/svelte-CBtRvh2E.js +2 -0
- package/web/dist/assets/vue-CJULmGDv.js +2 -0
- package/web/dist/assets/xml-BOIvddFt.js +2 -0
- package/web/src/ui/shared/LICENSE.txt +21 -0
- package/web/dist/assets/WorkspacePanel.css +0 -1
- package/web/dist/assets/WorkspacePanel.module-7fbly3iv.js +0 -7
- package/web/dist/assets/app-rE2dO2Sf.js +0 -503
- package/web/dist/assets/c-D2xwndn2.js +0 -2
- package/web/dist/assets/css-COynAVCS.js +0 -2
- package/web/dist/assets/dist-DvRDAAjZ.js +0 -2
- package/web/dist/assets/graphql-BUOosdAq.js +0 -2
- package/web/dist/assets/html-Dkdzkf5m.js +0 -2
- package/web/dist/assets/http-iVoGgZyc.js +0 -2
- package/web/dist/assets/java-C0tX6Zjj.js +0 -2
- package/web/dist/assets/json-Hfsf52vC.js +0 -2
- package/web/dist/assets/lua-2gStHmQ-.js +0 -2
- package/web/dist/assets/php-B4BGKN5F.js +0 -2
- package/web/dist/assets/plugin-D3ueGV13.js +0 -2
- package/web/dist/assets/plugin-Daa3_Q-m.js +0 -4
- package/web/dist/assets/r-vFiqf_wZ.js +0 -2
- package/web/dist/assets/rst-DEFIrwXa.js +0 -2
- package/web/dist/assets/ruby-CGfRnGY4.js +0 -2
- package/web/dist/assets/shellscript-DugvE863.js +0 -2
- package/web/dist/assets/sql-BJwLzEN3.js +0 -2
- package/web/dist/assets/svelte-Cnhqc3fy.js +0 -2
- package/web/dist/assets/typescript-dAcDzF3q.js +0 -2
- package/web/dist/assets/vue-b-L2NQfY.js +0 -2
- package/web/dist/assets/xml-Dg-qt816.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`9aa61549-a8e2-4651-a220-3ba0b5f33ea4`,e._sentryDebugIdIdentifier=`sentry-dbid-9aa61549-a8e2-4651-a220-3ba0b5f33ea4`)}catch{}})();import{r as e}from"./rolldown-runtime-CgmABjMJ.js";import{a as t,c as n,d as r,g as i,l as a,m as o,n as s,o as c,r as l,u,v as d,y as f}from"./app-DDY_2HbQ.js";import{a as p,i as m,n as h,x as g,y as _}from"./icons-C-HoxwKl.js";import{n as v,r as y}from"./clsx-h-WltqkG.js";import{s as b}from"./app.js";var x=e(y(),1);function S(e){let t={stage:[`已暂存文件。`,`File staged.`],unstage:[`已取消暂存,工作区内容保留。`,`File unstaged. Working content preserved.`],commit:[`提交成功。`,`Commit created.`],"create-branch":[`分支已创建。`,`Branch created.`],"switch-branch":[`已切换分支。`,`Branch switched.`],state_changed:[`仓库状态已变化,已刷新;请检查后重新操作。`,`Repository changed. Review the refreshed state before trying again.`],busy:[`Git 操作正在进行,请稍后刷新。`,`A Git operation is in progress. Refresh shortly.`],agent_busy:[`共用此工作树的聊天正在运行,请等待回复结束。`,`A chat sharing this working tree is running. Wait for it to finish.`],session_changed:[`聊天已切换,请返回原聊天检查仓库状态。`,`Chat switched. Return to the original chat to check the repository.`],root_required:[`提交和切换分支请在仓库根目录工作区操作。`,`Open the repository root workspace to commit or switch branches.`],operation_in_progress:[`请先在终端完成冲突处理或正在进行的 Git 操作。`,`Finish conflict resolution or the ongoing Git operation in the terminal first.`],index_locked:[`Git 锁被占用,请等待其他 Git 操作完成。`,`Git is locked. Wait for other Git operations to finish.`],too_many_changes:[`仓库改动或分支过多,请在终端操作。`,`Too many changes or branches. Use the terminal for this operation.`],dirty_worktree:[`切换分支前请先提交或处理全部改动,包括未跟踪文件。`,`Commit or resolve all changes, including untracked files, before switching branches.`],nothing_staged:[`请先暂存要提交的文件。`,`Stage files before committing.`],identity_missing:[`请先在终端配置 Git user.name 和 user.email。`,`Configure Git user.name and user.email in the terminal first.`],invalid_branch:[`分支名称无效,请检查后重试。`,`Invalid branch name. Check the name and try again.`],branch_exists:[`同名分支已存在。`,`A branch with this name already exists.`],branch_in_use:[`该分支正在其他工作树中使用。`,`This branch is checked out in another worktree.`],no_commits:[`创建分支前请先完成首次提交。`,`Create an initial commit before creating a branch.`],invalid_path:[`该文件不支持此操作,请刷新检查。`,`This file cannot be changed here. Refresh and check it.`],invalid_message:[`请填写提交说明(最多 8 KB)。`,`Enter a commit message (up to 8 KB).`],git_failed:[`Git 操作失败。请检查仓库、身份、签名或 hooks 配置,再刷新确认。`,`Git operation failed. Check repository, identity, signing or hooks configuration, then refresh.`],outcome_unknown:[`未能确认操作结果。请刷新检查暂存区、历史和分支,确认前不要重复提交。`,`Operation outcome is unknown. Refresh and check staging, history and branches before repeating it.`]},n=t[e]??t.git_failed;return d(...n)}async function C(e,t,r,i){return a(await n(`/api/workspace/git/${e}`,{method:`POST`,headers:{Authorization:`Bearer ${b()}`,"Content-Type":`application/json`},body:JSON.stringify({sessionId:t,...r}),signal:i}))}var w={control:(e,t)=>C(`control`,e,{},t),write:(e,t)=>C(`write`,e,t),status:(e,t)=>C(`status`,e,{},t),diff:(e,t,n,r)=>C(`diff`,e,{path:t,area:n},r),history:(e,t,n)=>C(`history`,e,{cursor:t},n),commit:(e,t,n,r)=>C(`commit-detail`,e,{hash:t,parentIndex:n},r),commitDiff:(e,t,n,r,i)=>C(`commit-diff`,e,{hash:t,path:n,parentIndex:r},i)};function T(e,t,n,r=!0){let[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(!0),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(0),f=(0,x.useCallback)(()=>{s(!0),d(e=>e+1)},[]);return(0,x.useEffect)(()=>{if(!t)return;let n=!1,i=!1,o=!1,c=new AbortController,u=async()=>{if(!(n||document.visibilityState===`hidden`)){if(i)o=!0;else{i=!0,s(!0);try{let t=await e(c.signal);n||(a(e=>JSON.stringify(e)===JSON.stringify(t)?e:t),l(!1))}catch{n||l(!0)}finally{i=!1,n||(s(!1),o&&(o=!1,u()))}}}};u();let d=r?window.setInterval(()=>{u()},5e3):void 0,f=()=>{u()};return window.addEventListener(`focus`,f),window.addEventListener(`pi-workspace-git-changed`,f),document.addEventListener(`visibilitychange`,f),()=>{n=!0,c.abort(),window.clearInterval(d),window.removeEventListener(`pi-workspace-git-changed`,f),window.removeEventListener(`focus`,f),document.removeEventListener(`visibilitychange`,f)}},[e,t,n,u,r]),{value:i,loading:o,error:c,refresh:f}}var E={panel:`_panel_1ndkv_2`,viewSwitch:`_viewSwitch_1ndkv_3`,viewButton:`_viewButton_1ndkv_4`,repoBar:`_repoBar_1ndkv_5`,branchPicker:`_branchPicker_1ndkv_6`,branchTrigger:`_branchTrigger_1ndkv_7`,repoName:`_repoName_1ndkv_11`,divergence:`_divergence_1ndkv_12`,count:`_count_1ndkv_13`,scope:`_scope_1ndkv_14`,changesScroll:`_changesScroll_1ndkv_15`,groupHeading:`_groupHeading_1ndkv_16`,list:`_list_1ndkv_18`,changeRow:`_changeRow_1ndkv_19`,change:`_change_1ndkv_15`,diffScroll:`_diffScroll_1ndkv_23`,filename:`_filename_1ndkv_25`,status:`_status_1ndkv_27`,added:`_added_1ndkv_28`,removed:`_removed_1ndkv_29`,fileAction:`_fileAction_1ndkv_30`,commitFooter:`_commitFooter_1ndkv_32`,commitForm:`_commitForm_1ndkv_33`,rootHint:`_rootHint_1ndkv_36`,actionRow:`_actionRow_1ndkv_37`,hint:`_hint_1ndkv_38`,feedback:`_feedback_1ndkv_38`,feedbackRow:`_feedbackRow_1ndkv_41`,actionButton:`_actionButton_1ndkv_44`,branchPopover:`_branchPopover_1ndkv_46`,pickerHeader:`_pickerHeader_1ndkv_47`,branchSearch:`_branchSearch_1ndkv_49`,field:`_field_1ndkv_49`,branchList:`_branchList_1ndkv_50`,branchOption:`_branchOption_1ndkv_52`,newBranch:`_newBranch_1ndkv_56`,form:`_form_1ndkv_58`,checkbox:`_checkbox_1ndkv_60`,diffSummary:`_diffSummary_1ndkv_64`,stats:`_stats_1ndkv_65`,diff:`_diff_1ndkv_23`,diffLine:`_diffLine_1ndkv_68`,lineNumber:`_lineNumber_1ndkv_69`,lineText:`_lineText_1ndkv_70`,diffHunk:`_diffHunk_1ndkv_74`,diffNotice:`_diffNotice_1ndkv_75`,noNewline:`_noNewline_1ndkv_76`,reviewLayout:`_reviewLayout_1ndkv_79`,inlinePreview:`_inlinePreview_1ndkv_81`,inlineDiffToolbar:`_inlineDiffToolbar_1ndkv_83`,diffIdentity:`_diffIdentity_1ndkv_84`,diffDetails:`_diffDetails_1ndkv_85`,diffArea:`_diffArea_1ndkv_86`,diffNavigation:`_diffNavigation_1ndkv_88`,diffPosition:`_diffPosition_1ndkv_89`,diffViewport:`_diffViewport_1ndkv_91`},D=v();function O({children:e,preview:t,selectionKey:n,onClose:r}){let i=(0,x.useRef)(null),a=!!t;return(0,x.useEffect)(()=>{a&&n&&i.current?.querySelector(`[data-git-file][aria-pressed="true"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[n,a]),(0,D.jsxs)(`div`,{className:E.reviewLayout,"data-preview":a,ref:i,children:[e,t&&(0,D.jsx)(`div`,{className:E.inlinePreview,role:`region`,"aria-label":d(`差异预览`,`Diff preview`),onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&!e.defaultPrevented&&(e.preventDefault(),r())},children:t})]})}function k(e){return e===`staged`?d(`已暂存`,`Staged`):e===`unstaged`?d(`未暂存`,`Unstaged`):d(`未跟踪`,`Untracked`)}function A(e){let t=0,n=0,r=!1,i=e.split(`
|
|
2
|
+
`);return i.at(-1)===``&&i.pop(),i.map(e=>{let i=e.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(e.startsWith(`diff --git `)&&(r=!1),i&&(t=Number(i[1]),n=Number(i[2]),r=!0),r&&!i){if(e.startsWith(`+`))return{kind:`add`,text:e,oldLine:null,newLine:n++};if(e.startsWith(`-`))return{kind:`remove`,text:e,oldLine:t++,newLine:null};if(e.startsWith(` `))return{kind:`context`,text:e,oldLine:t++,newLine:n++}}return{kind:`meta`,text:e,oldLine:null,newLine:null}})}function j(e){let t=[],n=[],r=[],i=null,a=``,o=``,s=``;for(let c of A(e)){if(c.kind!==`meta`){c.kind===`context`?i=null:i===null&&(i=n.length,n.push(t.length)),t.push({...c,kind:c.kind,change:i});continue}let e=c.text.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@\s?(.*)$/);if(e)i=null,t.push({kind:`hunk`,oldLine:Number(e[1]),newLine:Number(e[2]),text:e[3],change:null});else if(c.text===`\`){let e=t.at(-1);e&&e.kind!==`hunk`&&(e.noNewline=!0)}else c.text.startsWith(`diff --git `)?(i=null,a=o=s=``):c.text.startsWith(`old mode `)?a=c.text.slice(9):c.text.startsWith(`new mode `)?r.push({kind:`mode`,from:a,to:c.text.slice(9)}):c.text.startsWith(`rename from `)?o=c.text.slice(12):c.text.startsWith(`rename to `)?r.push({kind:`rename`,from:o,to:c.text.slice(10)}):c.text.startsWith(`copy from `)?s=c.text.slice(10):c.text.startsWith(`copy to `)?r.push({kind:`copy`,from:s,to:c.text.slice(8)}):c.text.startsWith(`new file mode `)?r.push({kind:`added`,from:``,to:c.text.slice(14)}):c.text.startsWith(`deleted file mode `)&&r.push({kind:`deleted`,from:c.text.slice(18),to:``})}return{lines:t,changes:n,notices:r.filter(e=>!n.length||e.kind!==`added`&&e.kind!==`deleted`)}}function M({path:e,label:t,value:n,loading:r,error:i,refresh:a,onClose:o}){let c=n?.kind===`text`?n.patch:``,l=(0,x.useMemo)(()=>j(c),[c,e]),{lines:u,changes:f,notices:h}=l,_=(0,x.useRef)(null),[v,y]=(0,x.useState)(null),b=v?.preview===l?v.index:-1;(0,x.useEffect)(()=>{_.current?.scrollTo({top:0,left:0})},[l]);let S=e=>{if(r||i||e<0||e>=f.length)return;let t=_.current,n=t?.querySelector(`[data-change="${e}"][data-change-start="true"]`);t&&n&&(t.scrollTo({top:t.scrollTop+n.getBoundingClientRect().top-t.getBoundingClientRect().top,left:t.scrollLeft}),y({preview:l,index:e}))},C=u.filter(e=>e.kind===`add`).length,w=u.filter(e=>e.kind===`remove`).length,T=n?.kind===`text`&&(0,D.jsxs)(`span`,{className:E.stats,children:[(0,D.jsxs)(`span`,{className:E.added,children:[`+`,C]}),(0,D.jsxs)(`span`,{className:E.removed,children:[`−`,w]})]}),O={empty:d(`此文件在所选范围内没有文本差异,或已不在改动列表中。`,`No text differences in this scope, or this file is no longer changed.`),binary:d(`二进制文件不支持文本差异预览。`,`Text diff is unavailable for binary files.`),"too-large":d(`差异过大,最多显示 512 KB / 10000 行。`,`Diff exceeds the preview limit of 512 KB / 10000 lines.`),unsupported:d(`此文件类型不支持差异预览。`,`Diff is unavailable for this file type.`),conflict:d(`此文件存在未解决的合并冲突,请在工作区文件或终端中检查。`,`This file has unresolved merge conflicts. Inspect it in workspace files or the terminal.`),submodule:d(`子模块已发生变化,请在子模块工作区中查看具体差异。`,`Submodule changed. Open its workspace to inspect the changes.`)};return(0,D.jsxs)(`div`,{className:s.body,children:[(0,D.jsxs)(`div`,{className:o?E.inlineDiffToolbar:s.toolbar,children:[o?(0,D.jsxs)(`div`,{className:E.diffIdentity,children:[(0,D.jsx)(`span`,{className:s.path,title:e,children:e}),(0,D.jsxs)(`div`,{className:E.diffDetails,children:[(0,D.jsx)(`span`,{className:E.diffArea,title:t,children:t}),T]})]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:s.path,title:e,children:e}),(0,D.jsx)(`span`,{className:s.readonly,children:d(`只读`,`Read only`)})]}),(0,D.jsxs)(`div`,{className:E.diffNavigation,role:`group`,"aria-label":d(`改动跳转`,`Change navigation`),children:[(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`上一处改动`,`Previous change`),title:d(`上一处改动`,`Previous change`),disabled:r||i||b<=0,onClick:()=>S(b-1),children:(0,D.jsx)(p,{})}),(0,D.jsxs)(`span`,{className:E.diffPosition,role:`status`,"aria-label":d(`改动位置`,`Change position`),"aria-live":`polite`,"aria-atomic":`true`,title:d(`第 ${b+1} / ${f.length} 处改动`,`Change ${b+1} of ${f.length}`),children:[b+1,`/`,f.length]}),(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`下一处改动`,`Next change`),title:d(`下一处改动`,`Next change`),disabled:r||i||b+1>=f.length,onClick:()=>S(b+1),children:(0,D.jsx)(m,{})})]}),(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`刷新差异`,`Refresh diff`),title:d(`刷新差异`,`Refresh diff`),onClick:a,children:(0,D.jsx)(g,{})}),o&&(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`关闭差异预览`,`Close diff preview`),title:d(`关闭差异预览 · Esc`,`Close diff preview · Esc`),onClick:o,children:`×`})]}),!o&&(0,D.jsxs)(`div`,{className:E.diffSummary,children:[(0,D.jsx)(`span`,{children:t}),T]}),i&&(0,D.jsxs)(`div`,{className:s.state,role:`status`,children:[d(`差异读取失败,请重试。`,`Could not read this diff. Try again.`),` `,(0,D.jsx)(`button`,{type:`button`,className:s.textButton,onClick:a,children:d(`重试`,`Retry`)})]}),(0,D.jsxs)(`div`,{className:`${s.preview} ${E.diffViewport}`,"aria-busy":r,children:[!n&&!i&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`正在读取差异…`,`Reading diff…`)}),n&&n.kind!==`text`&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:O[n.kind]}),n?.kind===`text`&&(0,D.jsxs)(`div`,{ref:_,className:E.diffScroll,tabIndex:0,role:`region`,"aria-label":d(`文件差异`,`File diff`),children:[h.map((e,t)=>(0,D.jsx)(`p`,{className:E.diffNotice,children:N(e)},t)),!u.length&&!h.length&&(0,D.jsx)(`p`,{className:s.state,children:O.empty}),(0,D.jsx)(`pre`,{className:E.diff,children:(0,D.jsx)(`code`,{children:u.map((e,t)=>e.kind===`hunk`?(0,D.jsxs)(`span`,{className:E.diffHunk,"data-kind":`hunk`,children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,children:`···`}),(0,D.jsxs)(`span`,{children:[d(`行 ${e.oldLine} / ${e.newLine}`,`Lines ${e.oldLine} / ${e.newLine}`),e.text&&` · ${e.text}`]})]},t):(0,D.jsxs)(`span`,{className:E.diffLine,"data-kind":e.kind,"data-change":e.change??void 0,"data-change-start":e.change!==null&&f[e.change]===t?`true`:void 0,"data-active":e.change!==null&&b===e.change?`true`:void 0,children:[(0,D.jsx)(`span`,{className:E.lineNumber,"aria-hidden":`true`,children:e.oldLine}),(0,D.jsx)(`span`,{className:E.lineNumber,"aria-hidden":`true`,children:e.newLine}),(0,D.jsxs)(`span`,{className:E.lineText,children:[e.text||` `,e.noNewline&&(0,D.jsx)(`span`,{className:E.noNewline,title:d(`文件末尾无换行`,`No newline at end of file`),"aria-label":d(`文件末尾无换行`,`No newline at end of file`),children:`↵`})]})]},t))})})]})]})]})}function N(e){switch(e.kind){case`mode`:return d(`文件权限:${e.from} → ${e.to}`,`File mode: ${e.from} → ${e.to}`);case`rename`:return d(`重命名:${e.from} → ${e.to}`,`Renamed: ${e.from} → ${e.to}`);case`copy`:return d(`复制:${e.from} → ${e.to}`,`Copied: ${e.from} → ${e.to}`);case`added`:return d(`新增空文件`,`Empty file added`);case`deleted`:return d(`删除空文件`,`Empty file deleted`)}}var P=(0,x.memo)(function({sessionId:e,path:t,area:n,visible:r,idle:i,onClose:a}){f();let o=T((0,x.useCallback)(r=>w.diff(e,t,n,r),[e,t,n]),r,i);return(0,D.jsx)(M,{path:t,label:k(n),onClose:a,...o})});function F(e,t){if(!e)return null;let n=t.find(t=>t.path===e.path);if(!n)return null;let r=n.conflict?[`unstaged`]:n.untracked?[`untracked`]:[...n.worktree===`.`?[]:[`unstaged`],...n.index===`.`?[]:[`staged`]];return r.includes(e.area)?e:r[0]?{path:e.path,area:r[0]}:null}function I({branch:e,control:n,disabled:r,model:a,open:o,onOpenChange:c,onDraftChange:l,onWrite:u}){let f=(0,x.useRef)(null),p=(0,x.useRef)(null),g=(0,x.useRef)(null),[v,y]=(0,x.useState)(!1),[b,C]=(0,x.useState)(!1),[w,T]=(0,x.useState)(``);t(p,o,()=>c(!1)),(0,x.useEffect)(()=>{if(!o){y(!1),T(``),C(!1);return}let e=e=>{e.target instanceof Node&&!f.current?.contains(e.target)&&c(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[o,c]),(0,x.useEffect)(()=>{v&&g.current?.focus()},[v]);let O=n?.scope?`root_required`:n?.dirty?`dirty_worktree`:null,k=n?.branches.filter(e=>e.name.toLocaleLowerCase().includes(w.toLocaleLowerCase()))??[],A=async(e,t)=>{C(!0),await u(e,t)&&c(!1)};return(0,D.jsxs)(`div`,{ref:f,className:E.branchPicker,children:[(0,D.jsxs)(`button`,{type:`button`,className:E.branchTrigger,disabled:!n,"aria-label":d(`管理分支`,`Manage branches`),"aria-haspopup":`dialog`,"aria-expanded":o,title:e??d(`分离 HEAD`,`Detached HEAD`),onClick:()=>c(!o),children:[(0,D.jsx)(h,{}),(0,D.jsx)(`span`,{children:e??d(`分离 HEAD`,`Detached HEAD`)}),(0,D.jsx)(m,{})]}),o&&(0,D.jsxs)(i,{ref:p,className:E.branchPopover,compact:!0,role:`dialog`,"aria-modal":`true`,"aria-label":d(`管理分支`,`Manage branches`),children:[(0,D.jsxs)(`div`,{className:E.pickerHeader,children:[(0,D.jsx)(`span`,{children:v?d(`新建分支`,`New branch`):d(`本地分支`,`Local branches`)}),(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`关闭分支面板`,`Close branches`),onClick:()=>c(!1),children:`×`})]}),v?(0,D.jsxs)(`form`,{className:E.form,"aria-label":d(`创建分支`,`Create branch`),onSubmit:e=>{e.preventDefault(),!r&&a.branch.trim()&&n?.head&&!(a.checkout&&O)&&A(`create-branch`,{branch:a.branch,checkout:a.checkout})},children:[(0,D.jsxs)(`label`,{className:E.field,children:[d(`分支名称`,`Branch name`),(0,D.jsx)(`input`,{ref:g,"aria-label":d(`新分支名称`,`New branch name`),maxLength:256,value:a.branch,disabled:a.pending,placeholder:`feature/name`,onChange:e=>{a.branch=e.target.value,l()}})]}),(0,D.jsxs)(`label`,{className:E.checkbox,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:a.checkout,disabled:a.pending,onChange:e=>{a.checkout=e.target.checked,l()}}),d(`创建后切换`,`Switch after creating`)]}),a.checkout&&O&&(0,D.jsx)(`p`,{className:E.hint,children:S(O)}),(0,D.jsxs)(`div`,{className:E.actionRow,children:[(0,D.jsx)(`button`,{type:`button`,className:s.textButton,onClick:()=>y(!1),children:d(`返回`,`Back`)}),(0,D.jsx)(`button`,{className:E.actionButton,type:`submit`,disabled:r||!a.branch.trim()||!n?.head||a.checkout&&!!O,children:d(`创建分支`,`Create branch`)})]})]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`input`,{className:E.branchSearch,type:`search`,"data-modal-autofocus":!0,"aria-label":d(`搜索分支`,`Search branches`),value:w,placeholder:d(`搜索分支…`,`Search branches…`),onChange:e=>T(e.target.value)}),(0,D.jsxs)(`div`,{className:E.branchList,role:`group`,"aria-label":d(`本地分支`,`Local branches`),children:[k.map(e=>(0,D.jsxs)(`button`,{type:`button`,className:E.branchOption,title:e.name,disabled:r||!!O||e.current||e.occupied||!n?.head,"aria-label":d(`切换到分支:${e.name}`,`Switch to branch: ${e.name}`),onClick:()=>{A(`switch-branch`,{branch:e.name})},children:[(0,D.jsx)(h,{}),(0,D.jsx)(`span`,{children:e.name}),(e.current||e.occupied)&&(0,D.jsx)(`small`,{children:e.current?d(`当前`,`Current`):d(`其他工作树`,`Other worktree`)})]},e.name)),k.length===0&&(0,D.jsx)(`p`,{className:E.hint,children:d(`没有匹配的分支。`,`No matching branches.`)})]}),O&&(0,D.jsx)(`p`,{className:E.hint,children:S(O)}),(0,D.jsxs)(`button`,{type:`button`,className:E.newBranch,disabled:a.pending||!n?.head,"aria-label":d(`新建分支`,`New branch`),onClick:()=>y(!0),children:[(0,D.jsx)(_,{}),d(`新建分支…`,`New branch…`)]})]}),!n?.head&&(0,D.jsx)(`p`,{className:E.hint,children:S(`no_commits`)}),a.pending&&(0,D.jsx)(`p`,{className:E.hint,role:`status`,children:d(`正在执行…`,`Running…`)}),n?.blocked&&(0,D.jsx)(`p`,{className:E.hint,children:S(n.blocked)}),b&&a.outcome&&!a.outcome.ok&&(0,D.jsx)(`p`,{className:E.feedback,"data-error":`true`,role:`status`,children:S(a.outcome.reason)})]})]})}function L(e){let t=[],n=0,r=1,i=[];for(let a of e){let e=t.findIndex(e=>e.hash===a.hash),o=e<0?t.length:e,s=e<0?n++%4:t[o].color,c=[...t];e>=0&&t.splice(e,1);let l=Math.min(o,t.length),u=[...new Set(a.parents)];for(let[e,r]of u.entries())t.some(e=>e.hash===r)||t.splice(l++,0,{hash:r,color:e===0?s:n++%4});i.push({lane:o,color:s,incoming:e>=0,rails:c.flatMap((e,n)=>e.hash===a.hash?[]:[{from:n,to:t.findIndex(t=>t.hash===e.hash),color:e.color}]),parents:u.map(e=>{let n=t.findIndex(t=>t.hash===e);return{hash:e,from:o,to:n,color:t[n].color}})}),r=Math.max(r,o+1,c.length,t.length)}return{rows:i,width:r*16+16}}var R={history:`_history_1fyyf_1`,historyToolbar:`_historyToolbar_1fyyf_2`,graphScroll:`_graphScroll_1fyyf_3`,historyList:`_historyList_1fyyf_4`,commitRow:`_commitRow_1fyyf_5`,loadMore:`_loadMore_1fyyf_7`,parentLink:`_parentLink_1fyyf_7`,graph:`_graph_1fyyf_3`,commitCopy:`_commitCopy_1fyyf_15`,subject:`_subject_1fyyf_16`,refLine:`_refLine_1fyyf_17`,ref:`_ref_1fyyf_17`,merge:`_merge_1fyyf_20`,commitMeta:`_commitMeta_1fyyf_21`,detail:`_detail_1fyyf_27`,message:`_message_1fyyf_33`,parentList:`_parentList_1fyyf_35`,parentSelect:`_parentSelect_1fyyf_36`,fileStats:`_fileStats_1fyyf_38`},z=(0,x.memo)(function({sessionId:e,visible:t,idle:n,model:r,onCommit:i}){let a=f(),{value:o,loading:c,error:l,refresh:u}=T((0,x.useCallback)(t=>w.history(e,void 0,t),[e]),t,n),[p,m]=(0,x.useState)(r.history),[h,g]=(0,x.useState)(r.selected),[_,v]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),S=()=>{b(!1),u()},C=(0,x.useRef)(null);(0,x.useEffect)(()=>{o&&(r.history?.snapshot===o.snapshot&&r.history.commits.length||(C.current?.abort(),v(!1),b(!1),r.history=o,m(o)))},[o,r]),(0,x.useEffect)(()=>(t||(C.current?.abort(),v(!1)),()=>C.current?.abort()),[t]);let E=async()=>{let t=r.history;if(!t?.nextCursor||_)return;let n=new AbortController;C.current=n,v(!0),b(!1);try{let i=await w.history(e,t.nextCursor,n.signal);if(n.signal.aborted||r.history?.snapshot!==i.snapshot||r.history.nextCursor!==t.nextCursor)return;let a=new Set(t.commits.map(e=>e.hash)),o={...i,commits:[...t.commits,...i.commits.filter(e=>!a.has(e.hash))]};r.history=o,m(o)}catch{n.signal.aborted||b(!0)}finally{n.signal.aborted||v(!1)}},O=(0,x.useMemo)(()=>L(p?.commits??[]),[p?.commits]),k=e=>e*16+12,A=e=>{r.selected=e,g(e),i(e)},j={"--git-graph-width":`${O.width}px`};return(0,D.jsxs)(`div`,{className:R.history,"aria-busy":c||_,children:[(0,D.jsxs)(`div`,{className:R.historyToolbar,children:[(0,D.jsx)(`span`,{children:d(`提交历史与分支图`,`Commit history & graph`)}),(0,D.jsx)(`button`,{className:s.textButton,type:`button`,onClick:S,"aria-label":d(`刷新提交历史`,`Refresh history`),children:d(`刷新`,`Refresh`)})]}),p?.scope&&(0,D.jsxs)(`p`,{className:s.state,children:[d(`展示仓库提交关系;文件差异仅限当前目录:`,`Repository history; file diffs are limited to: `),p.scope]}),(l||y)&&(0,D.jsxs)(`p`,{className:s.state,role:`status`,children:[d(`历史读取失败或分支已变化,请刷新历史。`,`Could not read history, or refs changed. Refresh history.`),` `,(0,D.jsx)(`button`,{className:s.textButton,type:`button`,onClick:S,children:d(`重试`,`Retry`)})]}),!p&&!l&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`正在读取历史…`,`Reading history…`)}),p?.kind===`not-repository`&&(0,D.jsx)(`p`,{className:s.state,children:d(`当前工作区不在 Git 仓库中。`,`This workspace is not in a Git repository.`)}),p?.kind===`unavailable`&&(0,D.jsx)(`p`,{className:s.state,children:d(`Git 不可用。`,`Git is unavailable.`)}),p?.kind===`repository`&&p.commits.length===0&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`仓库尚无提交。`,`This repository has no commits yet.`)}),(0,D.jsx)(`div`,{className:R.graphScroll,children:(0,D.jsx)(`ol`,{className:R.historyList,style:j,"aria-label":d(`提交历史`,`Commit history`),children:p?.commits.map((e,t)=>{let n=O.rows[t],r=p.refs.filter(t=>t.hash===e.hash),i=new Date(e.authoredAt),o=Number.isNaN(i.getTime())?e.authoredAt:i.toLocaleDateString(a===`zh`?`zh-CN`:`en-US`);return(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{type:`button`,className:R.commitRow,"data-commit":e.hash,"aria-current":h===e.hash?`true`:void 0,"aria-label":d(`查看提交 ${e.hash.slice(0,7)}:${e.subject}`,`View commit ${e.hash.slice(0,7)}: ${e.subject}`),onClick:()=>A(e.hash),children:[(0,D.jsxs)(`svg`,{width:O.width,height:84,className:R.graph,"aria-hidden":`true`,"data-git-graph-row":e.hash,children:[n.rails.map((e,t)=>(0,D.jsx)(`path`,{"data-color":e.color,d:`M${k(e.from)} 0 L${k(e.from)} 42 C${k(e.from)} 64 ${k(e.to)} 64 ${k(e.to)} 84`},`r${t}`)),n.incoming&&(0,D.jsx)(`path`,{"data-color":n.color,d:`M${k(n.lane)} 0 V42`}),n.parents.map(e=>(0,D.jsx)(`path`,{"data-parent":e.hash,"data-color":e.color,d:`M${k(n.lane)} 42 C${k(n.lane)} 64 ${k(e.to)} 64 ${k(e.to)} 84`},e.hash)),(0,D.jsx)(`circle`,{"data-color":n.color,cx:k(n.lane),cy:42,r:4})]}),(0,D.jsxs)(`span`,{className:R.commitCopy,children:[(0,D.jsx)(`span`,{className:R.subject,children:e.subject||d(`(无提交说明)`,`(No subject)`)}),(0,D.jsxs)(`span`,{className:R.refLine,title:r.map(e=>`${e.kind}: ${e.name}`).join(` · `),children:[p.head===e.hash&&(0,D.jsx)(`span`,{className:R.ref,"data-kind":`head`,children:`HEAD`}),r.map(e=>(0,D.jsxs)(`span`,{className:R.ref,"data-kind":e.kind,children:[e.kind===`tag`?`${d(`标签`,`tag`)}: `:e.kind===`remote`?`${d(`远端`,`remote`)}: `:``,e.name]},`${e.kind}/${e.name}`)),e.parents.length>1&&(0,D.jsx)(`span`,{className:R.merge,children:d(`合并`,`Merge`)})]}),(0,D.jsxs)(`span`,{className:R.commitMeta,children:[(0,D.jsx)(`code`,{children:e.hash.slice(0,7)}),(0,D.jsx)(`span`,{children:e.author}),(0,D.jsx)(`time`,{dateTime:e.authoredAt,title:e.authoredAt,children:o})]})]})]})},e.hash)})})}),p?.nextCursor&&(0,D.jsx)(`button`,{type:`button`,className:R.loadMore,disabled:_||c||p.snapshot!==o?.snapshot,onClick:()=>{E()},children:_?d(`正在加载…`,`Loading…`):d(`加载更多提交`,`Load more commits`)})]})});function B(e){return{A:d(`新增`,`Added`),M:d(`修改`,`Modified`),D:d(`删除`,`Deleted`),R:d(`重命名`,`Renamed`),C:d(`复制`,`Copied`),T:d(`类型变化`,`Type changed`),U:d(`冲突`,`Conflict`),"?":d(`未跟踪`,`Untracked`)}[e]??e}var V=(0,x.memo)(function({sessionId:e,visible:t,idle:n,model:i,onCommit:a}){f();let l=(0,x.useRef)(null),[u,p]=(0,x.useState)(i.selection),m=(0,x.useCallback)(e=>{i.selection=e,p(e)},[i]),h=(0,x.useCallback)(()=>{let e=l.current?.querySelector(`[data-git-file][aria-pressed="true"]`);m(null),requestAnimationFrame(()=>e?.focus({preventScroll:!0}))},[m]),[_,v]=(0,x.useState)(i.view),y=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!t)return;let e=c(document);return y.current=e,()=>{e.dispose(),y.current=null}},[t]);let{value:b,loading:C,error:A}=T((0,x.useCallback)(t=>w.status(e,t),[e]),t&&_===`changes`,n),{value:j,loading:M,error:N}=T((0,x.useCallback)(t=>w.control(e,t),[e]),t&&_===`changes`,n),[L,R]=(0,x.useState)(!1);(0,x.useEffect)(()=>{t&&_===`changes`||R(!1)},[t,_]);let[,V]=(0,x.useReducer)(e=>e+1,0);(0,x.useEffect)(()=>{let e=()=>V();return window.addEventListener(`pi-workspace-git-changed`,e),()=>window.removeEventListener(`pi-workspace-git-changed`,e)},[]);let H=()=>window.dispatchEvent(new Event(`pi-workspace-git-changed`)),U=n?j?.blocked:`agent_busy`,W=i.pending||!j?.version||M||N||A||!!U,G=async(t,n={})=>{if(W||i.pending||!j)return!1;i.pending=!0,i.outcome=null,V();try{return await w.write(e,{action:t,expected:j.version,...n}),i.outcome={ok:!0,reason:t},t===`commit`&&i.message===n.message&&(i.message=``),t===`create-branch`&&i.branch===n.branch&&(i.branch=``),!0}catch(e){return i.outcome={ok:!1,reason:e instanceof r?e.reason??(e.status<500?`git_failed`:`outcome_unknown`):`outcome_unknown`},!1}finally{i.pending=!1,window.dispatchEvent(new Event(`pi-workspace-git-changed`))}},K=b?.kind===`repository`?b:null;(0,x.useEffect)(()=>{if(!t||_!==`changes`||C||A||!b)return;let e=F(i.selection,b.kind===`repository`?b.entries:[]);e!==i.selection&&(i.selection=e,p(e))},[b,C,A,t,_,i]);let q=K?[{title:d(`冲突`,`Conflicts`),area:`unstaged`,changes:K.entries.filter(e=>e.conflict),conflict:!0},{title:k(`staged`),area:`staged`,changes:K.entries.filter(e=>!e.conflict&&!e.untracked&&e.index!==`.`)},{title:k(`unstaged`),area:`unstaged`,changes:K.entries.filter(e=>!e.conflict&&!e.untracked&&e.worktree!==`.`)},{title:k(`untracked`),area:`untracked`,changes:K.entries.filter(e=>e.untracked)}]:[],J=!W&&!K?.scope&&!!j?.staged&&!!i.message.trim(),Y=K?.root.split(/[\\/]/).at(-1)??``,X=K?[K.root,K.head,K.upstream??d(`未设置上游分支`,`No upstream branch`)].filter(Boolean).join(`
|
|
3
|
+
`):``;return(0,D.jsxs)(`div`,{ref:l,className:`${s.body} ${E.panel}`,children:[(0,D.jsxs)(`div`,{className:s.toolbar,children:[(0,D.jsx)(`div`,{className:E.viewSwitch,role:`group`,"aria-label":d(`Git 视图`,`Git view`),children:[`changes`,`history`].map(e=>(0,D.jsx)(`button`,{type:`button`,className:`${s.textButton} ${E.viewButton}`,"aria-pressed":_===e,onClick:()=>{i.view=e,v(e)},children:e===`changes`?d(`改动`,`Changes`):d(`历史`,`History`)},e))}),_===`history`&&(0,D.jsx)(`span`,{className:s.readonly,children:d(`只读`,`Read only`)}),_===`changes`&&(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`刷新 Git 状态`,`Refresh Git status`),title:d(`刷新 Git 状态`,`Refresh Git status`),onClick:H,children:(0,D.jsx)(g,{})})]}),_===`history`?(0,D.jsx)(`div`,{className:s.scroll,children:(0,D.jsx)(z,{sessionId:e,visible:t,idle:n,model:i,onCommit:a})}):(0,D.jsxs)(D.Fragment,{children:[K&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`div`,{className:E.repoBar,children:[(0,D.jsx)(I,{branch:K.branch,control:j,disabled:W,model:i,open:L,onOpenChange:R,onDraftChange:V,onWrite:G}),(0,D.jsx)(`span`,{className:E.repoName,title:X,children:Y}),K.upstream&&K.ahead!==null&&(0,D.jsxs)(`span`,{className:E.divergence,title:d(`上游差异(本地记录)`,`Upstream divergence (local refs)`),children:[`↑`,K.ahead,` ↓`,K.behind]}),(0,D.jsxs)(`span`,{className:E.count,title:d(`改动文件`,`Changed files`),children:[K.entries.length,K.truncated?`+`:``]})]}),K.scope&&(0,D.jsxs)(`div`,{className:E.scope,title:K.scope,children:[d(`当前目录:`,`Directory: `),K.scope]})]}),(0,D.jsx)(O,{selectionKey:u?JSON.stringify(u):null,onClose:h,preview:u&&K?(0,D.jsx)(P,{sessionId:e,path:u.path,area:u.area,visible:t&&_===`changes`,idle:n,onClose:h},JSON.stringify([e,u])):null,children:(0,D.jsxs)(`div`,{className:`${s.scroll} ${E.changesScroll}`,"aria-busy":C,role:`region`,"aria-label":d(`改动文件`,`Changed files`),children:[A&&(0,D.jsxs)(`div`,{className:s.state,role:`status`,children:[d(`Git 读取失败,请检查仓库或重试。`,`Could not read Git. Check the repository or try again.`),` `,(0,D.jsx)(`button`,{type:`button`,className:s.textButton,onClick:H,children:d(`重试`,`Retry`)})]}),!b&&!A&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`正在读取仓库…`,`Reading repository…`)}),b?.kind===`not-repository`&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`当前工作区不在 Git 仓库中。`,`This workspace is not in a Git repository.`)}),b?.kind===`unavailable`&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`Git 不可用,请在 Pi 所在机器安装 Git。`,`Git is unavailable. Install Git on the machine running Pi.`)}),K&&(0,D.jsxs)(D.Fragment,{children:[K.entries.length===0&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:K.scope?d(`当前目录没有未提交改动。`,`No uncommitted changes in this directory.`):d(`工作区干净,没有未提交改动。`,`Working tree clean. No uncommitted changes.`)}),q.filter(e=>e.changes.length>0).map(e=>(0,D.jsxs)(`section`,{"aria-label":e.title,children:[(0,D.jsxs)(`h3`,{className:E.groupHeading,children:[e.title,(0,D.jsx)(`span`,{children:e.changes.length})]}),(0,D.jsx)(`ul`,{className:E.list,children:e.changes.map(t=>{let n=e.conflict?`U`:e.area===`staged`?t.index:t.worktree;return(0,D.jsxs)(`li`,{className:E.changeRow,children:[(0,D.jsxs)(`button`,{type:`button`,className:E.change,title:t.originalPath?`${t.originalPath} → ${t.path}`:t.path,"data-git-file":JSON.stringify([e.area,t.path]),"aria-pressed":u?.path===t.path&&u.area===e.area,onClick:()=>m({path:t.path,area:e.area}),"aria-label":`${t.path}, ${B(n)}`,children:[(0,D.jsx)(o,{path:t.path,size:16}),(0,D.jsxs)(`span`,{className:E.filename,children:[t.path,t.originalPath&&(0,D.jsxs)(`small`,{children:[t.originalPath,` → `,t.path]})]}),(0,D.jsx)(`span`,{className:E.status,"data-status":n,"aria-hidden":`true`,children:n})]}),!e.conflict&&!t.submodule&&(0,D.jsx)(`button`,{type:`button`,className:E.fileAction,disabled:W,"aria-label":e.area===`staged`?d(`取消暂存 ${t.path}`,`Unstage ${t.path}`):d(`暂存 ${t.path}`,`Stage ${t.path}`),title:e.area===`staged`?d(`取消暂存`,`Unstage`):d(`暂存`,`Stage`),onClick:()=>{G(e.area===`staged`?`unstage`:`stage`,{path:t.path})},children:e.area===`staged`?`−`:`+`})]},t.path)})})]},e.title)),K.truncated&&(0,D.jsx)(`p`,{className:s.state,children:d(`仅显示前 1000 个改动文件,请缩小工作区范围。`,`Showing the first 1000 changed files. Open a smaller workspace to see more.`)})]})]})}),K&&(0,D.jsxs)(`div`,{className:E.commitFooter,"aria-busy":i.pending,children:[U&&(0,D.jsx)(`p`,{className:E.hint,role:`status`,children:S(U)}),N&&(0,D.jsx)(`p`,{className:E.hint,role:`status`,children:d(`操作状态读取失败,请刷新。`,`Could not read operation state. Refresh to retry.`)}),i.pending&&!L&&(0,D.jsx)(`p`,{className:E.hint,role:`status`,children:d(`正在执行 Git 操作…`,`Running Git operation…`)}),i.outcome&&!L&&(0,D.jsxs)(`div`,{className:E.feedbackRow,children:[(0,D.jsx)(`p`,{className:E.feedback,"data-error":!i.outcome.ok,role:`status`,children:S(i.outcome.reason)}),(0,D.jsx)(`button`,{type:`button`,className:s.iconButton,"aria-label":d(`关闭 Git 提示`,`Dismiss Git message`),onClick:()=>{i.outcome=null,V()},children:`×`})]}),K.scope?(0,D.jsx)(`p`,{className:E.rootHint,title:S(`root_required`),children:d(`提交请打开仓库根目录`,`Commit from repository root`)}):(0,D.jsxs)(`form`,{className:E.commitForm,"aria-label":d(`创建提交`,`Create commit`),onSubmit:e=>{e.preventDefault(),J&&G(`commit`,{message:i.message})},children:[(0,D.jsx)(`textarea`,{"aria-label":d(`提交说明`,`Commit message`),rows:1,maxLength:8192,disabled:i.pending,value:i.message,placeholder:d(`提交说明…`,`Commit message…`),onChange:e=>{i.message=e.target.value,V()},onKeyDown:e=>{let t=y.current?.guards(e.nativeEvent)??e.nativeEvent.isComposing;e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!t&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,D.jsxs)(`div`,{className:E.actionRow,children:[(0,D.jsx)(`span`,{className:E.hint,children:j?.staged?d(`仅暂存区 · ${j.staged} 个文件`,`Staged only · ${j.staged} files`):d(`先暂存要提交的文件`,`Stage files to commit`)}),(0,D.jsx)(`button`,{className:E.actionButton,type:`submit`,disabled:!J,title:d(`仅提交暂存区 · ⌘/Ctrl+Enter`,`Commit staged files · ⌘/Ctrl+Enter`),children:d(`提交`,`Commit`)})]})]})]})]})]})}),H=(0,x.memo)(function({sessionId:e,hash:t,visible:n,idle:r,onCommit:i}){f();let a=(0,x.useRef)(null),[c,l]=(0,x.useState)(null),u=()=>{let e=a.current?.querySelector(`[data-git-file][aria-pressed="true"]`);l(null),requestAnimationFrame(()=>e?.focus({preventScroll:!0}))},[p,m]=(0,x.useState)(0),{value:h,loading:_,error:v,refresh:y}=T((0,x.useCallback)(n=>w.commit(e,t,p,n),[e,t,p]),n,r,!1),b=h?.parentIndex===p?h:null;return(0,x.useEffect)(()=>{b&&c&&!b.files.some(e=>e.path===c)&&l(null)},[b,c]),(0,D.jsxs)(`div`,{className:`${s.body} ${E.panel}`,ref:a,children:[(0,D.jsxs)(`div`,{className:s.toolbar,children:[(0,D.jsxs)(`span`,{className:s.path,children:[d(`提交详情`,`Commit details`),` · `,t.slice(0,7)]}),(0,D.jsx)(`span`,{className:s.readonly,children:d(`只读`,`Read only`)}),(0,D.jsx)(`button`,{className:s.iconButton,type:`button`,onClick:y,"aria-label":d(`刷新提交详情`,`Refresh commit`),children:(0,D.jsx)(g,{})})]}),(0,D.jsx)(O,{selectionKey:c,onClose:u,preview:c&&b?(0,D.jsx)(U,{sessionId:e,hash:t,path:c,parentIndex:p,visible:n,idle:r,onClose:u},JSON.stringify([e,t,p,c])):null,children:(0,D.jsxs)(`div`,{className:s.scroll,"aria-busy":_,children:[v&&(0,D.jsxs)(`p`,{className:s.state,role:`status`,children:[d(`提交读取失败,可能已不可达。`,`Could not read this commit. It may no longer be reachable.`),` `,(0,D.jsx)(`button`,{className:s.textButton,type:`button`,onClick:y,children:d(`重试`,`Retry`)})]}),!h&&!v&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`正在读取提交…`,`Reading commit…`)}),h&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`div`,{className:R.detail,children:[(0,D.jsx)(`h2`,{children:h.subject||d(`(无提交说明)`,`(No subject)`)}),(0,D.jsxs)(`dl`,{children:[(0,D.jsx)(`dt`,{children:d(`提交`,`Commit`)}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(`code`,{children:h.hash})}),(0,D.jsx)(`dt`,{children:d(`作者`,`Author`)}),(0,D.jsxs)(`dd`,{children:[h.author,` <`,h.email,`>`]}),(0,D.jsx)(`dt`,{children:d(`创作时间`,`Authored`)}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(`time`,{dateTime:h.authoredAt,children:h.authoredAt})}),(0,D.jsx)(`dt`,{children:d(`提交者`,`Committer`)}),(0,D.jsxs)(`dd`,{children:[h.committer,` <`,h.committerEmail,`>`]}),(0,D.jsx)(`dt`,{children:d(`提交时间`,`Committed`)}),(0,D.jsx)(`dd`,{children:(0,D.jsx)(`time`,{dateTime:h.committedAt,children:h.committedAt})}),(0,D.jsx)(`dt`,{children:d(`父提交`,`Parents`)}),(0,D.jsx)(`dd`,{className:R.parentList,children:h.parents.length?h.parents.map((e,t)=>(0,D.jsx)(`button`,{type:`button`,className:R.parentLink,onClick:()=>i(e),"aria-label":d(`打开父提交 ${t+1}:${e.slice(0,7)}`,`Open parent ${t+1}: ${e.slice(0,7)}`),children:(0,D.jsx)(`code`,{children:e.slice(0,7)})},e)):d(`根提交`,`Root commit`)})]}),(0,D.jsx)(`div`,{className:R.message,"aria-label":d(`完整提交说明`,`Full commit message`),children:h.message}),h.scope&&(0,D.jsxs)(`p`,{className:s.state,children:[d(`文件改动仅限:`,`File changes limited to: `),h.scope]})]}),h.parents.length>1?(0,D.jsxs)(`label`,{className:R.parentSelect,children:[d(`比较基准`,`Compare against`),(0,D.jsx)(`select`,{"aria-label":d(`比较父提交`,`Compare parent`),value:p,onChange:e=>{l(null),m(Number(e.target.value))},children:h.parents.map((e,t)=>(0,D.jsxs)(`option`,{value:t,children:[d(`父提交 ${t+1}`,`Parent ${t+1}`),` · `,e.slice(0,7)]},`${t}/${e}`))})]}):(0,D.jsx)(`p`,{className:s.state,children:h.parents.length?d(`与父提交比较`,`Compared with parent`):d(`与空目录比较`,`Compared with empty tree`)}),!b&&!v&&(0,D.jsx)(`p`,{className:s.state,role:`status`,children:d(`正在读取文件改动…`,`Reading changed files…`)}),b&&(0,D.jsxs)(`section`,{"aria-label":d(`提交文件`,`Commit files`),children:[(0,D.jsxs)(`h3`,{className:E.groupHeading,children:[d(`改动文件`,`Changed files`),(0,D.jsxs)(`span`,{children:[b.files.length,b.truncated?`+`:``]})]}),b.files.length===0&&(0,D.jsx)(`p`,{className:s.state,children:d(`所选比较在当前目录中没有文件改动。`,`No file changes in this directory for this comparison.`)}),(0,D.jsx)(`ul`,{className:E.list,children:b.files.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{className:E.change,type:`button`,"data-git-file":e.path,"aria-pressed":c===e.path,onClick:()=>l(e.path),"aria-label":d(`查看提交差异:${e.path}`,`View commit diff: ${e.path}`),children:[(0,D.jsx)(o,{path:e.path,size:16}),(0,D.jsx)(`span`,{className:E.filename,children:e.path}),(0,D.jsx)(`span`,{className:R.fileStats,children:e.additions===null?d(`二进制`,`Binary`):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`span`,{className:E.added,children:[`+`,e.additions]}),(0,D.jsxs)(`span`,{className:E.removed,children:[`−`,e.deletions]})]})}),(0,D.jsx)(`span`,{className:E.status,"data-status":e.status,children:e.status})]})},e.path))}),b.truncated&&(0,D.jsx)(`p`,{className:s.state,children:d(`仅显示前 1000 个文件。`,`Showing the first 1000 files.`)})]})]})]})})]})}),U=(0,x.memo)(function({sessionId:e,hash:t,path:n,parentIndex:r,visible:i,idle:a,onClose:o}){f();let s=T((0,x.useCallback)(i=>w.commitDiff(e,t,n,r,i),[e,t,n,r]),i,a,!1),c=s.value?s.value.parentHash?`${d(`父提交`,`Parent`)} ${s.value.parentHash.slice(0,7)}`:d(`空目录`,`Empty tree`):``;return(0,D.jsx)(M,{onClose:o,path:n,label:`${t.slice(0,7)}${c?` · ${c}`:``}`,...s})}),W=()=>({selection:null,view:`changes`,history:null,selected:null,message:``,branch:``,checkout:!0,pending:!1,outcome:null}),G={id:u.git,kind:`builtin`,version:`1.0.0`,name:{zh:`Git`,en:`Git`},description:{zh:`审阅工作区改动与提交历史,暂存文件、提交并管理本地分支。`,en:`Review workspace changes and history, stage files, commit and manage local branches.`}},K=l({id:G.id,apiVersion:1,activate(){},workbench:{apiVersion:1,entry:{label:{zh:`Git 改动`,en:`Git changes`},description:{zh:`查看分支、工作区改动与文件差异`,en:`Review branches, workspace changes and file diffs`},kind:`git`,icon:h},panels:[{kind:`git`,title:()=>(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(h,{size:16}),(0,D.jsx)(`span`,{children:`Git`})]}),component:e=>(0,D.jsx)(V,{sessionId:e.session.sessionId,visible:e.visible,idle:e.session.idle,model:e.resource(W),onCommit:t=>e.open(`git-commit`,t,t.slice(0,7))})},{kind:`git-commit`,component:e=>(0,D.jsx)(H,{sessionId:e.session.sessionId,hash:e.contentId,visible:e.visible,idle:e.session.idle,onCommit:t=>e.open(`git-commit`,t,t.slice(0,7))})},{kind:`git-diff`,component:e=>{let[t,n]=JSON.parse(e.contentId);return(0,D.jsx)(P,{sessionId:e.session.sessionId,area:t,path:n,visible:e.visible,idle:e.session.idle})}},{kind:`git-commit-diff`,component:e=>{let[t,n,r]=JSON.parse(e.contentId);return(0,D.jsx)(U,{sessionId:e.session.sessionId,hash:t,parentIndex:n,path:r,visible:e.visible,idle:e.session.idle})}}]}});export{K as default};
|
|
4
|
+
//# debugId=9aa61549-a8e2-4651-a220-3ba0b5f33ea4
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`96536c1b-d7ed-4841-97ae-8e02cbd59a29`,e._sentryDebugIdIdentifier=`sentry-dbid-96536c1b-d7ed-4841-97ae-8e02cbd59a29`)}catch{}})();import{n as e}from"./rolldown-runtime-CgmABjMJ.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"R","fileTypes":["R","r","Rprofile"],"foldingStartMarker":"\\\\{\\\\s*(?:#|$)","foldingStopMarker":"^\\\\s*}","name":"r","patterns":[{"include":"#roxygen-example"},{"include":"#basic"}],"repository":{"basic":{"patterns":[{"include":"#roxygen"},{"include":"#comment"},{"include":"#expression"}]},"basic-roxygen-example":{"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"include":"#comment"},{"include":"#expression"}]},"brackets":{"patterns":[{"begin":"\\\\{","end":"}","name":"meta.bracket","patterns":[{"include":"#basic"}]},{"begin":"\\\\[","end":"]","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]},{"begin":"\\\\(","end":"\\\\)","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]}]},"comment":{"match":"#.*","name":"comment.line"},"escape-code":{"match":"\\\\\\\\[\\"'\\\\\\\\\`abefnrtv]","name":"constant.character.escape"},"escape-hex":{"match":"\\\\\\\\x\\\\h+","name":"constant.numeric"},"escape-invalid":{"match":"\\\\\\\\.","name":"invalid"},"escape-octal":{"match":"\\\\\\\\\\\\d{1,3}","name":"constant.character.escape"},"escape-unicode":{"match":"\\\\\\\\[Uu](?:\\\\h+|\\\\{\\\\h+})","name":"constant.character.escape"},"escapes":{"patterns":[{"include":"#escape-code"},{"include":"#escape-hex"},{"include":"#escape-octal"},{"include":"#escape-unicode"},{"include":"#escape-invalid"}]},"expression":{"patterns":[{"include":"#brackets"},{"include":"#raw-strings"},{"include":"#strings"},{"include":"#function-definition"},{"include":"#keywords"},{"include":"#namespace-call"},{"include":"#function-call"},{"include":"#identifiers"},{"include":"#numbers"},{"include":"#operators"}]},"function-call":{"captures":{"0":{"name":"meta.function-call"},"1":{"name":"entity.name.function"}},"match":"([.\\\\w]+)(?=\\\\()"},"function-definition":{"begin":"(function)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other"},"2":{"name":"meta.bracket"}},"end":"(\\\\))","endCaptures":{"1":{"name":"meta.bracket"}},"name":"meta.function.definition","patterns":[{"begin":"([.\\\\w]+)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(?=[),])","patterns":[{"include":"#basic"}]},{"include":"#basic"}]},"identifier-quoted":{"begin":"\`","end":"\`","name":"variable.object","patterns":[{"match":"\\\\\\\\\`"}]},"identifier-syntactic":{"match":"[.\\\\p{L}\\\\p{Nl}][.\\\\p{L}\\\\p{Nl}\\\\p{Mn}\\\\p{Mc}\\\\d\\\\p{Pc}]*","name":"variable.object"},"identifiers":{"patterns":[{"include":"#identifier-syntactic"},{"include":"#identifier-quoted"}]},"keywords":{"patterns":[{"include":"#keywords-control"},{"include":"#keywords-builtin"},{"include":"#keywords-constant"}]},"keywords-builtin":{"match":"(?:setGroupGeneric|setRefClass|setGeneric|NextMethod|setMethod|UseMethod|tryCatch|setClass|warning|require|library|R6Class|return|switch|attach|detach|source|stop|try)(?=\\\\()","name":"keyword.other"},"keywords-constant":{"match":"(?:NA_character_|NA_integer_|NA_complex_|NA_real_|TRUE|FALSE|NULL|Inf|NaN|NA)\\\\b","name":"constant.language"},"keywords-control":{"match":"(?:\\\\\\\\|function|if|else|in|break|next|repeat|for|while)\\\\b","name":"keyword"},"latex":{"patterns":[{"match":"\\\\\\\\\\\\w+","name":"keyword.other"}]},"markdown":{"patterns":[{"begin":"(\`{3,})\\\\s*(.*)","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"entity.name.section"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"comment.line"}},"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"}]},{"captures":{"1":{"name":"meta.bracket"},"2":{"name":"variable.object"},"3":{"name":"keyword.operator"},"4":{"name":"entity.name.function"},"5":{"name":"meta.bracket"},"6":{"name":"meta.bracket"}},"match":"(\\\\[)(?:(\\\\w+)(:{2,3}))?(\\\\w+)(\\\\(\\\\))?(])"},{"match":"(\\\\s+|^)(__.+?__)\\\\b","name":"markdown.bold"},{"match":"(\\\\s+|^)(_(?=[^_])(?:\\\\\\\\.|[^\\\\\\\\_])*?_)\\\\b","name":"markdown.italic"},{"match":"(\\\\*\\\\*.+?\\\\*\\\\*)","name":"markdown.bold"},{"match":"(\\\\*(?=[^*\\\\s])(?:\\\\\\\\.|[^*\\\\\\\\])*?\\\\*)","name":"markdown.italic"},{"match":"(\`(?:[^\\\\\\\\\`]|\\\\\\\\.)*\`)","name":"markup.quote"},{"match":"(<)([^>]*)(>)","name":"markup.underline.link"}]},"namespace-call":{"captures":{"1":{"name":"entity.name.namespace.r"},"2":{"name":"keyword.operator"}},"match":"(?<![.0-9A-Z_a-z])([.A-Z_a-z][.0-9A-Z_a-z]*)(:::?)"},"numbers":{"patterns":[{"match":"0[Xx]\\\\h+(?:p[-+]?\\\\d+)?[Li]?","name":"constant.numeric"},{"match":"(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)(?:[Ee][-+]?\\\\d*)?[Li]?","name":"constant.numeric"}]},"operators":{"match":"%.*?%|:::?|:=|\\\\|>|=>|%%|>=|<=|==|!=|<<-|->>?|<-|\\\\|\\\\||&&|[-+=]|\\\\*\\\\*?|[!$\\\\&,/:<>?@^|~]","name":"keyword.operator"},"qqstring":{"begin":"\\"","end":"\\"","name":"string.quoted.double","patterns":[{"include":"#escapes"}]},"qstring":{"begin":"'","end":"'","name":"string.quoted.single","patterns":[{"include":"#escapes"}]},"raw-strings":{"name":"string.quoted.other","patterns":[{"begin":"[Rr]\\"(-*)\\\\{","end":"}\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\{","end":"}\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\[","end":"]\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\[","end":"]\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\(","end":"\\\\)\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\(","end":"\\\\)\\\\1'","name":"string.quoted.other"}]},"roxygen":{"begin":"^(\\\\s*#+')","beginCaptures":{"1":{"name":"comment.line.roxygen"}},"end":"$","patterns":[{"include":"#markdown"},{"include":"#roxygen-tokens"},{"include":"#latex"},{"match":".","name":"comment.line"}]},"roxygen-example":{"begin":"^(\\\\s*#+')\\\\s*(?:(@examples)\\\\s*|(@examplesIf)\\\\s+(.*))$","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"keyword.other"},"3":{"name":"keyword.other"},"4":{"patterns":[{"include":"#expression"}]}},"end":"^(?:\\\\s*(?=#+'\\\\s*@)|\\\\s*(?!#+'))","patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"match":"[]()\\\\[{}]","name":"meta.bracket"},{"include":"#latex"},{"include":"#roxygen-tokens"},{"include":"#basic-roxygen-example"}]},"roxygen-tokens":{"patterns":[{"match":"@@","name":"constant.character.escape"},{"begin":"(@(?:param|field|slot))\\\\s*","beginCaptures":{"1":{"name":"keyword.other"}},"end":"\\\\s|$","patterns":[{"match":"([.\\\\w]+)","name":"variable.parameter"},{"match":",","name":"keyword.operator"}]},{"match":"@(?!@)\\\\w*","name":"keyword.other"}]},"strings":{"patterns":[{"include":"#qstring"},{"include":"#qqstring"}]}},"scopeName":"source.r"}`))];export{t as n,n as t};
|
|
2
|
+
//# debugId=96536c1b-d7ed-4841-97ae-8e02cbd59a29
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0a0c6f0b-43ea-49d0-905e-9ebd40e3b871`,e._sentryDebugIdIdentifier=`sentry-dbid-0a0c6f0b-43ea-49d0-905e-9ebd40e3b871`)}catch{}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{s as n,l as r,o as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ca8e6c4b-41ca-47d2-8970-ff37ae2ddd67`,e._sentryDebugIdIdentifier=`sentry-dbid-ca8e6c4b-41ca-47d2-8970-ff37ae2ddd67`)}catch{}})();import{t as e}from"./html-derivative-Di3X0LuZ.js";import t from"./cpp-DKT7ktbv.js";import n from"./python-_UfA4Rpn.js";import{t as r}from"./javascript-qRALF4mN.js";import{i}from"./CodeBlock-BdAsIj3e.js";import a from"./yaml-BOAQTz6b.js";import o from"./cmake-Cf85PuIk.js";import s from"./ruby-BzF-keyw.js";var c=Object.freeze(JSON.parse('{"displayName":"reStructuredText","name":"rst","patterns":[{"include":"#body"}],"repository":{"anchor":{"match":"^\\\\.{2}\\\\s+(_[^:]+:)\\\\s*","name":"entity.name.tag.anchor"},"block":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+\\\\S+::)(.*)","beginCaptures":{"2":{"name":"keyword.control"},"3":{"name":"variable"}},"end":"^(?!\\\\1\\\\s|\\\\s*$)","patterns":[{"include":"#block-param"},{"include":"#body"}]},"block-comment":{"begin":"^(\\\\s*)\\\\.{2}(\\\\s+|$)","end":"^(?:(?=\\\\S)|\\\\s*$)","name":"comment.block","patterns":[{"begin":"^\\\\s{3,}(?=\\\\S)","name":"comment.block","while":"^(?:\\\\s{3}.*|\\\\s*$)"}]},"block-param":{"patterns":[{"captures":{"1":{"name":"keyword.control"},"2":{"name":"variable.parameter"}},"match":"(:param\\\\s+(.+?):)(?:\\\\s|$)"},{"captures":{"1":{"name":"keyword.control"},"2":{"patterns":[{"match":"\\\\b(0x[A-Fa-f\\\\d]+|\\\\d+)\\\\b","name":"constant.numeric"},{"include":"#inline-markup"}]}},"match":"(:.+?:)(?:$|\\\\s+(.*))"}]},"blocks":{"patterns":[{"include":"#domains"},{"include":"#doctest"},{"include":"#code-block-cpp"},{"include":"#code-block-py"},{"include":"#code-block-console"},{"include":"#code-block-javascript"},{"include":"#code-block-yaml"},{"include":"#code-block-cmake"},{"include":"#code-block-kconfig"},{"include":"#code-block-ruby"},{"include":"#code-block-dts"},{"include":"#code-block"},{"include":"#doctest-block"},{"include":"#raw-html"},{"include":"#block"},{"include":"#literal-block"},{"include":"#block-comment"}]},"body":{"patterns":[{"include":"#title"},{"include":"#inline-markup"},{"include":"#anchor"},{"include":"#line-block"},{"include":"#replace-include"},{"include":"#footnote"},{"include":"#substitution"},{"include":"#blocks"},{"include":"#table"},{"include":"#simple-table"},{"include":"#options-list"}]},"bold":{"begin":"(?<=[\\"\'(<\\\\[{\\\\s]|^)\\\\*{2}[^*\\\\s]","end":"\\\\*{2}|^\\\\s*$","name":"markup.bold"},"citation":{"applyEndPatternLast":0,"begin":"(?<=[\\"\'(<\\\\[{\\\\s]|^)`[^`\\\\s]","end":"`_{0,2}|^\\\\s*$","name":"entity.name.tag"},"code-block":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)","beginCaptures":{"2":{"name":"keyword.control"}},"patterns":[{"include":"#block-param"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-cmake":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(cmake)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.cmake"}},"patterns":[{"include":"#block-param"},{"include":"source.cmake"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-console":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(console|shell|bash)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.console"}},"patterns":[{"include":"#block-param"},{"include":"source.shell"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-cpp":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(c|c\\\\+\\\\+|cpp|C|C\\\\+\\\\+|CPP|Cpp)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.cpp"}},"patterns":[{"include":"#block-param"},{"include":"source.cpp"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-dts":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(dts|DTS|devicetree)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.dts"}},"patterns":[{"include":"#block-param"},{"include":"source.dts"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-javascript":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(javascript)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.js"}},"patterns":[{"include":"#block-param"},{"include":"source.js"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-kconfig":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*([Kk]config)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.kconfig"}},"patterns":[{"include":"#block-param"},{"include":"source.kconfig"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-py":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(python)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.py"}},"patterns":[{"include":"#block-param"},{"include":"source.python"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-ruby":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(ruby)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.ruby"}},"patterns":[{"include":"#block-param"},{"include":"source.ruby"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"code-block-yaml":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+(code(?:|-block))::)\\\\s*(ya?ml)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"4":{"name":"variable.parameter.codeblock.yaml"}},"patterns":[{"include":"#block-param"},{"include":"source.yaml"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"doctest":{"begin":"^(>>>)\\\\s*(.*)","beginCaptures":{"1":{"name":"keyword.control"},"2":{"patterns":[{"include":"source.python"}]}},"end":"^\\\\s*$"},"doctest-block":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+doctest::)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"}},"patterns":[{"include":"#block-param"},{"include":"source.python"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"domain-auto":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\\\\s*(.*)","beginCaptures":{"2":{"name":"keyword.control.py"},"3":{"patterns":[{"include":"source.python"}]}},"patterns":[{"include":"#block-param"},{"include":"#body"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"domain-cpp":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+c(?:pp|):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\\\\s*(?:(@\\\\w+)|(.*))","beginCaptures":{"2":{"name":"keyword.control"},"3":{"name":"entity.name.tag"},"4":{"patterns":[{"include":"source.cpp"}]}},"patterns":[{"include":"#block-param"},{"include":"#body"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"domain-js":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+js:\\\\w+::)\\\\s*(.*)","beginCaptures":{"2":{"name":"keyword.control"},"3":{"patterns":[{"include":"source.js"}]}},"end":"^(?!\\\\1[\\\\t ]|$)","patterns":[{"include":"#block-param"},{"include":"#body"}]},"domain-py":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\\\\s*(.*)","beginCaptures":{"2":{"name":"keyword.control"},"3":{"patterns":[{"include":"source.python"}]}},"patterns":[{"include":"#block-param"},{"include":"#body"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"domains":{"patterns":[{"include":"#domain-cpp"},{"include":"#domain-py"},{"include":"#domain-auto"},{"include":"#domain-js"}]},"escaped":{"match":"\\\\\\\\.","name":"constant.character.escape"},"footnote":{"match":"^\\\\s*\\\\.{2}\\\\s+\\\\[(?:[-.\\\\w]+|[#*]|#\\\\w+)]\\\\s+","name":"entity.name.tag"},"footnote-ref":{"match":"\\\\[(?:[-.\\\\w]+|[#*])]_","name":"entity.name.tag"},"ignore":{"patterns":[{"match":"\'[*`]+\'"},{"match":"<[*`]+>"},{"match":"\\\\{[*`]+}"},{"match":"\\\\([*`]+\\\\)"},{"match":"\\\\[[*`]+]"},{"match":"\\"[*`]+\\""}]},"inline-markup":{"patterns":[{"include":"#escaped"},{"include":"#ignore"},{"include":"#ref"},{"include":"#literal"},{"include":"#monospaced"},{"include":"#citation"},{"include":"#bold"},{"include":"#italic"},{"include":"#list"},{"include":"#macro"},{"include":"#reference"},{"include":"#footnote-ref"}]},"italic":{"begin":"(?<=[\\"\'(<\\\\[{\\\\s]|^)\\\\*[^*\\\\s]","end":"\\\\*|^\\\\s*$","name":"markup.italic"},"line-block":{"match":"^\\\\|\\\\s+","name":"keyword.control"},"list":{"match":"^\\\\s*(\\\\d+\\\\.|\\\\* -|[#A-Za-z]\\\\.|[CIMVXcimvx]+\\\\.|\\\\(\\\\d+\\\\)|\\\\d+\\\\)|[-*+])\\\\s+","name":"keyword.control"},"literal":{"captures":{"1":{"name":"keyword.control"},"2":{"name":"entity.name.tag"}},"match":"(:\\\\S+:)(`.*?`\\\\\\\\?)"},"literal-block":{"begin":"^(\\\\s*)(.*)(::)\\\\s*$","beginCaptures":{"2":{"patterns":[{"include":"#inline-markup"}]},"3":{"name":"keyword.control"}},"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"macro":{"match":"\\\\|[^|]+\\\\|","name":"entity.name.tag"},"monospaced":{"begin":"(?<=[\\"\'(<\\\\[{\\\\s]|^)``[^`\\\\s]","end":"``|^\\\\s*$","name":"string.interpolated"},"options-list":{"match":"(?:(?:^|,\\\\s+)(?:[-+]\\\\w|--?[A-Za-z][-\\\\w]+|/\\\\w+)(?:[ =](?:\\\\w+|<[^<>]+?>))?)+(?= |\\\\t|$)","name":"variable.parameter"},"raw-html":{"begin":"^(\\\\s*)(\\\\.{2}\\\\s+raw\\\\s*::)\\\\s+(html)\\\\s*$","beginCaptures":{"2":{"name":"keyword.control"},"3":{"name":"variable.parameter.html"}},"patterns":[{"include":"#block-param"},{"include":"text.html.derivative"}],"while":"^(?:\\\\1(?=\\\\s)|\\\\s*$)"},"ref":{"begin":"(:ref:)`","beginCaptures":{"1":{"name":"keyword.control"}},"end":"`|^\\\\s*$","name":"entity.name.tag","patterns":[{"match":"<.*?>","name":"markup.underline.link"}]},"reference":{"match":"[-\\\\w]*[-A-Za-z\\\\d]__?\\\\b","name":"entity.name.tag"},"replace-include":{"captures":{"1":{"name":"keyword.control"},"2":{"name":"entity.name.tag"},"3":{"name":"keyword.control"}},"match":"^\\\\s*(\\\\.{2})\\\\s+(\\\\|[^|]+\\\\|)\\\\s+(replace::)"},"simple-table":{"match":"^[=\\\\s]+$","name":"keyword.control.table"},"substitution":{"match":"^\\\\.{2}\\\\s*\\\\|([^|]+)\\\\|","name":"entity.name.tag"},"table":{"begin":"^\\\\s*\\\\+[-+=]+\\\\+\\\\s*$","beginCaptures":{"0":{"name":"keyword.control.table"}},"end":"^(?![+|])","patterns":[{"match":"[-+=|]","name":"keyword.control.table"}]},"title":{"match":"^(\\\\*{3,}|#{3,}|={3,}|~{3,}|\\\\+{3,}|-{3,}|`{3,}|\\\\^{3,}|:{3,}|\\"{3,}|_{3,}|\'{3,})$","name":"markup.heading"}},"scopeName":"source.rst","embeddedLangs":["html-derivative","cpp","python","javascript","shellscript","yaml","cmake","ruby"]}')),l=[...e,...t,...n,...r,...i,...a,...o,...s,c];export{l as default};
|
|
2
|
+
//# debugId=ca8e6c4b-41ca-47d2-8970-ff37ae2ddd67
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d6cfc936-7ea8-4474-b292-4a38ee5695dd`,e._sentryDebugIdIdentifier=`sentry-dbid-d6cfc936-7ea8-4474-b292-4a38ee5695dd`)}catch{}})();import{t as e}from"./html-CFUZAbjn.js";import{t}from"./javascript-qRALF4mN.js";import{t as n}from"./css-TMM_5IvK.js";import{t as r}from"./xml-BOIvddFt.js";import{t as i}from"./sql-r_e_QA5-.js";import{t as a}from"./graphql-DIl_ZhLK.js";import o from"./cpp-DKT7ktbv.js";import{t as s}from"./c-vzw8O3dF.js";import{i as c}from"./CodeBlock-BdAsIj3e.js";import{t as l}from"./lua-DVAEEjUj.js";import u from"./yaml-BOAQTz6b.js";var d=Object.freeze(JSON.parse(`{"displayName":"Ruby Haml","fileTypes":["haml","html.haml"],"foldingStartMarker":"^\\\\s*([-#%.:=\\\\w].*)\\\\s$","foldingStopMarker":"^\\\\s*$","name":"haml","patterns":[{"begin":"^(\\\\s*)==","contentName":"string.quoted.double.ruby","end":"$\\\\n*","patterns":[{"include":"#interpolated_ruby"}]},{"begin":"^(\\\\s*):ruby","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.ruby.embedded.filter.haml","patterns":[{"include":"source.ruby"}]},{"captures":{"1":{"name":"punctuation.definition.prolog.haml"}},"match":"^(!!!)($|\\\\s.*)","name":"meta.prolog.haml"},{"begin":"^(\\\\s*):javascript","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"js.haml","patterns":[{"include":"source.js"}]},{"begin":"^(\\\\s*)%script","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"js.inline.haml","patterns":[{"include":"source.js"}]},{"begin":"^(\\\\s*):ruby$","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.ruby.embedded.filter.haml","patterns":[{"include":"source.ruby"}]},{"captures":{"1":{"name":"punctuation.section.comment.haml"}},"match":"^(\\\\s*)(/\\\\[[^]].*?$\\\\n?)","name":"comment.line.slash.haml"},{"begin":"^(\\\\s*)(-#|/|-\\\\s*/\\\\*+)","beginCaptures":{"2":{"name":"punctuation.section.comment.haml"}},"end":"^(?!\\\\1\\\\s+|\\\\n)","name":"comment.block.haml","patterns":[{"include":"text.haml"}]},{"begin":"^\\\\s*(?:((%)([-:\\\\w]+))|(?=[#.]))","captures":{"1":{"name":"meta.tag.haml"},"2":{"name":"punctuation.definition.tag.haml"},"3":{"name":"entity.name.tag.haml"}},"end":"$|(?![#(.\\\\[{]|&|[-=~]|!=|&=|/)","patterns":[{"begin":"==","contentName":"string.quoted.double.ruby","end":"$\\\\n?","patterns":[{"include":"#interpolated_ruby"}]},{"captures":{"1":{"name":"entity.other.attribute-name.class"}},"match":"(\\\\.[-:\\\\w]+)","name":"meta.selector.css"},{"captures":{"1":{"name":"entity.other.attribute-name.id"}},"match":"(#[-\\\\w]+)","name":"meta.selector.css"},{"begin":"(?<!#)\\\\{(?=.*(,|(do)|[{|}]|(#.*)|\\\\R)\\\\s*)","end":"\\\\s*}(?!\\\\s*,)(?!\\\\s*\\\\|)(?!#\\\\{.*})","name":"meta.section.attributes.haml","patterns":[{"include":"source.ruby"},{"include":"#continuation"},{"include":"#rubyline"}]},{"begin":"\\\\(","end":"\\\\)","name":"meta.section.attributes.plain.haml","patterns":[{"match":"([-\\\\w]+)","name":"constant.other.symbol.ruby"},{"match":"=","name":"punctuation"},{"include":"#variables"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.ruby","patterns":[{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)","name":"constant.character.escape.ruby"},{"include":"#interpolated_ruby"}]},{"include":"#interpolated_ruby"}]},{"begin":"\\\\[(?=.+([],\\\\[|]|(#.*))\\\\s*)","end":"\\\\s*](?!.*(?!#\\\\[)])","name":"meta.section.object.haml","patterns":[{"include":"source.ruby"},{"include":"#continuation"},{"include":"#rubyline"}]},{"include":"#interpolated_ruby_line"},{"include":"#rubyline"},{"match":"/","name":"punctuation.terminator.tag.haml"}]},{"begin":"^(\\\\s*):(ruby|opal)$","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.ruby.embedded.filter.haml","patterns":[{"include":"source.ruby"}]},{"begin":"^(\\\\s*):ruby$","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.ruby.embedded.filter.haml","patterns":[{"include":"source.ruby"}]},{"begin":"^(\\\\s*):(s(?:tyle|ass))$","end":"^(?=\\\\1\\\\s+|$\\\\n*)","name":"source.sass.embedded.filter.haml","patterns":[{"include":"source.sass"}]},{"begin":"^(\\\\s*):coffee(script)?","end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.coffee.embedded.filter.haml","patterns":[{"include":"source.coffee"}]},{"begin":"^(\\\\s*):plain$","end":"^(?=\\\\1\\\\s+|$\\\\n*)","name":"text.plain.embedded.filter.haml","patterns":[{"include":"text.plain"}]},{"begin":"^(\\\\s*)(:ruby)","beginCaptures":{"2":{"name":"keyword.control.filter.haml"}},"end":"(?m:(?<=\\\\n)(?!\\\\1\\\\s+|$\\\\n*))","name":"source.ruby.embedded.filter.haml","patterns":[{"include":"source.ruby"}]},{"begin":"^(\\\\s*)(:sass)","beginCaptures":{"2":{"name":"keyword.control.filter.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"source.embedded.filter.sass","patterns":[{"include":"source.sass"}]},{"begin":"^(\\\\s*):(s(?:tyles|ass))$","end":"^(?=\\\\1\\\\s+|$\\\\n*)","name":"source.sass.embedded.filter.haml","patterns":[{"include":"source.sass"}]},{"begin":"^(\\\\s*):plain$","end":"^(?=\\\\1\\\\s+|$\\\\n*)","name":"text.plain.embedded.filter.haml","patterns":[{"include":"text.plain"}]},{"captures":{"1":{"name":"meta.escape.haml"}},"match":"^\\\\s*(\\\\.)"},{"begin":"^\\\\s*(?=[-=~]|!=|&=)","end":"$","patterns":[{"include":"#interpolated_ruby_line"},{"include":"#rubyline"}]},{"begin":"^(\\\\s*)(:php)","captures":{"2":{"name":"entity.name.tag.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"meta.embedded.php","patterns":[{"include":"text.html.php#language"}]},{"begin":"^(\\\\s*)(:markdown)","captures":{"2":{"name":"entity.name.tag.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"meta.embedded.markdown","patterns":[{"include":"text.html.markdown"}]},{"begin":"^(\\\\s*)(:(css|styles?))$","captures":{"2":{"name":"entity.name.tag.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"meta.embedded.css","patterns":[{"include":"source.css"}]},{"begin":"^(\\\\s*)(:sass)$","captures":{"2":{"name":"entity.name.tag.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"meta.embedded.sass","patterns":[{"include":"source.sass"}]},{"begin":"^(\\\\s*)(:scss)$","captures":{"2":{"name":"entity.name.tag.haml"}},"end":"^(?!\\\\1\\\\s+|$\\\\n*)","name":"meta.embedded.scss","patterns":[{"include":"source.scss"}]}],"repository":{"continuation":{"captures":{"1":{"name":"punctuation.separator.continuation.haml"}},"match":"(\\\\|)\\\\s*\\\\n"},"interpolated_ruby":{"patterns":[{"captures":{"0":{"name":"punctuation.section.embedded.ruby"},"1":{"name":"source.ruby.embedded.source.empty"}},"match":"#\\\\{(})","name":"source.ruby.embedded.source"},{"begin":"#\\\\{","captures":{"0":{"name":"punctuation.section.embedded.ruby"}},"end":"(})","name":"source.ruby.embedded.source","patterns":[{"include":"#nest_curly_and_self"},{"include":"source.ruby"}]},{"include":"#variables"}]},"interpolated_ruby_line":{"begin":"!?==","contentName":"string.source.ruby.embedded.haml","end":"$","name":"meta.line.ruby.interpolated.haml","patterns":[{"include":"#interpolated_ruby"},{"include":"source.ruby#escaped_char"}]},"nest_curly_and_self":{"patterns":[{"begin":"\\\\{","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"}","patterns":[{"include":"#nest_curly_and_self"},{"include":"source.ruby"}]}]},"rubyline":{"begin":"(&|!)?([-=~])","contentName":"source.ruby.embedded.haml","end":"((do|\\\\{)( \\\\|[*.]+\\\\|)?)$|$|^(?!.*\\\\|\\\\s*)$\\\\n?","endCaptures":{"1":{"name":"source.ruby.embedded.html"},"2":{"name":"keyword.control.ruby.start-block"}},"name":"meta.line.ruby.haml","patterns":[{"captures":{"1":{"name":"keyword.control.php"}},"match":"\\\\s+((elseif|foreach|switch|declare|default|use))(?=[(\\\\s])"},{"captures":{"1":{"name":"keyword.control.import.include.php"}},"match":"\\\\s+((?:requir|includ)e_once)(?=[(\\\\s])"},{"match":"\\\\s+(catch|try|throw|exception|finally|die)(?=[(\\\\s]|\\\\n*)","name":"keyword.control.exception.php"},{"captures":{"1":{"name":"storage.type.function.php"}},"match":"\\\\s+(function\\\\s*)((?=\\\\())"},{"captures":{"1":{"name":"keyword.control.php"}},"match":"\\\\s+(use\\\\s*)((?=\\\\())"},{"match":"([,<|]|do|\\\\{)\\\\s*(#.*)?$\\\\n*","name":"source.ruby","patterns":[{"include":"#rubyline"}]},{"match":"#.*$","name":"comment.line.number-sign.ruby"},{"include":"source.ruby"},{"include":"#continuation"}]},"variables":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.instance.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#@@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.class.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#\\\\$)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.global.ruby"}]}},"scopeName":"text.haml","embeddedLangs":["javascript","css"],"embeddedLangsLazy":["ruby","sass","coffee","markdown"]}`)),f=[...t,...n,d],p=Object.freeze(JSON.parse(`{"displayName":"Ruby","name":"ruby","patterns":[{"captures":{"1":{"name":"keyword.control.class.ruby"},"2":{"name":"entity.name.type.class.ruby"},"5":{"name":"punctuation.separator.namespace.ruby"},"7":{"name":"punctuation.separator.inheritance.ruby"},"8":{"name":"entity.other.inherited-class.ruby"},"11":{"name":"punctuation.separator.namespace.ruby"}},"match":"\\\\b(class)\\\\s+(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*)\\\\s*((<)\\\\s*(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*))?","name":"meta.class.ruby"},{"captures":{"1":{"name":"keyword.control.module.ruby"},"2":{"name":"entity.name.type.module.ruby"},"5":{"name":"punctuation.separator.namespace.ruby"}},"match":"\\\\b(module)\\\\s+(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*)","name":"meta.module.ruby"},{"captures":{"1":{"name":"keyword.control.class.ruby"},"2":{"name":"punctuation.separator.inheritance.ruby"}},"match":"\\\\b(class)\\\\s*(<<)\\\\s*","name":"meta.class.ruby"},{"match":"(?<!\\\\.)\\\\belse(\\\\s)+if\\\\b","name":"invalid.deprecated.ruby"},{"captures":{"1":{"name":"variable.ruby"},"2":{"name":"keyword.operator.assignment.augmented.ruby"}},"match":"^\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*((&&|\\\\|\\\\|)=)"},{"captures":{"1":{"name":"keyword.control.ruby"},"3":{"name":"variable.ruby"},"4":{"name":"keyword.operator.assignment.augmented.ruby"}},"match":"(?<!\\\\.)\\\\b(case|if|elsif|unless|until|while)\\\\b\\\\s*(\\\\()*?\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*((&&|\\\\|\\\\|)=)"},{"captures":{"1":{"name":"variable.ruby"},"2":{"name":"keyword.operator.assignment.augmented.ruby"}},"match":"^\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*(([-%*+/]|\\\\*\\\\*|[\\\\&^|]|<<|>>)=)"},{"captures":{"1":{"name":"keyword.control.ruby"},"3":{"name":"variable.ruby"},"4":{"name":"keyword.operator.assignment.augmented.ruby"}},"match":"(?<!\\\\.)\\\\b(case|if|elsif|unless|until|while)\\\\b\\\\s*(\\\\()*?\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*(([-%*+/]|\\\\*\\\\*|[\\\\&^|]|<<|>>)=)"},{"captures":{"1":{"name":"variable.ruby"}},"match":"^\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*(?==[^=>])"},{"captures":{"1":{"name":"keyword.control.ruby"},"3":{"name":"variable.ruby"}},"match":"(?<!\\\\.)\\\\b(case|if|elsif|unless|until|while)\\\\b\\\\s*(\\\\()*?\\\\s*([_a-z][0-9A-Z_a-z]*)\\\\s*=[^=>]"},{"captures":{"1":{"name":"punctuation.definition.constant.hashkey.ruby"}},"match":"(?>[A-Z_a-z]\\\\w*[!?]?)(:)(?!:)","name":"constant.language.symbol.hashkey.ruby"},{"captures":{"1":{"name":"punctuation.definition.constant.ruby"}},"match":"(?<!:)(:)(?>[A-Z_a-z]\\\\w*[!?]?)(?=\\\\s*=>)","name":"constant.language.symbol.hashkey.ruby"},{"match":"(?<!\\\\.)\\\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\\\b(?![!?])","name":"keyword.control.ruby"},{"match":"(?<!\\\\.)\\\\bdo\\\\b","name":"keyword.control.start-block.ruby"},{"match":"(?<=\\\\{)(\\\\s+)","name":"meta.syntax.ruby.start-block"},{"match":"(?<!\\\\.)\\\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\\\b(?![!?])|\\\\bdefined\\\\?|\\\\b(block_given|iterator)\\\\?","name":"keyword.control.pseudo-method.ruby"},{"match":"\\\\bnil\\\\b(?![!?])","name":"constant.language.nil.ruby"},{"match":"\\\\b(true|false)\\\\b(?![!?])","name":"constant.language.boolean.ruby"},{"match":"\\\\b(__(FILE|LINE)__)\\\\b(?![!?])","name":"variable.language.ruby"},{"match":"\\\\bself\\\\b(?![!?])","name":"variable.language.self.ruby"},{"match":"\\\\b(initialize|new|loop|include|extend|prepend|raise|fail|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\\\b(?![!?])","name":"keyword.other.special-method.ruby"},{"begin":"\\\\b(?<!\\\\.|::)(require(?:|_relative))\\\\b(?![!?])","captures":{"1":{"name":"keyword.other.special-method.ruby"}},"end":"$|(?=[#}])","name":"meta.require.ruby","patterns":[{"include":"$self"}]},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.instance.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(@@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.class.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(\\\\$)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.global.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(\\\\$)([!\\\\&'+@\`]|\\\\d+|[\\"$*,./:-?\\\\\\\\_~]|-[0FIadilpv])","name":"variable.other.readwrite.global.pre-defined.ruby"},{"begin":"\\\\b(ENV)\\\\[","beginCaptures":{"1":{"name":"variable.other.constant.ruby"}},"end":"]","name":"meta.environment-variable.ruby","patterns":[{"include":"$self"}]},{"match":"\\\\b[A-Z]\\\\w*(?=((\\\\.|::)[A-Za-z]|\\\\[))","name":"support.class.ruby"},{"match":"\\\\b((abort|at_exit|autoload|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|printf??|proc|putc|puts|rand|readlines??|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\\\b(?![!?])|autoload\\\\?|exit!)","name":"support.function.kernel.ruby"},{"match":"\\\\b[A-Z_]\\\\w*\\\\b","name":"variable.other.constant.ruby"},{"begin":"(->)\\\\(","beginCaptures":{"1":{"name":"support.function.kernel.ruby"}},"end":"\\\\)","patterns":[{"begin":"(?=[\\\\&*A-Z_a-z])","end":"(?=[),])","patterns":[{"include":"#method_parameters"}]},{"include":"#method_parameters"}]},{"begin":"(?=def\\\\b)(?<=^|\\\\s)(def)\\\\s+((?>[A-Z_a-z]\\\\w*(?>\\\\.|::))?(?>[A-Z_a-z]\\\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\\\&/\`|]|\\\\*\\\\*?|=?~|[-+]@?|\\\\[]=?))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.control.def.ruby"},"2":{"name":"entity.name.function.ruby"},"3":{"name":"punctuation.definition.parameters.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.ruby"}},"name":"meta.function.method.with-arguments.ruby","patterns":[{"begin":"(?=[\\\\&*A-Z_a-z])","end":"(?=[),])","patterns":[{"include":"#method_parameters"}]},{"include":"#method_parameters"}]},{"begin":"(?=def\\\\b)(?<=^|\\\\s)(def)\\\\s+((?>[A-Z_a-z]\\\\w*(?>\\\\.|::))?(?>[A-Z_a-z]\\\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\\\&/\`|]|\\\\*\\\\*?|=?~|[-+]@?|\\\\[]=?))[\\\\t ](?=[\\\\t ]*[^#;\\\\s])","beginCaptures":{"1":{"name":"keyword.control.def.ruby"},"2":{"name":"entity.name.function.ruby"}},"end":"(?=;)|(?<=[]!\\"')?\`}\\\\w])(?=\\\\s*#|\\\\s*$)","name":"meta.function.method.with-arguments.ruby","patterns":[{"begin":"(?=[\\\\&*A-Z_a-z])","end":"(?=[,;]|\\\\s*#|\\\\s*$)","patterns":[{"include":"#method_parameters"}]},{"include":"#method_parameters"}]},{"captures":{"1":{"name":"keyword.control.def.ruby"},"3":{"name":"entity.name.function.ruby"}},"match":"(?=def\\\\b)(?<=^|\\\\s)(def)\\\\b(\\\\s+((?>[A-Z_a-z]\\\\w*(?>\\\\.|::))?(?>[A-Z_a-z]\\\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\\\&/\`|]|\\\\*\\\\*?|=?~|[-+]@?|\\\\[]=?)))?","name":"meta.function.method.without-arguments.ruby"},{"match":"\\\\b(\\\\d(?>_?\\\\d)*(\\\\.(?![^\\\\s\\\\d])(?>_?\\\\d)*)?([Ee][-+]?\\\\d(?>_?\\\\d)*)?|0(?:[Xx]\\\\h(?>_?\\\\h)*|[Oo]?[0-7](?>_?[0-7])*|[Bb][01](?>_?[01])*|[Dd]\\\\d(?>_?\\\\d)*))\\\\b","name":"constant.numeric.ruby"},{"begin":":'","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\['\\\\\\\\]","name":"constant.character.escape.ruby"}]},{"begin":":\\"","beginCaptures":{"0":{"name":"punctuation.section.symbol.begin.ruby"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.section.symbol.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"match":"(?<!\\\\()/=","name":"keyword.operator.assignment.augmented.ruby"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.single.ruby","patterns":[{"match":"\\\\\\\\['\\\\\\\\]","name":"constant.character.escape.ruby"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.double.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"(?<!\\\\.)\`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"(?<![)\\\\w])((/))(?![*+?])(?!\\\\s*$)(?=(?:\\\\\\\\/|[^/])*+/[eimnosux]*\\\\s*(?:[]#),.:?}]|\\\\|\\\\||&&|<=>|=>|==|=~|!~|!=|;|$|if|else|elsif|then|do|end|unless|while|until|or|and))","captures":{"1":{"name":"string.regexp.interpolated.ruby"},"2":{"name":"punctuation.section.regexp.ruby"}},"contentName":"string.regexp.interpolated.ruby","end":"((/[eimnosux]*))","patterns":[{"include":"#regex_sub"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.section.regexp.begin.ruby"}},"end":"}[eimnosux]*","endCaptures":{"0":{"name":"punctuation.section.regexp.end.ruby"}},"name":"string.regexp.interpolated.ruby","patterns":[{"include":"#regex_sub"},{"include":"#nest_curly_r"}]},{"begin":"%r\\\\[","beginCaptures":{"0":{"name":"punctuation.section.regexp.begin.ruby"}},"end":"][eimnosux]*","endCaptures":{"0":{"name":"punctuation.section.regexp.end.ruby"}},"name":"string.regexp.interpolated.ruby","patterns":[{"include":"#regex_sub"},{"include":"#nest_brackets_r"}]},{"begin":"%r\\\\(","beginCaptures":{"0":{"name":"punctuation.section.regexp.begin.ruby"}},"end":"\\\\)[eimnosux]*","endCaptures":{"0":{"name":"punctuation.section.regexp.end.ruby"}},"name":"string.regexp.interpolated.ruby","patterns":[{"include":"#regex_sub"},{"include":"#nest_parens_r"}]},{"begin":"%r<","beginCaptures":{"0":{"name":"punctuation.section.regexp.begin.ruby"}},"end":">[eimnosux]*","endCaptures":{"0":{"name":"punctuation.section.regexp.end.ruby"}},"name":"string.regexp.interpolated.ruby","patterns":[{"include":"#regex_sub"},{"include":"#nest_ltgt_r"}]},{"begin":"%r(\\\\W)","beginCaptures":{"0":{"name":"punctuation.section.regexp.begin.ruby"}},"end":"\\\\1[eimnosux]*","endCaptures":{"0":{"name":"punctuation.section.regexp.end.ruby"}},"name":"string.regexp.interpolated.ruby","patterns":[{"include":"#regex_sub"}]},{"begin":"%I\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_brackets_i"}]},{"begin":"%I\\\\(","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_parens_i"}]},{"begin":"%I<","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_ltgt_i"}]},{"begin":"%I\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_curly_i"}]},{"begin":"%I(\\\\W)","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"%i\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[]\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_brackets"}]},{"begin":"%i\\\\(","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[)\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_parens"}]},{"begin":"%i<","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[>\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_ltgt"}]},{"begin":"%i\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[\\\\\\\\}]","name":"constant.character.escape.ruby"},{"include":"#nest_curly"}]},{"begin":"%i(\\\\W)","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\."}]},{"begin":"%W\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_brackets_i"}]},{"begin":"%W\\\\(","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_parens_i"}]},{"begin":"%W<","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_ltgt_i"}]},{"begin":"%W\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_curly_i"}]},{"begin":"%W(\\\\W)","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"%w\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[]\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_brackets"}]},{"begin":"%w\\\\(","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[)\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_parens"}]},{"begin":"%w<","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[>\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_ltgt"}]},{"begin":"%w\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[\\\\\\\\}]","name":"constant.character.escape.ruby"},{"include":"#nest_curly"}]},{"begin":"%w(\\\\W)","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\."}]},{"begin":"%[Qx]?\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_parens_i"}]},{"begin":"%[Qx]?\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_brackets_i"}]},{"begin":"%[Qx]?\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_curly_i"}]},{"begin":"%[Qx]?<","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_ltgt_i"}]},{"begin":"%[Qx](\\\\W)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"%([^=\\\\w\\\\s])","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.interpolated.ruby","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"%q\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[)\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_parens"}]},{"begin":"%q<","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[>\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_ltgt"}]},{"begin":"%q\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[]\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_brackets"}]},{"begin":"%q\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\[\\\\\\\\}]","name":"constant.character.escape.ruby"},{"include":"#nest_curly"}]},{"begin":"%q(\\\\W)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.definition.string.end.ruby"}},"name":"string.quoted.other.ruby","patterns":[{"match":"\\\\\\\\."}]},{"begin":"%s\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[)\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_parens"}]},{"begin":"%s<","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[>\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_ltgt"}]},{"begin":"%s\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[]\\\\\\\\]","name":"constant.character.escape.ruby"},{"include":"#nest_brackets"}]},{"begin":"%s\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\[\\\\\\\\}]","name":"constant.character.escape.ruby"},{"include":"#nest_curly"}]},{"begin":"%s(\\\\W)","beginCaptures":{"0":{"name":"punctuation.definition.symbol.begin.ruby"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.definition.symbol.end.ruby"}},"name":"constant.language.symbol.ruby","patterns":[{"match":"\\\\\\\\."}]},{"captures":{"1":{"name":"punctuation.definition.constant.ruby"}},"match":"(?<!:)(:)(?>[$A-Z_a-z]\\\\w*(?>[!?]|=(?![=>]))?|===?|<=>|>[=>]?|<[<=]?|[%\\\\&/\`|]|\\\\*\\\\*?|=?~|[-+]@?|\\\\[]=?|@@?[A-Z_a-z]\\\\w*)","name":"constant.language.symbol.ruby"},{"begin":"^=begin","captures":{"0":{"name":"punctuation.definition.comment.ruby"}},"end":"^=end","name":"comment.block.documentation.ruby"},{"include":"#yard"},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ruby"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.ruby"}},"end":"\\\\n","name":"comment.line.number-sign.ruby"}]},{"match":"(?<!\\\\w)\\\\?(\\\\\\\\(x\\\\h{1,2}(?!\\\\h)\\\\b|0[0-7]{0,2}(?![0-7])\\\\b|[^0CMx])|(\\\\\\\\[CM]-)+\\\\w|[^\\\\\\\\\\\\s])","name":"constant.numeric.ruby"},{"begin":"^__END__\\\\n","captures":{"0":{"name":"string.unquoted.program-block.ruby"}},"contentName":"text.plain","end":"(?=not)impossible","patterns":[{"begin":"(?=<?xml|<(?i:html\\\\b)|!DOCTYPE (?i:html\\\\b))","end":"(?=not)impossible","name":"text.html.embedded.ruby","patterns":[{"include":"text.html.basic"}]}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)HTML)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)HTML)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.html","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)HTML)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"text.html","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"text.html.basic"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)HTML)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)HAML)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)HAML)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.haml","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)HAML)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"text.haml","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"text.haml"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)HAML)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)XML)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)XML)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.xml","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)XML)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"text.xml","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"text.xml"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)XML)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SQL)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)SQL)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.sql","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SQL)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.sql","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.sql"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)SQL)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)G(?:RAPHQL|QL))\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)G(?:RAPHQL|QL))$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.graphql","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)G(?:RAPHQL|QL))\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.graphql","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.graphql"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)G(?:RAPHQL|QL))\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)CSS)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)CSS)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.css","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)CSS)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.css","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.css"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)CSS)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)CPP)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)CPP)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.cpp","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)CPP)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.cpp","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.cpp"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)CPP)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)C)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)C)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.c","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)C)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.c","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.c"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)C)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)J(?:S|AVASCRIPT))\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)J(?:S|AVASCRIPT))$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.js","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)J(?:S|AVASCRIPT))\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.js","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.js"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)J(?:S|AVASCRIPT))\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)JQUERY)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)JQUERY)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.js.jquery","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)JQUERY)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.js.jquery","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.js.jquery"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)JQUERY)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SH(?:|ELL))\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)SH(?:|ELL))$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.shell","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SH(?:|ELL))\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.shell","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.shell"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)SH(?:|ELL))\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)LUA)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)LUA)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.lua","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)LUA)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.lua","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.lua"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)LUA)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)RUBY)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)RUBY)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.ruby","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)RUBY)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.ruby","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.ruby"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)RUBY)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)YA?ML)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)YA?ML)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.yaml","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)YA?ML)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"source.yaml","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"source.yaml"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)YA?ML)\\\\s*$)"}]},{"begin":"(?=(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SLIM)\\\\b\\\\1))","end":"^\\\\s*((?:[_\\\\w]+_|)SLIM)$\\\\n?","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"name":"meta.embedded.block.slim","patterns":[{"begin":"(?><<[-~]?([\\"'\`]?)((?:[_\\\\w]+_|)SLIM)\\\\b\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"text.slim","patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"text.slim"},{"include":"#escaped_char"}],"while":"^(?!\\\\s*((?:[_\\\\w]+_|)SLIM)\\\\s*$)"}]},{"begin":"(?>=\\\\s*<<([\\"'\`]?)([A-Z_a-z]\\\\w*)\\\\1)","beginCaptures":{"0":{"name":"string.definition.begin.ruby"}},"contentName":"string.unquoted.heredoc.ruby","end":"^\\\\2$","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"(?>((<<[-~]?([\\"'\`]?)([A-Z_a-z]\\\\w*)\\\\3,\\\\s?)*<<[-~]?([\\"'\`]?)([A-Z_a-z]\\\\w*)\\\\5))(.*)","beginCaptures":{"1":{"name":"string.definition.begin.ruby"},"7":{"patterns":[{"include":"source.ruby"}]}},"contentName":"string.unquoted.heredoc.ruby","end":"^\\\\s*\\\\6$","endCaptures":{"0":{"name":"string.definition.end.ruby"}},"patterns":[{"include":"#heredoc"},{"include":"#interpolated_ruby"},{"include":"#escaped_char"}]},{"begin":"(?<=\\\\{|\\\\{\\\\s+|[^$0-:@-Z_a-z]do|^do|[^$0-:@-Z_a-z]do\\\\s+|^do\\\\s+)(\\\\|)","captures":{"1":{"name":"punctuation.separator.variable.ruby"}},"end":"(?<!\\\\|)(\\\\|)(?!\\\\|)","name":"meta.block.parameters.ruby","patterns":[{"begin":"(?![(,|\\\\s])","end":"(?=,|\\\\|\\\\s*)","patterns":[{"captures":{"1":{"name":"storage.type.variable.ruby"},"2":{"name":"variable.other.block.ruby"}},"match":"\\\\G((?:&|\\\\*\\\\*?)?)([A-Z_a-z][_\\\\w]*)"}]},{"match":",","name":"punctuation.separator.variable.ruby"}]},{"match":"=>","name":"punctuation.separator.key-value"},{"match":"->","name":"support.function.kernel.ruby"},{"match":"<<=|%=|&{1,2}=|\\\\*=|\\\\*\\\\*=|\\\\+=|-=|\\\\^=|\\\\|{1,2}=|<<","name":"keyword.operator.assignment.augmented.ruby"},{"match":"<=>|<(?![<=])|>(?![<=>])|<=|>=|===?|=~|!=|!~|(?<=[\\\\t ])\\\\?","name":"keyword.operator.comparison.ruby"},{"match":"(?<!\\\\.)\\\\b(and|not|or)\\\\b(?![!?])","name":"keyword.operator.logical.ruby"},{"match":"(?<=^|[\\\\t !])!|&&|\\\\|\\\\||\\\\^","name":"keyword.operator.logical.ruby"},{"captures":{"1":{"name":"keyword.operator.logical.ruby"}},"match":"(&\\\\.)\\\\s*(?![A-Z])"},{"match":"([%\\\\&]|\\\\*\\\\*|[-*+/])","name":"keyword.operator.arithmetic.ruby"},{"match":"=","name":"keyword.operator.assignment.ruby"},{"match":"[|~]|>>","name":"keyword.operator.other.ruby"},{"match":";","name":"punctuation.separator.statement.ruby"},{"match":",","name":"punctuation.separator.object.ruby"},{"captures":{"1":{"name":"punctuation.separator.namespace.ruby"}},"match":"(::)\\\\s*(?=[A-Z])"},{"captures":{"1":{"name":"punctuation.separator.method.ruby"}},"match":"(\\\\.|::)\\\\s*(?![A-Z])"},{"match":":","name":"punctuation.separator.other.ruby"},{"match":"\\\\{","name":"punctuation.section.scope.begin.ruby"},{"match":"}","name":"punctuation.section.scope.end.ruby"},{"match":"\\\\[","name":"punctuation.section.array.begin.ruby"},{"match":"]","name":"punctuation.section.array.end.ruby"},{"match":"[()]","name":"punctuation.section.function.ruby"},{"begin":"(?<=[^.]\\\\.|::)(?=[A-Za-z][!0-9?A-Z_a-z]*[^!0-9?A-Z_a-z])","end":"(?<=[!0-9?A-Z_a-z])(?=[^!0-9?A-Z_a-z])","name":"meta.function-call.ruby","patterns":[{"match":"([A-Za-z][!0-9?A-Z_a-z]*)(?=[^!0-9?A-Z_a-z])","name":"entity.name.function.ruby"}]},{"begin":"([A-Za-z]\\\\w*[!?]?)(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.ruby"},"2":{"name":"punctuation.section.function.ruby"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.function.ruby"}},"name":"meta.function-call.ruby","patterns":[{"include":"$self"}]}],"repository":{"escaped_char":{"match":"\\\\\\\\(?:[0-7]{1,3}|x[A-Fa-f\\\\d]{1,2}|.)","name":"constant.character.escape.ruby"},"heredoc":{"begin":"^<<[-~]?[A-Z_a-z]\\\\w*","end":"$","patterns":[{"include":"$self"}]},"interpolated_ruby":{"patterns":[{"begin":"#\\\\{","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.ruby"}},"contentName":"source.ruby","end":"}","endCaptures":{"0":{"name":"punctuation.section.embedded.end.ruby"}},"name":"meta.embedded.line.ruby","patterns":[{"include":"#nest_curly_and_self"},{"include":"$self"}]},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.instance.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#@@)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.class.ruby"},{"captures":{"1":{"name":"punctuation.definition.variable.ruby"}},"match":"(#\\\\$)[A-Z_a-z]\\\\w*","name":"variable.other.readwrite.global.ruby"}]},"method_parameters":{"patterns":[{"include":"#parens"},{"include":"#braces"},{"include":"#brackets"},{"include":"#params"},{"include":"$self"}],"repository":{"braces":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.scope.begin.ruby"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.ruby"}},"patterns":[{"include":"#parens"},{"include":"#braces"},{"include":"#brackets"},{"include":"$self"}]},"brackets":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.ruby"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.ruby"}},"patterns":[{"include":"#parens"},{"include":"#braces"},{"include":"#brackets"},{"include":"$self"}]},"params":{"captures":{"1":{"name":"storage.type.variable.ruby"},"2":{"name":"constant.other.symbol.hashkey.parameter.function.ruby"},"3":{"name":"punctuation.definition.constant.ruby"},"4":{"name":"variable.parameter.function.ruby"}},"match":"\\\\G(&|\\\\*\\\\*?)?(?:([A-Z_a-z]\\\\w*[!?]?(:))|([A-Z_a-z]\\\\w*))"},"parens":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.function.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.ruby"}},"patterns":[{"include":"#parens"},{"include":"#braces"},{"include":"#brackets"},{"include":"$self"}]}}},"nest_brackets":{"begin":"\\\\[","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"]","patterns":[{"include":"#nest_brackets"}]},"nest_brackets_i":{"begin":"\\\\[","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"]","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_brackets_i"}]},"nest_brackets_r":{"begin":"\\\\[","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"]","patterns":[{"include":"#regex_sub"},{"include":"#nest_brackets_r"}]},"nest_curly":{"begin":"\\\\{","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"}","patterns":[{"include":"#nest_curly"}]},"nest_curly_and_self":{"patterns":[{"begin":"\\\\{","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"}","patterns":[{"include":"#nest_curly_and_self"}]},{"include":"$self"}]},"nest_curly_i":{"begin":"\\\\{","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"}","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_curly_i"}]},"nest_curly_r":{"begin":"\\\\{","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"}","patterns":[{"include":"#regex_sub"},{"include":"#nest_curly_r"}]},"nest_ltgt":{"begin":"<","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":">","patterns":[{"include":"#nest_ltgt"}]},"nest_ltgt_i":{"begin":"<","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":">","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_ltgt_i"}]},"nest_ltgt_r":{"begin":"<","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":">","patterns":[{"include":"#regex_sub"},{"include":"#nest_ltgt_r"}]},"nest_parens":{"begin":"\\\\(","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"\\\\)","patterns":[{"include":"#nest_parens"}]},"nest_parens_i":{"begin":"\\\\(","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"\\\\)","patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"include":"#nest_parens_i"}]},"nest_parens_r":{"begin":"\\\\(","captures":{"0":{"name":"punctuation.section.scope.ruby"}},"end":"\\\\)","patterns":[{"include":"#regex_sub"},{"include":"#nest_parens_r"}]},"regex_sub":{"patterns":[{"include":"#interpolated_ruby"},{"include":"#escaped_char"},{"captures":{"1":{"name":"punctuation.definition.arbitrary-repetition.ruby"},"3":{"name":"punctuation.definition.arbitrary-repetition.ruby"}},"match":"(\\\\{)\\\\d+(,\\\\d+)?(})","name":"string.regexp.arbitrary-repetition.ruby"},{"begin":"\\\\[(?:\\\\^?])?","captures":{"0":{"name":"punctuation.definition.character-class.ruby"}},"end":"]","name":"string.regexp.character-class.ruby","patterns":[{"include":"#escaped_char"}]},{"begin":"\\\\(\\\\?#","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.ruby"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.comment.end.ruby"}},"name":"comment.line.number-sign.ruby","patterns":[{"include":"#escaped_char"}]},{"begin":"\\\\(","captures":{"0":{"name":"punctuation.definition.group.ruby"}},"end":"\\\\)","name":"string.regexp.group.ruby","patterns":[{"include":"#regex_sub"}]},{"begin":"(?<=^|\\\\s)(#)\\\\s(?=[-\\\\t !,.0-9?A-Za-z[^\\\\x00-\\\\x7F]]*$)","beginCaptures":{"1":{"name":"punctuation.definition.comment.ruby"}},"end":"$\\\\n?","endCaptures":{"0":{"name":"punctuation.definition.comment.ruby"}},"name":"comment.line.number-sign.ruby"}]},"yard":{"patterns":[{"include":"#yard_comment"},{"include":"#yard_param_types"},{"include":"#yard_option"},{"include":"#yard_tag"},{"include":"#yard_types"},{"include":"#yard_directive"},{"include":"#yard_see"},{"include":"#yard_macro_attribute"}]},"yard_comment":{"begin":"^(\\\\s*)(#)(\\\\s*)(@)(abstract|api|author|deprecated|example|macro|note|overload|since|todo|version)(?=\\\\s|$)","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_continuation":{"match":"^\\\\s*#","name":"punctuation.definition.comment.ruby"},"yard_directive":{"begin":"^(\\\\s*)(#)(\\\\s*)(@!)(endgroup|group|method|parse|scope|visibility)(\\\\s+((\\\\[).+(])))?(?=\\\\s)","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"7":{"name":"comment.line.type.yard.ruby"},"8":{"name":"comment.line.punctuation.yard.ruby"},"9":{"name":"comment.line.punctuation.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_macro_attribute":{"begin":"^(\\\\s*)(#)(\\\\s*)(@!)(attribute|macro)(\\\\s+((\\\\[).+(])))?(?=\\\\s)(\\\\s+([_a-z]\\\\w*:?))?","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"7":{"name":"comment.line.type.yard.ruby"},"8":{"name":"comment.line.punctuation.yard.ruby"},"9":{"name":"comment.line.punctuation.yard.ruby"},"11":{"name":"comment.line.parameter.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_option":{"begin":"^(\\\\s*)(#)(\\\\s*)(@)(option)(?=\\\\s)(?>\\\\s+([_a-z]\\\\w*:?))?(?>\\\\s+((\\\\[).+(])))?(?>\\\\s+((\\\\S*)))?(?>\\\\s+((\\\\().+(\\\\))))?","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"6":{"name":"comment.line.parameter.yard.ruby"},"7":{"name":"comment.line.type.yard.ruby"},"8":{"name":"comment.line.punctuation.yard.ruby"},"9":{"name":"comment.line.punctuation.yard.ruby"},"10":{"name":"comment.line.keyword.yard.ruby"},"11":{"name":"comment.line.hashkey.yard.ruby"},"12":{"name":"comment.line.defaultvalue.yard.ruby"},"13":{"name":"comment.line.punctuation.yard.ruby"},"14":{"name":"comment.line.punctuation.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_param_types":{"begin":"^(\\\\s*)(#)(\\\\s*)(@)(attr|attr_reader|attr_writer|yieldparam|param)(?=\\\\s)(?>\\\\s+(?>([_a-z]\\\\w*:?)|((\\\\[).+(]))))?(?>\\\\s+(?>((\\\\[).+(]))|([_a-z]\\\\w*:?)))?","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"6":{"name":"comment.line.parameter.yard.ruby"},"7":{"name":"comment.line.type.yard.ruby"},"8":{"name":"comment.line.punctuation.yard.ruby"},"9":{"name":"comment.line.punctuation.yard.ruby"},"10":{"name":"comment.line.type.yard.ruby"},"11":{"name":"comment.line.punctuation.yard.ruby"},"12":{"name":"comment.line.punctuation.yard.ruby"},"13":{"name":"comment.line.parameter.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_see":{"begin":"^(\\\\s*)(#)(\\\\s*)(@)(see)(?=\\\\s)(\\\\s+(.+?))?(?=\\\\s|$)","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"7":{"name":"comment.line.parameter.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]},"yard_tag":{"captures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"}},"match":"^(\\\\s*)(#)(\\\\s*)(@)(private)$","name":"comment.line.number-sign.ruby"},"yard_types":{"begin":"^(\\\\s*)(#)(\\\\s*)(@)(raise|return|yield(?:return)?)(?=\\\\s)(\\\\s+((\\\\[).+(])))?","beginCaptures":{"2":{"name":"punctuation.definition.comment.ruby"},"4":{"name":"comment.line.keyword.punctuation.yard.ruby"},"5":{"name":"comment.line.keyword.yard.ruby"},"7":{"name":"comment.line.type.yard.ruby"},"8":{"name":"comment.line.punctuation.yard.ruby"},"9":{"name":"comment.line.punctuation.yard.ruby"}},"contentName":"comment.line.string.yard.ruby","end":"^(?!\\\\s*#\\\\3\\\\s{2,}|\\\\s*#\\\\s*$)","name":"comment.line.number-sign.ruby","patterns":[{"include":"#yard"},{"include":"#yard_continuation"}]}},"scopeName":"source.ruby","embeddedLangs":["html","haml","xml","sql","graphql","css","cpp","c","javascript","shellscript","lua","yaml"],"aliases":["rb"]}`)),m=[...e,...f,...r,...i,...a,...n,...o,...s,...t,...c,...l,...u,p];export{m as default};
|
|
2
|
+
//# debugId=d6cfc936-7ea8-4474-b292-4a38ee5695dd
|