@primer/components 0.0.0-202192953933 → 0.0.0-20219296335
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/CHANGELOG.md +1 -1
- package/dist/browser.esm.js +2 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +2 -2
- package/dist/browser.umd.js.map +1 -1
- package/lib/NewButton/button.js +1 -1
- package/lib/NewButton/counter.js +2 -1
- package/lib-esm/NewButton/button.js +1 -1
- package/lib-esm/NewButton/counter.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/browser.esm.js
CHANGED
@@ -19,14 +19,14 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
19
19
|
`,Dt=f.div`
|
20
20
|
${At};
|
21
21
|
${It};
|
22
|
-
`;function Wt(t){const{children:r,...o}=t;return require("focus-visible"),e.createElement(Dt,Pt({},o,{"data-portal-root":!0}),e.createElement(Ht,null),r)}Wt.displayName="BaseStyles",Wt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Ft=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===_t}(e)}(e)};var _t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function jt(e,t){return!1!==t.clone&&t.isMergeableObject(e)?qt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function Ut(e,t,r){return e.concat(t).map((function(e){return jt(e,r)}))}function Gt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Vt(e,t){try{return t in e}catch(e){return!1}}function Kt(e,t,r){var o={};return r.isMergeableObject(e)&&Gt(e).forEach((function(t){o[t]=jt(e[t],r)})),Gt(t).forEach((function(a){(function(e,t){return Vt(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Vt(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return qt;var r=t.customMerge(e);return"function"==typeof r?r:qt}(a,r)(e[a],t[a],r):o[a]=jt(t[a],r))})),o}function qt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Ut,r.isMergeableObject=r.isMergeableObject||Ft,r.cloneUnlessOtherwiseSpecified=jt;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):Kt(e,t,r):jt(t,r)}qt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return qt(e,r,t)}),{})};var Xt=qt;const Yt=e.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),Jt=({children:t,...r})=>{var o,a,n,i,l,d,s,c;const{theme:f,colorMode:g,dayScheme:p,nightScheme:b}=Zt(),h=null!==(o=null!==(a=r.theme)&&void 0!==a?a:f)&&void 0!==o?o:x,[m,v]=e.useState(null!==(n=null!==(i=r.colorMode)&&void 0!==i?i:g)&&void 0!==n?n:"day"),[y,w]=e.useState(null!==(l=null!==(d=r.dayScheme)&&void 0!==d?d:p)&&void 0!==l?l:"light"),[B,$]=e.useState(null!==(s=null!==(c=r.nightScheme)&&void 0!==c?c:b)&&void 0!==s?s:"dark"),k=function(e,t){switch(e){case"auto":return t;default:return e}}(m,function(){const[t,r]=e.useState(er);return e.useEffect((()=>{var e,t;const o=null===(e=window)||void 0===e||null===(t=e.matchMedia)||void 0===t?void 0:t.call(e,"(prefers-color-scheme: dark)");function a(e){const t=e.matches;r(t?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),t}()),T=function(e,t,r){switch(e){case"day":return t;case"night":return r}}(k,y,B),S=e.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Xt(e,e.colorSchemes[r])}return Xt(e,e.colorSchemes[t])}(h,T)),[h,T]);return e.useEffect((()=>{var e,t;v(null!==(e=null!==(t=r.colorMode)&&void 0!==t?t:g)&&void 0!==e?e:"day")}),[r.colorMode,g]),e.useEffect((()=>{var e,t;w(null!==(e=null!==(t=r.dayScheme)&&void 0!==t?t:p)&&void 0!==e?e:"light")}),[r.dayScheme,p]),e.useEffect((()=>{var e,t;$(null!==(e=null!==(t=r.nightScheme)&&void 0!==t?t:b)&&void 0!==e?e:"dark")}),[r.nightScheme,b]),e.createElement(Yt.Provider,{value:{theme:S,colorScheme:T,colorMode:m,resolvedColorMode:k,dayScheme:y,nightScheme:B,setColorMode:v,setDayScheme:w,setNightScheme:$}},e.createElement(u,{theme:S},t))};function Zt(){return e.useContext(Yt)}function Qt(e,t){var r;const{colorScheme:o=""}=Zt();return null!==(r=e[o])&&void 0!==r?r:t}function er(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}Jt.displayName="ThemeProvider";var tr=Jt;var rr=e=>ge(e.sx);var or=f.div(te,H,D,M,W,_,V,U,q,re,rr);const ar=f(or)``;ar.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var nr=ar;const ir=f(or)``;ir.defaultProps={display:"flex"};var lr=ir;const dr=f(or)``;dr.defaultProps={display:"grid"};var sr=dr;const cr=f(or)``;var fr=cr;const gr=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"absolute",ref:r}))));gr.displayName="Absolute";const ur=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"fixed",ref:r}))));ur.displayName="Fixed";const pr=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"relative",ref:r}))));pr.displayName="Relative";const br=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"sticky",ref:r}))));function hr({ref:e,closeOnOutsideClick:n,defaultOpen:i,onClickOutside:l}){const[d,s]=t(i),c=r(null),f=null!=e?e:c,g=o((e=>{const{current:t}=f;e.target.closest("details")!==t&&(l&&l(e),e.defaultPrevented||s(!1))}),[f,s,l]);a((()=>{if(d&&n)return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}}),[d,n,g]);const u=e=>{if(!e.defaultPrevented){const t=e.target;s(t.open)}};return{open:d,setOpen:s,getDetailsProps:()=>({onToggle:u,open:d,ref:f})}}function mr(){const e=r(new Set),t=o(((t,r,...o)=>{const a=window.setTimeout(t,r,...o);return e.current.add(a),a}),[]),n=o((t=>{clearTimeout(t),e.current.delete(t)}),[]);return a((()=>()=>{for(const t of e.current)clearTimeout(t)}),[]),{safeSetTimeout:t,safeClearTimeout:n}}br.defaultProps={top:0,zIndex:1},br.displayName="Sticky";function vr(e){if(!e.defaultPrevented)for(const t of Object.values(xr).reverse())if(true===t(e)||e.defaultPrevented)break}const xr={};let yr=0;const wr=({containerRef:e,ignoreClickRefs:t,onClickOutside:r})=>{const i=n((()=>yr++),[]),l=o((o=>{var a;return o instanceof MouseEvent&&o.button>0||(!(null===(a=e.current)||void 0===a||!a.contains(o.target))||(!(!t||!t.some((({current:e})=>null==e?void 0:e.contains(o.target))))||void r(o)))}),[e,t,r]);a((()=>(0===Object.keys(xr).length&&document.addEventListener("mousedown",vr,{capture:!0}),function(e,t){xr[e]=t}(i,l),()=>{!function(e){delete xr[e]}(i),0===Object.keys(xr).length&&document.removeEventListener("mousedown",vr,{capture:!0})})),[i,l])};function*Br(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?kr:$r,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,a)&&(yield e)}function $r(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function kr(e,t=!1){return $r(e,t)&&"-1"!==e.getAttribute("tabindex")}function Tr({initialFocusRef:e,returnFocusRef:t,containerRef:r,preventFocusOnOpen:o}){a((()=>{if(o)return;const a=t.current;if(e&&e.current)e.current.focus();else if(r.current){const e=Br(r.current).next().value;null==e||e.focus()}return function(){null==a||a.focus()}}),[e,t,r,o])}const Sr=[];function Er(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=Sr.length-1;t>=0&&(Sr[t](e),!e.defaultPrevented);--t);}const Cr=(e,t=[e])=>{const r=o(e,t);a((()=>(0===Sr.length&&document.addEventListener("keydown",Er),Sr.push(r),()=>{Sr.splice(Sr.findIndex((e=>e===r)),1),0===Sr.length&&document.removeEventListener("keydown",Er)})),[r])};function zr(t){const r=e.useRef(null);return null!=t?t:r}const Nr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=zr(e);return Tr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),wr({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),Cr(o),{ref:l}};let Ir,Ar=!1;function Rr(){}try{const e=Object.create({},{signal:{get(){Ar=!0}}});window.addEventListener("test",Rr,e),window.removeEventListener("test",Rr,e)}catch(Jd){}function Lr(){Ar||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),Ar=!0)}function Or(){return void 0===Ir&&(Ir=/^mac/i.test(window.navigator.platform)),Ir}let Mr,Pr=1e4;function Hr(){return"__primer_id_"+Pr++}Lr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Mr||(Mr={}));const Dr={ArrowLeft:Mr.ArrowHorizontal,ArrowDown:Mr.ArrowVertical,ArrowUp:Mr.ArrowVertical,ArrowRight:Mr.ArrowHorizontal,h:Mr.HL,j:Mr.JK,k:Mr.JK,l:Mr.HL,a:Mr.AD,s:Mr.WS,w:Mr.WS,d:Mr.AD,Tab:Mr.Tab,Home:Mr.HomeAndEnd,End:Mr.HomeAndEnd,PageUp:Mr.PageUpDown,PageDown:Mr.PageUpDown},Wr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Fr(e){const t=Wr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Or();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}function _r(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Mr.ArrowAll:Mr.ArrowVertical)|Mr.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",f=null==t?void 0:t.activeDescendantControl,g=null==t?void 0:t.onActiveDescendantChanged;let u;function p(){return i[0]}function b(e,t=!1){const r=u;u=e,f?e&&document.activeElement===f?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",Hr()),t&&t!==r&&t.removeAttribute("data-is-active-descendant"),f&&(o||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute("data-has-active-descendant",r.id),r.setAttribute("data-is-active-descendant",o?"activated-directly":"activated-indirectly"),null==g||g(r,t,o))}function m(t=u){"first"===c&&(u=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute("data-has-active-descendant"),null==t||t.removeAttribute("data-is-active-descendant"),null==g||g(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");u||b(p())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===u){b(p())}}}v(...Br(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...Br(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...Br(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),b(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&b(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{u?h(void 0,u):b(p())})),f.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==u&&b(i[B]),B=void 0;else if("previous"===c)b(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===k?i.length-1:0,t=i[e];return void(null==t||t.focus())}b(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else b(t.target);k=void 0}),{signal:w});const $=null!=f?f:e;let k;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&(k=Fr(e))}),{signal:w,capture:!0}),$.addEventListener("keydown",(r=>{if(r.key in Wr){const a=Dr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Or()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Or()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Fr(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!u)return 0;const t=i.indexOf(u);return-1!==t?t:u===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}f?b(n||u,!0):n&&(k=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var jr={small:16,medium:32,large:64};function Ur(e){var t=e["aria-label"],r=e.className,o=e.fill,a=void 0===o?"currentColor":o,n=e.size,i=e.verticalAlign,l=e.svgDataByHeight,d=jr[n]||n,s=function(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,r){return r<=t?r:e}),e[0])}(Object.keys(l),d),c=l[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:r,viewBox:"0 0 "+c+" "+s,width:d*(c/s),height:d,fill:a,style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:l[s].path}}}var Gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};function Vr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M21.03 5.72a.75.75 0 010 1.06l-11.5 11.5a.75.75 0 01-1.072-.012l-5.5-5.75a.75.75 0 111.084-1.036l4.97 5.195L19.97 5.72a.75.75 0 011.06 0z"></path>'}}})))}function Kr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.75 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 19.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM5.75 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 15a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 13.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z"></path><path fill-rule="evenodd" d="M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 015 7.25h1.5z"></path><path fill-rule="evenodd" d="M5.75 16.75A.75.75 0 006.5 16V8A.75.75 0 005 8v8c0 .414.336.75.75.75z"></path>'}}})))}function qr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"></path><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"></path>'}}})))}function Xr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z"></path>'},24:{width:24,path:'<path d="M2.5 12c0-5.24 4.288-9.5 9.593-9.5a9.608 9.608 0 017.197 3.219.75.75 0 001.12-.998A11.108 11.108 0 0012.093 1C5.973 1 1 5.919 1 12s4.973 11 11.093 11c5.403 0 9.91-3.832 10.893-8.915a.75.75 0 10-1.472-.285c-.848 4.381-4.74 7.7-9.421 7.7C6.788 21.5 2.5 17.24 2.5 12z"></path><path d="M12 17a1 1 0 100-2 1 1 0 000 2zm0-10a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm11.28.78a.75.75 0 00-1.06-1.06l-3.47 3.47-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z"></path>'}}})))}function Yr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path>'},24:{width:24,path:'<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Jr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M11.75 4.5a.75.75 0 01.75.75V11h5.75a.75.75 0 010 1.5H12.5v5.75a.75.75 0 01-1.5 0V12.5H5.25a.75.75 0 010-1.5H11V5.25a.75.75 0 01.75-.75z"></path>'}}})))}function Zr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z"></path>'},24:{width:24,path:'<path d="M10.97 8.265a1.45 1.45 0 00-.487.57.75.75 0 01-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 011.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4.329 4.329 0 00-.435.409v1.37a.75.75 0 11-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.953.953 0 00-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265zM13 17a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Qr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path d="M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"></path>'},24:{width:24,path:'<path d="M11.646 15.146L5.854 9.354a.5.5 0 01.353-.854h11.586a.5.5 0 01.353.854l-5.793 5.792a.5.5 0 01-.707 0z"></path>'}}})))}function eo(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>'}}})))}Vr.defaultProps={className:"octicon octicon-check",size:16,verticalAlign:"text-bottom"},Kr.defaultProps={className:"octicon octicon-git-merge",size:16,verticalAlign:"text-bottom"},qr.defaultProps={className:"octicon octicon-git-pull-request",size:16,verticalAlign:"text-bottom"},Xr.defaultProps={className:"octicon octicon-issue-closed",size:16,verticalAlign:"text-bottom"},Yr.defaultProps={className:"octicon octicon-issue-opened",size:16,verticalAlign:"text-bottom"},Jr.defaultProps={className:"octicon octicon-plus",size:16,verticalAlign:"text-bottom"},Zr.defaultProps={className:"octicon octicon-question",size:16,verticalAlign:"text-bottom"},Qr.defaultProps={className:"octicon octicon-triangle-down",size:16,verticalAlign:"text-bottom"},eo.defaultProps={className:"octicon octicon-x",size:16,verticalAlign:"text-bottom"};var to=p(["position:relative;display:inline-block;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],Nt("fontWeights.bold"),Nt("radii.2"));const ro={display:"inline-block",padding:"0px 6px",backgroundColor:"neutral.muted",borderRadius:"50%",marginLeft:"8px"},oo=({count:t})=>e.createElement(or,{sx:ro},t);oo.displayName="Counter";var ao=oo;const no=ue({prop:"size",variants:{small:{fontSize:0},medium:{fontSize:1},large:{fontSize:2}}}),io=f.button`
|
22
|
+
`;function Wt(t){const{children:r,...o}=t;return require("focus-visible"),e.createElement(Dt,Pt({},o,{"data-portal-root":!0}),e.createElement(Ht,null),r)}Wt.displayName="BaseStyles",Wt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Ft=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===_t}(e)}(e)};var _t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function jt(e,t){return!1!==t.clone&&t.isMergeableObject(e)?qt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function Ut(e,t,r){return e.concat(t).map((function(e){return jt(e,r)}))}function Gt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Vt(e,t){try{return t in e}catch(e){return!1}}function Kt(e,t,r){var o={};return r.isMergeableObject(e)&&Gt(e).forEach((function(t){o[t]=jt(e[t],r)})),Gt(t).forEach((function(a){(function(e,t){return Vt(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Vt(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return qt;var r=t.customMerge(e);return"function"==typeof r?r:qt}(a,r)(e[a],t[a],r):o[a]=jt(t[a],r))})),o}function qt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Ut,r.isMergeableObject=r.isMergeableObject||Ft,r.cloneUnlessOtherwiseSpecified=jt;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):Kt(e,t,r):jt(t,r)}qt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return qt(e,r,t)}),{})};var Xt=qt;const Yt=e.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),Jt=({children:t,...r})=>{var o,a,n,i,l,d,s,c;const{theme:f,colorMode:g,dayScheme:p,nightScheme:b}=Zt(),h=null!==(o=null!==(a=r.theme)&&void 0!==a?a:f)&&void 0!==o?o:x,[m,v]=e.useState(null!==(n=null!==(i=r.colorMode)&&void 0!==i?i:g)&&void 0!==n?n:"day"),[y,w]=e.useState(null!==(l=null!==(d=r.dayScheme)&&void 0!==d?d:p)&&void 0!==l?l:"light"),[B,$]=e.useState(null!==(s=null!==(c=r.nightScheme)&&void 0!==c?c:b)&&void 0!==s?s:"dark"),k=function(e,t){switch(e){case"auto":return t;default:return e}}(m,function(){const[t,r]=e.useState(er);return e.useEffect((()=>{var e,t;const o=null===(e=window)||void 0===e||null===(t=e.matchMedia)||void 0===t?void 0:t.call(e,"(prefers-color-scheme: dark)");function a(e){const t=e.matches;r(t?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),t}()),T=function(e,t,r){switch(e){case"day":return t;case"night":return r}}(k,y,B),S=e.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Xt(e,e.colorSchemes[r])}return Xt(e,e.colorSchemes[t])}(h,T)),[h,T]);return e.useEffect((()=>{var e,t;v(null!==(e=null!==(t=r.colorMode)&&void 0!==t?t:g)&&void 0!==e?e:"day")}),[r.colorMode,g]),e.useEffect((()=>{var e,t;w(null!==(e=null!==(t=r.dayScheme)&&void 0!==t?t:p)&&void 0!==e?e:"light")}),[r.dayScheme,p]),e.useEffect((()=>{var e,t;$(null!==(e=null!==(t=r.nightScheme)&&void 0!==t?t:b)&&void 0!==e?e:"dark")}),[r.nightScheme,b]),e.createElement(Yt.Provider,{value:{theme:S,colorScheme:T,colorMode:m,resolvedColorMode:k,dayScheme:y,nightScheme:B,setColorMode:v,setDayScheme:w,setNightScheme:$}},e.createElement(u,{theme:S},t))};function Zt(){return e.useContext(Yt)}function Qt(e,t){var r;const{colorScheme:o=""}=Zt();return null!==(r=e[o])&&void 0!==r?r:t}function er(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}Jt.displayName="ThemeProvider";var tr=Jt;var rr=e=>ge(e.sx);var or=f.div(te,H,D,M,W,_,V,U,q,re,rr);const ar=f(or)``;ar.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var nr=ar;const ir=f(or)``;ir.defaultProps={display:"flex"};var lr=ir;const dr=f(or)``;dr.defaultProps={display:"grid"};var sr=dr;const cr=f(or)``;var fr=cr;const gr=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"absolute",ref:r}))));gr.displayName="Absolute";const ur=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"fixed",ref:r}))));ur.displayName="Fixed";const pr=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"relative",ref:r}))));pr.displayName="Relative";const br=e.forwardRef(((t,r)=>e.createElement(cr,Pt({},t,{position:"sticky",ref:r}))));function hr({ref:e,closeOnOutsideClick:n,defaultOpen:i,onClickOutside:l}){const[d,s]=t(i),c=r(null),f=null!=e?e:c,g=o((e=>{const{current:t}=f;e.target.closest("details")!==t&&(l&&l(e),e.defaultPrevented||s(!1))}),[f,s,l]);a((()=>{if(d&&n)return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}}),[d,n,g]);const u=e=>{if(!e.defaultPrevented){const t=e.target;s(t.open)}};return{open:d,setOpen:s,getDetailsProps:()=>({onToggle:u,open:d,ref:f})}}function mr(){const e=r(new Set),t=o(((t,r,...o)=>{const a=window.setTimeout(t,r,...o);return e.current.add(a),a}),[]),n=o((t=>{clearTimeout(t),e.current.delete(t)}),[]);return a((()=>()=>{for(const t of e.current)clearTimeout(t)}),[]),{safeSetTimeout:t,safeClearTimeout:n}}br.defaultProps={top:0,zIndex:1},br.displayName="Sticky";function vr(e){if(!e.defaultPrevented)for(const t of Object.values(xr).reverse())if(true===t(e)||e.defaultPrevented)break}const xr={};let yr=0;const wr=({containerRef:e,ignoreClickRefs:t,onClickOutside:r})=>{const i=n((()=>yr++),[]),l=o((o=>{var a;return o instanceof MouseEvent&&o.button>0||(!(null===(a=e.current)||void 0===a||!a.contains(o.target))||(!(!t||!t.some((({current:e})=>null==e?void 0:e.contains(o.target))))||void r(o)))}),[e,t,r]);a((()=>(0===Object.keys(xr).length&&document.addEventListener("mousedown",vr,{capture:!0}),function(e,t){xr[e]=t}(i,l),()=>{!function(e){delete xr[e]}(i),0===Object.keys(xr).length&&document.removeEventListener("mousedown",vr,{capture:!0})})),[i,l])};function*Br(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?kr:$r,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,a)&&(yield e)}function $r(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function kr(e,t=!1){return $r(e,t)&&"-1"!==e.getAttribute("tabindex")}function Tr({initialFocusRef:e,returnFocusRef:t,containerRef:r,preventFocusOnOpen:o}){a((()=>{if(o)return;const a=t.current;if(e&&e.current)e.current.focus();else if(r.current){const e=Br(r.current).next().value;null==e||e.focus()}return function(){null==a||a.focus()}}),[e,t,r,o])}const Sr=[];function Er(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=Sr.length-1;t>=0&&(Sr[t](e),!e.defaultPrevented);--t);}const Cr=(e,t=[e])=>{const r=o(e,t);a((()=>(0===Sr.length&&document.addEventListener("keydown",Er),Sr.push(r),()=>{Sr.splice(Sr.findIndex((e=>e===r)),1),0===Sr.length&&document.removeEventListener("keydown",Er)})),[r])};function zr(t){const r=e.useRef(null);return null!=t?t:r}const Nr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=zr(e);return Tr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),wr({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),Cr(o),{ref:l}};let Ir,Ar=!1;function Rr(){}try{const e=Object.create({},{signal:{get(){Ar=!0}}});window.addEventListener("test",Rr,e),window.removeEventListener("test",Rr,e)}catch(Jd){}function Lr(){Ar||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),Ar=!0)}function Or(){return void 0===Ir&&(Ir=/^mac/i.test(window.navigator.platform)),Ir}let Mr,Pr=1e4;function Hr(){return"__primer_id_"+Pr++}Lr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Mr||(Mr={}));const Dr={ArrowLeft:Mr.ArrowHorizontal,ArrowDown:Mr.ArrowVertical,ArrowUp:Mr.ArrowVertical,ArrowRight:Mr.ArrowHorizontal,h:Mr.HL,j:Mr.JK,k:Mr.JK,l:Mr.HL,a:Mr.AD,s:Mr.WS,w:Mr.WS,d:Mr.AD,Tab:Mr.Tab,Home:Mr.HomeAndEnd,End:Mr.HomeAndEnd,PageUp:Mr.PageUpDown,PageDown:Mr.PageUpDown},Wr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Fr(e){const t=Wr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Or();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}function _r(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Mr.ArrowAll:Mr.ArrowVertical)|Mr.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",f=null==t?void 0:t.activeDescendantControl,g=null==t?void 0:t.onActiveDescendantChanged;let u;function p(){return i[0]}function b(e,t=!1){const r=u;u=e,f?e&&document.activeElement===f?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",Hr()),t&&t!==r&&t.removeAttribute("data-is-active-descendant"),f&&(o||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute("data-has-active-descendant",r.id),r.setAttribute("data-is-active-descendant",o?"activated-directly":"activated-indirectly"),null==g||g(r,t,o))}function m(t=u){"first"===c&&(u=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute("data-has-active-descendant"),null==t||t.removeAttribute("data-is-active-descendant"),null==g||g(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");u||b(p())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===u){b(p())}}}v(...Br(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...Br(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...Br(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),b(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&b(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{u?h(void 0,u):b(p())})),f.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==u&&b(i[B]),B=void 0;else if("previous"===c)b(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===k?i.length-1:0,t=i[e];return void(null==t||t.focus())}b(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else b(t.target);k=void 0}),{signal:w});const $=null!=f?f:e;let k;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&(k=Fr(e))}),{signal:w,capture:!0}),$.addEventListener("keydown",(r=>{if(r.key in Wr){const a=Dr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Or()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Or()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Fr(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!u)return 0;const t=i.indexOf(u);return-1!==t?t:u===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}f?b(n||u,!0):n&&(k=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var jr={small:16,medium:32,large:64};function Ur(e){var t=e["aria-label"],r=e.className,o=e.fill,a=void 0===o?"currentColor":o,n=e.size,i=e.verticalAlign,l=e.svgDataByHeight,d=jr[n]||n,s=function(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,r){return r<=t?r:e}),e[0])}(Object.keys(l),d),c=l[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:r,viewBox:"0 0 "+c+" "+s,width:d*(c/s),height:d,fill:a,style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:l[s].path}}}var Gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};function Vr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M21.03 5.72a.75.75 0 010 1.06l-11.5 11.5a.75.75 0 01-1.072-.012l-5.5-5.75a.75.75 0 111.084-1.036l4.97 5.195L19.97 5.72a.75.75 0 011.06 0z"></path>'}}})))}function Kr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.75 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 19.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM5.75 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 15a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 13.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z"></path><path fill-rule="evenodd" d="M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 015 7.25h1.5z"></path><path fill-rule="evenodd" d="M5.75 16.75A.75.75 0 006.5 16V8A.75.75 0 005 8v8c0 .414.336.75.75.75z"></path>'}}})))}function qr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"></path><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"></path>'}}})))}function Xr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z"></path>'},24:{width:24,path:'<path d="M2.5 12c0-5.24 4.288-9.5 9.593-9.5a9.608 9.608 0 017.197 3.219.75.75 0 001.12-.998A11.108 11.108 0 0012.093 1C5.973 1 1 5.919 1 12s4.973 11 11.093 11c5.403 0 9.91-3.832 10.893-8.915a.75.75 0 10-1.472-.285c-.848 4.381-4.74 7.7-9.421 7.7C6.788 21.5 2.5 17.24 2.5 12z"></path><path d="M12 17a1 1 0 100-2 1 1 0 000 2zm0-10a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm11.28.78a.75.75 0 00-1.06-1.06l-3.47 3.47-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z"></path>'}}})))}function Yr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path>'},24:{width:24,path:'<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Jr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M11.75 4.5a.75.75 0 01.75.75V11h5.75a.75.75 0 010 1.5H12.5v5.75a.75.75 0 01-1.5 0V12.5H5.25a.75.75 0 010-1.5H11V5.25a.75.75 0 01.75-.75z"></path>'}}})))}function Zr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z"></path>'},24:{width:24,path:'<path d="M10.97 8.265a1.45 1.45 0 00-.487.57.75.75 0 01-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 011.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4.329 4.329 0 00-.435.409v1.37a.75.75 0 11-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.953.953 0 00-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265zM13 17a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Qr(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path d="M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"></path>'},24:{width:24,path:'<path d="M11.646 15.146L5.854 9.354a.5.5 0 01.353-.854h11.586a.5.5 0 01.353.854l-5.793 5.792a.5.5 0 01-.707 0z"></path>'}}})))}function eo(t){return e.createElement("svg",Ur(Gr({},t,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>'}}})))}Vr.defaultProps={className:"octicon octicon-check",size:16,verticalAlign:"text-bottom"},Kr.defaultProps={className:"octicon octicon-git-merge",size:16,verticalAlign:"text-bottom"},qr.defaultProps={className:"octicon octicon-git-pull-request",size:16,verticalAlign:"text-bottom"},Xr.defaultProps={className:"octicon octicon-issue-closed",size:16,verticalAlign:"text-bottom"},Yr.defaultProps={className:"octicon octicon-issue-opened",size:16,verticalAlign:"text-bottom"},Jr.defaultProps={className:"octicon octicon-plus",size:16,verticalAlign:"text-bottom"},Zr.defaultProps={className:"octicon octicon-question",size:16,verticalAlign:"text-bottom"},Qr.defaultProps={className:"octicon octicon-triangle-down",size:16,verticalAlign:"text-bottom"},eo.defaultProps={className:"octicon octicon-x",size:16,verticalAlign:"text-bottom"};var to=p(["position:relative;display:inline-block;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],Nt("fontWeights.bold"),Nt("radii.2"));const ro={display:"inline-block",padding:"0px 6px",backgroundColor:"neutral.muted",borderRadius:"50%",marginLeft:"8px",marginRight:"-4px"},oo=({count:t})=>e.createElement(or,{sx:ro},t);oo.displayName="Counter";var ao=oo;const no=ue({prop:"size",variants:{small:{fontSize:0},medium:{fontSize:1},large:{fontSize:2}}}),io=f.button`
|
23
23
|
${to}
|
24
24
|
${e=>((e,t="default")=>({default:`\n color: ${Nt("colors.btn.text")({theme:e})};\n background-color: ${Nt("colors.btn.bg")({theme:e})};\n border-width: 1px;\n border-style: solid;\n border-color: ${Nt("colors.btn.border")({theme:e})};\n box-shadow: ${Nt("shadows.btn.shadow")({theme:e}),Nt("shadows.btn.insetShadow")({theme:e})};\n &:hover:not([disabled]) {\n background-color: ${Nt("colors.btn.hoverBg")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n box-shadow: ${Nt("shadows.btn.focusShadow")({theme:e})};\n }\n &:active:not([disabled]) {\n background-color: ${Nt("colors.btn.selectedBg")({theme:e})};\n box-shadow: ${Nt("shadows.btn.shadowActive")({theme:e})};\n }\n &:disabled {\n color: ${Nt("colors.primer.fg.disabled")({theme:e})};\n background-color: ${Nt("colors.btn.disabledBg")({theme:e})};\n }\n `,primary:`\n color: ${Nt("colors.btn.primary.text")({theme:e})};\n background-color: ${Nt("colors.btn.primary.bg")({theme:e})};\n border-width: 1px;\n border-style: solid;\n border-color: ${Nt("colors.border.subtle")({theme:e})};\n box-shadow: ${Nt("shadows.btn.primary.shadow")({theme:e})};\n\n &:hover:not([disabled]) {\n color: ${Nt("colors.btn.primary.hoverText")({theme:e})};\n background-color: ${Nt("colors.btn.primary.hoverBg")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n box-shadow: ${Nt("shadows.btn.primary.focusShadow")({theme:e})};\n }\n\n &:active:not([disabled]) {\n background-color: ${Nt("colors.btn.primary.selectedBg")({theme:e})};\n box-shadow: ${Nt("shadows.btn.primary.selectedShadow")({theme:e})};\n }\n\n &:disabled {\n color: ${Nt("colors.btn.primary.disabledText")({theme:e})};\n background-color: ${Nt("colors.btn.primary.disabledBg")({theme:e})};\n }`,danger:`\n color: ${Nt("colors.btn.danger.text")({theme:e})};\n border: 1px solid ${Nt("colors.btn.border")({theme:e})};\n background-color: ${Nt("colors.btn.bg")({theme:e})};\n box-shadow: ${Nt("shadows.btn.shadow")({theme:e})};\n\n &:hover:not([disabled]) {\n color: ${Nt("colors.btn.danger.hoverText")({theme:e})};\n background-color: ${Nt("colors.btn.danger.hoverBg")({theme:e})};\n border-color: ${Nt("colors.btn.danger.hoverBorder")({theme:e})};\n box-shadow: ${Nt("shadows.btn.danger.hoverShadow")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n border-color: ${Nt("colors.btn.danger.focusBorder")({theme:e})};\n box-shadow: ${Nt("shadows.btn.danger.focusShadow")({theme:e})};\n }\n\n &:active:not([disabled]) {\n color: ${Nt("colors.btn.danger.selectedText")({theme:e})};\n background-color: ${Nt("colors.btn.danger.selectedBg")({theme:e})};\n box-shadow: ${Nt("shadows.btn.danger.selectedShadow")({theme:e})};\n border-color: ${Nt("colors.btn.danger.selectedBorder")({theme:e})};\n }\n\n &:disabled {\n color: ${Nt("colors.btn.danger.disabledText")({theme:e})};\n background-color: ${Nt("colors.btn.danger.disabledBg")({theme:e})};\n border-color: ${Nt("colors.btn.danger.disabledBorder")({theme:e})};\n }\n `,invisible:`\n color: ${Nt("colors.accent.fg")({theme:e})};\n background-color: transparent;\n border: 0;\n border-radius: ${Nt("radii.2")({theme:e})};\n box-shadow: none;\n \n &:disabled {\n color: ${Nt("colors.primer.fg.disabled")({theme:e})};\n }\n &:focus:not([disabled]) {\n box-shadow: ${Nt("shadows.btn.focusShadow")({theme:e})};\n }\n &:hover:not([disabled]) {\n background-color: ${Nt("colors.btn.hoverBg")({theme:e})};\n }\n &:active:not([disabled]) {\n background-color: ${Nt("colors.btn.selectedBg")({theme:e})};\n }\n `}[t]))(e.theme,e.variant)}
|
25
25
|
${e=>((e="medium",t="default",r)=>{let o,a;switch(e){case"small":o=3,a=12;break;case"large":o=9,a=20;break;case"medium":default:o=5,a=16}return r&&(a=o+2),"invisible"===t&&(o+=1),`\n padding:${o}px ${a}px;\n `})(e.size,e.variant,e.iconOnly)}
|
26
26
|
${no}
|
27
27
|
${rr}
|
28
28
|
${Ne}
|
29
|
-
`,lo=i((({children:t,...r},o)=>{const{icon:a,caret:n,size:i}=r;let l=!1;a&&!t&&(l=!0);const d={display:"inline-block",...l?{}:{
|
29
|
+
`,lo=i((({children:t,...r},o)=>{const{icon:a,caret:n,size:i}=r;let l=!1;a&&!t&&(l=!0);const d={display:"inline-block",...l?{}:{mr:2}};return e.createElement(io,Pt({ref:o},r,{iconOnly:l}),a&&e.createElement(or,{sx:d,"aria-hidden":!l},e.createElement(a,{size:i})),t,n&&e.createElement(or,{sx:{display:"inline-block",pl:3},"aria-hidden":!0},e.createElement(Qr,{size:i})))}));lo.displayName="Button",lo.defaultProps={size:"medium",variant:"default"};var so=Object.assign(lo,{Counter:ao});const co={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]};function fo(e,t,r={}){const o=function(e){let t=e.parentNode;for(;null!==t;){if(t instanceof HTMLElement&&"static"!==getComputedStyle(t).position)return t;t=t.parentNode}return document.body}(e),a=function(e){let t=e;for(;null!==t&&t!==document.body;){if("visible"!==getComputedStyle(t).overflow)break;t=t.parentNode}const r=t!==document.body&&t instanceof HTMLElement?t:document.body,o=r.getBoundingClientRect(),a=getComputedStyle(r),[n,i,l,d]=[a.borderTopWidth,a.borderLeftWidth,a.borderRightWidth,a.borderBottomWidth].map((e=>parseInt(e,10)||0));return{top:o.top+n,left:o.left+i,width:o.width-l-i,height:Math.max(o.height-n-d,r===document.body?window.innerHeight:-1/0)}}(o),n=getComputedStyle(o),i=o.getBoundingClientRect(),[l,d]=[n.borderTopWidth,n.borderLeftWidth].map((e=>parseInt(e,10)||0));return function(e,t,r,o,{side:a,align:n,allowOutOfBounds:i,anchorOffset:l,alignmentOffset:d}){const s={top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height};let c=mo(r,o,a,n,l,d),f=a;if(c.top-=t.top,c.left-=t.left,!i){const i=co[a];let g=0;if(i){let e=a;for(;g<i.length&&vo(e,c,s,r);){const a=i[g++];e=a,c=mo(r,o,a,n,l,d),c.top-=t.top,c.left-=t.left,f=a}}c.top<s.top&&(c.top=s.top),c.left<s.left&&(c.left=s.left),c.left+r.width>e.width+s.left&&(c.left=e.width+s.left-r.width),i&&g<i.length&&c.top+r.height>e.height+s.top&&(c.top=e.height+s.top-r.height)}return{...c,anchorSide:f}}(a,{top:i.top+l,left:i.left+d},e.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,function(e={}){var t,r,o,a,n;const i=null!==(t=e.side)&&void 0!==t?t:go,l=null!==(r=e.align)&&void 0!==r?r:uo;return{side:i,align:l,anchorOffset:null!==(o=e.anchorOffset)&&void 0!==o?o:"inside-center"===i?0:po,alignmentOffset:null!==(a=e.alignmentOffset)&&void 0!==a?a:"center"!==l&&i.startsWith("inside")?bo:0,allowOutOfBounds:null!==(n=e.allowOutOfBounds)&&void 0!==n?n:ho}}(r))}const go="outside-bottom",uo="start",po=4,bo=4,ho=!1;function mo(e,t,r,o,a,n){const i=t.left+t.width,l=t.top+t.height;let d=-1,s=-1;return"outside-top"===r?d=t.top-a-e.height:"outside-bottom"===r?d=l+a:"outside-left"===r?s=t.left-a-e.width:"outside-right"===r&&(s=i+a),"outside-top"!==r&&"outside-bottom"!==r||(s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n),"outside-left"!==r&&"outside-right"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),"inside-top"===r?d=t.top+a:"inside-bottom"===r?d=l-a-e.height:"inside-left"===r?s=t.left+a:"inside-right"===r?s=i-a-e.width:"inside-center"===r&&(s=(i+t.left)/2-e.width/2+a),"inside-top"===r||"inside-bottom"===r?s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n:"inside-left"!==r&&"inside-right"!==r&&"inside-center"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),{top:d,left:s}}function vo(e,t,r,o){return"outside-top"===e||"outside-bottom"===e?t.top<r.top||t.top+o.height>r.height+r.top:t.left<r.left||t.left+o.width>r.width+r.left}function xo(t,r=[]){const o=zr(null==t?void 0:t.floatingElementRef),a=zr(null==t?void 0:t.anchorElementRef),[n,i]=e.useState(void 0),l=e.useCallback((()=>{o.current instanceof Element&&a.current instanceof Element?i(fo(o.current,a.current,t)):i(void 0)}),[o,a,...r]);var d;return e.useLayoutEffect(l,[l]),d=l,e.useLayoutEffect((()=>{const e=new window.ResizeObserver((()=>d()));return e.observe(document.documentElement),()=>{e.disconnect()}}),[d]),{floatingElementRef:o,anchorElementRef:a,position:n}}Lr();const yo=[];let wo;function Bo(e,t=!1){return Br(e,{reverse:t,strict:!0,onlyTabbable:!0}).next().value}function $o(e,t,r){const o=new AbortController,a=null!=r?r:o.signal;let n;function i(r){if(r instanceof HTMLElement&&document.contains(e)){if(e.contains(r))return void(n=r);if(n&&kr(n)&&e.contains(n))return void n.focus();if(t&&e.contains(t))return void t.focus();{const t=null===e.getAttribute("tabindex");return t&&e.setAttribute("tabindex","-1"),e.focus(),void(t&&e.addEventListener("blur",(()=>e.removeAttribute("tabindex")),{once:!0}))}}}e.setAttribute("data-focus-trap","active");const l=function(e){const t=new AbortController;return e.addEventListener("abort",(()=>{t.abort()})),t}(a);if(e.addEventListener("keydown",(t=>{if("Tab"!==t.key||t.defaultPrevented)return;const{target:r}=t,o=Bo(e),a=Bo(e,!0);r===o&&t.shiftKey?(t.preventDefault(),null==a||a.focus()):r!==a||t.shiftKey||(t.preventDefault(),null==o||o.focus())}),{signal:l.signal}),wo){const e=wo;wo.container.setAttribute("data-focus-trap","suspended"),wo.controller.abort(),yo.push(e)}l.signal.addEventListener("abort",(()=>{wo=void 0})),a.addEventListener("abort",(()=>{e.removeAttribute("data-focus-trap");const t=yo.findIndex((t=>t.container===e));t>=0&&yo.splice(t,1),function(){const e=yo.pop();e&&$o(e.container,e.initialFocus,e.originalSignal)}()})),document.addEventListener("focus",(e=>{i(e.target)}),{signal:l.signal,capture:!0}),i(document.activeElement),wo={container:e,controller:l,initialFocus:t,originalSignal:a};const d=yo.findIndex((t=>t.container===e));if(d>=0&&yo.splice(d,1),!r)return o}function ko(t,r=[]){const o=zr(null==t?void 0:t.containerRef),a=zr(null==t?void 0:t.initialFocusRef),n=null==t?void 0:t.disabled,i=e.useRef(),l=e.useRef(null);function d(){var e;null===(e=i.current)||void 0===e||e.abort(),null!=t&&t.restoreFocusOnCleanUp&&l.current instanceof HTMLElement&&(l.current.focus(),l.current=null)}return l.current||null!=t&&t.disabled||(l.current=document.activeElement),e.useEffect((()=>{if(o.current instanceof HTMLElement){var e;if(!n)return i.current=$o(o.current,null!==(e=a.current)&&void 0!==e?e:void 0),()=>{d()};d()}}),[o,a,n,...r]),{containerRef:o,initialFocusRef:a}}function To(t={},r=[]){const o=zr(t.containerRef),n=!!t.activeDescendantFocus,i=zr("boolean"!=typeof t.activeDescendantFocus&&t.activeDescendantFocus?t.activeDescendantFocus:void 0),l=t.disabled,d=e.useRef();return a((()=>{if(o.current instanceof HTMLElement&&(!n||i.current instanceof HTMLElement)){if(!l){var e;const r={...t,activeDescendantControl:null!==(e=i.current)&&void 0!==e?e:void 0};return d.current=_r(o.current,r),()=>{var e;null===(e=d.current)||void 0===e||e.abort()}}var r;null===(r=d.current)||void 0===r||r.abort()}}),[l,...r]),{containerRef:o,activeDescendantControlRef:i}}const So={};function Eo(){const e=So.__default__;if(!e||!document.body.contains(e)){let e=document.getElementById("__primerPortalRoot__");if(!(e instanceof Element)){e=document.createElement("div"),e.setAttribute("id","__primerPortalRoot__"),e.style.position="absolute",e.style.top="0",e.style.left="0";const t=document.querySelector("[data-portal-root]");t?t.appendChild(e):document.body.appendChild(e)}!function(e,t="__default__"){So[t]=e}(e)}}var Co=({children:t,onMount:r,containerName:o})=>{const a=document.createElement("div");a.style.position="relative",a.style.zIndex="1";const n=e.useRef(a);return e.useLayoutEffect((()=>{let e=o;void 0===e&&(e="__default__",Eo());const t=So[e];if(!t)throw new Error(`Portal container '${o}' is not yet registered. Container must be registered with registerPortal before use.`);const a=n.current;return t.appendChild(a),null==r||r(),()=>{t.removeChild(a)}}),[n]),v(t,n.current)};function zo(...t){const o=r(null);return e.useLayoutEffect((()=>{function e(e=null){for(const r of t){if(!r)return;"function"==typeof r?r(e):r.current=e}}return e(o.current),()=>{e(o.current)}}),[...t,o.current]),o}const No={prefix:String(Math.round(1e10*Math.random())),current:0},Io=e.createContext(No);function Ao(t){let r=l(Io),o=n((()=>({prefix:r===No?"":r.prefix+"-"+ ++r.current,current:0})),[r]);return e.createElement(Io.Provider,{value:o},t.children)}let Ro=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Lo(e){let t=l(Io);return t!==No||Ro||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),n((()=>e||"react-aria"+t.prefix+"-"+ ++t.current),[e])}const Oo=f("div")`
|
30
30
|
position: fixed;
|
31
31
|
top: 0;
|
32
32
|
left: 0;
|