copilot-operator 0.1.90 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/operator.controller.js +26 -0
- package/dist/src/api/operator.service.js +55 -14
- package/dist/src/cli.js +3 -0
- package/dist/src/config/live.js +6 -3
- package/dist/src/config/schema.js +23 -0
- package/dist/src/orchestrator/taskRunner.js +25 -3
- package/dist/src/plan/systemGuide.js +220 -13
- package/dist/src/session/chatNotice.js +4 -1
- package/dist/src/session/chatbotFile.js +117 -0
- package/dist/src/session/events.js +5 -1
- package/dist/src/session/locatorFailures.js +2 -1
- package/dist/src/transport/chatSteps.js +74 -0
- package/dist/src/transport/copilotTransport.js +288 -31
- package/dist/src/transport/keptWindow.js +4 -0
- package/dist/src/transport/locators.js +106 -5
- package/dist/src/transport/pageHtml.js +36 -2
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/{1077.1cc6d439e3dd0fa9.js → 1077.626a11362f53d35c.js} +1 -1
- package/dist/web/_next/static/chunks/{1548.3de9dc874e47558e.js → 1548.79f05ff765581b0a.js} +1 -1
- package/dist/web/_next/static/chunks/{2163.66458fb9c54fb52d.js → 2163.09f1212655504f3a.js} +1 -1
- package/dist/web/_next/static/chunks/{714.cffed2b87154be0f.js → 714.acea3698b6af7a61.js} +1 -1
- package/dist/web/_next/static/chunks/{7220.30b6a3e1bd41e51a.js → 7220.1eba10bd9d449cea.js} +1 -1
- package/dist/web/_next/static/chunks/7921-29256ac683ea4bc5.js +1 -0
- package/dist/web/_next/static/chunks/{8584.36422ed19d6c43e9.js → 8584.b5aac5354f124d4b.js} +1 -1
- package/dist/web/_next/static/chunks/{9067.e579f97591576de2.js → 9067.177163495f3bd8fa.js} +1 -1
- package/dist/web/_next/static/chunks/{9747.11247f0e21542f6d.js → 9747.5b9d763e89abc7e4.js} +1 -1
- package/dist/web/_next/static/chunks/app/layout-1b7d13f7b2efd008.js +1 -0
- package/dist/web/_next/static/chunks/app/settings/page-c92548f9c6318962.js +1 -0
- package/dist/web/_next/static/chunks/{webpack-78ec62098b09e4a0.js → webpack-33252b1a0a7d93ba.js} +1 -1
- package/dist/web/_next/static/css/{d74aa18c98dacdb4.css → 6b92f118889ca88b.css} +1 -1
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +8 -8
- package/dist/web/index.html +3 -3
- package/dist/web/index.txt +9 -9
- package/dist/web/queue.html +2 -2
- package/dist/web/queue.txt +9 -9
- package/dist/web/settings.html +2 -2
- package/dist/web/settings.txt +9 -9
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +9 -9
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/7921-d3a4a261e08950e0.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-7b5fa7c74ecd6939.js +0 -1
- package/dist/web/_next/static/chunks/app/settings/page-7651920337bbb580.js +0 -1
- /package/dist/web/_next/static/{3VkK1sxEugkae88HSFR-i → ZrEcjGdZEXe66UUxUqine}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{3VkK1sxEugkae88HSFR-i → ZrEcjGdZEXe66UUxUqine}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{952:()=>{},1691:(e,t,n)=>{"use strict";n.d(t,{DR:()=>u,J1:()=>m,Lh:()=>d});var a=n(73365),l=n(1521),s=n(1702),i=n(15549),r=n(8205),o=n(87527);function c(e){return"/settings?locator=".concat(encodeURIComponent(e),"#").concat(e.startsWith("step:")?"chat-steps":"chat-locators")}function d(e){let{failure:t,inSettings:n=!1,onDismiss:l}=e,{t:s,locale:o}=(0,r.kj)(),d=(0,r.W3)(),h=t.key.startsWith("step:")?t.name||t.locator:s("chatloc.".concat(t.key));return(0,a.jsxs)("div",{className:"notice ".concat(t.stopped?"":"caution"," locator-failure").trim(),role:"alert","data-locator":t.key,style:{overflowWrap:"anywhere"},children:[!n&&(0,a.jsx)("strong",{children:s(t.stopped?"chatloc.failTitle":"chatloc.warnTitle",{name:h})}),(0,a.jsxs)("p",{className:"small",style:{margin:"4px 0"},children:[s("chatloc.failWhen",{when:d(t.at)})," ",(0,a.jsx)("code",{className:"picker-example",children:t.locator})]}),t.why&&(0,a.jsx)("p",{className:"muted small",style:{margin:"4px 0"},children:t.why}),(0,a.jsxs)("div",{className:"row",style:{marginTop:6},children:[(0,a.jsx)("a",{className:"button-link",href:i.FH.locatorChatbotUrl(t.key,o),download:!0,"data-chatbot-file":!0,children:s("chatloc.file")}),!n&&(0,a.jsx)("a",{className:"button-link",href:c(t.key),children:s("chatloc.fix")}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:l,children:s("chatloc.dismiss")})]}),(0,a.jsx)("p",{className:"why",children:s("chatloc.how")})]})}let h="cop.locatorFailure.opened";function u(){let[e,t]=(0,l.useState)([]),n=async()=>{await i.FH.locatorFailures().then(e=>t(e.filter(e=>!e.changed))).catch(()=>void 0)};return(0,o.z)(n,5e3),{list:e,dismiss:async e=>{t(t=>t.filter(t=>t.key!==e)),await i.FH.dismissLocatorFailure(e).catch(()=>void 0)},reload:n}}function m(){let e=(0,s.usePathname)(),{list:t,dismiss:n}=u(),i="/settings"===e||"/settings/"===e;return((0,l.useEffect)(()=>{if(i)return;let e=t.find(e=>e.stopped);if(!e)return;let n="".concat(e.key,"@").concat(e.at),a=function(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(h))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}();if(!a.includes(n)){try{window.localStorage.setItem(h,JSON.stringify([...a,n].slice(-50)))}catch(e){return}window.location.assign(c(e.key))}},[t,i]),i||0===t.length)?null:(0,a.jsx)("div",{style:{marginBottom:12},children:t.map(e=>(0,a.jsx)(d,{failure:e,onDismiss:()=>void n(e.key)},e.key))})}},19050:(e,t,n)=>{"use strict";n.d(t,{Shell:()=>M});var a=n(73365),l=n(18197),s=n.n(l),i=n(1702),r=n(16752),o=n(36657),c=n(1521),d=n(98196),h=n(8205);let u={w:560,h:110};function m(e){if(0===e.getClientRects().length)return null;let t=e.getBoundingClientRect(),[n,a,l,s]=[t.left,t.top,t.right,t.bottom];for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){let e=window.getComputedStyle(t);if("visible"===e.overflowX&&"visible"===e.overflowY)continue;let i=t.getBoundingClientRect();[n,a,l,s]=[Math.max(n,i.left),Math.max(a,i.top),Math.min(l,i.right),Math.min(s,i.bottom)]}return[n,a,l,s]=[Math.max(n,0),Math.max(a,0),Math.min(l,window.innerWidth),Math.min(s,window.innerHeight)],l-n<4||s-a<4?null:{x:n,y:a,w:l-n,h:s-a}}function w(){let{t:e}=(0,h.kj)(),[t,n]=(0,c.useState)(0),[l,s]=(0,c.useState)([]),[i,r]=(0,c.useState)({w:0,h:0}),o=(0,c.useRef)(new Set);return((0,c.useEffect)(()=>{let e=()=>{let e=[...document.querySelectorAll("[data-awaits]")].filter(e=>e.getClientRects().length>0&&!e.closest("[data-kerrigan-thinking]"));for(let l of(n(e.length),e)){var t,a;let e=null!=(t=l.dataset.awaits)?t:"";o.current.has(e)||(o.current.add(e),l.closest("[data-follow]")||(null!=(a=l.closest("[data-awaits-frame]"))?a:l).scrollIntoView({block:"nearest"}),!function(){let e=document.activeElement;return e instanceof HTMLElement&&(e.isContentEditable||e.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]), textarea, select'))}()&&l.focus({preventScroll:!0}))}},t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-awaits","hidden","data-kerrigan-thinking"]}),e(),()=>t.disconnect()},[]),(0,c.useEffect)(()=>{if(0===t)return void s([]);let e=0,n=()=>{let t=[...document.querySelectorAll("[data-awaits]")].filter(e=>!e.closest("[data-kerrigan-thinking]")).map(m).filter(e=>null!==e);s(e=>e.length===t.length&&e.every((e,n)=>.5>Math.abs(e.x-t[n].x)&&.5>Math.abs(e.y-t[n].y)&&.5>Math.abs(e.w-t[n].w)&&.5>Math.abs(e.h-t[n].h))?e:t),r(e=>e.w===window.innerWidth&&e.h===window.innerHeight?e:{w:window.innerWidth,h:window.innerHeight}),e=requestAnimationFrame(n)};return n(),()=>cancelAnimationFrame(e)},[t]),0===t||"undefined"==typeof document)?null:(0,d.createPortal)((0,a.jsxs)("div",{className:"awaiting",children:[(0,a.jsxs)("svg",{className:"awaiting-dim",width:i.w,height:i.h,"aria-hidden":"true",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("mask",{id:"awaiting-holes",children:[(0,a.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),l.map((e,t)=>(0,a.jsx)("rect",{x:e.x-6,y:e.y-6,width:e.w+12,height:e.h+12,rx:"12",fill:"black"},t))]})}),(0,a.jsx)("rect",{className:"awaiting-shade",width:"100%",height:"100%",mask:"url(#awaiting-holes)"}),l.map((e,t)=>(0,a.jsx)("rect",{className:"awaiting-ring",x:e.x-6,y:e.y-6,width:e.w+12,height:e.h+12,rx:"12"},t))]}),(0,a.jsxs)("p",{className:"awaiting-label",role:"status",style:function(e,t,n){let a,l,s=Math.min(u.w,t-32),i=(e,t)=>({left:e,top:t,maxWidth:s});if(a=t/2,l=n/2,!e.some(e=>{let t,n;return t={x:a-s/2,y:l-u.h/2,w:s,h:u.h},n={x:e.x-6,y:e.y-6,w:e.w+12,h:e.h+12},t.x<n.x+n.w&&n.x<t.x+t.w&&t.y<n.y+n.h&&n.y<t.y+t.h}))return i(t/2,n/2);let r=Math.min(...e.map(e=>e.x))-6,o=t-Math.max(...e.map(e=>e.x+e.w))-6,c=Math.min(...e.map(e=>e.y))-6,d=n-Math.max(...e.map(e=>e.y+e.h))-6,h=[{fits:r>=s+32,size:r,place:()=>i(r/2,n/2)},{fits:o>=s+32,size:o,place:()=>i(t-o/2,n/2)},{fits:c>=u.h+32,size:c,place:()=>i(t/2,c/2)},{fits:d>=u.h+32,size:d,place:()=>i(t/2,n-d/2)}].filter(e=>e.fits);return h.length>0?h.sort((e,t)=>t.size-e.size)[0].place():i(t/2,u.h/2+16)}(l,i.w||window.innerWidth,i.h||window.innerHeight),children:[(0,a.jsx)("span",{className:"awaiting-dot","aria-hidden":"true"}),e("awaiting.title")]})]}),document.body)}var f=n(15549);function x(){let{t:e}=(0,h.kj)(),[t,n]=(0,c.useState)(null),l=(0,c.useRef)(null);return((0,c.useEffect)(()=>{let e=(0,f._G)(e=>{0!==e.running&&e.now.length+e.next.length+e.window.length!==0&&(n(e),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>n(null),9e3))});return()=>{e(),l.current&&clearTimeout(l.current)}},[]),t)?(0,a.jsxs)("div",{className:"settings-taken",role:"status","data-testid":"settings-taken",children:[(0,a.jsxs)("div",{className:"settings-taken-lines",children:[t.now.length>0&&(0,a.jsx)("p",{className:"settings-taken-now",children:e("live.now")}),t.next.length>0&&(0,a.jsx)("p",{children:e("live.next")}),t.window.length>0&&(0,a.jsx)("p",{children:e("live.window")})]}),(0,a.jsx)("button",{type:"button",className:"wb-icon-btn","aria-label":e("live.close"),title:e("live.close"),onClick:()=>n(null),children:"✕"})]}):null}var g=n(61238);let p="cop.done.seen";function y(){let{t:e}=(0,h.kj)(),t=(0,g.v)(),[n,l]=(0,c.useState)(""),[s,i]=(0,c.useState)(!1);(0,c.useEffect)(()=>l(function(){try{var e;return null!=(e=localStorage.getItem(p))?e:""}catch(e){return""}}()),[]),(0,c.useEffect)(()=>{let e=()=>i(null!==document.querySelector("[data-awaits]"));e();let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-awaits"]}),()=>t.disconnect()},[]);let r=!t||t.running||t.starting||t.queue||!t.last||"aborted"===t.last.status?null:t.last,o=null!==r&&r.at!==n&&!s;if((0,c.useEffect)(()=>{if(!o||!r)return;let e=()=>{l(r.at);try{localStorage.setItem(p,r.at)}catch(e){}};return window.addEventListener("pointerdown",e,!0),window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("pointerdown",e,!0),window.removeEventListener("keydown",e,!0)}},[o,r]),!o||!r||"undefined"==typeof document)return null;let u="done"===r.status;return(0,d.createPortal)((0,a.jsxs)("p",{className:u?"done-label":"done-label done-label-ended",role:"status","data-testid":"done-label",children:[u&&(0,a.jsx)("span",{className:"done-mark","aria-hidden":"true",children:"✓"}),u?e("done.label"):e("done.ended",{status:e("status.".concat(r.status))})]}),document.body)}var b=n(87527);function j(e){var t,n;let{failure:l,reason:s,onDismiss:i,intro:r,children:o}=e,{t:c}=(0,h.kj)(),d=(0,h.W3)(),u=null!=(n=null!=(t=null==l?void 0:l.message)?t:s)?n:"";return(0,a.jsxs)("div",{className:"notice caution start-failure",role:"alert",style:{overflowWrap:"anywhere"},children:[r&&(0,a.jsx)("p",{className:"small",style:{marginTop:0},children:r}),(0,a.jsx)("strong",{children:c("startfail.title")}),l&&(0,a.jsx)("p",{className:"small",style:{margin:"4px 0"},children:c("startfail.where",{stage:c("startfail.stage.".concat(l.stage))})}),(0,a.jsx)("pre",{className:"sync-cmd small",style:{margin:"6px 0"},children:u}),o,l&&(0,a.jsxs)("p",{className:"muted small",style:{margin:"4px 0"},children:[l.runId?c("startfail.when",{when:d(l.at),run:l.runId}):c("startfail.whenNoRun",{when:d(l.at)}),l.sessions.length>0?" \xb7 ".concat(l.sessions.map(e=>'"'.concat(e,'"')).join(", ")):""]}),(0,a.jsxs)("div",{className:"row",style:{marginTop:6},children:[l&&(0,a.jsx)("a",{className:"button-link",href:f.FH.startFailureUrl(l.id),download:!0,children:c("startfail.download")}),(0,a.jsx)("a",{className:l?"button-link":"button-link plain",href:f.FH.terminalUrl(),download:!0,children:c("startfail.terminal")}),i&&(0,a.jsx)("button",{type:"button",className:"quiet",onClick:i,children:c("startfail.dismiss")})]}),(0,a.jsx)("p",{className:"why",children:c("startfail.downloadWhy")})]})}let v="cop.startFailure.dismissed";function k(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(v))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function N(){let{t:e}=(0,h.kj)(),[t,n]=(0,c.useState)([]),[l,s]=(0,c.useState)([]);(0,b.z)(()=>f.FH.startFailures(!0).then(e=>{n(e),s(k())}).catch(()=>void 0),5e3);let i=t.find(e=>!l.includes(e.id));return i?(0,a.jsx)("div",{style:{marginBottom:12},children:(0,a.jsx)(j,{failure:i,intro:e("at-turn"===i.stage?"startfail.laterSession":"startfail.later"),onDismiss:()=>{let e=[...new Set([...k(),i.id])].slice(-50);try{window.localStorage.setItem(v,JSON.stringify(e))}catch(e){}s(e)}})}):null}var S=n(1691),E=n(83285);function M(e){let{children:t}=e;return"/"===(0,i.usePathname)()?(0,a.jsxs)("div",{className:"wb-root",children:[(0,a.jsx)(o.U,{}),(0,a.jsx)(N,{}),(0,a.jsx)(S.J1,{}),(0,a.jsx)("main",{id:"main",className:"wb-main",children:t}),(0,a.jsx)(w,{}),(0,a.jsx)(x,{}),(0,a.jsx)(y,{})]}):(0,a.jsxs)("div",{className:"wrap",children:[(0,a.jsxs)("header",{className:"top",children:[(0,a.jsx)("h1",{children:(0,a.jsxs)(s(),{href:"/",className:"brand-link",children:[(0,a.jsx)(E.g,{}),"copilot-operator"]})}),(0,a.jsx)(r.s,{})]}),(0,a.jsx)(o.U,{}),(0,a.jsx)(N,{}),(0,a.jsx)(S.J1,{}),(0,a.jsx)("main",{id:"main",children:t}),(0,a.jsx)(w,{}),(0,a.jsx)(x,{}),(0,a.jsx)(y,{})]})}},66417:(e,t,n)=>{Promise.resolve().then(n.bind(n,51035)),Promise.resolve().then(n.t.bind(n,952,23)),Promise.resolve().then(n.bind(n,16752)),Promise.resolve().then(n.bind(n,87712)),Promise.resolve().then(n.bind(n,19050)),Promise.resolve().then(n.bind(n,98078)),Promise.resolve().then(n.bind(n,8205))},87712:(e,t,n)=>{"use strict";n.d(t,{ScrollJump:()=>i});var a=n(73365),l=n(1521),s=n(8205);function i(){let{t:e}=(0,s.kj)(),[t,n]=(0,l.useState)({long:!1,atTop:!0,atBottom:!1});return((0,l.useEffect)(()=>{let e=()=>{let e=document.documentElement;n({long:e.scrollHeight>2*window.innerHeight,atTop:window.scrollY<200,atBottom:window.innerHeight+window.scrollY>=e.scrollHeight-200})};e(),window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e);let t=new ResizeObserver(e);return t.observe(document.body),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e),t.disconnect()}},[]),t.long)?(0,a.jsxs)("div",{className:"scroll-jump",children:[!t.atTop&&(0,a.jsx)("button",{type:"button","aria-label":e("scroll.top"),title:e("scroll.top"),onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"↑"}),!t.atBottom&&(0,a.jsx)("button",{type:"button","aria-label":e("scroll.bottom"),title:e("scroll.bottom"),onClick:()=>window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"}),children:"↓"})]}):null}}},e=>{e.O(0,[7353,8197,7921,895,8124,2347,3131,7358],()=>e(e.s=66417)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{1691:(e,t,l)=>{"use strict";l.d(t,{DR:()=>m,J1:()=>h,Lh:()=>d});var a=l(73365),n=l(1521),s=l(1702),i=l(15549),r=l(8205),o=l(87527);function c(e){return"/settings?locator=".concat(encodeURIComponent(e),"#").concat(e.startsWith("step:")?"chat-steps":"chat-locators")}function d(e){let{failure:t,inSettings:l=!1,onDismiss:n}=e,{t:s,locale:o}=(0,r.kj)(),d=(0,r.W3)(),u=t.key.startsWith("step:")?t.name||t.locator:s("chatloc.".concat(t.key));return(0,a.jsxs)("div",{className:"notice ".concat(t.stopped?"":"caution"," locator-failure").trim(),role:"alert","data-locator":t.key,style:{overflowWrap:"anywhere"},children:[!l&&(0,a.jsx)("strong",{children:s(t.stopped?"chatloc.failTitle":"chatloc.warnTitle",{name:u})}),(0,a.jsxs)("p",{className:"small",style:{margin:"4px 0"},children:[s("chatloc.failWhen",{when:d(t.at)})," ",(0,a.jsx)("code",{className:"picker-example",children:t.locator})]}),t.why&&(0,a.jsx)("p",{className:"muted small",style:{margin:"4px 0"},children:t.why}),(0,a.jsxs)("div",{className:"row",style:{marginTop:6},children:[(0,a.jsx)("a",{className:"button-link",href:i.FH.locatorChatbotUrl(t.key,o),download:!0,"data-chatbot-file":!0,children:s("chatloc.file")}),!l&&(0,a.jsx)("a",{className:"button-link",href:c(t.key),children:s("chatloc.fix")}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:n,children:s("chatloc.dismiss")})]}),(0,a.jsx)("p",{className:"why",children:s("chatloc.how")})]})}let u="cop.locatorFailure.opened";function m(){let[e,t]=(0,n.useState)([]),l=async()=>{await i.FH.locatorFailures().then(e=>t(e.filter(e=>!e.changed))).catch(()=>void 0)};return(0,o.z)(l,5e3),{list:e,dismiss:async e=>{t(t=>t.filter(t=>t.key!==e)),await i.FH.dismissLocatorFailure(e).catch(()=>void 0)},reload:l}}function h(){let e=(0,s.usePathname)(),{list:t,dismiss:l}=m(),i="/settings"===e||"/settings/"===e;return((0,n.useEffect)(()=>{if(i)return;let e=t.find(e=>e.stopped);if(!e)return;let l="".concat(e.key,"@").concat(e.at),a=function(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(u))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}();if(!a.includes(l)){try{window.localStorage.setItem(u,JSON.stringify([...a,l].slice(-50)))}catch(e){return}window.location.assign(c(e.key))}},[t,i]),i||0===t.length)?null:(0,a.jsx)("div",{style:{marginBottom:12},children:t.map(e=>(0,a.jsx)(d,{failure:e,onDismiss:()=>void l(e.key)},e.key))})}},1702:(e,t,l)=>{"use strict";var a=l(99962);l.o(a,"usePathname")&&l.d(t,{usePathname:function(){return a.usePathname}}),l.o(a,"useRouter")&&l.d(t,{useRouter:function(){return a.useRouter}})},5462:(e,t,l)=>{"use strict";l.d(t,{f:()=>s,q:()=>i});var a=l(73365),n=l(1521);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"below",[t,l]=(0,n.useState)(!1),a=(0,n.useRef)(null),s=(0,n.useRef)(null),i=(0,n.useId)(),[r,o]=(0,n.useState)({visibility:"hidden"}),c=(0,n.useCallback)(()=>l(!1),[]),d=(0,n.useCallback)(()=>l(e=>!e),[]);return(0,n.useLayoutEffect)(()=>{var l;let n,i;if(!t)return void o({visibility:"hidden"});let r=null==(l=a.current)?void 0:l.getBoundingClientRect(),c=s.current;if(!r||!c)return;let d=c.offsetWidth,u=c.offsetHeight;"right"===e?(n=r.right+6,i=Math.min(r.top,window.innerHeight-u-8)):(n=Math.min(r.left,window.innerWidth-d-8),i=r.bottom+6+u>window.innerHeight-8?r.top-6-u:r.bottom+6),o({left:Math.max(8,n),top:Math.max(8,i)})},[t,e]),(0,n.useEffect)(()=>{if(!t)return;let e=e=>{var t,n;let i=e.target;(null==(t=s.current)?void 0:t.contains(i))||(null==(n=a.current)?void 0:n.contains(i))||l(!1)},n=e=>{var t;"Escape"===e.key&&(l(!1),null==(t=a.current)||t.focus())},i=()=>l(!1);return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",n),window.addEventListener("resize",i),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",n),window.removeEventListener("resize",i)}},[t]),{open:t,setOpen:l,toggle:d,close:c,anchor:a,panel:s,style:r,id:i}}function i(e){let{label:t,text:l}=e,n=s("below");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{ref:n.anchor,type:"button",className:"info-btn","aria-label":t,title:t,"aria-expanded":n.open,"aria-controls":n.open?n.id:void 0,onClick:n.toggle,children:"i"}),n.open&&(0,a.jsxs)("div",{ref:n.panel,id:n.id,role:"dialog","aria-label":t,className:"pop info-pop",style:n.style,children:[(0,a.jsx)("p",{className:"pop-title",children:t}),l.split(/\n\s*\n/).map((e,t)=>{let l=t>0?/^([^::.。\n]{2,90}?)\s?(?::\s|:)/.exec(e):null;return(0,a.jsx)("p",{children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("strong",{children:l[1]}),e.slice(l[1].length)]}):e},e)})]})]})}},11272:(e,t,l)=>{"use strict";l.d(t,{O:()=>n});var a=l(73365);function n(){return(0,a.jsxs)("svg",{className:"branch-ico",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,a.jsx)("path",{d:"M4.5 3.5v9M4.5 10c0-3 7-2.5 7-5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"4.5",cy:"3",r:"1.7",fill:"currentColor"}),(0,a.jsx)("circle",{cx:"4.5",cy:"13",r:"1.7",fill:"currentColor"}),(0,a.jsx)("circle",{cx:"11.5",cy:"4.2",r:"1.7",fill:"currentColor"})]})}},24784:(e,t,l)=>{"use strict";l.d(t,{Yb:()=>o,u:()=>r});var a=l(73365),n=l(1521),s=l(15549),i=l(8205);let r="::by-hand::";function o(e){var t,l,o;let{id:c,chosen:d,onChange:u,none:m,byHand:h,catalogue:p,disabled:x=!1,style:f}=e,{t:v}=(0,i.kj)(),j=function(e){let[t,l]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(void 0!==e)return;let t=!0;return s.FH.models().then(e=>{t&&l(e)}).catch(()=>void 0),()=>{t=!1}},[e]),void 0!==e?e:t}(p),g=null!=(t=null==j?void 0:j.options)?t:[],b=e=>e.toLowerCase().replace(/[-‐‑‒–—_]+/g," ").replace(/\s+/g," ").trim(),y=d&&d!==r?g.find(e=>b(e.name)===b(d)):void 0,k=null!=(l=null==y?void 0:y.name)?l:d,w=!!y||d===r&&void 0!==h,N=g.filter(e=>!e.group),S=new Map;for(let e of g)e.group&&S.set(e.group,[...null!=(o=S.get(e.group))?o:[],e]);return(0,a.jsxs)("select",{id:c,value:k,onChange:e=>u(e.target.value),disabled:x,style:{width:"auto",minWidth:280,...f},children:[void 0!==h&&(0,a.jsx)("option",{value:r,children:h}),void 0!==m&&(0,a.jsx)("option",{value:"",children:m}),d&&!w&&(0,a.jsx)("option",{value:d,children:v("model.notInList",{name:d})}),N.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(v("model.unavailable")):""]},e.name)),[...S.entries()].map(e=>{let[t,l]=e;return(0,a.jsx)("optgroup",{label:t,children:l.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(v("model.unavailable")):""]},e.name))},t)})]})}},51035:(e,t,l)=>{"use strict";l.d(t,{DialogHost:()=>d,Z:()=>c});var a=l(73365),n=l(1521),s=l(8205),i=l(94969);let r=null,o=[];function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(l=>{var a;return a={kind:"confirm",message:e,...t,resolve:l},void(r?r(a):o.push(a))})}function d(e){var t,l;let{children:c}=e,{t:d}=(0,s.kj)(),[u,m]=(0,n.useState)([]),h=(0,n.useRef)(null),p=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(r=e=>m(t=>[...t,e]),o.length>0){let e=o.splice(0,o.length);m(t=>[...t,...e])}return()=>{r=null}},[]);let x=u[0],f=(0,n.useCallback)(e=>{x&&(x.resolve(e),m(e=>e.slice(1)))},[x]);return(0,i.V)(p,!!x,h),(0,n.useEffect)(()=>{if(!x)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),f(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x,f]),(0,a.jsxs)(a.Fragment,{children:[c,x&&(0,a.jsx)("div",{className:"modal-backdrop",onClick:()=>f(!1),role:"presentation",children:(0,a.jsxs)("div",{ref:p,className:"modal".concat(x.danger?" danger":""),role:"confirm"===x.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("h2",{id:"modal-title",children:null!=(t=x.title)?t:d("confirm"===x.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,a.jsx)("div",{id:"modal-body",className:"modal-body",children:x.message}),(0,a.jsxs)("div",{className:"row modal-actions",children:["confirm"===x.kind&&(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>f(!1),children:d("dialog.cancel")}),(0,a.jsx)("button",{ref:h,type:"button",className:x.danger?"danger":"primary",onClick:()=>f(!0),children:null!=(l=x.okLabel)?l:d("dialog.ok")})]})]})})]})}},65323:(e,t,l)=>{Promise.resolve().then(l.bind(l,91082))},87527:(e,t,l)=>{"use strict";l.d(t,{z:()=>n});var a=l(1521);function n(e,t){let l=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=(0,a.useRef)(e);n.current=e,(0,a.useEffect)(()=>{let e;if(!l)return;let a=!1,s=async()=>{try{await n.current()}catch(e){}finally{a||(e=setTimeout(()=>void s(),t))}};return s(),()=>{a=!0,e&&clearTimeout(e)}},[t,l])}},91082:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>N});var a=l(73365),n=l(1521),s=l(15549);let i="{$model_name}",r="{$provider_name}",o=["button","rows","model","provider","providerModel"],c=["composer","send","userMessage","turn","answer","copy","stop","conversationLink","chatMore","renameItem","renameInput","renameSave","uploadInput","attachment","attachmentUploaded"],d="{$chat_id}",u="{$file_name}",m="{$file_stem}",h={chatMore:d,attachment:u,attachmentUploaded:u},p={button:null,rows:null,model:i,provider:r,providerModel:i};function x(e){return e.includes("'")?e.includes('"')?"concat('".concat(e.split("'").join("', \"'\", '"),"')"):'"'.concat(e,'"'):"'".concat(e,"'")}function f(e,t){let l=e,a=(e,t)=>{void 0!==t&&(l=l.split("'".concat(e,"'")).join(t.includes("'")?x(t):"'".concat(t,"'")).split('"'.concat(e,'"')).join(t.includes('"')?x(t):'"'.concat(t,'"')).split(e).join(t))};return a(i,t.model),a(r,t.provider),l}function v(e,t,l){var a,n;let s=t.trim();if(""===s)return null;let i=null===e?null:e in p?p[e]:null!=(a=h[e])?a:null;if(i&&!s.includes(i)&&!(i===u&&s.includes(m)))return{kind:"placeholder",placeholder:i};let r=s.startsWith("xpath=")||!s.startsWith("css=")&&/^\s*(\/|\(|\.\.?\/)/.test(s),o=/(^|[/[(|\s])(ancestor-or-self|ancestor|attribute|child|descendant-or-self|descendant|following-sibling|following|parent|preceding-sibling|preceding|self):(?!:)/.exec(s);if(o&&r)return{kind:"colons",axis:o[2]};if(!l||/^[a-z][a-z:-]*=/.test(s)&&!/^(css|xpath)=/.test(s)||s.includes(">>")||!r&&/:(has-text|text|text-is|text-matches|visible|nth-match)\b/.test(s))return null;let c=f(s.replace(/^(xpath|css)=/,""),{model:"Think deeper",provider:"Claude"}).split(d).join("id").split(u).join("file.txt").split(m).join("file");try{r?l.evaluate(c,l,null,XPathResult.ANY_TYPE,null):l.querySelector(c)}catch(t){let e=(null!=(n=t.message)?n:String(t)).replace(/^Failed to execute '\w+' on 'Document': /,"");return r?{kind:"xpath",message:e}:{kind:"css",message:e}}return null}var j=l(1691),g=l(8205),b=l(51035),y=l(24784),k=l(5462),w=l(11272);function N(){let{t:e}=(0,g.kj)();(0,n.useEffect)(()=>{let e,t=0,l=()=>{let l=decodeURIComponent(window.location.hash.slice(1));if(!l)return;let a=Date.now()+5e3;cancelAnimationFrame(t);let n=()=>{let s=document.getElementById(l);if(!s){Date.now()<a&&(t=requestAnimationFrame(n));return}let i="reduced"===document.documentElement.dataset.motion||window.matchMedia("(prefers-reduced-motion: reduce)").matches;s.scrollIntoView({block:"start",behavior:i?"auto":"smooth"}),s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus({preventScroll:!0}),s.classList.remove("spotlight"),s.offsetWidth,s.classList.add("spotlight"),clearTimeout(e),e=setTimeout(()=>s.classList.remove("spotlight"),4200)};n()};return l(),window.addEventListener("hashchange",l),()=>{window.removeEventListener("hashchange",l),cancelAnimationFrame(t),clearTimeout(e)}},[]);let[t,l]=(0,n.useState)(null),[i,r]=(0,n.useState)(!1),[o,c]=(0,n.useState)("");(0,n.useEffect)(()=>{s.FH.models().then(l).catch(()=>void 0)},[]);let d=async()=>{if(await (0,b.Z)(e("model.refreshConfirm"))){r(!0),c(e("model.refreshing"));try{var t;let a=await s.FH.models().then(()=>s.FH.refreshModels());l(a),c(0===a.options.length?null!=(t=a.note)?t:e("model.none"):e("model.refreshed",{n:a.options.length}))}catch(e){c(e.message)}finally{r(!1)}}},u={catalogue:t,setCatalogue:l,refreshModels:d,refreshing:i,refreshMsg:o};return(0,a.jsxs)("div",{className:"settings",children:[(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsx)("h2",{children:e("def.title")}),(0,a.jsx)("p",{className:"muted small",children:e("def.intro")}),(0,a.jsx)("p",{className:"why",children:e("def.autoSave")}),(0,a.jsx)("p",{className:"why",children:e("def.live")})]}),(0,a.jsx)(H,{}),(0,a.jsx)(T,{}),(0,a.jsx)(O,{}),(0,a.jsx)(B,{}),(0,a.jsx)(U,{role:"worker",...u}),(0,a.jsx)(U,{role:"lead",...u}),(0,a.jsx)(U,{role:"kerrigan",...u}),(0,a.jsx)(U,{role:"review",...u}),(0,a.jsx)(z,{}),(0,a.jsx)(X,{catalogue:t}),(0,a.jsx)(Q,{}),(0,a.jsx)(et,{}),(0,a.jsx)(ea,{})]})}function S(e){let{htmlFor:t,label:l,info:n,as:s="label"}=e,{t:i}=(0,g.kj)();return(0,a.jsxs)("div",{className:"field-label",children:["label"===s?(0,a.jsx)("label",{htmlFor:t,children:l}):(0,a.jsx)("span",{className:"field-name",children:l}),(0,a.jsx)(k.q,{label:i("info.about",{name:l}),text:n})]})}function C(e){let{id:t,label:l,info:n,unit:s,children:i}=e;return(0,a.jsxs)("div",{className:"settings-field",children:[(0,a.jsx)(S,{htmlFor:t,label:l,info:n}),(0,a.jsxs)("div",{className:"field-control",children:[i,s&&(0,a.jsx)("span",{className:"unit",children:s})]})]})}function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:900,l=(0,n.useRef)(null),a=(0,n.useRef)(null),s=(0,n.useRef)(e);return s.current=e,(0,n.useEffect)(()=>()=>{l.current&&clearTimeout(l.current),a.current&&s.current(a.current.value)},[]),e=>{l.current&&clearTimeout(l.current),a.current={value:e},l.current=setTimeout(()=>{a.current=null,s.current(e)},t)}}function R(e){let{id:t,value:l,min:s,max:i,onChange:r,disabled:o}=e,[c,d]=(0,n.useState)(String(l));return(0,n.useEffect)(()=>d(e=>M(e)===l?e:String(l)),[l]),(0,a.jsx)("input",{id:t,type:"number",className:"number",min:s,max:i,step:1,value:c,onChange:e=>{d(e.target.value);let t=M(e.target.value);null!==t&&t>=s&&t<=i&&r(t)},onBlur:()=>{let e=M(c),t=null===e?l:Math.max(s,Math.min(i,e));d(String(t)),t!==l&&r(t)},disabled:o})}function M(e){if(""===e.trim())return null;let t=Number(e);return Number.isInteger(t)?t:null}let W=(0,n.createContext)(e=>e);function E(){let[e,t]=(0,n.useState)(0),l=(0,n.useRef)(!0);return(0,n.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),{saving:e>0,track:(0,n.useCallback)(async e=>{let a=Date.now();t(e=>e+1);try{return await e}finally{setTimeout(()=>{l.current&&t(e=>Math.max(0,e-1))},Math.max(0,1600-(Date.now()-a)))}},[])}}function I(){let[e,t]=(0,n.useState)(1);return(0,n.useEffect)(()=>{let e=setInterval(()=>t(e=>e%3+1),380);return()=>clearInterval(e)},[]),(0,a.jsx)("span",{className:"saving-dots","aria-hidden":"true",children:".".repeat(e)})}function D(e){let{msg:t,saving:l}=e,{t:n}=(0,g.kj)();return l?(0,a.jsx)("div",{className:"row saved-note",children:(0,a.jsxs)("span",{className:"saving small",role:"status",children:[n("def.saving"),(0,a.jsx)(I,{})]})}):t?(0,a.jsx)("div",{className:"row saved-note",children:(0,a.jsx)("span",{className:"muted small",role:"status",children:t})}):null}let L={name:"",description:"",text:"",projectDir:"",forKerrigan:""};function O(){let{t:e}=(0,g.kj)(),{saving:t,track:l}=E(),[i,r]=(0,n.useState)(null),[o,c]=(0,n.useState)({maxDescription:300,maxForKerrigan:3e3}),[d,u]=(0,n.useState)([]),[m,h]=(0,n.useState)(""),[p,x]=(0,n.useState)(""),[f,v]=(0,n.useState)(!1),[j,y]=(0,n.useState)(L);(0,n.useEffect)(()=>{s.FH.skills().then(e=>{var t;r(e.skills),c({maxDescription:e.maxDescription,maxForKerrigan:null!=(t=e.maxForKerrigan)?t:3e3})}).catch(e=>x(e.message)),s.FH.project().then(e=>u([...e.rootDir?[{name:e.name||e.rootDir,dir:e.rootDir}]:[],...e.others.map(e=>({name:e.name,dir:e.rootDir}))])).catch(()=>void 0)},[]);let k=async t=>{v(!0),x("");try{let a=await l(s.FH.setSkills(t));return r(a.skills),h(e("skills.saved",{n:a.skills.length})),!0}catch(e){return x(e.message),!1}finally{v(!1)}},w=null!=i?i:[],N=async()=>{await k([...w,{...j,name:j.name.trim().toLowerCase()}])&&y(L)},S=async t=>{await (0,b.Z)(e("skills.removeConfirm",{name:w[t].name}),{okLabel:e("skills.remove"),danger:!0})&&await k(w.filter((e,l)=>l!==t))};return(0,a.jsxs)("section",{className:"panel",id:"skills","aria-labelledby":"skills-title",children:[(0,a.jsx)("h2",{id:"skills-title",children:e("skills.title")}),(0,a.jsx)("p",{className:"muted small",children:e("skills.intro")}),p&&(0,a.jsx)("div",{className:"err",children:p}),i&&0===i.length&&(0,a.jsx)("p",{className:"muted small",children:e("skills.none")}),w.map((e,t)=>(0,a.jsx)(A,{skill:e,projects:d,limits:o,onChange:e=>k(w.map((l,a)=>a===t?e:l)),onRemove:()=>void S(t),busy:f},"skill-".concat(t))),(0,a.jsx)(D,{msg:m,saving:t}),(0,a.jsx)("h3",{id:"skills-add",children:e("skills.addTitle")}),(0,a.jsx)(A,{skill:j,projects:d,limits:o,onDraft:y,busy:f}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("button",{className:"primary",onClick:()=>void N(),disabled:f||!j.name.trim()||!j.text.trim(),children:e("skills.add")})})]})}function P(){return(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M2.5 4h11M6 4V2.5h4V4M3.8 4l.7 9.5h7l.7-9.5M6.6 6.6v4.8M9.4 6.6v4.8"})})}function A(e){var t;let{skill:l,projects:s,limits:i,onChange:r,onDraft:o,onRemove:c,busy:d}=e,{t:u}=(0,g.kj)(),m=(0,n.useId)(),[h,p]=(0,n.useState)(l),x=(0,n.useRef)(!1);(0,n.useEffect)(()=>{x.current||p(l)},[l]);let f=e=>{let t={...h,...e};return p(t),null==o||o(t),t},v=F(async e=>{x.current=!1,r&&(e.text!==l.text||e.forKerrigan!==l.forKerrigan)&&await r(e)},1200),j=()=>{r&&(h.name!==l.name||h.description!==l.description)&&r(h)};return(0,a.jsxs)("div",{className:"panel inner skill-entry".concat(r?"":" skill-new"),children:[c&&(0,a.jsxs)("div",{className:"skill-head",children:[(0,a.jsxs)("span",{className:"skill-title",children:["/",h.name]}),(0,a.jsxs)("button",{type:"button",className:"danger skill-delete",onClick:c,disabled:d,"aria-label":u("skills.removeOne",{name:h.name}),title:u("skills.removeOne",{name:h.name}),children:[(0,a.jsx)(P,{}),u("skills.remove")]})]}),(0,a.jsxs)("div",{className:"project-fields",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"".concat(m,"-name"),label:u("skills.name"),info:u("skills.nameInfo")}),(0,a.jsxs)("div",{className:"input-with-buttons skill-name-box",children:[(0,a.jsx)("span",{className:"skill-slash","aria-hidden":"true",children:"/"}),(0,a.jsx)("input",{id:"".concat(m,"-name"),type:"text",value:h.name,onChange:e=>f({name:e.target.value}),onBlur:j,placeholder:"new-test",spellCheck:!1})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"".concat(m,"-description"),label:u("skills.description"),info:u("skills.descriptionInfo")}),(0,a.jsx)("input",{id:"".concat(m,"-description"),type:"text",value:h.description,maxLength:i.maxDescription,onChange:e=>f({description:e.target.value}),onBlur:j})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"".concat(m,"-project"),label:u("skills.project"),info:u("skills.projectInfo")}),(0,a.jsx)("div",{className:"input-with-buttons",children:(0,a.jsxs)("select",{id:"".concat(m,"-project"),value:h.projectDir,onChange:e=>{let t=f({projectDir:e.target.value});r&&r(t)},children:[(0,a.jsx)("option",{value:"",children:u("skills.allProjects")}),s.map(e=>(0,a.jsx)("option",{value:e.dir,children:e.name},e.dir))]})})]})]}),(0,a.jsxs)("div",{className:"project-level2",children:[(0,a.jsx)(S,{htmlFor:"".concat(m,"-text"),label:u("skills.text"),info:u("skills.textInfo")}),(0,a.jsx)("textarea",{id:"".concat(m,"-text"),className:"prose",rows:5,value:h.text,onChange:e=>{let t=f({text:e.target.value});r&&(x.current=!0,v(t))},placeholder:u("skills.textPlaceholder")}),(0,a.jsx)("span",{className:"muted small skill-count",children:u("skills.count",{n:h.text.length.toLocaleString()})})]}),(0,a.jsxs)("div",{className:"project-level2",children:[(0,a.jsx)(S,{htmlFor:"".concat(m,"-kerrigan"),label:u("skills.forKerrigan"),info:u("skills.forKerriganInfo")}),(0,a.jsx)("textarea",{id:"".concat(m,"-kerrigan"),className:"prose",rows:3,maxLength:i.maxForKerrigan,value:null!=(t=h.forKerrigan)?t:"",onChange:e=>{let t=f({forKerrigan:e.target.value});r&&(x.current=!0,v(t))},placeholder:u("skills.forKerriganPlaceholder")})]})]})}function H(){let{t:e}=(0,g.kj)(),[t,l]=(0,n.useState)(null),[i,r]=(0,n.useState)("");return(0,n.useEffect)(()=>{s.FH.level1().then(e=>l(e.content)).catch(t=>r(e("l1.failed",{reason:t.message})))},[]),(0,a.jsxs)("section",{className:"panel",id:"level1","aria-labelledby":"level1-title",children:[(0,a.jsxs)("div",{className:"row section-title",children:[(0,a.jsx)("h2",{id:"level1-title",children:e("l1.title")}),(0,a.jsx)("span",{className:"badge",children:e("l1.readOnly")})]}),(0,a.jsx)("div",{className:"callout",role:"note",children:e("l1.what")}),i&&(0,a.jsx)("div",{className:"err",children:i}),(0,a.jsxs)("details",{className:"l1-text",children:[(0,a.jsx)("summary",{children:e("l1.show")}),(0,a.jsx)("pre",{className:"l1-pre",children:null!=t?t:"…"})]})]})}function T(){var e,t;let{t:l}=(0,g.kj)(),{saving:i,track:r}=E(),[o,c]=(0,n.useState)(null),[d,u]=(0,n.useState)(""),[m,h]=(0,n.useState)(""),[p,x]=(0,n.useState)(""),[f,v]=(0,n.useState)(""),[j,b]=(0,n.useState)(!1),[y,k]=(0,n.useState)(""),[w,N]=(0,n.useState)(""),C=(0,n.useCallback)(async()=>{try{let e=await s.FH.project();c(e),u(e.rootDir),h(e.name),v("")}catch(e){v(e.message)}},[]);(0,n.useEffect)(()=>{C()},[C]);let R=async(e,t)=>{b(!0),x("");try{let l=await r(s.FH.setProject(e));return c(l),u(l.rootDir),x(t(l)),v(""),!0}catch(e){return v(e.message),!1}finally{b(!1)}},M=e=>R({rootDir:e},e=>e.rootDir?l("proj.saved",{dir:e.rootDir}):l("proj.cleared")),W=e=>R({name:e},()=>l("proj.nameSaved")),I=F(M),L=F(W),O=async(e,t)=>{b(!0);try{var l;let a=await s.FH.browseFolder(t.trim()||void 0);a.ok?e(a.path):a.cancelled||v(null!=(l=a.reason)?l:"")}catch(e){v(e.message)}finally{b(!1)}},P=null!=(e=null==o?void 0:o.others)?e:[],A=e=>e.map(e=>({name:e.name,rootDir:e.rootDir,level2:e.level2,readOnly:e.readOnly})),H=(e,t,l)=>R({others:A(P.map(l=>l.name===e.name?{...l,...t}:l))},l),T=async()=>{await R({others:[...A(P),{name:y.trim(),rootDir:w.trim(),level2:"",readOnly:!1}]},e=>l("proj.othersSaved",{n:e.others.length}))&&(k(""),N(""))};return(0,a.jsxs)("section",{className:"panel",id:"project","aria-labelledby":"project-title",children:[(0,a.jsx)("h2",{id:"project-title",children:l("proj.title")}),(0,a.jsx)("p",{className:"muted small",children:l("proj.intro")}),f&&(0,a.jsx)("div",{className:"err",children:f}),(0,a.jsx)(q,{name:m,dir:d,repoOk:!!(null==o?void 0:o.repoOk),repoProblem:null==o?void 0:o.repoProblem,branch:null==o?void 0:o.branch,level2:null!=(t=null==o?void 0:o.level2)?t:"",readOnly:(null==o?void 0:o.readOnly)===!0,onReadOnly:e=>R({readOnly:e},()=>l(e?"proj.readOnlyOn":"proj.readOnlyOff",{name:m||d})),isDefault:!0,busy:j,onNameInput:e=>{h(e),L(e)},onName:e=>void W(e),onDirInput:e=>{u(e),I(e)},onDir:e=>void M(e),onBrowse:()=>void O(e=>void M(e),d),onLevel2:e=>R({level2:e},()=>l("proj.level2Saved",{name:m||d})),onRemove:(null==o?void 0:o.rootDir)?()=>void M(""):void 0,removeLabel:l("proj.clear")}),o&&!o.rootDir&&(0,a.jsx)("p",{className:"muted small",children:l("proj.none")}),P.map((e,t)=>(0,a.jsx)(q,{name:e.name,dir:e.rootDir,repoOk:e.repoOk,repoProblem:e.repoProblem,branch:e.branch,level2:e.level2,readOnly:!0===e.readOnly,onReadOnly:t=>H(e,{readOnly:t},()=>l(t?"proj.readOnlyOn":"proj.readOnlyOff",{name:e.name})),busy:j,onName:t=>void H(e,{name:t},()=>l("proj.nameSaved")),onDir:t=>void H(e,{rootDir:t},()=>l("proj.othersSaved",{n:P.length})),onBrowse:()=>void O(t=>void H(e,{rootDir:t},()=>l("proj.othersSaved",{n:P.length})),e.rootDir),onLevel2:t=>H(e,{level2:t},()=>l("proj.level2Saved",{name:e.name})),onRemove:()=>{let t;t=e.name,R({others:A(P.filter(e=>e.name!==t))},e=>l("proj.othersSaved",{n:e.others.length}))},removeLabel:l("proj.otherRemove")},"other-".concat(t))),(0,a.jsx)(D,{msg:p,saving:i}),(0,a.jsx)("h3",{id:"others",children:l("proj.addTitle")}),(0,a.jsx)("p",{className:"muted small",children:l("proj.othersIntro")}),(0,a.jsxs)("div",{className:"project-fields add-project",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"new-project-name",label:l("proj.entryName"),info:l("proj.nameInfo")}),(0,a.jsx)("input",{id:"new-project-name",type:"text",value:y,onChange:e=>k(e.target.value),placeholder:l("proj.entryName"),disabled:j})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"new-project-dir",label:l("proj.entryDir"),info:l("proj.dirInfo")}),(0,a.jsxs)("div",{className:"input-with-buttons",children:[(0,a.jsx)("input",{id:"new-project-dir",type:"text",value:w,onChange:e=>N(e.target.value),placeholder:"C:\\Projects\\my-app-tests",disabled:j}),(0,a.jsx)("button",{onClick:()=>void O(e=>N(e),w),disabled:j,children:l("mirror.browse")}),(0,a.jsx)("button",{className:"primary",onClick:()=>void T(),disabled:j||!y.trim()||!w.trim(),children:l("proj.otherAdd")})]})]})]})]})}function q(e){var t;let{name:l,dir:s,repoOk:i,repoProblem:r,branch:o,level2:c,readOnly:d,onReadOnly:u,isDefault:m=!1,busy:h,onNameInput:p,onName:x,onDirInput:f,onDir:v,onBrowse:j,onLevel2:b,onRemove:y,removeLabel:N}=e,{t:C}=(0,g.kj)(),R=(0,n.useId)(),[M,W]=(0,n.useState)(l),[E,I]=(0,n.useState)(s),[D,L]=(0,n.useState)(c),O=(0,n.useRef)(!1),[P,A]=(0,n.useState)(d);(0,n.useEffect)(()=>A(d),[d]),(0,n.useEffect)(()=>W(l),[l]),(0,n.useEffect)(()=>I(s),[s]),(0,n.useEffect)(()=>{O.current||L(c)},[c]);let H=F(async e=>{O.current=!1,e!==c&&await b(e)},1200);return(0,a.jsxs)("div",{className:"panel inner project-entry",children:[(0,a.jsxs)("div",{className:"row project-tags",children:[m&&(0,a.jsx)("span",{className:"chip",title:C("proj.isDefaultWhy"),children:C("proj.isDefault")}),P&&(0,a.jsx)("span",{className:"badge reference",title:C("proj.readOnlyInfo"),children:C("proj.readOnlyBadge")}),s&&(0,a.jsx)("span",{className:"badge ".concat(i?"done":""),title:i?C("proj.isRepo"):r,children:C(i?"proj.otherRepo":"proj.otherNotRepo")}),s&&i&&o&&(0,a.jsxs)("span",{className:"branch-tag",children:[(0,a.jsxs)("span",{className:"badge branch",children:[(0,a.jsx)(w.O,{})," ","HEAD"===o?C("proj.detached"):C("proj.branch",{name:o})]}),(0,a.jsx)(k.q,{label:C("info.about",{name:C("proj.branch",{name:o})}),text:C("proj.branchInfo")})]})]}),s&&!i&&(0,a.jsx)("p",{className:"muted small",children:r||C("proj.notRepoWhy")}),(0,a.jsxs)("div",{className:"field-label check-label project-readonly",children:[(0,a.jsx)("input",{id:"".concat(R,"-readonly"),type:"checkbox",checked:P,onChange:e=>{let t=e.target.checked;A(t),u(t).then(e=>{!1===e&&A(!t)})}}),(0,a.jsx)("label",{htmlFor:"".concat(R,"-readonly"),children:C("proj.readOnly")}),(0,a.jsx)(k.q,{label:C("info.about",{name:C("proj.readOnly")}),text:C("proj.readOnlyInfo")})]}),(0,a.jsxs)("div",{className:"project-fields",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"".concat(R,"-name"),label:C("proj.entryName"),info:C("proj.nameInfo")}),(0,a.jsx)("input",{id:"".concat(R,"-name"),type:"text",value:M,onChange:e=>{W(e.target.value),null==p||p(e.target.value)},onBlur:()=>{(M!==l||p)&&x(M)},placeholder:s?null!=(t=s.replace(/[\\/]+$/,"").split(/[\\/]/).pop())?t:"":C("proj.namePlaceholder")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(S,{htmlFor:"".concat(R,"-dir"),label:C("proj.entryDir"),info:C("proj.dirInfo")}),(0,a.jsxs)("div",{className:"input-with-buttons",children:[(0,a.jsx)("input",{id:"".concat(R,"-dir"),type:"text",value:E,onChange:e=>{I(e.target.value),null==f||f(e.target.value)},onBlur:()=>{(E!==s||f)&&v(E)},placeholder:"C:\\Projects\\my-app"}),(0,a.jsx)("button",{onClick:j,disabled:h,children:C("mirror.browse")}),y&&(0,a.jsx)("button",{className:"quiet",onClick:y,disabled:h,children:N})]})]})]}),(0,a.jsxs)("div",{className:"project-level2",children:[(0,a.jsx)(S,{htmlFor:"".concat(R,"-level2"),label:C("proj.level2"),info:C("proj.level2Info")}),(0,a.jsx)("textarea",{id:"".concat(R,"-level2"),className:"prose",rows:4,value:D,onChange:e=>{O.current=!0,L(e.target.value),H(e.target.value)},placeholder:C("proj.level2Placeholder")}),(0,a.jsx)("span",{className:"muted small",children:C("proj.level2Count",{n:D.length.toLocaleString()})})]})]})}function B(){let{t:e}=(0,g.kj)(),[t,l]=(0,n.useState)(""),[i,r]=(0,n.useState)(!1),[o,c]=(0,n.useState)(""),[d,u]=(0,n.useState)(""),m=async()=>{r(!0),u(""),c(e("login.waiting"));try{let e=await s.FH.login(t);e.ok?c(e.message):(c(""),u(e.message))}catch(e){c(""),u(e.message)}finally{r(!1)}};return(0,a.jsxs)("section",{className:"panel",id:"login","aria-labelledby":"login-title",children:[(0,a.jsx)("h2",{id:"login-title",children:e("login.title")}),(0,a.jsx)("p",{className:"muted small",children:e("login.intro")}),d&&(0,a.jsx)("div",{className:"err",children:d}),(0,a.jsxs)(C,{id:"login-account",label:e("login.account"),info:e("login.accountWhy"),children:[(0,a.jsx)("input",{id:"login-account",type:"email",value:t,onChange:e=>l(e.target.value),placeholder:"name@company.com",disabled:i}),(0,a.jsx)("button",{className:"primary",onClick:()=>void m(),disabled:i,children:i?e("login.busy"):e("login.button")})]}),o&&(0,a.jsx)("div",{className:"small",role:"status",children:o})]})}let K={worker:{section:"model",pick:"default-model",manualId:"manual-model",manualKey:"manualModel",field:"defaultModel",title:"def.modelTitle",intro:"def.modelIntro",info:"def.modelInfo",manualWhy:"def.manualModelWhy",saved:"def.modelSaved",cleared:"def.modelCleared",save:async e=>(await s.FH.setDefaultModel(e)).defaultModel},lead:{section:"lead-model",pick:"default-lead-model",manualId:"manual-lead-model",manualKey:"leadManualModel",field:"defaultLeadModel",title:"def.leadTitle",intro:"def.leadIntro",info:"def.leadInfo",manualWhy:"def.leadManualWhy",saved:"def.leadSaved",cleared:"def.leadCleared",save:async e=>(await s.FH.setDefaultLeadModel(e)).defaultLeadModel},kerrigan:{section:"kerrigan-model",pick:"default-kerrigan-model",manualId:"manual-kerrigan-model",manualKey:"kerriganManualModel",field:"defaultKerriganModel",title:"def.kerriganTitle",intro:"def.kerriganIntro",info:"def.kerriganInfo",manualWhy:"def.kerriganManualWhy",saved:"def.kerriganSaved",cleared:"def.kerriganCleared",save:async e=>(await s.FH.setDefaultKerriganModel(e)).defaultKerriganModel},review:{section:"review",pick:"default-review-model",manualId:"manual-review-model",manualKey:"reviewManualModel",field:"defaultReviewModel",title:"def.reviewTitle",intro:"def.reviewIntro",info:"def.reviewInfo",manualWhy:"def.reviewManualWhy",saved:"def.reviewSaved",cleared:"def.reviewCleared",save:async e=>(await s.FH.setDefaultReviewModel(e)).defaultReviewModel}};function U(e){var t,l;let{role:s,catalogue:i,setCatalogue:r,refreshModels:o,refreshing:c,refreshMsg:d}=e,{t:u}=(0,g.kj)(),m=(0,g.W3)(),h=K[s],{saving:p,track:x}=E(),[f,v]=(0,n.useState)(""),[j,b]=(0,n.useState)(""),[k,w]=(0,n.useState)(!1),N=null!=(t=null==i?void 0:i[h.field])?t:"",S=async e=>{w(!0),v("");try{let t=await x(h.save(e));i&&r({...i,[h.field]:t}),v(t?u(h.saved,{name:t}):u(h.cleared)),b("")}catch(e){b(e.message)}finally{w(!1)}},F="review"===s&&""!==N&&N===(null!=(l=null==i?void 0:i.defaultModel)?l:"");return(0,a.jsx)(W.Provider,{value:x,children:(0,a.jsxs)("section",{className:"panel",id:h.section,"aria-labelledby":"".concat(h.section,"-title"),children:[(0,a.jsx)("h2",{id:"".concat(h.section,"-title"),children:u(h.title)}),(0,a.jsx)("p",{className:"muted small",children:u(h.intro)}),j&&(0,a.jsx)("div",{className:"err",children:j}),(0,a.jsxs)(C,{id:h.pick,label:u("def.modelField"),info:u(h.info),children:[(0,a.jsx)(y.Yb,{id:h.pick,chosen:N,onChange:e=>void S(e),none:u("def.modelNone"),catalogue:i,disabled:k||c}),(0,a.jsx)("button",{className:"quiet",onClick:()=>void S(""),disabled:k||!N,children:u("proj.clear")}),(0,a.jsx)("button",{onClick:()=>void o(),disabled:k||c,children:u("model.refresh")})]}),(0,a.jsx)("p",{className:"muted small field-after",children:(null==i?void 0:i.readAt)?u("model.readAt",{t:m(i.readAt),n:i.options.length}):u("model.neverRead")}),F&&(0,a.jsx)("p",{className:"why field-after warned-text",children:u("def.reviewSame")}),(0,a.jsx)(_,{id:h.manualId,setting:h.manualKey,why:h.manualWhy}),(0,a.jsx)(D,{msg:f||d,saving:p})]})})}function _(e){let{id:t,setting:l,why:i}=e,{t:r}=(0,g.kj)(),o=(0,n.useContext)(W),[c,d]=(0,n.useState)(null),[u,m]=(0,n.useState)("");(0,n.useEffect)(()=>{s.FH.settings().then(e=>{var t,a,n;let s=null!=(n=e.raw.copilot)?n:{},i=(null==(a=e.defaults)||null==(t=a.copilot)?void 0:t.manualModel)!==!1,r="boolean"==typeof s.manualModel?s.manualModel:i,o="boolean"==typeof s.leadManualModel?s.leadManualModel:r,c=s[l];d("boolean"==typeof c?c:"kerriganManualModel"===l?o:r)}).catch(e=>m(e.message))},[l]);let h=async e=>{d(e);try{await o(s.FH.settings().then(t=>{var a;return s.FH.saveSettings({...t.raw,copilot:{...null!=(a=t.raw.copilot)?a:{},[l]:e}})})),m("")}catch(e){m(e.message)}};return(0,a.jsxs)("div",{className:"settings-field",children:[(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:t,type:"checkbox",checked:!0===c,disabled:null===c,onChange:e=>void h(e.target.checked)}),(0,a.jsx)("label",{htmlFor:t,children:r("def.manualModel")}),(0,a.jsx)(k.q,{label:r("info.about",{name:r("def.manualModel")}),text:r(i)})]}),u&&(0,a.jsx)("div",{className:"err",children:u})]})}let Z=[{group:"write",title:"chatloc.group.write",keys:["composer","send","userMessage"]},{group:"attach",title:"chatloc.group.attach",keys:["uploadInput","attachment","attachmentUploaded"]},{group:"answer",title:"chatloc.group.answer",keys:["turn","answer","copy","stop"]},{group:"conversations",title:"chatloc.group.conversations",keys:["conversationLink","chatMore","renameItem","renameInput","renameSave"]}];function z(){let{t:e}=(0,g.kj)(),{saving:t,track:l}=E(),[i,r]=(0,n.useState)(null),[o,d]=(0,n.useState)(null),[u,m]=(0,n.useState)(""),[h,p]=(0,n.useState)(""),x=(0,n.useRef)(Promise.resolve()),f=(0,j.DR)(),[v,b]=(0,n.useState)(!1),[y,w]=(0,n.useState)(null),[N,S]=(0,n.useState)(""),C=async()=>{b(!0),S("");try{w(await s.FH.checkLocators()),await f.reload()}catch(e){S(e.message)}finally{b(!1)}},F=e=>{var t;return null!=(t=null==y?void 0:y.results.filter(t=>t.status===e).length)?t:0};return(0,n.useEffect)(()=>{s.FH.settings().then(e=>{var t,l,a,n;let s=null!=(a=(null!=(l=e.raw.copilot)?l:{}).chatLocators)?a:{};r(Object.fromEntries(c.map(e=>{var t;return[e,null!=(t=s[e])?t:""]}))),d(null!=(n=null==(t=e.chat)?void 0:t.defaults)?n:null)}).catch(e=>p(e.message))},[]),(0,n.useEffect)(()=>{if(!i||!o)return;let e=new URLSearchParams(window.location.search).get("locator");if(!e||!c.includes(e))return;let t=document.getElementById("chat-".concat(e));t&&(t.scrollIntoView({block:"center"}),t.focus())},[i,o]),(0,a.jsxs)(W.Provider,{value:l,children:[(0,a.jsxs)("section",{className:"panel",id:"chat-locators","aria-labelledby":"chat-locators-title",children:[(0,a.jsx)("h2",{id:"chat-locators-title",children:e("chatloc.title")}),(0,a.jsx)("p",{className:"muted small",children:e("chatloc.intro")}),(0,a.jsxs)("details",{className:"picker-how",children:[(0,a.jsx)("summary",{children:e("chatloc.howTitle")}),(0,a.jsx)("p",{className:"small",children:e("chatloc.how")})]}),h&&(0,a.jsx)("div",{className:"err",children:h}),(0,a.jsxs)("div",{className:"row locator-check",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void C(),disabled:v||!i,children:v?e("chatloc.checking"):e("chatloc.check")}),(0,a.jsx)(k.q,{label:e("info.about",{name:e("chatloc.check")}),text:e("chatloc.checkWhy")})]}),N&&(0,a.jsx)("div",{className:"err",role:"alert",children:N}),y&&(0,a.jsx)("p",{className:"muted small locator-check-done",role:"status",children:e("chatloc.checkDone",{found:F("found"),none:F("none"),other:F("not-here")})}),i&&o?Z.map(t=>(0,a.jsxs)("div",{className:"locator-group",children:[(0,a.jsx)("h3",{children:e(t.title)}),t.keys.map(t=>{var n,r;let c=null!=(n=f.list.find(e=>e.key===t))?n:null;return(0,a.jsx)(G,{field:t,idPrefix:"chat",label:e("chatloc.".concat(t)),why:e("chatloc.".concat(t,"Why")),initial:i[t],fallback:o[t],example:null,failed:c?(0,a.jsx)(j.Lh,{failure:c,inSettings:!0,onDismiss:()=>void f.dismiss(t)}):null,checked:null!=(r=null==y?void 0:y.results.find(e=>e.key===t))?r:null,onSave:a=>((t,a)=>{let n=async()=>{try{var n,i;let r=(await s.FH.settings()).raw,o={...null!=(n=r.copilot)?n:{}},c={...null!=(i=o.chatLocators)?i:{}};a.trim()?c[t]=a.trim():delete c[t],0===Object.keys(c).length?delete o.chatLocators:o.chatLocators=c,m(""),await l(s.FH.saveSettings({...r,copilot:o})),m(e("loc.saved")),p(""),await f.reload()}catch(e){p(e.message)}},i=x.current.then(n,n);return x.current=i.catch(()=>void 0),i})(t,a)},t)})]},t.group)):!h&&(0,a.jsx)("p",{className:"muted small",children:e("loc.loading")}),(0,a.jsx)(D,{msg:u,saving:t})]}),(0,a.jsx)(J,{failures:f,checked:y})]})}let $=[{key:"popups",label:"steps.popups",why:"steps.popupsWhy"},{key:"feedbackPanel",label:"steps.feedbackPanel",why:"steps.feedbackPanelWhy"},{key:"nameChat",label:"steps.nameChat",why:"steps.nameChatWhy"}],V=["click","press","appear","gone"];function J(e){let{failures:t,checked:l}=e,{t:i}=(0,g.kj)(),{saving:r,track:o}=E(),[c,d]=(0,n.useState)(null),[u,m]=(0,n.useState)(null),[h,p]=(0,n.useState)(""),[x,f]=(0,n.useState)(""),y=(0,n.useRef)(Promise.resolve());(0,n.useEffect)(()=>{s.FH.settings().then(e=>{var t,l;let a=null!=(t=e.raw.copilot)?t:{},n=null!=(l=a.builtInSteps)?l:{};d({popups:!1!==n.popups,feedbackPanel:!1!==n.feedbackPanel,nameChat:!1!==n.nameChat}),m(Array.isArray(a.extraSteps)?a.extraSteps:[])}).catch(e=>f(e.message))},[]);let w=null!==u;(0,n.useEffect)(()=>{if(!w)return;let e=new URLSearchParams(window.location.search).get("locator");if(!e||!e.startsWith("step:"))return;let t=document.getElementById("step-locator-".concat(e.slice(5)));t&&(t.scrollIntoView({block:"center"}),t.focus())},[w]);let N=e=>{let l=async()=>{try{var l;let a=(await s.FH.settings()).raw,n=e({...null!=(l=a.copilot)?l:{}});p(""),await o(s.FH.saveSettings({...a,copilot:n})),p(i("loc.saved")),f(""),await t.reload()}catch(e){f(e.message)}},a=y.current.then(l,l);return y.current=a.catch(()=>void 0),a},R=F(e=>N(t=>({...t,extraSteps:e}))),M=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(e),t?N(t=>({...t,extraSteps:e})):R(e)},W=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u&&M(u.map(l=>l.id===e?{...l,...t}:l),l)},I=(e,t)=>{if(!u)return;let l=e+t;if(l<0||l>=u.length)return;let a=[...u];[a[e],a[l]]=[a[l],a[e]],M(a,!0)},L=async e=>{if(!u)return;let t=u[e];await (0,b.Z)(i("steps.removeConfirm",{name:t.name||i("steps.number",{n:e+1})}),{okLabel:i("steps.remove"),danger:!0})&&M(u.filter((t,l)=>l!==e),!0)};return(0,a.jsxs)("section",{className:"panel",id:"chat-steps","aria-labelledby":"chat-steps-title",children:[(0,a.jsx)("h2",{id:"chat-steps-title",children:i("steps.title")}),(0,a.jsx)("p",{className:"muted small",children:i("steps.intro")}),x&&(0,a.jsx)("div",{className:"err",children:x}),c&&u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"locator-group",children:[(0,a.jsx)("h3",{children:i("steps.builtInTitle")}),$.map(e=>(0,a.jsx)("div",{className:"settings-field",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"step-builtin-".concat(e.key),type:"checkbox",checked:c[e.key],onChange:t=>((e,t)=>{if(!c)return;let l={...c,[e]:t};d(l),N(e=>({...e,builtInSteps:l}))})(e.key,t.target.checked)}),(0,a.jsx)("label",{htmlFor:"step-builtin-".concat(e.key),children:i(e.label)}),(0,a.jsx)(k.q,{label:i("info.about",{name:i(e.label)}),text:i(e.why)})]})},e.key))]}),(0,a.jsxs)("div",{className:"locator-group",children:[(0,a.jsx)("h3",{children:i("steps.ownTitle")}),(0,a.jsx)("p",{className:"muted small",children:i("steps.ownIntro")}),0===u.length&&(0,a.jsx)("p",{className:"muted small",children:i("steps.none")}),u.map((e,n)=>{var s,r,o,c;let d="step:".concat(e.id),m=null!=(s=t.list.find(e=>e.key===d))?s:null,h=null!=(r=null==l?void 0:l.results.find(e=>e.key===d))?r:null,p=e.locator.trim()?v(null,e.locator,document):null,x="press"===e.action?function(e){let t=(null!=e?e:"").trim();return t?/^(?:(?:Control|Shift|Alt|Meta)\+)*(?:[A-Za-z0-9]|F(?:[1-9]|1[0-2])|Escape|Enter|Tab|Space|Backspace|Delete|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Home|End|PageUp|PageDown)$/.test(t)?null:"bad":"none"}(e.key):null;return(0,a.jsxs)("div",{className:"step-row".concat(m?" locator-failed":"").concat(e.off?" step-off":""),"data-locator-field":d,"data-step":e.id,children:[(0,a.jsxs)("div",{className:"row step-head",children:[(0,a.jsx)("strong",{children:i("steps.number",{n:n+1})}),(0,a.jsx)("span",{className:"muted small",children:e.name}),(0,a.jsx)("span",{className:"spacer"}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>I(n,-1),disabled:0===n,"aria-label":i("steps.up"),title:i("steps.up"),children:"↑"}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>I(n,1),disabled:n===u.length-1,"aria-label":i("steps.down"),title:i("steps.down"),children:"↓"}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>void L(n),children:i("steps.remove")})]}),(0,a.jsx)("div",{className:"settings-field",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"step-on-".concat(e.id),type:"checkbox",checked:!e.off,onChange:t=>W(e.id,{off:!t.target.checked},!0)}),(0,a.jsx)("label",{htmlFor:"step-on-".concat(e.id),children:i("steps.on")}),(0,a.jsx)(k.q,{label:i("info.about",{name:i("steps.on")}),text:i("steps.onWhy")})]})}),(0,a.jsx)(C,{id:"step-name-".concat(e.id),label:i("steps.name"),info:i("steps.nameWhy"),children:(0,a.jsx)("input",{id:"step-name-".concat(e.id),type:"text",value:e.name,maxLength:200,onChange:t=>W(e.id,{name:t.target.value})})}),(0,a.jsx)(C,{id:"step-when-".concat(e.id),label:i("steps.when"),info:i("steps.whenWhy"),children:(0,a.jsxs)("select",{id:"step-when-".concat(e.id),value:e.when,onChange:t=>W(e.id,{when:t.target.value},!0),children:[(0,a.jsx)("option",{value:"open",children:i("steps.whenOpen")}),(0,a.jsx)("option",{value:"message",children:i("steps.whenMessage")})]})}),(0,a.jsxs)("div",{className:"settings-field picker-field",children:[(0,a.jsx)(S,{htmlFor:"step-locator-".concat(e.id),label:i("steps.locator"),info:i("steps.locatorWhy")}),(0,a.jsx)("div",{className:"field-control",children:(0,a.jsx)("input",{id:"step-locator-".concat(e.id),type:"text",className:"picker-locator",spellCheck:!1,autoComplete:"off",value:e.locator,"aria-invalid":!(!p&&!m&&e.locator.trim())||void 0,onChange:t=>W(e.id,{locator:t.target.value})})}),e.locator.trim()?p?(0,a.jsx)("div",{className:"err field-after",role:"alert",children:"colons"===p.kind?i("loc.twoColons",{axis:p.axis}):"xpath"===p.kind?i("loc.badXPath",{msg:p.message}):"css"===p.kind?i("loc.badCss",{msg:p.message}):""}):null:(0,a.jsx)("div",{className:"muted small field-after",children:i("steps.noLocator")}),h&&(0,a.jsxs)("p",{className:"small field-after locator-checked ".concat(h.status),"data-status":h.status,children:["found"===h.status?"✓ ".concat(i("chatloc.found",{n:h.count})):"none"===h.status?"✗ ".concat(i("chatloc.notFound")):"– ".concat(i("chatloc.notHere")),h.note&&(0,a.jsxs)("span",{className:"muted",children:[" ",i("chatloc.note.".concat(h.note))]})]}),m&&(0,a.jsx)("div",{className:"field-after",children:(0,a.jsx)(j.Lh,{failure:m,inSettings:!0,onDismiss:()=>void t.dismiss(d)})})]}),(0,a.jsx)(C,{id:"step-action-".concat(e.id),label:i("steps.action"),info:i("steps.actionWhy"),children:(0,a.jsx)("select",{id:"step-action-".concat(e.id),value:e.action,onChange:t=>W(e.id,{action:t.target.value},!0),children:V.map(e=>(0,a.jsx)("option",{value:e,children:i("steps.action.".concat(e))},e))})}),"press"===e.action&&(0,a.jsx)(C,{id:"step-key-".concat(e.id),label:i("steps.key"),info:i("steps.keyWhy"),children:(0,a.jsx)("input",{id:"step-key-".concat(e.id),type:"text",value:null!=(o=e.key)?o:"",maxLength:60,placeholder:"Escape","aria-invalid":!!x||void 0,onChange:t=>W(e.id,{key:t.target.value})})}),x&&(0,a.jsx)("div",{className:"err field-after",role:"alert",children:i("steps.badKey")}),(0,a.jsx)("div",{className:"settings-field",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"step-must-".concat(e.id),type:"checkbox",checked:!!e.must,onChange:t=>W(e.id,{must:t.target.checked},!0)}),(0,a.jsx)("label",{htmlFor:"step-must-".concat(e.id),children:i("steps.must")}),(0,a.jsx)(k.q,{label:i("info.about",{name:i("steps.must")}),text:i("steps.mustWhy")})]})}),(0,a.jsx)(C,{id:"step-wait-".concat(e.id),label:i("steps.waitSec"),info:i("steps.waitSecWhy"),unit:i("steps.seconds"),children:(0,a.jsx)("input",{id:"step-wait-".concat(e.id),type:"number",min:0,max:600,step:1,value:null!=(c=e.waitSec)?c:2,onChange:t=>{let l=Number(t.target.value);Number.isFinite(l)&&l>=0&&l<=600&&W(e.id,{waitSec:l})}})})]},e.id)}),(0,a.jsx)("div",{className:"row",style:{marginTop:8},children:(0,a.jsx)("button",{type:"button",onClick:()=>{if(!u)return;let e="s".concat(Date.now().toString(36)).concat(Math.random().toString(36).slice(2,6));M([...u,{id:e,name:"",when:"message",locator:"",action:"click",must:!1,waitSec:2,off:!1}],!0),window.setTimeout(()=>{var t;return null==(t=document.getElementById("step-name-".concat(e)))?void 0:t.focus()},50)},children:i("steps.add")})})]})]}):!x&&(0,a.jsx)("p",{className:"muted small",children:i("loc.loading")}),(0,a.jsx)(D,{msg:h,saving:r})]})}let Y=[{key:"button",label:"loc.button",why:"loc.buttonWhy"},{key:"rows",label:"loc.rows",why:"loc.rowsWhy"},{key:"model",label:"loc.model",why:"loc.modelWhy"},{key:"provider",label:"loc.provider",why:"loc.providerWhy"},{key:"providerModel",label:"loc.providerModel",why:"loc.providerModelWhy"}];function X(e){var t,l,i,r;let{catalogue:c}=e,{t:d}=(0,g.kj)(),{saving:u,track:m}=E(),[h,p]=(0,n.useState)(null),[x,f]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[b,y]=(0,n.useState)(!1),[w,N]=(0,n.useState)(""),[S,C]=(0,n.useState)(""),F=(0,n.useRef)(Promise.resolve());(0,n.useEffect)(()=>{s.FH.settings().then(e=>{var t,l,a,n,s,i;let r=null!=(a=e.raw.copilot)?a:{},c=null!=(n=r.pickerLocators)?n:{};p(Object.fromEntries(o.map(e=>{var t;return[e,null!=(t=c[e])?t:""]}))),f(null!=(s=null==(t=e.picker)?void 0:t.defaults)?s:null),j(null!=(i=null==(l=e.picker)?void 0:l.dirs)?i:null),y(!0===r.pickerSteps)}).catch(e=>C(e.message))},[]);let R=e=>{let t=async()=>{try{var t;let l=(await s.FH.settings()).raw;N(""),await m(s.FH.saveSettings({...l,copilot:e({...null!=(t=l.copilot)?t:{}})})),N(d("loc.saved")),C("")}catch(e){C(e.message)}},l=F.current.then(t,t);return F.current=l.catch(()=>void 0),l},M=null!=(l=null==c||null==(t=c.options.find(e=>!e.group))?void 0:t.name)?l:"Think deeper",I=null==c?void 0:c.options.find(e=>e.group),L=null!=(i=null==I?void 0:I.group)?i:"Claude",O=null!=(r=null==I?void 0:I.name)?r:"Opus 5.5";return(0,a.jsx)(W.Provider,{value:m,children:(0,a.jsxs)("section",{className:"panel",id:"picker-locators","aria-labelledby":"picker-locators-title",children:[(0,a.jsx)("h2",{id:"picker-locators-title",children:d("loc.title")}),(0,a.jsx)("p",{className:"muted small",children:d("loc.intro")}),(0,a.jsxs)("details",{className:"picker-how",children:[(0,a.jsx)("summary",{children:d("loc.howTitle")}),(0,a.jsxs)("ol",{className:"small",children:[(0,a.jsx)("li",{children:d("loc.how1")}),(0,a.jsx)("li",{children:d("loc.how2")}),(0,a.jsx)("li",{children:d("loc.how3")}),(0,a.jsx)("li",{children:d("loc.how4")})]})]}),S&&(0,a.jsx)("div",{className:"err",children:S}),h&&x?Y.map(e=>{let t;return(0,a.jsx)(G,{field:e.key,label:d(e.label),why:d(e.why),initial:h[e.key],fallback:x[e.key],example:"model"===(t=e.key)?{name:M,names:{model:M}}:"provider"===t?{name:L,names:{provider:L}}:"providerModel"===t?{name:O,names:{model:O,provider:L}}:null,onSave:t=>{let l;return l=e.key,R(e=>{var a;let n={...null!=(a=e.pickerLocators)?a:{}};t.trim()?n[l]=t.trim():delete n[l];let s={...e,pickerLocators:n};return 0===Object.keys(n).length&&delete s.pickerLocators,s})}},e.key)}):!S&&(0,a.jsx)("p",{className:"muted small",children:d("loc.loading")}),(0,a.jsx)("div",{className:"settings-field",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"picker-steps",type:"checkbox",checked:b,disabled:!h,onChange:e=>{let t=e.target.checked;y(t),R(e=>({...e,pickerSteps:t}))}}),(0,a.jsx)("label",{htmlFor:"picker-steps",children:d("loc.steps")}),(0,a.jsx)(k.q,{label:d("info.about",{name:d("loc.steps")}),text:d("loc.stepsWhy")})]})}),v&&(0,a.jsx)("p",{className:"muted small field-after picker-dirs",children:d("loc.stepsWhere",{run:v.run,read:v.read})}),(0,a.jsx)(D,{msg:w,saving:u})]})})}function G(e){let{field:t,idPrefix:l="picker",label:s,why:i,initial:r,fallback:o,example:c,failed:d=null,checked:u=null,onSave:m}=e,{t:h}=(0,g.kj)(),[p,x]=(0,n.useState)(r),[j,b]=(0,n.useState)(null),y=F(e=>m(e)),k="".concat(l,"-").concat(t),w=j?"placeholder"===j.kind?h("loc.noPlaceholder",{ph:j.placeholder}):"colons"===j.kind?h("loc.twoColons",{axis:j.axis}):"xpath"===j.kind?h("loc.badXPath",{msg:j.message}):h("loc.badCss",{msg:j.message}):"",N=p.trim()||o;return(0,a.jsxs)("div",{className:"settings-field picker-field".concat(d?" locator-failed":""),"data-locator-field":t,children:[(0,a.jsx)(S,{htmlFor:k,label:s,info:i}),(0,a.jsxs)("div",{className:"field-control",children:[(0,a.jsx)("input",{id:k,type:"text",className:"picker-locator",spellCheck:!1,autoComplete:"off",value:p,placeholder:o,"aria-invalid":!!j||!!d||void 0,onChange:e=>(e=>{x(e);let l=v(t,e,document);b(l),l||y(e)})(e.target.value)}),(0,a.jsx)("button",{className:"quiet",disabled:!p,onClick:()=>{x(""),b(null),m("")},children:h("loc.default")})]}),j?(0,a.jsx)("div",{className:"err field-after",role:"alert",children:w}):(0,a.jsxs)("p",{className:"muted small field-after picker-note",children:[!p.trim()&&(0,a.jsxs)("span",{children:[h("loc.isDefault")," "]}),c&&(0,a.jsxs)(a.Fragment,{children:[h("loc.example",{name:c.name})," ",(0,a.jsx)("code",{className:"picker-example",children:f(N,c.names)})]})]}),u&&(0,a.jsxs)("p",{className:"small field-after locator-checked ".concat(u.status),"data-status":u.status,children:["found"===u.status?"✓ ".concat(h("chatloc.found",{n:u.count})):"none"===u.status?"✗ ".concat(h("chatloc.notFound")):"– ".concat(h("chatloc.notHere")),u.note&&(0,a.jsxs)("span",{className:"muted",children:[" ",h("chatloc.note.".concat(u.note))]})]}),d&&(0,a.jsx)("div",{className:"field-after",children:d})]})}function Q(){let{t:e}=(0,g.kj)(),{saving:t,track:l}=E(),[i,r]=(0,n.useState)(null),o=(0,n.useRef)(null),c=(0,n.useRef)(Promise.resolve()),[d,u]=(0,n.useState)(2),[m,h]=(0,n.useState)(3),[p,x]=(0,n.useState)(3),[f,v]=(0,n.useState)(2),[j,y]=(0,n.useState)(2),[w,N]=(0,n.useState)(60),[S,M]=(0,n.useState)(240),[W,I]=(0,n.useState)(20),[L,O]=(0,n.useState)(6),[P,A]=(0,n.useState)(900),[H,T]=(0,n.useState)(12e4),[q,B]=(0,n.useState)(!1),[K,U]=(0,n.useState)(60),[_,Z]=(0,n.useState)(!1),[z,$]=(0,n.useState)(90),[V,J]=(0,n.useState)("none"),[Y,X]=(0,n.useState)("confirm"),[G,Q]=(0,n.useState)("ask"),[ee,et]=(0,n.useState)("ask"),[el,ea]=(0,n.useState)("ask"),[en,es]=(0,n.useState)("copy"),[ei,er]=(0,n.useState)("ask"),[eo,ec]=(0,n.useState)(2),[ed,eu]=(0,n.useState)(15),[em,eh]=(0,n.useState)(""),[ep,ex]=(0,n.useState)("");(0,n.useEffect)(()=>{s.FH.settings().then(e=>{var t,l,a,n,s,i,c,d,m;o.current=e.raw,r(e.raw);let p=null!=(t=e.raw.limits)?t:{};h("number"==typeof p.autoContinue?p.autoContinue:3),x("number"==typeof p.reopenWindow?p.reopenWindow:3),u("number"==typeof p.retryBlockedInFreshChat?p.retryBlockedInFreshChat:2),v("number"==typeof p.minApproachesBeforeBlocked?p.minApproachesBeforeBlocked:2),y("number"==typeof p.maxReviewRounds?p.maxReviewRounds:2),N("number"==typeof p.maxIterations?p.maxIterations:60),M("number"==typeof p.maxRunMinutes?p.maxRunMinutes:240),I("number"==typeof p.maxSubtasks?p.maxSubtasks:20),O("number"==typeof p.maxKerriganSends?p.maxKerriganSends:6),T("number"==typeof p.maxMessageChars?p.maxMessageChars:12e4),er(null!=(l=p.subtaskRetryMode)?l:"ask"),ec("number"==typeof p.subtaskRetries?p.subtaskRetries:2),eu("number"==typeof p.subtaskRetryWaitSec?p.subtaskRetryWaitSec:15);let f=null!=(a=e.raw.pacing)?a:{};B(!0===f.gapEnabled),U("number"==typeof f.gapSec?f.gapSec:60),Z(!0===f.gapRandom),$("number"==typeof f.gapMaxSec?f.gapMaxSec:90);let j=null!=(n=e.raw.copilot)?n:{};A("number"==typeof j.replyTimeoutSec?j.replyTimeoutSec:900);let g=null!=(s=e.raw.execution)?s:{};es("exchange"===g.kerriganResult?"exchange":"copy"),Q("run"===g.writtenScripts?"run":"ask"),J(null!=(i=g.isolation)?i:"none"),X(null!=(c=g.mode)?c:"confirm"),et(null!=(d=g.networkFetch)?d:"ask"),ea(null!=(m=g.questions)?m:"ask")}).catch(e=>ex(e.message))},[]);let ef=(t,a,n)=>{let i=async()=>{var i;if(!o.current)return;let c=await s.FH.settings().then(e=>e.raw).catch(()=>o.current),d={...c,[t]:{...null!=(i=c[t])?i:{},[a]:n}};eh("");try{await l(s.FH.saveSettings(d)),o.current=d,r(d),eh(e("exec.saved")),ex("")}catch(e){ex(e.message)}},d=c.current.then(i);return c.current=d.catch(()=>void 0),d},ev=F(e=>ef("limits","retryBlockedInFreshChat",e)),ej=F(e=>ef("limits","autoContinue",e)),eg=F(e=>ef("limits","reopenWindow",e)),eb=F(e=>ef("limits","minApproachesBeforeBlocked",e)),ey=F(e=>ef("limits","maxReviewRounds",e)),ek=F(e=>ef("limits","maxIterations",e)),ew=F(e=>ef("limits","maxRunMinutes",e)),eN=F(e=>ef("limits","maxSubtasks",e)),eS=F(e=>ef("limits","maxKerriganSends",e)),eC=F(e=>ef("copilot","replyTimeoutSec",e)),eF=F(e=>ef("limits","maxMessageChars",e)),eR=F(e=>ef("limits","subtaskRetries",e)),eM=F(e=>ef("limits","subtaskRetryWaitSec",e)),eW=F(e=>ef("pacing","gapSec",e)),eE=F(e=>ef("pacing","gapMaxSec",e)),eI=(e,t)=>ef("execution",e,t),eD=[{id:"auto-continue",label:e("exec.autoContinue"),info:e("exec.autoContinueWhy"),unit:e("exec.autoContinueUnit"),value:m,min:0,max:20,set:h,later:ej},{id:"reopen-window",label:e("exec.reopenWindow"),info:e("exec.reopenWindowWhy"),unit:e("exec.reopenWindowUnit"),value:p,min:0,max:10,set:x,later:eg},{id:"min-approaches",label:e("exec.minApproaches"),info:e("exec.minApproachesWhy"),unit:e("exec.minApproachesUnit"),value:f,min:2,max:20,set:v,later:eb},{id:"max-review-rounds",label:e("exec.maxReviewRounds"),info:e("exec.maxReviewRoundsWhy"),unit:e("exec.maxReviewRoundsUnit"),value:j,min:1,max:6,set:y,later:ey},{id:"retry-blocked",label:e("exec.retryBlocked"),info:e("exec.retryBlockedWhy"),unit:e("exec.retryBlockedTimes"),value:d,min:0,max:5,set:u,later:ev},{id:"max-iterations",label:e("exec.maxIterations"),info:e("exec.maxIterationsWhy"),unit:e("exec.maxIterationsUnit"),value:w,min:5,max:200,set:N,later:ek},{id:"max-minutes",label:e("exec.maxRunMinutes"),info:e("exec.maxRunMinutesWhy"),unit:e("exec.maxRunMinutesUnit"),value:S,min:10,max:1440,set:M,later:ew},{id:"max-subtasks",label:e("exec.maxSubtasks"),info:e("exec.maxSubtasksWhy"),unit:e("exec.maxSubtasksUnit"),value:W,min:1,max:100,set:I,later:eN},{id:"max-kerrigan-sends",label:e("exec.maxKerriganSends"),info:e("exec.maxKerriganSendsWhy"),unit:e("exec.maxKerriganSendsUnit"),value:L,min:1,max:50,set:O,later:eS},{id:"reply-timeout",label:e("exec.replyTimeout"),info:e("exec.replyTimeoutWhy"),unit:e("exec.replyTimeoutUnit"),value:P,min:60,max:10800,set:A,later:eC},{id:"max-message-chars",label:e("exec.maxMessageChars"),info:e("exec.maxMessageCharsWhy"),unit:e("exec.maxMessageCharsUnit"),value:H,min:1e3,max:1e6,set:T,later:eF}];return(0,a.jsxs)("section",{className:"panel",id:"execution","aria-labelledby":"execution-title",children:[(0,a.jsx)("h2",{id:"execution-title",children:e("exec.title")}),(0,a.jsx)("p",{className:"muted small",children:e("exec.intro")}),ep&&(0,a.jsx)("div",{className:"err",children:ep}),eD.map(e=>(0,a.jsx)(C,{id:e.id,label:e.label,info:e.info,unit:e.unit,children:(0,a.jsx)(R,{id:e.id,value:e.value,min:e.min,max:e.max,onChange:t=>{e.set(t),e.later(t)},disabled:!i})},e.id)),(0,a.jsx)("div",{className:"settings-field",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"gap-on",type:"checkbox",checked:q,disabled:!i,onChange:e=>{B(e.target.checked),ef("pacing","gapEnabled",e.target.checked)}}),(0,a.jsx)("label",{htmlFor:"gap-on",children:e("exec.gap")}),(0,a.jsx)(k.q,{label:e("info.about",{name:e("exec.gap")}),text:e("exec.gapWhy")})]})}),q&&(0,a.jsx)(C,{id:"gap-sec",label:e("exec.gapSec"),info:e("exec.gapSecWhy"),unit:e("exec.gapUnit"),children:(0,a.jsx)(R,{id:"gap-sec",value:K,min:1,max:3600,onChange:e=>{U(e),eW(e)},disabled:!i})}),q&&(0,a.jsx)("div",{className:"settings-field gap-random",children:(0,a.jsxs)("div",{className:"field-label check-label",children:[(0,a.jsx)("input",{id:"gap-random",type:"checkbox",checked:_,disabled:!i,onChange:e=>{Z(e.target.checked),ef("pacing","gapRandom",e.target.checked),e.target.checked&&z<K&&($(K),eE(K))}}),(0,a.jsx)("label",{htmlFor:"gap-random",children:e("exec.gapRandom")}),(0,a.jsx)(k.q,{label:e("info.about",{name:e("exec.gapRandom")}),text:e("exec.gapRandomWhy")})]})}),q&&_&&(0,a.jsx)(C,{id:"gap-max",label:e("exec.gapMax"),info:e("exec.gapMaxWhy"),unit:e("exec.gapUnit"),children:(0,a.jsx)(R,{id:"gap-max",value:z,min:K,max:3600,onChange:e=>{$(e),eE(e)},disabled:!i})}),(0,a.jsx)(C,{id:"isolation",label:e("exec.isolation"),info:e("exec.isolationWhy"),children:(0,a.jsxs)("select",{id:"isolation",value:V,onChange:e=>{let t=e.target.value;J(t),eI("isolation",t)},disabled:!i,children:[(0,a.jsx)("option",{value:"none",children:e("exec.isolationNone")}),(0,a.jsx)("option",{value:"none-accepted",children:e("exec.isolationNoneAccepted")}),(0,a.jsx)("option",{value:"separate-account",children:e("exec.isolationAccount")}),(0,a.jsx)("option",{value:"sandbox",children:e("exec.isolationSandbox")}),(0,a.jsx)("option",{value:"vm",children:e("exec.isolationVm")})]})}),(0,a.jsx)(C,{id:"start-mode",label:e("exec.startMode"),info:e("exec.startModeWhy"),children:(0,a.jsxs)("select",{id:"start-mode",value:"confirm"===Y?"confirm":"run"===G?"unattended":"unattended-ask",onChange:async t=>{let l=t.target.value;if("unattended-ask"===l&&"unattended"!==Y&&!await (0,b.Z)(e("exec.modeAutoConfirm"))||"unattended"===l&&!await (0,b.Z)(e("exec.modeAutoAllConfirm")))return;let a="confirm"===l?"confirm":"unattended",n="unattended"===l?"run":"ask";X(a),Q(n),eI("mode",a).then(()=>eI("writtenScripts",n))},disabled:!i,children:[(0,a.jsx)("option",{value:"confirm",children:e("exec.startModeAsk")}),(0,a.jsx)("option",{value:"unattended-ask",children:e("exec.startModeAutoAsk")}),(0,a.jsx)("option",{value:"unattended",children:e("exec.startModeAuto")})]})}),(0,a.jsx)(C,{id:"network-fetch",label:e("exec.networkFetch"),info:e("exec.networkFetchWhy"),children:(0,a.jsxs)("select",{id:"network-fetch",value:ee,onChange:e=>{let t=e.target.value;et(t),eI("networkFetch",t)},disabled:!i,children:[(0,a.jsx)("option",{value:"ask",children:e("exec.networkFetchAsk")}),(0,a.jsx)("option",{value:"refuse",children:e("exec.networkFetchRefuse")}),(0,a.jsx)("option",{value:"run",children:e("exec.networkFetchRun")})]})}),(0,a.jsx)(C,{id:"questions",label:e("exec.questions"),info:e("exec.questionsWhy"),children:(0,a.jsxs)("select",{id:"questions",value:el,onChange:async t=>{let l=t.target.value;("agree"!==l||await (0,b.Z)(e("exec.questionsAgreeConfirm")))&&(ea(l),eI("questions",l))},disabled:!i,children:[(0,a.jsx)("option",{value:"ask",children:e("exec.questionsAsk")}),(0,a.jsx)("option",{value:"agree",children:e("exec.questionsAgree")})]})}),(0,a.jsx)(C,{id:"kerrigan-result",label:e("exec.kerriganResult"),info:e("exec.kerriganResultWhy"),children:(0,a.jsxs)("select",{id:"kerrigan-result",value:en,onChange:e=>{let t="exchange"===e.target.value?"exchange":"copy";es(t),eI("kerriganResult",t)},disabled:!i,children:[(0,a.jsx)("option",{value:"copy",children:e("exec.kerriganResultCopy")}),(0,a.jsx)("option",{value:"exchange",children:e("exec.kerriganResultExchange")})]})}),(0,a.jsx)("h3",{id:"subtask-retry",children:e("exec.subRetryTitle")}),(0,a.jsx)("p",{className:"muted small",children:e("exec.subRetryIntro")}),(0,a.jsx)(C,{id:"subtask-retry-mode",label:e("exec.subRetryMode"),info:e("exec.subRetryModeWhy"),children:(0,a.jsxs)("select",{id:"subtask-retry-mode",value:ei,onChange:e=>{let t=e.target.value;er(t),ef("limits","subtaskRetryMode",t)},disabled:!i,children:[(0,a.jsx)("option",{value:"ask",children:e("exec.subRetryAsk")}),(0,a.jsx)("option",{value:"same",children:e("exec.subRetrySame")}),(0,a.jsx)("option",{value:"fresh",children:e("exec.subRetryFresh")}),(0,a.jsx)("option",{value:"lead",children:e("exec.subRetryLead")})]})}),(0,a.jsx)(C,{id:"subtask-retries",label:e("exec.subRetries"),info:e("exec.subRetriesWhy"),unit:e("exec.subRetriesUnit"),children:(0,a.jsx)(R,{id:"subtask-retries",value:eo,min:0,max:3,onChange:e=>{ec(e),eR(e)},disabled:!i})}),(0,a.jsx)(C,{id:"subtask-retry-wait",label:e("exec.subRetryWait"),info:e("exec.subRetryWaitWhy"),unit:e("exec.subRetryWaitUnit"),children:(0,a.jsx)(R,{id:"subtask-retry-wait",value:ed,min:0,max:600,onChange:e=>{eu(e),eM(e)},disabled:!i})}),(0,a.jsx)(D,{msg:em,saving:t})]})}let ee=/^[a-z0-9][a-z0-9._+-]*$/;function et(){let{t:e}=(0,g.kj)(),{saving:t,track:l}=E(),[i,r]=(0,n.useState)(null),[o,c]=(0,n.useState)([]),[d,u]=(0,n.useState)([]),[m,h]=(0,n.useState)([]),[p,x]=(0,n.useState)({platforms:{},readOnly:[],inForce:[]}),[f,v]=(0,n.useState)(""),[j,y]=(0,n.useState)(""),[w,N]=(0,n.useState)(""),S=(0,n.useCallback)(async()=>{var e,t,l,a;let n=await s.FH.settings(),i=null!=(l=n.raw.execution)?l:{},o=(null!=(a=null==(t=n.defaults)||null==(e=t.execution)?void 0:e.allowedPrograms)?a:[]).slice();h(o),r(Array.isArray(i.allowedPrograms)?i.allowedPrograms:o),c(Array.isArray(i.readOnlyPrograms)?i.readOnlyPrograms:[]),u(Array.isArray(i.runWithoutAsking)?i.runWithoutAsking:[]),n.programs&&x(n.programs)},[]);(0,n.useEffect)(()=>{S().catch(e=>N(e.message))},[S]);let F=async function(t,a){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;N(""),y("");try{var i;let r=(await s.FH.settings()).raw,o={...null!=(i=r.execution)?i:{}};return null===t?(delete o.allowedPrograms,delete o.readOnlyPrograms,delete o.runWithoutAsking):(o.allowedPrograms=t,o.readOnlyPrograms=a,o.runWithoutAsking=n),await l(s.FH.saveSettings({...r,execution:o})),await S(),y(e("prog.saved",{n:(null!=t?t:m).length})),!0}catch(e){return N(e.message),!1}},R=null!=i?i:[],M=async()=>{let t=f.trim().toLowerCase().replace(/\.(exe|cmd|bat|com)$/,"");if(!ee.test(t))return N(e("prog.badName"));if(R.includes(t))return N(e("prog.already",{name:t}));let l=p.readOnly.includes(t)?[...o.filter(e=>e!==t),t]:o;await F([...R,t],l)&&v("")},W=async t=>{await (0,b.Z)(e("prog.removeConfirm",{name:t}),{okLabel:e("prog.removeOk"),danger:!0})&&await F(R.filter(e=>e!==t),o.filter(e=>e!==t),d.filter(e=>e!==t))},I=async(t,l)=>{var a;("run"!==l||await (0,b.Z)(e("prog.modeRunConfirm",{name:null!=(a=p.platforms[t])?a:t})))&&await F(R,"read-only"===l?[...o.filter(e=>e!==t),t]:o.filter(e=>e!==t),"run"===l?[...d.filter(e=>e!==t),t]:d.filter(e=>e!==t))},L=async()=>{await (0,b.Z)(e("prog.restoreConfirm"))&&await F(null,[],[])},O=(e,t)=>e.localeCompare(t,"en",{sensitivity:"base"}),P=R.filter(e=>p.platforms[e]).sort(O),A=R.filter(e=>!p.platforms[e]).sort(O),H=i&&p.inForce.length>0?R.filter(e=>!p.inForce.includes(e)):[],T=R.length<=1,q=t=>(0,a.jsx)("button",{type:"button",className:"quiet prog-remove",onClick:()=>void W(t),disabled:!i||T,"aria-label":e("prog.removeOne",{name:t}),title:T?e("prog.lastWhy"):e("prog.removeOne",{name:t}),children:"✕"});return(0,a.jsxs)("section",{className:"panel",id:"programs","aria-labelledby":"programs-title",children:[(0,a.jsx)("h2",{id:"programs-title",children:e("prog.title")}),(0,a.jsx)("p",{className:"muted small",children:e("prog.intro")}),w&&(0,a.jsx)("div",{className:"err",children:w}),H.length>0&&(0,a.jsx)("p",{className:"reason small",children:e("prog.locked",{list:H.join(", ")})}),P.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{id:"programs-platforms",children:e("prog.platforms")}),P.map(t=>(0,a.jsxs)("div",{className:"settings-field prog-platform",children:[(0,a.jsxs)("div",{className:"field-label",children:[(0,a.jsxs)("label",{htmlFor:"prog-mode-".concat(t),children:[(0,a.jsx)("code",{children:t})," ",(0,a.jsx)("span",{className:"muted",children:p.platforms[t]})]}),(0,a.jsx)(k.q,{label:e("info.about",{name:t}),text:e("prog.modeWhy")})]}),(0,a.jsxs)("div",{className:"field-control",children:[(0,a.jsxs)("select",{id:"prog-mode-".concat(t),value:o.includes(t)?"read-only":d.includes(t)?"run":"ask",onChange:e=>void I(t,e.target.value),disabled:!i,children:[(0,a.jsx)("option",{value:"ask",children:e("prog.modeAsk")}),p.readOnly.includes(t)&&(0,a.jsx)("option",{value:"read-only",children:e("prog.modeReadOnly")}),(0,a.jsx)("option",{value:"run",children:e("prog.modeRun")})]}),q(t)]})]},t)),P.some(e=>o.includes(e))&&(0,a.jsx)("p",{className:"small prog-note",children:e("prog.readOnlyNote")}),P.some(e=>d.includes(e))&&(0,a.jsx)("p",{className:"small prog-note prog-run-note",children:e("prog.runNote",{list:P.filter(e=>d.includes(e)).join(", ")})})]}),(0,a.jsx)("h3",{id:"programs-others",children:e("prog.others")}),(0,a.jsx)("ul",{className:"prog-chips",children:A.map(e=>(0,a.jsxs)("li",{className:"prog-chip",children:[(0,a.jsx)("code",{children:e}),q(e)]},e))}),(0,a.jsxs)(C,{id:"prog-add",label:e("prog.add"),info:e("prog.addWhy"),children:[(0,a.jsx)("input",{id:"prog-add",type:"text",dir:"ltr",spellCheck:!1,autoComplete:"off",value:f,placeholder:"az",onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),M())},disabled:!i}),(0,a.jsx)("button",{type:"button",className:"primary",onClick:()=>void M(),disabled:!i||!f.trim(),children:e("prog.addButton")})]}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("button",{type:"button",onClick:()=>void L(),disabled:!i,children:e("prog.restore")})}),(0,a.jsx)(D,{msg:j,saving:t})]})}let el=[{kind:"ts",name:"TypeScript",ext:".ts .mts .cts .tsx"},{kind:"js",name:"JavaScript",ext:".js .mjs .cjs .jsx"},{kind:"py",name:"Python",ext:".py .pyw"},{kind:"ps1",name:"PowerShell",ext:".ps1 .psm1"},{kind:"cmd",name:"cmd",ext:".bat .cmd"},{kind:"sh",name:"bash",ext:".sh .bash .zsh"},{kind:"other",name:"Ruby, Perl, PHP",ext:".rb .pl .php"},{kind:"npm",name:"npm"}];function ea(){let{t:e,locale:t}=(0,g.kj)(),{saving:l,track:i}=E(),[r,o]=(0,n.useState)(null),[c,d]=(0,n.useState)(null),[u,m]=(0,n.useState)(""),[h,p]=(0,n.useState)(""),x=(0,n.useCallback)(async()=>{var e,t,l,a,n;let i=await s.FH.settings(),r=null!=(a=null==(e=i.raw.execution)?void 0:e.scripts)?a:{},c=null!=(n=null==(l=i.defaults)||null==(t=l.execution)?void 0:t.scripts)?n:{};o(Object.fromEntries(el.map(e=>{var t,l,a,n,s,i,o,d;let{kind:u}=e;return[u,{own:null==(i=null!=(s=null==(t=r[u])?void 0:t.own)?s:null==(l=c[u])?void 0:l.own)||i,written:null!=(d=null!=(o=null==(a=r[u])?void 0:a.written)?o:null==(n=c[u])?void 0:n.written)&&d}]}))),i.scripts&&d(i.scripts)},[]);(0,n.useEffect)(()=>{x().catch(e=>p(e.message))},[x]);let f=async t=>{p(""),m("");try{var l;let a=(await s.FH.settings()).raw,n={...null!=(l=a.execution)?l:{}};null===t?delete n.scripts:n.scripts=t,await i(s.FH.saveSettings({...a,execution:n})),await x(),m(e("scr.saved"))}catch(e){p(e.message)}},v=(e,t,l)=>{if(!r)return;let a={...r,[e]:{...r[e],[t]:l}};o(a),f(a)},j=async()=>{await (0,b.Z)(e("scr.restoreConfirm"))&&await f(null)},y=t=>"npm"===t.kind?e("scr.npm"):t.name,w=[...el].sort((e,l)=>y(e).localeCompare(y(l),t,{sensitivity:"base"})),N=!!r&&Object.values(r).some(e=>e.written),S=!!r&&!!c&&el.some(e=>{var t,l;let{kind:a}=e;return(null==(t=r[a])?void 0:t.written)&&!(null==(l=c.inForce[a])?void 0:l.written)});return(0,a.jsxs)("section",{className:"panel",id:"scripts","aria-labelledby":"scripts-title",children:[(0,a.jsx)("h2",{id:"scripts-title",children:e("scr.title")}),(0,a.jsx)("p",{className:"muted small",children:e("scr.intro")}),h&&(0,a.jsx)("div",{className:"err",children:h}),S&&(0,a.jsx)("p",{className:"reason small",children:e("scr.locked")}),(0,a.jsxs)("table",{className:"scripts-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{scope:"col",children:e("scr.kind")}),(0,a.jsx)("th",{scope:"col",children:(0,a.jsxs)("span",{className:"scripts-head",children:[e("scr.own")," ",(0,a.jsx)(k.q,{label:e("info.about",{name:e("scr.own")}),text:e("scr.ownWhy")})]})}),(0,a.jsx)("th",{scope:"col",children:(0,a.jsxs)("span",{className:"scripts-head",children:[e("scr.written")," ",(0,a.jsx)(k.q,{label:e("info.about",{name:e("scr.written")}),text:e("scr.writtenWhy")})]})})]})}),(0,a.jsx)("tbody",{children:w.map(t=>{var l,n,s,i;return(0,a.jsxs)("tr",{"data-kind":t.kind,children:[(0,a.jsxs)("th",{scope:"row",children:[y(t)," ",t.ext&&(0,a.jsx)("code",{className:"muted small",dir:"ltr",children:t.ext})]}),(0,a.jsx)("td",{children:(0,a.jsx)("input",{type:"checkbox",id:"scr-".concat(t.kind,"-own"),"aria-label":e("scr.ownOf",{kind:y(t)}),checked:null==(s=null==r||null==(l=r[t.kind])?void 0:l.own)||s,disabled:!r,onChange:e=>v(t.kind,"own",e.target.checked)})}),(0,a.jsx)("td",{children:(0,a.jsx)("input",{type:"checkbox",id:"scr-".concat(t.kind,"-written"),"aria-label":e("scr.writtenOf",{kind:y(t)}),checked:null!=(i=null==r||null==(n=r[t.kind])?void 0:n.written)&&i,disabled:!r,onChange:e=>v(t.kind,"written",e.target.checked)})})]},t.kind)})})]}),N&&(0,a.jsx)("p",{className:"small prog-note",children:e("scr.writtenNote")}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("button",{type:"button",onClick:()=>void j(),disabled:!r,children:e("scr.restore")})}),(0,a.jsx)(D,{msg:u,saving:l})]})}},94969:(e,t,l)=>{"use strict";l.d(t,{V:()=>s});var a=l(1521);let n='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function s(e,t,l){(0,a.useEffect)(()=>{var a,s;if(!t)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=e.current,o=null!=(s=null!=(a=null==l?void 0:l.current)?a:null==r?void 0:r.querySelector(n))?s:null;null==o||o.focus();let c=e=>{if("Tab"!==e.key||!r)return;let t=Array.from(r.querySelectorAll(n)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let l=t[0],a=t[t.length-1],s=r.contains(document.activeElement);e.shiftKey&&(document.activeElement===l||!s)?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a&&s||(e.preventDefault(),l.focus())};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),i&&document.contains(i)&&i.focus()}},[e,t,l])}}},e=>{e.O(0,[7921,2347,3131,7358],()=>e(e.s=65323)),_N_E=e.O()}]);
|
package/dist/web/_next/static/chunks/{webpack-78ec62098b09e4a0.js → webpack-33252b1a0a7d93ba.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={},a={};function f(d){var c=a[d];if(void 0!==c)return c.exports;var b=a[d]={exports:{}},t=!0;try{e[d].call(b.exports,b,b.exports,f),t=!1}finally{t&&delete a[d]}return b.exports}f.m=e,(()=>{var e=[];f.O=(a,d,c,b)=>{if(d){b=b||0;for(var t=e.length;t>0&&e[t-1][2]>b;t--)e[t]=e[t-1];e[t]=[d,c,b];return}for(var r=1/0,t=0;t<e.length;t++){for(var[d,c,b]=e[t],o=!0,n=0;n<d.length;n++)(!1&b||r>=b)&&Object.keys(f.O).every(e=>f.O[e](d[n]))?d.splice(n--,1):(o=!1,b<r&&(r=b));if(o){e.splice(t--,1);var i=c();void 0!==i&&(a=i)}}return a}})(),f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},(()=>{var e,a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;f.t=function(d,c){if(1&c&&(d=this(d)),8&c||"object"==typeof d&&d&&(4&c&&d.__esModule||16&c&&"function"==typeof d.then))return d;var b=Object.create(null);f.r(b);var t={};e=e||[null,a({}),a([]),a(a)];for(var r=2&c&&d;"object"==typeof r&&!~e.indexOf(r);r=a(r))Object.getOwnPropertyNames(r).forEach(e=>t[e]=()=>d[e]);return t.default=()=>d,f.d(b,t),b}})(),f.d=(e,a)=>{for(var d in a)f.o(a,d)&&!f.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((a,d)=>(f.f[d](e,a),a),[])),f.u=e=>"static/chunks/"+(({1384:"17449abc",2060:"20154aaa",4033:"f99cb6a2",5459:"85120a0e",6543:"2398d077",7100:"82d3f3cb",7278:"63b9f8e2",8653:"a9ddb983",9346:"c7ea4e13"})[e]||e)+"."+({12:"06a7f14bd6716249",76:"f9c2aea58a61692f",80:"df762af692aca107",192:"955be0d5fcd27ec6",344:"41cc997c8c8deeed",358:"4791f77f174006f3",384:"063f394c789898a7",386:"2718f961400a3322",441:"172f3f581f0030d1",442:"2e236a6c5c413bd9",464:"f60ecfb6c72ec733",603:"4055460889ea24d8",640:"2c2baacde5197a77",642:"b70763e1cfe9e45e",714:"
|
|
1
|
+
(()=>{"use strict";var e={},a={};function f(d){var c=a[d];if(void 0!==c)return c.exports;var b=a[d]={exports:{}},t=!0;try{e[d].call(b.exports,b,b.exports,f),t=!1}finally{t&&delete a[d]}return b.exports}f.m=e,(()=>{var e=[];f.O=(a,d,c,b)=>{if(d){b=b||0;for(var t=e.length;t>0&&e[t-1][2]>b;t--)e[t]=e[t-1];e[t]=[d,c,b];return}for(var r=1/0,t=0;t<e.length;t++){for(var[d,c,b]=e[t],o=!0,n=0;n<d.length;n++)(!1&b||r>=b)&&Object.keys(f.O).every(e=>f.O[e](d[n]))?d.splice(n--,1):(o=!1,b<r&&(r=b));if(o){e.splice(t--,1);var i=c();void 0!==i&&(a=i)}}return a}})(),f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},(()=>{var e,a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;f.t=function(d,c){if(1&c&&(d=this(d)),8&c||"object"==typeof d&&d&&(4&c&&d.__esModule||16&c&&"function"==typeof d.then))return d;var b=Object.create(null);f.r(b);var t={};e=e||[null,a({}),a([]),a(a)];for(var r=2&c&&d;"object"==typeof r&&!~e.indexOf(r);r=a(r))Object.getOwnPropertyNames(r).forEach(e=>t[e]=()=>d[e]);return t.default=()=>d,f.d(b,t),b}})(),f.d=(e,a)=>{for(var d in a)f.o(a,d)&&!f.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((a,d)=>(f.f[d](e,a),a),[])),f.u=e=>"static/chunks/"+(({1384:"17449abc",2060:"20154aaa",4033:"f99cb6a2",5459:"85120a0e",6543:"2398d077",7100:"82d3f3cb",7278:"63b9f8e2",8653:"a9ddb983",9346:"c7ea4e13"})[e]||e)+"."+({12:"06a7f14bd6716249",76:"f9c2aea58a61692f",80:"df762af692aca107",192:"955be0d5fcd27ec6",344:"41cc997c8c8deeed",358:"4791f77f174006f3",384:"063f394c789898a7",386:"2718f961400a3322",441:"172f3f581f0030d1",442:"2e236a6c5c413bd9",464:"f60ecfb6c72ec733",603:"4055460889ea24d8",640:"2c2baacde5197a77",642:"b70763e1cfe9e45e",714:"acea3698b6af7a61",795:"710d39b80c9ae80c",896:"eb46d6e001d25d0f",937:"6d8406b06135134f",948:"132a0571d85c8b01",972:"db753db904050e48",992:"8470b96c23472686",1017:"ce926873b598fb89",1077:"626a11362f53d35c",1083:"0122bea31f7199d9",1350:"a5dc706c8110fd34",1384:"fa53da036b7dcfb4",1490:"f5154054ddfd3dee",1536:"98fab69162f370f0",1548:"79f05ff765581b0a",1584:"7500138d08971f81",1706:"db51b57351297898",1707:"7d64ffc060c697a0",1732:"90182d376c75c315",1872:"d12259d09bb1173f",1880:"87829ecb91209eda",1920:"59b93a4215a75653",2037:"d1bb5e37c7fe85ae",2060:"28032c3aa5bcd84d",2063:"4745e20abad5b208",2163:"09f1212655504f3a",2175:"8c8957600f6b88a8",2280:"5a3754f49656d989",2355:"d6bb92f10d516f81",2378:"4f15342be64a9d23",2395:"c2c4d3696d3b5542",2435:"9b433b38d34b4b2e",2486:"d130023b2b399eaa",2506:"bc8515842e225d2a",2529:"c88688b437d71d68",2606:"8e9434e7fee257b9",2738:"2559ed1058f6fb19",2821:"409d92f5ac5b8142",2908:"4e0e875d2d471932",3088:"12b1d19ca55225b7",3117:"a4e1c3348e8bead9",3152:"d623d85a9afed5d3",3184:"0788c67536fc4140",3194:"8ee589997ce1e093",3233:"1dcc2798f7f5efa0",3322:"4f7b378a41711478",3564:"bfa030e92401f57d",3690:"f691d3fcbd70073d",3696:"a367f4c8f42909d1",3748:"8726b202d79d0dba",3794:"19aedfb95f89dc48",3804:"593b14643e74a2a1",3816:"9f5568918e35e4ef",3854:"39b7a1bf2b4189fe",3859:"f56f3c6ac4b74cf1",3976:"11b159e82e0aa974",3986:"d47ed4855773e6dd",4008:"3691a32e1711848f",4033:"3f570aeba3860608",4054:"1c8d37b1513d20d8",4328:"e326d66dd5c820c6",4444:"36f5d8532bd6300d",4459:"d6df347eb58fccd7",4560:"b8235d283fb3608c",4619:"ae3628373decf74f",4623:"d5711a8d967e49f4",4670:"6b811cc3f67a851c",4812:"0af1380aa478f6d3",4912:"1ab85b0ebf52a3e0",4969:"4f7aff472cf938bf",4982:"bbbd303d665de4f0",5052:"dc8c36742419eed5",5115:"fbe164892bfd6fa4",5120:"b4aadb89d4fb4f65",5448:"1c4e0b719af53b3f",5459:"ac16dccf0b8d73d3",5664:"507fea1f6305067e",5706:"be484c6a7bed3fde",5790:"fe114d1a18741d62",6072:"b4b359b24b1738d4",6230:"8645bbed143793da",6260:"6b5b5c9713d7133f",6336:"b09d0d920c7631eb",6364:"5b0466f24f4ecf58",6419:"61399b0413b8bef0",6421:"3ace3aefc3e7350e",6542:"963ec591b5c2bc5a",6543:"79ae940919b9695e",6554:"0110334a71e72bbe",6688:"4a6ac23ba061262b",6885:"8fb8eeb9e792b515",6891:"dd910309748ad46b",6896:"33fdeb4e682c2cab",6912:"3416822e13b4bc03",6944:"635230aa8cb23871",6964:"35718884ad3375bc",6992:"4b059bae2659231d",6996:"7c41217972cabc3f",7024:"8bc670b892a558bb",7040:"e058d8f95c3c11e7",7100:"23be11b749288234",7220:"1eba10bd9d449cea",7250:"7f1d45021e49d2fd",7278:"218fd437b256a7e4",7290:"7bceed706f7b6df5",7301:"c60eb2ba8ae6b859",7307:"39c27470a879fd0a",7328:"021e5e45124e40de",7333:"04d0e45b223dadd4",7340:"a5a75ee889c30b74",7443:"c189418756727101",7484:"c0e6bfca7b2fb65e",7489:"395193bf37b80884",7496:"e638a7286c17e438",7507:"9fd648884587a7f3",7664:"bd6265e6e94e1ecd",7695:"11ba99db589cb586",7764:"e62333ee1d63a458",7872:"9b08a88b7289949f",8024:"4bd0b5a7f26a0f7d",8173:"b82aa1855e641605",8216:"b248ebe0af447347",8360:"371456f14873ee9f",8381:"2d6783c030f8a913",8544:"7c1fb012f9073eaa",8547:"424f9970cc72775f",8584:"b5aac5354f124d4b",8616:"8e05c4a20dcdf39d",8653:"8bbb677720017a57",8662:"f2663643214caed1",8689:"e564346c6e0d16be",8752:"bf29293df3366e17",8800:"3c7b01176e98160a",8924:"49dd385ac101fb7e",9003:"3d5c7a418d0b858b",9067:"177163495f3bd8fa",9068:"9662bb8fa5fdc637",9125:"8589db5ba200cbf1",9178:"a7631bd283f2a69c",9190:"e3a90b1a9ed21668",9202:"8dcf7e6a85cc3d36",9249:"916a423ac8a07e76",9296:"59fcfc8261a4c6bd",9312:"e1fb4089a122d3d3",9313:"e4f6405d96375c40",9346:"9b71b5f026a1d6d4",9348:"022486b05b882739",9418:"1e8f8e14bb5fe3ae",9591:"d205941f0062de24",9628:"d8954a2bd28b85a6",9636:"35df6241125f8513",9658:"cdecb568f615e4c9",9680:"d10b204d08ca3a62",9728:"1d4cb6c68bd55f44",9747:"5b9d763e89abc7e4",9763:"da9015d4a1b533b9",9784:"c9938b7e977e14eb",9812:"024424a52730b057",9884:"8712c5ed7b044ff2",9888:"ce925cd415b672ef",9891:"a97db7c8f05693d1",9904:"a3d2f8569d7355ab",9924:"03252dda78c705c3",9968:"3d45ff9183e8b07b",9984:"cdabea5a592e42a1"})[e]+".js",f.miniCssF=e=>"static/css/"+({2737:"4bfdd3ebb3d1a180",3499:"2de713eca93a7750",5591:"73368887921d70d9"})[e]+".css",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={},a="_N_E:";f.l=(d,c,b,t)=>{if(e[d])return void e[d].push(c);if(void 0!==b)for(var r,o,n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var l=n[i];if(l.getAttribute("src")==d||l.getAttribute("data-webpack")==a+b){r=l;break}}r||(o=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,f.nc&&r.setAttribute("nonce",f.nc),r.setAttribute("data-webpack",a+b),r.src=f.tu(d)),e[d]=[c];var u=(a,f)=>{r.onerror=r.onload=null,clearTimeout(s);var c=e[d];if(delete e[d],r.parentNode&&r.parentNode.removeChild(r),c&&c.forEach(e=>e(f)),a)return a(f)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),o&&document.head.appendChild(r)}})(),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.U=function(e){var a=new URL(e,"x:/"),f={};for(var d in a)f[d]=a[d];for(var d in f.href=e,f.pathname=e.replace(/[?#].*/,""),f.origin=f.protocol="",f.toString=f.toJSON=()=>e,f)Object.defineProperty(this,d,{enumerable:!0,configurable:!0,value:f[d]})},f.U.prototype=URL.prototype,(()=>{var e;f.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),f.tu=e=>f.tt().createScriptURL(e),f.p="/_next/",(()=>{var e={8068:0};f.f.miniCss=(a,d)=>{e[a]?d.push(e[a]):0!==e[a]&&({2737:1,3499:1,5591:1})[a]&&d.push(e[a]=(e=>new Promise((a,d)=>{var c=f.miniCssF(e),b=f.p+c;if(((e,a)=>{for(var f=document.getElementsByTagName("link"),d=0;d<f.length;d++){var c=f[d],b=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(b===e||b===a))return c}for(var t=document.getElementsByTagName("style"),d=0;d<t.length;d++){var c=t[d],b=c.getAttribute("data-href");if(b===e||b===a)return c}})(c,b))return a();((e,a,f,d)=>{var c=document.createElement("link");return c.rel="stylesheet",c.type="text/css",c.onerror=c.onload=b=>{if(c.onerror=c.onload=null,"load"===b.type)f();else{var t=b&&("load"===b.type?"missing":b.type),r=b&&b.target&&b.target.href||a,o=Error("Loading CSS chunk "+e+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.type=t,o.request=r,c.parentNode.removeChild(c),d(o)}},c.href=a,!function(e){if("function"==typeof _N_E_STYLE_LOAD){let{href:a,onload:f,onerror:d}=e;_N_E_STYLE_LOAD(0===a.indexOf(window.location.origin)?new URL(a).pathname:a).then(()=>null==f?void 0:f.call(e,{type:"load"}),()=>null==d?void 0:d.call(e,{}))}else document.head.appendChild(e)}(c)})(e,b,a,d)}))(a).then(()=>{e[a]=0},f=>{throw delete e[a],f}))}})(),(()=>{f.b=document.baseURI||self.location.href;var e={8068:0,7353:0};f.f.j=(a,d)=>{var c=f.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(/^(2737|3499|5591|7353|8068)$/.test(a))e[a]=0;else{var b=new Promise((f,d)=>c=e[a]=[f,d]);d.push(c[2]=b);var t=f.p+f.u(a),r=Error();f.l(t,d=>{if(f.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var b=d&&("load"===d.type?"missing":d.type),t=d&&d.target&&d.target.src;r.message="Loading chunk "+a+" failed.\n("+b+": "+t+")",r.name="ChunkLoadError",r.type=b,r.request=t,c[1](r)}},"chunk-"+a,a)}},f.O.j=a=>0===e[a];var a=(a,d)=>{var c,b,[t,r,o]=d,n=0;if(t.some(a=>0!==e[a])){for(c in r)f.o(r,c)&&(f.m[c]=r[c]);if(o)var i=o(f)}for(a&&a(d);n<t.length;n++)b=t[n],f.o(e,b)&&e[b]&&e[b][0](),e[b]=0;return f.O(i)},d=self.webpackChunk_N_E=self.webpackChunk_N_E||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})()})();
|