commandmate 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +13 -13
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/config.json +3 -3
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/1.pack +0 -0
  9. package/.next/cache/webpack/client-production/2.pack +0 -0
  10. package/.next/cache/webpack/client-production/index.pack +0 -0
  11. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  12. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  13. package/.next/cache/webpack/server-production/0.pack +0 -0
  14. package/.next/cache/webpack/server-production/index.pack +0 -0
  15. package/.next/next-server.js.nft.json +1 -1
  16. package/.next/prerender-manifest.json +1 -1
  17. package/.next/required-server-files.json +1 -1
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +1 -1
  21. package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +1 -1
  22. package/.next/server/app/api/external-apps/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/external-apps/route.js.nft.json +1 -1
  24. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  25. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  26. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  27. package/.next/server/app/api/repositories/excluded/route.js +8 -8
  28. package/.next/server/app/api/repositories/excluded/route.js.nft.json +1 -1
  29. package/.next/server/app/api/repositories/restore/route.js +7 -7
  30. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  31. package/.next/server/app/api/repositories/route.js +5 -5
  32. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  33. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  34. package/.next/server/app/api/repositories/sync/route.js +5 -5
  35. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  36. package/.next/server/app/api/slash-commands.body +1 -1
  37. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  38. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  39. package/.next/server/app/api/worktrees/[id]/capture/route.js +2 -2
  40. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +1 -1
  41. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  42. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  43. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -1
  44. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  45. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  46. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  48. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js.nft.json +1 -1
  49. package/.next/server/app/api/worktrees/[id]/memos/route.js.nft.json +1 -1
  50. package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -1
  51. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  52. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  53. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  54. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  55. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  56. package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +1 -1
  57. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  58. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
  59. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  60. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  61. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +1 -1
  62. package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +1 -1
  63. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -1
  65. package/.next/server/app/api/worktrees/route.js +1 -1
  66. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  67. package/.next/server/app/index.html +2 -2
  68. package/.next/server/app/index.rsc +2 -2
  69. package/.next/server/app/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -1
  71. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
  72. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/worktrees/[id]/page.js +5 -5
  74. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/worktrees/[id]/simple-terminal/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app-paths-manifest.json +9 -9
  78. package/.next/server/chunks/5488.js +5 -5
  79. package/.next/server/chunks/7536.js +1 -1
  80. package/.next/server/chunks/8174.js +6 -6
  81. package/.next/server/chunks/9367.js +2 -2
  82. package/.next/server/functions-config-manifest.json +1 -1
  83. package/.next/server/pages/404.html +1 -1
  84. package/.next/server/pages/500.html +1 -1
  85. package/.next/server/server-reference-manifest.json +1 -1
  86. package/.next/static/chunks/6568-c65d7e4d7db7655b.js +1 -0
  87. package/.next/static/chunks/{2957-327e43ef4c12808f.js → 9325-9e98829c1e75f42f.js} +1 -1
  88. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/{page-9e5adf57cbbbdf05.js → page-7eb14f8043796805.js} +1 -1
  89. package/.next/static/chunks/app/worktrees/[id]/page-912c3c4c66821d99.js +1 -0
  90. package/.next/static/css/d4b58a1129eff6af.css +3 -0
  91. package/.next/trace +5 -5
  92. package/dist/server/server.js +25 -2
  93. package/dist/server/src/config/auto-yes-config.js +53 -0
  94. package/dist/server/src/lib/auto-yes-manager.js +94 -11
  95. package/dist/server/src/lib/claude-poller.js +4 -0
  96. package/dist/server/src/lib/claude-session.js +54 -19
  97. package/dist/server/src/lib/cli-patterns.js +100 -4
  98. package/dist/server/src/lib/cli-tools/codex.js +16 -3
  99. package/dist/server/src/lib/db-repository.js +482 -0
  100. package/dist/server/src/lib/pasted-text-helper.js +58 -0
  101. package/dist/server/src/lib/prompt-detector.js +199 -109
  102. package/dist/server/src/lib/response-poller.js +74 -27
  103. package/dist/server/src/lib/tmux.js +48 -0
  104. package/package.json +1 -1
  105. package/.next/static/chunks/6568-38a33aa67d82e12b.js +0 -1
  106. package/.next/static/chunks/app/worktrees/[id]/page-d64624eb67af57c0.js +0 -1
  107. package/.next/static/css/28be35e4727ae7ef.css +0 -3
  108. /package/.next/static/{bdUePCj-b9Gv5okYGp49O → HhG0EHeG9E4wTJ4sqnLdv}/_buildManifest.js +0 -0
  109. /package/.next/static/{bdUePCj-b9Gv5okYGp49O → HhG0EHeG9E4wTJ4sqnLdv}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- exports.id=9367,exports.ids=[9367],exports.modules={58359:()=>{},93739:()=>{},89287:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});let n=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,o=/Request ID: ([^\s\n]+)/,a=/Summary: (.+?)(?:\n─|$)/s;function i(e){let t={content:e},r=n.exec(e);r&&(t.logFileName=r[2]);let i=o.exec(e);i&&(t.requestId=i[1]);let s=a.exec(e);return s&&(t.summary=s[1].trim()),t}},62648:(e,t,r)=>{"use strict";r.d(t,{Lm:()=>g,Uv:()=>d,YI:()=>f,_f:()=>p,xd:()=>y,ym:()=>w});var n=r(10927),o=r(19377),a=r(61282);let i=(0,r(21764).promisify)(a.exec);function s(e){return e instanceof Error?e.message:String(e)}let c=null;async function l(){if(c)return c;if(process.env.CLAUDE_PATH)return c=process.env.CLAUDE_PATH;try{let{stdout:e}=await i("which claude",{timeout:5e3});return c=e.trim()}catch{for(let e of["/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude"])try{return await i(`test -x "${e}"`,{timeout:1e3}),c=e}catch{}throw Error("Claude CLI not found. Set CLAUDE_PATH environment variable or install Claude CLI.")}}function u(e){return`mcbd-claude-${e}`}async function d(){try{return await i("which claude",{timeout:5e3}),!0}catch{return!1}}async function f(e){let t=u(e);return await (0,n.Hk)(t)}async function m(e,t=5e3){let r=Date.now();for(;Date.now()-r<t;){let t=await (0,n.xq)(e,{startLine:-50});if(o.V7.test((0,o.vp)(t)))return;await new Promise(e=>setTimeout(e,200))}throw Error(`Prompt detection timeout (${t}ms)`)}async function w(e){let{worktreeId:t,worktreePath:r}=e;if(!await d())throw Error("Claude CLI is not installed or not in PATH");let a=u(t);if(await (0,n.Hk)(a)){console.log(`Claude session ${a} already exists`);return}try{await (0,n.ed)({sessionName:a,workingDirectory:r,historyLimit:5e4});let e=await l();await (0,n.Is)(a,e,!0);let t=Date.now(),i=!1;for(;Date.now()-t<15e3;){await new Promise(e=>setTimeout(e,300));try{let e=await (0,n.xq)(a,{startLine:-50}),r=(0,o.vp)(e);if(o.V7.test(r)||o.FE.test(r)){await new Promise(e=>setTimeout(e,500)),console.log(`Claude initialized in ${Date.now()-t}ms`),i=!0;break}}catch{}}if(!i)throw Error("Claude initialization timeout (15000ms)");console.log(`Started Claude session: ${a}`)}catch(e){throw Error(`Failed to start Claude session: ${s(e)}`)}}async function y(e,t){let r=u(e);if(!await (0,n.Hk)(r))throw Error(`Claude session ${r} does not exist. Start the session first.`);let a=await (0,n.xq)(r,{startLine:-50});if(!o.V7.test((0,o.vp)(a)))try{await m(r,1e4)}catch{console.warn("[sendMessageToClaude] Prompt not detected, sending anyway")}await (0,n.Is)(r,t,!1),await (0,n.Is)(r,"",!0),console.log(`Sent message to Claude session: ${r}`)}async function g(e,t=1e3){let r=u(e);if(!await (0,n.Hk)(r))throw Error(`Claude session ${r} does not exist`);try{return await (0,n.xq)(r,{startLine:-t})}catch(e){throw Error(`Failed to capture Claude output: ${s(e)}`)}}async function p(e){let t=u(e);try{await (0,n.Hk)(t)&&(await (0,n.Is)(t,"",!1),await i(`tmux send-keys -t "${t}" C-d`),await new Promise(e=>setTimeout(e,500)));let e=await (0,n.AJ)(t);return e&&console.log(`✓ Stopped Claude session: ${t}`),e}catch(e){return console.error(`Error stopping Claude session: ${s(e)}`),!1}}},19377:(e,t,r)=>{"use strict";r.d(t,{FE:()=>s,V7:()=>i,Wg:()=>d,bs:()=>function e(t){switch(t){case"claude":return{promptPattern:i,separatorPattern:s,thinkingPattern:o,skipPatterns:[/^─{10,}$/,/^[>❯]\s*$/,o,/^\s*[⎿⏋]\s+Tip:/,/^\s*Tip:/,/^\s*\?\s*for shortcuts/,/to interrupt\)/]};case"codex":return{promptPattern:c,separatorPattern:l,thinkingPattern:a,skipPatterns:[/^─.*─+$/,/^›\s*$/,/^›\s+(Implement|Find and fix|Type)/,a,/^\s*\d+%\s+context left/,/^\s*for shortcuts$/,/╭─+╮/,/╰─+╯/,/•\s*Ran\s+/,/^\s*└/,/^\s*│/,/\(.*esc to interrupt\)/]};case"gemini":return{promptPattern:u,separatorPattern:/^gemini\s+--\s+/m,thinkingPattern:/(?!)/m,skipPatterns:[/^gemini\s+--\s+/,u,/^\s*$/]};default:return e("claude")}},vp:()=>m});let n=(0,r(43895).h)("cli-patterns"),o=RegExp(`[✻✽⏺\xb7∴✢✳✶⦿◉●○◌◎⊙⊚⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\\s+.+…|to interrupt\\)`,"m"),a=/•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m,i=/^[>❯](\s*$|\s+\S)/m,s=/^─{10,}$/m,c=/^›\s*/m,l=/^─.*Worked for.*─+$/m,u=/^(%|\$|.*@.*[%$#])\s*$/m;function d(e,t){let r;let i=n.withContext({cliToolId:e});switch(i.debug("detectThinking:check",{contentLength:t.length}),e){case"claude":default:r=o.test(t);break;case"codex":r=a.test(t);break;case"gemini":r=!1}return i.debug("detectThinking:result",{isThinking:r}),r}let f=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;function m(e){return e.replace(f,"")}},76966:(e,t,r)=>{"use strict";r.d(t,{o:()=>a});var n=r(75748),o=r(98636);async function a(e,t,r,a="claude"){let i=(0,n.vX)(e,t);if(i)try{await (0,o.xN)(t,i.content,r,a)}catch(e){console.error("[recordClaudeConversation] Failed to create log file:",e)}}},98636:(e,t,r)=>{"use strict";r.d(t,{e7:()=>f,xN:()=>d});var n=r(20629),o=r.n(n),a=r(55315),i=r.n(a),s=r(73853);let c=(0,r(57569).Hb)("CM_LOG_DIR")||i().join(process.cwd(),"data","logs");function l(e="claude"){return i().join(c,e)}async function u(e="claude"){let t=l(e);try{await o().access(t)}catch{await o().mkdir(t,{recursive:!0})}}async function d(e,t,r,n="claude"){await u(n);let a=function(e,t="claude"){let r=(0,s.WU)(new Date,"yyyy-MM-dd"),n=`${e}-${r}.md`,o=l(t);return i().join(o,n)}(e,n),c=(0,s.WU)(new Date,"yyyy-MM-dd HH:mm:ss"),d="";try{d=await o().readFile(a,"utf-8")}catch{let t="claude"===n?"Claude Code":"codex"===n?"Codex CLI":"Gemini CLI";d=`# ${t} Conversation Log: ${e}
1
+ exports.id=9367,exports.ids=[9367],exports.modules={58359:()=>{},93739:()=>{},89287:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});let n=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,a=/Request ID: ([^\s\n]+)/,o=/Summary: (.+?)(?:\n─|$)/s;function i(e){let t={content:e},r=n.exec(e);r&&(t.logFileName=r[2]);let i=a.exec(e);i&&(t.requestId=i[1]);let s=o.exec(e);return s&&(t.summary=s[1].trim()),t}},62648:(e,t,r)=>{"use strict";r.d(t,{Lm:()=>y,Uv:()=>f,YI:()=>m,_f:()=>x,xd:()=>p,ym:()=>g});var n=r(10927),a=r(19377),o=r(92900),i=r(61282);let s=(0,r(21764).promisify)(i.exec);function c(e){return e instanceof Error?e.message:String(e)}let l=null;async function u(){if(l)return l;if(process.env.CLAUDE_PATH)return l=process.env.CLAUDE_PATH;try{let{stdout:e}=await s("which claude",{timeout:5e3});return l=e.trim()}catch{for(let e of["/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude"])try{return await s(`test -x "${e}"`,{timeout:1e3}),l=e}catch{}throw Error("Claude CLI not found. Set CLAUDE_PATH environment variable or install Claude CLI.")}}function d(e){return`mcbd-claude-${e}`}async function f(){try{return await s("which claude",{timeout:5e3}),!0}catch{return!1}}async function m(e){let t=d(e);return await (0,n.Hk)(t)}async function w(e,t=5e3){let r=Date.now();for(;Date.now()-r<t;){let t=await (0,n.xq)(e,{startLine:-50});if(a.V7.test((0,a.vp)(t)))return;await new Promise(e=>setTimeout(e,200))}throw Error(`Prompt detection timeout (${t}ms)`)}async function g(e){let{worktreeId:t,worktreePath:r}=e;if(!await f())throw Error("Claude CLI is not installed or not in PATH");let o=d(t);if(await (0,n.Hk)(o)){console.log(`Claude session ${o} already exists`);return}try{await (0,n.ed)({sessionName:o,workingDirectory:r,historyLimit:5e4});let e=await u();await (0,n.Is)(o,e,!0);let t=Date.now(),i=!1,s=!1;for(;Date.now()-t<15e3;){await new Promise(e=>setTimeout(e,300));try{let e=await (0,n.xq)(o,{startLine:-50}),r=(0,a.vp)(e);if(a.V7.test(r)){await new Promise(e=>setTimeout(e,500)),console.log(`Claude initialized in ${Date.now()-t}ms`),i=!0;break}!s&&a.H3.test(r)&&(await (0,n.Is)(o,"",!0),s=!0,console.log("Trust dialog detected, sending Enter to confirm"))}catch{}}if(!i)throw Error("Claude initialization timeout (15000ms)");console.log(`Started Claude session: ${o}`)}catch(e){throw Error(`Failed to start Claude session: ${c(e)}`)}}async function p(e,t){let r=d(e);if(!await (0,n.Hk)(r))throw Error(`Claude session ${r} does not exist. Start the session first.`);let i=await (0,n.xq)(r,{startLine:-50});a.V7.test((0,a.vp)(i))||await w(r,1e4),await new Promise(e=>setTimeout(e,500)),await (0,n.Is)(r,t,!1),await (0,n.Is)(r,"",!0),t.includes("\n")&&await (0,o.N)(r),console.log(`Sent message to Claude session: ${r}`)}async function y(e,t=1e3){let r=d(e);if(!await (0,n.Hk)(r))throw Error(`Claude session ${r} does not exist`);try{return await (0,n.xq)(r,{startLine:-t})}catch(e){throw Error(`Failed to capture Claude output: ${c(e)}`)}}async function x(e){let t=d(e);try{await (0,n.Hk)(t)&&(await (0,n.Is)(t,"",!1),await s(`tmux send-keys -t "${t}" C-d`),await new Promise(e=>setTimeout(e,500)));let e=await (0,n.AJ)(t);return e&&console.log(`✓ Stopped Claude session: ${t}`),e}catch(e){return console.error(`Error stopping Claude session: ${c(e)}`),!1}}},19377:(e,t,r)=>{"use strict";r.d(t,{H3:()=>c,Sg:()=>x,V7:()=>i,Wg:()=>g,_r:()=>f,bs:()=>function e(t){switch(t){case"claude":return{promptPattern:i,separatorPattern:s,thinkingPattern:a,skipPatterns:[/^─{10,}$/,/^[>❯]\s*$/,a,/^\s*[⎿⏋]\s+Tip:/,/^\s*Tip:/,/^\s*\?\s*for shortcuts/,/to interrupt\)/,d]};case"codex":return{promptPattern:l,separatorPattern:u,thinkingPattern:o,skipPatterns:[/^─.*─+$/,/^›\s*$/,/^›\s+(Implement|Find and fix|Type)/,o,/^\s*\d+%\s+context left/,/^\s*for shortcuts$/,/╭─+╮/,/╰─+╯/,/•\s*Ran\s+/,/^\s*└/,/^\s*│/,/\(.*esc to interrupt\)/,d]};case"gemini":return{promptPattern:w,separatorPattern:/^gemini\s+--\s+/m,thinkingPattern:/(?!)/m,skipPatterns:[/^gemini\s+--\s+/,w,/^\s*$/]};default:return e("claude")}},d8:()=>d,vp:()=>y,ww:()=>m});let n=(0,r(43895).h)("cli-patterns"),a=RegExp(`[✻✽⏺\xb7∴✢✳✶⦿◉●○◌◎⊙⊚⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\\s+.+…|esc to interrupt`,"m"),o=/•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m,i=/^[>❯](\s*$|\s+\S)/m,s=/^─{10,}$/m,c=/Yes, I trust this folder/m,l=/^›\s*/m,u=/^─.*Worked for.*─+$/m,d=/\[Pasted text #\d+/,f=500,m=3,w=/^(%|\$|.*@.*[%$#])\s*$/m;function g(e,t){let r;let i=n.withContext({cliToolId:e});switch(i.debug("detectThinking:check",{contentLength:t.length}),e){case"claude":default:r=a.test(t);break;case"codex":r=o.test(t);break;case"gemini":r=!1}return i.debug("detectThinking:result",{isThinking:r}),r}let p=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;function y(e){return e.replace(p,"")}function x(e){if("claude"===e)return{requireDefaultIndicator:!1}}},76966:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(75748),a=r(98636);async function o(e,t,r,o="claude"){let i=(0,n.vX)(e,t);if(i)try{await (0,a.xN)(t,i.content,r,o)}catch(e){console.error("[recordClaudeConversation] Failed to create log file:",e)}}},98636:(e,t,r)=>{"use strict";r.d(t,{e7:()=>f,xN:()=>d});var n=r(20629),a=r.n(n),o=r(55315),i=r.n(o),s=r(73853);let c=(0,r(57569).Hb)("CM_LOG_DIR")||i().join(process.cwd(),"data","logs");function l(e="claude"){return i().join(c,e)}async function u(e="claude"){let t=l(e);try{await a().access(t)}catch{await a().mkdir(t,{recursive:!0})}}async function d(e,t,r,n="claude"){await u(n);let o=function(e,t="claude"){let r=(0,s.WU)(new Date,"yyyy-MM-dd"),n=`${e}-${r}.md`,a=l(t);return i().join(a,n)}(e,n),c=(0,s.WU)(new Date,"yyyy-MM-dd HH:mm:ss"),d="";try{d=await a().readFile(o,"utf-8")}catch{let t="claude"===n?"Claude Code":"codex"===n?"Codex CLI":"Gemini CLI";d=`# ${t} Conversation Log: ${e}
2
2
 
3
3
  Created: ${c}
4
4
 
@@ -16,4 +16,4 @@ ${r}
16
16
 
17
17
  ---
18
18
 
19
- `,await o().writeFile(a,d,"utf-8"),a}async function f(e,t="all"){let r=[];for(let n of"all"===t?["claude","codex","gemini"]:[t]){await u(n);let t=l(n);try{let n=(await o().readdir(t)).filter(t=>t.startsWith(`${e}-`)&&t.endsWith(".md")).map(e=>i().join(t,e));r.push(...n)}catch{}}return r.sort().reverse()}},43895:(e,t,r)=>{"use strict";r.d(t,{Y:()=>c,h:()=>l});var n=r(57569);let o=[{pattern:/Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi,replacement:"Bearer [REDACTED]"},{pattern:/(password|passwd|pwd)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/(token|secret|api_key|apikey|auth)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/Authorization:\s*\S+/gi,replacement:"Authorization: [REDACTED]"},{pattern:/-----BEGIN\s+\w+\s+PRIVATE\s+KEY-----[\s\S]*?-----END\s+\w+\s+PRIVATE\s+KEY-----/g,replacement:"[SSH_KEY_REDACTED]"}],a=/password|secret|token|key|auth/i,i={debug:0,info:1,warn:2,error:3};function s(e,t,r,s,c){let l=(0,n.LI)().level;if(i[e]<i[l])return;let u=s?function e(t){if("string"==typeof t){let e=t;for(let{pattern:t,replacement:r}of o)e=e.replace(t,r);return e}if("object"==typeof t&&null!==t){if(Array.isArray(t))return t.map(e);let r={};for(let[n,o]of Object.entries(t))a.test(n)?r[n]="[REDACTED]":r[n]=e(o);return r}return t}(s):void 0,d=function(e){if("json"===(0,n.LI)().format)return JSON.stringify(e);let{timestamp:t,level:r,module:o,action:a,data:i,worktreeId:s,cliToolId:c,requestId:l}=e,u=[s,c].filter(Boolean),d=u.length>0?` [${u.join(":")}]`:"",f=l?` (${l.slice(0,8)})`:"",m=i?` ${JSON.stringify(i)}`:"";return`[${t}] [${r.toUpperCase()}] [${o}]${d}${f} ${a}${m}`}({level:e,module:t,action:r,timestamp:new Date().toISOString(),...c,...u&&{data:u}});switch(e){case"error":console.error(d);break;case"warn":console.warn(d);break;default:console.log(d)}}function c(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function l(e){let t=r=>({debug:(t,n)=>s("debug",e,t,n,r),info:(t,n)=>s("info",e,t,n,r),warn:(t,n)=>s("warn",e,t,n,r),error:(t,n)=>s("error",e,t,n,r),withContext:e=>t({...r,...e})});return t()}},10927:(e,t,r)=>{"use strict";r.d(t,{AJ:()=>l,Hk:()=>a,Is:()=>s,ZV:()=>u,ed:()=>i,xq:()=>c});var n=r(61282);let o=(0,r(21764).promisify)(n.exec);async function a(e){try{return await o(`tmux has-session -t "${e}"`,{timeout:5e3}),!0}catch{return!1}}async function i(e,t){let r,n,a;"string"==typeof e?(r=e,n=t,a=5e4):(r=e.sessionName,n=e.workingDirectory,a=e.historyLimit||5e4);try{await o(`tmux new-session -d -s "${r}" -c "${n}"`,{timeout:5e3}),await o(`tmux set-option -t "${r}" history-limit ${a}`,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to create tmux session: ${e}`)}}async function s(e,t,r=!0){let n=t.replace(/'/g,"'\\''"),a=r?`tmux send-keys -t "${e}" '${n}' C-m`:`tmux send-keys -t "${e}" '${n}'`;try{await o(a,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to send keys to tmux session: ${e}`)}}async function c(e,t){let r,n;"number"==typeof t?(r=-t,n="-"):t?(r=t.startLine??-1e4,n=t.endLine??"-"):(r=-1e3,n="-");try{let{stdout:t}=await o(`tmux capture-pane -t "${e}" -p -e -S ${r} -E ${n}`,{timeout:5e3,maxBuffer:10485760});return t}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to capture pane: ${e}`)}}async function l(e){try{return await o(`tmux kill-session -t "${e}"`,{timeout:5e3}),!0}catch(t){let e=t instanceof Error?t.message:String(t);if(e?.includes("no server running")||e?.includes("can't find session"))return!1;throw Error(`Failed to kill tmux session: ${e}`)}}async function u(e,t){try{await o(`tmux send-keys -t "${e}" ${t}`,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to send special key: ${e}`)}}},25079:(e,t,r)=>{"use strict";r.d(t,{ZV:()=>l,fM:()=>s,ps:()=>c});var n=r(34893);let o=new Map,a=new Map;function i(e,t){let r=a.get(e);if(console.log(`[WS] handleBroadcast called for ${e}, room size: ${r?.size||0}`),!r){console.log(`[WS] No room found for ${e}`);return}if(0===r.size){console.log(`[WS] Room for ${e} is empty`);return}try{let o=JSON.stringify({type:"broadcast",worktreeId:e,data:t}),a=0,i=0;r.forEach(e=>{if(e.readyState===n.XY.OPEN)try{e.send(o),a++}catch(e){i++,console.error("Error sending WebSocket message to client:",e)}}),console.log(`Broadcast to worktree ${e}: ${a}/${r.size} clients (${i} errors)`)}catch(t){console.error(`Error broadcasting to worktree ${e}:`,t);try{let t=JSON.stringify({type:"broadcast",worktreeId:e,data:{error:"Message encoding error"}});r.forEach(e=>{if(e.readyState===n.XY.OPEN)try{e.send(t)}catch{}})}catch(e){console.error("Failed to send fallback message:",e)}}}function s(e,t){i(e,t)}function c(e,t){t.worktreeId?i(t.worktreeId,{type:e,...t}):console.warn("broadcastMessage called without worktreeId")}function l(e){for(let t of e){let e=a.get(t);e&&(e.forEach(e=>{let r=o.get(e);r&&r.worktreeIds.delete(t)}),a.delete(t),console.log(`[WS] Cleaned up room for worktree: ${t}`))}}}};
19
+ `,await a().writeFile(o,d,"utf-8"),o}async function f(e,t="all"){let r=[];for(let n of"all"===t?["claude","codex","gemini"]:[t]){await u(n);let t=l(n);try{let n=(await a().readdir(t)).filter(t=>t.startsWith(`${e}-`)&&t.endsWith(".md")).map(e=>i().join(t,e));r.push(...n)}catch{}}return r.sort().reverse()}},43895:(e,t,r)=>{"use strict";r.d(t,{Y:()=>c,h:()=>l});var n=r(57569);let a=[{pattern:/Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi,replacement:"Bearer [REDACTED]"},{pattern:/(password|passwd|pwd)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/(token|secret|api_key|apikey|auth)[=:]\s*\S+/gi,replacement:"$1=[REDACTED]"},{pattern:/Authorization:\s*\S+/gi,replacement:"Authorization: [REDACTED]"},{pattern:/-----BEGIN\s+\w+\s+PRIVATE\s+KEY-----[\s\S]*?-----END\s+\w+\s+PRIVATE\s+KEY-----/g,replacement:"[SSH_KEY_REDACTED]"}],o=/password|secret|token|key|auth/i,i={debug:0,info:1,warn:2,error:3};function s(e,t,r,s,c){let l=(0,n.LI)().level;if(i[e]<i[l])return;let u=s?function e(t){if("string"==typeof t){let e=t;for(let{pattern:t,replacement:r}of a)e=e.replace(t,r);return e}if("object"==typeof t&&null!==t){if(Array.isArray(t))return t.map(e);let r={};for(let[n,a]of Object.entries(t))o.test(n)?r[n]="[REDACTED]":r[n]=e(a);return r}return t}(s):void 0,d=function(e){if("json"===(0,n.LI)().format)return JSON.stringify(e);let{timestamp:t,level:r,module:a,action:o,data:i,worktreeId:s,cliToolId:c,requestId:l}=e,u=[s,c].filter(Boolean),d=u.length>0?` [${u.join(":")}]`:"",f=l?` (${l.slice(0,8)})`:"",m=i?` ${JSON.stringify(i)}`:"";return`[${t}] [${r.toUpperCase()}] [${a}]${d}${f} ${o}${m}`}({level:e,module:t,action:r,timestamp:new Date().toISOString(),...c,...u&&{data:u}});switch(e){case"error":console.error(d);break;case"warn":console.warn(d);break;default:console.log(d)}}function c(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function l(e){let t=r=>({debug:(t,n)=>s("debug",e,t,n,r),info:(t,n)=>s("info",e,t,n,r),warn:(t,n)=>s("warn",e,t,n,r),error:(t,n)=>s("error",e,t,n,r),withContext:e=>t({...r,...e})});return t()}},92900:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var n=r(10927),a=r(19377);let o=(0,r(43895).h)("pasted-text");async function i(e){for(let t=0;t<a.ww;t++){await new Promise(e=>setTimeout(e,a._r));let r=await (0,n.xq)(e,{startLine:-10});if(!a.d8.test((0,a.vp)(r)))return;await (0,n.Is)(e,"",!0),t===a.ww-1&&o.warn("Pasted text detection: max retries reached",{sessionName:e,maxRetries:a.ww,finalAttempt:t})}}},10927:(e,t,r)=>{"use strict";r.d(t,{AJ:()=>d,Hk:()=>o,Is:()=>s,ZV:()=>f,ed:()=>i,hL:()=>l,xq:()=>u});var n=r(61282);let a=(0,r(21764).promisify)(n.exec);async function o(e){try{return await a(`tmux has-session -t "${e}"`,{timeout:5e3}),!0}catch{return!1}}async function i(e,t){let r,n,o;"string"==typeof e?(r=e,n=t,o=5e4):(r=e.sessionName,n=e.workingDirectory,o=e.historyLimit||5e4);try{await a(`tmux new-session -d -s "${r}" -c "${n}"`,{timeout:5e3}),await a(`tmux set-option -t "${r}" history-limit ${o}`,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to create tmux session: ${e}`)}}async function s(e,t,r=!0){let n=t.replace(/'/g,"'\\''"),o=r?`tmux send-keys -t "${e}" '${n}' C-m`:`tmux send-keys -t "${e}" '${n}'`;try{await a(o,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to send keys to tmux session: ${e}`)}}let c=new Set(["Up","Down","Left","Right","Enter","Space","Tab","Escape","BSpace","DC"]);async function l(e,t){if(0!==t.length){for(let e of t)if(!c.has(e))throw Error(`Invalid special key: ${e}`);try{for(let r=0;r<t.length;r++){let n=`tmux send-keys -t "${e}" ${t[r]}`;await a(n,{timeout:5e3}),r<t.length-1&&await new Promise(e=>setTimeout(e,100))}}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to send special keys to tmux session: ${e}`)}}}async function u(e,t){let r,n;"number"==typeof t?(r=-t,n="-"):t?(r=t.startLine??-1e4,n=t.endLine??"-"):(r=-1e3,n="-");try{let{stdout:t}=await a(`tmux capture-pane -t "${e}" -p -e -S ${r} -E ${n}`,{timeout:5e3,maxBuffer:10485760});return t}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to capture pane: ${e}`)}}async function d(e){try{return await a(`tmux kill-session -t "${e}"`,{timeout:5e3}),!0}catch(t){let e=t instanceof Error?t.message:String(t);if(e?.includes("no server running")||e?.includes("can't find session"))return!1;throw Error(`Failed to kill tmux session: ${e}`)}}async function f(e,t){try{await a(`tmux send-keys -t "${e}" ${t}`,{timeout:5e3})}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`Failed to send special key: ${e}`)}}},25079:(e,t,r)=>{"use strict";r.d(t,{ZV:()=>l,fM:()=>s,ps:()=>c});var n=r(34893);let a=new Map,o=new Map;function i(e,t){let r=o.get(e);if(console.log(`[WS] handleBroadcast called for ${e}, room size: ${r?.size||0}`),!r){console.log(`[WS] No room found for ${e}`);return}if(0===r.size){console.log(`[WS] Room for ${e} is empty`);return}try{let a=JSON.stringify({type:"broadcast",worktreeId:e,data:t}),o=0,i=0;r.forEach(e=>{if(e.readyState===n.XY.OPEN)try{e.send(a),o++}catch(e){i++,console.error("Error sending WebSocket message to client:",e)}}),console.log(`Broadcast to worktree ${e}: ${o}/${r.size} clients (${i} errors)`)}catch(t){console.error(`Error broadcasting to worktree ${e}:`,t);try{let t=JSON.stringify({type:"broadcast",worktreeId:e,data:{error:"Message encoding error"}});r.forEach(e=>{if(e.readyState===n.XY.OPEN)try{e.send(t)}catch{}})}catch(e){console.error("Failed to send fallback message:",e)}}}function s(e,t){i(e,t)}function c(e,t){t.worktreeId?i(t.worktreeId,{type:e,...t}):console.warn("broadcastMessage called without worktreeId")}function l(e){for(let t of e){let e=o.get(t);e&&(e.forEach(e=>{let r=a.get(e);r&&r.worktreeIds.delete(t)}),o.delete(t),console.log(`[WS] Cleaned up room for worktree: ${t}`))}}}};
@@ -1 +1 @@
1
- {"version":1,"functions":{"/api/external-apps/[id]/health":{},"/api/external-apps":{},"/api/external-apps/[id]":{},"/api/worktrees":{},"/proxy/[...path]":{}}}
1
+ {"version":1,"functions":{"/api/external-apps/[id]/health":{},"/api/external-apps/[id]":{},"/api/external-apps":{},"/api/worktrees":{},"/proxy/[...path]":{}}}
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/28be35e4727ae7ef.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-4f85dcef6279c6ee.js"/><script src="/_next/static/chunks/fd9d1056-bbe86e4ae099d5cd.js" async=""></script><script src="/_next/static/chunks/2117-d845c2cd62e344a6.js" async=""></script><script src="/_next/static/chunks/main-app-420d93e43682fee5.js" async=""></script><script src="/_next/static/chunks/816-c254f4e2406e696a.js" async=""></script><script src="/_next/static/chunks/app/layout-4804cfba519283cf.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>CommandMate</title><meta name="description" content="Git worktree management with Claude CLI and tmux sessions"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-gray-50"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-4f85dcef6279c6ee.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/28be35e4727ae7ef.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[91795,[\"816\",\"static/chunks/816-c254f4e2406e696a.js\",\"3185\",\"static/chunks/app/layout-4804cfba519283cf.js\"],\"AppProviders\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"bdUePCj-b9Gv5okYGp49O\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/28be35e4727ae7ef.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen bg-gray-50\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"CommandMate\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Git worktree management with Claude CLI and tmux sessions\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/d4b58a1129eff6af.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-4f85dcef6279c6ee.js"/><script src="/_next/static/chunks/fd9d1056-bbe86e4ae099d5cd.js" async=""></script><script src="/_next/static/chunks/2117-d845c2cd62e344a6.js" async=""></script><script src="/_next/static/chunks/main-app-420d93e43682fee5.js" async=""></script><script src="/_next/static/chunks/816-c254f4e2406e696a.js" async=""></script><script src="/_next/static/chunks/app/layout-4804cfba519283cf.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>CommandMate</title><meta name="description" content="Git worktree management with Claude CLI and tmux sessions"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-gray-50"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-4f85dcef6279c6ee.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/d4b58a1129eff6af.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[91795,[\"816\",\"static/chunks/816-c254f4e2406e696a.js\",\"3185\",\"static/chunks/app/layout-4804cfba519283cf.js\"],\"AppProviders\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"HhG0EHeG9E4wTJ4sqnLdv\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d4b58a1129eff6af.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen bg-gray-50\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"CommandMate\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Git worktree management with Claude CLI and tmux sessions\"}]]\n3:null\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4f85dcef6279c6ee.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-b6d727aa9248d4f2.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/bdUePCj-b9Gv5okYGp49O/_buildManifest.js" defer=""></script><script src="/_next/static/bdUePCj-b9Gv5okYGp49O/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"bdUePCj-b9Gv5okYGp49O","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4f85dcef6279c6ee.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-b6d727aa9248d4f2.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/HhG0EHeG9E4wTJ4sqnLdv/_buildManifest.js" defer=""></script><script src="/_next/static/HhG0EHeG9E4wTJ4sqnLdv/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"HhG0EHeG9E4wTJ4sqnLdv","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"IOkB23wzKal2Ccf7izSy0LazKzdpzrigNtrcoBvdIbA="}
1
+ {"node":{},"edge":{},"encryptionKey":"IAJNxG95dOX/klHPoWnb6T5nhXF4godPOdr2mBGMqKQ="}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{66625:function(e,t,r){r.d(t,{Vw:function(){return j}});var a=r(57437),n=r(2265);r(27648);var s=r(43241),l=r(58819),o=r(99376),i=r(34021),c=r(8672);function d(e){let{status:t,label:r}=e,n=c.F4[t],s="".concat(r,": ").concat(n.label);return"spinner"===n.type?(0,a.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ".concat(n.className),title:s,"aria-label":s}):(0,a.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0 ".concat(n.className),title:s,"aria-label":s})}let u=(0,n.memo)(function(e){let{branch:t,isSelected:r,onClick:n}=e;return(0,a.jsxs)("button",{"data-testid":"branch-list-item",onClick:n,"aria-current":r?"true":void 0,className:"\n w-full px-4 py-3 flex flex-col gap-1\n hover:bg-gray-800 transition-colors\n focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500\n ".concat(r?"bg-gray-700 border-l-2 border-blue-500":"border-l-2 border-transparent","\n "),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[t.cliStatus&&(0,a.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0","aria-label":"CLI tool status",children:[(0,a.jsx)(d,{status:t.cliStatus.claude,label:"Claude"}),(0,a.jsx)(d,{status:t.cliStatus.codex,label:"Codex"})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-white truncate",children:t.name}),(0,a.jsx)("p",{className:"text-xs text-gray-400 truncate",children:t.repositoryName})]}),t.hasUnread&&(0,a.jsx)("span",{"data-testid":"unread-indicator",className:"w-2 h-2 rounded-full bg-blue-500 flex-shrink-0","aria-label":"Has unread messages"})]}),t.description&&(0,a.jsx)("div",{"data-testid":"branch-description",className:"pl-6 pr-2 mt-1 text-left",children:(0,a.jsx)("p",{className:"text-xs text-gray-400 line-clamp-2",children:t.description})})]})}),m=[{key:"updatedAt",label:"Updated"},{key:"repositoryName",label:"Repository"},{key:"branchName",label:"Branch"},{key:"status",label:"Status"}],x=(0,n.memo)(function(){var e;let{sortKey:t,sortDirection:r,setSortKey:l,setSortDirection:o}=(0,s.Sz)(),[i,c]=(0,n.useState)(!1),d=(0,n.useRef)(null);(0,n.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&c(!1)}if(i)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]),(0,n.useEffect)(()=>{function e(e){"Escape"===e.key&&c(!1)}if(i)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]);let u=(0,n.useCallback)(()=>{c(e=>!e)},[]),x=(0,n.useCallback)(e=>{e===t?o("asc"===r?"desc":"asc"):(l(e),o("updatedAt"===e?"desc":"asc")),c(!1)},[t,r,l,o]),b=(0,n.useCallback)(()=>{o("asc"===r?"desc":"asc")},[r,o]),g=(null===(e=m.find(e=>e.key===t))||void 0===e?void 0:e.label)||"Sort";return(0,a.jsxs)("div",{ref:d,className:"relative","data-testid":"sort-selector",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("button",{type:"button",onClick:u,"aria-expanded":i,"aria-haspopup":"listbox","aria-label":"Sort by ".concat(g),className:" flex items-center gap-1 px-2 py-1 rounded text-xs text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors ",children:[(0,a.jsx)(h,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:g})]}),(0,a.jsx)("button",{type:"button",onClick:b,"aria-label":"asc"===r?"Sort ascending":"Sort descending",className:" p-1 rounded text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors ",children:"asc"===r?(0,a.jsx)(f,{className:"w-3 h-3"}):(0,a.jsx)(p,{className:"w-3 h-3"})})]}),i&&(0,a.jsx)("div",{role:"listbox","aria-label":"Sort options",className:" absolute right-0 top-full mt-1 z-50 min-w-[140px] py-1 rounded-md shadow-lg bg-gray-800 border border-gray-600 ",children:m.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":t===e.key,onClick:()=>x(e.key),className:"\n w-full px-3 py-2 text-left text-sm\n flex items-center justify-between\n hover:bg-gray-700 transition-colors\n ".concat(t===e.key?"text-blue-400":"text-gray-300","\n "),children:[(0,a.jsx)("span",{children:e.label}),t===e.key&&(0,a.jsx)("span",{className:"text-xs",children:"asc"===r?"ASC":"DESC"})]},e.key))})]})});function h(e){let{className:t}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}function f(e){let{className:t}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}function p(e){let{className:t}=e;return(0,a.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}var b=r(47712);let g={waiting:0,ready:1,running:2,generating:3,idle:4},y=(0,n.memo)(function(){let e=(0,o.useRouter)(),{worktrees:t,selectedWorktreeId:r,selectWorktree:l}=(0,i.Mu)(),{closeMobileDrawer:c,sortKey:d,sortDirection:m}=(0,s.Sz)(),[h,f]=(0,n.useState)(""),p=(0,n.useMemo)(()=>{let e=t.map(b.I_),r=e;if(h.trim()){let t=h.toLowerCase();r=e.filter(e=>e.name.toLowerCase().includes(t)||e.repositoryName.toLowerCase().includes(t))}return function(e,t,r){let a=[...e];return a.sort((e,a)=>{let n=0;switch(t){case"updatedAt":{let t=e=>e?e instanceof Date?e.getTime():new Date(e).getTime():0,r=t(e.lastActivity);n=t(a.lastActivity)-r;break}case"repositoryName":{let t=e.repositoryName.toLowerCase(),r=a.repositoryName.toLowerCase();n=t.localeCompare(r);break}case"branchName":{let t=e.name.toLowerCase(),r=a.name.toLowerCase();n=t.localeCompare(r);break}case"status":n=g[e.status]-g[a.status]}return("updatedAt"===t?"desc"===r:"asc"===r)?n:-n}),a}(r,d,m)},[t,h,d,m]),y=t=>{l(t),e.push("/worktrees/".concat(t)),c()};return(0,a.jsxs)("nav",{"data-testid":"sidebar","aria-label":"Branch navigation",className:"h-full flex flex-col bg-gray-900 text-white",role:"navigation",children:[(0,a.jsx)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 px-4 py-4 border-b border-gray-700",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Branches"}),(0,a.jsx)(x,{})]})}),(0,a.jsx)("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-700",children:(0,a.jsx)("input",{type:"text",placeholder:"Search branches...",value:h,onChange:e=>f(e.target.value),className:" w-full px-3 py-2 rounded-md bg-gray-800 text-white placeholder-gray-400 border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent "})}),(0,a.jsx)("div",{"data-testid":"branch-list",className:"flex-1 overflow-y-auto",children:0===p.length?(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-400",children:h?"No branches found":"No branches available"}):p.map(e=>(0,a.jsx)(u,{branch:e,isSelected:e.id===r,onClick:()=>y(e.id)},e.id))})]})});var v=r(3468);let w="transform transition-transform duration-300 ease-out",j=(0,n.memo)(function(e){let{children:t}=e,{isOpen:r,isMobileDrawerOpen:n,closeMobileDrawer:o}=(0,s.Sz)();return(0,l.d)()?(0,a.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[n&&(0,a.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:o,"aria-hidden":"true"}),(0,a.jsx)("aside",{"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full w-72 z-50\n ".concat(w,"\n ").concat(n?"translate-x-0":"-translate-x-full","\n "),role:"complementary",children:(0,a.jsx)(y,{})}),(0,a.jsx)("main",{className:"flex-1 min-h-0 overflow-hidden",role:"main",children:t})]}):(0,a.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex",children:[(0,a.jsx)("aside",{"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full w-72\n ".concat(w,"\n ").concat(r?"translate-x-0":"-translate-x-full","\n "),style:{zIndex:v.k.SIDEBAR},role:"complementary","aria-hidden":!r,children:(0,a.jsx)(y,{})}),(0,a.jsx)("main",{className:"\n flex-1 min-w-0 h-full overflow-hidden\n transition-[padding] duration-300 ease-out\n ".concat(r?"md:pl-72":"md:pl-0","\n "),role:"main",children:t})]})})},98702:function(e,t,r){r.d(t,{u:function(){return l}});var a=r(57437),n=r(2265),s=r(54887);function l(e){let{isOpen:t,onClose:r,title:l,children:o,size:i="lg",showCloseButton:c=!0,disableClose:d=!1}=e,u=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(d)return;let e=e=>{"Escape"===e.key&&t&&r()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,r,d]),(0,n.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),t)?(0,s.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-[9999] overflow-y-auto",children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:d?void 0:r}),(0,a.jsx)("div",{className:"relative flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,a.jsxs)("div",{ref:u,className:"relative w-full ".concat({sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[i]," max-h-[calc(100vh-1rem)] sm:max-h-[calc(100vh-2rem)] flex flex-col bg-white rounded-lg shadow-xl transform transition-all"),children:[(l||c)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200 flex-shrink-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 truncate pr-2",children:l}),c&&(0,a.jsx)("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0",children:(0,a.jsx)("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,a.jsx)("div",{className:"px-4 sm:px-6 py-3 sm:py-4 overflow-y-auto flex-1 min-h-0",children:o})]})})]}),document.body):null}},10789:function(e,t,r){r.d(t,{Ct:function(){return c},zx:function(){return n},Zb:function(){return s},aY:function(){return i},Ol:function(){return l},ll:function(){return o},u_:function(){return d.u}});var a=r(57437);function n(e){let{variant:t="primary",size:r="md",fullWidth:n=!1,loading:s=!1,disabled:l,className:o="",children:i,...c}=e,d=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[t],{sm:"btn-sm",md:"",lg:"btn-lg"}[r],n?"w-full":"",l||s?"opacity-50 cursor-not-allowed":"",o].filter(Boolean).join(" ");return(0,a.jsxs)("button",{className:d,disabled:l||s,...c,children:[s&&(0,a.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i]})}function s(e){let{hover:t=!1,padding:r="md",className:n="",children:s,...l}=e,o=["card",t?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[r],n].filter(Boolean).join(" ");return(0,a.jsx)("div",{className:o,...l,children:s})}function l(e){let{className:t="",children:r,...n}=e;return(0,a.jsx)("div",{className:"mb-3 ".concat(t),...n,children:r})}function o(e){let{className:t="",children:r,...n}=e;return(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 ".concat(t),...n,children:r})}function i(e){let{className:t="",children:r,...n}=e;return(0,a.jsx)("div",{className:t,...n,children:r})}function c(e){let{variant:t="gray",dot:r=!1,className:n="",children:s,...l}=e,o=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[t],n].filter(Boolean).join(" ");return(0,a.jsxs)("span",{className:o,...l,children:[r&&(0,a.jsx)("span",{className:"mr-1.5 inline-block h-2 w-2 rounded-full ".concat({success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[t]),"aria-hidden":"true"}),s]})}r(2265);var d=r(98702)},6940:function(e,t,r){r.d(t,{R:function(){return m}});var a=r(57437),n=r(2265),s=r(3227);function l(e,t){if(!t.trim())return e;let r=t.toLowerCase();return e.map(e=>({...e,commands:e.commands.filter(e=>{let t=e.name.toLowerCase().includes(r),a=e.description.toLowerCase().includes(r);return t||a})})).filter(e=>e.commands.length>0)}function o(e){let{groups:t,onSelect:r,highlightedIndex:n=-1,className:s=""}=e,l=0;return 0===t.length?(0,a.jsx)("div",{className:"text-sm text-gray-500 p-4 text-center ".concat(s),children:"No commands available"}):(0,a.jsx)("div",{className:"overflow-y-auto ".concat(s),children:t.map(e=>(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("div",{className:"px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider bg-gray-50",children:e.label}),(0,a.jsx)("div",{children:e.commands.map(e=>{let t=l;l++;let s=t===n;return(0,a.jsxs)("button",{type:"button","data-command-item":!0,"data-highlighted":s,onClick:()=>r(e),className:"w-full px-3 py-2 text-left flex items-start gap-2 hover:bg-blue-50 transition-colors ".concat(s?"bg-blue-100":""),children:[(0,a.jsxs)("span",{className:"text-blue-600 font-mono text-sm flex-shrink-0",children:["/",e.name]}),(0,a.jsx)("span",{className:"text-gray-600 text-sm truncate",children:e.description})]},e.name)})})]},e.category))})}function i(e){let{isOpen:t,groups:r,onSelect:s,onClose:i,isMobile:c=!1,position:d,onFreeInput:u}=e,[m,x]=(0,n.useState)(""),[h,f]=(0,n.useState)(0),p=(0,n.useRef)(null),b=(0,n.useMemo)(()=>l(r,m),[r,m]),g=(0,n.useMemo)(()=>b.flatMap(e=>e.commands),[b]);(0,n.useEffect)(()=>{t&&(x(""),f(0),setTimeout(()=>{var e;null===(e=p.current)||void 0===e||e.focus()},50))},[t]);let y=(0,n.useCallback)(e=>{s(e),i()},[s,i]),v=(0,n.useCallback)(e=>{if(t)switch(e.key){case"Escape":e.preventDefault(),i();break;case"ArrowDown":e.preventDefault(),f(e=>Math.min(e+1,g.length-1));break;case"ArrowUp":e.preventDefault(),f(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),g[h]&&y(g[h])}},[t,g,h,i,y]);return((0,n.useEffect)(()=>(document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}),[v]),t)?c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:i,"aria-hidden":"true"}),(0,a.jsxs)("div",{"data-testid":"slash-command-bottom-sheet",className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-xl z-50 max-h-[70vh] flex flex-col shadow-xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Commands"}),(0,a.jsx)("button",{type:"button",onClick:i,"aria-label":"Close",className:"p-2 rounded-full hover:bg-gray-100",children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,a.jsx)("div",{className:"px-4 py-2 border-b border-gray-100",children:(0,a.jsx)("input",{ref:p,type:"text",value:m,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})}),u&&(0,a.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:u,className:"w-full px-4 py-3 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-blue-600",children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,a.jsx)("span",{className:"text-gray-600",children:"Enter custom command..."})]}),(0,a.jsx)(o,{groups:b,onSelect:y,highlightedIndex:h,className:"flex-1 overflow-y-auto pb-20"})]})]}):(0,a.jsxs)("div",{role:"listbox",className:"absolute bg-white border border-gray-200 rounded-lg shadow-lg z-50 w-80 max-h-96 flex flex-col",style:d?{top:d.top,left:d.left}:{bottom:"100%",left:0,marginBottom:"4px"},children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-gray-100",children:(0,a.jsx)("input",{ref:p,type:"text",value:m,onChange:e=>x(e.target.value),placeholder:"Search commands...",className:"w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),u&&(0,a.jsxs)("button",{type:"button","data-testid":"free-input-button",onClick:u,className:"w-full px-3 py-2 text-left border-b border-gray-100 flex items-center gap-2 hover:bg-blue-50 transition-colors text-sm",children:[(0,a.jsx)("span",{className:"text-blue-600",children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,a.jsx)("span",{className:"text-gray-600",children:"Enter custom command..."})]}),(0,a.jsx)(o,{groups:b,onSelect:y,highlightedIndex:h,className:"flex-1 overflow-y-auto"}),(0,a.jsxs)("div",{className:"px-3 py-1.5 border-t border-gray-100 text-xs text-gray-400 flex gap-3",children:[(0,a.jsxs)("span",{children:[(0,a.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Enter"})," select"]}),(0,a.jsxs)("span",{children:[(0,a.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 rounded",children:"Esc"})," close"]})]})]}):null}function c(e){let{worktreeId:t,cliToolId:r,disabled:s=!1,onInterrupt:l}=e,[o,i]=(0,n.useState)(!1),c=(0,n.useRef)(0),u=(0,n.useCallback)(async()=>{let e=Date.now();if(!(e-c.current<1e3)){c.current=e,i(!0);try{let e=await fetch("/api/worktrees/".concat(t,"/interrupt"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cliToolId:r})});if(e.ok)null==l||l();else{let t=await e.json().catch(()=>({}));console.error("[InterruptButton] Failed to send interrupt:",t.error||e.statusText)}}catch(e){console.error("[InterruptButton] Error sending interrupt:",e)}finally{i(!1)}}},[t,r,l]);return(0,a.jsx)("button",{type:"button",onClick:u,disabled:s||o,className:"flex-shrink-0 p-2 text-orange-600 hover:bg-orange-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Stop processing","data-testid":"interrupt-button",children:o?(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):(0,a.jsx)(d,{})})}function d(){return(0,a.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}var u=r(58819);function m(e){let{worktreeId:t,onMessageSent:r,cliToolId:o,isSessionRunning:d=!1}=e,[m,x]=(0,n.useState)(""),[h,f]=(0,n.useState)(!1),[p,b]=(0,n.useState)(null),[g,y]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!1),j=(0,n.useRef)(null),N=(0,n.useRef)(null),k=(0,n.useRef)(!1),C=(0,n.useRef)(null),S=(0,u.d)(),{groups:E}=function(e,t){let[r,a]=(0,n.useState)([]),[o,i]=(0,n.useState)(!0),[c,d]=(0,n.useState)(null),[u,m]=(0,n.useState)(""),[x,h]=(0,n.useState)(t||"claude"),f=(0,n.useCallback)(async()=>{try{i(!0),d(null);let r=e?"/api/worktrees/".concat(e,"/slash-commands"):"/api/slash-commands";t&&(r+="?cliTool=".concat(t));let n=await fetch(r);if(!n.ok)throw Error("HTTP error ".concat(n.status));let s=await n.json();a(s.groups),h(s.cliTool||t||"claude")}catch(e){d((0,s.zG)(e)),a([])}finally{i(!1)}},[e,t]);(0,n.useEffect)(()=>{f()},[f]);let p=(0,n.useMemo)(()=>r.flatMap(e=>e.commands),[r]),b=(0,n.useMemo)(()=>l(r,u),[r,u]);return{groups:r,filteredGroups:b,allCommands:p,loading:o,error:c,filter:u,setFilter:m,refresh:(0,n.useCallback)(()=>{f()},[f]),cliTool:x}}(t,o);(0,n.useEffect)(()=>{let e=j.current;e&&(m?(e.style.height="auto",e.style.height="".concat(Math.min(e.scrollHeight,160),"px")):e.style.height="24px")},[m]);let L=async()=>{if(!g&&m.trim()&&!h)try{f(!0),b(null);let e=o||"claude";await s.Iv.sendMessage(t,m.trim(),e),x(""),null==r||r(e)}catch(e){b((0,s.zG)(e))}finally{f(!1)}},M=async e=>{e.preventDefault(),await L()},z=()=>{var e;w(!1),null===(e=j.current)||void 0===e||e.focus()};return(0,a.jsxs)("div",{ref:C,className:"space-y-2 relative",children:[p&&(0,a.jsx)("div",{className:"p-2 bg-red-50 border border-red-200 rounded text-sm text-red-800",children:p}),(0,a.jsxs)("form",{onSubmit:M,className:"flex items-end gap-2 bg-white border border-gray-300 rounded-lg px-4 py-2 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500",children:[S&&(0,a.jsx)("button",{type:"button",onClick:()=>w(!0),className:"flex-shrink-0 p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors","aria-label":"Show slash commands","data-testid":"mobile-command-button",children:(0,a.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})})}),(0,a.jsx)("textarea",{ref:j,value:m,onChange:e=>{let t=e.target.value;x(t),"/"===t||t.startsWith("/")&&!t.includes(" ")?w(!0):w(!1)},onKeyDown:e=>{let{keyCode:t}=e.nativeEvent;if(229!==t){if("Escape"===e.key&&v){e.preventDefault(),z();return}if(k.current&&"Enter"===e.key){k.current=!1;return}if("Enter"===e.key&&!g&&!v){if(S)return;e.shiftKey||(e.preventDefault(),L())}}},onCompositionStart:()=>{y(!0),k.current=!1,N.current&&clearTimeout(N.current)},onCompositionEnd:()=>{y(!1),k.current=!0,N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{k.current=!1},300)},placeholder:S?"Type your message...":"Type your message... (/ for commands, Shift+Enter for line break)",disabled:h,rows:1,className:"flex-1 outline-none bg-transparent resize-none py-1 overflow-y-auto scrollbar-thin",style:{minHeight:"24px",maxHeight:"160px"}}),(0,a.jsx)(c,{worktreeId:t,cliToolId:o||"claude",disabled:!d}),(0,a.jsx)("button",{type:"submit",disabled:!m.trim()||h,className:"flex-shrink-0 p-2 text-blue-600 hover:bg-blue-50 rounded-full transition-colors disabled:text-gray-300 disabled:hover:bg-transparent","aria-label":"Send message",children:h?(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):(0,a.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})})})]}),(0,a.jsx)(i,{isOpen:v,groups:E,onSelect:e=>{var t;x("/".concat(e.name," ")),w(!1),null===(t=j.current)||void 0===t||t.focus()},onClose:z,isMobile:S,onFreeInput:()=>{w(!1),x("/"),setTimeout(()=>{var e;null===(e=j.current)||void 0===e||e.focus()},50)}})]})}},8672:function(e,t,r){r.d(t,{F4:function(){return i},Ie:function(){return d},xh:function(){return c}});let a="bg-gray-500",n="bg-green-500",s="border-blue-500",l="bg-yellow-500",o="bg-red-500",i={idle:{className:a,label:"Idle",type:"dot"},ready:{className:n,label:"Ready",type:"dot"},running:{className:s,label:"Running",type:"spinner"},waiting:{className:l,label:"Waiting for response",type:"dot"},generating:{className:s,label:"Generating",type:"spinner"}},c={idle:{className:a,label:"Idle",type:"dot"},ready:{className:n,label:"Ready",type:"dot"},running:{className:s,label:"Running",type:"spinner"},waiting:{className:l,label:"Waiting for response",type:"dot"},error:{className:o,label:"Error",type:"dot"}},d={idle:{className:a,label:"Idle - No active session",type:"dot"},ready:{className:n,label:"Ready - Waiting for input",type:"dot"},running:{className:s,label:"Running - Processing",type:"spinner"},waiting:{className:l,label:"Waiting - User input required",type:"dot"},error:{className:o,label:"Error",type:"dot"}}},3468:function(e,t,r){r.d(t,{k:function(){return a}});let a={DROPDOWN:10,SIDEBAR:30,MODAL:50,MAXIMIZED_EDITOR:55,TOAST:60,CONTEXT_MENU:70}},58819:function(e,t,r){r.d(t,{d:function(){return n}});var a=r(2265);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{breakpoint:t=768}=e,[r,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=()=>window.innerWidth<t;n(e());let r=()=>{n(e())};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[t]),r}},47712:function(e,t,r){function a(e){return e?e.isWaitingForResponse?"waiting":e.isProcessing?"running":e.isRunning?"ready":"idle":"idle"}function n(e){var t,r;let n=!!e.lastAssistantMessageAt&&(!e.lastViewedAt||new Date(e.lastAssistantMessageAt)>new Date(e.lastViewedAt));return{id:e.id,name:e.name,repositoryName:e.repositoryName,status:"idle",hasUnread:n,lastActivity:e.updatedAt,description:e.description,cliStatus:{claude:a(null===(t=e.sessionStatusByCli)||void 0===t?void 0:t.claude),codex:a(null===(r=e.sessionStatusByCli)||void 0===r?void 0:r.codex)}}}r.d(t,{He:function(){return a},I_:function(){return n}})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2957],{47866:function(e){"use strict";let{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:a,getOwnPropertyDescriptor:o}=Object,{freeze:i,seal:l,create:c}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),l||(l=function(e){return e}),s||(s=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return e.apply(t,r)}),u||(u=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let f=N(Array.prototype.forEach),d=N(Array.prototype.lastIndexOf),p=N(Array.prototype.pop),m=N(Array.prototype.push),h=N(Array.prototype.splice),y=N(String.prototype.toLowerCase),g=N(String.prototype.toString),b=N(String.prototype.match),k=N(String.prototype.replace),T=N(String.prototype.indexOf),A=N(String.prototype.trim),v=N(Object.prototype.hasOwnProperty),_=N(RegExp.prototype.test),E=($=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u($,t)});function N(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return s(e,t,r)}}function S(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;n&&n(e,null);let o=t.length;for(;o--;){let n=t[o];if("string"==typeof n){let e=a(n);e!==n&&(r(t)||(t[o]=e),n=e)}e[n]=!0}return e}function x(e){let n=c(null);for(let[r,a]of t(e))v(e,r)&&(Array.isArray(a)?n[r]=function(e){for(let t=0;t<e.length;t++)v(e,t)||(e[t]=null);return e}(a):a&&"object"==typeof a&&a.constructor===Object?n[r]=x(a):n[r]=a);return n}function w(e,t){for(;null!==e;){let n=o(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=a(e)}return function(){return null}}let M=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),R=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=i(["#text"]),P=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=l(/<%[\w\W]*|[\w\W]*%>/gm),Z=l(/\$\{[\w\W]*/gm),B=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),W=l(/^aria-[\-\w]+$/),G=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=l(/^(?:\w+script|data):/i),Y=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=l(/^html$/i);var $,K=Object.freeze({__proto__:null,ARIA_ATTR:W,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:l(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:B,DOCTYPE_NAME:V,ERB_EXPR:F,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:H,TMPLIT_EXPR:Z});let X={element:1,text:3,progressingInstruction:7,comment:8,document:9},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Q=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var ee=function e(){let n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,a=t=>e(t);if(a.version="3.3.1",a.removed=[],!r||!r.document||r.document.nodeType!==X.document||!r.Element)return a.isSupported=!1,a;let{document:o}=r,l=o,s=l.currentScript,{DocumentFragment:u,HTMLTemplateElement:N,Node:H,Element:F,NodeFilter:Z,NamedNodeMap:B=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:W,DOMParser:q,trustedTypes:Y}=r,$=F.prototype,ee=w($,"cloneNode"),et=w($,"remove"),en=w($,"nextSibling"),er=w($,"childNodes"),ea=w($,"parentNode");if("function"==typeof N){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let eo="",{implementation:ei,createNodeIterator:el,createDocumentFragment:ec,getElementsByTagName:es}=o,{importNode:eu}=l,ef=Q();a.isSupported="function"==typeof t&&"function"==typeof ea&&ei&&void 0!==ei.createHTMLDocument;let{MUSTACHE_EXPR:ed,ERB_EXPR:ep,TMPLIT_EXPR:em,DATA_ATTR:eh,ARIA_ATTR:ey,IS_SCRIPT_OR_DATA:eg,ATTR_WHITESPACE:eb,CUSTOM_ELEMENT:ek}=K,{IS_ALLOWED_URI:eT}=K,eA=null,ev=S({},[...M,...C,...O,...L,...I]),e_=null,eE=S({},[...P,...z,...U,...j]),eN=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eS=null,ex=null,ew=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eM=!0,eC=!0,eO=!1,eD=!0,eL=!1,eR=!0,eI=!1,eP=!1,ez=!1,eU=!1,ej=!1,eH=!1,eF=!0,eZ=!1,eB=!0,eW=!1,eG={},eq=null,eY=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eV=null,e$=S({},["audio","video","img","source","image","track"]),eK=null,eX=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eJ="http://www.w3.org/1998/Math/MathML",eQ="http://www.w3.org/2000/svg",e0="http://www.w3.org/1999/xhtml",e1=e0,e2=!1,e7=null,e5=S({},[eJ,eQ,e0],g),e4=S({},["mi","mo","mn","ms","mtext"]),e3=S({},["annotation-xml"]),e6=S({},["title","style","font","a","script"]),e8=null,e9=["application/xhtml+xml","text/html"],te=null,tt=null,tn=o.createElement("form"),tr=function(e){return e instanceof RegExp||e instanceof Function},ta=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=x(e),te="application/xhtml+xml"===(e8=-1===e9.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?g:y,eA=v(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,te):ev,e_=v(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,te):eE,e7=v(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,g):e5,eK=v(e,"ADD_URI_SAFE_ATTR")?S(x(eX),e.ADD_URI_SAFE_ATTR,te):eX,eV=v(e,"ADD_DATA_URI_TAGS")?S(x(e$),e.ADD_DATA_URI_TAGS,te):e$,eq=v(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,te):eY,eS=v(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,te):x({}),ex=v(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,te):x({}),eG=!!v(e,"USE_PROFILES")&&e.USE_PROFILES,eM=!1!==e.ALLOW_ARIA_ATTR,eC=!1!==e.ALLOW_DATA_ATTR,eO=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eD=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eL=e.SAFE_FOR_TEMPLATES||!1,eR=!1!==e.SAFE_FOR_XML,eI=e.WHOLE_DOCUMENT||!1,eU=e.RETURN_DOM||!1,ej=e.RETURN_DOM_FRAGMENT||!1,eH=e.RETURN_TRUSTED_TYPE||!1,ez=e.FORCE_BODY||!1,eF=!1!==e.SANITIZE_DOM,eZ=e.SANITIZE_NAMED_PROPS||!1,eB=!1!==e.KEEP_CONTENT,eW=e.IN_PLACE||!1,eT=e.ALLOWED_URI_REGEXP||G,e1=e.NAMESPACE||e0,e4=e.MATHML_TEXT_INTEGRATION_POINTS||e4,e3=e.HTML_INTEGRATION_POINTS||e3,eN=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(eN.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(eN.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(eN.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eL&&(eC=!1),ej&&(eU=!0),eG&&(eA=S({},I),e_=[],!0===eG.html&&(S(eA,M),S(e_,P)),!0===eG.svg&&(S(eA,C),S(e_,z),S(e_,j)),!0===eG.svgFilters&&(S(eA,O),S(e_,z),S(e_,j)),!0===eG.mathMl&&(S(eA,L),S(e_,U),S(e_,j))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ew.tagCheck=e.ADD_TAGS:(eA===ev&&(eA=x(eA)),S(eA,e.ADD_TAGS,te))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ew.attributeCheck=e.ADD_ATTR:(e_===eE&&(e_=x(e_)),S(e_,e.ADD_ATTR,te))),e.ADD_URI_SAFE_ATTR&&S(eK,e.ADD_URI_SAFE_ATTR,te),e.FORBID_CONTENTS&&(eq===eY&&(eq=x(eq)),S(eq,e.FORBID_CONTENTS,te)),e.ADD_FORBID_CONTENTS&&(eq===eY&&(eq=x(eq)),S(eq,e.ADD_FORBID_CONTENTS,te)),eB&&(eA["#text"]=!0),eI&&S(eA,["html","head","body"]),eA.table&&(S(eA,["tbody"]),delete eS.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');eo=(n=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===n&&(n=J(Y,s)),null!==n&&"string"==typeof eo&&(eo=n.createHTML(""));i&&i(e),tt=e}},to=S({},[...C,...O,...D]),ti=S({},[...L,...R]),tl=function(e){let t=ea(e);t&&t.tagName||(t={namespaceURI:e1,tagName:"template"});let n=y(e.tagName),r=y(t.tagName);return!!e7[e.namespaceURI]&&(e.namespaceURI===eQ?t.namespaceURI===e0?"svg"===n:t.namespaceURI===eJ?"svg"===n&&("annotation-xml"===r||e4[r]):!!to[n]:e.namespaceURI===eJ?t.namespaceURI===e0?"math"===n:t.namespaceURI===eQ?"math"===n&&e3[r]:!!ti[n]:e.namespaceURI===e0?(t.namespaceURI!==eQ||!!e3[r])&&(t.namespaceURI!==eJ||!!e4[r])&&!ti[n]&&(e6[n]||!to[n]):"application/xhtml+xml"===e8&&!!e7[e.namespaceURI])},tc=function(e){m(a.removed,{element:e});try{ea(e).removeChild(e)}catch(t){et(e)}},ts=function(e,t){try{m(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e){if(eU||ej)try{tc(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}},tu=function(e){let t=null,r=null;if(ez)e="<remove></remove>"+e;else{let t=b(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===e8&&e1===e0&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let a=n?n.createHTML(e):e;if(e1===e0)try{t=new q().parseFromString(a,e8)}catch(e){}if(!t||!t.documentElement){t=ei.createDocument(e1,"template",null);try{t.documentElement.innerHTML=e2?eo:a}catch(e){}}let i=t.body||t.documentElement;return(e&&r&&i.insertBefore(o.createTextNode(r),i.childNodes[0]||null),e1===e0)?es.call(t,eI?"html":"body")[0]:eI?t.documentElement:i},tf=function(e){return el.call(e.ownerDocument||e,e,Z.SHOW_ELEMENT|Z.SHOW_COMMENT|Z.SHOW_TEXT|Z.SHOW_PROCESSING_INSTRUCTION|Z.SHOW_CDATA_SECTION,null)},td=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof B)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tp=function(e){return"function"==typeof H&&e instanceof H};function tm(e,t,n){f(e,e=>{e.call(a,t,n,tt)})}let th=function(e){let t=null;if(tm(ef.beforeSanitizeElements,e,null),td(e))return tc(e),!0;let n=te(e.nodeName);if(tm(ef.uponSanitizeElement,e,{tagName:n,allowedTags:eA}),eR&&e.hasChildNodes()&&!tp(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent)||e.nodeType===X.progressingInstruction||eR&&e.nodeType===X.comment&&_(/<[/\w]/g,e.data))return tc(e),!0;if(!(ew.tagCheck instanceof Function&&ew.tagCheck(n))&&(!eA[n]||eS[n])){if(!eS[n]&&tg(n)&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,n)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(n)))return!1;if(eB&&!eq[n]){let t=ea(e)||e.parentNode,n=er(e)||e.childNodes;if(n&&t){let r=n.length;for(let a=r-1;a>=0;--a){let r=ee(n[a],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,en(e))}}}return tc(e),!0}return e instanceof F&&!tl(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&_(/<\/no(script|embed|frames)/i,e.innerHTML)?(tc(e),!0):(eL&&e.nodeType===X.text&&(t=e.textContent,f([ed,ep,em],e=>{t=k(t,e," ")}),e.textContent!==t&&(m(a.removed,{element:e.cloneNode()}),e.textContent=t)),tm(ef.afterSanitizeElements,e,null),!1)},ty=function(e,t,n){if(eF&&("id"===t||"name"===t)&&(n in o||n in tn))return!1;if(eC&&!ex[t]&&_(eh,t));else if(eM&&_(ey,t));else if(ew.attributeCheck instanceof Function&&ew.attributeCheck(t,e));else if(!e_[t]||ex[t]){if(!(tg(e)&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,e)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(e))&&(eN.attributeNameCheck instanceof RegExp&&_(eN.attributeNameCheck,t)||eN.attributeNameCheck instanceof Function&&eN.attributeNameCheck(t,e))||"is"===t&&eN.allowCustomizedBuiltInElements&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,n)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(n))))return!1}else if(eK[t]);else if(_(eT,k(n,eb,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===T(n,"data:")&&eV[e]);else if(eO&&!_(eg,k(n,eb,"")));else if(n)return!1;return!0},tg=function(e){return"annotation-xml"!==e&&b(e,ek)},tb=function(e){tm(ef.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||td(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:e_,forceKeepAttr:void 0},o=t.length;for(;o--;){let{name:i,namespaceURI:l,value:c}=t[o],s=te(i),u="value"===i?c:A(c);if(r.attrName=s,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,tm(ef.uponSanitizeAttribute,e,r),u=r.attrValue,eZ&&("id"===s||"name"===s)&&(ts(i,e),u="user-content-"+u),eR&&_(/((--!?|])>)|<\/(style|title|textarea)/i,u)||"attributename"===s&&b(u,"href")){ts(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr||!eD&&_(/\/>/i,u)){ts(i,e);continue}eL&&f([ed,ep,em],e=>{u=k(u,e," ")});let d=te(e.nodeName);if(!ty(d,s,u)){ts(i,e);continue}if(n&&"object"==typeof Y&&"function"==typeof Y.getAttributeType){if(l);else switch(Y.getAttributeType(d,s)){case"TrustedHTML":u=n.createHTML(u);break;case"TrustedScriptURL":u=n.createScriptURL(u)}}if(u!==c)try{l?e.setAttributeNS(l,i,u):e.setAttribute(i,u),td(e)?tc(e):p(a.removed)}catch(t){ts(i,e)}}tm(ef.afterSanitizeAttributes,e,null)},tk=function e(t){let n=null,r=tf(t);for(tm(ef.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)tm(ef.uponSanitizeShadowNode,n,null),th(n),tb(n),n.content instanceof u&&e(n.content);tm(ef.afterSanitizeShadowDOM,t,null)};return a.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,i=null,c=null;if((e2=!e)&&(e="<!-->"),"string"!=typeof e&&!tp(e)){if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}else throw E("toString is not a function")}if(!a.isSupported)return e;if(eP||ta(t),a.removed=[],"string"==typeof e&&(eW=!1),eW){if(e.nodeName){let t=te(e.nodeName);if(!eA[t]||eS[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof H)(o=(r=tu("<!---->")).ownerDocument.importNode(e,!0)).nodeType===X.element&&"BODY"===o.nodeName?r=o:"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!eU&&!eL&&!eI&&-1===e.indexOf("<"))return n&&eH?n.createHTML(e):e;if(!(r=tu(e)))return eU?null:eH?eo:""}r&&ez&&tc(r.firstChild);let s=tf(eW?e:r);for(;i=s.nextNode();)th(i),tb(i),i.content instanceof u&&tk(i.content);if(eW)return e;if(eU){if(ej)for(c=ec.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(e_.shadowroot||e_.shadowrootmode)&&(c=eu.call(l,c,!0)),c}let d=eI?r.outerHTML:r.innerHTML;return eI&&eA["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(V,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),eL&&f([ed,ep,em],e=>{d=k(d,e," ")}),n&&eH?n.createHTML(d):d},a.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ta(e),eP=!0},a.clearConfig=function(){tt=null,eP=!1},a.isValidAttribute=function(e,t,n){return tt||ta({}),ty(te(e),te(t),n)},a.addHook=function(e,t){"function"==typeof t&&m(ef[e],t)},a.removeHook=function(e,t){if(void 0!==t){let n=d(ef[e],t);return -1===n?void 0:h(ef[e],n,1)[0]}return p(ef[e])},a.removeHooks=function(e){ef[e]=[]},a.removeAllHooks=function(){ef=Q()},a}();e.exports=ee},47835:function(e,t,n){e.exports=self.DOMPurify||(self.DOMPurify=n(47866).default||n(47866))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),i=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:f,iconNode:d,...p}=e;return(0,r.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:n,strokeWidth:i?24*Number(o)/Number(a):o,className:l("lucide",u),...!f&&!c(p)&&{"aria-hidden":"true"},...p},[...d.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(f)?f:[f]])}),f=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:c,...s}=n;return(0,r.createElement)(u,{ref:o,iconNode:t,className:l("lucide-".concat(a(i(e))),"lucide-".concat(e),c),...s})});return n.displayName=i(e),n}},41671:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},99388:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},93807:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]])},42208:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},88964:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},48736:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},49465:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},33245:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},47416:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},74440:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},45675:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},83229:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},18930:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},76865:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17689:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},32489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var r=n(55775),a=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(47043);n(57437),n(2265);let a=r._(n(15602));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,a.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let r=n(18993);function a(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),a=n(2265),o=n(81523),i=n(70049);function l(e){return{default:e&&"default"in e?e.default:e}}let c={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},s=function(e){let t={...c,...e},n=(0,a.lazy)(()=>t.loader().then(l)),s=t.loading;function u(e){let l=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(i.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(a.Suspense,{fallback:l,children:c})}return u.displayName="LoadableComponent",u}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(57437),a=n(20544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,a.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},57792:function(){},57934:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(7085),a=n(41738);let o=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],i={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...o,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...o],h2:[["className","sr-only"]],img:[...o,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...o,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...o],table:[...o],ul:[...o,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},l={}.hasOwnProperty;function c(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":return function(e,t){if(e.schema.allowComments){let e="string"==typeof t.value?t.value:"",n=e.indexOf("-->"),r={type:"comment",value:n<0?e:e.slice(0,n)};return d(r,t),r}}(e,t);case"doctype":return function(e,t){if(e.schema.allowDoctypes){let e={type:"doctype"};return d(e,t),e}}(e,t);case"element":return function(e,t){let n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);let r=s(e,t.children),a=function(e,t){let n;let r=e.stack[e.stack.length-1],a=e.schema.attributes,o=e.schema.required,i=a&&l.call(a,r)?a[r]:void 0,c=a&&l.call(a,"*")?a["*"]:void 0,s=t&&"object"==typeof t?t:{},f={};for(n in s)if(l.call(s,n)){let t=s[n],r=u(e,p(i,n),n,t);null==r&&(r=u(e,p(c,n),n,t)),null!=r&&(f[n]=r)}if(o&&l.call(o,r)){let e=o[r];for(n in e)l.call(e,n)&&!l.call(f,n)&&(f[n]=e[n])}return f}(e,t.properties);e.stack.pop();let o=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&l.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(o=!1;++r<t.length;)e.stack.includes(t[r])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let i={type:"element",tagName:n,properties:a,children:r};return d(i,t),i}(e,t);case"root":return function(e,t){let n={type:"root",children:s(e,t.children)};return d(n,t),n}(e,t);case"text":return function(e,t){let n={type:"text",value:"string"==typeof t.value?t.value:""};return d(n,t),n}(0,t)}}function s(e,t){let n=[];if(Array.isArray(t)){let r=-1;for(;++r<t.length;){let a=c(e,t[r]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function u(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let a=-1,o=[];for(;++a<r.length;){let i=f(e,t,n,r[a]);("number"==typeof i||"string"==typeof i)&&o.push(i)}return o}(e,t,n,r):f(e,t,n,r):void 0}function f(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){let r=e.schema.protocols&&l.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;let a=String(n),o=a.indexOf(":"),i=a.indexOf("?"),c=a.indexOf("#"),s=a.indexOf("/");if(o<0||s>-1&&o>s||i>-1&&o>i||c>-1&&o>c)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(o===e.length&&a.slice(0,e.length)===e)return!0}return!1}(e,n,r)){if("object"==typeof t&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let a=t[n];if(a&&"object"==typeof a&&"flags"in a){if(a.test(String(r))){e=!0;break}}else if(a===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function d(e,t){let n=(0,a.FK)(t);t.data&&(e.data=(0,r.ZP)(t.data)),n&&(e.position=n)}function p(e,t){let n;let r=-1;if(e)for(;++r<e.length;){let a=e[r],o="string"==typeof a?a:a[0];if(o===t)return a;"data*"===o&&(n=a)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}function m(e){return function(t){return function(e,t){let n={type:"root",children:[]},r=c({schema:t?{...i,...t}:i,stack:[]},e);return r&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}(t,e)}}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9325],{47866:function(e){"use strict";let{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:a,getOwnPropertyDescriptor:o}=Object,{freeze:i,seal:l,create:c}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),l||(l=function(e){return e}),s||(s=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return e.apply(t,r)}),u||(u=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let f=N(Array.prototype.forEach),d=N(Array.prototype.lastIndexOf),p=N(Array.prototype.pop),m=N(Array.prototype.push),h=N(Array.prototype.splice),y=N(String.prototype.toLowerCase),g=N(String.prototype.toString),b=N(String.prototype.match),k=N(String.prototype.replace),T=N(String.prototype.indexOf),A=N(String.prototype.trim),v=N(Object.prototype.hasOwnProperty),_=N(RegExp.prototype.test),E=($=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u($,t)});function N(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return s(e,t,r)}}function x(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;n&&n(e,null);let o=t.length;for(;o--;){let n=t[o];if("string"==typeof n){let e=a(n);e!==n&&(r(t)||(t[o]=e),n=e)}e[n]=!0}return e}function S(e){let n=c(null);for(let[r,a]of t(e))v(e,r)&&(Array.isArray(a)?n[r]=function(e){for(let t=0;t<e.length;t++)v(e,t)||(e[t]=null);return e}(a):a&&"object"==typeof a&&a.constructor===Object?n[r]=S(a):n[r]=a);return n}function w(e,t){for(;null!==e;){let n=o(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=a(e)}return function(){return null}}let M=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),R=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=i(["#text"]),P=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=l(/<%[\w\W]*|[\w\W]*%>/gm),Z=l(/\$\{[\w\W]*/gm),B=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),W=l(/^aria-[\-\w]+$/),G=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=l(/^(?:\w+script|data):/i),Y=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=l(/^html$/i);var $,K=Object.freeze({__proto__:null,ARIA_ATTR:W,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:l(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:B,DOCTYPE_NAME:V,ERB_EXPR:F,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:H,TMPLIT_EXPR:Z});let X={element:1,text:3,progressingInstruction:7,comment:8,document:9},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Q=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var ee=function e(){let n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,a=t=>e(t);if(a.version="3.3.1",a.removed=[],!r||!r.document||r.document.nodeType!==X.document||!r.Element)return a.isSupported=!1,a;let{document:o}=r,l=o,s=l.currentScript,{DocumentFragment:u,HTMLTemplateElement:N,Node:H,Element:F,NodeFilter:Z,NamedNodeMap:B=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:W,DOMParser:q,trustedTypes:Y}=r,$=F.prototype,ee=w($,"cloneNode"),et=w($,"remove"),en=w($,"nextSibling"),er=w($,"childNodes"),ea=w($,"parentNode");if("function"==typeof N){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let eo="",{implementation:ei,createNodeIterator:el,createDocumentFragment:ec,getElementsByTagName:es}=o,{importNode:eu}=l,ef=Q();a.isSupported="function"==typeof t&&"function"==typeof ea&&ei&&void 0!==ei.createHTMLDocument;let{MUSTACHE_EXPR:ed,ERB_EXPR:ep,TMPLIT_EXPR:em,DATA_ATTR:eh,ARIA_ATTR:ey,IS_SCRIPT_OR_DATA:eg,ATTR_WHITESPACE:eb,CUSTOM_ELEMENT:ek}=K,{IS_ALLOWED_URI:eT}=K,eA=null,ev=x({},[...M,...C,...O,...L,...I]),e_=null,eE=x({},[...P,...z,...U,...j]),eN=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ex=null,eS=null,ew=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eM=!0,eC=!0,eO=!1,eD=!0,eL=!1,eR=!0,eI=!1,eP=!1,ez=!1,eU=!1,ej=!1,eH=!1,eF=!0,eZ=!1,eB=!0,eW=!1,eG={},eq=null,eY=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eV=null,e$=x({},["audio","video","img","source","image","track"]),eK=null,eX=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eJ="http://www.w3.org/1998/Math/MathML",eQ="http://www.w3.org/2000/svg",e0="http://www.w3.org/1999/xhtml",e1=e0,e2=!1,e7=null,e4=x({},[eJ,eQ,e0],g),e5=x({},["mi","mo","mn","ms","mtext"]),e3=x({},["annotation-xml"]),e6=x({},["title","style","font","a","script"]),e8=null,e9=["application/xhtml+xml","text/html"],te=null,tt=null,tn=o.createElement("form"),tr=function(e){return e instanceof RegExp||e instanceof Function},ta=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),te="application/xhtml+xml"===(e8=-1===e9.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?g:y,eA=v(e,"ALLOWED_TAGS")?x({},e.ALLOWED_TAGS,te):ev,e_=v(e,"ALLOWED_ATTR")?x({},e.ALLOWED_ATTR,te):eE,e7=v(e,"ALLOWED_NAMESPACES")?x({},e.ALLOWED_NAMESPACES,g):e4,eK=v(e,"ADD_URI_SAFE_ATTR")?x(S(eX),e.ADD_URI_SAFE_ATTR,te):eX,eV=v(e,"ADD_DATA_URI_TAGS")?x(S(e$),e.ADD_DATA_URI_TAGS,te):e$,eq=v(e,"FORBID_CONTENTS")?x({},e.FORBID_CONTENTS,te):eY,ex=v(e,"FORBID_TAGS")?x({},e.FORBID_TAGS,te):S({}),eS=v(e,"FORBID_ATTR")?x({},e.FORBID_ATTR,te):S({}),eG=!!v(e,"USE_PROFILES")&&e.USE_PROFILES,eM=!1!==e.ALLOW_ARIA_ATTR,eC=!1!==e.ALLOW_DATA_ATTR,eO=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eD=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eL=e.SAFE_FOR_TEMPLATES||!1,eR=!1!==e.SAFE_FOR_XML,eI=e.WHOLE_DOCUMENT||!1,eU=e.RETURN_DOM||!1,ej=e.RETURN_DOM_FRAGMENT||!1,eH=e.RETURN_TRUSTED_TYPE||!1,ez=e.FORCE_BODY||!1,eF=!1!==e.SANITIZE_DOM,eZ=e.SANITIZE_NAMED_PROPS||!1,eB=!1!==e.KEEP_CONTENT,eW=e.IN_PLACE||!1,eT=e.ALLOWED_URI_REGEXP||G,e1=e.NAMESPACE||e0,e5=e.MATHML_TEXT_INTEGRATION_POINTS||e5,e3=e.HTML_INTEGRATION_POINTS||e3,eN=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(eN.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(eN.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(eN.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eL&&(eC=!1),ej&&(eU=!0),eG&&(eA=x({},I),e_=[],!0===eG.html&&(x(eA,M),x(e_,P)),!0===eG.svg&&(x(eA,C),x(e_,z),x(e_,j)),!0===eG.svgFilters&&(x(eA,O),x(e_,z),x(e_,j)),!0===eG.mathMl&&(x(eA,L),x(e_,U),x(e_,j))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ew.tagCheck=e.ADD_TAGS:(eA===ev&&(eA=S(eA)),x(eA,e.ADD_TAGS,te))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ew.attributeCheck=e.ADD_ATTR:(e_===eE&&(e_=S(e_)),x(e_,e.ADD_ATTR,te))),e.ADD_URI_SAFE_ATTR&&x(eK,e.ADD_URI_SAFE_ATTR,te),e.FORBID_CONTENTS&&(eq===eY&&(eq=S(eq)),x(eq,e.FORBID_CONTENTS,te)),e.ADD_FORBID_CONTENTS&&(eq===eY&&(eq=S(eq)),x(eq,e.ADD_FORBID_CONTENTS,te)),eB&&(eA["#text"]=!0),eI&&x(eA,["html","head","body"]),eA.table&&(x(eA,["tbody"]),delete ex.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');eo=(n=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===n&&(n=J(Y,s)),null!==n&&"string"==typeof eo&&(eo=n.createHTML(""));i&&i(e),tt=e}},to=x({},[...C,...O,...D]),ti=x({},[...L,...R]),tl=function(e){let t=ea(e);t&&t.tagName||(t={namespaceURI:e1,tagName:"template"});let n=y(e.tagName),r=y(t.tagName);return!!e7[e.namespaceURI]&&(e.namespaceURI===eQ?t.namespaceURI===e0?"svg"===n:t.namespaceURI===eJ?"svg"===n&&("annotation-xml"===r||e5[r]):!!to[n]:e.namespaceURI===eJ?t.namespaceURI===e0?"math"===n:t.namespaceURI===eQ?"math"===n&&e3[r]:!!ti[n]:e.namespaceURI===e0?(t.namespaceURI!==eQ||!!e3[r])&&(t.namespaceURI!==eJ||!!e5[r])&&!ti[n]&&(e6[n]||!to[n]):"application/xhtml+xml"===e8&&!!e7[e.namespaceURI])},tc=function(e){m(a.removed,{element:e});try{ea(e).removeChild(e)}catch(t){et(e)}},ts=function(e,t){try{m(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e){if(eU||ej)try{tc(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}},tu=function(e){let t=null,r=null;if(ez)e="<remove></remove>"+e;else{let t=b(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===e8&&e1===e0&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let a=n?n.createHTML(e):e;if(e1===e0)try{t=new q().parseFromString(a,e8)}catch(e){}if(!t||!t.documentElement){t=ei.createDocument(e1,"template",null);try{t.documentElement.innerHTML=e2?eo:a}catch(e){}}let i=t.body||t.documentElement;return(e&&r&&i.insertBefore(o.createTextNode(r),i.childNodes[0]||null),e1===e0)?es.call(t,eI?"html":"body")[0]:eI?t.documentElement:i},tf=function(e){return el.call(e.ownerDocument||e,e,Z.SHOW_ELEMENT|Z.SHOW_COMMENT|Z.SHOW_TEXT|Z.SHOW_PROCESSING_INSTRUCTION|Z.SHOW_CDATA_SECTION,null)},td=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof B)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tp=function(e){return"function"==typeof H&&e instanceof H};function tm(e,t,n){f(e,e=>{e.call(a,t,n,tt)})}let th=function(e){let t=null;if(tm(ef.beforeSanitizeElements,e,null),td(e))return tc(e),!0;let n=te(e.nodeName);if(tm(ef.uponSanitizeElement,e,{tagName:n,allowedTags:eA}),eR&&e.hasChildNodes()&&!tp(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent)||e.nodeType===X.progressingInstruction||eR&&e.nodeType===X.comment&&_(/<[/\w]/g,e.data))return tc(e),!0;if(!(ew.tagCheck instanceof Function&&ew.tagCheck(n))&&(!eA[n]||ex[n])){if(!ex[n]&&tg(n)&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,n)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(n)))return!1;if(eB&&!eq[n]){let t=ea(e)||e.parentNode,n=er(e)||e.childNodes;if(n&&t){let r=n.length;for(let a=r-1;a>=0;--a){let r=ee(n[a],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,en(e))}}}return tc(e),!0}return e instanceof F&&!tl(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&_(/<\/no(script|embed|frames)/i,e.innerHTML)?(tc(e),!0):(eL&&e.nodeType===X.text&&(t=e.textContent,f([ed,ep,em],e=>{t=k(t,e," ")}),e.textContent!==t&&(m(a.removed,{element:e.cloneNode()}),e.textContent=t)),tm(ef.afterSanitizeElements,e,null),!1)},ty=function(e,t,n){if(eF&&("id"===t||"name"===t)&&(n in o||n in tn))return!1;if(eC&&!eS[t]&&_(eh,t));else if(eM&&_(ey,t));else if(ew.attributeCheck instanceof Function&&ew.attributeCheck(t,e));else if(!e_[t]||eS[t]){if(!(tg(e)&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,e)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(e))&&(eN.attributeNameCheck instanceof RegExp&&_(eN.attributeNameCheck,t)||eN.attributeNameCheck instanceof Function&&eN.attributeNameCheck(t,e))||"is"===t&&eN.allowCustomizedBuiltInElements&&(eN.tagNameCheck instanceof RegExp&&_(eN.tagNameCheck,n)||eN.tagNameCheck instanceof Function&&eN.tagNameCheck(n))))return!1}else if(eK[t]);else if(_(eT,k(n,eb,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===T(n,"data:")&&eV[e]);else if(eO&&!_(eg,k(n,eb,"")));else if(n)return!1;return!0},tg=function(e){return"annotation-xml"!==e&&b(e,ek)},tb=function(e){tm(ef.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||td(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:e_,forceKeepAttr:void 0},o=t.length;for(;o--;){let{name:i,namespaceURI:l,value:c}=t[o],s=te(i),u="value"===i?c:A(c);if(r.attrName=s,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,tm(ef.uponSanitizeAttribute,e,r),u=r.attrValue,eZ&&("id"===s||"name"===s)&&(ts(i,e),u="user-content-"+u),eR&&_(/((--!?|])>)|<\/(style|title|textarea)/i,u)||"attributename"===s&&b(u,"href")){ts(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr||!eD&&_(/\/>/i,u)){ts(i,e);continue}eL&&f([ed,ep,em],e=>{u=k(u,e," ")});let d=te(e.nodeName);if(!ty(d,s,u)){ts(i,e);continue}if(n&&"object"==typeof Y&&"function"==typeof Y.getAttributeType){if(l);else switch(Y.getAttributeType(d,s)){case"TrustedHTML":u=n.createHTML(u);break;case"TrustedScriptURL":u=n.createScriptURL(u)}}if(u!==c)try{l?e.setAttributeNS(l,i,u):e.setAttribute(i,u),td(e)?tc(e):p(a.removed)}catch(t){ts(i,e)}}tm(ef.afterSanitizeAttributes,e,null)},tk=function e(t){let n=null,r=tf(t);for(tm(ef.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)tm(ef.uponSanitizeShadowNode,n,null),th(n),tb(n),n.content instanceof u&&e(n.content);tm(ef.afterSanitizeShadowDOM,t,null)};return a.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,i=null,c=null;if((e2=!e)&&(e="<!-->"),"string"!=typeof e&&!tp(e)){if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}else throw E("toString is not a function")}if(!a.isSupported)return e;if(eP||ta(t),a.removed=[],"string"==typeof e&&(eW=!1),eW){if(e.nodeName){let t=te(e.nodeName);if(!eA[t]||ex[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof H)(o=(r=tu("<!---->")).ownerDocument.importNode(e,!0)).nodeType===X.element&&"BODY"===o.nodeName?r=o:"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!eU&&!eL&&!eI&&-1===e.indexOf("<"))return n&&eH?n.createHTML(e):e;if(!(r=tu(e)))return eU?null:eH?eo:""}r&&ez&&tc(r.firstChild);let s=tf(eW?e:r);for(;i=s.nextNode();)th(i),tb(i),i.content instanceof u&&tk(i.content);if(eW)return e;if(eU){if(ej)for(c=ec.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(e_.shadowroot||e_.shadowrootmode)&&(c=eu.call(l,c,!0)),c}let d=eI?r.outerHTML:r.innerHTML;return eI&&eA["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(V,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),eL&&f([ed,ep,em],e=>{d=k(d,e," ")}),n&&eH?n.createHTML(d):d},a.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ta(e),eP=!0},a.clearConfig=function(){tt=null,eP=!1},a.isValidAttribute=function(e,t,n){return tt||ta({}),ty(te(e),te(t),n)},a.addHook=function(e,t){"function"==typeof t&&m(ef[e],t)},a.removeHook=function(e,t){if(void 0!==t){let n=d(ef[e],t);return -1===n?void 0:h(ef[e],n,1)[0]}return p(ef[e])},a.removeHooks=function(e){ef[e]=[]},a.removeAllHooks=function(){ef=Q()},a}();e.exports=ee},47835:function(e,t,n){e.exports=self.DOMPurify||(self.DOMPurify=n(47866).default||n(47866))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),i=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:f,iconNode:d,...p}=e;return(0,r.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:n,strokeWidth:i?24*Number(o)/Number(a):o,className:l("lucide",u),...!f&&!c(p)&&{"aria-hidden":"true"},...p},[...d.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(f)?f:[f]])}),f=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:c,...s}=n;return(0,r.createElement)(u,{ref:o,iconNode:t,className:l("lucide-".concat(a(i(e))),"lucide-".concat(e),c),...s})});return n.displayName=i(e),n}},41671:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},99388:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},93807:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]])},78867:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},42208:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},88964:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},48736:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},49465:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},33245:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},47416:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},74440:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},45675:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},83229:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},18930:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},76865:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17689:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},32489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var r=n(55775),a=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(47043);n(57437),n(2265);let a=r._(n(15602));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,a.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let r=n(18993);function a(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),a=n(2265),o=n(81523),i=n(70049);function l(e){return{default:e&&"default"in e?e.default:e}}let c={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},s=function(e){let t={...c,...e},n=(0,a.lazy)(()=>t.loader().then(l)),s=t.loading;function u(e){let l=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(i.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(a.Suspense,{fallback:l,children:c})}return u.displayName="LoadableComponent",u}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(57437),a=n(20544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,a.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},57792:function(){},57934:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(7085),a=n(41738);let o=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],i={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...o,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...o],h2:[["className","sr-only"]],img:[...o,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...o,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...o],table:[...o],ul:[...o,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},l={}.hasOwnProperty;function c(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":return function(e,t){if(e.schema.allowComments){let e="string"==typeof t.value?t.value:"",n=e.indexOf("-->"),r={type:"comment",value:n<0?e:e.slice(0,n)};return d(r,t),r}}(e,t);case"doctype":return function(e,t){if(e.schema.allowDoctypes){let e={type:"doctype"};return d(e,t),e}}(e,t);case"element":return function(e,t){let n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);let r=s(e,t.children),a=function(e,t){let n;let r=e.stack[e.stack.length-1],a=e.schema.attributes,o=e.schema.required,i=a&&l.call(a,r)?a[r]:void 0,c=a&&l.call(a,"*")?a["*"]:void 0,s=t&&"object"==typeof t?t:{},f={};for(n in s)if(l.call(s,n)){let t=s[n],r=u(e,p(i,n),n,t);null==r&&(r=u(e,p(c,n),n,t)),null!=r&&(f[n]=r)}if(o&&l.call(o,r)){let e=o[r];for(n in e)l.call(e,n)&&!l.call(f,n)&&(f[n]=e[n])}return f}(e,t.properties);e.stack.pop();let o=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&l.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(o=!1;++r<t.length;)e.stack.includes(t[r])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let i={type:"element",tagName:n,properties:a,children:r};return d(i,t),i}(e,t);case"root":return function(e,t){let n={type:"root",children:s(e,t.children)};return d(n,t),n}(e,t);case"text":return function(e,t){let n={type:"text",value:"string"==typeof t.value?t.value:""};return d(n,t),n}(0,t)}}function s(e,t){let n=[];if(Array.isArray(t)){let r=-1;for(;++r<t.length;){let a=c(e,t[r]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function u(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let a=-1,o=[];for(;++a<r.length;){let i=f(e,t,n,r[a]);("number"==typeof i||"string"==typeof i)&&o.push(i)}return o}(e,t,n,r):f(e,t,n,r):void 0}function f(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){let r=e.schema.protocols&&l.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;let a=String(n),o=a.indexOf(":"),i=a.indexOf("?"),c=a.indexOf("#"),s=a.indexOf("/");if(o<0||s>-1&&o>s||i>-1&&o>i||c>-1&&o>c)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(o===e.length&&a.slice(0,e.length)===e)return!0}return!1}(e,n,r)){if("object"==typeof t&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let a=t[n];if(a&&"object"==typeof a&&"flags"in a){if(a.test(String(r))){e=!0;break}}else if(a===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function d(e,t){let n=(0,a.FK)(t);t.data&&(e.data=(0,r.ZP)(t.data)),n&&(e.position=n)}function p(e,t){let n;let r=-1;if(e)for(;++r<e.length;){let a=e[r],o="string"==typeof a?a:a[0];if(o===t)return a;"data*"===o&&(n=a)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}function m(e){return function(t){return function(e,t){let n={type:"root",children:[]},r=c({schema:t?{...i,...t}:i,stack:[]},e);return r&&(Array.isArray(r)?1===r.length?n=r[0]:n.children=r:n=r),n}(t,e)}}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5441],{20084:function(e,r,s){Promise.resolve().then(s.bind(s,50653))},50653:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return d}});var n=s(57437),t=s(2265),a=s(99376),o=s(10789),l=s(53012),c=s(23260),i=s(12158);function d(){let e=(0,a.useRouter)(),r=(0,a.useParams)(),s=r.id,d=r.path.join("/"),[m,x]=(0,t.useState)(null),[u,h]=(0,t.useState)(!0),[p,g]=(0,t.useState)(null),b=(null==m?void 0:m.extension)==="md"||(null==m?void 0:m.extension)==="markdown";return(0,t.useEffect)(()=>{(async()=>{h(!0),g(null);try{let e=await fetch("/api/worktrees/".concat(s,"/files/").concat(d));if(!e.ok){let r=await e.json();throw Error(r.error||"Failed to load file")}let r=await e.json();x(r)}catch(e){g(e instanceof Error?e.message:"Failed to load file")}finally{h(!1)}})()},[s,d]),(0,n.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,n.jsx)("div",{className:"sticky top-0 z-10 bg-white border-b border-gray-200 shadow-sm",children:(0,n.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center gap-3",children:[(0,n.jsxs)("button",{onClick:()=>e.back(),className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors","aria-label":"戻る",children:[(0,n.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"戻る"})]}),(0,n.jsx)("div",{className:"flex-1 min-w-0",children:(0,n.jsx)("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:d})})]})}),(0,n.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[u&&(0,n.jsx)(o.Zb,{padding:"lg",children:(0,n.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,n.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),(0,n.jsx)("p",{className:"ml-3 text-gray-600",children:"Loading file..."})]})}),p&&(0,n.jsx)(o.Zb,{padding:"lg",children:(0,n.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("svg",{className:"w-5 h-5 text-red-600 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,n.jsx)("p",{className:"text-sm text-red-800",children:p})]})})}),m&&!u&&!p&&(0,n.jsxs)(o.Zb,{padding:"none",children:[(0,n.jsx)("div",{className:"bg-gray-100 px-4 py-3 border-b border-gray-200",children:(0,n.jsxs)("p",{className:"text-xs text-gray-600 font-mono break-all",children:[m.worktreePath,"/",m.path]})}),(0,n.jsx)("div",{className:"p-6 sm:p-8 bg-white",children:b?(0,n.jsx)("div",{className:"prose prose-slate max-w-none prose-headings:font-semibold prose-h1:text-3xl prose-h1:border-b prose-h1:pb-2 prose-h2:text-2xl prose-h2:border-b prose-h2:pb-2 prose-h3:text-xl prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline prose-pre:bg-gray-100 prose-pre:border prose-pre:border-gray-200 prose-code:text-sm prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-img:rounded-lg prose-img:shadow-md",children:(0,n.jsx)(l.UG,{remarkPlugins:[c.Z],rehypePlugins:[i.Z],components:{code:e=>{let{inline:r,className:s,children:t,...a}=e;return r?(0,n.jsx)("code",{className:"bg-gray-100 text-gray-800 px-1.5 py-0.5 rounded text-sm font-mono",...a,children:t}):(0,n.jsx)("code",{className:s,...a,children:t})},pre:e=>{let{children:r}=e;return(0,n.jsx)("pre",{className:"bg-gray-50 border border-gray-200 rounded-md p-4 overflow-x-auto",children:r})},table:e=>{let{children:r}=e;return(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsx)("table",{className:"border-collapse border border-gray-300",children:r})})},th:e=>{let{children:r}=e;return(0,n.jsx)("th",{className:"border border-gray-300 bg-gray-100 px-4 py-2 text-left font-semibold",children:r})},td:e=>{let{children:r}=e;return(0,n.jsx)("td",{className:"border border-gray-300 px-4 py-2",children:r})},blockquote:e=>{let{children:r}=e;return(0,n.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-700",children:r})}},children:m.content})}):(0,n.jsx)("pre",{className:"bg-gray-50 border border-gray-200 rounded-md p-4 overflow-x-auto text-sm",children:(0,n.jsx)("code",{className:"language-".concat(m.extension),children:m.content})})})]})]})]})}},98702:function(e,r,s){"use strict";s.d(r,{u:function(){return a}});var n=s(57437),t=s(2265);function a(e){let{isOpen:r,onClose:s,title:a,children:o,size:l="lg",showCloseButton:c=!0,disableClose:i=!1}=e,d=(0,t.useRef)(null);return((0,t.useEffect)(()=>{if(i)return;let e=e=>{"Escape"===e.key&&r&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,s,i]),(0,t.useEffect)(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),r)?(0,n.jsxs)("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:i?void 0:s}),(0,n.jsx)("div",{className:"flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,n.jsxs)("div",{ref:d,className:"relative w-full ".concat({sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[l]," bg-white rounded-lg shadow-xl transform transition-all"),children:[(a||c)&&(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200",children:[(0,n.jsx)("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 truncate pr-2",children:a}),c&&(0,n.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,n.jsx)("div",{className:"px-4 sm:px-6 py-3 sm:py-4",children:o})]})})]}):null}},10789:function(e,r,s){"use strict";s.d(r,{Ct:function(){return i},zx:function(){return t},Zb:function(){return a},aY:function(){return c},Ol:function(){return o},ll:function(){return l},u_:function(){return d.u}});var n=s(57437);function t(e){let{variant:r="primary",size:s="md",fullWidth:t=!1,loading:a=!1,disabled:o,className:l="",children:c,...i}=e,d=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[r],{sm:"btn-sm",md:"",lg:"btn-lg"}[s],t?"w-full":"",o||a?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ");return(0,n.jsxs)("button",{className:d,disabled:o||a,...i,children:[a&&(0,n.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),c]})}function a(e){let{hover:r=!1,padding:s="md",className:t="",children:a,...o}=e,l=["card",r?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[s],t].filter(Boolean).join(" ");return(0,n.jsx)("div",{className:l,...o,children:a})}function o(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("div",{className:"mb-3 ".concat(r),...t,children:s})}function l(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-900 ".concat(r),...t,children:s})}function c(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("div",{className:r,...t,children:s})}function i(e){let{variant:r="gray",dot:s=!1,className:t="",children:a,...o}=e,l=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[r],t].filter(Boolean).join(" ");return(0,n.jsxs)("span",{className:l,...o,children:[s&&(0,n.jsx)("span",{className:"mr-1.5 inline-block h-2 w-2 rounded-full ".concat({success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[r]),"aria-hidden":"true"}),a]})}s(2265);var d=s(98702)}},function(e){e.O(0,[4851,2971,2117,1744],function(){return e(e.s=20084)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5441],{20084:function(e,r,s){Promise.resolve().then(s.bind(s,50653))},50653:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return d}});var n=s(57437),t=s(2265),a=s(99376),o=s(10789),l=s(53012),c=s(23260),i=s(12158);function d(){let e=(0,a.useRouter)(),r=(0,a.useParams)(),s=r.id,d=r.path.join("/"),[m,x]=(0,t.useState)(null),[u,h]=(0,t.useState)(!0),[p,g]=(0,t.useState)(null),b=(null==m?void 0:m.extension)==="md"||(null==m?void 0:m.extension)==="markdown";return(0,t.useEffect)(()=>{(async()=>{h(!0),g(null);try{let e=await fetch("/api/worktrees/".concat(s,"/files/").concat(d));if(!e.ok){let r=await e.json();throw Error(r.error||"Failed to load file")}let r=await e.json();x(r)}catch(e){g(e instanceof Error?e.message:"Failed to load file")}finally{h(!1)}})()},[s,d]),(0,n.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,n.jsx)("div",{className:"sticky top-0 z-10 bg-white border-b border-gray-200 shadow-sm",children:(0,n.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center gap-3",children:[(0,n.jsxs)("button",{onClick:()=>e.back(),className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors","aria-label":"戻る",children:[(0,n.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"戻る"})]}),(0,n.jsx)("div",{className:"flex-1 min-w-0",children:(0,n.jsx)("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:d})})]})}),(0,n.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[u&&(0,n.jsx)(o.Zb,{padding:"lg",children:(0,n.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,n.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),(0,n.jsx)("p",{className:"ml-3 text-gray-600",children:"Loading file..."})]})}),p&&(0,n.jsx)(o.Zb,{padding:"lg",children:(0,n.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("svg",{className:"w-5 h-5 text-red-600 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,n.jsx)("p",{className:"text-sm text-red-800",children:p})]})})}),m&&!u&&!p&&(0,n.jsxs)(o.Zb,{padding:"none",children:[(0,n.jsx)("div",{className:"bg-gray-100 px-4 py-3 border-b border-gray-200",children:(0,n.jsxs)("p",{className:"text-xs text-gray-600 font-mono break-all",children:[m.worktreePath,"/",m.path]})}),(0,n.jsx)("div",{className:"p-6 sm:p-8 bg-white",children:b?(0,n.jsx)("div",{className:"prose prose-slate max-w-none prose-headings:font-semibold prose-h1:text-3xl prose-h1:border-b prose-h1:pb-2 prose-h2:text-2xl prose-h2:border-b prose-h2:pb-2 prose-h3:text-xl prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline prose-pre:bg-gray-100 prose-pre:border prose-pre:border-gray-200 prose-code:text-sm prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-img:rounded-lg prose-img:shadow-md",children:(0,n.jsx)(l.UG,{remarkPlugins:[c.Z],rehypePlugins:[i.Z],components:{code:e=>{let{inline:r,className:s,children:t,...a}=e;return r?(0,n.jsx)("code",{className:"bg-gray-100 text-gray-800 px-1.5 py-0.5 rounded text-sm font-mono",...a,children:t}):(0,n.jsx)("code",{className:s,...a,children:t})},pre:e=>{let{children:r}=e;return(0,n.jsx)("pre",{className:"bg-gray-50 border border-gray-200 rounded-md p-4 overflow-x-auto",children:r})},table:e=>{let{children:r}=e;return(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsx)("table",{className:"border-collapse border border-gray-300",children:r})})},th:e=>{let{children:r}=e;return(0,n.jsx)("th",{className:"border border-gray-300 bg-gray-100 px-4 py-2 text-left font-semibold",children:r})},td:e=>{let{children:r}=e;return(0,n.jsx)("td",{className:"border border-gray-300 px-4 py-2",children:r})},blockquote:e=>{let{children:r}=e;return(0,n.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-700",children:r})}},children:m.content})}):(0,n.jsx)("pre",{className:"bg-gray-50 border border-gray-200 rounded-md p-4 overflow-x-auto text-sm",children:(0,n.jsx)("code",{className:"language-".concat(m.extension),children:m.content})})})]})]})]})}},98702:function(e,r,s){"use strict";s.d(r,{u:function(){return o}});var n=s(57437),t=s(2265),a=s(54887);function o(e){let{isOpen:r,onClose:s,title:o,children:l,size:c="lg",showCloseButton:i=!0,disableClose:d=!1}=e,m=(0,t.useRef)(null);return((0,t.useEffect)(()=>{if(d)return;let e=e=>{"Escape"===e.key&&r&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,s,d]),(0,t.useEffect)(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),r)?(0,a.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[9999] overflow-y-auto",children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:d?void 0:s}),(0,n.jsx)("div",{className:"relative flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,n.jsxs)("div",{ref:m,className:"relative w-full ".concat({sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[c]," max-h-[calc(100vh-1rem)] sm:max-h-[calc(100vh-2rem)] flex flex-col bg-white rounded-lg shadow-xl transform transition-all"),children:[(o||i)&&(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200 flex-shrink-0",children:[(0,n.jsx)("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 truncate pr-2",children:o}),i&&(0,n.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors flex-shrink-0",children:(0,n.jsx)("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,n.jsx)("div",{className:"px-4 sm:px-6 py-3 sm:py-4 overflow-y-auto flex-1 min-h-0",children:l})]})})]}),document.body):null}},10789:function(e,r,s){"use strict";s.d(r,{Ct:function(){return i},zx:function(){return t},Zb:function(){return a},aY:function(){return c},Ol:function(){return o},ll:function(){return l},u_:function(){return d.u}});var n=s(57437);function t(e){let{variant:r="primary",size:s="md",fullWidth:t=!1,loading:a=!1,disabled:o,className:l="",children:c,...i}=e,d=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[r],{sm:"btn-sm",md:"",lg:"btn-lg"}[s],t?"w-full":"",o||a?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ");return(0,n.jsxs)("button",{className:d,disabled:o||a,...i,children:[a&&(0,n.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),c]})}function a(e){let{hover:r=!1,padding:s="md",className:t="",children:a,...o}=e,l=["card",r?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[s],t].filter(Boolean).join(" ");return(0,n.jsx)("div",{className:l,...o,children:a})}function o(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("div",{className:"mb-3 ".concat(r),...t,children:s})}function l(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-900 ".concat(r),...t,children:s})}function c(e){let{className:r="",children:s,...t}=e;return(0,n.jsx)("div",{className:r,...t,children:s})}function i(e){let{variant:r="gray",dot:s=!1,className:t="",children:a,...o}=e,l=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[r],t].filter(Boolean).join(" ");return(0,n.jsxs)("span",{className:l,...o,children:[s&&(0,n.jsx)("span",{className:"mr-1.5 inline-block h-2 w-2 rounded-full ".concat({success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[r]),"aria-hidden":"true"}),a]})}s(2265);var d=s(98702)}},function(e){e.O(0,[4851,2971,2117,1744],function(){return e(e.s=20084)}),_N_E=e.O()}]);