aboutsummaryrefslogtreecommitdiff
path: root/archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js
diff options
context:
space:
mode:
authorAnthony Wang2022-06-22 12:21:25 -0500
committerAnthony Wang2022-06-22 12:21:25 -0500
commitfc2626585a6d30e58220783bcca73d2a724e12c9 (patch)
tree48afe4df2e80f8587cfd98ea7e93250c4004da6f /archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js
parented81135660700743dc43cc8c649f368639eb41ef (diff)
Add archives of chatroom and discussionsHEADmaster
Diffstat (limited to 'archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js')
-rw-r--r--archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js101
1 files changed, 101 insertions, 0 deletions
diff --git a/archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js b/archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js
new file mode 100644
index 0000000..eecbc9b
--- /dev/null
+++ b/archive/Problem 2 GCD · Discussion #12 · Ta180m_Idiot-Code-Golf_files/behaviors-bc638155a1aa.js
@@ -0,0 +1,101 @@
+(()=>{var Jl=Object.defineProperty;var s=($,D)=>Jl($,"name",{value:D,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["behaviors"],{56851:($,D,f)=>{"use strict";var T=f(7679),c=f(59753);(0,c.on)("deprecatedAjaxSend","[data-remote]",function(e){e.currentTarget===e.target&&(e.defaultPrevented||e.currentTarget.classList.add("loading"))}),(0,c.on)("deprecatedAjaxComplete","[data-remote]",function(e){e.currentTarget===e.target&&e.currentTarget.classList.remove("loading")});var C=f(65935);(0,C.AC)("form.js-ajax-pagination, .js-ajax-pagination form",async function(e,t){const n=e.closest(".js-ajax-pagination");let o;try{o=await t.html()}catch(r){if(r.response&&r.response.status===404){n.remove();return}else throw r}n.replaceWith(o.html),(0,c.f)(e,"page:loaded")});var _=f(30481);const x="analytics.click";(0,c.on)("click","[data-analytics-event]",e=>{const n=e.currentTarget.getAttribute("data-analytics-event");if(!n)return;const o=JSON.parse(n);(0,_.q)(x,o)});var u=f(64463);const g=["system","disabled"].map(e=>`html[data-a11y-animated-images="${e}"] img[data-animated-image]`).join(", ");(0,u.N7)(g,e=>{if(!(e instanceof HTMLImageElement)||e.closest("a")&&!(e.parentElement instanceof HTMLAnchorElement))return;let t=e.parentElement,n=null;if(t instanceof HTMLAnchorElement){if(t.childElementCount>1)return;n=t,n.setAttribute("data-target","animated-image.originalLink"),t=n.parentElement}e.removeAttribute("data-animated-image"),e.setAttribute("data-target","animated-image.originalImage");const o=n?n.cloneNode(!0):e.cloneNode(!0),r=document.createElement("animated-image");r.appendChild(o),t==null||t.replaceChild(r,n||e)});var h=f(22485);document.addEventListener("pjax:start",function(){(0,h.x)("Loading page")}),document.addEventListener("pjax:error",function(){(0,h.x)("Loading failed")}),document.addEventListener("pjax:end",function(){(0,h.x)("Loading complete")});var d=f(52641);const m=new WeakMap;(0,u.N7)("auto-check",function(e){if(e.classList.contains("js-prevent-default-behavior"))return;const t=e.querySelector("input");if(!t)return;const n=t.closest(".form-group")||e,o=t.form;let r;function i(){return r||(r=`input-check-${(Math.random()*1e4).toFixed(0)}`),r}s(i,"generateId");const a=t.getAttribute("aria-describedby");t.addEventListener("focusout:delay",()=>{t.setAttribute("aria-describedby",[r,a].join(" "))});const l=n.querySelector("p.note");l&&(l.id||(l.id=i()),m.set(l,l.innerHTML)),e.addEventListener("loadstart",()=>{p(t,n),n.classList.add("is-loading"),t.classList.add("is-autocheck-loading"),(0,d.G)(o)}),e.addEventListener("loadend",()=>{n.classList.remove("is-loading"),t.classList.remove("is-autocheck-loading")}),t.addEventListener("auto-check-success",async y=>{t.classList.add("is-autocheck-successful"),n.classList.add("successed"),(0,d.G)(o);const{response:w}=y.detail;if(!w)return;const S=await w.text();if(!!S){if(l instanceof HTMLElement)l.innerHTML=S,(0,h.N)(l);else{const R=w.status===200,I=n.tagName==="DL"?"dd":"div",F=document.createElement(I);F.id=i(),F.classList.add(R?"success":"warning"),F.innerHTML=S,n.append(F),n.classList.add(R?"successed":"warn"),(0,h.N)(F),R&&(F.hidden=document.activeElement!==t)}(0,c.f)(t,"auto-check-message-updated")}}),t.addEventListener("auto-check-error",async y=>{t.classList.add("is-autocheck-errored"),n.classList.add("errored"),(0,d.G)(o);const{response:w}=y.detail;if(!w)return;const S=await w.text();if(l instanceof HTMLElement)l.innerHTML=S||"Something went wrong",(0,h.N)(l);else{const R=n.tagName==="DL"?"dd":"div",I=document.createElement(R);I.id=i(),I.classList.add("error"),I.innerHTML=S||"Something went wrong",n.append(I),(0,h.N)(I)}}),t.addEventListener("input",()=>{t.removeAttribute("aria-describedby"),t.value||p(t,n)}),t.addEventListener("blur",()=>{const y=n.querySelector(".success");y&&(y.hidden=!0)}),t.addEventListener("focus",()=>{const y=n.querySelector(".success");y&&(y.hidden=!1)}),o.addEventListener("reset",()=>{p(t,n)})});function p(e,t){var n,o,r,i,a,l;t.classList.remove("is-loading","successed","errored","warn"),e.classList.remove("is-autocheck-loading","is-autocheck-successful","is-autocheck-errored");const y=t.querySelector("p.note");if(y){const w=m.get(y);w&&(y.innerHTML=w)}t.tagName==="DL"?((n=t.querySelector("dd.error"))==null||n.remove(),(o=t.querySelector("dd.warning"))==null||o.remove(),(r=t.querySelector("dd.success"))==null||r.remove()):((i=t.querySelector("div.error"))==null||i.remove(),(a=t.querySelector("div.warning"))==null||a.remove(),(l=t.querySelector("div.success"))==null||l.remove())}s(p,"autocheck_reset");var b=f(46481);(0,u.N7)("auto-complete",function(e){e.addEventListener("loadstart",()=>e.classList.add("is-auto-complete-loading")),e.addEventListener("loadend",()=>e.classList.remove("is-auto-complete-loading"))}),(0,u.N7)("auto-complete",{constructor:b.Z,initialize:v}),(0,c.on)("auto-complete-change","auto-complete",function(e){v(e.currentTarget)});function v(e){const t=e.closest("form");if(!t)return;const n=t.querySelector(".js-auto-complete-button");n instanceof HTMLButtonElement&&(n.disabled=!e.value)}s(v,"toggleSubmitButton");var L=f(56238),q=f(12981),E=f(6170);let A=null;(0,c.on)("submit","[data-autosearch-results-container]",async function(e){const t=e.currentTarget;if(!(t instanceof HTMLFormElement))return;e.preventDefault(),A==null||A.abort(),t.classList.add("is-sending");const n=new URL(t.action,window.location.origin),o=t.method,r=new FormData(t),i=(0,L.KL)(n,r);let a=null;o==="get"?n.search=i:a=r;const{signal:l}=A=new AbortController,y=new Request(n.toString(),{method:o,body:a,signal:l,headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"}});let w;try{w=await fetch(y)}catch{}if(t.classList.remove("is-sending"),!w||!w.ok||l.aborted)return;const S=t.getAttribute("data-autosearch-results-container"),R=S?document.getElementById(S):null;R&&(R.innerHTML="",R.appendChild((0,q.r)(document,await w.text()))),(0,E.lO)(null,"",`?${i}`)});var k=f(73185),j=f(45075);(0,j.ZG)("input[data-autoselect], textarea[data-autoselect]",async function(e){await(0,k.gJ)(),e.select()});var P=f(46263),M=f(6741);(0,c.on)("change","form[data-autosubmit]",function(e){const t=e.currentTarget;(0,L.Bt)(t)}),(0,c.on)("change","input[data-autosubmit], select[data-autosubmit]",O);function O(e){const t=e.target;if(!(t instanceof HTMLInputElement)&&!(t instanceof HTMLSelectElement))return;const n=t.form;(0,L.Bt)(n)}s(O,"autosubmit_submit");const V=(0,P.D)(O,300);(0,u.N7)("input[data-throttled-autosubmit]",{subscribe:e=>(0,M.RB)(e,"input",V)});async function H(e){const t=e.getAttribute("data-url")||"";if(await N(t)){const o=e.getAttribute("data-gravatar-text");o!=null&&(e.textContent=o)}}s(H,"detectGravatar"),(0,u.N7)(".js-detect-gravatar",function(e){H(e)});async function N(e){const t=e;if(!t)return!1;try{const n=await fetch(t,{headers:{Accept:"application/json"}});return n.ok?(await n.json()).has_gravatar:!1}catch{return!1}}s(N,"fetchGravatarInfo");var K=f(51989),W=f(41307),U=f(49815),te=f(66899),le=f(5878);const ae=[".unstyled-additional-seats-price-obj",".unstyled-base-price-obj",".unstyled-final-price-obj"];function we(e){return typeof e=="string"||typeof e=="number"?!1:"default_currency"in e&&"local_currency"in e}s(we,"isAPriceStruct");let ue=null;(0,c.on)("click",".js-org-signup-duration-change",e=>{e.preventDefault();const n=e.currentTarget.getAttribute("data-plan-duration");Yr(n),ts(n);for(const o of document.querySelectorAll(".js-seat-field"))Be(o);Qr()}),(0,c.on)("change",".js-org-signup-duration-toggle",async function({currentTarget:e}){const t=new URL(e.getAttribute("data-url"),window.location.origin);if((0,U.c)("TURBO")){const{visit:n}=await f.e("vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js").then(f.bind(f,74395));n(t)}else{const n=document.getElementById("js-pjax-container");(0,W.ZP)({url:t.toString(),container:n})}});async function Be(e){const t=e.getAttribute("data-item-name")||"items",n=e.value,o=new URL(e.getAttribute("data-url"),window.location.origin),r=new URLSearchParams(o.search.slice(1)),i=parseInt(e.getAttribute("data-item-minimum"))||0,a=parseInt(e.getAttribute("data-item-maximum"))||300,l=parseInt(e.getAttribute("data-item-count"))||0,y=Math.max(i,parseInt(n)||0),w=y>a,S=document.querySelector(".js-downgrade-button"),R=document.getElementById("downgrade-disabled-message");S instanceof HTMLButtonElement&&(S.disabled=y===l),R instanceof HTMLElement&&S instanceof HTMLButtonElement&&(R.hidden=!S.disabled),r.append(t,y.toString()),document.querySelector(".js-transform-user")&&r.append("transform_user","1"),o.search=r.toString(),ue==null||ue.abort();const{signal:F}=ue=new AbortController;let X=null;try{const Z=await fetch(o.toString(),{signal:F,headers:{Accept:"application/json"}});if(!Z.ok)return;X=await Z.json()}catch{}if(F.aborted||!X)return;const oe=document.querySelector(".js-contact-us");oe&&oe.classList.toggle("d-none",!w);const Q=document.querySelector(".js-cost-info");Q&&(Q.hidden=w);const se=document.querySelector(".js-payment-summary");se&&se.classList.toggle("d-none",w);const ce=document.querySelector(".js-submit-billing");ce instanceof HTMLElement&&(ce.hidden=w);const de=document.querySelector(".js-billing-section");de&&de.classList.toggle("has-removed-contents",X.free||X.is_enterprise_cloud_trial);const Y=document.querySelector(".js-upgrade-info");Y&&Y.classList.toggle("d-none",y<=0);const He=document.querySelector(".js-downgrade-info");He&&He.classList.toggle("d-none",y>=0);const B=document.querySelector(".js-extra-seats-line-item");B&&B.classList.toggle("d-none",X.no_additional_seats),document.querySelector(".js-seat-field")&&es(n);const z=document.querySelector(".js-minimum-seats-disclaimer");z&&(z.classList.toggle("tooltipped",X.seats===5),z.classList.toggle("tooltipped-nw",X.seats===5));const ee=X.selectors;for(const Z in ee)for(const ie of document.querySelectorAll(Z))Jr(Z)&&we(ee[Z])?(ie.textContent="",ie.appendChild(On("default-currency",ee[Z].default_currency)),ie.appendChild(On("local-currency",ee[Z].local_currency))):ie.textContent=ee[Z];(0,E.lO)((0,W.y0)(),"",X.url)}s(Be,"updateTotals");function Jr(e){return ae.includes(e)}s(Jr,"isPriceSelector");function On(e,t){const n=document.createElement("span");return n.classList.add(e),n.textContent=t,n}s(On,"priceCurrencyTag");function Qr(){for(const e of document.querySelectorAll(".js-unit-price"))e.hidden=!e.hidden}s(Qr,"toggleDurationUnitPrices");function Yr(e){const t=e==="year"?"month":"year";for(const o of document.querySelectorAll(".js-plan-duration-text"))o.textContent=e;for(const o of document.querySelectorAll(".unstyled-available-plan-duration-adjective"))o.textContent=`${e}ly`;for(const o of document.querySelectorAll(".js-org-signup-duration-change"))o.setAttribute("data-plan-duration",t);const n=document.getElementById("signup-plan-duration");n&&(n.value=e)}s(Yr,"updateDurationFields");function es(e){var t;for(const n of document.querySelectorAll(".js-seat-field")){const o=n.getAttribute("data-item-max-seats"),r=(t=n==null?void 0:n.parentNode)==null?void 0:t.querySelector(".Popover");o&&o.length&&(parseInt(e,10)>parseInt(o,10)?(n.classList.add("color-border-danger-emphasis"),r==null||r.removeAttribute("hidden")):(n.classList.remove("color-border-danger-emphasis"),r==null||r.setAttribute("hidden","true")))}}s(es,"updateSeatFields");function ts(e){for(const t of document.querySelectorAll(".js-seat-field")){const n=new URL(t.getAttribute("data-url"),window.location.origin),o=new URLSearchParams(n.search.slice(1));o.delete("plan_duration"),o.append("plan_duration",e),n.search=o.toString(),t.setAttribute("data-url",n.toString())}}s(ts,"updateSeatFieldURLs"),(0,u.N7)(".js-addon-purchase-field",{constructor:HTMLInputElement,add(e){(0,le.Z)(e)&&Be(e),(0,te.oq)(e,function(){Be(e)})}}),(0,u.N7)(".js-addon-downgrade-field",{constructor:HTMLSelectElement,add(e){(0,le.Z)(e)&&Be(e),e.addEventListener("change",function(){Be(e)})}});function ns(e){const t=document.querySelector(".js-addon-purchase-field"),n=e.target.querySelector("input:checked");if(t instanceof HTMLInputElement&&n instanceof HTMLInputElement){const o=n.getAttribute("data-upgrade-url");o&&(t.setAttribute("data-url",o),t.value="0",Be(t))}}s(ns,"handleOrgChange"),(0,c.on)("details-menu-selected",".js-organization-container",ns,{capture:!0}),(0,j.q6)(".js-csv-filter-field",function(e){const t=e.target.value.toLowerCase();for(const n of document.querySelectorAll(".js-csv-data tbody tr"))n instanceof HTMLElement&&(!n.textContent||(n.hidden=!!t&&!n.textContent.toLowerCase().includes(t)))}),(0,u.N7)(".js-blob-header.is-stuck",{add(e){Nn(e)},remove(e){Nn(e,!0)}});function Nn(e,t=!1){const n={"tooltipped-nw":"tooltipped-sw","tooltipped-n":"tooltipped-s","tooltipped-ne":"tooltipped-se"};for(const[o,r]of Object.entries(n)){const i=t?r:o,a=t?o:r;for(const l of e.querySelectorAll(`.${i}`))l.classList.replace(i,a)}}s(Nn,"flipTooltip");function os(e){const t=e.target,n=t==null?void 0:t.closest(".js-branch-protection-integration-select"),o=n==null?void 0:n.querySelector(".js-branch-protection-integration-select-current"),r=t==null?void 0:t.closest(".js-branch-protection-integration-select-item"),i=r==null?void 0:r.querySelector(".js-branch-protection-integration-select-label");o&&i&&n&&(o.innerHTML=i.innerHTML,n.open=!1)}s(os,"changeSelection"),(0,c.on)("change",".js-branch-protection-integration-select-input",os);function rs(e){const t=new URL(e.getAttribute("data-bulk-actions-url"),window.location.origin),n=new URLSearchParams(t.search.slice(1)),o=e.getAttribute("data-bulk-actions-parameter"),r=Array.from(e.querySelectorAll(".js-bulk-actions-toggle:checked"));if(o){const i=r.map(a=>a.closest(".js-bulk-actions-item").getAttribute("data-bulk-actions-id")).sort();for(const a of i)n.append(`${o}[]`,a)}else for(const i of r.sort((a,l)=>a.value>l.value?1:-1))n.append(i.name,i.value);return t.search=n.toString(),t.toString()}s(rs,"bulkUrl");let Dt=null;async function ss(e){const t=e.target;if(!(t instanceof HTMLElement))return;const n=t.querySelector(".js-bulk-actions"),o=!!t.querySelector(".js-bulk-actions-toggle:checked");Dt==null||Dt.abort();const{signal:r}=Dt=new AbortController;let i="";try{const a=await fetch(rs(t),{signal:r,headers:{"X-Requested-With":"XMLHttpRequest"}});if(!a.ok)return;i=await a.text()}catch{}r.aborted||!i||(o?(Bn(t),n.innerHTML=i):(n.innerHTML=i,Bn(t)),(0,c.f)(t,"bulk-actions:updated"))}s(ss,"updateBulkActions");function Bn(e){const t=document.querySelector(".js-membership-tabs");if(t){const n=e.querySelectorAll(".js-bulk-actions-toggle:checked");t.classList.toggle("d-none",n.length>0)}}s(Bn,"toggleMembershipTabs"),(0,c.on)("change",".js-bulk-actions-toggle",function(e){const n=e.currentTarget.closest(".js-bulk-actions-container");(0,c.f)(n,"bulk-actions:update")}),(0,c.on)("bulk-actions:update",".js-bulk-actions-container",(0,P.D)(ss,100));var me=f(7739),he=f(45922);function is(e){try{const t=window.localStorage.getItem(e);return{kind:"ok",value:t?JSON.parse(t):null}}catch(t){return{kind:"err",value:t}}}s(is,"getLocalJSON");function $n(e,t){try{return window.localStorage.setItem(e,JSON.stringify(t)),{kind:"ok",value:null}}catch(n){return{kind:"err",value:n}}}s($n,"setLocalJSON");function as(){const e={};for(const t of document.getElementsByTagName("script")){const n=t.src.match(/\/([\w-]+)-[0-9a-f]{8,}\.js$/);n&&(e[`${n[1]}.js`]=t.src)}for(const t of document.getElementsByTagName("link")){const n=t.href.match(/\/([\w-]+)-[0-9a-f]{8,}\.css$/);n&&(e[`${n[1]}.css`]=t.href)}return e}s(as,"gatherBundleURLs");function cs(){const e=as(),t=is("bundle-urls");if(t.kind==="err"){$n("bundle-urls",e);return}const n=t.value||{},o=Object.keys(e).filter(r=>n[r]!==e[r]);o.length&&$n("bundle-urls",{...n,...e}).kind==="ok"&&(0,he.b)({downloadedBundles:o})}s(cs,"report"),(async()=>(await me.C,window.requestIdleCallback(cs)))();var Ql=f(41415);function ls(e){e.preventDefault(),e.stopPropagation()}s(ls,"cancelEvent"),(0,u.N7)("a.btn.disabled",{subscribe:e=>(0,M.RB)(e,"click",ls)});var Ht=f(90458),us=f(58797);(0,u.N7)(".js-check-all-container",{constructor:HTMLElement,subscribe:us.Z});var Ve=f(64926);const Fn="logout-was-successful";function ds(){for(const e of[sessionStorage,localStorage])try{e.clear()}catch{}}s(ds,"clearData");function fs(){(0,Ve.$1)(Fn).length>0&&(ds(),(0,Ve.kT)(Fn))}s(fs,"clearDataIfJustLoggedOut"),fs();const Un=2e3;(0,c.on)("clipboard-copy","[data-copy-feedback]",e=>{const t=e.currentTarget,n=t.getAttribute("data-copy-feedback"),o=t.getAttribute("aria-label"),r=t.getAttribute("data-tooltip-direction")||"s";t.setAttribute("aria-label",n),t.classList.add("tooltipped",`tooltipped-${r}`),t instanceof HTMLElement&&((0,h.N)(t),setTimeout(()=>{o?t.setAttribute("aria-label",o):t.removeAttribute("aria-label"),t.classList.remove("tooltipped",`tooltipped-${r}`)},Un))});function ms(e){Ot.delete(e),Wn(e)}s(ms,"timerCallback");function Wn(e){const t=e.querySelector(".js-clipboard-copy-icon"),n=e.querySelector(".js-clipboard-check-icon");e.classList.toggle("ClipboardButton--success"),t&&t.classList.toggle("d-none"),n&&(n.classList.contains("d-sm-none")?n.classList.toggle("d-sm-none"):n.classList.toggle("d-none"))}s(Wn,"toggleCopyButton");const Ot=new WeakMap;(0,c.on)("clipboard-copy",".js-clipboard-copy:not([data-view-component])",function({currentTarget:e}){if(!(e instanceof HTMLElement))return;const t=Ot.get(e);t?clearTimeout(t):Wn(e),Ot.set(e,window.setTimeout(ms,Un,e))}),(0,c.on)("click",".js-code-nav-retry",async function(e){if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const t=document.querySelector(".js-tagsearch-popover");if(!t)return;const n=t.querySelector(".js-tagsearch-popover-content");if(!n)return;let o;const r=e.currentTarget;if(r.getAttribute("data-code-nav-kind")==="definitions"?o=t.querySelector(".js-tagsearch-popover-content"):o=t.querySelector(".js-code-nav-references"),!o)return;const a=r.getAttribute("data-code-nav-url");if(!a)return;const l=new URL(a,window.location.origin);try{const y=await fetch(l.toString(),{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!y.ok)return;const w=await y.text();if(!w)return;o.innerHTML=w}catch{return}n.scrollTop=0}),(0,u.N7)(".js-code-nav-container",{constructor:HTMLElement,subscribe(e){const t=e,n=document.querySelector(".js-tagsearch-popover");if(!(n instanceof HTMLElement))return{unsubscribe(){}};const o=n.querySelector(".js-tagsearch-popover-content"),r=new WeakMap,i=new WeakMap;let a;l();function l(){ce();for(const B of document.getElementsByClassName("pl-token"))B.classList.remove("pl-token","active")}s(l,"initialize");async function y(B){const G=Nt(/\w+[!?]?/g,B.clientX,B.clientY,0);if(!G)return;const z=G.commonAncestorContainer.parentElement;if(!z)return;for(const Zl of z.classList)if(["pl-token","pl-c","pl-s","pl-k"].includes(Zl))return;if(z.closest(".js-skip-tagsearch"))return;const ee=G.toString();if(!ee||ee.match(/\n|\s|[();&.=",]/))return;let Z=i.get(z);if(Z||(Z=new Set,i.set(z,Z)),Z.has(ee))return;Z.add(ee);const ie=z.closest(".js-tagsearch-file");if(!ie)return;const Dn=ie.getAttribute("data-tagsearch-path")||"";let Oe=ie.getAttribute("data-tagsearch-lang")||"";if(Oe==="HTML+ERB")if(z.closest(".pl-sre"))Oe="Ruby";else return;if(e.classList.contains("js-code-block-container")&&(Oe=ps(z)||"",!Oe))return;const Hn=Kn(G),Ne=document.createElement("span");Ne.classList.add("pl-token"),Ne.addEventListener("click",S);let It;if(!(0,U.c)("BLACKBIRD_MONOLITH")){if(It=await zn(n,ee,Oe,Hn,Dn),!It)return;R(Ne,It),r.set(Ne,It)}G.surroundContents(Ne)}s(y,"onMouseMove");function w(){o.scrollTop=0}s(w,"resetScrollTop");async function S(B){if(B.altKey||B.ctrlKey||B.metaKey||B.shiftKey)return;const G=B.currentTarget;if(G===a)ce();else if(X(G),(0,U.c)("BLACKBIRD_MONOLITH")){const z=n.querySelector(".js-loading-code-definitions");z&&(o.hidden=!0,z.hidden=!1,Q(G),se()),await F(B),oe(G),z&&!z.hidden&&(z.hidden=!0),o.children.length>0?o.hidden=!1:ce()}else oe(G),se();B.preventDefault()}s(S,"onClick");function R(B,G){const z=document.createElement("span");z.innerHTML=G;const ee=z.firstElementChild;if(!ee)return;const Z=ee.getAttribute("data-hydro-click"),ie=ee.getAttribute("data-hydro-click-hmac");ie&&Z&&(B.setAttribute("data-hydro-click",Z),B.setAttribute("data-hydro-click-hmac",ie))}s(R,"addPopoverElement");async function I(B,G){const z=Nt(/\w+[!?]?/g,B.clientX,B.clientY,2);if(!z)return;const ee=z.commonAncestorContainer.parentElement;if(!ee)return;for(const Ne of ee.classList)if(G.includes(Ne))return;const Z=z.toString(),ie=ee.closest(".js-tagsearch-file");if(!ie)return;const Dn=ie.getAttribute("data-tagsearch-path")||"",Oe=ie.getAttribute("data-tagsearch-lang")||"",Hn=Kn(z);return await zn(n,Z,Oe,Hn,Dn)}s(I,"getPopoverHtml");async function F(B){const G=await I(B,["data-hydro-click"]);if(!G)return;const z=document.getElementsByClassName("active")[0];!z||(R(z,G),r.set(z,G))}s(F,"fetchPopover");function X(B){a&&a.classList.remove("active"),a=B,a.classList.add("active")}s(X,"setActivePopover");function oe(B){o.innerHTML=r.get(B)||"",Q(B)}s(oe,"populatePopover");function Q(B){const G=t.getClientRects()[0],z=B.getClientRects()[0];n.style.position="absolute",n.style.zIndex="2",t.classList.contains("position-relative")?(n.style.top=`${z.bottom-G.top+7}px`,n.style.left=`${z.left-G.left-10}px`):(n.style.top=`${window.scrollY+z.bottom}px`,n.style.left=`${window.scrollX+z.left}px`)}s(Q,"positionPopover");function se(){if(!n.hidden){w();return}n.hidden=!1,w(),document.addEventListener("click",Y),document.addEventListener("keyup",He),window.addEventListener("resize",de)}s(se,"showPopover");function ce(){n.hidden||(n.hidden=!0,a&&a.classList.remove("active"),a=void 0,document.removeEventListener("click",Y),document.removeEventListener("keyup",He),window.removeEventListener("resize",de))}s(ce,"hidePopover");function de(){a instanceof HTMLElement&&Q(a)}s(de,"onResize");function Y(B){const{target:G}=B;G instanceof Node&&!n.contains(G)&&!a.contains(G)&&ce()}s(Y,"onDocumentClick");function He(B){switch(B.key){case"Escape":ce();break}}return s(He,"onKeyup"),e.addEventListener("mousemove",y),{unsubscribe(){e.removeEventListener("mousemove",y)}}}});async function zn(e,t,n,o,r){const i=e.getAttribute("data-tagsearch-url");if(!i)return"";const a=e.getAttribute("data-tagsearch-ref");if(!a)return"";let l=e.getAttribute("data-tagsearch-code-nav-context");l||(l="UNKNOWN_VIEW");const y=new URL(i,window.location.origin),w=new URLSearchParams;w.set("q",t),w.set("blob_path",r),w.set("ref",a),w.set("language",n),w.set("row",o[0].toString()),w.set("col",o[1].toString()),w.set("code_nav_context",l),y.search=w.toString();try{const S=await fetch(y.toString(),{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!S.ok)return"";const R=await S.text();return/js-tagsearch-no-definitions/.test(R)?"":R}catch{return""}}s(zn,"fetchPopoverContents");function Nt(e,t,n,o){let r,i;if(document.caretPositionFromPoint){const S=document.caretPositionFromPoint(t,n);S&&(r=S.offsetNode,i=S.offset)}else if(document.caretRangeFromPoint){const S=document.caretRangeFromPoint(t,n);S&&(r=S.startContainer,i=S.startOffset)}if(!r||typeof i!="number"||!(0,U.c)("BLACKBIRD_MONOLITH")&&r.nodeType!==Node.TEXT_NODE)return;const a=r.textContent,l=(a==null?void 0:a.replaceAll(`
+`,"").trim())==="";if(!a||l||r.nodeType!==Node.TEXT_NODE){if(o<=0||!(0,U.c)("BLACKBIRD_MONOLITH"))return null;{const S=r.nodeType!==Node.TEXT_NODE?1:10;return Nt(e,t-S,n-S,o-1)}}const y=hs(a,e,i);if(!y)return null;const w=document.createRange();return w.setStart(r,y[1]),w.setEnd(r,y[2]),w}s(Nt,"matchFromPoint");function hs(e,t,n){let o;for(;o=t.exec(e);){const r=o.index+o[0].length;if(o.index<=n&&n<=r)return[o[0],o.index,r]}return null}s(hs,"findNearestMatch");function ps(e){const t=e.closest(".highlight");if(t)for(const n of t.classList)switch(n){case"highlight-source-go":return"Go";case"highlight-source-js":return"JavaScript";case"highlight-source-python":return"Python";case"highlight-source-ruby":return"Ruby";case"highlight-source-ts":return"TypeScript"}return null}s(ps,"getCodeBlockLanguage");function Kn(e){let t=e.startContainer,n=e.startOffset,o=!1;for(;;){let r=t.previousSibling;for(;!o&&r;)["#comment","BUTTON"].includes(r.nodeName)||(n+=(r.textContent||"").length),r=r.previousSibling;const i=t.parentElement;if(i){if(i.classList.contains("js-code-nav-pass"))o=!0;else if(i.classList.contains("js-file-line")){const a=i.previousElementSibling;if(!a.classList.contains("js-code-nav-line-number"))throw new Error("invariant");return[parseInt(a.getAttribute("data-line-number")||"1",10)-1,n]}t=i}else return[0,0]}}s(Kn,"getRowAndColumn");var Me=f(78965);function gs(e){const t=e.querySelector(".js-comment-form-error");t instanceof HTMLElement&&(t.hidden=!0)}s(gs,"clearFormError"),(0,c.on)("click",".errored.js-remove-error-state-on-click",function({currentTarget:e}){e.classList.remove("errored")}),(0,C.AC)(".js-new-comment-form",async function(e,t){let n;gs(e);try{n=await t.json()}catch(i){bs(e,i)}if(!n)return;e.reset();for(const i of e.querySelectorAll(".js-resettable-field"))(0,L.Se)(i,i.getAttribute("data-reset-value")||"");const o=e.querySelector(".js-write-tab");o instanceof HTMLElement&&o.click();const r=n.json.updateContent;for(const i in r){const a=r[i],l=document.querySelector(i);l instanceof HTMLElement?(0,Me.Of)(l,a):console.warn(`couldn't find ${i} for immediate update`)}(0,c.f)(e,"comment:success")});function bs(e,t){let n="You can't comment at this time";if(t.response&&t.response.status===422){const r=t.response.json;r.errors&&(Array.isArray(r.errors)?n+=` \u2014 your comment ${r.errors.join(", ")}`:n=r.errors)}n+=". ";const o=e.querySelector(".js-comment-form-error");if(o instanceof HTMLElement){o.textContent=n,o.hidden=!1;const r=o.closest("div.form-group.js-remove-error-state-on-click");r&&r.classList.add("errored")}}s(bs,"handleFormError");const ys=s((e,t)=>{const n=e.querySelector(".js-form-action-text"),o=n||e;o.textContent=t?e.getAttribute("data-comment-text"):o.getAttribute("data-default-action-text")},"setButtonText"),vs=s(e=>{let t;return n=>{const r=n.currentTarget.value.trim();r!==t&&(t=r,ys(e,Boolean(r)))}},"createInputHandler");(0,u.N7)(".js-comment-and-button",{constructor:HTMLButtonElement,initialize(e){const t=e.form.querySelector(".js-comment-field"),n=vs(e);return{add(){t.addEventListener("input",n),t.addEventListener("change",n)},remove(){t.removeEventListener("input",n),t.removeEventListener("change",n)}}}});var Yl=f(2641);function Vn(e,t){const n=e.closest(".js-write-bucket");n&&n.classList.toggle("focused",t)}s(Vn,"toggleFocus");function ws(e){const t=e.currentTarget;t instanceof Element&&Vn(t,!1)}s(ws,"blurred"),(0,j.ZG)(".js-comment-field",function(e){Vn(e,!0),e.addEventListener("blur",ws,{once:!0})});var Ee=f(40764),Es=f(52769),Bt=f(35889);const Ls=2303741511,js=4;class ot{static fromFile(t){return new Promise(function(n,o){const r=new FileReader;r.onload=function(){n(new ot(r.result))},r.onerror=function(){o(r.error)},r.readAsArrayBuffer(t)})}constructor(t){this.dataview=new DataView(t),this.pos=0}advance(t){this.pos+=t}readInt(t){const n=this,o=function(){switch(t){case 1:return n.dataview.getUint8(n.pos);case 2:return n.dataview.getUint16(n.pos);case 4:return n.dataview.getUint32(n.pos);default:throw new Error("bytes parameter must be 1, 2 or 4")}}();return this.advance(t),o}readChar(){return this.readInt(1)}readShort(){return this.readInt(2)}readLong(){return this.readInt(4)}readString(t){const n=[];for(let o=0;o<t;o++)n.push(String.fromCharCode(this.readChar()));return n.join("")}scan(t){if(this.readLong()!==Ls)throw new Error("invalid PNG");for(this.advance(4);;){const n=this.readLong(),o=this.readString(4),r=this.pos+n+js;if(t.call(this,o,n)===!1||o==="IEND")break;this.pos=r}}}s(ot,"PNGScanner");const Ss=.0254;async function Ts(e){if(e.type!=="image/png")return null;const t=e.slice(0,10240,e.type),n=await ot.fromFile(t),o={width:0,height:0,ppi:1};return n.scan(function(r){switch(r){case"IHDR":return o.width=this.readLong(),o.height=this.readLong(),!0;case"pHYs":{const i=this.readLong(),a=this.readLong(),l=this.readChar();let y;return l===1&&(y=Ss),y&&(o.ppi=Math.round((i+a)/2*y)),!1}case"IDAT":return!1}return!0}),o}s(Ts,"imageDimensions");var As=f(89900);const rt=new WeakMap;class Xn{constructor(t,n,o){this.index=t,this.coords=n,this.textArea=o}get top(){return this.coords.top}get left(){return this.coords.left}get height(){return this.coords.height}currentChar(t=1){return this.textArea.value.substring(this.index-t,this.index)}checkLine(t){return t<this.coords.top?-1:t>this.coords.top+this.coords.height?1:0}xDistance(t){return Math.abs(this.left-t)}}s(Xn,"CaretPosition");function Le(e,t){let n;if(rt.has(e)?n=rt.get(e):(n=new Map,rt.set(e,n)),n.has(t))return n.get(t);{const o=new Xn(t,(0,As.Z)(e,t),e);return n.set(t,o),o}}s(Le,"fetchCaretCoords");const Xe=s((e,t,n,o,r,i)=>{if(n===t)return n;const a=s(S=>{const R=S.filter(I=>I.checkLine(r)===0).sort((I,F)=>I.xDistance(o)>F.xDistance(o)?1:-1);return R.length===0?n:R[0].index},"bestPosition");if(n-t===1){const S=Le(e,t),R=Le(e,n);return a([S,R])}if(n-t===2){const S=Le(e,t),R=Le(e,n-1),I=Le(e,n);return a([S,R,I])}const l=Math.floor((n+t)/2);if(l===t||l===n)return l;const y=Le(e,l);if(r>y.top+y.height)return Xe(e,l+1,n,o,r,i+1);if(r<y.top)return Xe(e,t,l-1,o,r,i+1);const w=3;return y.xDistance(o)<w?l:y.left<o?Le(e,l+1).checkLine(r)!==0?l:Xe(e,l+1,n,o,r,i+1):y.left>o?Le(e,l-1).checkLine(r)!==0?l:Xe(e,t,l-1,o,r,i+1):l},"binaryCursorSearch"),Cs=s((e,t,n)=>{const r=e.value.length-1;return Xe(e,0,r,t,n,0)},"findCursorPosition");function ks(e,t,n){const o=Cs(e,t,n);e.setSelectionRange(o,o)}s(ks,"setCursorPosition");function xs(e,t){const n=e.getBoundingClientRect();t.type==="dragenter"&&rt.delete(e);const o=t.clientX-n.left,r=t.clientY-n.top+e.scrollTop;ks(e,o,r)}s(xs,"caret_placement_updateCaret"),(0,u.N7)(".js-paste-markdown",{initialize(e){let t;return{add(){t=(0,Es.Ld)(e).unsubscribe},remove(){t()}}}});const $t=new WeakMap;function eu(e,t){$t.set(e,t)}s(eu,"cachePlaceholder");function Ms(e){return $t.get(e)||Zn(e)}s(Ms,"getPlaceholder");function Ft(e){return["video/mp4","video/quicktime"].includes(e.file.type)}s(Ft,"isVideo");function qs(e){return e.replace(/[[\]\\"<>&]/g,".").replace(/\.{2,}/g,".").replace(/^\.|\.$/gi,"")}s(qs,"parameterizeName");function Gn(e){return Ft(e)?`
+Uploading ${e.file.name}\u2026
+`:`${e.isImage()?"!":""}[Uploading ${e.file.name}\u2026]()`}s(Gn,"placeholderText");function Rs(e){return qs(e).replace(/\.[^.]+$/,"").replace(/\./g," ")}s(Rs,"altText");const _s=72*2;function st(e){const n=e.target.closest("form").querySelector(".btn-primary");n.disabled=!0}s(st,"disableSubmit");function it(e){const n=e.target.closest("form").querySelector(".btn-primary");n.disabled=!1}s(it,"enableSubmit");async function Ps(e){const{attachment:t}=e.detail,n=e.currentTarget;let o;t.isImage()?o=await Hs(t):Ft(t)?o=Ds(t):o=Is(t),Qn("",o,e,n)}s(Ps,"onUploadCompleted");function Is(e){return`[${e.file.name}](${e.href})`}s(Is,"mdLink");function Ds(e){return`
+${e.href}
+`}s(Ds,"videoMarkdown");async function Hs(e){const t=await Os(e.file),n=Rs(e.file.name),o=e.href;return t.ppi===_s?`<img width="${Math.round(t.width/2)}" alt="${n}" src="${o}">`:`![${n}](${o})`}s(Hs,"imageTag");async function Os(e){var t;const n={width:0,height:0,ppi:0};try{return(t=await Ts(e))!=null?t:n}catch{return n}}s(Os,"imageSize");function Zn(e){const t=Gn(e);return Ft(e)?`
+${t}
+`:`${t}
+`}s(Zn,"replacementText");function Jn(e){const t=e.currentTarget.querySelector(".js-comment-field"),n=Ms(e.detail.attachment);if(t)t.setCustomValidity(""),(0,Ee.lp)(t,n,"");else{const r=(0,Bt.P)(e.currentTarget.querySelector(".js-code-editor")).editor.getSearchCursor(n);r.findNext(),r.replace("")}}s(Jn,"removeFailedUpload");function Qn(e,t,n,o){const r=(o||n.currentTarget).querySelector(".js-comment-field"),i=(o||n.currentTarget).querySelector(".js-file-upload-loading-text"),a=Gn(n.detail.attachment),{batch:l}=n.detail;if(r){const y=r.value.substring(r.selectionStart,r.selectionEnd);if(e==="uploading"){let w;y.length?w=(0,Ee.t4)(r,y,a):w=(0,Ee.Om)(r,a,{appendNewline:!0}),$t.set(n.detail.attachment,w)}else(0,Ee.lp)(r,a,t);l.isFinished()?it(n):st(n)}else{const y=(0,Bt.P)((o||n.currentTarget).querySelector(".js-code-editor")).editor;if(e==="uploading")if(y.getSelection().length)y.replaceSelection(a);else{const w=y.getCursor(),S=Zn(n.detail.attachment);y.replaceRange(S,w)}else{const w=y.getSearchCursor(a);w.findNext(),w.replace(t)}l.isFinished()?it(n):st(n)}if(i){const y=i.getAttribute("data-file-upload-message");i.textContent=`${y} (${l.uploaded()+1}/${l.size})`}}s(Qn,"setValidityAndLinkText"),(0,c.on)("upload:setup",".js-upload-markdown-image",function(e){Qn("uploading","",e)}),(0,c.on)("upload:complete",".js-upload-markdown-image",Ps),(0,c.on)("upload:error",".js-upload-markdown-image",function(e){Jn(e);const{batch:t}=e.detail;t.isFinished()?it(e):st(e)});function Yn(e){var t;e.stopPropagation();const n=e.currentTarget;if(!n)return;const o=n.querySelector(".js-comment-field");if(o)xs(o,e);else{const r=(t=(0,Bt.P)(n.querySelector(".js-code-editor")))==null?void 0:t.editor;if(r){const i=r.coordsChar({left:e.pageX,top:e.pageY});r.setCursor(i)}}}s(Yn,"updateCursor");const tu=s(e=>{const t=e.currentTarget,n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top+t.scrollTop;console.log({x:o,y:r,cursor:t.selectionStart,t:t.value.substring(t.selectionStart-10,t.selectionStart)});const i=new DragEvent("dragenter",{clientX:e.clientX,clientY:e.clientY});updateCaret(t,i)},"debugUpdateCaret");(0,c.on)("dragenter","file-attachment",Yn),(0,c.on)("dragover","file-attachment",Yn),(0,c.on)("upload:invalid",".js-upload-markdown-image",function(e){Jn(e);const{batch:t}=e.detail;t.isFinished()?it(e):st(e)});var Ut=f(29501),qe=f(15205);function Ns(e){const t=e.querySelector(".js-data-preview-url-csrf"),n=e.closest("form").elements.namedItem("authenticity_token");if(t instanceof HTMLInputElement)return t.value;if(n instanceof HTMLInputElement)return n.value;throw new Error("Comment preview authenticity token not found")}s(Ns,"token");function Wt(e){const t=e.closest(".js-previewable-comment-form"),n=e.classList.contains("js-preview-tab");if(n){const i=t.querySelector(".js-write-bucket"),a=t.querySelector(".js-preview-body");i.clientHeight>0&&(a.style.minHeight=`${i.clientHeight}px`)}t.classList.toggle("preview-selected",n),t.classList.toggle("write-selected",!n);const o=t.querySelector('.tabnav-tab.selected, .tabnav-tab[aria-selected="true"]');o.setAttribute("aria-selected","false"),o.classList.remove("selected"),e.classList.add("selected"),e.setAttribute("aria-selected","true");const r=t.querySelector(".js-write-tab");return n?r.setAttribute("data-hotkey","Control+P,Meta+Shift+p"):r.removeAttribute("data-hotkey"),t}s(Wt,"activateTab"),(0,c.on)("click",".js-write-tab",function(e){const t=e.currentTarget,n=t.closest(".js-previewable-comment-form");if(n instanceof Ut.Z){setTimeout(()=>{n.querySelector(".js-comment-field").focus()});return}const o=Wt(t);(0,c.f)(n,"preview:toggle:off");const r=n.querySelector(".js-discussion-poll-form-component");r&&(0,c.f)(r,"poll-preview:toggle:off"),setTimeout(()=>{o.querySelector(".js-comment-field").focus()});const i=n.querySelector("markdown-toolbar");i instanceof HTMLElement&&(i.hidden=!1)}),(0,c.on)("click",".js-preview-tab",function(e){const t=e.currentTarget,n=t.closest(".js-previewable-comment-form");if(n instanceof Ut.Z)return;const o=Wt(t);(0,c.f)(n,"preview:toggle:on"),setTimeout(()=>{Kt(o)});const r=n.querySelector("markdown-toolbar");r instanceof HTMLElement&&(r.hidden=!0),e.stopPropagation(),e.preventDefault()}),(0,c.on)("tab-container-change",".js-previewable-comment-form",function(e){const t=e.detail.relatedTarget,n=t&&t.classList.contains("js-preview-panel"),o=e.currentTarget,r=o.querySelector(".js-write-tab");if(n){const i=o.querySelector(".js-write-bucket"),a=o.querySelector(".js-preview-body");!a.hasAttribute("data-skip-sizing")&&i.clientHeight>0&&(a.style.minHeight=`${i.clientHeight}px`),r.setAttribute("data-hotkey","Control+P,Meta+Shift+p"),Kt(o);const y=o.querySelector("markdown-toolbar");y instanceof HTMLElement&&(y.hidden=!0)}else{r.removeAttribute("data-hotkey");const i=o.querySelector("markdown-toolbar");i instanceof HTMLElement&&(i.hidden=!1);const a=document.querySelector(".js-discussion-poll-form-component");a&&(0,c.f)(a,"poll-preview:toggle:off")}o.classList.toggle("preview-selected",n),o.classList.toggle("write-selected",!n)}),(0,c.on)("preview:render",".js-previewable-comment-form",function(e){const t=e.target.querySelector(".js-preview-tab"),n=Wt(t);setTimeout(()=>{Kt(n);const o=n.querySelector("markdown-toolbar");o instanceof HTMLElement&&(o.hidden=!0)})});function Bs(e){var t,n,o,r,i,a,l,y,w;const S=e.querySelector(".js-comment-field").value,R=(t=e.querySelector(".js-path"))==null?void 0:t.value,I=(n=e.querySelector(".js-line-number"))==null?void 0:n.value,F=(o=e.querySelector(".js-start-line-number"))==null?void 0:o.value,X=(r=e.querySelector(".js-side"))==null?void 0:r.value,oe=(i=e.querySelector(".js-start-side"))==null?void 0:i.value,Q=(a=e.querySelector(".js-start-commit-oid"))==null?void 0:a.value,se=(l=e.querySelector(".js-end-commit-oid"))==null?void 0:l.value,ce=(y=e.querySelector(".js-base-commit-oid"))==null?void 0:y.value,de=(w=e.querySelector(".js-comment-id"))==null?void 0:w.value,Y=new FormData;return Y.append("text",S),Y.append("authenticity_token",Ns(e)),R&&Y.append("path",R),I&&Y.append("line_number",I),F&&Y.append("start_line_number",F),X&&Y.append("side",X),oe&&Y.append("start_side",oe),Q&&Y.append("start_commit_oid",Q),se&&Y.append("end_commit_oid",se),ce&&Y.append("base_commit_oid",ce),de&&Y.append("comment_id",de),Y}s(Bs,"previewForm");function eo(e){const t=e.getAttribute("data-preview-url"),n=Bs(e);return(0,c.f)(e,"preview:setup",{data:n}),$s(t,n)}s(eo,"fetchPreview");const $s=(0,qe.Z)(Fs,{hash:Us});let zt=null;async function Fs(e,t){zt==null||zt.abort();const{signal:n}=zt=new AbortController,o=await fetch(e,{method:"post",body:t,signal:n});if(!o.ok)throw new Error("something went wrong");return o.text()}s(Fs,"uncachedFetch");function Us(e,t){const n=[...t.entries()].toString();return`${e}:${n}`}s(Us,"hash");async function Kt(e){const t=e.querySelector(".comment-body");t.innerHTML="<p>Loading preview&hellip;</p>";try{const n=await eo(e);t.innerHTML=n||"<p>Nothing to preview</p>",(0,c.f)(e,"preview:rendered")}catch(n){n.name!=="AbortError"&&(t.innerHTML="<p>Error rendering preview</p>")}}s(Kt,"renderPreview"),(0,u.N7)(".js-preview-tab",function(e){e.addEventListener("mouseenter",async()=>{const t=e.closest(".js-previewable-comment-form");try{await eo(t)}catch{}})}),(0,j.w4)("keydown",".js-comment-field",function(e){const t=e.target;if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key.toUpperCase()==="P"){const n=t.closest(".js-previewable-comment-form");n.classList.contains("write-selected")&&(n instanceof Ut.Z?n.querySelector(".js-preview-tab").click():(t.blur(),n.dispatchEvent(new CustomEvent("preview:render",{bubbles:!0,cancelable:!1}))),e.preventDefault(),e.stopImmediatePropagation())}});const to=/^(\+1|-1|:\+1?|:-1?)$/,Ws=s(e=>{let t=!1;for(const n of e.split(`
+`)){const o=n.trim();if(!(!o||o.startsWith(">"))){if(t&&to.test(o)===!1)return!1;!t&&to.test(o)&&(t=!0)}}return t},"isReactionLikeComment");(0,c.on)("focusout","#new_comment_field",function(e){const n=e.currentTarget.closest(".js-reaction-suggestion");n&&oo(n)}),(0,c.on)("focusin","#new_comment_field",function(e){no(e)}),(0,j.w4)("keyup","#new_comment_field",function(e){no(e)});function no(e){const t=e.target,n=t.value,o=t.closest(".js-reaction-suggestion");if(!!o)if(Ws(n)){o.classList.remove("hide-reaction-suggestion"),o.classList.add("reaction-suggestion");const r=o.getAttribute("data-reaction-markup");o.setAttribute("data-reaction-suggestion-message",r)}else oo(o)}s(no,"toggleReactionSuggestion");function oo(e){e.classList.remove("reaction-suggestion"),e.classList.add("hide-reaction-suggestion"),e.removeAttribute("data-reaction-suggestion-message")}s(oo,"clearReactionSuggestion");var at=f(5287);(0,c.on)("navigation:keydown",".js-commits-list-item",function(e){!(0,at.Zf)(e.detail.originalEvent)||e.target instanceof Element&&e.detail.hotkey==="c"&&e.target.querySelector(".js-navigation-open").click()});var nu=f(87924);(0,j.q6)(".js-company-name-input",function(e){const t=e.target,n=t.form,o=n.querySelector(".js-corp-tos-link"),r=n.querySelector(".js-tos-link");r&&(r.classList.add("d-none"),r.setAttribute("aria-hidden","true"),o&&(o.classList.remove("d-none"),o.setAttribute("aria-hidden","false")));const i=n.querySelectorAll(".js-company-name-text");if(i.length!==0)for(const a of i)if(t.value)if(a.hasAttribute("data-wording")){const y=a.getAttribute("data-wording");a.textContent=` ${y} ${t.value}`}else a.textContent=t.value;else a.textContent=""}),(0,u.N7)(".js-company-owned:not(:checked)",{constructor:HTMLInputElement,add(e){const n=e.form.querySelector(".js-company-name-input"),o=document.querySelector(".js-company-name-text"),r=document.querySelector(".js-corp-tos-link"),i=document.querySelector(".js-tos-link");n&&(e.getAttribute("data-optional")&&n.removeAttribute("required"),(0,L.Se)(n,"")),i.classList.remove("d-none"),i.setAttribute("aria-hidden","false"),r.classList.add("d-none"),r.setAttribute("aria-hidden","true"),o&&(o.textContent="")}}),(0,u.N7)(".js-company-owned:checked",{constructor:HTMLInputElement,add(e){const n=e.form.querySelector(".js-company-name-input");n&&(n.setAttribute("required",""),(0,c.f)(n,"focus"),(0,c.f)(n,"input"))}}),(0,u.N7)(".js-company-owned-autoselect",{constructor:HTMLInputElement,add(e){const t=e;function n(){if(t.checked&&t.form){const o=t.form.querySelector(".js-company-owned");(0,L.Se)(o,!0)}}s(n,"autoselect"),t.addEventListener("change",n),n()}});var Vt=f(10178),Xt=f(33948),Gt=f(55444);let je=null;document.addEventListener("keydown",function(e){!e.defaultPrevented&&e.key==="Escape"&&je&&je.removeAttribute("open")}),(0,u.N7)(".js-dropdown-details",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"toggle",Ks),(0,M.RB)(e,"toggle",zs))});function zs({currentTarget:e}){const t=e;if(t.hasAttribute("open")){const n=t.querySelector("[autofocus]");n&&n.focus()}else{const n=t.querySelector("summary");n&&n.focus()}}s(zs,"autofocus");function Ks({currentTarget:e}){const t=e;t.hasAttribute("open")?(je&&je!==t&&je.removeAttribute("open"),je=t):t===je&&(je=null)}s(Ks,"closeCurrentDetailsDropdown"),(0,u.N7)("[data-deferred-details-content-url]:not([data-details-no-preload-on-hover])",{subscribe:e=>{const t=e.querySelector("summary");return(0,M.RB)(t,"mouseenter",Gt.G)}}),(0,u.N7)("[data-deferred-details-content-url]",{subscribe:e=>(0,M.RB)(e,"toggle",Gt.G)}),(0,c.on)("click","[data-toggle-for]",function(e){const t=e.currentTarget.getAttribute("data-toggle-for")||"",n=document.getElementById(t);!n||(n.hasAttribute("open")?n.removeAttribute("open"):n.setAttribute("open","open"))}),(0,Xt.Z)(function({target:e}){if(!e||e.closest("summary"))return;let t=e.parentElement;for(;t;)t=t.closest("details"),t&&(t.hasAttribute("open")||t.setAttribute("open",""),t=t.parentElement)}),(0,c.on)("details-dialog-close","[data-disable-dialog-dismiss]",function(e){e.preventDefault()});var Vs=f(88309);(0,u.N7)("details.select-menu details-menu include-fragment",function(e){const t=e.closest("details");!t||(e.addEventListener("loadstart",function(){t.classList.add("is-loading"),t.classList.remove("has-error")}),e.addEventListener("error",function(){t.classList.add("has-error")}),e.addEventListener("loadend",function(){t.classList.remove("is-loading");const n=t.querySelector(".js-filterable-field");n&&(0,c.f)(n,"filterable:change")}))}),(0,u.N7)("details details-menu .js-filterable-field",{constructor:HTMLInputElement,add(e){const t=e.closest("details");t.addEventListener("toggle",function(){t.hasAttribute("open")||(e.value="",(0,c.f)(e,"filterable:change"))})}}),(0,u.N7)("details-menu[role=menu] [role=menu]",e=>{const t=e.closest("details-menu[role]");t&&t!==e&&t.removeAttribute("role")}),(0,u.N7)("details details-menu remote-input input",{constructor:HTMLInputElement,add(e){const t=e.closest("details");t.addEventListener("toggle",function(){t.hasAttribute("open")||(e.value="")})}}),(0,u.N7)("form details-menu",e=>{const t=e.closest("form");t.addEventListener("reset",()=>{setTimeout(()=>Xs(t),0)})});function Xs(e){const t=e.querySelectorAll("details-menu [role=menuitemradio] input[type=radio]:checked");for(const n of t)(0,c.f)(n,"change")}s(Xs,"resetMenus"),(0,j.w4)("keypress","details-menu .js-filterable-field, details-menu filter-input input",e=>{if(e.key==="Enter"){const o=e.currentTarget.closest("details-menu").querySelector('[role^="menuitem"]:not([hidden])');o instanceof HTMLElement&&o.click(),e.preventDefault()}}),(0,c.on)("details-menu-selected","details-menu",e=>{const n=e.currentTarget.querySelector(".js-filterable-field");n instanceof HTMLInputElement&&n.value&&n.focus()},{capture:!0}),(0,c.on)("details-menu-selected","[data-menu-input]",e=>{if(!(e.target instanceof Element))return;const t=e.target.getAttribute("data-menu-input"),n=document.getElementById(t);(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(n.value=e.detail.relatedTarget.value)},{capture:!0}),(0,u.N7)("details-menu remote-input",{constructor:Vs.Z,initialize(e){const t=document.getElementById(e.getAttribute("aria-owns")||"");if(!t)return;let n=null;e.addEventListener("load",()=>{document.activeElement&&t.contains(document.activeElement)&&document.activeElement.id?n=document.activeElement.id:n=null}),e.addEventListener("loadend",()=>{if(n){const o=t.querySelector(`#${n}`)||t.querySelector('[role^="menu"]');o instanceof HTMLElement?o.focus():e.input&&e.input.focus()}})}}),(0,c.on)("details-menu-selected","details-menu[data-menu-max-options]",e=>{const t=+e.currentTarget.getAttribute("data-menu-max-options"),n=e.currentTarget.querySelectorAll('[role="menuitemcheckbox"][aria-checked="true"]'),o=t===n.length;e.currentTarget.querySelector("[data-menu-max-options-warning]").hidden=!o;for(const r of e.currentTarget.querySelectorAll('[role="menuitemcheckbox"] input'))r.disabled=o&&!r.checked},{capture:!0}),(0,u.N7)("details > details-menu",{subscribe(e){const t=e.closest("details");return(0,M.RB)(t,"toggle",Gs)}});async function Gs({currentTarget:e}){const t=e,n=t.hasAttribute("open");(0,c.f)(t,n?"menu:activate":"menu:deactivate"),await(0,k.gJ)(),(0,c.f)(t,n?"menu:activated":"menu:deactivated")}s(Gs,"fireMenuToggleEvent"),(0,u.N7)("details > details-menu[preload]:not([src])",{subscribe(e){return(0,M.RB)(e.parentElement,"mouseover",function(t){const o=t.currentTarget.querySelector("include-fragment[src]");o==null||o.load()})}});const Zt=new WeakMap,ro=["input[type=submit][data-disable-with]","button[data-disable-with]"].join(", ");function Zs(e){return e instanceof HTMLInputElement?e.value||"Submit":e.innerHTML||""}s(Zs,"getButtonText");function so(e,t){e instanceof HTMLInputElement?e.value=t:e.innerHTML=t}s(so,"disable_with_setButtonText"),(0,c.on)("submit","form",function(e){for(const t of e.currentTarget.querySelectorAll(ro)){Zt.set(t,Zs(t));const n=t.getAttribute("data-disable-with");n&&so(t,n),t.disabled=!0}},{capture:!0});function io(e){for(const t of e.querySelectorAll(ro)){const n=Zt.get(t);n!=null&&(so(t,n),(!t.hasAttribute("data-disable-invalid")||e.checkValidity())&&(t.disabled=!1),Zt.delete(t))}}s(io,"revert"),(0,c.on)("deprecatedAjaxComplete","form",function({currentTarget:e,target:t}){e===t&&io(e)}),(0,C.uT)(io),(0,u.N7)(".js-document-dropzone",{constructor:HTMLElement,add(e){document.body.addEventListener("dragstart",uo),document.body.addEventListener("dragend",fo),document.body.addEventListener("dragenter",ct),document.body.addEventListener("dragover",ct),document.body.addEventListener("dragleave",co),e.addEventListener("drop",lo)},remove(e){document.body.removeEventListener("dragstart",uo),document.body.removeEventListener("dragend",fo),document.body.removeEventListener("dragenter",ct),document.body.removeEventListener("dragover",ct),document.body.removeEventListener("dragleave",co),e.removeEventListener("drop",lo)}});function ao(e){return Array.from(e.types).indexOf("Files")>=0}s(ao,"hasFile");let Jt=null;function ct(e){if(Qt)return;const t=e.currentTarget;Jt&&window.clearTimeout(Jt),Jt=window.setTimeout(()=>t.classList.remove("dragover"),200);const n=e.dataTransfer;!n||!ao(n)||(n.dropEffect="copy",t.classList.add("dragover"),e.stopPropagation(),e.preventDefault())}s(ct,"onDragenter");function co(e){e.target instanceof Element&&e.target.classList.contains("js-document-dropzone")&&e.currentTarget.classList.remove("dragover")}s(co,"onBodyDragleave");function lo(e){const t=e.currentTarget;t.classList.remove("dragover"),document.body.classList.remove("dragover");const n=e.dataTransfer;!n||!ao(n)||((0,c.f)(t,"document:drop",{transfer:n}),e.stopPropagation(),e.preventDefault())}s(lo,"onDrop");let Qt=!1;function uo(){Qt=!0}s(uo,"onDragstart");function fo(){Qt=!1}s(fo,"onDragend");var lt=f(69567);async function mo(e,t){const o=new TextEncoder().encode(t),{seal:r}=await Promise.all([f.e("vendors-node_modules_blakejs_index_js-node_modules_tweetnacl_nacl-fast_js"),f.e("_empty-file_js-app_assets_modules_github_tweetsodium_ts")]).then(f.bind(f,6743));return r(o,e)}s(mo,"encrypt");function ho(e){const t=atob(e).split("").map(n=>n.charCodeAt(0));return Uint8Array.from(t)}s(ho,"decode");function po(e){let t="";for(const n of e)t+=String.fromCharCode(n);return btoa(t)}s(po,"encode"),(0,c.on)("submit","form.js-encrypt-submit",async function(e){const t=e.currentTarget;if(e.defaultPrevented||!t.checkValidity())return;const n=t.elements.namedItem("secret_value");if(n.disabled=!0,!n.value)return;e.preventDefault();const o=ho(t.getAttribute("data-public-key"));t.elements.namedItem("encrypted_value").value=po(await mo(o,n.value)),t.submit()}),(0,c.on)("submit","form.js-encrypt-bulk-submit",go(!0)),(0,c.on)("submit","form.js-encrypt-bulk-submit-enable-empty",go(!1));function go(e){return async function(t){const n=t.currentTarget;if(t.defaultPrevented||!n.checkValidity())return;const o=ho(n.getAttribute("data-public-key"));t.preventDefault();for(const r of n.elements){const i=r;if(i.id.endsWith("secret")){if(i.disabled=!0,i.required&&!i.value){const l=`${i.name} is invalid!`,y=document.querySelector("template.js-flash-template");y.after(new lt.R(y,{className:"flash-error",message:l}));return}const a=`${i.name}_encrypted_value`;if(!i.value){n.elements.namedItem(a).disabled=e;continue}n.elements.namedItem(a).value=po(await mo(o,i.value))}}n.submit()}}s(go,"submitBulk");var Se=f(29946);let ut;function dt(e,t){const n=document.querySelector('.js-site-favicon[type="image/svg+xml"]'),o=document.querySelector('.js-site-favicon[type="image/png"]');t||(t="light");const r=t==="light"?"":"-dark";if(n&&o)if(ut==null&&(ut=n.href),e){e=e.substr(0,e.lastIndexOf(".")),e=`${e}${r}.svg`,n.href=e;const i=n.href.substr(0,n.href.lastIndexOf("."));o.href=`${i}.png`}else{const i=n.href.indexOf("-dark.svg"),a=n.href.substr(0,i!==-1?i:n.href.lastIndexOf("."));n.href=`${a}${r}.svg`,o.href=`${a}${r}.png`}}s(dt,"updateFavicon");function ft(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}s(ft,"prefersDarkColorScheme");function Js(){ut!=null&&dt(ut,ft()?"dark":"light")}s(Js,"resetIcon");function bo(){ft()&&dt(void 0,"dark")}s(bo,"updateDarkFavicon"),(0,u.N7)("[data-favicon-override]",{add(e){const t=e.getAttribute("data-favicon-override");setTimeout(()=>dt(t,ft()?"dark":"light"))},remove(){Js()}}),bo(),document.addEventListener(Se.QE.SUCCESS,bo),window.matchMedia("(prefers-color-scheme: dark)").addListener(()=>{dt(void 0,ft()?"dark":"light")}),(0,u.N7)(".js-feature-preview-indicator-container",e=>{Qs(e)});async function Qs(e){const t=e.getAttribute("data-feature-preview-indicator-src"),n=await Ys(t),o=e.querySelectorAll(".js-feature-preview-indicator");for(const r of o)r.hidden=!n}s(Qs,"fetchFeaturePreviewIndicator");async function Ys(e){try{const t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?(await t.json()).show_indicator:!1}catch{return!1}}s(Ys,"fetchIndicator");var Te=f(12737),pe=f(29719);(0,c.on)("click","[data-feature-preview-trigger-url]",async e=>{const t=e.currentTarget,n=t.getAttribute("data-feature-preview-trigger-url"),o=await(0,Te.W)({content:(0,pe.a)(document,n),dialogClass:"feature-preview-dialog"}),r=t.getAttribute("data-feature-preview-close-details"),i=t.getAttribute("data-feature-preview-close-hmac");o.addEventListener("dialog:remove",()=>{(0,he.b)({hydroEventPayload:r,hydroEventHmac:i},!0)});const a=document.querySelectorAll(".js-feature-preview-indicator");for(const l of a)l.hidden=!0}),(0,C.AC)(".js-feature-preview-unenroll",async(e,t)=>{await t.text();const n=e.querySelector(".js-feature-preview-slug").value;(0,c.f)(e,`feature-preview-unenroll:${n}`)}),(0,C.AC)(".js-feature-preview-enroll",async(e,t)=>{await t.text();const n=e.querySelector(".js-feature-preview-slug").value;(0,c.f)(e,`feature-preview-enroll:${n}`)});class yo{constructor(t,n){this.attachment=t,this.policy=n}async process(t){var n,o,r,i;const a=window.performance.now(),l=new Headers(this.policy.header||{}),y=new XMLHttpRequest;y.open("POST",this.policy.upload_url,!0);for(const[I,F]of l)y.setRequestHeader(I,F);y.onloadstart=()=>{t.attachmentUploadDidStart(this.attachment,this.policy)},y.upload.onprogress=I=>{if(I.lengthComputable){const F=Math.round(I.loaded/I.total*100);t.attachmentUploadDidProgress(this.attachment,F)}},await ei(y,ti(this.attachment,this.policy)),y.status===204?(vo(this.policy),t.attachmentUploadDidComplete(this.attachment,this.policy,{})):y.status===201?(vo(this.policy),t.attachmentUploadDidComplete(this.attachment,this.policy,JSON.parse(y.responseText))):t.attachmentUploadDidError(this.attachment,{status:y.status,body:y.responseText});const R={duration:window.performance.now()-a,size:(o=(n=this.attachment)==null?void 0:n.file)==null?void 0:o.size,fileType:(i=(r=this.attachment)==null?void 0:r.file)==null?void 0:i.type,success:y.status===204||y.status===201};(0,he.b)({uploadTiming:R},!0)}}s(yo,"AttachmentUpload");function ei(e,t){return new Promise((n,o)=>{e.onload=()=>n(e),e.onerror=o,e.send(t)})}s(ei,"send");function ti(e,t){const n=new FormData;t.same_origin&&n.append("authenticity_token",t.upload_authenticity_token);for(const o in t.form)n.append(o,t.form[o]);return n.append("file",e.file),n}s(ti,"uploadForm");function vo(e){const t=typeof e.asset_upload_url=="string"?e.asset_upload_url:null,n=typeof e.asset_upload_authenticity_token=="string"?e.asset_upload_authenticity_token:null;if(!(t&&n))return;const o=new FormData;o.append("authenticity_token",n),fetch(t,{method:"PUT",body:o,credentials:"same-origin",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}})}s(vo,"markComplete");async function ni(e,t){const n=ii(e,t);for(const o of e.attachments){const r=await oi(e,o,t);if(!r)return;try{await new yo(o,r).process(n)}catch{(0,c.f)(t,"upload:error",{batch:e,attachment:o}),Ae(t,"is-failed");return}}}s(ni,"upload");async function oi(e,t,n){const o=ri(t,n),r=[];(0,c.f)(n,"upload:setup",{batch:e,attachment:t,form:o,preprocess:r});try{await Promise.all(r);const i=await fetch(si(o,n));if(i.ok)return await i.json();(0,c.f)(n,"upload:invalid",{batch:e,attachment:t});const a=await i.text(),l=i.status,{state:y,messaging:w}=wo({status:l,body:a},t.file);Ae(n,y,w)}catch{(0,c.f)(n,"upload:invalid",{batch:e,attachment:t}),Ae(n,"is-failed")}return null}s(oi,"validate");function ri(e,t){const n=t.querySelector(".js-data-upload-policy-url-csrf").value,o=t.getAttribute("data-upload-repository-id"),r=t.getAttribute("data-subject-type"),i=t.getAttribute("data-subject-param"),a=e.file,l=new FormData;return l.append("name",a.name),l.append("size",String(a.size)),l.append("content_type",a.type),l.append("authenticity_token",n),r&&l.append("subject_type",r),i&&l.append("subject",i),o&&l.append("repository_id",o),e.directory&&l.append("directory",e.directory),l}s(ri,"policyForm");function si(e,t){return new Request(t.getAttribute("data-upload-policy-url"),{method:"POST",body:e,credentials:"same-origin",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}})}s(si,"policyRequest");function ii(e,t){return{attachmentUploadDidStart(n,o){n.saving(0),Ae(t,"is-uploading"),(0,c.f)(t,"upload:start",{batch:e,attachment:n,policy:o})},attachmentUploadDidProgress(n,o){n.saving(o),(0,c.f)(t,"upload:progress",{batch:e,attachment:n})},attachmentUploadDidComplete(n,o,r){n.saved(ai(r,o)),(0,c.f)(t,"upload:complete",{batch:e,attachment:n}),e.isFinished()&&Ae(t,"is-default")},attachmentUploadDidError(n,o){(0,c.f)(t,"upload:error",{batch:e,attachment:n});const{state:r}=wo(o);Ae(t,r)}}}s(ii,"createDelegate");function ai(e,t){const n=(e.id==null?null:String(e.id))||(t.asset.id==null?null:String(t.asset.id)),o=(typeof e.href=="string"?e.href:null)||(typeof t.asset.href=="string"?t.asset.href:null);return{id:n,href:o,name:t.asset.name}}s(ai,"savedAttributes");function wo(e,t){if(e.status===400)return{state:"is-bad-file"};if(e.status!==422)return{state:"is-failed"};const n=JSON.parse(e.body);if(!n||!n.errors)return{state:"is-failed"};for(const o of n.errors)switch(o.field){case"size":{const r=t?t.size:null;return r!=null&&r===0?{state:"is-empty"}:{state:"is-too-big",messaging:{message:ci(o.message),target:".js-upload-too-big"}}}case"file_count":return{state:"is-too-many"};case"width":case"height":return{state:"is-bad-dimensions"};case"name":return o.code==="already_exists"?{state:"is-duplicate-filename"}:{state:"is-bad-file"};case"content_type":return{state:"is-bad-file"};case"uploader_id":return{state:"is-bad-permissions"};case"repository_id":return{state:"is-repository-required"};case"format":return{state:"is-bad-format"}}return{state:"is-failed"}}s(wo,"policyErrorState");const ci=s(e=>e.startsWith("size")?e.substring(5):e,"trimSizeErrorMessage"),li=["is-default","is-uploading","is-bad-file","is-duplicate-filename","is-too-big","is-too-many","is-hidden-file","is-failed","is-bad-dimensions","is-empty","is-bad-permissions","is-repository-required","is-bad-format"];function Ae(e,t,n){if(n){const{message:o,target:r}=n,i=e.querySelector(r);i&&(i.innerHTML=o)}e.classList.remove(...li),e.classList.add(t)}s(Ae,"resetState");class Eo{constructor(t){this.attachments=t,this.size=this.attachments.length,this.total=Yt(this.attachments,n=>n.file.size)}percent(){const t=s(o=>o.file.size*o.percent/100,"bytes"),n=Yt(this.attachments,t);return Math.round(n/this.total*100)}uploaded(){const t=s(n=>n.isSaved()?1:0,"value");return Yt(this.attachments,t)}isFinished(){return this.attachments.every(t=>t.isSaved())}}s(Eo,"Batch");function Yt(e,t){return e.reduce((n,o)=>n+t(o),0)}s(Yt,"sum"),(0,u.N7)("file-attachment[hover]",{add(e){e.classList.add("dragover")},remove(e){e.classList.remove("dragover")}}),(0,c.on)("file-attachment-accept","file-attachment",function(e){const{attachments:t}=e.detail;t.length===0&&(Ae(e.currentTarget,"is-hidden-file"),e.preventDefault())}),(0,c.on)("file-attachment-accepted","file-attachment",function(e){const t=e.currentTarget.querySelector(".drag-and-drop");if(t&&t.hidden)return;const{attachments:n}=e.detail;ni(new Eo(n),e.currentTarget)});let Lo=0;(0,u.N7)("file-attachment",{add(e){Lo++===0&&(document.addEventListener("drop",So),document.addEventListener("dragover",To));const t=e.closest("form");t&&t.addEventListener("reset",Ao)},remove(e){--Lo===0&&(document.removeEventListener("drop",So),document.removeEventListener("dragover",To));const t=e.closest("form");t&&t.removeEventListener("reset",Ao)}});function jo(e){return Array.from(e.types).indexOf("Files")>=0}s(jo,"file_attachment_hasFile");function So(e){const t=e.dataTransfer;t&&jo(t)&&e.preventDefault()}s(So,"onDocumentDrop");function To(e){const t=e.dataTransfer;t&&jo(t)&&e.preventDefault()}s(To,"onDocumentDragover");function Ao({currentTarget:e}){const t=e.querySelector("file-attachment");Ae(t,"is-default")}s(Ao,"onFormReset");var ui=f(13002);(0,c.on)("filter-input-updated","filter-input",e=>{const t=e.currentTarget.input;if(!(document.activeElement&&document.activeElement===t))return;const{count:n,total:o}=e.detail;(0,h.x)(`Found ${n} out of ${o} ${o===1?"item":"items"}`)}),(0,c.on)("toggle","details",e=>{setTimeout(()=>di(e.target),0)},{capture:!0}),(0,c.on)("tab-container-changed","tab-container",e=>{if(!(e.target instanceof HTMLElement))return;const{relatedTarget:t}=e.detail,n=e.target.querySelector("filter-input");n instanceof ui.Z&&n.setAttribute("aria-owns",t.id)},{capture:!0});function di(e){const t=e.querySelector("filter-input");t&&!e.hasAttribute("open")&&t.reset()}s(di,"resetFilter");function Co(e,t,n,o={}){var r;const i=(r=o.limit)!=null?r:1/0;let a=0;for(const l of e.children){const y=n(l,t);y==null||(y&&a<i?(a++,ko(l,!0)):ko(l,!1))}return a}s(Co,"filterList");function ko(e,t){e.style.display=t?"":"none",e.hidden=!t}s(ko,"toggle");var ge=f(8089),Ge=f(98670);const xo=new WeakMap;function Mo(e,t,n){const o=t.toLowerCase(),r=n.limit;let i=xo.get(e);const a=e.querySelector('input[type="radio"]:checked'),l=Array.from(e.children);i||(i=Array.from(e.children),xo.set(e,i));for(const X of l)e.removeChild(X),X instanceof HTMLElement&&(X.style.display="");const y=o?(0,Ge.W)(i,n.sortKey,ge.qu):i,w=r==null?y:y.slice(0,r),S=w.length,R=document.createDocumentFragment();for(const X of w)R.appendChild(X);let I=!1;if(a instanceof HTMLInputElement)for(const X of R.querySelectorAll('input[type="radio"]:checked'))X instanceof HTMLInputElement&&X.value!==a.value&&(X.checked=!1,I=!0);e.appendChild(R),a&&I&&a.dispatchEvent(new Event("change",{bubbles:!0}));const F=e.querySelectorAll(".js-divider");for(const X of F)X.classList.toggle("d-none",Boolean(o&&o.trim().length>0));return S}s(Mo,"filterSortList");var en=f(25833);let tn=new AbortController;const Ze=new WeakMap,qo=new WeakMap,Ro=new WeakMap;async function fi(e,t,n,o){n&&!Ze.has(e)&&pi(e);const r=await mi(e,t,n,o);return e.hasAttribute("data-filterable-data-pre-rendered")&&(r.suggestions=hi(e,n)),r}s(fi,"getData");async function mi(e,t,n,o){const r=new URL(e.getAttribute("data-filterable-src")||"",window.location.origin);if(r.pathname==="/")throw new Error("could not get data-filterable-src");if(n){const i=Ze.get(e),a=t.trim();if(i.lastSearchText===a)return i.lastSearchResult;const l=i.lastSearchText===void 0;i.lastSearchText=a;const y=e.getAttribute("data-filterable-for")||"",w=document.getElementById(y);if(tn.abort(),a===""&&!o)i.lastSearchResult={suggestions:[],users:[]};else{tn=new AbortController;const S={headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},signal:tn.signal},R=r.searchParams||new URLSearchParams;R.set("q",t),R.set("typeAhead","true"),r.search=R.toString(),l||w==null||w.classList.add("is-loading");const I=await fetch(r.toString(),S);i.lastSearchResult=await I.json()}return w==null||w.classList.remove("is-loading"),i.lastSearchResult}else{const i={headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}};return await(await fetch(r.toString(),i)).json()}}s(mi,"fetchQueryIfNeeded");function hi(e,t){const n=[],o=e.querySelectorAll(".js-filterable-suggested-user");if(o.length>0)for(const r of e.querySelectorAll(".js-filterable-suggested-user"))r.classList.remove("js-filterable-suggested-user"),n.push({name:r.querySelector(".js-description").textContent,login:r.querySelector(".js-username").textContent,selected:r.getAttribute("aria-checked")==="true",element:r,suggestion:!0});if(t){const r=Ze.get(e);return o.length>0&&(r.cachedSuggestions=n,r.userResultCache.clear()),r.cachedSuggestions}return n}s(hi,"getPreRenderedUsers");function pi(e){Ze.set(e,{lastSearchResult:{suggestions:[],users:[]},cachedSuggestions:[],userResultCache:new Map})}s(pi,"initializeTypeAheadCache");async function gi(e,t,n){var o,r;Ro.set(e,t),await(0,en.Z)();const i=e.hasAttribute("data-filterable-show-suggestion-header"),a=e.hasAttribute("data-filterable-type-ahead"),l=e.hasAttribute("data-filterable-type-ahead-query-on-empty");let y=qo.get(e);if(!y)try{y=await fi(e,t,a,l),a||qo.set(e,y)}catch(B){if(B.name==="AbortError")return-1;throw B}if(!a&&Ro.get(e)!==t)return-1;const w=n.limit,S=e.querySelector("template"),R={};for(const B of e.querySelectorAll("input[type=hidden]"))R[`${B.name}${B.value}`]=B;let I=S.nextElementSibling;for(;I;){const B=I;I=B.nextElementSibling,B instanceof HTMLElement&&(a||B.getAttribute("aria-checked")==="true"||B.classList.contains("select-menu-divider"))?B.hidden=!0:B.remove()}let F=0;const X=t.trim()==="",oe=document.createDocumentFragment(),Q=e.querySelector(".js-divider-suggestions"),se=e.querySelector(".js-divider-rest"),ce=Ze.get(e);function de(B){const G=`${B.login} ${B.name}`.toLowerCase().trim().includes(t),z=!(w!=null&&F>=w)&&G;if(z||B.selected||B.suggestion){const Z=bi(B,S,R,ce);Z.hidden=!z,z&&F++,oe.appendChild(Z)}}s(de,"addItem");let Y=!1;if(Q&&(((o=y.suggestions)==null?void 0:o.length)>0||i&&y.users.length>0)){const B=(r=y.suggestions)!=null?r:[],G=B.filter(Z=>Z.selected),z=B.filter(Z=>!Z.selected);for(const Z of G)de(Z);oe.appendChild(Q);const ee=F;for(const Z of z)de(Z);Y=F>ee,Q.hidden=!Y||a&&!X,i&&y.users.length>0&&(Q.hidden=!X)}se&&oe.appendChild(se);const He=F;for(const B of y.users)de(B);return se&&(se.hidden=He===F||!Y),e.append(oe),F}s(gi,"substringMemoryFilterList");function bi(e,t,n,o){if(e.element!=null)return e.element;if(o==null?void 0:o.userResultCache.has(e.id))return o.userResultCache.get(e.id);const r=t.content.cloneNode(!0),i=r.querySelector("input[type=checkbox], input[type=radio]");e.type&&(i.name=`reviewer_${e.type}_ids[]`),i.value=e.id;const a=`${i.name}${e.id}`;let l=e.selected;n[a]&&(l=!0,n[a].remove(),delete n[a]);const y=r.querySelector("[role^=menuitem]");l&&(y.setAttribute("aria-checked","true"),i.checked=!0),e.disabled&&y.setAttribute("aria-disabled","true");const w=r.querySelector(".js-username");w&&(w.textContent=e.login);const S=r.querySelector(".js-description");S&&(S.textContent=e.name);const R=r.querySelector(".js-extended-description");R&&(e.description?R.textContent=e.description:R.remove());const I=r.querySelector(".js-avatar");return I.className=`${I.className} ${e.class}`,I.src=e.avatar,e.element=y,o==null||o.userResultCache.set(e.id,y),e.element}s(bi,"createReviewerItem"),(0,u.N7)(".js-filterable-field",{constructor:HTMLInputElement,initialize(e){e.autocomplete||(e.autocomplete="off");const t=e.hasAttribute("type-ahead")?200:null;let n=e.value;async function o(i){n!==i.value&&(n=i.value,await(0,k.gJ)(),(0,c.f)(i,"filterable:change"))}s(o,"onInputChange");async function r(){n=e.value,await(0,k.gJ)(),(0,c.f)(e,"filterable:change")}return s(r,"onFocus"),{add(i){i.addEventListener("focus",r),(0,te.oq)(i,o,{wait:t}),document.activeElement===i&&r()},remove(i){i.removeEventListener("focus",r),(0,te.iU)(i,o)}}}}),(0,c.on)("filterable:change",".js-filterable-field",async function(e){const t=e.currentTarget,n=t.value.trim().toLowerCase(),o=document.querySelectorAll(`[data-filterable-for="${t.id}"]`);for(const r of o){const i=await vi(r,n);if(i===-1)return;document.activeElement&&t===document.activeElement&&(0,h.x)(`${i} results found.`),r.dispatchEvent(new CustomEvent("filterable:change",{bubbles:!0,cancelable:!1,detail:{inputField:t}}))}});function yi(e){return e.hasAttribute("data-filter-value")?e.getAttribute("data-filter-value").toLowerCase().trim():e.textContent.toLowerCase().trim()}s(yi,"defaultText");async function vi(e,t){const n=parseInt(e.getAttribute("data-filterable-limit"),10)||null;let o=0;switch(e.getAttribute("data-filterable-type")){case"fuzzy-prio":{const r=t.toLowerCase();o=Mo(e,t,{limit:n,sortKey:s(a=>{const l=a.getAttribute("data-prio-filter-value").toLowerCase().trim(),y=a.textContent.toLowerCase().trim(),w=(0,ge.EW)(l,r)*2;let S=(0,ge.EW)(y,r);return w>S&&(S=w),S>0?{score:S,text:y}:null},"sortKey")});break}case"fuzzy":{const r=t.toLowerCase();o=Mo(e,t,{limit:n,sortKey:s(a=>{const l=yi(a),y=(0,ge.EW)(l,r);return y>0?{score:y,text:l}:null},"sortKey")});break}case"substring":o=Co(e,t.toLowerCase(),Ei,{limit:n});break;case"substring-memory":o=await gi(e,t,{limit:n});break;default:o=Co(e,t.toLowerCase(),wi,{limit:n});break}return e.classList.toggle("filterable-active",t.length>0),e.classList.toggle("filterable-empty",o===0),o}s(vi,"filter");function wi(e,t){return e.textContent.toLowerCase().trim().startsWith(t)}s(wi,"prefix");function Ei(e,t){return e.hasAttribute("data-skip-substring-filter")||e.classList.contains("select-menu-no-results")?null:(e.querySelector("[data-filterable-item-text]")||e).textContent.toLowerCase().trim().includes(t)}s(Ei,"substring"),(0,c.on)("filterable:change","details-menu .select-menu-list",function(e){const t=e.currentTarget,n=t.querySelector(".js-new-item-form");n&&Li(t,n,e.detail.inputField.value)});function Li(e,t,n){const o=n.length>0&&!ji(e,n);if(e.classList.toggle("is-showing-new-item-form",o),!o)return;t.querySelector(".js-new-item-name").textContent=n;const r=t.querySelector(".js-new-item-value");(r instanceof HTMLInputElement||r instanceof HTMLButtonElement)&&(r.value=n)}s(Li,"toggleForm");function ji(e,t){for(const n of e.querySelectorAll("[data-menu-button-text]"))if(n.textContent.toLowerCase().trim()===t.toLowerCase())return!0;return!1}s(ji,"itemExists"),(0,u.N7)("tab-container .select-menu-list .filterable-empty, details-menu .select-menu-list .filterable-empty",{add(e){e.closest(".select-menu-list").classList.add("filterable-empty")},remove(e){e.closest(".select-menu-list").classList.remove("filterable-empty")}});const _o=navigator.userAgent.match(/Firefox\/(\d+)/);_o&&Number(_o[1])<76&&((0,u.N7)('details-menu label[tabindex][role^="menuitem"]',e=>{const t=e.querySelector("input");if(!t)return;const n=e.classList.contains("select-menu-item"),o=t.classList.contains("d-none"),r=n||o||t.hidden;n&&t.classList.add("d-block"),o&&t.classList.remove("d-none"),r&&(t.classList.add("sr-only"),t.hidden=!1),e.removeAttribute("tabindex")}),(0,c.on)("focus",'details-menu label[role="menuitemradio"] input, details-menu label[role="menuitemcheckbox"] input',e=>{const t=e.currentTarget.closest("label");t.classList.contains("select-menu-item")&&t.classList.add("navigation-focus"),t.classList.contains("SelectMenu-item")&&t.classList.add("hx_menuitem--focus"),t.classList.contains("dropdown-item")&&t.classList.add("hx_menuitem--focus"),e.currentTarget.addEventListener("blur",()=>{t.classList.contains("select-menu-item")&&t.classList.remove("navigation-focus"),t.classList.contains("SelectMenu-item")&&t.classList.remove("hx_menuitem--focus"),t.classList.contains("dropdown-item")&&t.classList.remove("hx_menuitem--focus")},{once:!0})},{capture:!0}),(0,j.w4)("keydown",'details-menu label[role="menuitemradio"] input, details-menu label[role="menuitemcheckbox"] input',async function(e){if(Po(e))e.currentTarget instanceof Element&&Si(e.currentTarget);else if(e.key==="Enter"){const t=e.currentTarget;e.preventDefault(),await(0,k.gJ)(),t instanceof HTMLInputElement&&t.click()}}),(0,c.on)("blur",'details-menu label input[role="menuitemradio"], details-menu label input[role="menuitemcheckbox"]',e=>{Io(e.currentTarget)},{capture:!0}),(0,j.w4)("keyup",'details-menu label[role="menuitemradio"] input, details-menu label[role="menuitemcheckbox"] input',e=>{!Po(e)||e.currentTarget instanceof Element&&Io(e.currentTarget)}));function Po(e){return e.key==="ArrowDown"||e.key==="ArrowUp"}s(Po,"isArrowKeys");function Si(e){const t=e.closest("label");t.hasAttribute("data-role")||t.setAttribute("data-role",t.getAttribute("role")),e.setAttribute("role",t.getAttribute("data-role")),t.removeAttribute("role")}s(Si,"switchRoleToInputForNavigation");function Io(e){const t=e.closest("label");t.hasAttribute("data-role")||t.setAttribute("data-role",t.getAttribute("role")),t.setAttribute("role",t.getAttribute("data-role")),e.removeAttribute("role")}s(Io,"switchRoleBackToOriginalState");var nn=f(11820);function Do(){document.firstElementChild.classList.contains("js-skip-scroll-target-into-view")||(0,nn.lA)(document)&&(0,nn.kc)(document)}s(Do,"scrollTargetIntoViewIfNeeded"),(0,Xt.Z)(Do),(0,c.on)("click",'a[href^="#"]',function(e){const{currentTarget:t}=e;t instanceof HTMLAnchorElement&&setTimeout(Do,0)}),(0,c.on)("click",".js-flash-close",function(e){const t=e.currentTarget.closest(".flash-messages");e.currentTarget.closest(".flash").remove(),t&&!t.querySelector(".flash")&&t.remove()});const Ti=["flash-notice","flash-error","flash-message","flash-warn"];function Ai(e){for(const{key:t,value:n}of Ti.flatMap(Ve.$1)){(0,Ve.kT)(t);let o;try{o=atob(decodeURIComponent(n))}catch{continue}e.after(new lt.R(e,{className:t,message:o}))}}s(Ai,"displayFlash"),(0,u.N7)("template.js-flash-template",{constructor:HTMLTemplateElement,add(e){Ai(e)}});const on=new WeakMap;document.addEventListener("focus",function(e){const t=e.target;t instanceof Element&&!on.get(t)&&((0,c.f)(t,"focusin:delay"),on.set(t,!0))},{capture:!0}),document.addEventListener("blur",function(e){setTimeout(function(){const t=e.target;t instanceof Element&&t!==document.activeElement&&((0,c.f)(t,"focusout:delay"),on.delete(t))},200)},{capture:!0}),(0,C.AC)(".js-form-toggle-target",async function(e,t){try{await t.text()}catch{return}const n=e.closest(".js-form-toggle-container");n.querySelector(".js-form-toggle-target[hidden]").hidden=!1,e.hidden=!0});var Ci=f(99254);function ki(e){e instanceof CustomEvent&&(0,h.x)(`${e.detail} results found.`)}s(ki,"noticeHandler"),(0,u.N7)("fuzzy-list",{constructor:Ci.Z,subscribe:e=>(0,M.RB)(e,"fuzzy-list-sorted",ki)}),(0,c.on)("click",".email-hidden-toggle",function(e){const t=e.currentTarget.nextElementSibling;t instanceof HTMLElement&&(t.style.display="",t.classList.toggle("expanded"),e.preventDefault())});var ou=f(30479);(0,u.N7)(".js-hook-url-field",{constructor:HTMLInputElement,add(e){function t(){const n=e.form;if(!n)return;let o;try{o=new URL(e.value)}catch{}const r=n.querySelector(".js-invalid-url-notice");r instanceof HTMLElement&&(r.hidden=!!(e.value===""||o&&/^https?:/.test(o.protocol)));const i=n.querySelector(".js-insecure-url-notice");i instanceof HTMLElement&&o&&e.value&&(i.hidden=/^https:$/.test(o.protocol));const a=n.querySelector(".js-ssl-hook-fields");a instanceof HTMLElement&&(a.hidden=!(o&&o.protocol==="https:"))}s(t,"checkUrl"),(0,te.oq)(e,t),t()}});function Ho(e){const t=document.querySelectorAll(".js-hook-event-checkbox");for(const n of t)n.checked=n.matches(e)}s(Ho,"chooseEvents"),(0,c.on)("change",".js-hook-event-choice",function(e){const t=e.currentTarget,n=t.checked&&t.value==="custom",o=t.closest(".js-hook-events-field");if(o&&o.classList.toggle("is-custom",n),t.checked)if(n){const r=document.querySelector(".js-hook-wildcard-event");r.checked=!1}else t.value==="push"?Ho('[value="push"]'):t.value==="all"&&Ho(".js-hook-wildcard-event")}),(0,c.on)("click",".js-hook-deliveries-pagination-button",async function(e){const t=e.currentTarget;t.disabled=!0;const n=t.parentElement,o=t.getAttribute("data-url");n.before(await(0,pe.a)(document,o)),n.remove()}),(0,C.AC)(".js-redeliver-hook-form",async function(e,t){let n;try{n=await t.html()}catch{e.classList.add("failed");return}document.querySelector(".js-hook-deliveries-container").replaceWith(n.html)});var $e=f(11793);(0,u.N7)("[data-hotkey]",{constructor:HTMLElement,add(e){if((0,at.Ty)())(0,$e.N9)(e);else{const t=e.getAttribute("data-hotkey");if(t){const n=xi(t);n.length>0&&(e.setAttribute("data-hotkey",n),(0,$e.N9)(e))}}},remove(e){(0,$e.Tz)(e)}});function xi(e){return e.split(",").filter(n=>(0,at.YE)(n)).join(",")}s(xi,"filterOutCharacterKeyShortcuts");var rn=f(53692);let ne=document.querySelector(".js-hovercard-content");(0,u.N7)(".js-hovercard-content",e=>{ne=e});const Mi=(0,qe.Z)(pe.a);let Ce,mt=null,sn,an=0;const cn=12,ln=24,Oo=ln-7,No=16,qi=100,Ri=250;function Re(e){return"Popover-message--"+e}s(Re,"contentClass");function _i(e){setTimeout(()=>{if(document.body&&document.body.contains(e)){const t=e.querySelector("[data-hovercard-tracking]");if(t){const o=t.getAttribute("data-hovercard-tracking");o&&(0,_.q)("user-hovercard-load",JSON.parse(o))}const n=e.querySelector("[data-hydro-view]");n instanceof HTMLElement&&(0,rn.Fk)(n)}},500)}s(_i,"trackLoad");function Fe(){ne instanceof HTMLElement&&(ne.style.display="none",ne.children[0].innerHTML="",mt=null,Ce=null)}s(Fe,"hideCard");function Pi(e){const t=e.getClientRects();let n=t[0]||e.getBoundingClientRect()||{top:0,left:0,height:0,width:0};if(t.length>0){for(const o of t)if(o.left<an&&o.right>an){n=o;break}}return n}s(Pi,"selectRectNearestMouse");function Ii(e){const{width:t,height:n}=ne.getBoundingClientRect(),{left:o,top:r,height:i,width:a}=Pi(e),l=r>n;if(e.classList.contains("js-hovercard-left")){const w=o-t-cn,S=r+i/2;return{containerTop:l?S-n+Oo+No/2:S-Oo-No/2,containerLeft:w,contentClassSuffix:l?"right-bottom":"right-top"}}else{const w=window.innerWidth-o>t,S=o+a/2,R=w?S-ln:S-t+ln;return{containerTop:l?r-n-cn:r+i+cn,containerLeft:R,contentClassSuffix:l?w?"bottom-left":"bottom-right":w?"top-left":"top-right"}}}s(Ii,"calculatePositions");function Di(e,t){if(!(ne instanceof HTMLElement))return;ne.style.visibility="hidden",ne.style.display="block",t.classList.remove(Re("bottom-left"),Re("bottom-right"),Re("right-top"),Re("right-bottom"),Re("top-left"),Re("top-right"));const{containerTop:n,containerLeft:o,contentClassSuffix:r}=Ii(e);t.classList.add(Re(r)),ne.style.top=`${n+window.pageYOffset}px`,ne.style.left=`${o+window.pageXOffset}px`,zi(e,ne),ne.style.visibility=""}s(Di,"positionCard");function Hi(e,t){if(!(ne instanceof HTMLElement))return;const n=ne.children[0];n.innerHTML="";const o=document.createElement("div");for(const r of e.children)o.appendChild(r.cloneNode(!0));n.appendChild(o),Di(t,n),_i(o),ne.style.display="block"}s(Hi,"showCard");function Oi(e){const t=e.closest("[data-hovercard-subject-tag]");if(t)return t.getAttribute("data-hovercard-subject-tag");const n=document.head&&document.head.querySelector('meta[name="hovercard-subject-tag"]');return n?n.getAttribute("content"):null}s(Oi,"determineEnclosingSubject");function Ni(e){const t=e.getAttribute("data-hovercard-url");if(t){const n=Oi(e);if(n){const o=new URL(t,window.location.origin),r=new URLSearchParams(o.search.slice(1));return r.append("subject",n),r.append("current_path",window.location.pathname+window.location.search),o.search=r.toString(),o.toString()}return t}return""}s(Ni,"hovercardUrlFromTarget");function Bi(e){const t=e.getAttribute("data-hovercard-type");return t==="pull_request"||t==="issue"?!!e.closest("[data-issue-and-pr-hovercards-enabled]"):t==="team"?!!e.closest("[data-team-hovercards-enabled]"):t==="repository"?!!e.closest("[data-repository-hovercards-enabled]"):t==="commit"?!!e.closest("[data-commit-hovercards-enabled]"):t==="project"?!!e.closest("[data-project-hovercards-enabled]"):t==="discussion"?!!e.closest("[data-discussion-hovercards-enabled]"):t==="acv_badge"?!!e.closest("[data-acv-badge-hovercards-enabled]"):t==="sponsors_listing"?!!e.closest("[data-sponsors-listing-hovercards-enabled]"):!0}s(Bi,"hovercardsAreEnabledForType");async function $i(e,t){if("ontouchstart"in document)return;const o=e.currentTarget;if(e instanceof MouseEvent&&(an=e.clientX),!(o instanceof Element)||Ce===o||o.closest(".js-hovercard-content")||!Bi(o))return;Fe(),Ce=o,mt=document.activeElement;const r=Ni(o);let i;try{const a=new Promise(l=>window.setTimeout(l,t,0));i=await Mi(document,r),await a}catch(a){const l=a.response;if(l&&l.status===404){const y="Hovercard is unavailable";o.setAttribute("aria-label",y),o.classList.add("tooltipped","tooltipped-ne")}else if(l&&l.status===410){const y=await l.clone().json();o.setAttribute("aria-label",y.message),o.classList.add("tooltipped","tooltipped-ne")}return}o===Ce&&(Hi(i,o),e instanceof KeyboardEvent&&ne instanceof HTMLElement&&ne.focus())}s($i,"activateFn");function Fi(e){$i(e,Ri)}s(Fi,"activateWithTimeoutFn");function un(e){if(!!Ce){if(e instanceof MouseEvent&&e.relatedTarget instanceof HTMLElement){const t=e.relatedTarget;if(t.closest(".js-hovercard-content")||t.closest("[data-hovercard-url]"))return}else e instanceof KeyboardEvent&&mt instanceof HTMLElement&&mt.focus();Fe()}}s(un,"deactivateFn");function Ui(e){const t=Ce;sn=window.setTimeout(()=>{Ce===t&&un(e)},qi)}s(Ui,"deactivateWithTimeoutFn");function Bo(e){if(e instanceof KeyboardEvent)switch(e.key){case"Escape":un(e)}}s(Bo,"keyupFn");function Wi(){sn&&clearTimeout(sn)}s(Wi,"cancelDeactivation"),ne&&((0,u.N7)("[data-hovercard-url]",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"mouseover",Fi),(0,M.RB)(e,"mouseleave",Ui),(0,M.RB)(e,"keyup",Bo))}),(0,u.N7)("[data-hovercard-url]",{remove(e){Ce===e&&Fe()}}),(0,u.N7)(".js-hovercard-content",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"mouseover",Wi),(0,M.RB)(e,"mouseleave",un),(0,M.RB)(e,"keyup",Bo))}),(0,c.on)("menu:activated","details",Fe),window.addEventListener("turbo:load",Fe),window.addEventListener("statechange",Fe));function zi(e,t){const n=e.getAttribute("data-hovercard-z-index-override");n?t.style.zIndex=n:t.style.zIndex="100"}s(zi,"setZIndexOverride"),async function(){document.addEventListener("pjax:complete",()=>(0,_.Y)({pjax:"true"})),document.addEventListener("soft-nav:success",()=>(0,_.Y)({turbo:"true"})),await me.C,(0,_.Y)()}(),(0,c.on)("click","[data-octo-click]",function(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const n=t.getAttribute("data-octo-click")||"",o={};if(t.hasAttribute("data-ga-click")){const i=t.getAttribute("data-ga-click").split(",");o.category=i[0].trim(),o.action=i[1].trim()}if(t.hasAttribute("data-octo-dimensions")){const r=t.getAttribute("data-octo-dimensions").split(",");for(const i of r){const[a,l]=i.split(/:(.+)/);a&&(o[a]=l||"")}}(0,_.q)(n,o)});var $o=f(84818);const{getItem:su}=(0,$o.Z)("localStorage");function Fo(e,t){var n,o}s(Fo,"debugPayload"),(0,c.on)("click","[data-hydro-click]",function(e){const t=e.currentTarget,n=t.getAttribute("data-hydro-click")||"",o=t.getAttribute("data-hydro-click-hmac")||"",r=t.getAttribute("data-hydro-client-context")||"";Fo("hydro-debug.click",n),(0,rn.$S)(n,o,r)}),(0,c.on)("click","[data-optimizely-hydro-click]",function(e){const t=e.currentTarget,n=t.getAttribute("data-optimizely-hydro-click")||"",o=t.getAttribute("data-optimizely-hydro-click-hmac")||"";Fo("hydro-debug.optimizely",n),(0,rn.$S)(n,o,"")}),(0,C.AC)(".js-immediate-updates",async function(e,t){let n;try{n=(await t.json()).json.updateContent}catch(o){o.response.json&&(n=o.response.json.updateContent)}if(n)for(const o in n){const r=n[o],i=document.querySelector(o);i instanceof HTMLElement&&(0,Me.Of)(i,r)}}),document.addEventListener("DOMContentLoaded",Ki);async function Ki(){if((0,U.c)("IMAGE_METRIC_TRACKING")===!1)return;const e=Array.from(document.querySelectorAll("img.js-img-time")).slice(0,5),t=Date.now(),n=[];await Promise.all(e.map(o=>Vi(o,t,n))),n.length>0&&(0,he.b)({transparentRedirectTimings:n})}s(Ki,"onDOMContentLoaded");async function Vi(e,t,n){const o=/\/assets\/storage\/user\/([0-9]+)\/files\/([{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?)/,r=/assets\/([0-9]+)\/([{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?)/,i=e.getAttribute("src");if(!i)return;const a=new URL(i,window.location.origin),l=o.test(a.pathname)?o:r,[,y,w]=a.pathname.match(l)||[];if(!y||!w)return;await fetch(`/assets/measure/${y}/${w}`);const R={duration:Date.now()-t,fileGUID:w,userID:y};n.push(R)}s(Vi,"measureRedirectTiming"),(0,u.N7)("[data-indeterminate]",{constructor:HTMLInputElement,initialize(e){e.indeterminate=!0}});var Xi=f(51244);function Gi(){f.e("app_assets_modules_github_jump-to_ts").then(f.bind(f,35653))}s(Gi,"load"),(0,u.N7)(".js-jump-to-field",{constructor:HTMLInputElement,add(e){e.addEventListener("focusin",Gi,{once:!0}),(0,Xi.Nc)(window.location.pathname)}});let dn=!1;async function Uo(){if(dn)return;dn=!0;const t={contexts:document.querySelector("meta[name=github-keyboard-shortcuts]").content},n=`/site/keyboard_shortcuts?${new URLSearchParams(t).toString()}`,o=await(0,Te.W)({content:(0,pe.a)(document,n),labelledBy:"keyboard-shortcuts-heading"});o.style.width="800px",o.addEventListener("dialog:remove",function(){dn=!1},{once:!0})}s(Uo,"showKeyboardShortcuts"),(0,c.on)("click",".js-keyboard-shortcuts",Uo),document.addEventListener("keydown",e=>{e instanceof KeyboardEvent&&(!(0,at.Zf)(e)||e.target instanceof Node&&(0,L.sw)(e.target)||(0,$e.EL)(e)==="Shift+?"&&Uo())}),(0,u.N7)(".js-modifier-key",{constructor:HTMLElement,add(e){if(/Macintosh/.test(navigator.userAgent)){let t=e.textContent;t&&(t=t.replace(/ctrl/,"\u2318"),t=t.replace(/alt/,"\u2325"),e.textContent=t)}}}),(0,u.N7)(".js-modifier-label-key",{add(e){var t;let n=(t=e.textContent)==null?void 0:t.replace(/ctrl/i,"Ctrl");!n||(/Macintosh/.test(navigator.userAgent)&&(n=n.replace(/ctrl/i,"Cmd"),n=n.replace(/alt/i,"Option")),e.textContent=n)}});function ht(e){const t=e.currentTarget;if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return;const n=parseInt(t.getAttribute("data-input-max-length")||"",10),o=parseInt(t.getAttribute("data-warning-length")||"",10)||5,i=t.value.replace(/(\r\n|\n|\r)/g,`\r
+`);let a=n-i.length;if(a<=0){let S=i.substr(0,n);S.endsWith("\r")?(S=S.substr(0,n-1),a=1):a=0,t.value=S}const l=t.getAttribute("data-warning-text"),w=t.closest(".js-length-limited-input-container").querySelector(".js-length-limited-input-warning");a<=o?(w.textContent=l.replace(new RegExp("{{remaining}}","g"),`${a}`),w.classList.remove("d-none")):(w.textContent="",w.classList.add("d-none"))}s(ht,"displayLengthWarning"),(0,u.N7)(".js-length-limited-input",{add(e){e.addEventListener("input",ht),e.addEventListener("change",ht)},remove(e){e.removeEventListener("input",ht),e.removeEventListener("change",ht)}}),(0,c.on)("click",".js-member-search-filter",function(e){e.preventDefault();const t=e.currentTarget.getAttribute("data-filter"),o=e.currentTarget.closest("[data-filter-on]").getAttribute("data-filter-on"),r=document.querySelector(".js-member-filter-field"),i=r.value,a=new RegExp(`${o}:(?:[a-z]|_|((').*(')))+`),l=i.toString().trim().replace(a,"");r.value=`${l} ${t}`.replace(/\s\s/," ").trim(),r.focus(),(0,c.f)(r,"input")}),(0,c.on)("auto-check-success",".js-new-organization-name",function(e){const t=e.target,o=t.closest("dd").querySelector(".js-field-hint-name");!o||(o.textContent=t.value)}),(0,C.AC)(".js-notice-dismiss",async function(e,t){await t.text(),e.closest(".js-notice").remove()}),(0,c.on)("submit",".js-notice-dismiss-remote",async function(e){const t=e.currentTarget;e.preventDefault();let n;try{n=await fetch(t.action,{method:t.method,body:new FormData(t),headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}})}catch{(0,T.v)();return}n&&!n.ok?(0,T.v)():t.closest(".js-notice").remove()});function Zi(e){try{const t=e.getBoundingClientRect();if(t.height===0&&t.width===0||e.style.opacity==="0"||e.style.visibility==="hidden")return!1}catch{}return!0}s(Zi,"isVisible"),(0,c.on)("click",".js-github-dev-shortcut",function(e){e.preventDefault();for(const n of document.querySelectorAll("textarea.js-comment-field"))if(n.value&&Zi(n)&&!confirm("Are you sure you want to open github.dev?"))return;const t=e.currentTarget;t.pathname=window.location.pathname,t.hash=window.location.hash,window.location.href=t.href}),(0,c.on)("click",".js-github-dev-new-tab-shortcut",function(e){const t=e.currentTarget;t.pathname=window.location.pathname,t.hash=window.location.hash});function Ji(e,t,n){const o=new URL("",window.location.origin),r=t.pathname.split("/");o.pathname=r.slice(1,3).join("/"),o.hash=t.hash,n&&(o.search=`?q=${encodeURIComponent(n)}`);const a=new URLSearchParams(t.search).get("q");return a?o.search=`?q=${encodeURIComponent(a)}`:r.length>=6&&(r[3]==="blob"||r[3]==="tree")&&(o.pathname=t.pathname),o.host=e.host,o.protocol=e.protocol,o.port=e.port,o}s(Ji,"getBlackbirdURL"),(0,c.on)("click",".js-blackbird-shortcut",function(e){var t;const n=e.currentTarget,o=Ji(n,new URL(window.location.href,window.location.origin),(t=window.getSelection())==null?void 0:t.toString());n.href=o.href}),(0,c.on)("click",".js-permalink-shortcut",function(e){const t=e.currentTarget;try{(0,E.lO)(null,"",t.href+window.location.hash)}catch{window.location.href=t.href+window.location.hash}for(const n of document.querySelectorAll(".js-permalink-replaceable-link"))n instanceof HTMLAnchorElement&&(n.href=n.getAttribute("data-permalink-href"));e.preventDefault()}),(0,C.AC)(".js-permission-menu-form",async function(e,t){const n=e.querySelector(".js-permission-success"),o=e.querySelector(".js-permission-error");n.hidden=!0,o.hidden=!0,e.classList.add("is-loading");let r;try{r=await t.json()}catch{e.classList.remove("is-loading"),o.hidden=!1;return}e.classList.remove("is-loading"),n.hidden=!1;const i=e.closest(".js-org-repo");if(i){const a=r.json;i.classList.toggle("with-higher-access",a.members_with_higher_access)}}),async function(){await me.x;const e=document.querySelector(".js-pjax-loader-bar");if(!e)return;const t=e.firstElementChild;if(!(t instanceof HTMLElement))return;let n=0,o=null,r=null;function i(){a(0),e&&e.classList.add("is-loading"),o=window.setTimeout(l,0)}s(i,"initiateLoader");function a(w){t instanceof HTMLElement&&(w===0&&(r==null&&(r=getComputedStyle(t).transition),t.style.transition="none"),n=w,t.style.width=`${n}%`,w===0&&(t.clientWidth,t.style.transition=r||""))}s(a,"setWidth");function l(){n===0&&(n=12),a(Math.min(n+3,95)),o=window.setTimeout(l,500)}s(l,"increment");function y(){o&&clearTimeout(o),a(100),e&&e.classList.remove("is-loading")}s(y,"finishLoader"),document.addEventListener("pjax:start",i),document.addEventListener("pjax:end",y)}();let fn=null;const mn="last_pjax_request",pt="pjax_start",hn="pjax_end";function Qi(e){e instanceof CustomEvent&&e.detail&&e.detail.url&&(window.performance.mark(pt),fn=e.detail.url)}s(Qi,"markPjaxStart");async function Yi(){if(await(0,k.gJ)(),!window.performance.getEntriesByName(pt).length)return;window.performance.mark(hn),window.performance.measure(mn,pt,hn);const t=window.performance.getEntriesByName(mn).pop(),n=t?t.duration:null;!n||(fn&&(0,he.b)({requestUrl:fn,pjaxDuration:Math.round(n)}),ea())}s(Yi,"trackPjaxTiming");function ea(){window.performance.clearMarks(pt),window.performance.clearMarks(hn),window.performance.clearMeasures(mn)}s(ea,"clearPjaxMarks"),"getEntriesByName"in window.performance&&(document.addEventListener("pjax:start",Qi),document.addEventListener("pjax:end",Yi));let pn=null;const gn="last_turbo_request",gt="turbo_start",bn="turbo_end";function ta(e){var t;e instanceof CustomEvent&&(!((t=e.detail)==null?void 0:t.url)||(window.performance.mark(gt),pn=e.detail.url))}s(ta,"markTurboStart");async function na(){if(await(0,k.gJ)(),!window.performance.getEntriesByName(gt).length)return;window.performance.mark(bn),window.performance.measure(gn,gt,bn);const t=window.performance.getEntriesByName(gn).pop(),n=t?t.duration:null;!n||(pn&&(0,he.b)({requestUrl:pn,turboDuration:Math.round(n)}),oa())}s(na,"trackTurboTiming");function oa(){window.performance.clearMarks(gt),window.performance.clearMarks(bn),window.performance.clearMeasures(gn)}s(oa,"clearTurboMarks"),"getEntriesByName"in window.performance&&(document.addEventListener("turbo:before-fetch-request",ta),document.addEventListener("turbo:render",na));var iu=f(11724);function ra(e,t){const n=e.split("/",3).join("/"),o=t.split("/",3).join("/");return n===o}s(ra,"isSameRepo"),(0,c.on)("pjax:click","#js-repo-pjax-container a[href]",function(e){const t=e.currentTarget.pathname;ra(t,location.pathname)||e.preventDefault()}),(0,c.on)("pjax:click",".js-comment-body",function(e){const t=e.target;t instanceof HTMLAnchorElement&&t.pathname.split("/")[3]==="files"&&e.preventDefault()});var au=f(54293),Wo=f(53412);(0,U.c)("TURBO")?(async()=>(0,c.on)("click",".js-turbo-history-navigate",function(e){const t=e;if(!(t.currentTarget instanceof HTMLAnchorElement)||t.shiftKey||t.metaKey||t.ctrlKey||t.altKey)return;const n=(0,E._C)(),o=(0,E.Mw)();n&&t.currentTarget.href===n?(t.preventDefault(),zo(n),history.back()):o&&t.currentTarget.href===o&&(t.preventDefault(),zo(o),history.forward())}))():(0,c.on)("pjax:click",".js-pjax-history-navigate",function(e){e.currentTarget instanceof HTMLAnchorElement&&(e.currentTarget.href===(0,E._C)()?(history.back(),e.detail.relatedEvent.preventDefault(),e.preventDefault()):e.currentTarget.href===(0,E.Mw)()&&(history.forward(),e.detail.relatedEvent.preventDefault(),e.preventDefault()))});function zo(e){document.addEventListener("turbo:before-fetch-request",function(t){if(!(0,Wo.H)(t.target))return;const n=t.detail.url.href;e===n&&(t.preventDefault(),(0,Se.F2)())},{once:!0})}s(zo,"cancelNextTurboFrameFetchRequest");function Ko(e){return e.getAttribute("data-pjax-preserve-scroll")!=null?!1:0}s(Ko,"preserveScrollTo");function yn(e){let t=e;for(;t;){const n=t.getAttribute("data-pjax");if(n&&n!=="true")return document.querySelector(n);t=t.parentElement&&t.parentElement.closest("[data-pjax]")}return e.closest("[data-pjax-container]")}s(yn,"detectContainer"),(0,c.on)("click","[data-pjax] a, a[data-pjax]",function(e){const t=e.currentTarget;if(t instanceof HTMLAnchorElement){if(t.getAttribute("data-skip-pjax")!=null||t.getAttribute("data-remote")!=null)return;const n=yn(t);n&&sa(e,{container:n,scrollTo:Ko(t)})}}),(0,c.on)("change","select[data-pjax]",function(e){if((0,U.c)("TURBO"))return;const t=e.currentTarget,n=yn(t);n&&(0,W.ZP)({url:t.value,container:n})});function sa(e,t){if((0,U.c)("TURBO"))return;const n=e.currentTarget;if(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||location.protocol!==n.protocol||location.hostname!==n.hostname||n.href.indexOf("#")>-1&&Vo(n)===Vo(location)||e.defaultPrevented)return;const o={url:n.href,target:n,...t},r=new CustomEvent("pjax:click",{bubbles:!0,cancelable:!0,detail:{options:o,relatedEvent:e}});n.dispatchEvent(r)&&((0,W.ZP)(o),e.preventDefault(),n.dispatchEvent(new CustomEvent("pjax:clicked",{bubbles:!0,cancelable:!0,detail:{options:o}})))}s(sa,"click");function Vo(e){return e.href.replace(/#.*/,"")}s(Vo,"stripHash"),(0,c.on)("submit","form[data-pjax]",function(e){if((0,U.c)("TURBO"))return;const t=e.currentTarget,n=yn(t);if(!n)return;const o=Ko(t),r={type:(t.method||"GET").toUpperCase(),url:t.action,target:t,scrollTo:o,container:n};if(r.type==="GET"){if(t.querySelector("input[type=file]"))return;const i=ia(r.url);i.search+=(i.search?"&":"")+(0,L.qC)(t),r.url=i.toString()}else r.data=new FormData(t);(0,W.ZP)(r),e.preventDefault()});function ia(e){const t=document.createElement("a");return t.href=e,t}s(ia,"parseURL"),(0,u.N7)("body.js-print-popup",()=>{window.print(),setTimeout(window.close,1e3)}),(0,u.N7)("poll-include-fragment[data-redirect-url]",function(e){const t=e.getAttribute("data-redirect-url");e.addEventListener("load",function(){window.location.href=t})}),(0,u.N7)("poll-include-fragment[data-reload]",function(e){e.addEventListener("load",function(){window.location.reload()})});var aa=f(97474),ca=f(92003);const la="$__",Xo=document.querySelector("meta[name=js-proxy-site-detection-payload]"),Go=document.querySelector("meta[name=expected-hostname]");if(Xo instanceof HTMLMetaElement&&Go instanceof HTMLMetaElement&&(0,aa.Z)(document)){const e={url:window.location.href,expectedHostname:Go.content,documentHostname:document.location.hostname,proxyPayload:Xo.content},t=new Error,n={};n[`${la}`]=btoa(JSON.stringify(e)),(0,ca.eK)(t,n)}(0,j.w4)("keydown",".js-quick-submit",function(e){ua(e)});function ua(e){const t=e.target;if((e.ctrlKey||e.metaKey)&&e.key==="Enter"){const n=t.form,o=n.querySelector("input[type=submit], button[type=submit]");if(e.shiftKey){const r=n.querySelector(".js-quick-submit-alternative");(r instanceof HTMLInputElement||r instanceof HTMLButtonElement)&&!r.disabled&&(0,L.Bt)(n,r)}else(o instanceof HTMLInputElement||o instanceof HTMLButtonElement)&&o.disabled||(0,L.Bt)(n);e.preventDefault()}}s(ua,"quickSubmit");var Zo=f(55498);let bt;(0,u.N7)(".js-comment-quote-reply",function(e){var t;e.hidden=((t=e.closest(".js-quote-selection-container"))==null?void 0:t.querySelector(".js-inline-comment-form-container textarea, .js-new-comment-form textarea"))==null});function Jo(e){return e.nodeName==="DIV"&&e.classList.contains("highlight")}s(Jo,"isHighlightContainer");function da(e){return e.nodeName==="IMG"||e.firstChild!=null}s(da,"hasContent");const Qo={PRE(e){const t=e.parentElement;if(t&&Jo(t)){const n=t.className.match(/highlight-source-(\S+)/),o=n?n[1]:"",r=(e.textContent||"").replace(/\n+$/,"");e.textContent=`\`\`\`${o}
+${r}
+\`\`\``,e.append(`
+
+`)}return e},A(e){const t=e.textContent||"";return e.classList.contains("user-mention")||e.classList.contains("team-mention")||e.classList.contains("issue-link")&&/^#\d+$/.test(t)?t:e},IMG(e){const t=e.getAttribute("alt");return t&&e.classList.contains("emoji")?t:e},DIV(e){if(e.classList.contains("js-suggested-changes-blob"))e.remove();else if(e.classList.contains("blob-wrapper-embedded")){const t=e.parentElement,n=t.querySelector("a[href]"),o=document.createElement("p");o.textContent=n.href,t.replaceWith(o)}return e}};function fa(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,{acceptNode(r){return r.nodeName in Qo&&da(r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),n=[];let o=t.nextNode();for(;o;)o instanceof HTMLElement&&n.push(o),o=t.nextNode();n.reverse();for(const r of n)r.replaceWith(Qo[r.nodeName](r))}s(fa,"insertMarkdownSyntax"),(0,c.on)("click",".js-comment-quote-reply",function({isTrusted:e,currentTarget:t}){const n=t.closest(".js-comment"),o=n.querySelector(".js-comment-body"),r=n.querySelector(".js-comment-body").cloneNode(!0),i=n.closest(".js-quote-selection-container"),a=o.querySelectorAll("button.js-convert-to-issue-button, span.js-clear");for(const w of a)w.remove();let l=new Zo.p;if(!e&&l.range.collapsed||(i.hasAttribute("data-quote-markdown")&&(l=new Zo.I(i.getAttribute("data-quote-markdown")||"",w=>{const S=l.range.startContainer.parentElement,R=S&&S.closest("pre");if(R instanceof HTMLElement){const I=R.parentElement;if(I&&Jo(I)){const F=document.createElement("div");F.className=I.className,F.appendChild(w),w.appendChild(F)}}fa(w)})),bt&&o.contains(bt.anchorNode)?l.range=bt.range:l.range.collapsed&&l.select(o),l.closest(".js-quote-selection-container")!==i))return;const y=l.range;i.dispatchEvent(new CustomEvent("quote-selection",{bubbles:!0,detail:l})),l.range=y;for(const w of i.querySelectorAll("textarea"))if((0,le.Z)(w)){l.insert(w);break}n.querySelector(".js-comment-body").replaceWith(r)});let vn;document.addEventListener("selectionchange",(0,P.D)(function(){const e=window.getSelection();let t;try{t=e.getRangeAt(0)}catch{vn=null;return}vn={anchorNode:e.anchorNode,range:t}},100)),document.addEventListener("toggle",()=>{bt=vn},{capture:!0});const ma=new ResizeObserver(e=>{for(const t of e)t.contentRect.height>26&&ha(t.target)});(0,u.N7)(".js-reactions-container",function(e){ma.observe(e)});function ha(e){const t=e.offsetWidth*.8,n=e.querySelectorAll(".js-reaction-group-button"),o=e.querySelector(".js-all-reactions-popover");let r=0;for(const i of n)r+=i.clientWidth;if(r+=(o==null?void 0:o.clientWidth)||0,t<r){let i=t;o&&(o.removeAttribute("hidden"),i-=o.offsetWidth);for(const a of n){const l=a.offsetWidth;l>i?a.setAttribute("hidden","hidden"):a.removeAttribute("hidden"),i-=l}}}s(ha,"hideReactionOverflow"),(0,C.AC)(".js-pick-reaction",async function(e,t){const n=await t.json(),o=e.closest(".js-comment"),r=o.querySelector(".js-reactions-container"),i=o.querySelector(".js-comment-header-reaction-button"),a=(0,q.r)(document,n.json.reactions_container.trim()),l=(0,q.r)(document,n.json.comment_header_reaction_button.trim());r.replaceWith(a),i.replaceWith(l)});function Yo(e){const t=e.target,n=t.getAttribute("data-reaction-label"),r=t.closest(".js-add-reaction-popover").querySelector(".js-reaction-description");r.hasAttribute("data-default-text")||r.setAttribute("data-default-text",r.textContent||""),r.textContent=n}s(Yo,"showReactionContent");function er(e){const n=e.target.closest(".js-add-reaction-popover").querySelector(".js-reaction-description"),o=n.getAttribute("data-default-text");o&&(n.textContent=o)}s(er,"hideReactionContent"),(0,c.on)("toggle",".js-reaction-popover-container",function(e){const t=e.currentTarget.hasAttribute("open");for(const n of e.target.querySelectorAll(".js-reaction-option-item"))t?(n.addEventListener("mouseenter",Yo),n.addEventListener("mouseleave",er)):(n.removeEventListener("mouseenter",Yo),n.removeEventListener("mouseleave",er))},{capture:!0});var wn=f(2061);function pa(e,t,n){e.getAttribute("data-type")==="json"&&n.headers.set("Accept","application/json"),(0,c.f)(e,"deprecatedAjaxSend",{request:n}),t.text().catch(r=>{if(r.response)return r.response;throw r}).then(r=>{r.status<300?(0,c.f)(e,"deprecatedAjaxSuccess"):(0,c.f)(e,"deprecatedAjaxError",{error:r.statusText,status:r.status,text:r.text})},r=>{(0,c.f)(e,"deprecatedAjaxError",{error:r.message,status:0,text:null})}).then(()=>{(0,c.f)(e,"deprecatedAjaxComplete")})}s(pa,"submitWithLegacyEvents"),(0,c.on)("click",["form button:not([type])","form button[type=submit]","form input[type=submit]"].join(", "),function(e){const t=e.currentTarget;t.form&&!e.defaultPrevented&&(0,wn.j)(t)}),(0,C.AC)("form[data-remote]",pa),(0,c.on)("deprecatedAjaxComplete","form",function({currentTarget:e}){const t=(0,wn.u)(e);t&&t.remove()}),(0,C.uT)(e=>{const t=(0,wn.u)(e);t&&t.remove()}),(0,C.rK)(en.Z),(0,u.N7)(".has-removed-contents",function(){let e;return{add(t){e=Array.from(t.childNodes);for(const o of e)t.removeChild(o);const n=t.closest("form");n&&(0,c.f)(n,"change")},remove(t){for(const o of e)t.appendChild(o);const n=t.closest("form");n&&(0,c.f)(n,"change")}}});var fe=f(36162),ga=(e=>(e.Auto="auto",e.Light="light",e.Dark="dark",e))(ga||{});function ba(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}s(ba,"getUserSystemColorMode");const En=".js-render-plaintext";function ya(e){const t=e.closest(".js-render-needs-enrichment");if(!t)return;t.querySelector(En)&&Ln(t,!1)}s(ya,"markdownEnrichmentSuccess");function va(e,t){Ln(e,!1),tr(e,!0),e.classList.add("render-error");const n=e.querySelector(En);if(!n)return;n.classList.remove("render-plaintext-hidden");const o=n.querySelector("pre");(0,fe.sY)(fe.dy`${t} ${o}`,n)}s(va,"showMarkdownRenderError");function Ln(e,t){const n=e.getElementsByClassName("js-render-enrichment-loader")[0],o=e.getElementsByClassName("render-expand")[0];n&&(n.hidden=!t),o&&(o.hidden=t)}s(Ln,"setCodeBlockLoaderVisibility");function tr(e,t){const n=e.querySelector(En);t?n.classList.remove("render-plaintext-hidden"):n.classList.add("render-plaintext-hidden")}s(tr,"setRawCodeBlockVisibility");class nr{constructor(t){this.el=t,this.enrichmentTarget=t.getElementsByClassName("js-render-enrichment-target")[0],this.iframeUrl=this.getIframeUrl(),this.identifier=this.el.getAttribute("data-identity"),this.iframeContentType=this.el.getAttribute("data-type"),this.iframeOrigin=new URL(this.iframeUrl,window.location.origin).origin,this.iframeContent=this.el.getAttribute("data-content"),Ln(this.el,!0)}enrich(){const t=this.createDialog();(0,fe.sY)(t,this.enrichmentTarget),this.setupModal()}getIframeUrl(){const t=(0,U.c)("GEOJSON_AZURE_MAPS"),n=this.el.getAttribute("data-src"),o=this.el.getAttribute("data-enterprise"),r={...this.colorMode(),azure_maps_enabled:t,enterprise_enable:o},i=Object.entries(r).map(([a,l])=>`${a}=${l}`).join("&");return`${n}?${i}`}colorMode(){var t;let n=(t=document.querySelector("html"))==null?void 0:t.getAttribute("data-color-mode");return(n==="auto"||!n)&&(n=ba()),{color_mode:n}}setupModal(){const t=this.generateIframeCode("-fullscreen"),n=this.el.querySelector(".Box-body");this.el.querySelector(".js-full-screen-render").addEventListener("click",()=>{(0,fe.sY)(t,n)})}createDialog(){const t=this.generateIframeCode();return fe.dy` <div class="d-flex flex-column flex-auto js-render-box">
+ <details class="details-reset details-overlay details-overlay-dark">
+ <summary class="btn-sm btn position-absolute js-full-screen-render render-expand" aria-haspopup="dialog" hidden>
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="currentColor"
+ class="octicon"
+ style="display:inline-block;vertical-align:text-bottom"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z"
+ ></path>
+ </svg>
+ </summary>
+ <details-dialog class="Box Box--overlay render-full-screen d-flex flex-column anim-fade-in fast">
+ <div>
+ <button
+ aria-label="Close dialog"
+ data-close-dialog=""
+ type="button"
+ data-view-component="true"
+ class="Link--muted btn-link position-absolute render-full-screen-close"
+ >
+ <svg
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ style="display:inline-block;vertical-align:text-bottom"
+ class="octicon octicon-x"
+ >
+ <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>
+ </svg>
+ </button>
+ <div class="Box-body"></div>
+ </div>
+ </details-dialog>
+ </details>
+ ${t}
+ </div>`}generateIframeCode(t=""){const n=this.identifier+t,o=`${this.iframeUrl}#${n}`;return fe.dy`
+ <div
+ class="render-container js-render-target p-0"
+ data-identity="${n}"
+ data-host="${this.iframeOrigin}"
+ data-type="${this.iframeContentType}"
+ >
+ <iframe
+ class="render-viewer"
+ src="${o}"
+ name="${n}"
+ data-content="${this.iframeContent}"
+ sandbox="allow-scripts allow-same-origin allow-top-navigation"
+ >
+ </iframe>
+ </div>
+ `}}s(nr,"EnrichableMarkdownRenderer"),(0,u.N7)(".js-render-needs-enrichment",function(e){const t=e;new nr(t).enrich()}),(0,c.on)("preview:toggle:off",".js-previewable-comment-form",function(e){const n=e.currentTarget.querySelector(".js-render-needs-enrichment"),o=n==null?void 0:n.querySelector(".js-render-enrichment-target");!o||(o.innerHTML="")}),(0,c.on)("preview:rendered",".js-previewable-comment-form",function(e){const n=e.currentTarget.querySelector(".js-render-needs-enrichment");n&&tr(n,!1)});const cu=null,yt=["is-render-pending","is-render-ready","is-render-loading","is-render-loaded"],wa=["is-render-ready","is-render-loading","is-render-loaded","is-render-failed","is-render-failed-fatally"],Ue=new WeakMap;function or(e){const t=Ue.get(e);t!=null&&(t.load=t.hello=null,t.helloTimer&&(clearTimeout(t.helloTimer),t.helloTimer=null),t.loadTimer&&(clearTimeout(t.loadTimer),t.loadTimer=null))}s(or,"resetTiming");function Je(e,t=""){var n;e.classList.remove(...yt),e.classList.add("is-render-failed");const o=La(t),r=(n=e.parentElement)==null?void 0:n.closest(".js-render-needs-enrichment");r?va(r,o):Ea(e,o),or(e)}s(Je,"renderFailed");function Ea(e,t){const n=e.querySelector(".render-viewer-error");n&&(n.remove(),e.classList.remove("render-container"),(0,fe.sY)(t,e))}s(Ea,"fileRenderError");function La(e){let t=fe.dy`<p>Unable to render code block</p>`;if(e!==""){const n=e.split(`
+`);t=fe.dy`<p><b>Error rendering embedded code</b></p>
+ <p>${n.map(o=>fe.dy`${o}<br />`)}</p>`}return fe.dy`<div class="flash flash-error">${t}</div>`}s(La,"renderError");function rr(e,t=!1){var n;!(0,le.Z)(e)||e.classList.contains("is-render-ready")||e.classList.contains("is-render-failed")||e.classList.contains("is-render-failed-fatally")||t&&!((n=Ue.get(e))==null?void 0:n.hello)||Je(e)}s(rr,"timeoutWatchdog"),(0,u.N7)(".js-render-target",function(e){var t;const n=e;n.classList.remove(...wa),n.style.height="auto",!((t=Ue.get(e))==null?void 0:t.load)&&(or(e),!Ue.get(e)&&(Ue.set(e,{load:Date.now(),hello:null,helloTimer:window.setTimeout(rr,1e4,e,!0),loadTimer:window.setTimeout(rr,45e3,e)}),e.classList.add("is-render-automatic","is-render-requested")))});function vt(e,t){e&&e.postMessage&&e.postMessage(JSON.stringify(t),"*")}s(vt,"postAsJson");function ja(e){let t=e.data;if(!t)return;if(typeof t=="string")try{t=JSON.parse(t)}catch{return}if(t.type!=="render"||typeof t.identity!="string")return;const n=t.identity;if(typeof t.body!="string")return;const o=t.body;let r=null;for(const w of document.querySelectorAll(".js-render-target"))if(w.getAttribute("data-identity")===n){r=w;break}if(!r||e.origin!==r.getAttribute("data-host"))return;const i=t.payload!=null?t.payload:void 0,a=r.querySelector("iframe"),l=a==null?void 0:a.contentWindow;function y(){const w=a==null?void 0:a.getAttribute("data-content");if(!w)return;const S={type:"render:cmd",body:{cmd:"code_rendering_service:data:ready","code_rendering_service:data:ready":{data:JSON.parse(w).data,width:r==null?void 0:r.getBoundingClientRect().width}}};vt(l,S)}switch(s(y,"postData"),o){case"hello":{const w=Ue.get(r)||{untimed:!0};w.hello=Date.now();const S={type:"render:cmd",body:{cmd:"ack",ack:!0}},R={type:"render:cmd",body:{cmd:"branding",branding:!1}};if(!l)return;vt(l,S),vt(l,R)}break;case"error":i?Je(r,i.error):Je(r);break;case"error:fatal":{Je(r),r.classList.add("is-render-failed-fatal");break}case"error:invalid":Je(r),r.classList.add("is-render-failed-invalid");break;case"loading":r.classList.remove(...yt),r.classList.add("is-render-loading");break;case"loaded":r.classList.remove(...yt),r.classList.add("is-render-loaded");break;case"ready":ya(r),r.classList.remove(...yt),r.classList.add("is-render-ready"),i&&typeof i.height=="number"&&(r.style.height=`${i.height}px`,location.hash!==""&&window.dispatchEvent(new HashChangeEvent("hashchange")));break;case"resize":i&&typeof i.height=="number"&&(r.style.height=`${i.height}px`);break;case"code_rendering_service:container:get_size":vt(l,{type:"render:cmd",body:{cmd:"code_rendering_service:container:size","code_rendering_service:container:size":{width:r==null?void 0:r.getBoundingClientRect().width}}});break;case"code_rendering_service:markdown:get_data":if(!l)return;y();break;default:break}}s(ja,"handleMessage"),window.addEventListener("message",ja),(0,C.AC)("form[data-replace-remote-form]",async function(e,t){e.classList.remove("is-error"),e.classList.add("is-loading");try{let n=e;const o=await t.html(),r=e.closest("[data-replace-remote-form-target]");if(r){const i=r.getAttribute("data-replace-remote-form-target");n=i?document.getElementById(i):r}n.replaceWith(o.html)}catch{e.classList.remove("is-loading"),e.classList.add("is-error")}}),PerformanceObserver&&(PerformanceObserver.supportedEntryTypes||[]).includes("longtask")&&new PerformanceObserver(function(t){const n=t.getEntries().map(({name:o,duration:r})=>({name:o,duration:r,url:window.location.href}));(0,he.b)({longTasks:n})}).observe({entryTypes:["longtask"]});const sr=new WeakMap;function Sa(e){return e.closest("markdown-toolbar").field}s(Sa,"getTextarea"),(0,c.on)("click",".js-markdown-link-button",async function({currentTarget:e}){const n=document.querySelector(".js-markdown-link-dialog").content.cloneNode(!0);if(!(n instanceof DocumentFragment))return;const o=await(0,Te.W)({content:n,labelledBy:"box-title"});e instanceof HTMLElement&&sr.set(o,Sa(e).selectionEnd)}),(0,c.on)("click",".js-markdown-link-insert",({currentTarget:e})=>{const t=e.closest("details-dialog"),n=document.querySelector(`#${e.getAttribute("data-for-textarea")}`),o=sr.get(t)||0,r=t.querySelector("#js-dialog-link-href").value,a=`[${t.querySelector("#js-dialog-link-text").value}](${r}) `,l=n.value.slice(0,o),y=n.value.slice(o);n.value=l+a+y,n.focus(),n.selectionStart=n.selectionEnd=o+a.length});var lu=f(17300);(0,c.on)("details-menu-select",".js-saved-reply-menu",function(e){if(!(e.target instanceof Element))return;const t=e.detail.relatedTarget.querySelector(".js-saved-reply-body");if(!t)return;const n=(t.textContent||"").trim(),r=e.target.closest(".js-previewable-comment-form").querySelector("textarea.js-comment-field");(0,Ee.Om)(r,n),setTimeout(()=>r.focus(),0)},{capture:!0}),(0,j.w4)("keydown",".js-saved-reply-shortcut-comment-field",function(e){(0,$e.EL)(e)==="Control+."&&(e.target.closest(".js-previewable-comment-form").querySelector(".js-saved-reply-container").setAttribute("open",""),e.preventDefault())}),(0,j.w4)("keydown",".js-saved-reply-filter-input",function(e){if(/^Control\+[1-9]$/.test((0,$e.EL)(e))){const n=e.target.closest(".js-saved-reply-container").querySelectorAll('[role="menuitem"]'),o=Number(e.key),r=n[o-1];r instanceof HTMLElement&&(r.click(),e.preventDefault())}else if(e.key==="Enter"){const n=e.target.closest(".js-saved-reply-container").querySelectorAll('[role="menuitem"]');n.length>0&&n[0]instanceof HTMLButtonElement&&n[0].click(),e.preventDefault()}});var Ta=f(29790),Aa=f(19218);function Ca(e,t){return e.querySelector(`#LC${t}`)}s(Ca,"queryLineElement");function wt(e,t,n,o){const r=(0,Ta.M9)(e,l=>Ca(t,l));if(!r)return;if(n){const l=(0,Ee.yb)(r.startContainer.textContent,r.startOffset);if(l===-1)return;r.setStart(r.startContainer,l)}if(o){const l=(0,Ee.yb)(r.endContainer.textContent,r.endOffset);if(l===-1)return;r.setEnd(r.endContainer,l)}const i=document.createElement("span"),a=["text-bold","hx_keyword-hl","rounded-2","d-inline-block"];i.classList.add(...a),(0,Aa.v)(r,i)}s(wt,"highlightRange");function ka(e,t){if(e.start.line!==e.end.line){const n={start:{line:e.start.line,column:e.start.column},end:{line:e.start.line,column:null}};wt(n,t,!0,!1);for(let r=e.start.line+1;r<e.end.line;r+=1)wt({start:{line:r,column:0},end:{line:r,column:null}},t,!1,!1);const o={start:{line:e.end.line,column:0},end:{line:e.end.line,column:e.end.column}};wt(o,t,!1,!0)}else wt(e,t,!0,!0)}s(ka,"highlightColumns");function xa(e){const t=parseInt(e.getAttribute("data-start-line")),n=parseInt(e.getAttribute("data-end-line")),o=parseInt(e.getAttribute("data-start-column")),r=parseInt(e.getAttribute("data-end-column"));return t===n&&o===r?null:{start:{line:t,column:o},end:{line:n,column:r!==0?r:null}}}s(xa,"parseColumnHighlightRange"),(0,u.N7)(".js-highlight-code-snippet-columns",function(e){const t=xa(e);t!==null&&ka(t,e)}),(0,c.on)("click",".js-segmented-nav-button",function(e){e.preventDefault();const t=e.currentTarget,n=t.getAttribute("data-selected-tab"),o=t.closest(".js-segmented-nav"),r=o.parentElement;for(const i of o.querySelectorAll(".js-segmented-nav-button"))i.classList.remove("selected");t.classList.add("selected");for(const i of r.querySelectorAll(".js-selected-nav-tab"))i.parentElement===r&&i.classList.remove("active");document.querySelector(`.${n}`).classList.add("active")});var ke=f(407),xe=f(25331);const Ma=(0,P.D)(function(){(0,ke.e6)((0,xe.e)())},50);function qa(){var e,t;return(t=(e=document.querySelector("html"))==null?void 0:e.hasAttribute("data-turbo-preview"))!=null?t:!1}s(qa,"isTurboRenderingCachePreview"),window.addEventListener("submit",ke.iO,{capture:!0}),window.addEventListener("pageshow",function(){(0,ke.e6)((0,xe.e)())}),window.addEventListener("pjax:end",function(){(0,ke.e6)((0,xe.e)())}),(0,u.N7)(".js-session-resumable",function(){qa()||Ma()}),window.addEventListener("pagehide",function(){(0,ke.Xm)((0,xe.e)(),{selector:".js-session-resumable"})}),window.addEventListener("pjax:beforeReplace",function(e){const t=e.detail.previousState,n=t?t.url:null;if(n)(0,ke.Xm)((0,xe.e)(new URL(n,window.location.origin)),{selector:".js-session-resumable"});else{const o=new Error("pjax:beforeReplace event.detail.previousState.url is undefined");setTimeout(function(){throw o})}}),window.addEventListener("turbo:before-visit",function(){(0,ke.Xm)((0,xe.e)(),{selector:".js-session-resumable"})}),window.addEventListener("turbo:load",function(){(0,ke.e6)((0,xe.e)())});function jn(){const e=document.querySelector('meta[name="selected-link"]'),t=e&&e.getAttribute("value");if(!!t)for(const n of document.querySelectorAll(".js-sidenav-container-pjax .js-selected-navigation-item")){const o=(n.getAttribute("data-selected-links")||"").split(" ").indexOf(t)>=0;o?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current"),n.classList.toggle("selected",o)}}s(jn,"updateSelectedRepoTab"),document.addEventListener("pjax:end",jn),document.addEventListener(Se.QE.FRAME_UPDATE,jn),document.addEventListener(Se.QE.SUCCESS,jn);var ir=f(11190),Ra=f(27034),_a=f(32904);async function Pa(){return(0,C.AC)(".js-notification-shelf .js-notification-action form",async function(e,t){if(e.hasAttribute("data-redirect-to-inbox-on-submit")){await ar(t);const o=document.querySelector(".js-notifications-back-to-inbox");o&&o.click();return}(0,_a.a)(e,e),await ar(t)})}s(Pa,"remoteShelfActionForm");function Ia(){const e=new URLSearchParams(window.location.search),t=(0,ir.n)(e);if(t){const n=new URL(window.location.href,window.location.origin);return n.search=t.toString(),n.toString()}}s(Ia,"urlWithoutNotificationParameters");function Da(e){if(!(e instanceof Ra.Z))return;const t=(0,ir.I)();if(!t)return;const n=e.getAttribute("data-base-src");if(!n)return;const o=new URL(n,window.location.origin),r=new URLSearchParams(o.search);for(const[i,a]of Object.entries(t))typeof a=="string"&&r.set(i,a);o.search=r.toString(),e.setAttribute("src",o.toString())}s(Da,"loadShelfFromStoredParams");async function ar(e){try{await e.text()}catch{}}s(ar,"performRequest"),Pa();function cr(){const e=Ia();e&&(0,E.lO)(null,"",e)}s(cr,"removeNotificationParams"),cr(),document.addEventListener(Se.QE.SUCCESS,cr),(0,u.N7)(".js-notification-shelf-include-fragment",Da),(0,c.on)("submit",".js-mark-notification-form",async function(e){const t=e.currentTarget;e.preventDefault();try{await fetch(t.action,{method:t.method,body:new FormData(t),headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}})}catch{}});async function lr(){await me.C;const e=document.querySelector(".js-mark-notification-form");e instanceof HTMLFormElement&&(0,L.Bt)(e)}s(lr,"markNotificationAsRead"),document.addEventListener(Se.QE.SUCCESS,lr),lr();function Ha(e){return!!e.closest(".js-jump-to-field")}s(Ha,"isJumpToAvailable");function Sn(e,t){if(Ha(e))return;const n=document.querySelector(".js-site-search-form");document.querySelector(".js-site-search").classList.toggle("scoped-search",t);let o,r;t?(o=n.getAttribute("data-scoped-search-url"),r=e.getAttribute("data-scoped-placeholder")):(o=n.getAttribute("data-unscoped-search-url"),r=e.getAttribute("data-unscoped-placeholder")),n.setAttribute("action",o),e.setAttribute("placeholder",r)}s(Sn,"toggleSearchScope"),(0,j.w4)("keyup",".js-site-search-field",function(e){const t=e.target,n=t.value.length===0;n&&e.key==="Backspace"&&t.classList.contains("is-clearable")&&Sn(t,!1),n&&e.key==="Escape"&&Sn(t,!0),t.classList.toggle("is-clearable",n)}),(0,j.ZG)(".js-site-search-focus",function(e){const t=e.closest(".js-chromeless-input-container");t.classList.add("focus");function n(){t.classList.remove("focus"),e.value.length===0&&e.classList.contains("js-site-search-field")&&Sn(e,!0),e.removeEventListener("blur",n)}s(n,"blurHandler"),e.addEventListener("blur",n)}),(0,c.on)("submit",".js-site-search-form",function(e){if(!(e.target instanceof Element))return;const t=e.target.querySelector(".js-site-search-type-field");t.value=new URLSearchParams(window.location.search).get("type")||""});var Oa=f(54430);(0,u.N7)("textarea.js-size-to-fit",{constructor:HTMLTextAreaElement,subscribe:Oa.Z});var Tn=f(61161);(0,c.on)("click",".js-smoothscroll-anchor",function(e){const t=e.currentTarget;if(!(t instanceof HTMLAnchorElement))return;const n=(0,Tn.Kt)(document,t.hash);!n||(n.focus(),n.scrollIntoView({behavior:"smooth"}),e.preventDefault())});const Na=1e3,ur=new WeakMap,dr=document.querySelector("#snippet-clipboard-copy-button");async function Ba(e,t){const n=e.getAttribute("data-snippet-clipboard-copy-content");if(n===null||(e.removeAttribute("data-snippet-clipboard-copy-content"),!(dr instanceof HTMLTemplateElement)))return;const r=dr.content.cloneNode(!0).children[0];if(!(r instanceof HTMLElement))return;const i=r.children[0];if(!(i instanceof HTMLElement))return;i.setAttribute("value",n),document.addEventListener("selectionchange",()=>{const l=document.getSelection();if(l&&e.contains(l.anchorNode)){const y=l==null?void 0:l.toString();i.style.display=y.trim()===""?"inherit":"none"}},{signal:t});const a=e.querySelector("pre");if(a!==null){let l;a.addEventListener("scroll",()=>{l&&clearTimeout(l),i.style.display="none",l=setTimeout(()=>{i.style.display="inherit"},Na)},{signal:t})}e.appendChild(r)}s(Ba,"insertSnippetClipboardCopyButton"),(0,u.N7)("[data-snippet-clipboard-copy-content]",{constructor:HTMLElement,add(e){if(e.parentElement&&e.parentElement.classList.contains("js-no-snippet-clipboard-copy"))return;const t=new AbortController;ur.set(e,t),Ba(e,t.signal)}}),(0,u.N7)(".snippet-clipboard-content clipboard-copy",{constructor:HTMLElement,remove(e){const t=ur.get(e);t&&t.abort()}});function fr(e,t,n){mr(e,t),n&&e.classList.toggle("on");const o=Array.from(e.querySelectorAll(".js-social-updatable"),Me.x0);return Promise.all(o)}s(fr,"handleSocialResponse"),(0,C.AC)(".js-social-form",async function(e,t){var n,o;let r;const i=e.closest(".js-social-container"),a=e.classList.contains("js-deferred-toggler-target");try{r=await t.json(),i&&await fr(i,r.json.count,a)}catch(l){if(((n=l.response)==null?void 0:n.status)===409&&l.response.json.confirmationDialog){const y=l.response.json.confirmationDialog,w=document.querySelector(y.templateSelector),S=(o=e.querySelector(".js-confirm-csrf-token"))==null?void 0:o.value;if(w instanceof HTMLTemplateElement&&S){const R=new lt.R(w,{confirmUrl:e.action,confirmCsrfToken:S,...y.inputs||{}}),I=await(0,Te.W)({content:R});I.addEventListener("social-confirmation-form:success",async F=>{F instanceof CustomEvent&&i&&await fr(i,F.detail.count,a)}),I.addEventListener("social-confirmation-form:error",()=>{(0,T.v)()})}}else i&&!a&&i.classList.toggle("on"),(0,T.v)()}}),(0,C.AC)(".js-social-confirmation-form",async function(e,t){try{const n=await t.json();(0,c.f)(e,"social-confirmation-form:success",n.json)}catch{(0,c.f)(e,"social-confirmation-form:error")}});function mr(e,t){for(const n of e.querySelectorAll(".js-social-count")){n.textContent=t;const o=n.getAttribute("data-singular-suffix"),r=n.getAttribute("data-plural-suffix"),i=t==="1"?o:r;i&&n.setAttribute("aria-label",`${t} ${i}`)}}s(mr,"updateSocialCounts");var _e=f(21461);class hr extends _e.a2{constructor(t,n,o,r){super(t,()=>this.getUrlFromRefreshUrl(),o,r);this.refreshUrl=n}getUrlFromRefreshUrl(){return $a(this.refreshUrl)}}s(hr,"AliveSession");async function $a(e){const t=await Fa(e);return t&&t.url&&t.token?Ua(t.url,t.token):null}s($a,"fetchRefreshUrl");async function Fa(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(t.ok)return t.json();if(t.status===404)return null;throw new Error("fetch error")}s(Fa,"fetchJSON");async function Ua(e,t){const n=await fetch(e,{method:"POST",mode:"same-origin",headers:{"Scoped-CSRF-Token":t}});if(n.ok)return n.text();throw new Error("fetch error")}s(Ua,"post");const Et=[],Wa=3e4,za=0;let Lt=document.hidden,jt;function Ka(e){return e(Lt),Et.push(e),new M.w0(()=>{const t=Et.indexOf(e);t!==-1&&Et.splice(t,1)})}s(Ka,"addIdleStateListener"),document.addEventListener("visibilitychange",()=>{const e=document.hidden;jt!==void 0&&clearTimeout(jt),jt=setTimeout(()=>{if(e!==Lt){Lt=e,jt=void 0;for(const n of Et)n(Lt)}},e?Wa:za)});function Va(){return"SharedWorker"in window&&(0,$o.Z)("localStorage").getItem("bypassSharedWorker")!=="true"}s(Va,"isSharedWorkerSupported");function Xa(){var e,t;return(t=(e=document.head.querySelector("link[rel=shared-web-socket-src]"))==null?void 0:e.href)!=null?t:null}s(Xa,"workerSrc");function Ga(){var e,t;return(t=(e=document.head.querySelector("link[rel=shared-web-socket]"))==null?void 0:e.href)!=null?t:null}s(Ga,"socketUrl");function Za(){var e,t;return(t=(e=document.head.querySelector("link[rel=shared-web-socket]"))==null?void 0:e.getAttribute("data-refresh-url"))!=null?t:null}s(Za,"socketRefreshUrl");function Ja(){var e,t;return(t=(e=document.head.querySelector("link[rel=shared-web-socket]"))==null?void 0:e.getAttribute("data-session-id"))!=null?t:null}s(Ja,"sessionIdentifier");function Qa(e){return pr(e).map(t=>({subscriber:e,topic:t}))}s(Qa,"subscriptions");function pr(e){return(e.getAttribute("data-channel")||"").trim().split(/\s+/).map(_e.Zf.parse).filter(Ya)}s(pr,"channels");function Ya(e){return e!=null}s(Ya,"isPresent");function gr(e,{channel:t,type:n,data:o}){for(const r of e)r.dispatchEvent(new CustomEvent(`socket:${n}`,{bubbles:!1,cancelable:!1,detail:{name:t,data:o}}))}s(gr,"notify");class br{constructor(t,n,o,r,i){this.subscriptions=new _e.vk,this.presenceMetadata=new _e.ah,this.notifyPresenceDebouncedByChannel=new Map,this.notify=i,this.worker=new SharedWorker(t,`github-socket-worker-v2-${r}`),this.worker.port.onmessage=({data:a})=>this.receive(a),this.worker.port.postMessage({connect:{url:n,refreshUrl:o}})}subscribe(t){const n=this.subscriptions.add(...t);n.length&&this.worker.port.postMessage({subscribe:n});const o=new Set(n.map(i=>i.name)),r=t.reduce((i,a)=>{const l=a.topic.name;return(0,_e.A)(l)&&!o.has(l)&&i.add(l),i},new Set);r.size&&this.worker.port.postMessage({requestPresence:Array.from(r)})}unsubscribeAll(...t){const n=this.subscriptions.drain(...t);n.length&&this.worker.port.postMessage({unsubscribe:n});const o=this.presenceMetadata.removeSubscribers(t);this.sendPresenceMetadataUpdate(o)}updatePresenceMetadata(t){const n=new Set;for(const o of t)this.presenceMetadata.setMetadata(o),n.add(o.channelName);this.sendPresenceMetadataUpdate(n)}sendPresenceMetadataUpdate(t){if(!t.size)return;const n=[];for(const o of t)n.push({channelName:o,metadata:this.presenceMetadata.getChannelMetadata(o)});this.worker.port.postMessage({updatePresenceMetadata:n})}online(){this.worker.port.postMessage({online:!0})}offline(){this.worker.port.postMessage({online:!1})}hangup(){this.worker.port.postMessage({hangup:!0})}receive(t){const{channel:n}=t;if(t.type==="presence"){let o=this.notifyPresenceDebouncedByChannel.get(n);o||(o=(0,P.D)((r,i)=>{this.notify(r,i),this.notifyPresenceDebouncedByChannel.delete(n)},100),this.notifyPresenceDebouncedByChannel.set(n,o)),o(this.subscriptions.subscribers(n),t);return}this.notify(this.subscriptions.subscribers(n),t)}}s(br,"AliveSessionProxy");function ec(){const e=Xa();if(!e)return;const t=Ga();if(!t)return;const n=Za();if(!n)return;const o=Ja();if(!o)return;const i=s(()=>{if(Va())try{return new br(e,t,n,o,gr)}catch{}return new hr(t,n,!1,gr)},"createSession")(),a=(0,k.g)(w=>i.subscribe(w.flat())),l=(0,k.g)(w=>i.unsubscribeAll(...w)),y=(0,k.g)(w=>i.updatePresenceMetadata(w));(0,u.N7)(".js-socket-channel[data-channel]",{subscribe:w=>{const S=Qa(w),R=S.map(F=>F.topic.name).filter(F=>(0,_e.A)(F));let I={unsubscribe(){}};if(R.length){let F,X;const oe=s(()=>{const Q=[];F&&Q.push(F),X!==void 0&&Q.push({[_e.ZE]:X?1:0});for(const se of R)y({subscriber:w,channelName:se,metadata:Q})},"queueMetadataOrIdleChange");I=(0,M.qC)((0,M.RB)(w,"socket:set-presence-metadata",Q=>{const{detail:se}=Q;F=se,oe()}),Ka(Q=>{!(0,U.c)("PRESENCE_IDLE")||(X=Q,oe())}))}return a(S),I},remove:w=>l(w)}),window.addEventListener("online",()=>i.online()),window.addEventListener("offline",()=>i.offline()),window.addEventListener("pagehide",()=>{"hangup"in i&&i.hangup()})}s(ec,"connect"),(async()=>(await me.x,ec()))();const yr=new Map;function tc(e,t){const n=[];for(const o of e){const r=yr.get(o.name);r&&r.arrived>t&&n.push(r)}return n}s(tc,"stale");function nc(e,t){for(const n of e.querySelectorAll(".js-socket-channel[data-channel]"))for(const o of tc(pr(n),t))n.dispatchEvent(new CustomEvent("socket:message",{bubbles:!1,cancelable:!1,detail:{name:o.name,data:o.data,cached:!0}}))}s(nc,"dispatch");function oc(e){const{name:t,data:n,cached:o}=e.detail;if(o)return;const r={name:t,data:{...n},arrived:Date.now()};r.data.wait=0,yr.set(t,r)}s(oc,"store"),document.addEventListener("socket:message",oc,{capture:!0}),document.addEventListener("pjax:popstate",function(e){const t=e.target,n=e.detail.cachedAt;n&&setTimeout(()=>nc(t,n))}),(0,u.N7)("form.js-auto-replay-enforced-sso-request",{constructor:HTMLFormElement,initialize(e){(0,L.Bt)(e)}});var uu=f(41928);function vr(e,t,n){const o=e.getBoundingClientRect().height,r=t.getBoundingClientRect(),i=n.getBoundingClientRect();let a=i.top;a+r.height+10>=o&&(a=Math.max(o-r.height-10,0));let l=i.right;n.closest(".js-build-status-to-the-left")!=null&&(l=Math.max(i.left-r.width-10,0)),t.style.top=`${a}px`,t.style.left=`${l}px`,t.style.right="auto"}s(vr,"updateStatusPosition"),(0,c.on)("toggle",".js-build-status .js-dropdown-details",function(e){const t=e.currentTarget,n=t.querySelector(".js-status-dropdown-menu");if(!n)return;function o(){t.hasAttribute("open")||i()}s(o,"closeOnToggle");function r(a){n.contains(a.target)||i()}s(r,"closeOnScroll");function i(){t.removeAttribute("open"),n.classList.add("d-none"),t.appendChild(n),t.removeEventListener("toggle",o),window.removeEventListener("scroll",r)}s(i,"closeStatusPopover"),t.addEventListener("toggle",o),n.classList.contains("js-close-menu-on-scroll")&&window.addEventListener("scroll",r,{capture:!0}),n.classList.remove("d-none"),n.querySelector(".js-details-container").classList.add("open"),n.classList.contains("js-append-menu-to-body")&&(document.body.appendChild(n),vr(document.body,n,t))},{capture:!0});async function wr(e){const t=e.querySelector(".js-dropdown-details"),n=e.querySelector(".js-status-dropdown-menu")||e.closest(".js-status-dropdown-menu");if(!(n instanceof HTMLElement))return;const o=n.querySelector(".js-status-loader");if(!o)return;const r=n.querySelector(".js-status-loading"),i=n.querySelector(".js-status-error"),a=o.getAttribute("data-contents-url");r.classList.remove("d-none"),i.classList.add("d-none");let l;try{await(0,en.Z)(),l=await(0,pe.a)(document,a)}catch{r.classList.add("d-none"),i.classList.remove("d-none")}l&&(o.replaceWith(l),n.querySelector(".js-details-container").classList.add("open"),t&&n.classList.contains("js-append-menu-to-body")&&vr(document.body,n,t))}s(wr,"loadStatus"),(0,c.on)("click",".js-status-retry",({currentTarget:e})=>{wr(e)});function Er(e){const t=e.currentTarget;wr(t)}s(Er,"onMouseEnter"),(0,u.N7)(".js-build-status",{add(e){e.addEventListener("mouseenter",Er,{once:!0})},remove(e){e.removeEventListener("mouseenter",Er)}});var du=f(55898),rc=f(82841);(0,c.on)("click","button[data-sudo-required], summary[data-sudo-required]",Lr),(0,u.N7)("form[data-sudo-required]",{constructor:HTMLFormElement,subscribe:e=>(0,M.RB)(e,"submit",Lr)});async function Lr(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;e.stopPropagation(),e.preventDefault(),await(0,rc.Z)()&&(t.removeAttribute("data-sudo-required"),t instanceof HTMLFormElement?(0,L.Bt)(t):t.click())}s(Lr,"checkSudo");const jr={"actor:":"ul.js-user-suggestions","user:":"ul.js-user-suggestions","operation:":"ul.js-operation-suggestions","org:":"ul.js-org-suggestions","action:":"ul.js-action-suggestions","repo:":"ul.js-repo-suggestions","country:":"ul.js-country-suggestions"};(0,u.N7)("text-expander[data-audit-url]",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"text-expander-change",ic),(0,M.RB)(e,"text-expander-value",sc))});function sc(e){const t=e.detail;if(!Sr(t.key))return;const n=t.item.getAttribute("data-value");t.value=`${t.key}${n}`}s(sc,"onvalue");function ic(e){const{key:t,provide:n,text:o}=e.detail;if(!Sr(t))return;const i=e.target.getAttribute("data-audit-url");n(lc(i,t,o))}s(ic,"onchange");function ac(e,t){const n=t.toLowerCase(),o=s(r=>{const i=r.textContent.toLowerCase().trim(),a=(0,ge.EW)(i,n);return a>0?{score:a,text:i}:null},"key");return n?(0,Ge.W)(e,o,ge.qu):e}s(ac,"search");const cc=(0,qe.Z)(e=>[...e.children],{hash:e=>e.className});async function lc(e,t,n){const r=(await fc(e)).querySelector(uc(t));if(!r)return{matched:!1};const i=ac(cc(r),n).slice(0,5),a=r.cloneNode(!1);a.innerHTML="";for(const l of i)a.append(l);return{fragment:a,matched:i.length>0}}s(lc,"auditMenu");function Sr(e){return Object.getOwnPropertyNames(jr).includes(e)}s(Sr,"isActivationKey");function uc(e){const t=jr[e];if(!t)throw new Error(`Unknown audit log expander key: ${e}`);return t}s(uc,"audit_log_suggester_selector");async function dc(e){const t=await(0,pe.a)(document,e),n=document.createElement("div");return n.append(t),n}s(dc,"fetchMenu");const fc=(0,qe.Z)(dc);function mc(e){if(e.hasAttribute("data-use-colon-emoji"))return e.getAttribute("data-value");const t=e.firstElementChild;return t&&t.tagName==="G-EMOJI"&&!t.firstElementChild?t.textContent:e.getAttribute("data-value")}s(mc,"getValue");function hc(e,t){const n=` ${t.toLowerCase().replace(/_/g," ")}`,o=s(r=>{const i=r.getAttribute("data-emoji-name"),a=gc(pc(r),n);return a>0?{score:a,text:i}:null},"key");return(0,Ge.W)(e,o,ge.qu)}s(hc,"emoji_suggester_search");function pc(e){return` ${e.getAttribute("data-text").trim().toLowerCase().replace(/_/g," ")}`}s(pc,"emojiText");function gc(e,t){const n=e.indexOf(t);return n>-1?1e3-n:0}s(gc,"emojiScore"),(0,u.N7)("text-expander[data-emoji-url]",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"text-expander-change",yc),(0,M.RB)(e,"text-expander-value",bc))});function bc(e){const t=e.detail;t.key===":"&&(t.value=mc(t.item))}s(bc,"emoji_suggester_onvalue");function yc(e){const{key:t,provide:n,text:o}=e.detail;if(t!==":")return;const i=e.target.getAttribute("data-emoji-url");n(vc(i,o))}s(yc,"emoji_suggester_onchange");async function vc(e,t){const[n,o]=await Ec(e),r=hc(o,t).slice(0,5);n.innerHTML="";for(const i of r)n.append(i);return{fragment:n,matched:r.length>0}}s(vc,"emojiMenu");async function wc(e){const n=(await(0,pe.a)(document,e)).firstElementChild;return[n,[...n.children]]}s(wc,"fetchEmoji");const Ec=(0,qe.Z)(wc);var Pe=f(38772);function Lc(e){return`${e.number} ${e.title.trim().toLowerCase()}`}s(Lc,"asText");function jc(e,t){if(!t)return e;const n=new RegExp(`\\b${Sc(t)}`),o=/^\d+$/.test(t)?i=>Tc(i,n):i=>(0,ge.EW)(i,t),r=s(i=>{const a=Lc(i),l=o(a);return l>0?{score:l,text:a}:null},"key");return(0,Ge.W)(e,r,ge.qu)}s(jc,"issue_suggester_search");function Sc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Sc,"escapeRegExp");function Tc(e,t){const n=e.search(t);return n>-1?1e3-n:0}s(Tc,"issueNumberScore");function Ac(e,t,n){const o=s(i=>Pe.dy`
+ <ul role="listbox" class="suggester-container suggester suggestions list-style-none position-absolute">
+ ${i.map(r)}
+ </ul>
+ `,"itemsTemplate"),r=s(i=>{const a=i.type in n?(0,q.r)(document,n[i.type]):"";return Pe.dy`
+ <li class="markdown-title" role="option" id="suggester-issue-${i.id}" data-value="${i.number}">
+ <span class="d-inline-block mr-1">${a}</span>
+ <small>#${i.number}</small> ${(0,Pe.Au)(i.title)}
+ </li>
+ `},"itemTemplate");(0,Pe.sY)(o(e),t)}s(Ac,"renderResults"),(0,u.N7)("text-expander[data-issue-url]",{subscribe:e=>{const t=[(0,M.RB)(e,"text-expander-change",kc),(0,M.RB)(e,"text-expander-value",Cc),(0,M.RB)(e,"keydown",Mc),(0,M.RB)(e,"click",xc)];return(0,M.qC)(...t)}});function Cc(e){const t=e.detail;if(t.key!=="#")return;const n=t.item.getAttribute("data-value");t.value=`#${n}`}s(Cc,"issue_suggester_onvalue");function kc(e){const{key:t,provide:n,text:o}=e.detail;if(t!=="#")return;if(o==="#"){An(e.target);return}const i=e.target.getAttribute("data-issue-url");n(qc(i,o))}s(kc,"issue_suggester_onchange");function An(e){if(!e)return;const t=e.closest("text-expander");t&&t.dismiss()}s(An,"hideSuggestions");function xc(e){An(e.target)}s(xc,"issue_suggester_onclick");function Mc(e){const t=["ArrowRight","ArrowLeft"],{key:n}=e;t.indexOf(n)<0||An(e.target)}s(Mc,"issue_suggester_onkeydown");async function qc(e,t){const n=await Rc(e),o=document.createElement("div"),r=jc(n.suggestions,t).slice(0,5);return Ac(r,o,n.icons),{fragment:o.firstElementChild,matched:r.length>0}}s(qc,"issueMenu");const Rc=(0,qe.Z)(async function(e){const t=await self.fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}});if(!t.ok){const n=new Error,o=t.statusText?` ${t.statusText}`:"";throw n.message=`HTTP ${t.status}${o}`,n}return t.json()});function _c(e){return e.description?`${e.name} ${e.description}`.trim().toLowerCase():`${e.login} ${e.name}`.trim().toLowerCase()}s(_c,"mention_suggester_asText");function Pc(e,t){if(!t)return e;const n=Dc(t),o=s(r=>{const i=_c(r),a=n(i,r.participant);return a>0?{score:a,text:i}:null},"key");return(0,Ge.W)(e,o,ge.qu)}s(Pc,"mention_suggester_search");function Ic(e,t){const n=s(r=>Pe.dy`
+ <ul role="listbox" class="suggester-container suggester suggestions list-style-none position-absolute">
+ ${r.map(o)}
+ </ul>
+ `,"itemsTemplate"),o=s(r=>{const i=r.type==="user"?r.login:r.name,a=r.type==="user"?r.name:r.description;return Pe.dy`
+ <li role="option" id="suggester-${r.id}-${r.type}-${i}" data-value="${i}">
+ <span>${i}</span>
+ <small>${a}</small>
+ </li>
+ `},"itemTemplate");(0,Pe.sY)(n(e),t)}s(Ic,"mention_suggester_renderResults");function Dc(e){if(!e)return()=>2;const t=e.toLowerCase().split("");return(n,o)=>{if(!n)return 0;const r=Hc(n,t);if(!r)return 0;const a=e.length/r[1]/(r[0]/2+1);return o?a+1:a}}s(Dc,"fuzzyScorer");function Hc(e,t){let n,o,r,i;const a=Oc(e,t[0]);if(a.length===0)return null;if(t.length===1)return[a[0],1,[]];for(i=null,o=0,r=a.length;o<r;o++){const l=a[o];if(!(n=Nc(e,t,l+1)))continue;const y=n[n.length-1]-l;(!i||y<i[1])&&(i=[l,y,n])}return i}s(Hc,"shortestMatch");function Oc(e,t){let n=0;const o=[];for(;(n=e.indexOf(t,n))>-1;)o.push(n++);return o}s(Oc,"allIndexesOf");function Nc(e,t,n){let o=n;const r=[];for(let i=1;i<t.length;i+=1){if(o=e.indexOf(t[i],o),o===-1)return;r.push(o++)}return r}s(Nc,"indexesOfChars"),(0,u.N7)("text-expander[data-mention-url]",{subscribe:e=>(0,M.qC)((0,M.RB)(e,"text-expander-change",$c),(0,M.RB)(e,"text-expander-value",Bc))});function Bc(e){const t=e.detail;if(t.key!=="@")return;const n=t.item.getAttribute("data-value");t.value=`@${n}`}s(Bc,"mention_suggester_onvalue");function $c(e){const{key:t,provide:n,text:o}=e.detail;if(t!=="@"||(o==null?void 0:o.split(" ").length)>1)return;const i=e.target.getAttribute("data-mention-url");n(Fc(i,o))}s($c,"mention_suggester_onchange");async function Fc(e,t){const n=await Uc(e),o=document.createElement("div"),r=Pc(n,t).slice(0,5);return Ic(r,o),{fragment:o.firstElementChild,matched:r.length>0}}s(Fc,"mentionMenu");const Uc=(0,qe.Z)(async function(e){const t=await self.fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}});if(!t.ok){const n=new Error,o=t.statusText?` ${t.statusText}`:"";throw n.message=`HTTP ${t.status}${o}`,n}return t.json()});function Wc(e,t){const n=e.closest(".js-survey-question-form"),o=n.querySelector("input.js-survey-other-text"),r=t&&!n.classList.contains("is-other-selected");n.classList.toggle("is-other-selected",r),o.hidden=!t,r?(o.required=!0,o.focus()):o.required=!1,(0,c.f)(o,"change")}s(Wc,"handleOther"),(0,c.on)("change","input.js-survey-radio",function({currentTarget:e}){Wc(e,e.classList.contains("js-survey-radio-other"))}),(0,c.on)("change","input.js-survey-checkbox-enable-submit",function({currentTarget:e}){var t;const n=e.checked,o=(t=e.closest("form"))==null?void 0:t.querySelector("button[type=submit]");o.disabled=!n}),(0,c.on)("change","input.js-survey-contact-checkbox",function(e){const t=e.currentTarget,o=t.closest(".js-survey-question-form").querySelector(".js-survey-contact-checkbox-hidden");t.checked?o.setAttribute("disabled","true"):o.removeAttribute("disabled")}),(0,c.on)("details-menu-selected",".js-sync-select-menu-text",function(e){const t=document.querySelector(".js-sync-select-menu-button"),n=e.detail.relatedTarget.querySelector("span[data-menu-button-text]").textContent;t.textContent=n,t.focus()},{capture:!0}),(0,c.on)("click",'tab-container [role="tab"]',function(e){const{currentTarget:t}=e,o=t.closest("tab-container").querySelector(".js-filterable-field, [data-filter-placeholder-input]");if(o instanceof HTMLInputElement){const r=t.getAttribute("data-filter-placeholder");r&&o.setAttribute("placeholder",r),o.focus()}}),(0,c.on)("tab-container-changed","tab-container",function(e){const t=e.detail.relatedTarget,n=t.getAttribute("data-fragment-url"),o=t.querySelector("include-fragment");n&&o&&!o.hasAttribute("src")&&(o.src=n)});var fu=f(32222),Tr=f(96776);document.addEventListener("keydown",e=>{if(e.key!=="Escape"||e.target!==document.body)return;const t=document.querySelector(".js-targetable-element:target");!t||(0,Tr.uQ)(t,()=>{window.location.hash="",(0,E.lO)(window.history.state,"",window.location.pathname+window.location.search)})}),document.addEventListener("click",e=>{const t=document.querySelector(".js-targetable-element:target");!t||e.target instanceof HTMLAnchorElement||e.target instanceof HTMLElement&&(t.contains(e.target)||(0,Tr.uQ)(t,()=>{window.location.hash="",(0,E.lO)(window.history.state,"",window.location.pathname+window.location.search)}))});var mu=f(72669);async function zc(e){const t=e.currentTarget;if(Vc(t)){t.classList.remove("tooltipped");return}const n=t.getAttribute("data-url");if(!n)return;const o=await fetch(n,{headers:{Accept:"application/json"}});if(!o.ok)return;const r=await o.json(),i=t.getAttribute("data-id"),a=document.querySelectorAll(`.js-team-mention[data-id='${i}']`);for(const l of a)l.removeAttribute("data-url");try{r.total===0?r.members.push("This team has no members"):r.total>r.members.length&&r.members.push(`${r.total-r.members.length} more`),Ar(a,Kc(r.members))}catch(l){const y=l.response?l.response.status:500,w=t.getAttribute(y===404?"data-permission-text":"data-error-text");Ar(a,w)}}s(zc,"members");function Ar(e,t){for(const n of e)n instanceof HTMLElement&&(n.setAttribute("aria-label",t),n.classList.add("tooltipped","tooltipped-s","tooltipped-multiline"))}s(Ar,"tip");function Kc(e){if("ListFormat"in Intl)return new Intl.ListFormat().format(e);if(e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return e.join(" and ");{const t=e[e.length-1];return e.slice(0,-1).concat(`and ${t}`).join(", ")}}s(Kc,"sentence");function Vc(e){return!!e.getAttribute("data-hovercard-url")&&!!e.closest("[data-team-hovercards-enabled]")}s(Vc,"teamHovercardEnabled"),(0,u.N7)(".js-team-mention",function(e){e.addEventListener("mouseenter",zc)});function Xc(){const e=document.querySelector(".js-timeline-marker");return e!=null?e.getAttribute("data-last-modified"):null}s(Xc,"getTimelineLastModified");function Cr(e){if(Zc(e)||Gc(e))return;const t=Xc();t&&e.headers.set("X-Timeline-Last-Modified",t)}s(Cr,"addTimelineLastModifiedHeader");function Gc(e){return e.headers.get("X-PJAX")==="true"}s(Gc,"isPjax");function Zc(e){let t;try{t=new URL(e.url)}catch{return!0}return t.host!==window.location.host}s(Zc,"isCrossDomain"),(0,C.AC)(".js-needs-timeline-marker-header",function(e,t,n){Cr(n)}),(0,c.on)("deprecatedAjaxSend","[data-remote]",function(e){const{request:t}=e.detail;Cr(t)});const kr=5e3,Jc=".js-comment-body img",Qc=".js-comment-body video";(0,Xt.Z)(function(){St()}),(0,u.N7)(".js-timeline-progressive-focus-container",function(e){const t=Tt();if(!t||document.querySelector(".js-pull-discussion-timeline"))return;const o=document.getElementById(t);o&&e.contains(o)&&Cn(o)});function St(e=!0){const t=Tt();if(!t)return;const n=document.getElementById(t);if(n)Cn(n);else{if(Yc(t))return;const o=document.querySelector("#js-timeline-progressive-loader");o&&e&&qr(t,o)}}s(St,"focusOrLoadElement");function Yc(e){return el(e)||xr(e,".js-thread-hidden-comment-ids")||xr(e,".js-review-hidden-comment-ids")}s(Yc,"loadComments");function el(e){const t=Mr(e,".js-comment-container");return t?((0,Gt.$)(t),!0):!1}s(el,"loadResolvedComments");function xr(e,t){const n=Mr(e,t);return n?(n.addEventListener("page:loaded",function(){St()}),n.querySelector("button[type=submit]").click(),!0):!1}s(xr,"loadHiddenComments");function Mr(e,t){var n;const o=document.querySelectorAll(t);for(const r of o){const i=r.getAttribute("data-hidden-comment-ids");if(i){const a=i.split(","),l=(n=e.match(/\d+/g))==null?void 0:n[0];if(l&&a.includes(l))return r}}return null}s(Mr,"findCommentContainer"),(0,u.N7)(".js-inline-comments-container",function(e){const t=Tt();if(!t)return;const n=document.getElementById(t);n&&e.contains(n)&&Cn(n)}),(0,u.N7)("#js-discussions-timeline-anchor-loader",{constructor:HTMLElement,add:e=>{if(document.querySelector("#js-timeline-progressive-loader"))return;const n=Tt();if(!n)return;document.getElementById(n)||qr(n,e)}});async function tl(){const e=document.querySelectorAll(Qc),t=Array.from(e).map(n=>new Promise(o=>{if(n.readyState>=n.HAVE_METADATA)o(n);else{const r=setTimeout(()=>o(n),kr),i=s(()=>{clearTimeout(r),o(n)},"done");n.addEventListener("loadeddata",()=>{n.readyState>=n.HAVE_METADATA&&i()}),n.addEventListener("error",()=>i())}}));return Promise.all(t)}s(tl,"videosReady");async function nl(){const e=document.querySelectorAll(Jc),t=Array.from(e).map(n=>{new Promise(o=>{if(n.complete)o(n);else{const r=setTimeout(()=>o(n),kr),i=s(()=>{clearTimeout(r),o(n)},"done");n.addEventListener("load",()=>i()),n.addEventListener("error",()=>i())}})});return Promise.all(t)}s(nl,"imagesReady");async function ol(){return Promise.all([tl(),nl()])}s(ol,"mediaLoaded");async function Cn(e){await ol(),rl(e);const t=e.querySelector(`[href='#${e.id}']`);if(t){const n=t.getAttribute("data-turbo");t.setAttribute("data-turbo","false"),t.click(),n===null?t.removeAttribute("data-turbo"):t.setAttribute("data-turbo",n)}}s(Cn,"focusElement");async function qr(e,t){if(!t)return;const n=t.getAttribute("data-timeline-item-src");if(!n)return;const o=new URL(n,window.location.origin),r=new URLSearchParams(o.search.slice(1));r.append("anchor",e),o.search=r.toString();let i;try{i=await(0,pe.a)(document,o.toString())}catch{return}const a=i.querySelector(".js-timeline-item");if(!a)return;const l=a.getAttribute("data-gid");if(!l)return;const y=document.querySelector(`.js-timeline-item[data-gid='${l}']`);if(y)y.replaceWith(a),St(!1);else{const w=document.getElementById("js-progressive-timeline-item-container");w&&w.replaceWith(i),St(!1)}}s(qr,"loadElement");function rl(e){const t=e.closest("details, .js-details-container");!t||(t.nodeName==="DETAILS"?t.setAttribute("open","open"):(0,Vt.jo)(t)||(0,Vt.Qp)(t))}s(rl,"expandDetailsIfPresent");function Tt(){return window.location.hash.slice(1)}s(Tt,"urlAnchor"),(0,u.N7)(".js-discussion",sl);function sl(){let e=new WeakSet;t(),document.addEventListener("pjax:end",t),document.addEventListener("turbo:load",t),(0,u.N7)(".js-timeline-item",n=>{n instanceof HTMLElement&&(e.has(n)||(0,h.N)(n))});function t(){e=new WeakSet(document.querySelectorAll(".js-timeline-item"))}s(t,"setExistingTimelineItems")}s(sl,"announceTimelineEvents");var Qe=f(82131);function Ye(e){const{name:t,value:n}=e,o={name:window.location.href};switch(t){case"CLS":o.cls=n;break;case"FCP":o.fcp=n;break;case"FID":o.fid=n;break;case"LCP":o.lcp=n;break;case"TTFB":o.ttfb=n;break}(0,he.b)({webVitalTimings:[o]}),il(t,n)}s(Ye,"sendVitals");function il(e,t){const n=document.querySelector("#staff-bar-web-vitals"),o=n==null?void 0:n.querySelector(`[data-metric=${e.toLowerCase()}]`);!o||(o.textContent=t.toPrecision(6))}s(il,"updateStaffBar");function al(){return!!(window.performance&&window.performance.timing&&window.performance.getEntriesByType)}s(al,"isTimingSuppported");async function cl(){if(!al())return;await me.C,await new Promise(n=>setTimeout(n));const e=window.performance.getEntriesByType("resource");e.length&&(0,he.b)({resourceTimings:e});const t=window.performance.getEntriesByType("navigation");t.length&&(0,he.b)({navigationTimings:t})}s(cl,"sendTimingResults"),cl(),(0,Qe.kz)(Ye),(0,Qe.Y)(Ye),(0,Qe.Tx)(Ye),(0,Qe.Tb)(Ye),(0,Qe.CA)(Ye),(0,c.on)("click",".js-toggler-container .js-toggler-target",function(e){if(e.button!==0)return;const t=e.currentTarget.closest(".js-toggler-container");t&&t.classList.toggle("on")}),(0,C.AC)(".js-toggler-container",async(e,t)=>{e.classList.remove("success","error"),e.classList.add("loading");try{await t.text(),e.classList.add("success")}catch{e.classList.add("error")}finally{e.classList.remove("loading")}}),async function(){var e;if("serviceWorker"in navigator){await me.x;const t=(e=document.querySelector('link[rel="service-worker-src"]'))==null?void 0:e.href;t?navigator.serviceWorker.register(t,{scope:"/"}):await ll()}}();async function ll(){let e=[];try{e=await navigator.serviceWorker.getRegistrations()}catch(t){if(t.name==="SecurityError")return}for(const t of e)t.unregister()}if(s(ll,"unregisterAllServiceWorkers"),(0,U.c)("TURBO")){const e={},t=s(S=>{var R;const I=S.querySelector("[data-turbo-head]")||S.head;return{title:(R=I.querySelector("title"))==null?void 0:R.textContent,scripts:[...S.querySelectorAll("script")],stylesheets:[...S.querySelectorAll("link[rel=stylesheet]")],transients:[...I.querySelectorAll("[data-pjax-transient]")]}},"getTurboCacheNode");(async()=>(await me.x,e[document.location.href]=t(document)))();let n,o=!1;document.addEventListener("turbo:visit",S=>{S instanceof CustomEvent&&(n=S.detail.url)}),document.addEventListener("turbo:before-fetch-response",async S=>{if(!(0,Wo.H)(S.target))return;const R=await S.detail.fetchResponse.responseHTML,I=new DOMParser().parseFromString(R,"text/html");r(I)}),document.addEventListener("turbo:frame-render",async S=>{o=!0;const R=await S.detail.fetchResponse.responseHTML,I=new DOMParser().parseFromString(R,"text/html");i(I),e[n]=t(I)}),document.addEventListener(Se.QE.SUCCESS,()=>{!o||(o=!1,a(),l(),y(),w(),document.dispatchEvent(new CustomEvent(Se.QE.FRAME_UPDATE)))});const r=s(S=>{var R;const I=(R=S.querySelector("meta[name=turbo-body-classes]"))==null?void 0:R.content;!I||document.body.setAttribute("class",I)},"replaceBodyClasses"),i=s(S=>{const R=S.querySelectorAll("[data-turbo-replace]"),I=[...document.querySelectorAll("[data-turbo-replace]")];for(const F of R){const X=I.find(oe=>oe.id===F.id);X&&X.replaceWith(F)}},"replaceElements"),a=s(()=>{var S;const R=(S=e[document.location.href])==null?void 0:S.title;R&&(document.title=R)},"replaceTitle"),l=s(()=>{var S;const R=(S=e[document.location.href])==null?void 0:S.transients;if(!!R){for(const I of document.querySelectorAll("head [data-pjax-transient]"))I.remove();for(const I of R)I.matches("title, script, link[rel=stylesheet]")||(I.setAttribute("data-pjax-transient",""),document.head.append(I))}},"replaceTransientTags"),y=s(()=>{var S;const R=(S=e[document.location.href])==null?void 0:S.stylesheets;if(!!R)for(const I of R)document.head.querySelector(`link[href="${I.getAttribute("href")}"],
+ link[data-href="${I.getAttribute("data-href")}"]`)||document.head.append(I)},"addNewStylesheets"),w=s(()=>{var S;const R=(S=e[document.location.href])==null?void 0:S.scripts;if(!!R)for(const I of R)document.head.querySelector(`script[src="${I.getAttribute("src")}"]`)||document.head.append(I)},"addNewScripts")}function ul(){if("Intl"in window)try{return new window.Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}s(ul,"timezone"),window.requestIdleCallback(()=>{const e=ul();e&&(0,Ve.d8)("tz",encodeURIComponent(e))});var J=f(90420),Rr=f(70112),dl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,re=s((e,t,n,o)=>{for(var r=o>1?void 0:o?fl(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(r=(o?a(t,n,r):a(r))||r);return o&&r&&dl(t,n,r),r},"__decorateClass"),ml=(e=>(e.Initializing="initializing",e.Unsupported="unsupported",e.Ready="ready",e.Waiting="waiting",e.Error="error",e.Submitting="submitting",e))(ml||{});let be=s(class extends HTMLElement{constructor(){super(...arguments);this.state="initializing",this.json="",this.autofocusWhenReady=!1,this.autoPrompt=!1,this.hasErrored=!1}connectedCallback(){this.originalButtonText=this.button.textContent,this.setState((0,Rr.Zh)()?"ready":"unsupported"),this.autoPrompt&&this.prompt(void 0,!0)}setState(e){this.button.textContent=this.hasErrored?this.button.getAttribute("data-retry-message"):this.originalButtonText,this.button.disabled=!1,this.button.hidden=!1;for(const t of this.messages)t.hidden=!0;switch(e){case"initializing":this.button.disabled=!0;break;case"unsupported":this.button.disabled=!0,this.unsupportedMessage.hidden=!1;break;case"ready":this.autofocusWhenReady&&this.button.focus();break;case"waiting":this.waitingMessage.hidden=!1,this.button.hidden=!0;break;case"error":this.errorMessage.hidden=!1;break;case"submitting":this.button.textContent="Verifying\u2026",this.button.disabled=!0;break;default:throw new Error("invalid state")}this.state=e}async prompt(e,t){e==null||e.preventDefault(),this.dispatchEvent(new CustomEvent("webauthn-get-prompt"));try{t||this.setState("waiting");const n=JSON.parse(this.json),o=await(0,Rr.U2)(n);this.setState("submitting");const r=this.closest(".js-webauthn-form"),i=r.querySelector(".js-webauthn-response");i.value=JSON.stringify(o),(0,L.Bt)(r)}catch(n){if(!t)throw this.hasErrored=!0,this.setState("error"),n}}},"WebauthnGetElement");re([J.fA],be.prototype,"button",2),re([J.GO],be.prototype,"messages",2),re([J.fA],be.prototype,"unsupportedMessage",2),re([J.fA],be.prototype,"waitingMessage",2),re([J.fA],be.prototype,"errorMessage",2),re([J.Lj],be.prototype,"json",2),re([J.Lj],be.prototype,"autofocusWhenReady",2),re([J.Lj],be.prototype,"autoPrompt",2),be=re([J.Ih],be);var hl=(e=>(e.Initializing="initializing",e.ShowingForm="showing-form",e.ShowingRevealer="showing-revealer",e))(hl||{});let We=s(class extends HTMLElement{constructor(){super(...arguments);this.state="showing-form"}connectedCallback(){this.setState(this.state)}setState(e){switch(this.revealer.hidden=!0,this.form.hidden=!1,e){case"initializing":break;case"showing-form":this.dispatchEvent(new CustomEvent("sudo-password-showing-form"));break;case"showing-revealer":this.revealer.hidden=!1,this.form.hidden=!0;break;default:throw new Error("invalid state")}this.state=e}reveal(){this.setState("showing-form")}},"SudoPasswordElement");re([J.Lj],We.prototype,"state",2),re([J.fA],We.prototype,"revealer",2),re([J.fA],We.prototype,"form",2),re([J.fA],We.prototype,"passwordField",2),We=re([J.Ih],We);let At=s(class extends HTMLElement{connectedCallback(){var e;(e=this.webauthnGet)==null||e.addEventListener("webauthn-get-prompt",()=>{this.sudoPassword.setState("showing-revealer")}),this.sudoPassword.addEventListener("sudo-password-showing-form",()=>{var t;(t=this.webauthnGet)==null||t.setState("ready"),this.sudoPassword.passwordField.focus()})}},"SudoAuthElement");re([J.fA],At.prototype,"webauthnGet",2),re([J.fA],At.prototype,"sudoPassword",2),At=re([J.Ih],At);let kn=0;function pl(){if(!document.hasFocus())return;const e=document.querySelector(".js-timeline-marker-form");e&&e instanceof HTMLFormElement&&(0,L.Bt)(e)}s(pl,"markThreadAsRead");const Ct="IntersectionObserver"in window?new IntersectionObserver(function(e){for(const t of e)t.isIntersecting&&_r(t.target)},{root:null,rootMargin:"0px",threshold:1}):null;(0,u.N7)(".js-unread-item",{constructor:HTMLElement,add(e){kn++,Ct&&Ct.observe(e)},remove(e){kn--,Ct&&Ct.unobserve(e),kn===0&&pl()}});function _r(e){e.classList.remove("js-unread-item","unread-item")}s(_r,"clearUnread"),(0,u.N7)(".js-discussion[data-channel-target]",{subscribe:e=>(0,M.RB)(e,"socket:message",function(t){const n=t.target,o=t.detail.data;if(n.getAttribute("data-channel-target")===o.gid)for(const r of document.querySelectorAll(".js-unread-item"))_r(r)})});let kt=0;const Pr=/^\(\d+\)\s+/;function Ir(){const e=kt?`(${kt}) `:"";document.title.match(Pr)?document.title=document.title.replace(Pr,e):document.title=`${e}${document.title}`}s(Ir,"updateTitle"),(0,u.N7)(".js-unread-item",{add(){kt++,Ir()},remove(){kt--,Ir()}}),(0,u.N7)(".js-socket-channel.js-updatable-content",{subscribe:e=>(0,M.RB)(e,"socket:message",function(t){const{gid:n,wait:o}=t.detail.data,r=t.target,i=n?gl(r,n):r;i&&setTimeout(Me.x0,o||0,i)})});function gl(e,t){if(e.getAttribute("data-gid")===t)return e;for(const n of e.querySelectorAll("[data-url][data-gid]"))if(n.getAttribute("data-gid")===t)return n;return null}s(gl,"findByGid");async function bl(){if(!(!history.state||!history.state.staleRecords)){await me.x;for(const e in history.state.staleRecords)for(const t of document.querySelectorAll(`.js-updatable-content [data-url='${e}'], .js-updatable-content[data-url='${e}']`)){const n=history.state.staleRecords[e];t instanceof HTMLElement&&(0,Me.Of)(t,n,!0)}(0,E.lO)(null,"",location.href)}}s(bl,"reapplyPreviouslyUpdatedContent"),window.addEventListener("pagehide",Me.z8);try{bl()}catch{}(0,c.on)("upload:setup",".js-upload-avatar-image",function(e){const{form:t}=e.detail,n=e.currentTarget.getAttribute("data-alambic-organization"),o=e.currentTarget.getAttribute("data-alambic-owner-type"),r=e.currentTarget.getAttribute("data-alambic-owner-id");n&&t.append("organization_id",n),o&&t.append("owner_type",o),r&&t.append("owner_id",r)}),(0,c.on)("upload:complete",".js-upload-avatar-image",function(e){const{attachment:t}=e.detail,n=`/settings/avatars/${t.id}`;(0,Te.W)({content:(0,pe.a)(document,n),detailsClass:"upload-avatar-details"})}),(0,c.on)("dialog:remove",".upload-avatar-details",async function(e){const o=`/settings/avatars/${e.currentTarget.querySelector("#avatar-crop-form").getAttribute("data-alambic-avatar-id")}?op=destroy`,r=e.currentTarget.querySelector(".js-avatar-post-csrf").getAttribute("value"),i=new Request(o,{method:"POST",headers:{"Scoped-CSRF-Token":r,"X-Requested-With":"XMLHttpRequest"}});await self.fetch(i)});function xt(){if(document.querySelector(":target"))return;const e=(0,Tn.$z)(location.hash).toLowerCase(),t=(0,Tn.Q)(document,`user-content-${e}`);t&&(0,nn.zT)(t)}s(xt,"hashchange"),window.addEventListener("hashchange",xt),document.addEventListener("pjax:success",xt),async function(){await me.x,xt()}(),(0,c.on)("click","a[href]",function(e){const{currentTarget:t}=e;t instanceof HTMLAnchorElement&&t.href===location.href&&location.hash.length>1&&setTimeout(function(){e.defaultPrevented||xt()})});var hu=f(95128);async function yl(e){const t=e.currentTarget,{init:n}=await f.e("app_assets_modules_github_user-status-submit_ts").then(f.bind(f,35145));n(t)}s(yl,"user_status_loader_load"),(0,u.N7)(".js-user-status-container",{subscribe:e=>(0,M.RB)(e,"click",yl,{once:!0})});var Mt=f(55741);function vl(e,t){const n=e.querySelector(".js-user-list-base");n&&(n.textContent=t||n.getAttribute("data-generic-message"),n.hidden=!1)}s(vl,"setFlashError");function Dr(e,t){const o=(t||e).querySelectorAll(".js-user-list-error");for(const a of o)a.hidden=!0;const r=t?[t]:e.querySelectorAll(".errored.js-user-list-input-container");for(const a of r)a.classList.remove("errored");const i=e.querySelector(".js-user-list-base");i&&(i.hidden=!0)}s(Dr,"resetValidation"),(0,C.AC)(".js-user-list-form",async function(e,t){var n;Dr(e);const o=e.querySelector("[data-submitting-message]"),r=o==null?void 0:o.textContent;o&&(o.textContent=o.getAttribute("data-submitting-message"),o.disabled=!0);for(const i of e.querySelectorAll(".js-user-list-input"))i.disabled=!0;try{const i=await t.html();(0,c.f)(e,"user-list-form:success",i.html)}catch(i){if(((n=i.response)==null?void 0:n.status)===422)e.replaceWith(i.response.html);else{vl(e),o&&(r&&(o.textContent=r),o.disabled=!1);for(const a of e.querySelectorAll(".js-user-list-input"))a.disabled=!1}}}),(0,c.on)("user-list-form:success",".js-follow-list",e=>{const t=e.detail,n=t instanceof DocumentFragment?t.querySelector(".js-target-url"):null;(n==null?void 0:n.textContent)?location.href=n.textContent:location.reload()});function Hr(e){if(!(e.currentTarget instanceof HTMLElement))return;const t=e.currentTarget.closest(".js-user-list-form"),n=e.currentTarget.closest(".js-user-list-input-container");t&&n&&Dr(t,n)}s(Hr,"clearErrorsFromInput"),(0,j.q6)(".js-user-list-form input",Hr),(0,j.q6)(".js-user-list-form textarea",Hr),(0,c.on)("auto-check-error",".js-user-list-form input",function(e){const t=e.currentTarget.closest(".js-user-list-input-container"),n=t==null?void 0:t.querySelector(".js-user-list-error");n&&(n.hidden=!1)});function wl(e){var t;const n=new Map;for(const o of e){const r=(t=o.querySelector(".js-user-lists-create-trigger"))==null?void 0:t.getAttribute("data-repository-id");if(r){const i=n.get(r);i?i.push(o):n.set(r,[o])}}return n}s(wl,"groupRootsByRepositoryId");async function El(e,t,n){const o=new FormData;o.set("authenticity_token",t);for(const a of n)o.append("repository_ids[]",a);const r=await fetch(e,{method:"POST",body:o,headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}}),i=new Map;if(r.ok){const a=await r.json();for(const l in a)i.set(l,(0,q.r)(document,a[l]))}return i}s(El,"requestMenuBatchRender");function Ll(e,t){for(const[n,o]of e.entries()){const r=t.get(n)||[];for(const i of r)i.replaceWith(r.length===1?o:o.cloneNode(!0))}}s(Ll,"replaceUserListMenuRoots");async function Or(){var e;const t=document.querySelectorAll(".js-user-list-menu-content-root");if(t.length===0)return;const n=t[0].getAttribute("data-batch-update-url");if(!n)return;const o=(e=t[0].querySelector(".js-user-list-batch-update-csrf"))==null?void 0:e.value;if(!o)return;const r=wl(t),i=r.keys(),a=await El(n,o,i);a.size>0&&Ll(a,r)}s(Or,"updateAllUserListMenus");function jl(e){const t=new Promise((n,o)=>{e.addEventListener("user-list-menu-form:success",()=>n()),e.addEventListener("user-list-menu-form:error",r=>o(r))});return(0,L.Bt)(e),t}s(jl,"requestUserListMenuFormSubmit");function Sl(e){const t=e.target;if(!(t instanceof HTMLDetailsElement)||t.hasAttribute("open"))return;const n=t.querySelector(".js-user-list-menu-form");n&&(0,Mt.T)(n)&&(0,L.Bt)(n);const o=t.querySelector(".js-user-list-create-trigger-text");o&&(o.textContent="")}s(Sl,"submitUserListFormOnToggle"),(0,c.on)("toggle",".js-user-list-menu",Sl,{capture:!0}),(0,j.q6)(".js-user-lists-menu-filter",e=>{const t=e.currentTarget,n=t.value.trim(),o=t.closest(".js-user-list-menu-content-root"),r=o==null?void 0:o.querySelector(".js-user-list-create-trigger-text");!r||(r.textContent=n?`"${n}"`:"")}),(0,C.AC)(".js-user-list-menu-form",async function(e,t){let n;try{n=await t.json()}catch(r){(0,T.v)(),(0,c.f)(e,"user-list-menu-form:error",r);return}if(n.json.didStar){const r=e.closest(".js-toggler-container");r&&r.classList.add("on");const i=n.json.starCount;if(i){const a=e.closest(".js-social-container");a&&mr(a,i)}}const o=e.closest(".js-user-list-menu-content-root[data-update-after-submit]");if(o)for(const r of e.querySelectorAll(".js-user-list-menu-item"))r.checked=r.defaultChecked;n.json.didCreate?await Or():o&&await(0,Me.x0)(o),(0,c.f)(e,"user-list-menu-form:success")}),(0,c.on)("click",".js-user-list-delete-confirmation-trigger",e=>{const{currentTarget:t}=e,n=t.getAttribute("data-template-id");if(!n)return;const o=document.getElementById(n);if(!o||!(o instanceof HTMLTemplateElement))return;const r=t.closest(".js-edit-user-list-dialog");r&&(r.open=!1);const i=o.content.cloneNode(!0),a=o.getAttribute("data-labelledby");(0,Te.W)({content:i,labelledBy:a})}),(0,c.on)("click",".js-user-lists-create-trigger",async function(e){const{currentTarget:t}=e,n=document.querySelector(".js-user-list-create-dialog-template"),o=e.currentTarget.getAttribute("data-repository-id"),r=t.closest(".js-user-list-menu-content-root"),i=r==null?void 0:r.querySelector(".js-user-lists-menu-filter"),a=i==null?void 0:i.value.trim();if(!n||!(n instanceof HTMLTemplateElement)||!o){t instanceof HTMLButtonElement&&(t.disabled=!0);return}const l=n.getAttribute("data-label");if(r&&(0,Mt.T)(r)){const S=r.querySelector(".js-user-list-menu-form");S&&await jl(S)}const y=new lt.R(n,{repositoryId:o,placeholderName:a}),w=await(0,Te.W)({content:y,label:l});w.addEventListener("user-list-form:success",async()=>{await Or();const S=w.closest("details");S&&(S.open=!1)})}),(0,u.N7)("[data-warn-unsaved-changes]",{add(e){e.addEventListener("input",qt),e.addEventListener("change",qt),e.addEventListener("submit",et);const t=e.closest("details-dialog");t&&(t.closest("details").addEventListener("toggle",Nr),t.addEventListener("details-dialog-close",Br))},remove(e){e.removeEventListener("input",qt),e.removeEventListener("change",qt),e.removeEventListener("submit",et);const t=e.closest("details-dialog");t&&(t.closest("details").removeEventListener("toggle",Nr),t.removeEventListener("details-dialog-close",Br),et())}});function qt(e){const t=e.currentTarget;(0,Mt.T)(t)?Tl(t):et()}s(qt,"prepareUnsavedChangesWarning");function Tl(e){const t=e.getAttribute("data-warn-unsaved-changes")||"Changes you made may not be saved.";window.onbeforeunload=function(n){return n.returnValue=t,t}}s(Tl,"enableSaveChangesReminder");function et(){window.onbeforeunload=null}s(et,"disableSaveChangesReminder");function Nr({currentTarget:e}){e.hasAttribute("open")||et()}s(Nr,"disableSaveChangesReminderOnClosedDialogs");function Br(e){const t=e.currentTarget;if(!t.closest("details[open]"))return;let o=!0;const r=t.querySelectorAll("form[data-warn-unsaved-changes]");for(const i of r)if((0,Mt.T)(i)){const a=i.getAttribute("data-warn-unsaved-changes");o=confirm(a);break}o||e.preventDefault()}s(Br,"promptOnDialogClosing"),(0,u.N7)(".will-transition-once",{constructor:HTMLElement,subscribe:e=>(0,M.RB)(e,"transitionend",Al)});function Al(e){e.target.classList.remove("will-transition-once")}s(Al,"onTransitionEnd");async function Cl(e){const t=e.currentTarget,n=t.getAttribute("data-url");if(!n||kl(t))return;const o=t.getAttribute("data-id")||"",r=t.textContent,i=document.querySelectorAll(`.js-issue-link[data-id='${o}']`);for(const a of i)a.removeAttribute("data-url");try{const a=`${n}/title`,l=await fetch(a,{headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}});if(!l.ok){const w=new Error,S=l.statusText?` ${l.statusText}`:"";throw w.message=`HTTP ${l.status}${S}`,w}const y=await l.json();$r(i,`${r}, ${y.title}`)}catch(a){const l=(a.response!=null?a.response.status:void 0)||500,y=(()=>{switch(l){case 404:return t.getAttribute("data-permission-text");default:return t.getAttribute("data-error-text")}})();$r(i,y||"")}}s(Cl,"issueLabel");function $r(e,t){for(const n of e)n instanceof HTMLElement&&(n.classList.add("tooltipped","tooltipped-ne"),n.setAttribute("aria-label",t))}s($r,"setLabel");function kl(e){switch(e.getAttribute("data-hovercard-type")){case"issue":case"pull_request":return!!e.closest("[data-issue-and-pr-hovercards-enabled]");case"discussion":return!!e.closest("[data-discussion-hovercards-enabled]");default:return!1}}s(kl,"isHovercardEnabled"),(0,u.N7)(".js-issue-link",{subscribe:e=>(0,M.RB)(e,"mouseenter",Cl)});var xl=f(12085),Ie=f.n(xl);function xn(){return[Math.floor(Math.random()*(255-0)+0),Math.floor(Math.random()*(255-0)+0),Math.floor(Math.random()*(255-0)+0)]}s(xn,"randomRGBColor");function tt(e,t){const n=Ie().rgb.hsl(t);e.style.setProperty("--label-r",t[0].toString()),e.style.setProperty("--label-g",t[1].toString()),e.style.setProperty("--label-b",t[2].toString()),e.style.setProperty("--label-h",n[0].toString()),e.style.setProperty("--label-s",n[1].toString()),e.style.setProperty("--label-l",n[2].toString())}s(tt,"setColorSwatch");function Mn(e,t){e.blur();const n=e.closest("form"),o=n.querySelector(".js-new-label-color-input");(0,L.Se)(o,`#${Ie().rgb.hex(t)}`);const r=n.querySelector(".js-new-label-color");tt(r,t)}s(Mn,"setInputColorFromButton");function Ml(e,t){e.closest(".js-label-error-container").classList.add("errored"),e.textContent=t,e.hidden=!1}s(Ml,"addErrorToField");function ql(e){e.closest(".js-label-error-container").classList.remove("errored"),e.hidden=!0}s(ql,"removeErrorFromField");function ze(e,t,n){const o=t.querySelector(e);!o||(n?Ml(o,n[0]):ql(o))}s(ze,"showOrHideLabelError");function qn(e,t){ze(".js-label-name-error",e,t.name),ze(".js-label-description-error",e,t.description),ze(".js-label-color-error",e,t.color)}s(qn,"showLabelErrors");function De(e){ze(".js-label-name-error",e,null),ze(".js-label-description-error",e,null),ze(".js-label-color-error",e,null)}s(De,"hideLabelErrors");function Rl(e,t,n,o,r){const i=new URL(`${e}${encodeURIComponent(t)}`,window.location.origin),a=new URLSearchParams(i.search.slice(1));return a.append("color",n),o&&a.append("description",o),r&&a.append("id",r),i.search=a.toString(),i.toString()}s(Rl,"labelPreviewUrl");function _l(e){let t=null;const n=e.querySelector(".js-new-label-description-input");return n instanceof HTMLInputElement&&n.value.trim().length>0&&(t=n.value.trim()),t}s(_l,"labelDescriptionFrom");function Pl(e){const t=e.querySelector(".js-new-label-color-input");return t.checkValidity()?t.value.trim().replace(/^#/,""):"ededed"}s(Pl,"labelColorFrom");function Il(e,t){let o=e.querySelector(".js-new-label-name-input").value.trim();return o.length<1&&(o=t.getAttribute("data-default-name")),o}s(Il,"labelNameFrom");async function Ke(e){const t=e.closest(".js-label-preview-container");if(!t)return;const n=e.closest(".js-label-form"),o=n.querySelector(".js-new-label-error"),r=n.getAttribute("data-label-id"),i=t.querySelector(".js-label-preview"),a=Il(n,i);if(!n.checkValidity()&&a!=="Label preview")return;const l=Pl(n),y=_l(n),w=i.getAttribute("data-url-template"),S=Rl(w,a,l,y,r);if(t.hasAttribute("data-last-preview-url")){const I=t.getAttribute("data-last-preview-url");if(S===I)return}let R;try{R=await(0,pe.a)(document,S)}catch(I){const F=await I.response.json();qn(n,F),o&&(o.textContent=F.message,o.hidden=!1);return}o&&(o.textContent="",o.hidden=!0),De(n),i.innerHTML="",i.appendChild(R),t.setAttribute("data-last-preview-url",S)}s(Ke,"updateLabelPreview");function Dl(e){Ke(e.target)}s(Dl,"onLabelFormInputChange");function Fr(e,t){e.closest(".js-details-container").classList.toggle("is-empty",t)}s(Fr,"toggleBlankSlate");function Ur(e){const t=document.querySelector(".js-labels-count"),o=Number(t.textContent)+e;t.textContent=o.toString();const r=document.querySelector(".js-labels-label");return r.textContent=r.getAttribute(o===1?"data-singular-string":"data-plural-string"),o}s(Ur,"updateCount"),(0,j.q6)(".js-label-filter-field",function(e){const t=e.target,o=t.closest("details-menu").querySelector(".js-new-label-name");if(!o)return;const r=t.value.trim();o.textContent=r}),(0,c.on)("filterable:change",".js-filterable-issue-labels",function(e){const t=e.currentTarget.closest("details-menu"),n=t.querySelector(".js-add-label-button");if(!n)return;const r=e.detail.inputField.value.trim().toLowerCase();let i=!1;for(const a of t.querySelectorAll("input[data-label-name]"))if((a.getAttribute("data-label-name")||"").toLowerCase()===r){i=!0;break}n.hidden=r.length===0||i}),(0,j.ZG)(".js-new-label-color-input",function(e){const n=e.closest("form").querySelector(".js-new-label-swatches");n.hidden=!1,e.addEventListener("blur",function(){n.hidden=!0},{once:!0})}),(0,j.q6)(".js-new-label-color-input",function(e){const t=e.target;let n=t.value.trim();if(!(n.length<1))if(n.indexOf("#")!==0&&(n=`#${n}`,t.value=n),t.checkValidity()){t.classList.remove("color-fg-danger");const r=t.closest("form").querySelector(".js-new-label-color");tt(r,Ie().hex.rgb(n))}else t.classList.add("color-fg-danger")}),(0,j.w4)("keyup",".js-new-label-color-input",function(e){const t=e.target;let n=t.value.trim();if(n.indexOf("#")!==0&&(n=`#${n}`,t.value=n),t.checkValidity()){const i=t.closest("form").querySelector(".js-new-label-color");tt(i,Ie().hex.rgb(n))}(0,c.f)(t,"change",!1);const o=t.closest("form");De(o)}),(0,j.w4)("keyup",".js-new-label-description-input",function(e){const n=e.target.form;De(n)}),(0,j.w4)("keyup",".js-new-label-color-input",function(e){const n=e.target.form;De(n)}),(0,c.on)("click",".js-new-label-color",async function(e){const t=e.currentTarget,n=xn();Mn(t,n),Ke(t)}),(0,c.on)("mousedown",".js-new-label-color-swatch",function(e){const t=e.currentTarget,n=t.getAttribute("data-color");Mn(t,Ie().hex.rgb(n)),Ke(t);const o=t.closest(".js-new-label-swatches");o.hidden=!0}),(0,c.on)("toggle",".js-new-label-modal",function(e){e.target.hasAttribute("open")&&Wr(e.target)},{capture:!0});async function Wr(e){const t=e.querySelector(".js-new-label-name-input");if(!t)return;const n=e.querySelector(".js-new-label-color-input"),o=xn(),r=`#${Ie().rgb.hex(o)}`;n.value=r;const i=e.querySelector(".js-new-label-color");tt(i,o);const l=document.querySelector(".js-new-label-name").textContent;(0,L.Se)(t,l),(0,Ht.OD)(t),Ke(i)}s(Wr,"initLabelModal"),(0,C.AC)(".js-new-label-modal-form",async function(e,t){const n=e.querySelector(".js-new-label-error");let o;try{o=await t.html()}catch(y){const w=y.response.json;n.textContent=w.message,n.hidden=!1}if(!o)return;n.hidden=!0,document.querySelector(".js-new-label-modal").removeAttribute("open");const r=document.querySelector(".js-issue-labels-menu-content"),i=r.querySelector(".js-filterable-issue-labels"),a=o.html.querySelector("input");i.prepend(o.html),a&&a.dispatchEvent(new Event("change",{bubbles:!0}));const l=r.querySelector(".js-label-filter-field");l.value=l.defaultValue,l.focus()}),(0,c.on)("click",".js-edit-label-cancel",function(e){const t=e.target.closest("form");De(t),t.reset();const n=t.querySelector(".js-new-label-color-input"),o=n.value,r=t.querySelector(".js-new-label-color");tt(r,Ie().hex.rgb(o)),(0,Ht.Qc)(t),Ke(n);const i=e.currentTarget.closest(".js-labels-list-item");if(i){i.querySelector(".js-update-label").classList.add("d-none");const l=i.querySelector(".js-label-preview");l&&(l.classList.add("d-none"),i.querySelector(".js-label-link").classList.remove("d-none"));const y=i.querySelectorAll(".js-hide-on-label-edit");for(const w of y)w.hidden=!w.hidden}}),(0,C.AC)(".js-update-label",async function(e,t){let n;try{n=await t.html()}catch(r){const i=r.response.json;qn(e,i);return}De(e),e.closest(".js-labels-list-item").replaceWith(n.html)}),(0,C.AC)(".js-create-label",async function(e,t){let n;try{n=await t.html()}catch(a){const l=a.response.json;qn(e,l);return}e.reset(),De(e),document.querySelector(".js-label-list").prepend(n.html),Ur(1),Fr(e,!1);const o=e.querySelector(".js-new-label-color"),r=xn();Mn(o,r),Ke(e.querySelector(".js-new-label-name-input")),(0,Ht.Qc)(e);const i=e.closest(".js-details-container");i instanceof HTMLElement&&(0,Vt.Qp)(i)}),(0,c.on)("click",".js-details-target-new-label",function(){document.querySelector(".js-create-label").querySelector(".js-new-label-name-input").focus()}),(0,c.on)("click",".js-edit-label",function(e){const t=e.currentTarget.closest(".js-labels-list-item"),n=t.querySelector(".js-update-label");n.classList.remove("d-none"),n.querySelector(".js-new-label-name-input").focus();const r=t.querySelector(".js-label-preview");r&&(r.classList.remove("d-none"),t.querySelector(".js-label-link").classList.add("d-none"));const i=t.querySelectorAll(".js-hide-on-label-edit");for(const a of i)a.hidden=!a.hidden}),(0,C.AC)(".js-delete-label",async function(e,t){const n=e.closest(".js-labels-list-item");n.querySelector(".js-label-delete-spinner").hidden=!1,await t.text();const o=Ur(-1);Fr(e,o===0),n.remove()});const Rt=(0,P.D)(Dl,500);(0,c.on)("suggester:complete",".js-new-label-name-input",Rt),(0,j.q6)(".js-new-label-name-input",Rt),(0,j.q6)(".js-new-label-description-input",Rt),(0,j.q6)(".js-new-label-color-input",Rt),(0,j.w4)("keypress",".js-new-label-name-input",function(e){const t=e.target,n=parseInt(t.getAttribute("data-maxlength"));(0,Ee.rq)(t.value)>=n&&e.preventDefault()}),(0,c.on)("click",".js-issues-label-select-menu-item",function(e){!e.altKey&&!e.shiftKey||(e.preventDefault(),e.stopPropagation(),e.altKey&&(window.location.href=e.currentTarget.getAttribute("data-excluded-url")),e.shiftKey&&(window.location.href=e.currentTarget.getAttribute("data-included-url")))}),(0,j.w4)("keydown",".js-issues-label-select-menu-item",function(e){if(e.key!=="Enter"||!e.altKey&&!e.shiftKey)return;const t=e.currentTarget;e.preventDefault(),e.stopPropagation(),t instanceof HTMLAnchorElement&&(e.altKey&&(window.location.href=t.getAttribute("data-excluded-url")),e.shiftKey&&(window.location.href=t.getAttribute("data-included-url")))}),(0,c.on)("click",".js-open-label-creation-modal",async function(e){e.stopImmediatePropagation();const t=await(0,Te.W)({content:document.querySelector(".js-label-creation-template").content.cloneNode(!0),detailsClass:"js-new-label-modal"});Wr(t)},{capture:!0}),(0,c.on)("change",".js-thread-notification-setting",Rn),(0,c.on)("change",".js-custom-thread-notification-option",Rn),(0,c.on)("reset",".js-custom-thread-settings-form",Rn);function Rn(){const e=document.querySelector(".js-reveal-custom-thread-settings").checked,t=!document.querySelector(".js-custom-thread-notification-option:checked"),n=document.querySelector(".js-custom-thread-settings"),o=document.querySelector("[data-custom-option-required-text]"),r=e&&t?o.getAttribute("data-custom-option-required-text"):"";o.setCustomValidity(r),n.hidden=!e}s(Rn,"toggleEventSettings");var Hl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,zr=s((e,t,n,o)=>{for(var r=o>1?void 0:o?Ol(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(r=(o?a(t,n,r):a(r))||r);return o&&r&&Hl(t,n,r),r},"sidebar_widget_decorateClass");let _n=s(class extends HTMLElement{get activeClass(){return this.getAttribute("active-class")||"collapsible-sidebar-widget-active"}get loadingClass(){return this.getAttribute("loading-class")||"collapsible-sidebar-widget-loading"}get url(){return this.getAttribute("url")||""}get isOpen(){return this.hasAttribute("open")}set isOpen(e){e?this.setAttribute("open",""):this.removeAttribute("open")}onKeyDown(e){if(e.code==="Enter"||e.code==="Space")return e.preventDefault(),this.load()}onMouseDown(e){return e.preventDefault(),this.load()}load(){return this.pendingRequest?this.pendingRequest.abort():this.collapsible.hasAttribute("loaded")?this.isOpen?this.setClose():this.setOpen():(this.setLoading(),this.updateCollapsible())}setLoading(){this.classList.add(this.loadingClass),this.classList.remove(this.activeClass)}setOpen(){this.classList.add(this.activeClass),this.classList.remove(this.loadingClass),this.isOpen=!0}setClose(){this.classList.remove(this.activeClass),this.classList.remove(this.loadingClass),this.isOpen=!1}handleAbort(){this.pendingRequest=null,this.setClose()}async updateCollapsible(){var e;try{this.pendingRequest=new AbortController,this.pendingRequest.signal.addEventListener("abort",()=>this.handleAbort());const t=await fetch(this.url,{signal:(e=this.pendingRequest)==null?void 0:e.signal,headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"}});if(this.pendingRequest=null,!t.ok)return this.setClose();const n=await t.text();this.collapsible.innerHTML=n,this.collapsible.setAttribute("loaded",""),this.setOpen()}catch{return this.pendingRequest=null,this.setClose()}}},"CollapsibleSidebarWidgetElement");zr([J.fA],_n.prototype,"collapsible",2),_n=zr([J.Ih],_n);var Nl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,ve=s((e,t,n,o)=>{for(var r=o>1?void 0:o?Bl(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(r=(o?a(t,n,r):a(r))||r);return o&&r&&Nl(t,n,r),r},"sidebar_memex_input_decorateClass");let ye=s(class extends HTMLElement{constructor(){super(...arguments);this.url="",this.csrf="",this.instrument="",this.column=1}get isDisabled(){var e;return(e=this.read)==null?void 0:e.hasAttribute("disabled")}set hasErrored(e){e?this.setAttribute("errored",""):this.removeAttribute("errored")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get hasExpanded(){return this.read.getAttribute("aria-expanded")==="true"}connectedCallback(){var e,t;this.disabled=(t=(e=this.read)==null?void 0:e.disabled)!=null?t:!0,this.querySelector("details")!==null&&this.classList.toggle("no-pointer")}handleDetailsSelect(e){var t;const n=e,o=e.target,r=(t=n.detail)==null?void 0:t.relatedTarget,i=o.closest("details"),a=i==null?void 0:i.querySelector("[data-menu-button]");if(r.getAttribute("aria-checked")==="true"){r.setAttribute("aria-checked","false"),e.preventDefault();for(const l of this.inputs)if(r.contains(l)){this.updateCell(l.name,""),(a==null?void 0:a.innerHTML)&&(a.innerHTML=l.placeholder);break}i==null||i.removeAttribute("open")}}handleDetailsSelected(e){var t;const o=(t=e.detail)==null?void 0:t.relatedTarget;for(const r of this.inputs)if(o.contains(r)){this.updateCell(r.name,r.value);break}}mouseDownFocus(e){!this.isDisabled||this.onFocus(e)}keyDownFocus(e){(e.code==="Enter"||e.code==="Space")&&this.read!==document.activeElement&&this.onFocus(e)}onChange(e){var t,n;e.target.getAttribute("type")!=="date"&&this.updateCell((t=this.read)==null?void 0:t.name,(n=this.read)==null?void 0:n.value)}onFocus(e){e.preventDefault(),this.disabled=!1,this.read.disabled=!1,this.read.focus()}onBlur(e){var t,n;if(this.hasExpanded){e.preventDefault();return}e.target.getAttribute("type")==="date"&&this.updateCell((t=this.read)==null?void 0:t.name,(n=this.read)==null?void 0:n.value),this.read.disabled=!0,this.disabled=!0}onKeyDown(e){if(e.code==="Enter"||e.code==="Tab"){if(e.preventDefault(),e.stopPropagation(),this.hasExpanded)return;this.read.blur()}}async updateCell(e="",t=""){const n=new FormData;n.set(e,t),n.set("ui",this.instrument);for(const r of this.parameters)n.set(r.name,r.value);const o=Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"});try{if(this.write){const S=this.read.value,R=this.read.type==="date"&&S?o.format(Date.parse(S)):S;this.write.textContent=S?R:this.read.placeholder}const r=await fetch(this.url,{method:"PUT",body:n,headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Scoped-CSRF-Token":`${this.csrf}`}});if(!r.ok)throw new Error("connection error");if(!this.write)return;const l=(await r.json()).memexProjectItem.memexProjectColumnValues.find(S=>S.memexProjectColumnId===Number(this.column)).value,y=this.read.type==="date"?Date.parse(l.value):l.html,w=this.read.type==="date"&&y?o.format(y):y;this.write.innerHTML=t?w:this.read.placeholder}catch{this.hasErrored=!0}}},"SidebarMemexInputElement");ve([J.Lj],ye.prototype,"url",2),ve([J.Lj],ye.prototype,"csrf",2),ve([J.Lj],ye.prototype,"instrument",2),ve([J.Lj],ye.prototype,"column",2),ve([J.GO],ye.prototype,"inputs",2),ve([J.fA],ye.prototype,"read",2),ve([J.fA],ye.prototype,"write",2),ve([J.GO],ye.prototype,"parameters",2),ye=ve([J.Ih],ye);function nt(e,t=!1){(t||!zl(e))&&(e instanceof HTMLFormElement?(0,L.Bt)(e):Pt(e))}s(nt,"submitForm");function Kr(e){const t=e.currentTarget,n=t.closest(".js-issue-sidebar-form")||t.querySelector(".js-issue-sidebar-form");nt(n)}s(Kr,"submitOnMenuClose"),(0,c.on)("details-menu-selected",".js-discussion-sidebar-menu",function(e){const t=e.detail.relatedTarget,n=e.currentTarget,o=t.closest(".js-issue-sidebar-form"),r=n.hasAttribute("data-multiple");if(t.hasAttribute("data-clear-assignees")){const i=n.querySelectorAll('input[name="issue[user_assignee_ids][]"]:checked');for(const a of i)a.disabled=!1,a.checked=!1;nt(o)}else r?n.closest("details").addEventListener("toggle",Kr,{once:!0}):nt(o)},{capture:!0});function $l(e,t){e.replaceWith((0,q.r)(document,t))}s($l,"updateSidebar");function Vr(e){const t=document.querySelector(`[data-menu-trigger="${e}"]`);t==null||t.focus()}s(Vr,"returnFocusToTrigger"),(0,C.AC)(".js-issue-sidebar-form",async function(e,t){var n;const o=await t.html(),r=e.closest(".js-discussion-sidebar-item"),i=(n=r==null?void 0:r.querySelector(".select-menu"))==null?void 0:n.getAttribute("id");r.replaceWith(o.html),i&&Vr(i)}),(0,c.on)("click","div.js-issue-sidebar-form .js-suggested-reviewer",function(e){const t=e.currentTarget,n=t.closest(".js-issue-sidebar-form");Pt(n,"post",{name:t.name,value:t.value}),e.preventDefault()}),(0,c.on)("click","div.js-issue-sidebar-form .js-issue-assign-self",function(e){var t;const n=e.currentTarget,o=n.closest(".js-issue-sidebar-form");Pt(o,"post",{name:n.name,value:n.value}),n.remove(),(t=document.querySelector("form#new_issue .is-submit-button-value"))==null||t.remove(),e.preventDefault()}),(0,c.on)("click",".js-issue-unassign-self",function(e){const t=e.currentTarget.closest(".js-issue-sidebar-form");Pt(t,"delete"),e.preventDefault()}),(0,C.AC)(".js-pages-preview-toggle-form",async function(e,t){const n=await t.json();e.querySelector("button.btn").textContent=n.json.new_button_value});function Fl(e,t){const n=e.getAttribute("data-cache-name");return`${t}:sidebar:${n}`}s(Fl,"getCacheKey");function Ul(e,t,n){const o=e.getAttribute("data-cache-name");if(!o)return;const r=[];for(const[a,l]of t.entries())a.indexOf(o)!==-1&&r.push([a,l]);const i=r.filter(a=>a[1]!=="");i.length>0?sessionStorage.setItem(n,JSON.stringify(i)):sessionStorage.removeItem(n)}s(Ul,"cacheValues");const _t=new Set;function Xr(){_t.clear()}s(Xr,"clearHasFired");async function Wl(e,t){const n=e.getAttribute("data-cache-name"),o=sessionStorage.getItem(t);if(!n||!o||_t.has(n))return;_t.add(n);const r=JSON.parse(o),i=[];for(const[a,l]of r){if(Object.prototype.toString.call(l)!=="[object String]")continue;const y=document.createElement("input");y.type="hidden",y.value=l,y.name=a,e.appendChild(y),i.push(y)}try{await Zr(e);for(const a of i)a.remove()}catch{_t.delete(n)}}s(Wl,"restoreCachedValues");let Gr=!1;function Pn(e,t){if(Gr)return;const n=In(e);Ul(e,n,t),Xr()}s(Pn,"cacheValuesOnHide"),(0,u.N7)("[data-cacher]",{add(e){const t=Fl(e,(0,xe.e)());Wl(e,t),window.addEventListener("pagehide",()=>Pn(e,t)),window.addEventListener("pjax:beforeReplace",()=>Pn(e,t)),window.addEventListener("turbo:before-visit",()=>Pn(e,t)),window.addEventListener("submit",n=>{n.defaultPrevented||(Gr=!0,setTimeout(()=>{for(const o of Object.keys(sessionStorage))o.indexOf(t)!==-1&&(sessionStorage.removeItem(o),Xr())},0))},{capture:!0})}});async function Pt(e,t="post",n){var o;await Zr(e,t,n);const r=e.closest(".js-discussion-sidebar-item"),i=(o=r==null?void 0:r.querySelector(".select-menu"))==null?void 0:o.getAttribute("id");i&&Vr(i)}s(Pt,"previewSubmit");async function Zr(e,t="post",n){const o=In(e);n&&o.append(n.name,n.value);const r=e.getAttribute("data-url");if(!r)return;const i=e.querySelector(".js-data-url-csrf"),a=await fetch(r,{method:t,body:t==="delete"?"":o,mode:"same-origin",headers:{"Scoped-CSRF-Token":i.value,"X-Requested-With":"XMLHttpRequest"}});if(!a.ok)return;const l=await a.text();$l(e.closest(".js-discussion-sidebar-item"),l)}s(Zr,"requestPreview");function zl(e){const t=e.getAttribute("data-reviewers-team-size-check-url");if(!t)return!1;const n=[...document.querySelectorAll(".js-reviewer-team")].map(l=>l.getAttribute("data-id")),o=e instanceof HTMLFormElement?new FormData(e):In(e),i=new URLSearchParams(o).getAll("reviewer_team_ids[]").filter(l=>!n.includes(l));if(i.length===0)return!1;const a=new URLSearchParams(i.map(l=>["reviewer_team_ids[]",l]));return Kl(e,`${t}?${a}`),!0}s(zl,"reviewerTeamsCheckRequired");async function Kl(e,t){const n=await fetch(t);if(!n.ok)return;const o=await n.text();if(o.match(/[^\w-]js-large-team[^\w-]/))Vl(e,o);else{nt(e,!0);return}}s(Kl,"triggerTeamReviewerCheck");function Vl(e,t){const n=e.querySelector(".js-large-teams-check-warning-container");for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild((0,q.r)(document,t));const o=n.querySelector("details");function r(i){if(i.target instanceof Element){if(o.open=!1,!i.target.classList.contains("js-large-teams-confirm-button")){const a=e.querySelectorAll("input[name='reviewer_team_ids[]']");for(const l of a)n.querySelector(`.js-large-team[data-id='${l.value}']`)&&(l.checked=!1)}nt(e,!0),i.preventDefault()}}s(r,"dialogAction"),n.querySelector(".js-large-teams-confirm-button").addEventListener("click",r,{once:!0}),n.querySelector(".js-large-teams-cancel-button").addEventListener("click",r,{once:!0}),o.addEventListener("details-dialog-close",r,{once:!0}),o.open=!0}s(Vl,"showTeamReviewerConfirmationDialog"),(0,c.on)("click","div.js-project-column-menu-container .js-project-column-menu-item button",async function(e){const t=e.currentTarget;Xl(t);const n=t.getAttribute("data-url"),o=t.parentElement.querySelector(".js-data-url-csrf"),r=t.getAttribute("data-card-id"),i=new FormData;if(i.append("card_id",r),i.append("use_automation_prioritization","true"),e.preventDefault(),!(await fetch(n,{method:"PUT",mode:"same-origin",body:i,headers:{"Scoped-CSRF-Token":o.value,"X-Requested-With":"XMLHttpRequest"}})).ok)return;const l=document.activeElement,y=t.closest(".js-project-column-menu-dropdown");if(l&&y.contains(l))try{l.blur()}catch{}});function Xl(e){const n=e.closest(".js-project-column-menu-dropdown").querySelector(".js-project-column-menu-summary"),o=e.getAttribute("data-column-name");n.textContent=o}s(Xl,"updateProjectColumnMenuSummary"),(0,c.on)("click",".js-prompt-dismiss",function(e){e.currentTarget.closest(".js-prompt").remove()});function In(e){const t=e.closest("form");if(!t)return new FormData;const o=new FormData(t).entries(),r=new FormData;for(const[i,a]of o)t.contains(Gl(t,i,a.toString()))&&r.append(i,a);return r}s(In,"scopedFormData");function Gl(e,t,n){for(const o of e.elements)if((o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLButtonElement)&&o.name===t&&o.value===n)return o;return null}s(Gl,"findParam"),(0,c.on)("click",".js-convert-to-draft",function(e){const t=e.currentTarget.getAttribute("data-url"),n=e.currentTarget.parentElement.querySelector(".js-data-url-csrf");fetch(t,{method:"POST",mode:"same-origin",headers:{"Scoped-CSRF-Token":n.value,"X-Requested-With":"XMLHttpRequest"}})}),(0,c.on)("click","div.js-restore-item",async function(e){const t=e.currentTarget.getAttribute("data-url"),n=e.currentTarget.getAttribute("data-column"),o=e.currentTarget.querySelector(".js-data-url-csrf"),r=new FormData;if(r.set("memexProjectItemIds[]",n),!(await fetch(t,{method:"PUT",mode:"same-origin",body:r,headers:{"Scoped-CSRF-Token":o.value,"X-Requested-With":"XMLHttpRequest"}})).ok)throw new Error("connection error");Kr(e)})},22485:($,D,f)=>{"use strict";f.d(D,{N:()=>C,x:()=>_});var T=f(7739);let c=null;(async function(){await T.x,x()})();function C(g){_(u(g))}s(C,"announceFromElement");function _(g){!c||(c.textContent="",c.textContent=g)}s(_,"announce");function x(){c=document.createElement("div"),c.setAttribute("aria-live","polite"),c.classList.add("sr-only"),document.body.append(c)}s(x,"createNoticeContainer");function u(g){return(g.getAttribute("aria-label")||g.innerText||"").trim()}s(u,"getTextContent")},51989:($,D,f)=>{"use strict";f.d(D,{s:()=>h});var T=f(90420),c=f(12981);class C{constructor(b=50,v=30){this.elements=[],this.timer=null,this.callbacks=[],this.timeout=b,this.limit=v,this.index=0}push(b){const v=`item-${this.index++}`;return this.timer&&(window.clearTimeout(this.timer),this.timer=null),this.elements.length>=this.limit&&this.flush(),this.timer=window.setTimeout(()=>{this.timer=null,this.flush()},this.timeout),this.elements.push([b,v]),v}onFlush(b){this.callbacks.push(b)}async flush(){const b=this.elements.splice(0,this.limit);b.length!==0&&await Promise.all(this.callbacks.map(v=>v(b)))}}s(C,"AutoFlushingQueue");class _{constructor(b,v){this.url=b,this.callbacks=new Map,this.autoFlushingQueue=new C,this.autoFlushingQueue.onFlush(async L=>{this.load(L)}),this.validate=v}loadInBatch(b){const v=this.autoFlushingQueue.push(b);return new Promise(L=>this.callbacks.set(v,L))}async load(b){const v=new Map;for(const[E,A]of b)v.set(A,E);const L=new FormData;L.set("_method","GET");for(const[E,A]of v.entries())for(const k of A.inputs)L.append(`items[${E}][${k.name}]`,k.value);const q=await fetch(this.url,{method:"POST",body:L,headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(q.ok){const E=await q.json();if(!E||typeof E!="object"||Array.isArray(E))throw new Error("Malformed batch response");for(const A in E){const k=this.callbacks.get(A);if(k){const j=E[A];this.validate(j),k(j)}}}}}s(_,"BatchLoader");var x=Object.defineProperty,u=Object.getOwnPropertyDescriptor,g=s((p,b,v,L)=>{for(var q=L>1?void 0:L?u(b,v):b,E=p.length-1,A;E>=0;E--)(A=p[E])&&(q=(L?A(b,v,q):A(q))||q);return L&&q&&x(b,v,q),q},"__decorateClass");class h extends HTMLElement{async connectedCallback(){const b=await this.batchLoader.loadInBatch(this);this.update(b)}get batchLoader(){const b=this.getAttribute("data-url");if(!b)throw new Error(`${this.tagName} element requires a data-url attribute`);let v=this.batchLoaders.get(b);return v||(v=new _(b,L=>this.validate(L)),this.batchLoaders.set(b,v)),v}}s(h,"BaseBatchDeferredContentElement");const d=new Map;let m=s(class extends h{constructor(){super(...arguments);this.batchLoaders=d}validate(p){if(typeof p!="string")throw new Error("Batch deferred content was not a string")}update(p){const b=(0,c.r)(document,p);this.replaceWith(b)}},"BatchDeferredContentElement");g([T.GO],m.prototype,"inputs",2),m=g([T.Ih],m)},41415:()=>{let $,D=!1;function f(){$=document.activeElement,document.body&&document.body.classList.toggle("intent-mouse",D)}s(f,"setClass"),document.addEventListener("mousedown",function(){D=!0,$===document.activeElement&&f()},{capture:!0}),document.addEventListener("keydown",function(){D=!1},{capture:!0}),document.addEventListener("focusin",f,{capture:!0})},90458:($,D,f)=>{"use strict";f.d(D,{OD:()=>u,Qc:()=>g,nz:()=>x});var T=f(40764),c=f(45075);function C(h,d,m){const p=m.closest(".js-characters-remaining-container");if(!p)return;const b=p.querySelector(".js-characters-remaining"),v=String(b.getAttribute("data-suffix")),L=(0,T.rq)(h),q=d-L;q<=20?(b.textContent=`${q} ${v}`,b.classList.toggle("color-fg-danger",q<=5),b.hidden=!1):b.hidden=!0}s(C,"showRemainingCharacterCount");function _(h){return h.hasAttribute("data-maxlength")?parseInt(h.getAttribute("data-maxlength")||""):h.maxLength}s(_,"getFieldLimit");function x(h){const d=_(h),m=(0,T.rq)(h.value);return d-m<0}s(x,"hasExceededCharacterLimit");function u(h){const d=_(h);C(h.value,d,h)}s(u,"updateInputRemainingCharacters");function g(h){const d=h.querySelectorAll(".js-characters-remaining-container");for(const m of d){const p=m.querySelector(".js-characters-remaining-field");u(p)}}s(g,"resetCharactersRemainingCounts"),(0,c.ZG)(".js-characters-remaining-field",function(h){function d(){(h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement)&&u(h)}s(d,"onInput"),d(),h.addEventListener("input",d),h.addEventListener("blur",()=>{h.removeEventListener("input",d)},{once:!0})})},2641:($,D,f)=>{"use strict";f.d(D,{z:()=>v});var T=f(59753),c=f(12737),C=f(29719),_=f(6741),x=f(55741),u=f(64463),g=f(65935),h=f(78965);let d=[];(0,u.N7)(".js-comment-header-actions-deferred-include-fragment",{subscribe:E=>(0,_.RB)(E,"loadstart",()=>{const A=E.closest(".js-comment");b(A)},{capture:!1,once:!0})}),(0,u.N7)(".js-comment .contains-task-list",{add:E=>{const A=E.closest(".js-comment");b(A)}}),(0,T.on)("click",".js-comment-edit-button",function(E){const A=E.currentTarget.closest(".js-comment");A.classList.add("is-comment-editing");const k=p(A);k?k.addEventListener("include-fragment-replaced",()=>m(A),{once:!0}):m(A);const j=E.currentTarget.closest(".js-dropdown-details");j&&j.removeAttribute("open")});function m(E){E.querySelector(".js-write-tab").click();const A=E.querySelector(".js-comment-field");A.focus(),(0,T.f)(A,"change")}s(m,"focusEditForm");function p(E){return E.querySelector(".js-comment-edit-form-deferred-include-fragment")}s(p,"findEditFormDeferredIncludeFragment");function b(E){var A;(A=p(E))==null||A.setAttribute("loading","eager")}s(b,"loadEditFormDeferredIncludeFragment"),(0,T.on)("click",".js-comment-hide-button",function(E){const A=E.currentTarget.closest(".js-comment");q(A,!1);const k=A.querySelector(".js-minimize-comment");k&&k.classList.remove("d-none");const j=E.currentTarget.closest(".js-dropdown-details");j&&j.removeAttribute("open")}),(0,T.on)("click",".js-comment-hide-minimize-form",function(E){E.currentTarget.closest(".js-minimize-comment").classList.add("d-none")});function v(E){const A=E.currentTarget.closest("form"),k=E.currentTarget.getAttribute("data-confirm-text");if((0,x.T)(A)&&!confirm(k))return!1;for(const P of A.querySelectorAll("input, textarea")){const M=P;M.value=M.defaultValue,M.classList.contains("session-resumable-canceled")&&(M.classList.add("js-session-resumable"),M.classList.remove("session-resumable-canceled"))}const j=E.currentTarget.closest(".js-comment");return j&&j.classList.remove("is-comment-editing"),!0}s(v,"handleCommentCancelButtonClick"),(0,T.on)("click",".js-comment-cancel-button",v),(0,T.on)("click",".js-cancel-issue-edit",function(E){const A=E.currentTarget.closest(".js-details-container");A.querySelector(".js-comment-form-error").hidden=!0}),(0,g.AC)(".js-comment-delete, .js-comment .js-comment-update, .js-issue-update, .js-comment-minimize, .js-comment-unminimize",function(E,A,k){const j=E.closest(".js-comment");j.classList.add("is-comment-loading");const P=j.getAttribute("data-body-version");P&&k.headers.set("X-Body-Version",P)}),(0,g.AC)(".js-comment .js-comment-update",async function(E,A){let k;const j=E.closest(".js-comment"),P=j.querySelector(".js-comment-update-error"),M=j.querySelector(".js-comment-body-error");P instanceof HTMLElement&&(P.hidden=!0),M instanceof HTMLElement&&(M.hidden=!0),d=[];try{k=await A.json()}catch(W){if(W.response.status===422){const U=JSON.parse(W.response.text);if(U.errors){P instanceof HTMLElement&&(P.textContent=`There was an error posting your comment: ${U.errors.join(", ")}`,P.hidden=!1);return}}else throw W}if(!k)return;const O=k.json;O.errors&&O.errors.length>0&&(d=O.errors,L(M));const V=j.querySelector(".js-comment-body");V&&O.body&&(V.innerHTML=O.body),j.setAttribute("data-body-version",O.newBodyVersion);const H=j.querySelector(".js-body-version");H instanceof HTMLInputElement&&(H.value=O.newBodyVersion);const N=j.querySelector(".js-discussion-poll");N&&O.poll&&(N.innerHTML=O.poll);for(const W of j.querySelectorAll("input, textarea")){const U=W;U.defaultValue=U.value}j.classList.remove("is-comment-stale","is-comment-editing");const K=j.querySelector(".js-comment-edit-history");if(K){const W=await(0,C.a)(document,O.editUrl);K.innerHTML="",K.append(W)}}),(0,u.N7)(".js-comment-body-error",{add:E=>{d&&d.length>0&&L(E)}});function L(E){const A=E.querySelector("ol");if(A){A.innerHTML="";const k=d.map(j=>{const P=document.createElement("li");return P.textContent=j,P});for(const j of k)A.appendChild(j)}E.hidden=!1}s(L,"showBodyErrors"),(0,g.AC)(".js-comment .js-comment-delete, .js-comment .js-comment-update, .js-comment-minimize, .js-comment-unminimize",async function(E,A){const k=E.closest(".js-comment");try{await A.text()}catch(j){if(j.response.status===422){let P;try{P=JSON.parse(j.response.text)}catch{}P&&P.stale&&k.classList.add("is-comment-stale")}else throw j}k.classList.remove("is-comment-loading")});function q(E,A){const k=E.querySelector(".js-comment-show-on-error");k&&(k.hidden=!A);const j=E.querySelector(".js-comment-hide-on-error");j&&(j.hidden=A)}s(q,"toggleMinimizeError"),(0,g.AC)(".js-timeline-comment-unminimize, .js-timeline-comment-minimize",async function(E,A){const k=E.closest(".js-minimize-container");try{const j=await A.html();k.replaceWith(j.html)}catch{q(k,!0)}}),(0,g.AC)(".js-discussion-comment-unminimize, .js-discussion-comment-minimize",async function(E,A){const k=E.closest(".js-discussion-comment"),j=k.querySelector(".js-discussion-comment-error");j&&(j.hidden=!0);try{const P=await A.html();k.replaceWith(P.html)}catch(P){if(P.response.status>=400&&P.response.status<500){if(P.response.html){const M=P.response.html.querySelector(".js-discussion-comment").getAttribute("data-error");j instanceof HTMLElement&&(j.textContent=M,j.hidden=!1)}}else throw P}}),(0,g.AC)(".js-comment-delete",async function(E,A){await A.json();let k=E.closest(".js-comment-delete-container");k||(k=E.closest(".js-comment-container")||E.closest(".js-line-comments"),k&&k.querySelectorAll(".js-comment").length!==1&&(k=E.closest(".js-comment")));const j=(k==null?void 0:k.closest(".js-comment-container"))||(k==null?void 0:k.closest(".js-line-comments"));if(k==null||k.remove(),j&&j.querySelectorAll(".js-comment").length===1)for(const P of j.querySelectorAll(".js-delete-on-last-reply-deleted"))P.remove()}),(0,g.AC)(".js-issue-update",async function(E,A){var k,j,P;const M=E.closest(".js-details-container"),O=M.querySelector(".js-comment-form-error");let V;try{V=await A.json()}catch(N){O.textContent=((P=(j=(k=N.response)==null?void 0:k.json)==null?void 0:j.errors)==null?void 0:P[0])||"Something went wrong. Please try again.",O.hidden=!1}if(!V)return;M.classList.remove("open"),O.hidden=!0;const H=V.json;if(H.issue_title!=null){M.querySelector(".js-issue-title").textContent=H.issue_title;const N=M.closest(".js-issues-results");if(N){if(N.querySelector(".js-merge-pr.is-merging")){const U=N.querySelector(".js-merge-pull-request textarea");U instanceof HTMLTextAreaElement&&U.value===U.defaultValue&&(U.value=U.defaultValue=H.issue_title)}else if(N.querySelector(".js-merge-pr.is-squashing")){const U=N.querySelector(".js-merge-pull-request .js-merge-title");U instanceof HTMLInputElement&&U.value===U.defaultValue&&(U.value=U.defaultValue=H.default_squash_commit_title)}const K=N.querySelector("button[value=merge]");K&&K.setAttribute("data-input-message-value",H.issue_title);const W=N.querySelector("button[value=squash]");W&&W.setAttribute("data-input-title-value",H.default_squash_commit_title)}}document.title=H.page_title;for(const N of E.elements)(N instanceof HTMLInputElement||N instanceof HTMLTextAreaElement)&&(N.defaultValue=N.value)}),(0,g.AC)(".js-comment-minimize",async function(E,A){await A.json();const k=E.closest(".js-comment"),j=k.querySelector(".js-minimize-comment");if(j&&j.classList.contains("js-update-minimized-content")){const P=E.querySelector("input[type=submit], button[type=submit]");P&&P.classList.add("disabled");const M=k.closest(".js-comment-container");M&&await(0,h.x0)(M)}else{j&&j.classList.add("d-none");const P=E.closest(".unminimized-comment");P.classList.add("d-none"),P.classList.remove("js-comment");const O=E.closest(".js-minimizable-comment-group").querySelector(".minimized-comment");O&&O.classList.remove("d-none"),O&&O.classList.add("js-comment")}}),(0,g.AC)(".js-comment-unminimize",async function(E,A){await A.json();const k=E.closest(".js-minimizable-comment-group"),j=k.querySelector(".unminimized-comment"),P=k.querySelector(".minimized-comment");if(j)j.classList.remove("d-none"),j.classList.add("js-comment"),P&&P.classList.add("d-none"),P&&P.classList.remove("js-comment");else{if(P){const O=P.querySelector(".timeline-comment-actions");O&&O.classList.add("d-none"),P.classList.remove("js-comment")}const M=k.closest(".js-comment-container");await(0,h.x0)(M)}}),(0,T.on)("details-menu-select",".js-comment-edit-history-menu",E=>{const A=E.detail.relatedTarget.getAttribute("data-edit-history-url");if(!A)return;E.preventDefault();const k=(0,C.a)(document,A);(0,c.W)({content:k,dialogClass:"Box-overlay--wide overflow-visible"})},{capture:!0})},87924:()=>{document.addEventListener("click",function($){if(!($.target instanceof Element))return;const D="a[data-confirm], input[type=submit][data-confirm], input[type=checkbox][data-confirm], button[data-confirm]",f=$.target.closest(D);if(!f)return;const T=f.getAttribute("data-confirm");!T||f instanceof HTMLInputElement&&f.hasAttribute("data-confirm-checked")&&!f.checked||confirm(T)||($.stopImmediatePropagation(),$.preventDefault())},!0)},33948:($,D,f)=>{"use strict";f.d(D,{Z:()=>_});var T=f(7739);const c=[];let C=0;function _(d){(async function(){c.push(d),await T.x,x()})()}s(_,"hashChange"),_.clear=()=>{c.length=C=0};function x(){const d=C;C=c.length,u(c.slice(d),null,window.location.href)}s(x,"runRemainingHandlers");function u(d,m,p){const b=window.location.hash.slice(1),v=b?document.getElementById(b):null,L={oldURL:m,newURL:p,target:v};for(const q of d)q.call(null,L)}s(u,"runHandlers");let g=window.location.href;window.addEventListener("popstate",function(){g=window.location.href}),window.addEventListener("hashchange",function(d){const m=window.location.href;try{u(c,d.oldURL||g,m)}finally{g=m}});let h=null;document.addEventListener("pjax:start",function(){h=window.location.href}),document.addEventListener("pjax:end",function(){u(c,h,window.location.href)})},52641:($,D,f)=>{"use strict";f.d(D,{G:()=>h});var T=f(45075),c=f(64463),C=f(59753);const _=["input[pattern]","input[required]","textarea[required]","input[data-required-change]","textarea[data-required-change]","input[data-required-value]","textarea[data-required-value]"].join(",");function x(d){const m=d.getAttribute("data-required-value"),p=d.getAttribute("data-required-value-prefix");if(d.value===m)d.setCustomValidity("");else{let b=m;p&&(b=p+b),d.setCustomValidity(b)}}s(x,"checkValidityForRequiredValueField"),(0,T.q6)("[data-required-value]",function(d){const m=d.currentTarget;x(m)}),(0,C.on)("change","[data-required-value]",function(d){const m=d.currentTarget;x(m),h(m.form)}),(0,T.q6)("[data-required-trimmed]",function(d){const m=d.currentTarget;m.value.trim()===""?m.setCustomValidity(m.getAttribute("data-required-trimmed")):m.setCustomValidity("")}),(0,C.on)("change","[data-required-trimmed]",function(d){const m=d.currentTarget;m.value.trim()===""?m.setCustomValidity(m.getAttribute("data-required-trimmed")):m.setCustomValidity(""),h(m.form)}),(0,T.ZG)(_,d=>{let m=d.checkValidity();function p(){const b=d.checkValidity();b!==m&&d.form&&h(d.form),m=b}s(p,"inputHandler"),d.addEventListener("input",p),d.addEventListener("blur",s(function b(){d.removeEventListener("input",p),d.removeEventListener("blur",b)},"blurHandler"))});const u=new WeakMap;function g(d){u.get(d)||(d.addEventListener("change",()=>h(d)),u.set(d,!0))}s(g,"installHandlers");function h(d){const m=d.checkValidity();for(const p of d.querySelectorAll("button[data-disable-invalid]"))p.disabled=!m}s(h,"validate"),(0,c.N7)("button[data-disable-invalid]",{constructor:HTMLButtonElement,initialize(d){const m=d.form;m&&(g(m),d.disabled=!m.checkValidity())}}),(0,c.N7)("input[data-required-change], textarea[data-required-change]",function(d){const m=d,p=m.type==="radio"&&m.form?m.form.elements.namedItem(m.name).value:null;function b(v){const L=m.form;if(v&&m.type==="radio"&&L&&p)for(const q of L.elements.namedItem(m.name))q instanceof HTMLInputElement&&q.setCustomValidity(m.value===p?"unchanged":"");else m.setCustomValidity(m.value===(p||m.defaultValue)?"unchanged":"")}s(b,"customValidity"),m.addEventListener("input",b),m.addEventListener("change",b),b(),m.form&&h(m.form)}),document.addEventListener("reset",function(d){if(d.target instanceof HTMLFormElement){const m=d.target;setTimeout(()=>h(m))}})},11724:()=>{document.addEventListener("pjax:click",function($){if(window.onbeforeunload)return $.preventDefault()})},17300:($,D,f)=>{"use strict";f.d(D,{k:()=>x});var T=f(6741),c=f(7739),C=f(64463),_=f(75371);(0,C.N7)(".js-responsive-underlinenav",{constructor:HTMLElement,subscribe:h=>(x(h),(0,T.RB)(window,"resize",()=>g(h)))});async function x(h){await c.C,g(h)}s(x,"asyncCalculateVisibility");function u(h,d){h.style.visibility=d?"hidden":"";const m=h.getAttribute("data-tab-item");if(m){const p=document.querySelector(`[data-menu-item=${m}]`);p instanceof HTMLElement&&(p.hidden=!d)}}s(u,"toggleItem");function g(h){const d=h.querySelectorAll(".js-responsive-underlinenav-item"),m=h.querySelector(".js-responsive-underlinenav-overflow"),p=(0,_.oE)(m,h);if(!p)return;let b=!1;for(const v of d){const L=(0,_.oE)(v,h);if(L){const q=L.left+v.offsetWidth>=p.left;u(v,q),b=b||q}}m.style.visibility=b?"":"hidden"}s(g,"calculateVisibility")},41928:()=>{function $(T){const c=document.querySelector(".js-stale-session-flash"),C=c.querySelector(".js-stale-session-flash-signed-in"),_=c.querySelector(".js-stale-session-flash-signed-out");c.hidden=!1,C.hidden=T==="false",_.hidden=T==="true",window.addEventListener("popstate",function(x){x.state&&x.state.container!=null&&location.reload()}),document.addEventListener("submit",function(x){x.preventDefault()})}s($,"sessionChanged");let D;if(typeof BroadcastChannel=="function")try{D=new BroadcastChannel("stale-session"),D.onmessage=T=>{typeof T.data=="string"&&$(T.data)}}catch{}if(!D){let T=!1;D={postMessage(c){T=!0;try{window.localStorage.setItem("logged-in",c)}finally{T=!1}}},window.addEventListener("storage",function(c){if(!T&&c.storageArea===window.localStorage&&c.key==="logged-in")try{(c.newValue==="true"||c.newValue==="false")&&$(c.newValue)}finally{window.localStorage.removeItem(c.key)}})}const f=document.querySelector(".js-stale-session-flash[data-signedin]");if(f){const T=f.getAttribute("data-signedin")||"";D.postMessage(T)}},32222:($,D,f)=>{"use strict";var T=f(11793),c=f(59753),C=f(64463);class _{constructor(u){this.container=u.container,this.selections=u.selections,this.inputWrap=u.inputWrap,this.input=u.input,this.tagTemplate=u.tagTemplate,this.form=this.input.form,this.autoComplete=u.autoComplete,this.multiTagInput=u.multiTagInput}setup(){this.container.addEventListener("click",u=>{u.target.closest(".js-remove")?this.removeTag(u):this.onFocus()}),this.input.addEventListener("focus",this.onFocus.bind(this)),this.input.addEventListener("blur",this.onBlur.bind(this)),this.input.addEventListener("keydown",this.onKeyDown.bind(this)),this.form.addEventListener("submit",this.onSubmit.bind(this)),this.autoComplete.addEventListener("auto-complete-change",()=>{this.selectTag(this.autoComplete.value)})}onFocus(){this.inputWrap.classList.add("focus"),this.input!==document.activeElement&&this.input.focus()}onBlur(){this.inputWrap.classList.remove("focus"),this.autoComplete.open||this.onSubmit()}onSubmit(){this.input.value&&(this.selectTag(this.input.value),this.autoComplete.open=!1)}onKeyDown(u){switch((0,T.EL)(u)){case"Backspace":this.onBackspace();break;case"Enter":case"Tab":this.taggifyValueWhenSuggesterHidden(u);break;case",":case" ":this.taggifyValue(u);break}}taggifyValueWhenSuggesterHidden(u){!this.autoComplete.open&&this.input.value&&(u.preventDefault(),this.selectTag(this.input.value))}taggifyValue(u){this.input.value&&(u.preventDefault(),this.selectTag(this.input.value),this.autoComplete.open=!1)}selectTag(u){const g=this.normalizeTag(u),h=this.selectedTags();let d=!1;for(let m=0;m<g.length;m++){const p=g[m];h.indexOf(p)<0&&(this.selections.appendChild(this.templateTag(p)),d=!0)}d&&(this.input.value="",(0,c.f)(this.form,"tags:changed"))}removeTag(u){const g=u.target;u.preventDefault(),g.closest(".js-tag-input-tag").remove(),(0,c.f)(this.form,"tags:changed")}templateTag(u){const g=this.tagTemplate.cloneNode(!0);return g.querySelector("input").value=u,g.querySelector(".js-placeholder-tag-name").replaceWith(u),g.classList.remove("d-none","js-template"),g}normalizeTag(u){const g=u.toLowerCase().trim();return g?this.multiTagInput?g.split(/[\s,']+/):[g.replace(/[\s,']+/g,"-")]:[]}onBackspace(){if(!this.input.value){const u=this.selections.querySelector("li:last-child .js-remove");u instanceof HTMLElement&&u.click()}}selectedTags(){const u=this.selections.querySelectorAll("input");return Array.from(u).map(g=>g.value).filter(g=>g.length>0)}}s(_,"TagInput"),(0,C.N7)(".js-tag-input-container",{constructor:HTMLElement,initialize(x){new _({container:x,inputWrap:x.querySelector(".js-tag-input-wrapper"),input:x.querySelector('input[type="text"], input:not([type])'),selections:x.querySelector(".js-tag-input-selected-tags"),tagTemplate:x.querySelector(".js-template"),autoComplete:x.querySelector("auto-complete"),multiTagInput:!1}).setup()}}),(0,C.N7)(".js-multi-tag-input-container",{constructor:HTMLElement,initialize(x){new _({container:x,inputWrap:x.querySelector(".js-tag-input-wrapper"),input:x.querySelector('input[type="text"], input:not([type])'),selections:x.querySelector(".js-tag-input-selected-tags"),tagTemplate:x.querySelector(".js-template"),autoComplete:x.querySelector("auto-complete"),multiTagInput:!0}).setup()}})},53412:($,D,f)=>{"use strict";f.d(D,{H:()=>_});var T=f(29946),c=f(49815),C=f(11190);if((0,c.c)("TURBO")){(async()=>{const{PageRenderer:u,session:g,navigator:h}=await f.e("vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js").then(f.bind(f,74395)),d=g.adapter;function m(){d.progressBar.setValue(0),d.progressBar.show()}s(m,"beginProgressBar");function p(){d.progressBar.setValue(1),d.progressBar.hide()}s(p,"completeProgressBar"),document.addEventListener("turbo:before-fetch-request",q=>{const E=q.target;if(_(E)&&m(),(E==null?void 0:E.tagName)==="HTML"){const k=q;k.detail.fetchOptions.headers["Turbo-Visit"]="true"}const A=(0,C.I)(q.detail.url.pathname);if(A){const k=new URLSearchParams(q.detail.url.search);for(const[j,P]of Object.entries(A))P&&k.set(j,P);q.detail.url.search=k.toString()}}),document.addEventListener("turbo:frame-render",q=>{_(q.target)&&p()}),document.addEventListener(T.QE.START,m),document.addEventListener(T.QE.END,p);const b=Object.getOwnPropertyDescriptor(u.prototype,"reloadReason").get;Object.defineProperty(u.prototype,"reloadReason",{get(){const q=b.call(this);if(q.reason!=="tracked_element_mismatch")return q;const E=Object.fromEntries(v(this.currentHeadSnapshot)),A=[];for(const[k,j]of v(this.newHeadSnapshot))E[k]!==j&&A.push(k.replace(/^x-/,"").replaceAll("-","_"));return{reason:`tracked_element_mismatch-${A.join("-")}`}}});function*v(q){for(const E of Object.values(q.detailsByOuterHTML))if(E.tracked)for(const A of E.elements)A instanceof HTMLMetaElement&&A.getAttribute("http-equiv")&&(yield[A.getAttribute("http-equiv")||"",A.getAttribute("content")||""])}s(v,"getSnapshotSignatures");function L(q){const E=history[q];history[q]=function(A,k,j){var P;function M(O,V,H){E.call(this,{...A,...O},V,H)}s(M,"oldHistoryWithMergedState"),h.history.update(M,new URL(j||location.href,location.href),(P=A==null?void 0:A.turbo)==null?void 0:P.restorationIdentifier)}}s(L,"patchHistoryApi"),L("replaceState"),L("pushState")})();const x=s((u,g)=>{const h=new URL(u,window.location.origin),d=new URL(g,window.location.origin);return Boolean(d.hash)&&h.hash!==d.hash&&h.host===d.host&&h.pathname===d.pathname&&h.search===d.search},"isHashNavigation");document.addEventListener("turbo:click",function(u){if(!(u.target instanceof HTMLElement))return;const g=u.target.closest("[data-turbo-frame]");g instanceof HTMLElement&&u.target.setAttribute("data-turbo-frame",g.getAttribute("data-turbo-frame")||""),u instanceof CustomEvent&&x(location.href,u.detail.url)&&u.preventDefault()}),document.addEventListener("turbo:before-render",u=>{if(!(u instanceof CustomEvent))return;const g=u.detail.newBody.ownerDocument.documentElement,h=document.documentElement;for(const d of h.attributes)!g.hasAttribute(d.nodeName)&&d.nodeName!=="aria-busy"&&h.removeAttribute(d.nodeName);for(const d of g.attributes)h.getAttribute(d.nodeName)!==d.nodeValue&&h.setAttribute(d.nodeName,d.nodeValue)}),document.addEventListener("turbo:visit",T.LD),document.addEventListener("turbo:render",T.FP),document.addEventListener("beforeunload",T.FP),document.addEventListener("turbo:load",u=>{Object.keys(u.detail.timing).length===0?(0,T.OE)()||(0,T.Po)()?(0,T.Ys)():(0,T.F6)():(0,T.Xk)()}),document.addEventListener("turbo:before-visit",function(u){var g;const h=(g=window.onbeforeunload)==null?void 0:g.call(window,u);h&&(confirm(h)?window.onbeforeunload=null:u.preventDefault())}),document.addEventListener("turbo:reload",function(u){u instanceof CustomEvent&&(0,T.Ak)(u.detail.reason)}),document.addEventListener(T.QE.SUCCESS,()=>{if(location.hash==="")return;const u=document.createElement("a");u.href=`#${location.hash.slice(1)}`,u.click()})}const _=s(x=>(x==null?void 0:x.tagName)==="TURBO-FRAME","isTurboFrame")},95128:()=>{function $(){const f=document.createElement("div");return f.style.cssText="-ms-user-select: element; user-select: contain;",f.style.getPropertyValue("-ms-user-select")==="element"||f.style.getPropertyValue("-ms-user-select")==="contain"||f.style.getPropertyValue("user-select")==="contain"}s($,"supportsUserSelectContain");function D(f){if(!(f.target instanceof Element))return;const T=f.target.closest(".user-select-contain");if(!T)return;const c=window.getSelection();if(!c||!c.rangeCount||!c.rangeCount||c.type!=="Range")return;const C=c.getRangeAt(0).commonAncestorContainer;T.contains(C)||c.selectAllChildren(T)}s(D,"handleUserSelectContain"),$()||document.addEventListener("click",D)},29790:($,D,f)=>{"use strict";f.d(D,{Dw:()=>x,G5:()=>T,M9:()=>g,n6:()=>_});function T(b){const v=b.match(/#?(?:L)(\d+)((?:C)(\d+))?/g);if(v)if(v.length===1){const L=u(v[0]);return L?Object.freeze({start:L,end:L}):void 0}else if(v.length===2){const L=u(v[0]),q=u(v[1]);return!L||!q?void 0:m(Object.freeze({start:L,end:q}))}else return;else return}s(T,"parseBlobRange");function c(b){const{start:v,end:L}=m(b);return v.column!=null&&L.column!=null?`L${v.line}C${v.column}-L${L.line}C${L.column}`:v.line===L.line?`L${v.line}`:`L${v.line}-L${L.line}`}s(c,"formatBlobRange");function C(b){const v=b.match(/(file-.+?-)L\d+?/i);return v?v[1]:""}s(C,"parseAnchorPrefix");function _(b){const v=T(b),L=C(b);return{blobRange:v,anchorPrefix:L}}s(_,"parseFileAnchor");function x({anchorPrefix:b,blobRange:v}){return v?`#${b}${c(v)}`:"#"}s(x,"formatBlobRangeAnchor");function u(b){const v=b.match(/L(\d+)/),L=b.match(/C(\d+)/);return v?Object.freeze({line:parseInt(v[1]),column:L?parseInt(L[1]):null}):null}s(u,"parseBlobOffset");function g(b,v){const[L,q]=h(b.start,!0,v),[E,A]=h(b.end,!1,v);if(!L||!E)return;let k=q,j=A;if(k===-1&&(k=0),j===-1&&(j=E.childNodes.length),!L.ownerDocument)throw new Error("DOMRange needs to be inside document");const P=L.ownerDocument.createRange();return P.setStart(L,k),P.setEnd(E,j),P}s(g,"DOMRangeFromBlob");function h(b,v,L){const q=[null,0],E=L(b.line);if(!E)return q;if(b.column==null)return[E,-1];let A=b.column-1;const k=d(E);for(let j=0;j<k.length;j++){const P=k[j],M=A-(P.textContent||"").length;if(M===0){const O=k[j+1];return v&&O?[O,0]:[P,A]}else if(M<0)return[P,A];A=M}return q}s(h,"findRangeOffset");function d(b){if(b.nodeType===Node.TEXT_NODE)return[b];if(!b.childNodes||!b.childNodes.length)return[];let v=[];for(const L of b.childNodes)v=v.concat(d(L));return v}s(d,"getAllTextNodes");function m(b){const v=[b.start,b.end];return v.sort(p),v[0]===b.start&&v[1]===b.end?b:Object.freeze({start:v[0],end:v[1]})}s(m,"ascendingBlobRange");function p(b,v){return b.line===v.line&&b.column===v.column?0:b.line===v.line&&typeof b.column=="number"&&typeof v.column=="number"?b.column-v.column:b.line-v.line}s(p,"compareBlobOffsets")},35889:($,D,f)=>{"use strict";f.d(D,{P:()=>C,g:()=>_});var T=f(59753);const c=new WeakMap;function C(g){return c.get(g)}s(C,"getCodeEditor");async function _(g){return c.get(g)||x(await u(g,"codeEditor:ready"))}s(_,"getAsyncCodeEditor");function x(g){if(!(g instanceof CustomEvent))throw new Error("assert: event is not a CustomEvent");const h=g.detail.editor;if(!g.target)throw new Error("assert: event.target is null");return c.set(g.target,h),h}s(x,"onEditorFromEvent"),(0,T.on)("codeEditor:ready",".js-code-editor",x);function u(g,h){return new Promise(d=>{g.addEventListener(h,d,{once:!0})})}s(u,"nextEvent")},64926:($,D,f)=>{"use strict";f.d(D,{$1:()=>c,d8:()=>_,ej:()=>T,kT:()=>x});function T(u){return c(u)[0]}s(T,"getCookie");function c(u){const g=[];for(const h of C()){const[d,m]=h.trim().split("=");u===d&&typeof m!="undefined"&&g.push({key:d,value:m})}return g}s(c,"getCookies");function C(){try{return document.cookie.split(";")}catch{return[]}}s(C,"readCookies");function _(u,g,h=null,d=!1,m="lax"){let p=document.domain;if(p==null)throw new Error("Unable to get document domain");p.endsWith(".github.com")&&(p="github.com");const b=location.protocol==="https:"?"; secure":"",v=h?`; expires=${h}`:"";d===!1&&(p=`.${p}`);try{document.cookie=`${u}=${g}; path=/; domain=${p}${v}${b}; samesite=${m}`}catch{}}s(_,"setCookie");function x(u,g=!1){let h=document.domain;if(h==null)throw new Error("Unable to get document domain");h.endsWith(".github.com")&&(h="github.com");const d=new Date().getTime(),m=new Date(d-1).toUTCString(),p=location.protocol==="https:"?"; secure":"",b=`; expires=${m}`;g===!1&&(h=`.${h}`);try{document.cookie=`${u}=''; path=/; domain=${h}${b}${p}`}catch{}}s(x,"deleteCookie")},75371:($,D,f)=>{"use strict";f.d(D,{VZ:()=>c,_C:()=>C,cv:()=>T,oE:()=>_});function T(g){const h=g.getBoundingClientRect();return{top:h.top+window.pageYOffset,left:h.left+window.pageXOffset}}s(T,"offset");function c(g){let h=g;const d=h.ownerDocument;if(!d||!h.offsetParent)return;const m=d.defaultView.HTMLElement;if(h!==d.body){for(;h!==d.body;){if(h.parentElement instanceof m)h=h.parentElement;else return;const{position:p,overflowY:b,overflowX:v}=getComputedStyle(h);if(p==="fixed"||b==="auto"||v==="auto"||b==="scroll"||v==="scroll")break}return h instanceof Document?null:h}}s(c,"overflowParent");function C(g,h){let d=h;const m=g.ownerDocument;if(!m)return;const p=m.documentElement;if(!p||g===p)return;const b=_(g,d);if(!b)return;d=b._container;const v=d===m.documentElement&&m.defaultView?{top:m.defaultView.pageYOffset,left:m.defaultView.pageXOffset}:{top:d.scrollTop,left:d.scrollLeft},L=b.top-v.top,q=b.left-v.left,E=d.clientHeight,A=d.clientWidth,k=E-(L+g.offsetHeight),j=A-(q+g.offsetWidth);return{top:L,left:q,bottom:k,right:j,height:E,width:A}}s(C,"overflowOffset");function _(g,h){let d=g;const m=d.ownerDocument;if(!m)return;const p=m.documentElement;if(!p)return;const b=m.defaultView.HTMLElement;let v=0,L=0;const q=d.offsetHeight,E=d.offsetWidth;for(;!(d===m.body||d===h);)if(v+=d.offsetTop||0,L+=d.offsetLeft||0,d.offsetParent instanceof b)d=d.offsetParent;else return;let A,k,j;if(!h||h===m||h===m.defaultView||h===m.documentElement||h===m.body)j=p,A=x(m.body,p),k=u(m.body,p);else if(h instanceof b)j=h,A=h.scrollHeight,k=h.scrollWidth;else return;const P=A-(v+q),M=k-(L+E);return{top:v,left:L,bottom:P,right:M,_container:j}}s(_,"positionedOffset");function x(g,h){return Math.max(g.scrollHeight,h.scrollHeight,g.offsetHeight,h.offsetHeight,h.clientHeight)}s(x,"getDocumentHeight");function u(g,h){return Math.max(g.scrollWidth,h.scrollWidth,g.offsetWidth,h.offsetWidth,h.clientWidth)}s(u,"getDocumentWidth")},73185:($,D,f)=>{"use strict";f.d(D,{Dc:()=>_,bP:()=>g,g:()=>u,gJ:()=>T,rs:()=>c});function T(){return Promise.resolve()}s(T,"microtask");function c(){return new Promise(window.requestAnimationFrame)}s(c,"animationFrame");async function C(h,d){let m;const p=new Promise((b,v)=>{m=self.setTimeout(()=>v(new Error("timeout")),h)});if(!d)return p;try{await Promise.race([p,x(d)])}catch(b){throw self.clearTimeout(m),b}}s(C,"timeout");async function _(h,d){let m;const p=new Promise(b=>{m=self.setTimeout(b,h)});if(!d)return p;try{await Promise.race([p,x(d)])}catch(b){throw self.clearTimeout(m),b}}s(_,"wait");function x(h){return new Promise((d,m)=>{const p=new Error("aborted");p.name="AbortError",h.aborted?m(p):h.addEventListener("abort",()=>m(p))})}s(x,"whenAborted");function u(h){const d=[];return function(m){d.push(m),d.length===1&&queueMicrotask(()=>{const p=[...d];d.length=0,h(p)})}}s(u,"taskQueue");async function g(h){requestAnimationFrame(()=>{setTimeout(h)})}s(g,"afterNextPaint")},92003:($,D,f)=>{"use strict";f.d(D,{aJ:()=>k,cI:()=>q,eK:()=>p});var T=f(29946),c=f(97474),C=f(82918),_=f(50232),x=f(28382),u=f(47930),g=f(49815);let h=!1,d=0;const m=Date.now();function p(M,O={}){M&&M.name!=="AbortError"&&b(L(v(M),O))}s(p,"reportError");async function b(M){var O,V;if(!P())return;const H=(V=(O=document.head)==null?void 0:O.querySelector('meta[name="browser-errors-url"]'))==null?void 0:V.content;if(!!H){if(A(M.error.stacktrace)){h=!0;return}d++;try{await fetch(H,{method:"post",body:JSON.stringify(M)})}catch{}}}s(b,"report");function v(M){return{type:M.name,value:M.message,stacktrace:q(M)}}s(v,"formatError");function L(M,O={}){return Object.assign({error:M,sanitizedUrl:(0,u.S)()||window.location.href,readyState:document.readyState,referrer:(0,T.wP)(),timeSinceLoad:Math.round(Date.now()-m),user:k()||void 0,turbo:(0,g.c)("TURBO")},O)}s(L,"errorContext");function q(M){return(0,x.Q)(M.stack||"").map(O=>({filename:O.file||"",function:String(O.methodName),lineno:(O.lineNumber||0).toString(),colno:(O.column||0).toString()}))}s(q,"stacktrace");const E=/(chrome|moz|safari)-extension:\/\//;function A(M){return M.some(O=>E.test(O.filename)||E.test(O.function))}s(A,"isExtensionError");function k(){var M,O;const V=(O=(M=document.head)==null?void 0:M.querySelector('meta[name="user-login"]'))==null?void 0:O.content;return V||`anonymous-${(0,C.b)()}`}s(k,"pageUser");let j=!1;window.addEventListener("pageshow",()=>j=!1),window.addEventListener("pagehide",()=>j=!0),document.addEventListener(T.QE.ERROR,M=>{b(L({type:"SoftNavError",value:M.detail,stacktrace:q(new Error)}))});function P(){return!j&&!h&&d<10&&(0,_.Gb)()&&!(0,c.Z)(document)}s(P,"reportable"),typeof BroadcastChannel=="function"&&new BroadcastChannel("shared-worker-error").addEventListener("message",O=>{p(O.data.error)})},98670:($,D,f)=>{"use strict";f.d(D,{W:()=>c});function*T(C,_){for(const x of C){const u=_(x);u!=null&&(yield u)}}s(T,"filterMap");function c(C,_,x){return[...T(C,s(g=>{const h=_(g);return h!=null?[g,h]:null},"sortKey"))].sort((g,h)=>x(g[1],h[1])).map(([g])=>g)}s(c,"filterSort")},8089:($,D,f)=>{"use strict";f.d(D,{EW:()=>T,Qw:()=>C,qu:()=>x});function T(u,g){let h=_(u,g);if(h&&g.indexOf("/")===-1){const d=u.substring(u.lastIndexOf("/")+1);h+=_(d,g)}return h}s(T,"fuzzyScore");function c(u){const g=u.toLowerCase().split("");let h="";for(let d=0;d<g.length;d++){const p=g[d].replace(/[\\^$*+?.()|[\]{}]/g,"\\$&");d===0?h+=`(.*)(${p})`:h+=`([^${p}]*?)(${p})`}return new RegExp(`${h}(.*?)$`,"i")}s(c,"fuzzyRegexp");function C(u,g,h){if(g){const d=u.innerHTML.trim().match(h||c(g));if(!d)return;let m=!1;const p=[];for(let b=1;b<d.length;++b){const v=d[b];!v||(b%2===0?m||(p.push("<mark>"),m=!0):m&&(p.push("</mark>"),m=!1),p.push(v))}u.innerHTML=p.join("")}else{const d=u.innerHTML.trim(),m=d.replace(/<\/?mark>/g,"");d!==m&&(u.innerHTML=m)}}s(C,"fuzzyHighlightElement");function _(u,g){let h=u;if(h===g)return 1;const d=h.length;let m=0,p=0;for(let q=0;q<g.length;q++){const E=g[q],A=h.indexOf(E.toLowerCase()),k=h.indexOf(E.toUpperCase()),j=Math.min(A,k),P=j>-1?j:Math.max(A,k);if(P===-1)return 0;m+=.1,h[P]===E&&(m+=.1),P===0&&(m+=.8,q===0&&(p=1)),h.charAt(P-1)===" "&&(m+=.8),h=h.substring(P+1,d)}const b=g.length,v=m/b;let L=(v*(b/d)+v)/2;return p&&L+.1<1&&(L+=.1),L}s(_,"stringScore");function x(u,g){return u.score>g.score?-1:u.score<g.score?1:u.text<g.text?-1:u.text>g.text?1:0}s(x,"compare")},99254:($,D,f)=>{"use strict";f.d(D,{Z:()=>d});var T=f(47142);const c=s((m,p,b)=>{if(!(0,T.CD)(m,p))return-1/0;const v=(0,T.Gs)(m,p);return v<b?-1/0:v},"getScore"),C=s((m,p,b)=>{m.innerHTML="";let v=0;for(const L of(0,T.m7)(p,b)){b.slice(v,L)!==""&&m.appendChild(document.createTextNode(b.slice(v,L))),v=L+1;const E=document.createElement("mark");E.textContent=b[L],m.appendChild(E)}m.appendChild(document.createTextNode(b.slice(v)))},"highlightElement"),_=new WeakMap,x=new WeakMap,u=new WeakMap,g=s(m=>{if(!u.has(m)&&m instanceof HTMLElement){const p=(m.getAttribute("data-value")||m.textContent||"").trim();return u.set(m,p),p}return u.get(m)||""},"getTextCache");class h extends HTMLElement{connectedCallback(){const p=this.querySelector("ul");if(!p)return;const b=new Set(p.querySelectorAll("li")),v=this.querySelector("input");v instanceof HTMLInputElement&&v.addEventListener("input",()=>{this.value=v.value});const L=new MutationObserver(E=>{let A=!1;for(const k of E)if(k.type==="childList"&&k.addedNodes.length){for(const j of k.addedNodes)if(j instanceof HTMLLIElement&&!b.has(j)){const P=g(j);A=A||(0,T.CD)(this.value,P),b.add(j)}}A&&this.sort()});L.observe(p,{childList:!0});const q={handler:L,items:b,lazyItems:new Map,timer:null};x.set(this,q)}disconnectedCallback(){const p=x.get(this);p&&(p.handler.disconnect(),x.delete(this))}addLazyItems(p,b){const v=x.get(this);if(!v)return;const{lazyItems:L}=v,{value:q}=this;let E=!1;for(const A of p)L.set(A,b),E=E||Boolean(q)&&(0,T.CD)(q,A);E&&this.sort()}sort(){const p=_.get(this);p&&(p.aborted=!0);const b={aborted:!1};_.set(this,b);const{minScore:v,markSelector:L,maxMatches:q,value:E}=this,A=x.get(this);if(!A||!this.dispatchEvent(new CustomEvent("fuzzy-list-will-sort",{cancelable:!0,detail:E})))return;const{items:k,lazyItems:j}=A,P=this.hasAttribute("mark-selector"),M=this.querySelector("ul");if(!M)return;const O=[];if(E){for(const V of k){const H=g(V),N=c(E,H,v);N!==-1/0&&O.push({item:V,score:N})}for(const[V,H]of j){const N=c(E,V,v);N!==-1/0&&O.push({text:V,render:H,score:N})}O.sort((V,H)=>H.score-V.score).splice(q)}else{let V=O.length;for(const H of k){if(V>=q)break;O.push({item:H,score:1}),V+=1}for(const[H,N]of j){if(V>=q)break;O.push({text:H,render:N,score:1}),V+=1}}requestAnimationFrame(()=>{if(b.aborted)return;const V=M.querySelector('input[type="radio"]:checked');M.innerHTML="";let H=0;const N=s(()=>{if(b.aborted)return;const K=Math.min(O.length,H+100),W=document.createDocumentFragment();for(let te=H;te<K;te+=1){const le=O[te];let ae=null;if("render"in le&&"text"in le){const{render:we,text:ue}=le;ae=we(ue),k.add(ae),u.set(ae,ue),j.delete(ue)}else"item"in le&&(ae=le.item);ae instanceof HTMLElement&&(P&&C(L&&ae.querySelector(L)||ae,P?E:"",g(ae)),W.appendChild(ae))}H=K;let U=!1;if(V instanceof HTMLInputElement)for(const te of W.querySelectorAll('input[type="radio"]:checked'))te instanceof HTMLInputElement&&te.value!==V.value&&(te.checked=!1,U=!0);if(M.appendChild(W),V&&U&&V.dispatchEvent(new Event("change",{bubbles:!0})),K<O.length)requestAnimationFrame(N);else{M.hidden=O.length===0;const te=this.querySelector("[data-fuzzy-list-show-on-empty]");te&&(te.hidden=O.length>0),this.dispatchEvent(new CustomEvent("fuzzy-list-sorted",{detail:O.length}))}},"nextBatch");N()})}get value(){return this.getAttribute("value")||""}set value(p){this.setAttribute("value",p)}get markSelector(){return this.getAttribute("mark-selector")||""}set markSelector(p){p?this.setAttribute("mark-selector",p):this.removeAttribute("mark-selector")}get minScore(){return Number(this.getAttribute("min-score")||0)}set minScore(p){Number.isNaN(p)||this.setAttribute("min-score",String(p))}get maxMatches(){return Number(this.getAttribute("max-matches")||1/0)}set maxMatches(p){Number.isNaN(p)||this.setAttribute("max-matches",String(p))}static get observedAttributes(){return["value","mark-selector","min-score","max-matches"]}attributeChangedCallback(p,b,v){if(b===v)return;const L=x.get(this);!L||(L.timer&&window.clearTimeout(L.timer),L.timer=window.setTimeout(()=>this.sort(),100))}}s(h,"FuzzyListElement");const d=h;window.customElements.get("fuzzy-list")||(window.FuzzyListElement=h,window.customElements.define("fuzzy-list",h))},30481:($,D,f)=>{"use strict";f.d(D,{Y:()=>g,q:()=>h});var T=f(88149),c=f(86058);const C="dimension_";let _;const x=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","scid"];try{const d=(0,T.n)("octolytics");delete d.baseContext,_=new c.R(d)}catch{}function u(d){const m=(0,T.n)("octolytics").baseContext||{};if(m){delete m.app_id,delete m.event_url,delete m.host;for(const v in m)v.startsWith(C)&&(m[v.replace(C,"")]=m[v],delete m[v])}const p=document.querySelector("meta[name=visitor-payload]");if(p){const v=JSON.parse(atob(p.content));Object.assign(m,v)}const b=new URLSearchParams(window.location.search);for(const[v,L]of b)x.includes(v.toLowerCase())&&(m[v]=L);return Object.assign(m,d)}s(u,"extendBaseContext");function g(d){_==null||_.sendPageView(u(d))}s(g,"sendPageView");function h(d,m){var p,b;const v=(b=(p=document.head)==null?void 0:p.querySelector('meta[name="current-catalog-service"]'))==null?void 0:b.content,L=v?{service:v}:{};for(const[q,E]of Object.entries(m))E!=null&&(L[q]=`${E}`);_==null||_.sendEvent(d||"unknown",u(L))}s(h,"sendEvent")},53692:($,D,f)=>{"use strict";f.d(D,{$S:()=>c,Fk:()=>C,sz:()=>_});var T=f(45922);function c(x,u,g){const h={hydroEventPayload:x,hydroEventHmac:u,visitorPayload:"",visitorHmac:"",hydroClientContext:g},d=document.querySelector("meta[name=visitor-payload]");d instanceof HTMLMetaElement&&(h.visitorPayload=d.content);const m=document.querySelector("meta[name=visitor-hmac]")||"";m instanceof HTMLMetaElement&&(h.visitorHmac=m.content),(0,T.b)(h,!0)}s(c,"sendData");function C(x){const u=x.getAttribute("data-hydro-view")||"",g=x.getAttribute("data-hydro-view-hmac")||"",h=x.getAttribute("data-hydro-client-context")||"";c(u,g,h)}s(C,"trackView");function _(x){const u=x.getAttribute("data-hydro-click-payload")||"",g=x.getAttribute("data-hydro-click-hmac")||"",h=x.getAttribute("data-hydro-client-context")||"";c(u,g,h)}s(_,"sendHydroEvent")},51244:($,D,f)=>{"use strict";f.d(D,{vt:()=>A,WF:()=>E,DV:()=>q,jW:()=>M,Nc:()=>p,$t:()=>C});const T={frequency:.6,recency:.4};function c(H,N){return H.sort((K,W)=>N(K)-N(W))}s(c,"sortBy");function C(H){const N=x(H),K=u(H);return function(W){return _(N.get(W)||0,K.get(W)||0)}}s(C,"scorer");function _(H,N){return H*T.frequency+N*T.recency}s(_,"score");function x(H){const N=[...Object.values(H)].reduce((K,W)=>K+W.visitCount,0);return new Map(Object.keys(H).map(K=>[K,H[K].visitCount/N]))}s(x,"frequencyMap");function u(H){const N=c([...Object.keys(H)],W=>H[W].lastVisitedAt),K=N.length;return new Map(N.map((W,U)=>[W,(U+1)/K]))}s(u,"recencyMap");const g=/^\/orgs\/([a-z0-9-]+)\/teams\/([\w-]+)/,h=[/^\/([^/]+)\/([^/]+)\/?$/,/^\/([^/]+)\/([^/]+)\/blob/,/^\/([^/]+)\/([^/]+)\/tree/,/^\/([^/]+)\/([^/]+)\/issues/,/^\/([^/]+)\/([^/]+)\/pulls?/,/^\/([^/]+)\/([^/]+)\/pulse/],d=[["organization",/^\/orgs\/([a-z0-9-]+)\/projects\/([0-9-]+)/],["repository",/^\/([^/]+)\/([^/]+)\/projects\/([0-9-]+)/]],m=100;function p(H){const N=H.match(g);if(N){v(q(N[1],N[2]));return}let K;for(let U=0,te=d.length;U<te;U++){const[le,ae]=d[U];if(K=H.match(ae),K){let we=null,ue=null;switch(le){case"organization":we=K[1],ue=K[2];break;case"repository":we=`${K[1]}/${K[2]}`,ue=K[3];break;default:}we&&ue&&v(A(we,ue));return}}let W;for(let U=0,te=h.length;U<te;U++)if(W=H.match(h[U]),W){v(E(W[1],W[2]));return}}s(p,"logPageView");function b(H){const N=Object.keys(H);if(N.length<=m)return H;const K=C(H),W=N.sort((U,te)=>K(te)-K(U)).slice(0,m/2);return Object.fromEntries(W.map(U=>[U,H[U]]))}s(b,"limitedPageViews");function v(H){const N=M(),K=L(),W=N[H]||{lastVisitedAt:K,visitCount:0};W.visitCount+=1,W.lastVisitedAt=K,N[H]=W,P(b(N))}s(v,"logPageViewByKey");function L(){return Math.floor(Date.now()/1e3)}s(L,"currentEpochTimeInSeconds");function q(H,N){return`team:${H}/${N}`}s(q,"buildTeamKey");function E(H,N){return`repository:${H}/${N}`}s(E,"buildRepositoryKey");function A(H,N){return`project:${H}/${N}`}s(A,"buildProjectKey");const k=/^(team|repository|project):[^/]+\/[^/]+(\/([^/]+))?$/,j="jump_to:page_views";function P(H){O(j,JSON.stringify(H))}s(P,"setPageViewsMap");function M(){const H=V(j);if(!H)return{};let N;try{N=JSON.parse(H)}catch{return P({}),{}}const K={};for(const W in N)W.match(k)&&(K[W]=N[W]);return K}s(M,"getPageViewsMap");function O(H,N){try{window.localStorage.setItem(H,N)}catch{}}s(O,"setItem");function V(H){try{return window.localStorage.getItem(H)}catch{return null}}s(V,"getItem")},11190:($,D,f)=>{"use strict";f.d(D,{I:()=>x,n:()=>_});var T=f(24216);const c=["notification_referrer_id","notifications_before","notifications_after","notifications_query"],C="notification_shelf";function _(d,m=null){return d.has("notification_referrer_id")?(u(d,m),g(d)):null}s(_,"storeAndStripShelfParams");function x(d=null){const m=h(d);if(!m)return(0,T.cl)(C),null;try{const p=(0,T.rV)(C);if(!p)return null;const b=JSON.parse(p);if(!b||!b.pathname)throw new Error("Must have a pathname");if(b.pathname!==m)throw new Error("Stored pathname does not match current pathname.");const v={};for(const L of c)v[L]=b[L];return v}catch{return(0,T.cl)(C),null}}s(x,"getStoredShelfParamsForCurrentPage");function u(d,m){const p=h(m);if(!p)return;const b={pathname:p};for(const v of c){const L=d.get(v);L&&(b[v]=L)}(0,T.LS)(C,JSON.stringify(b))}s(u,"storeShelfParams");function g(d){for(const m of c)d.delete(m);return d}s(g,"deleteShelfParams");function h(d){d=d||window.location.pathname;const m=/^(\/[^/]+\/[^/]+\/pull\/[^/]+)/,p=d.match(m);return p?p[0]:null}s(h,"getCurrentPullRequestPathname")},32904:($,D,f)=>{"use strict";f.d(D,{a:()=>T});function T(x,u){const g=x.closest("[data-notification-id]");u.hasAttribute("data-status")&&c(g,u.getAttribute("data-status")),u.hasAttribute("data-subscription-status")&&C(g,u.getAttribute("data-subscription-status")),u.hasAttribute("data-starred-status")&&_(g,u.getAttribute("data-starred-status"))}s(T,"updateNotificationStates");function c(x,u){x.classList.toggle("notification-archived",u==="archived"),x.classList.toggle("notification-unread",u==="unread"),x.classList.toggle("notification-read",u==="read")}s(c,"toggleNotificationStatus");function C(x,u){x.classList.toggle("notification-unsubscribed",u==="unsubscribed")}s(C,"toggleNotificationSubscriptionStatus");function _(x,u){x.classList.toggle("notification-starred",u==="starred")}s(_,"toggleNotificationStarredStatus")},19218:($,D,f)=>{"use strict";f.d(D,{v:()=>T});function T(c,C){C.appendChild(c.extractContents()),c.insertNode(C)}s(T,"surroundContents")},25331:($,D,f)=>{"use strict";f.d(D,{e:()=>T});function T(c){const C=c||window.location,_=document.head&&document.head.querySelector("meta[name=session-resume-id]");return _ instanceof HTMLMetaElement&&_.content||C.pathname}s(T,"getPageID")},82841:($,D,f)=>{"use strict";f.d(D,{Z:()=>m});var T=f(12737),c=f(29719),C=f(65935),_=f(5642);let x=!1;function u(p){const b=new URL(p,window.location.origin),v=new URLSearchParams(b.search.slice(1));return v.set("webauthn-support",(0,_.T)()),b.search=v.toString(),b.toString()}s(u,"urlWithParams");async function g(){const p=document.querySelector("link[rel=sudo-modal]"),b=document.querySelector(".js-sudo-prompt");if(b instanceof HTMLTemplateElement)return b;if(p){const v=await(0,c.a)(document,u(p.href));return document.body.appendChild(v),document.querySelector(".js-sudo-prompt")}else throw new Error("couldn't load sudo prompt")}s(g,"loadPromptTemplate");let h=!1;async function d(){if(x)return!1;x=!0,h=!1;const b=(await g()).content.cloneNode(!0),v=await(0,T.W)({content:b});return await new Promise(L=>{v.addEventListener("dialog:remove",function(){x=!1,L()},{once:!0})}),h}s(d,"sudoPrompt"),(0,C.AC)(".js-sudo-form",async function(p,b){try{await b.text()}catch(v){if(!v.response)throw v;let L;switch(v.response.status){case 401:L="Incorrect password.";break;case 429:L="Too many password attempts. Please wait and try again later.";break;default:L="Failed to receive a response. Please try again later."}p.querySelector(".js-sudo-error").textContent=L,p.querySelector(".js-sudo-error").hidden=!1,p.querySelector(".js-sudo-password").value="";return}h=!0,p.closest("details").removeAttribute("open")});async function m(){const p=await fetch("/sessions/in_sudo",{headers:{accept:"application/json","X-Requested-With":"XMLHttpRequest"}});return p.ok&&await p.text()==="true"?!0:d()}s(m,"triggerSudoPrompt")},40764:($,D,f)=>{"use strict";f.d(D,{Om:()=>_,lp:()=>c,rq:()=>T,t4:()=>C,yb:()=>u});function T(g){const h="\u200D",d=g.split(h);let m=0;for(const p of d)m+=Array.from(p.split(/[\ufe00-\ufe0f]/).join("")).length;return m/d.length}s(T,"getUtf8StringLength");function c(g,h,d){let m=g.value.substring(0,g.selectionEnd||0),p=g.value.substring(g.selectionEnd||0);return m=m.replace(h,d),p=p.replace(h,d),x(g,m+p,m.length),d}s(c,"replaceText");function C(g,h,d){if(g.selectionStart===null||g.selectionEnd===null)return c(g,h,d);const m=g.value.substring(0,g.selectionStart),p=g.value.substring(g.selectionEnd);return x(g,m+d+p,m.length),d}s(C,"replaceSelection");function _(g,h,d={}){const m=g.selectionEnd||0,p=g.value.substring(0,m),b=g.value.substring(m),v=g.value===""||p.match(/\n$/)?"":`
+`,L=d.appendNewline?`
+`:"",q=v+h+L;g.value=p+q+b;const E=m+q.length;return g.selectionStart=E,g.selectionEnd=E,g.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1})),g.focus(),q}s(_,"insertText");function x(g,h,d){g.value=h,g.selectionStart=d,g.selectionEnd=d,g.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1}))}s(x,"setTextareaValueAndCursor");function u(g,h){const d=[...g],m=new TextEncoder,p=new Uint8Array(4);for(let b=0;b<d.length;b++){const v=d[b],{written:L,read:q}=m.encodeInto(v,p);if(!L||!q)return-1;const E=L-q;if(E!==0&&(b<h&&(h-=E),b>=h))break}return h}s(u,"GetCharIndexFromBytePosition")},66899:($,D,f)=>{"use strict";f.d(D,{dY:()=>h,iU:()=>g,oq:()=>u});const T=new WeakMap;function c(d){const m=T.get(d);!m||(m.timer!=null&&clearTimeout(m.timer),m.timer=window.setTimeout(()=>{m.timer!=null&&(m.timer=null),m.inputed=!1,m.listener.call(null,d)},m.wait))}s(c,"schedule");function C(d){const m=d.currentTarget,p=T.get(m);!p||(p.keypressed=!0,p.timer!=null&&clearTimeout(p.timer))}s(C,"onKeydownInput");function _(d){const m=d.currentTarget,p=T.get(m);!p||(p.keypressed=!1,p.inputed&&c(m))}s(_,"onKeyupInput");function x(d){const m=d.currentTarget,p=T.get(m);!p||(p.inputed=!0,p.keypressed||c(m))}s(x,"onInputInput");function u(d,m,p={wait:null}){T.set(d,{keypressed:!1,inputed:!1,timer:void 0,listener:m,wait:p.wait!=null?p.wait:100}),d.addEventListener("keydown",C),d.addEventListener("keyup",_),d.addEventListener("input",x)}s(u,"addThrottledInputEventListener");function g(d,m){d.removeEventListener("keydown",C),d.removeEventListener("keyup",_),d.removeEventListener("input",x);const p=T.get(d);p&&(p.timer!=null&&p.listener===m&&clearTimeout(p.timer),T.delete(d))}s(g,"removeThrottledInputEventListener");function h(d){const m=T.get(d);m&&m.listener.call(null,d)}s(h,"dispatchThrottledInputEvent")},5878:($,D,f)=>{"use strict";f.d(D,{Z:()=>c});function T(C){return C.offsetWidth<=0&&C.offsetHeight<=0}s(T,"hidden");function c(C){return!T(C)}s(c,"visible")},5642:($,D,f)=>{"use strict";f.d(D,{T:()=>c,k:()=>C});var T=f(70112);function c(){return(0,T.Zh)()?"supported":"unsupported"}s(c,"webauthnSupportLevel");async function C(){var _;return await((_=window.PublicKeyCredential)==null?void 0:_.isUserVerifyingPlatformAuthenticatorAvailable())?"supported":"unsupported"}s(C,"iuvpaaSupportLevel")}},$=>{var D=s(T=>$($.s=T),"__webpack_exec__");$.O(0,["vendors-node_modules_selector-observer_dist_index_esm_js","vendors-node_modules_lit-html_lit-html_js","vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe","vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_catalyst_lib_index_-87b1b3","vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_hotkey_dist_index-9f48bd","vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-c7e9ed","vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-df2537","app_assets_modules_github_behaviors_pjax_ts","app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-af52ef","app_assets_modules_github_behaviors_details_ts-app_assets_modules_github_behaviors_include-fr-a5a4c7"],()=>D(56851));var f=$.O()}]);})();
+
+//# sourceMappingURL=behaviors-77f99b7e6910.js.map \ No newline at end of file