@staff0rd/assist 0.1022.1 → 0.1022.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -245,7 +245,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
245
245
|
transition: none;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
`}function bC(){if(document.head.querySelector(`[${hC}]`))return;let e=document.documentElement,t=document.createElement("style");t.setAttribute(hC,""),t.textContent=gC(Fa(e)),document.head.append(t),Qf(e,o=>{t.textContent=gC(o)})}function TC(e){let t={type:"assist-send",...e};return Ff(t)}var mO=S(G2(),1);var Qk=["keydown","keyup","keypress"];function K2(e){for(let t of Qk)e.addEventListener(t,o=>o.stopPropagation())}var cl=S(U(),1);function Y2({color:e,radius:t}){return{MuiMenu:{styleOverrides:{paper:{borderRadius:t.md},list:{padding:4}}},MuiMenuItem:{styleOverrides:{root:{minHeight:30,padding:"5px 10px",borderRadius:4,fontSize:13,"&:hover":{backgroundColor:e.raised},"& .MuiListItemIcon-root":{minWidth:28},"& .MuiSvgIcon-root":{fontSize:16},"& .MuiListItemText-primary":{fontSize:13}}}}}}function X2(e){let{color:t,radius:o,elevation:r,type:n}=e,a={border:`1px solid ${t.line}`};return{...Y2(e),MuiTooltip:{styleOverrides:{tooltip:{...a,backgroundColor:t.overlay.background,color:t.overlay.text,borderRadius:o.md,boxShadow:r.overlay,fontSize:`${n.scale.caption/16}rem`,padding:"6px 10px"},arrow:{color:t.overlay.background}}},MuiPopover:{styleOverrides:{paper:{...a,boxShadow:r.overlay}}},MuiBackdrop:{styleOverrides:{root:{"&:not(.MuiBackdrop-invisible)":{backgroundColor:t.scrim,backdropFilter:"blur(2px)"}}}},MuiDialog:{styleOverrides:{paper:{...a,backgroundColor:t.surface,borderRadius:o.md+4,boxShadow:r.dialog}}}}}var Q2=({variant:e})=>e==="outlined"||e==="tonal",W2=[{props:{size:"small"},style:{minHeight:26,padding:"4px 9px",fontSize:12}},{props:Q2,style:{padding:"5px 11px"}},{props:e=>Q2(e)&&e.size==="small",style:{padding:"3px 8px"}}];var Pm=["primary","secondary","success","warning","error","info"];function Ac(e,t){return{backgroundColor:Ht(e,t),borderColor:Ht(e,.35),color:e}}function Z2({color:e}){return[{props:{variant:"tonal"},style:{backgroundColor:e.raised,border:`1px solid ${e.line}`,color:e.text.primary,"&:hover":{backgroundColor:e.raised,borderColor:e.text.disabled}}},...Pm.filter(t=>t!=="primary").map(t=>({props:{variant:"tonal",color:t},style:{...Ac(e[t].main,.16),"&:hover":Ac(e[t].main,.24)}}))]}var J2={"& > *:nth-of-type(1)":{fontSize:16}};function eO(e){let{color:t,radius:o,density:r}=e,{minHeight:n,fontSize:a,paddingX:i}=r.button;return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{minHeight:n,padding:`6px ${i}px`,borderRadius:o.sm,fontSize:a,fontWeight:600,lineHeight:"18px"},startIcon:{marginLeft:-2,marginRight:6,...J2},endIcon:{marginLeft:6,marginRight:-2,...J2}},variants:[...W2,{props:{variant:"text",color:"primary"},style:{color:t.text.secondary,"&:hover":{backgroundColor:t.raised,color:t.text.primary}}},...Z2(e),{props:{variant:"outlined",color:"error"},style:{borderColor:Ht(t.error.main,.35),"&:hover":{borderColor:t.error.main,backgroundColor:Ht(t.error.main,.1)}}}]}}}function zT({color:e},t){return[{props:{variant:t,color:"default"},style:{backgroundColor:"transparent",border:`1px solid ${e.line}`,color:e.text.secondary,"&.MuiChip-clickable:hover":{backgroundColor:e.raised}}},...Pm.map(o=>({props:{variant:t,color:o},style:{...Ac(e[o].main,.14),borderColor:"transparent","& .MuiChip-deleteIcon":{color:Ht(e[o].main,.7),"&:hover, &:active":{color:e[o].main}},"&.MuiChip-clickable:hover":{backgroundColor:Ht(e[o].main,.22)}}}))]}function tO(e){return{MuiChip:{styleOverrides:{root:{height:20,fontSize:11,fontWeight:600,borderRadius:999},sizeSmall:{height:20,"& .MuiChip-label":{padding:"0 7px"}},label:{padding:"0 8px"},icon:{fontSize:14,marginLeft:6,marginRight:-2},deleteIcon:{fontSize:14,marginLeft:-2,marginRight:4},outlined:{borderColor:e.color.line}},variants:[...zT(e,"tonal"),...zT(e,"filled")]}}}function oO(e){return{...eO(e),MuiButtonGroup:{defaultProps:{disableElevation:!0},variants:[{props:{variant:"tonal"},style:{"& .MuiButtonGroup-middleButton, & .MuiButtonGroup-lastButton":{marginLeft:-1}}}]},...tO(e)}}var kT=e=>`color-mix(in srgb, currentColor ${e}%, transparent)`,Wk={".MuiAppBar-root &":{color:"inherit","&:hover":{backgroundColor:kT(8)},"&.Mui-selected":{color:"inherit",backgroundColor:kT(12),boxShadow:`inset 0 0 0 1px ${kT(18)}`}}};function rO({color:e,radius:t}){return{MuiTabs:{styleOverrides:{root:{minHeight:40,alignItems:"center"},list:{gap:2},indicator:{display:"none"}}},MuiTab:{styleOverrides:{root:{minHeight:30,padding:"6px 10px",borderRadius:t.sm,textTransform:"none",fontSize:13,fontWeight:500,opacity:1,color:e.text.secondary,"&:hover":{backgroundColor:e.raised,color:e.text.primary},"&.Mui-selected":{color:e.text.primary,backgroundColor:e.raised,boxShadow:`inset 0 0 0 1px ${e.line}`},...!e.appBar&&Wk}}}}}var nO=(e,t)=>({width:e,height:e,"& .MuiSvgIcon-root":{fontSize:t}});function aO({color:e,radius:t,density:o}){let{side:r,icon:n,smallSide:a,smallIcon:i}=o.iconButton;return{MuiIconButton:{styleOverrides:{root:{...nO(r,n),padding:0,borderRadius:t.sm,"&:hover":{backgroundColor:e.raised}}},variants:[{props:{size:"small"},style:nO(a,i)},{props:{color:"default"},style:{color:e.text.secondary,"&:hover":{color:e.text.primary},...!e.appBar&&{".MuiAppBar-root &, .MuiAppBar-root &:hover":{color:"inherit"}}}}]}}}function iO({color:e,radius:t}){return{MuiToggleButtonGroup:{styleOverrides:{root:{padding:2,gap:2,border:`1px solid ${e.line}`,borderRadius:t.sm,backgroundColor:e.background},grouped:{margin:0,border:0,borderRadius:4}}},MuiToggleButton:{styleOverrides:{root:{padding:"3px 8px",border:0,borderRadius:4,fontSize:13,fontWeight:500,lineHeight:"18px",textTransform:"none",color:e.text.secondary,"& .MuiSvgIcon-root":{fontSize:16},"&:hover":{backgroundColor:"transparent",color:e.text.primary},"&.Mui-selected, &.Mui-selected:hover":{backgroundColor:e.raised,color:e.text.primary}}}}}}var Rm=".MuiOutlinedInput-notchedOutline";function sO({color:e,radius:t,density:o}){let r=o.inputFontSize;return{MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.background,borderRadius:t.sm,fontSize:r,color:e.text.primary,[`& ${Rm}`]:{borderColor:e.line},[`&:hover ${Rm}`]:{borderColor:e.text.disabled},[`&.Mui-focused ${Rm}`]:{borderColor:e.primary.main,borderWidth:1},[`&.Mui-error ${Rm}`]:{borderColor:e.error.main}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:r,color:e.text.secondary,"&.Mui-focused":{color:e.primary.main}}}},MuiSelect:{styleOverrides:{icon:{color:e.text.disabled}}}}}function lO({color:e,density:t}){let{width:o,height:r,thumb:n}=t.switch;return{MuiSwitch:{styleOverrides:{root:{width:o,height:r,padding:0,"& .MuiSwitch-switchBase":{padding:2,color:e.text.secondary,"&.Mui-checked":{transform:`translateX(${o-r}px)`,color:e.primary.contrastText},"&.Mui-checked + .MuiSwitch-track":{backgroundColor:e.primary.main,opacity:1}},"& .MuiSwitch-thumb":{width:n,height:n,boxShadow:"none"},"& .MuiSwitch-track":{borderRadius:r/2,backgroundColor:e.line,opacity:1}}}},MuiFormControlLabel:{styleOverrides:{root:{"&:has(.MuiSwitch-root)":{marginLeft:0,gap:8}}}}}}function uO(e){let{appBar:t}=e.color;return{...X2(e),...oO(e),...aO(e),...iO(e),...sO(e),...lO(e),...rO(e),MuiPaper:{styleOverrides:{root:{backgroundImage:"none"},outlined:{borderColor:e.color.line}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar},styleOverrides:{root:t&&{backgroundColor:t.background,color:t.text,borderBottom:`1px solid ${e.color.line}`}}}}}var ln=e=>`${e/16}rem`;function cO({font:e,type:t}){let{scale:o}=t;return{fontFamily:e.ui,fontFamilyMono:e.mono,fontSize:t.fontSize,button:{...t.button,fontSize:ln(o.button)},caption:{fontSize:ln(o.caption)},body2:{fontSize:ln(o.body2)},body1:{fontSize:ln(o.body1)},subtitle2:{fontSize:ln(o.subtitle2)},subtitle1:{fontSize:ln(o.subtitle1)},h6:{fontSize:ln(o.h6)},h5:{fontSize:ln(o.h5)},h4:{fontSize:ln(o.h4)}}}function pO(e){return{MuiButtonBase:{styleOverrides:{root:{cursor:"pointer","&.Mui-disabled":{cursor:"default"}}}},MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar}}}}function Zk(e,t){let{dark:o,light:r,densities:n,...a}=Va;return{...a,...e==="dark"?o:r,mode:e,density:n[t]}}function fO(e,t="desktop"){let o=Zk(e,t),{color:r}=o;return br({tokens:o,palette:{mode:e,background:{default:r.background,paper:r.surface},primary:r.primary,secondary:r.secondary,success:r.success,warning:r.warning,error:r.error,info:r.info,check:r.check,text:r.text,divider:r.line,action:{hover:r.raised,selected:r.selected}},typography:cO(o),shape:{borderRadius:o.radius.sm},spacing:o.spacing,components:{...pO(o),...uO(o)}})}var UT=S(z(),1);function dO({children:e}){let[t,o]=(0,cl.useState)(()=>Fa(document.documentElement));(0,cl.useEffect)(()=>Qf(document.documentElement,o),[]);let r=(0,cl.useMemo)(()=>fO(t),[t]);return(0,UT.jsx)(Vp,{theme:r,children:(0,UT.jsx)(_t,{sx:{fontFamily:"fontFamily"},children:e})})}var LT=S(z(),1);function Om(e,t,o){let r=e.shadowRoot??e.attachShadow({mode:"open"});K2(e);let n=document.createElement("div"),a=document.createElement("div");a.style.cssText="width:100%;font:inherit;color:inherit",r.append(n,a);let i=qc({key:t,container:n}),s=(0,mO.createRoot)(a);return s.render((0,LT.jsx)(uy,{value:i,children:(0,LT.jsx)(dO,{children:o})})),s}function yO(e,t){let o=t.closest('dialog, [role="dialog"]'),r=o?e4:Jk,n=()=>{e.style.cssText=r(t)};return n(),o?(e.setAttribute("popover","manual"),o.append(e),e.showPopover?.()):document.body.append(e),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}function Jk(e){let{top:t,left:o}=hO(e);return["position: absolute",`top: ${t+window.scrollY}px`,`left: ${o+window.scrollX}px`,"width: 320px","z-index: 2147483646"].join(";")}function e4(e){let{top:t,left:o}=hO(e);return["position: fixed","inset: auto",`top: ${t}px`,`left: ${o}px`,"width: 320px","height: auto","margin: 0","padding: 0","border: 0","background: transparent","overflow: visible"].join(";")}function hO(e){let t=e.getBoundingClientRect(),o=Math.max(16,Math.min(t.left,window.innerWidth-320-16));return{top:t.bottom+4,left:o}}var Mc=null;function t4(){Mc?.close()}function gO(e,t){let o=Mc?.anchor;if(t4(),o===e)return;let r=document.createElement("div");r.setAttribute("data-assist-popover","");let n=yO(r,e),a=()=>{Mc?.close===a&&(Mc=null,n(),r.remove(),queueMicrotask(()=>i.unmount()))};Mc={anchor:e,close:a};let i=Om(r,"assist-popover",t(s=>{a(),s&&e.focus()}))}function bO(e){try{return decodeURIComponent(e)}catch{return e}}var o4=/^\/([^/]+)\/([^/]+)\/_git\/([^/]+)\/pullrequest\/([1-9]\d*)(?=\/|$)/i,r4=/^(?:\/DefaultCollection)?\/([^/]+)\/_git\/([^/]+)\/pullrequest\/([1-9]\d*)(?=\/|$)/i,n4=/^([^.]+)\.visualstudio\.com$/;function a4(e,t){if(e==="dev.azure.com"){let n=o4.exec(t);return n&&{path:n[0],parts:n.slice(1)}}let o=n4.exec(e)?.[1],r=o?r4.exec(t):null;return r&&o?{path:r[0],parts:[o,...r.slice(1)]}:null}function wc(e){let t;try{t=new URL(e)}catch{return}if(t.protocol!=="https:")return;let o=a4(t.hostname.toLowerCase(),t.pathname);if(!o)return;let[r,n,a,i]=o.parts.map(bO);return{org:r,project:n,repo:a,id:i,url:`${t.origin}${o.path}`}}var i4=/^\/[^/]+\/[^/]+\/pull\/(\d+)(?:\/|$)/;function TO(e){let t;try{t=new URL(e)}catch{return}return i4.exec(t.pathname)?.[1]}function vO(e,t){if(typeof t!="function")return"link";if(e!=="header")return"instructions";let o=t();return wc(o)?"azure-devops-review":TO(o)?"review":"instructions"}var xO="assist";async function s4(e){return typeof e=="function"?e():e.link()}function na(e,t,o="comment"){bC();let r=document.createElement("button");r.type="button",r.setAttribute("data-assist-send",""),r.className=o==="header"?"assist-send assist-send--header":"assist-send",r.title=t;let n=document.createElement("span");n.textContent=xO;let a=zc();a&&r.append(a),r.append(n);let i=async s=>{r.disabled=!0,n.textContent="sending\u2026";let l=await s4(e).then(u=>TC({url:u,...s}),u=>({ok:!1,message:u instanceof Error?u.message:String(u)}));$f(l.message,l.ok),r.disabled=!1,n.textContent=xO};return r.addEventListener("mousedown",s=>s.preventDefault()),r.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),gO(r,l=>dC(vO(o,e),{send:i,dismiss:l}))}),r}function SO(e){return`https://mail.google.com/mail/u/0/#search/rfc822msgid%3A${encodeURIComponent(e)}`}var l4={"<":"<",">":">","&":"&",""":'"',"'":"'"},u4=/(?:^|>)Message-ID:[ \t]*(?:\r?\n[ \t]+)?(?:<|<)([^\s<>]+?)(?:>|>)/im;function CO(e){let t=u4.exec(e);return t?`<${t[1].replace(/&(?:lt|gt|amp|quot|#39);/g,r=>l4[r])}>`:void 0}var c4=/GLOBALS=\[(?:[^,]*,){9}"([0-9a-f]+)"/,p4=/^\/mail\/u\/\d+[/]/;function f4(){return globalThis.content?.fetch??fetch}function d4(){for(let e of document.querySelectorAll("script")){let t=c4.exec(e.textContent??"")?.[1];if(t)return t}}function m4(e){let t=p4.exec(location.pathname)?.[0]??"/mail/u/0/",o=`${location.origin}${t}`,r=e.dataset.messageId?.replace(/^#/,""),n=e.dataset.legacyMessageId,a=d4();return[r&&`${o}?${a?`ik=${a}&`:""}view=om&permmsgid=${encodeURIComponent(r)}`,n&&`${o}?view=att&th=${n}&attid=0&disp=comp&safe=1&zw`].filter(i=>!!i)}async function EO(e){for(let t of m4(e)){let o=await f4()(t,{credentials:"include"}).catch(()=>{});if(!o?.ok)continue;let r=CO(await o.text());if(r)return r}throw new Error("Couldn't resolve this message's Message-ID")}var y4="div.adn[data-message-id]",h4="span.g3";function PO(){for(let e of document.querySelectorAll(y4)){let t=e.querySelector(h4);if(!t||e.querySelector("[data-assist-send]"))continue;let o=na({link:async()=>SO(await EO(e))},"Start an assist session from this email");o.classList.add("assist-send--before-date"),t.before(o)}}var g4=['a[href*="#discussion_r"]','a[href*="#issuecomment-"]','a[href*="#pullrequestreview-"]'].join(",");function b4(e){return e.classList.contains("js-timestamp")||e.querySelector("relative-time")!==null}function RO(){for(let e of document.querySelectorAll(g4))b4(e)&&(e.nextElementSibling?.hasAttribute("data-assist-send")||e.after(na(()=>e.href,"Start an assist session from this comment")))}function Am({owner:e,repo:t,number:o}){return document.querySelector(`a[href$="/${e}/${t}/pull/${o}" i]`)!==null}var T4=/^\/(?:orgs|users)\/[^/]+\/projects\/\d+(?:\/|$)/,v4=/^([\w.-]+)\|([\w.-]+)\|(\d+)$/;function Mm({pathname:e,search:t}){if(!T4.test(e))return;let o=new URLSearchParams(t);if(o.get("pane")!=="issue")return;let r=v4.exec(o.get("issue")??"");if(!r)return;let[,n,a,i]=r;return{owner:n,repo:a,number:i}}var x4=/^\/([^/]+)\/([^/]+)\/(pull|issues)\/(\d+)(?:\/|$)/;function IT(e,t=Am){let o=x4.exec(e.pathname);if(o){let[,a,i,s,l]=o;return`${e.origin}/${a}/${i}/${s}/${l}`}let r=Mm(e);if(!r)return;let n=t(r)?"pull":"issues";return`${e.origin}/${r.owner}/${r.repo}/${n}/${r.number}`}var S4='.gh-header-actions, [data-component="PH_Actions"]';function OO(){if(!IT(location)){for(let e of document.querySelectorAll(".assist-send--header[data-assist-send]"))e.remove();return}for(let e of document.querySelectorAll(S4))e.querySelector(":scope > [data-assist-send]")||e.prepend(na(()=>IT(location)??location.href,"Start an assist session from this page","header"))}var C4=".repos-pr-header .repos-pr-header-complete-button";function AO(){if(!wc(location.href)){for(let o of document.querySelectorAll(".assist-send--header[data-assist-send]"))o.remove();return}let t=document.querySelector(C4)?.parentElement;!t||t.querySelector(":scope > [data-assist-send]")||t.prepend(na(()=>wc(location.href)?.url??location.href,"Start an assist session for this PR","header"))}var E4=/^ {0,3}#{1,6}[ \t]+acceptance criteria[ \t]*$/i,P4=/^ {0,3}#{1,6}[ \t]/;function Or(e){let t=e.split(`
|
|
248
|
+
`}function bC(){if(document.head.querySelector(`[${hC}]`))return;let e=document.documentElement,t=document.createElement("style");t.setAttribute(hC,""),t.textContent=gC(Fa(e)),document.head.append(t),Qf(e,o=>{t.textContent=gC(o)})}function TC(e){let t={type:"assist-send",...e};return Ff(t)}var mO=S(G2(),1);var Qk=["keydown","keyup","keypress"];function K2(e){for(let t of Qk)e.addEventListener(t,o=>o.stopPropagation())}var cl=S(U(),1);function Y2({color:e,radius:t}){return{MuiMenu:{styleOverrides:{paper:{borderRadius:t.md},list:{padding:4}}},MuiMenuItem:{styleOverrides:{root:{minHeight:30,padding:"5px 10px",borderRadius:4,fontSize:13,"&:hover":{backgroundColor:e.raised},"& .MuiListItemIcon-root":{minWidth:28},"& .MuiSvgIcon-root":{fontSize:16},"& .MuiListItemText-primary":{fontSize:13}}}}}}function X2(e){let{color:t,radius:o,elevation:r,type:n}=e,a={border:`1px solid ${t.line}`};return{...Y2(e),MuiTooltip:{styleOverrides:{tooltip:{...a,backgroundColor:t.overlay.background,color:t.overlay.text,borderRadius:o.md,boxShadow:r.overlay,fontSize:`${n.scale.caption/16}rem`,padding:"6px 10px"},arrow:{color:t.overlay.background}}},MuiPopover:{styleOverrides:{paper:{...a,boxShadow:r.overlay}}},MuiBackdrop:{styleOverrides:{root:{"&:not(.MuiBackdrop-invisible)":{backgroundColor:t.scrim,backdropFilter:"blur(2px)"}}}},MuiDialog:{styleOverrides:{paper:{...a,backgroundColor:t.surface,borderRadius:o.md+4,boxShadow:r.dialog}}}}}var Q2=({variant:e})=>e==="outlined"||e==="tonal",W2=[{props:{size:"small"},style:{minHeight:26,padding:"4px 9px",fontSize:12}},{props:Q2,style:{padding:"5px 11px"}},{props:e=>Q2(e)&&e.size==="small",style:{padding:"3px 8px"}}];var Pm=["primary","secondary","success","warning","error","info","check"];function Ac(e,t){return{backgroundColor:Ht(e,t),borderColor:Ht(e,.35),color:e}}function Z2({color:e}){return[{props:{variant:"tonal"},style:{backgroundColor:e.raised,border:`1px solid ${e.line}`,color:e.text.primary,"&:hover":{backgroundColor:e.raised,borderColor:e.text.disabled}}},...Pm.filter(t=>t!=="primary").map(t=>({props:{variant:"tonal",color:t},style:{...Ac(e[t].main,.16),"&:hover":Ac(e[t].main,.24)}}))]}var J2={"& > *:nth-of-type(1)":{fontSize:16}};function eO(e){let{color:t,radius:o,density:r}=e,{minHeight:n,fontSize:a,paddingX:i}=r.button;return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{minHeight:n,padding:`6px ${i}px`,borderRadius:o.sm,fontSize:a,fontWeight:600,lineHeight:"18px"},startIcon:{marginLeft:-2,marginRight:6,...J2},endIcon:{marginLeft:6,marginRight:-2,...J2}},variants:[...W2,{props:{variant:"text",color:"primary"},style:{color:t.text.secondary,"&:hover":{backgroundColor:t.raised,color:t.text.primary}}},...Z2(e),{props:{variant:"outlined",color:"error"},style:{borderColor:Ht(t.error.main,.35),"&:hover":{borderColor:t.error.main,backgroundColor:Ht(t.error.main,.1)}}}]}}}function zT({color:e},t){return[{props:{variant:t,color:"default"},style:{backgroundColor:"transparent",border:`1px solid ${e.line}`,color:e.text.secondary,"&.MuiChip-clickable:hover":{backgroundColor:e.raised}}},...Pm.map(o=>({props:{variant:t,color:o},style:{...Ac(e[o].main,.14),borderColor:"transparent","& .MuiChip-deleteIcon":{color:Ht(e[o].main,.7),"&:hover, &:active":{color:e[o].main}},"&.MuiChip-clickable:hover":{backgroundColor:Ht(e[o].main,.22)}}}))]}function tO(e){return{MuiChip:{styleOverrides:{root:{height:20,fontSize:11,fontWeight:600,borderRadius:999},sizeSmall:{height:20,"& .MuiChip-label":{padding:"0 7px"}},label:{padding:"0 8px"},icon:{fontSize:14,marginLeft:6,marginRight:-2},deleteIcon:{fontSize:14,marginLeft:-2,marginRight:4},outlined:{borderColor:e.color.line}},variants:[...zT(e,"tonal"),...zT(e,"filled")]}}}function oO(e){return{...eO(e),MuiButtonGroup:{defaultProps:{disableElevation:!0},variants:[{props:{variant:"tonal"},style:{"& .MuiButtonGroup-middleButton, & .MuiButtonGroup-lastButton":{marginLeft:-1}}}]},...tO(e)}}var kT=e=>`color-mix(in srgb, currentColor ${e}%, transparent)`,Wk={".MuiAppBar-root &":{color:"inherit","&:hover":{backgroundColor:kT(8)},"&.Mui-selected":{color:"inherit",backgroundColor:kT(12),boxShadow:`inset 0 0 0 1px ${kT(18)}`}}};function rO({color:e,radius:t}){return{MuiTabs:{styleOverrides:{root:{minHeight:40,alignItems:"center"},list:{gap:2},indicator:{display:"none"}}},MuiTab:{styleOverrides:{root:{minHeight:30,padding:"6px 10px",borderRadius:t.sm,textTransform:"none",fontSize:13,fontWeight:500,opacity:1,color:e.text.secondary,"&:hover":{backgroundColor:e.raised,color:e.text.primary},"&.Mui-selected":{color:e.text.primary,backgroundColor:e.raised,boxShadow:`inset 0 0 0 1px ${e.line}`},...!e.appBar&&Wk}}}}}var nO=(e,t)=>({width:e,height:e,"& .MuiSvgIcon-root":{fontSize:t}});function aO({color:e,radius:t,density:o}){let{side:r,icon:n,smallSide:a,smallIcon:i}=o.iconButton;return{MuiIconButton:{styleOverrides:{root:{...nO(r,n),padding:0,borderRadius:t.sm,"&:hover":{backgroundColor:e.raised}}},variants:[{props:{size:"small"},style:nO(a,i)},{props:{color:"default"},style:{color:e.text.secondary,"&:hover":{color:e.text.primary},...!e.appBar&&{".MuiAppBar-root &, .MuiAppBar-root &:hover":{color:"inherit"}}}}]}}}function iO({color:e,radius:t}){return{MuiToggleButtonGroup:{styleOverrides:{root:{padding:2,gap:2,border:`1px solid ${e.line}`,borderRadius:t.sm,backgroundColor:e.background},grouped:{margin:0,border:0,borderRadius:4}}},MuiToggleButton:{styleOverrides:{root:{padding:"3px 8px",border:0,borderRadius:4,fontSize:13,fontWeight:500,lineHeight:"18px",textTransform:"none",color:e.text.secondary,"& .MuiSvgIcon-root":{fontSize:16},"&:hover":{backgroundColor:"transparent",color:e.text.primary},"&.Mui-selected, &.Mui-selected:hover":{backgroundColor:e.raised,color:e.text.primary}}}}}}var Rm=".MuiOutlinedInput-notchedOutline";function sO({color:e,radius:t,density:o}){let r=o.inputFontSize;return{MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.background,borderRadius:t.sm,fontSize:r,color:e.text.primary,[`& ${Rm}`]:{borderColor:e.line},[`&:hover ${Rm}`]:{borderColor:e.text.disabled},[`&.Mui-focused ${Rm}`]:{borderColor:e.primary.main,borderWidth:1},[`&.Mui-error ${Rm}`]:{borderColor:e.error.main}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:r,color:e.text.secondary,"&.Mui-focused":{color:e.primary.main}}}},MuiSelect:{styleOverrides:{icon:{color:e.text.disabled}}}}}function lO({color:e,density:t}){let{width:o,height:r,thumb:n}=t.switch;return{MuiSwitch:{styleOverrides:{root:{width:o,height:r,padding:0,"& .MuiSwitch-switchBase":{padding:2,color:e.text.secondary,"&.Mui-checked":{transform:`translateX(${o-r}px)`,color:e.primary.contrastText},"&.Mui-checked + .MuiSwitch-track":{backgroundColor:e.primary.main,opacity:1}},"& .MuiSwitch-thumb":{width:n,height:n,boxShadow:"none"},"& .MuiSwitch-track":{borderRadius:r/2,backgroundColor:e.line,opacity:1}}}},MuiFormControlLabel:{styleOverrides:{root:{"&:has(.MuiSwitch-root)":{marginLeft:0,gap:8}}}}}}function uO(e){let{appBar:t}=e.color;return{...X2(e),...oO(e),...aO(e),...iO(e),...sO(e),...lO(e),...rO(e),MuiPaper:{styleOverrides:{root:{backgroundImage:"none"},outlined:{borderColor:e.color.line}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar},styleOverrides:{root:t&&{backgroundColor:t.background,color:t.text,borderBottom:`1px solid ${e.color.line}`}}}}}var ln=e=>`${e/16}rem`;function cO({font:e,type:t}){let{scale:o}=t;return{fontFamily:e.ui,fontFamilyMono:e.mono,fontSize:t.fontSize,button:{...t.button,fontSize:ln(o.button)},caption:{fontSize:ln(o.caption)},body2:{fontSize:ln(o.body2)},body1:{fontSize:ln(o.body1)},subtitle2:{fontSize:ln(o.subtitle2)},subtitle1:{fontSize:ln(o.subtitle1)},h6:{fontSize:ln(o.h6)},h5:{fontSize:ln(o.h5)},h4:{fontSize:ln(o.h4)}}}function pO(e){return{MuiButtonBase:{styleOverrides:{root:{cursor:"pointer","&.Mui-disabled":{cursor:"default"}}}},MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar}}}}function Zk(e,t){let{dark:o,light:r,densities:n,...a}=Va;return{...a,...e==="dark"?o:r,mode:e,density:n[t]}}function fO(e,t="desktop"){let o=Zk(e,t),{color:r}=o;return br({tokens:o,palette:{mode:e,background:{default:r.background,paper:r.surface},primary:r.primary,secondary:r.secondary,success:r.success,warning:r.warning,error:r.error,info:r.info,check:r.check,text:r.text,divider:r.line,action:{hover:r.raised,selected:r.selected}},typography:cO(o),shape:{borderRadius:o.radius.sm},spacing:o.spacing,components:{...pO(o),...uO(o)}})}var UT=S(z(),1);function dO({children:e}){let[t,o]=(0,cl.useState)(()=>Fa(document.documentElement));(0,cl.useEffect)(()=>Qf(document.documentElement,o),[]);let r=(0,cl.useMemo)(()=>fO(t),[t]);return(0,UT.jsx)(Vp,{theme:r,children:(0,UT.jsx)(_t,{sx:{fontFamily:"fontFamily"},children:e})})}var LT=S(z(),1);function Om(e,t,o){let r=e.shadowRoot??e.attachShadow({mode:"open"});K2(e);let n=document.createElement("div"),a=document.createElement("div");a.style.cssText="width:100%;font:inherit;color:inherit",r.append(n,a);let i=qc({key:t,container:n}),s=(0,mO.createRoot)(a);return s.render((0,LT.jsx)(uy,{value:i,children:(0,LT.jsx)(dO,{children:o})})),s}function yO(e,t){let o=t.closest('dialog, [role="dialog"]'),r=o?e4:Jk,n=()=>{e.style.cssText=r(t)};return n(),o?(e.setAttribute("popover","manual"),o.append(e),e.showPopover?.()):document.body.append(e),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}function Jk(e){let{top:t,left:o}=hO(e);return["position: absolute",`top: ${t+window.scrollY}px`,`left: ${o+window.scrollX}px`,"width: 320px","z-index: 2147483646"].join(";")}function e4(e){let{top:t,left:o}=hO(e);return["position: fixed","inset: auto",`top: ${t}px`,`left: ${o}px`,"width: 320px","height: auto","margin: 0","padding: 0","border: 0","background: transparent","overflow: visible"].join(";")}function hO(e){let t=e.getBoundingClientRect(),o=Math.max(16,Math.min(t.left,window.innerWidth-320-16));return{top:t.bottom+4,left:o}}var Mc=null;function t4(){Mc?.close()}function gO(e,t){let o=Mc?.anchor;if(t4(),o===e)return;let r=document.createElement("div");r.setAttribute("data-assist-popover","");let n=yO(r,e),a=()=>{Mc?.close===a&&(Mc=null,n(),r.remove(),queueMicrotask(()=>i.unmount()))};Mc={anchor:e,close:a};let i=Om(r,"assist-popover",t(s=>{a(),s&&e.focus()}))}function bO(e){try{return decodeURIComponent(e)}catch{return e}}var o4=/^\/([^/]+)\/([^/]+)\/_git\/([^/]+)\/pullrequest\/([1-9]\d*)(?=\/|$)/i,r4=/^(?:\/DefaultCollection)?\/([^/]+)\/_git\/([^/]+)\/pullrequest\/([1-9]\d*)(?=\/|$)/i,n4=/^([^.]+)\.visualstudio\.com$/;function a4(e,t){if(e==="dev.azure.com"){let n=o4.exec(t);return n&&{path:n[0],parts:n.slice(1)}}let o=n4.exec(e)?.[1],r=o?r4.exec(t):null;return r&&o?{path:r[0],parts:[o,...r.slice(1)]}:null}function wc(e){let t;try{t=new URL(e)}catch{return}if(t.protocol!=="https:")return;let o=a4(t.hostname.toLowerCase(),t.pathname);if(!o)return;let[r,n,a,i]=o.parts.map(bO);return{org:r,project:n,repo:a,id:i,url:`${t.origin}${o.path}`}}var i4=/^\/[^/]+\/[^/]+\/pull\/(\d+)(?:\/|$)/;function TO(e){let t;try{t=new URL(e)}catch{return}return i4.exec(t.pathname)?.[1]}function vO(e,t){if(typeof t!="function")return"link";if(e!=="header")return"instructions";let o=t();return wc(o)?"azure-devops-review":TO(o)?"review":"instructions"}var xO="assist";async function s4(e){return typeof e=="function"?e():e.link()}function na(e,t,o="comment"){bC();let r=document.createElement("button");r.type="button",r.setAttribute("data-assist-send",""),r.className=o==="header"?"assist-send assist-send--header":"assist-send",r.title=t;let n=document.createElement("span");n.textContent=xO;let a=zc();a&&r.append(a),r.append(n);let i=async s=>{r.disabled=!0,n.textContent="sending\u2026";let l=await s4(e).then(u=>TC({url:u,...s}),u=>({ok:!1,message:u instanceof Error?u.message:String(u)}));$f(l.message,l.ok),r.disabled=!1,n.textContent=xO};return r.addEventListener("mousedown",s=>s.preventDefault()),r.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),gO(r,l=>dC(vO(o,e),{send:i,dismiss:l}))}),r}function SO(e){return`https://mail.google.com/mail/u/0/#search/rfc822msgid%3A${encodeURIComponent(e)}`}var l4={"<":"<",">":">","&":"&",""":'"',"'":"'"},u4=/(?:^|>)Message-ID:[ \t]*(?:\r?\n[ \t]+)?(?:<|<)([^\s<>]+?)(?:>|>)/im;function CO(e){let t=u4.exec(e);return t?`<${t[1].replace(/&(?:lt|gt|amp|quot|#39);/g,r=>l4[r])}>`:void 0}var c4=/GLOBALS=\[(?:[^,]*,){9}"([0-9a-f]+)"/,p4=/^\/mail\/u\/\d+[/]/;function f4(){return globalThis.content?.fetch??fetch}function d4(){for(let e of document.querySelectorAll("script")){let t=c4.exec(e.textContent??"")?.[1];if(t)return t}}function m4(e){let t=p4.exec(location.pathname)?.[0]??"/mail/u/0/",o=`${location.origin}${t}`,r=e.dataset.messageId?.replace(/^#/,""),n=e.dataset.legacyMessageId,a=d4();return[r&&`${o}?${a?`ik=${a}&`:""}view=om&permmsgid=${encodeURIComponent(r)}`,n&&`${o}?view=att&th=${n}&attid=0&disp=comp&safe=1&zw`].filter(i=>!!i)}async function EO(e){for(let t of m4(e)){let o=await f4()(t,{credentials:"include"}).catch(()=>{});if(!o?.ok)continue;let r=CO(await o.text());if(r)return r}throw new Error("Couldn't resolve this message's Message-ID")}var y4="div.adn[data-message-id]",h4="span.g3";function PO(){for(let e of document.querySelectorAll(y4)){let t=e.querySelector(h4);if(!t||e.querySelector("[data-assist-send]"))continue;let o=na({link:async()=>SO(await EO(e))},"Start an assist session from this email");o.classList.add("assist-send--before-date"),t.before(o)}}var g4=['a[href*="#discussion_r"]','a[href*="#issuecomment-"]','a[href*="#pullrequestreview-"]'].join(",");function b4(e){return e.classList.contains("js-timestamp")||e.querySelector("relative-time")!==null}function RO(){for(let e of document.querySelectorAll(g4))b4(e)&&(e.nextElementSibling?.hasAttribute("data-assist-send")||e.after(na(()=>e.href,"Start an assist session from this comment")))}function Am({owner:e,repo:t,number:o}){return document.querySelector(`a[href$="/${e}/${t}/pull/${o}" i]`)!==null}var T4=/^\/(?:orgs|users)\/[^/]+\/projects\/\d+(?:\/|$)/,v4=/^([\w.-]+)\|([\w.-]+)\|(\d+)$/;function Mm({pathname:e,search:t}){if(!T4.test(e))return;let o=new URLSearchParams(t);if(o.get("pane")!=="issue")return;let r=v4.exec(o.get("issue")??"");if(!r)return;let[,n,a,i]=r;return{owner:n,repo:a,number:i}}var x4=/^\/([^/]+)\/([^/]+)\/(pull|issues)\/(\d+)(?:\/|$)/;function IT(e,t=Am){let o=x4.exec(e.pathname);if(o){let[,a,i,s,l]=o;return`${e.origin}/${a}/${i}/${s}/${l}`}let r=Mm(e);if(!r)return;let n=t(r)?"pull":"issues";return`${e.origin}/${r.owner}/${r.repo}/${n}/${r.number}`}var S4='.gh-header-actions, [data-component="PH_Actions"]';function OO(){if(!IT(location)){for(let e of document.querySelectorAll(".assist-send--header[data-assist-send]"))e.remove();return}for(let e of document.querySelectorAll(S4))e.querySelector(":scope > [data-assist-send]")||e.prepend(na(()=>IT(location)??location.href,"Start an assist session from this page","header"))}var C4=".repos-pr-header .repos-pr-header-complete-button";function AO(){if(!wc(location.href)){for(let o of document.querySelectorAll(".assist-send--header[data-assist-send]"))o.remove();return}let t=document.querySelector(C4)?.parentElement;!t||t.querySelector(":scope > [data-assist-send]")||t.prepend(na(()=>wc(location.href)?.url??location.href,"Start an assist session for this PR","header"))}var E4=/^ {0,3}#{1,6}[ \t]+acceptance criteria[ \t]*$/i,P4=/^ {0,3}#{1,6}[ \t]/;function Or(e){let t=e.split(`
|
|
249
249
|
`),o=t.findIndex(i=>E4.test(i));if(o===-1)return null;let r=o+1;for(;r<t.length&&!P4.test(t[r]);)r+=1;let n=o+1;for(;n<r&&t[n].trim()==="";)n+=1;let a=r;for(;a>n&&t[a-1].trim()==="";)a-=1;return n===r&&(n=o+1,a=o+1),{before:t.slice(0,n),lines:t.slice(n,a),after:t.slice(a)}}function wm(e){let t=0;for(let o of e)t+=o===" "?4:1;return t}function Nm(e){let t=[];return e.map(o=>{for(;t.length>0&&o<t[t.length-1];)t.pop();return(t.length===0||o>t[t.length-1])&&t.push(o),t.length-1})}var R4=/^([ \t]*)\d+[.)](?:[ \t]+(.*))?$/;function MO(e){let t=Or(e);if(!t)return null;let o=[];for(let n of t.lines){if(n.trim()==="")continue;let a=R4.exec(n);if(!a)return null;o.push({width:wm(a[1]),text:a[2]??""})}let r=Nm(o.map(n=>n.width));return{before:t.before,items:o.map((n,a)=>({text:n.text,depth:r[a]})),after:t.after}}function Dm(e){let t=MO(e);if(t)return{kind:"outline",items:t.items,before:t.before.join(`
|
|
250
250
|
`),after:t.after.join(`
|
|
251
251
|
`)};let o=Or(e);return o?{kind:"convert",before:[...o.before,...o.lines].join(`
|