티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[73858],{2025:(e,t,i)=>{let o,n,s;i.d(t,{Av:()=>c,it:()=>u});var r=i(74057),a=i(46865),l=i(71315);function u(e,t=!1,i=!1){var l,m;return!i&&c(e)||function(e,t){let i=o instanceof Element?o:e&&e.ownerDocument&&e.ownerDocument.activeElement?e.ownerDocument.activeElement:null;return null!==i&&(!t||i!==e)&&(!!(i===e&&(0,a.Z8)(i)||e.contains(i)&&!function(e){if(e instanceof r.A)return!0;let t=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement,i=e.parentElement?.classList.contains(“task-list-item”);if(t&&i)return!0;if(!(s instanceof Element))return!1;let o=e.closest(d);return!!o&&o===s.closest(d)}(i))||s instanceof Element&&e.contains(s)&&!!s.closest(“details[open] > summary”))}(e,t)||(l=e).matches(“:active:enabled”)||l.contains(n)||!!((m=e).closest(“.is-dirty”)||m.querySelector(“.is-dirty”))}function c(e){for(let t of e.querySelectorAll(“input, textarea”))if((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&function(e){if(e instanceof HTMLInputElement&&(“checkbox”===e.type||”radio”===e.type)){if(e.checked!==e.defaultChecked)return!0}else if(e.value!==e.defaultValue)return!0;return!1}(t))return!0;return!1}l.XC?.addEventListener(“mousedown”,function(e){n=e.target},!0),l.XC?.addEventListener(“mouseup”,function(e){n=null,s=e.target},!0),l.XC?.addEventListener(“contextmenu”,function(e){n=null,s=e.target},!0),l.XC?.addEventListener(“dragend”,function(){n=null},!0);let d=”a[href], button”},4559:(e,t,i)=>{i.d(t,{C:()=>r,i:()=>a});var o=i(71315),n=i(69599),s=i(46493);function r(e,t){(0,n.G7)(“arianotify_comprehensive_migration”)?a(l(e),{…t,element:t?.element??e}):(0,n.G7)(“primer_live_region_element”)&&t?.element===void 0?(0,s.Cj)(e,{politeness:t?.assertive?”assertive”:”polite”}):a(l(e),t)}function a(e,t){let{assertive:i,element:r}=t??{};if((0,n.G7)(“arianotify_comprehensive_migration”))try{“ariaNotify”in Element.prototype&&r?r.ariaNotify(e):”ariaNotify”in Document.prototype&&document.ariaNotify(e)}catch(e){console.error(“Error calling ariaNotify:”,e)}else{var a,l;let t;(0,n.G7)(“primer_live_region_element”)&&void 0===r?(0,s.iP)(e,{politeness:i?”assertive”:”polite”}):(a=e,l=i,(t=r??o.XC?.querySelector(l?”#js-global-screen-reader-notice-assertive”:”#js-global-screen-reader-notice”))&&(t.textContent===a?t.textContent=`${a}\u00A0`:t.textContent=a))}}function l(e){return(e.getAttribute(“aria-label”)||e.innerText||””).trim()}},21067:(e,t,i)=>{let o;function n(){let e=(void 0)??o;if(!e)throw Error(“Client env was requested before it was loaded. This likely means you are attempting to use client env at the module level in SSR, which is not supported. Please move your client env usage into a function.”);return e}function s(){return n().locale??”en-US”}function r(){return!!n().login}function a(){return n().login}if(i.d(t,{JK:()=>s,M3:()=>r,_$:()=>n,cj:()=>a}),”undefined”!=typeof document){let e=document.getElementById(“client-env”);if(e)try{o=JSON.parse(e.textContent||””)}catch(e){console.error(“Error parsing client-env”,e)}}},28630:(e,t,i)=>{i.d(t,{L:()=>o});function o(e){let t=e||window.location,i=document.head&&document.head.querySelector(“meta[name=session-resume-id]”);return i instanceof HTMLMetaElement&&i.content||t.pathname}},33736:(e,t,i)=>{let o;var n=i(96123),s=i(21403),r=i(58371);async function a(e,t){let i=await t.html(),o=e.closest(“.js-nested-comment-container”),n=i.url.includes(“verified_answer”);o?.classList.contains(“color-bg-success”)?(n&&(o.classList.add(“color-bg-accent”),o.classList.add(“timeline-child-comment-verified-border”)),o.classList.remove(“color-bg-success”),o.classList.remove(“timeline-child-comment-answer-border”)):(n&&(o?.classList.remove(“color-bg-accent”),o?.classList.remove(“timeline-child-comment-verified-border”)),o?.classList.add(“color-bg-success”),o?.classList.add(“timeline-child-comment-answer-border”));let s=e,r=e.closest(“[data-replace-remote-form-target]”);if(r){let e=r.getAttribute(“data-replace-remote-form-target”);s=e?document.getElementById(e):r}s.replaceWith(i.html)}(0,s.lB)(“.js-discussions-goto-answer-button”,{add:e=>{try{let t=e.getAttribute(“href”),i=document.querySelector(t);i&&(0,n.Rt)(e,”click”,e=>{if(t){e.preventDefault();let t=”center”;i.getBoundingClientRect().height>=window.innerHeight&&(t=”start”),i.scrollIntoView({behavior:”smooth”,block:t});let o=i.querySelector(“.js-targetable-element”);o&&(o.tabIndex=0,o.focus({preventScroll:!0}))}},{capture:!0})}catch(e){if(e instanceof DOMException);else throw e}}}),(0,s.lB)(“.js-discussions-title-container”,{add:e=>{let t,i;e.querySelector(“.js-discussions-goto-answer-button”)?(t=document.querySelector(“.js-discussion”))&&t.classList.add(“answered”):(i=document.querySelector(“.js-discussion”))&&i.classList.remove(“answered”)}}),(0,s.lB)(“.js-discussions-trigger-unmark-answer”,{add:e=>{(0,n.Rt)(e,”click”,e=>{e.preventDefault();let t=document.querySelector(“.js-discussion-comment-unmark-answer”);t&&t.requestSubmit()})}}),(0,s.lB)(“.js-discussions-trigger-verify-answer”,{add:e=>{(0,n.Rt)(e,”click”,e=>{e.preventDefault();let t=document.querySelector(“.js-discussion-comment-verify-answer”);t&&t.requestSubmit()})}}),(0,s.lB)(“.js-discussions-trigger-unverify-answer”,{add:e=>{(0,n.Rt)(e,”click”,e=>{e.preventDefault();let t=document.querySelector(“.js-discussion-comment-unverify-answer”);t&&t.requestSubmit()})}}),(0,r.JW)(“.js-discussion-comment-mark-answer”,async function(e,t){await a(e,t)}),(0,r.JW)(“.js-discussion-comment-unmark-answer”,async function(e,t){await a(e,t)}),(0,r.JW)(“.js-discussion-comment-verify-answer”,async function(e,t){await a(e,t)}),(0,r.JW)(“.js-discussion-comment-unverify-answer”,async function(e,t){await a(e,t)});var l=i(69676),u=i(97797);window.addEventListener(“action-menu-item-toggle”,function(e){if(!(e instanceof CustomEvent))return;let t=e.detail.item,i=e.detail.action;if(!(t instanceof HTMLElement))return;let o=t.parentElement;o instanceof HTMLElement&&o.setAttribute(“data-analytics-event”,JSON.stringify(“expanded”===i?{category:”discussion_section”,action:”collapse”,label:”discussion_section_collapsed”}:{category:”discussion_section”,action:”expand”,label:”discussion_section_expanded”}))}),(0,u.on)(“click”,”.js-discussion-category-emoji-button”,function(e){if(!(e.currentTarget instanceof HTMLButtonElement))return;let t=e.currentTarget.closest(“.js-discussion-category-form”);for(let i of(t.querySelector(“.js-discussion-category-emoji-field”).value=e.currentTarget.value,t.querySelector(“.js-discussion-category-custom-emoji”).innerHTML=e.currentTarget.innerHTML,t.querySelectorAll(“.selected-emoji”)))i.classList.remove(“selected-emoji”);e.currentTarget.classList.add(“selected-emoji”),t.querySelector(“.js-discussion-category-emoji-picker”)?.hidePopover()});let c=new WeakMap;(0,u.on)(“click”,”.js-discussion-category-form button[popovertarget]”,function(e){let t=e.currentTarget.getAttribute(“popovertarget”),i=t?document.getElementById(t):null;i instanceof HTMLElement&&(i.togglePopover(),e.preventDefault())}),(0,u.on)(“toggle”,”.js-discussion-category-emoji-picker”,function(e){let{newState:t,currentTarget:i}=e;if(!(i instanceof HTMLElement))return;let o=i.querySelector(“emoji-picker”);switch(t){case”open”:c.set(i,(0,l.iE)(i)),o?.open();break;case”closed”:c.get(i)?.abort(),c.delete(i),o?.close()}},{capture:!0}),(0,u.on)(“click”,”.js-announcement-radio-button”,function(e){let t=e.currentTarget.closest(“.js-category-container”),i=t.getAttribute(“data-category-id”);if(“false”===t.getAttribute(“data-supports-announcements”)){let e=document.getElementById(`${i}-announcement-warning`);e&&e.removeAttribute(“hidden”);let t=document.getElementById(`${i}-mark-as-answer-warning`);t&&t.setAttribute(“hidden”,”true”)}}),(0,u.on)(“click”,”.js-mark-as-answer-radio-button”,function(e){let t=e.currentTarget.closest(“.js-category-container”).getAttribute(“data-category-id”),i=document.getElementById(`${t}-mark-as-answer-warning`);i&&i.setAttribute(“hidden”,”true”);let o=document.getElementById(`${t}-announcement-warning`);o&&o.setAttribute(“hidden”,”true”)}),(0,u.on)(“click”,”.js-open-ended-radio-button”,function(e){let t=e.currentTarget,i=e.currentTarget.closest(“.js-category-container”),o=i.getAttribute(“data-category-id”),n=t.value,s=”false”===i.getAttribute(“data-supports-mark-as-answer”)&&”false”===i.getAttribute(“data-supports-announcements”);if(“true”===i.getAttribute(“data-supports-mark-as-answer”)){let e=document.getElementById(`${o}-mark-as-answer-warning`);e&&”mark_as_answer”!==n&&(e.removeAttribute(“hidden”),document.getElementById(`${o}-announcement-warning`).setAttribute(“hidden”,”true”))}if(s){let e=document.getElementById(`${o}-announcement-warning`);e&&e.setAttribute(“hidden”,”true”);let t=document.getElementById(`${o}-mark-as-answer-warning`);t&&t.setAttribute(“hidden”,”true”)}}),(0,u.on)(“click”,”.js-poll-option-template-button”,function(e){let t=e.currentTarget.parentElement,i=t.querySelector(“.js-poll-option-destroy-field”),o=t.closest(“.js-discussion-poll-form-component”);i?(i.value=”true”,i.nextElementSibling?.classList.remove(“js-poll-option”),t.hidden=!0):t.remove();let n=document.querySelector(“.js-add-poll-option”);n?.hidden&&(n.hidden=!1,n.setAttribute(“aria-hidden”,”false”)),o&&(0,u.h)(o,”pollOptionRemoved”)}),(0,u.on)(“click”,”.js-add-poll-option”,function(e){let t=e.currentTarget,i=document.querySelector(“#poll-option-container”),o=+i.getAttribute(“data-poll-options-limit”),n=document.querySelector(“.js-poll-option-template”),s=”true”===i.getAttribute(“data-new-discussion”);if(i&&n){let e=n.cloneNode(!0);e.hidden=!1;let t=e.querySelector(“.js-poll-option-template-input”);if(s)t.name=”discussion[poll_attributes][options_attributes][][option]”;else{let e=i.getAttribute(“data-poll-option-next-key”);t.name=`discussion[poll_attributes][options_attributes][${e}][option]`,i.setAttribute(“data-poll-option-next-key”,`${parseInt(e)+1}`)}i.appendChild(e)}let r=i.querySelectorAll(“.js-poll-option”).length;t&&r>=o&&(t.hidden=!0,t.setAttribute(“aria-hidden”,”true”))}),(0,u.on)(“change”,”#js-discussion-title”,function(e){let t=e.currentTarget,i=document.querySelector(“#js-similar-search-link”);if(i instanceof HTMLAnchorElement&&t instanceof HTMLInputElement){let e=new URL(i.getAttribute(“data-path”),window.location.origin);e.searchParams.set(“discussions_q”,t.value),i.href=e.toString()}}),(0,u.on)(“click”,”.role-select-button”,function(e){let t=e.currentTarget,i=”true”===t.getAttribute(“data-value”),o=t.closest(‘[data-testid=”discussion-form-actions”]’)||t.closest(“.js-new-comment-form”)||t.closest(“.js-socket-channel”)||document,n=o.querySelector(‘input[name=”comment[post_as_admin]”]’)||o.querySelector(‘input[id*=”post-as-admin-input”]’);n&&(n.value=i.toString())});var d=i(31635),m=i(39595),h=i(78134);let p=class CommentActionsContainerElement extends HTMLElement{displayDialog(e){let t=e.currentTarget,i=t.getAttribute(“data-dialog-id”);this.dialogContainer.querySelector(`#${i}`)||this.createDialog(i,t),this.showDialog(i)}createDialog(e,t){let i=t.getAttribute(“data-title”),o=t.getAttribute(“data-src”),n=t.getAttribute(“data-size”),s=new h.i4(this.dialogTemplate,{title:i,dialogId:e,src:o});if(this.dialogContainer.append(s),n){let t=this.querySelector(`#${e}`);t.classList.remove(“Overlay–size-medium”),t.classList.add(`Overlay–size-${n}`)}}showDialog(e){let t=this.querySelector(`#${e}`);t&&t.showModal()}};(0,d.Cg)([m.aC],p.prototype,”dialogTemplate”,void 0),(0,d.Cg)([m.aC],p.prototype,”dialogContainer”,void 0),p=(0,d.Cg)([m.p_],p);var v=i(87363),f=i(2025);async function g(e){let t=e.closest(“.js-comment”);if(!t)return;let i=C(t);if(i){if(i.querySelector(“.js-preview-body”))return;let e=i.getAttribute(“data-permissions-url”),o=q(i).targetType;e&&o&&await y(e,o)&&(S(t),w(t))}}async function y(e,t){let i=await fetch(e,{headers:{Accept:”application/json”}});return(await i.json())[t].update}function b(e){let t=e.currentTarget.closest(“.js-comment”);S(t),w(t),function(e){let t=e.querySelector(“.js-discussions-poll-edit-placeholder”);if(t){let e=t.getAttribute(“data-poll-edit-url”);if(“”===e)return;_(“template.js-discussions-poll-edit-template”,t,{pollEditUrl:e})}}(t)}function E(e){let t=e.currentTarget.closest(“.js-comment”);if(t){let e=t.querySelector(“.js-discussion-poll-form-component”);e&&function(e,t){let i=C(e);if(“true”===i.getAttribute(“data-poll-confirmation”)!==t)if(t){let t;(t=A(e))&&_(“template.js-discussions-poll-confirmation-template”,t,{}),i.setAttribute(“data-poll-confirmation”,”true”)}else j(e,q(i)),i.setAttribute(“data-poll-confirmation”,”false”)}(t,(0,f.Av)(e))}}function w(e){let t=e.querySelector(“.js-discussions-markdown-toolbar-placeholder:last-child”);if(t){let e={textareaId:t.getAttribute(“data-textarea-id”)};_(“template.js-discussions-markdown-toolbar-template”,t,e)}}function S(e){let t=C(e);if(t){let i=q(t);_(“template.js-discussions-edit-form-template”,t,i),j(e,i)}}function j(e,t){let i=A(e);i&&_(“template.js-discussions-edit-actions-template”,i,t)}function C(e){return e.querySelector(“.js-edit-comment-form-container”)}function A(e){return e.querySelector(“.js-discussions-edit-form-actions”)}function q(e){return{bodyVersion:e.getAttribute(“data-body-version”),outerDivClasses:e.getAttribute(“data-outer-div-classes”),repositoryId:e.getAttribute(“data-repository-id”),targetBody:e.getAttribute(“data-target-body”),targetType:e.getAttribute(“data-target-type”),textareaId:e.getAttribute(“data-textarea-id”),slashCommandUrl:e.getAttribute(“data-slash-command-url”),pollEditUrl:e.getAttribute(“data-poll-edit-url”)}}function _(e,t,i){let o=document.querySelector(e);o&&(t.textContent=””,t.appendChild(new h.i4(o,i)))}(0,s.lB)(“.js-discussions-comment-edit-button”,{subscribe:e=>(0,n.Rt)(e,”click”,b,{capture:!1,once:!0})}),(0,s.lB)(“.js-task-list-container .contains-task-list”,{add:async e=>g(e)}),(0,s.lB)(“.js-discussion-poll-form-component”,{subscribe:e=>(0,n.Rt)(e,”pollOptionRemoved”,E)}),(0,v.Ff)(“keyup”,”.js-discussion-poll-form-component input”,E);var L=i(50467);function R(e){let t=e.currentTarget;if(t){let e=new T(t);setTimeout(()=>{e.render()},1)}}(0,s.lB)(“.js-optimistic-reaction-render-button”,{subscribe:e=>(0,n.Rt)(e,”click”,R,{capture:!1})});let T=class OptimisticReactionRenderer{render(){if(!this.isReactionAlreadyRendered)return this.addNewReactionGroup();this.isAddingReaction?this.addReactionToGroup():this.removeReactionFromGroup()}addReactionToGroup(){this.existingReactionGroupCountContainer&&this.existingReactionGroup&&(this.existingReactionGroup.removeAttribute(“hidden”),this.existingReactionGroup.classList.add(“user-has-reacted”),this.existingReactionGroupCountContainer.textContent=`${this.existingReactionGroupCount+1}`,this.addReactionToPopoverReactionButtons())}focusOnAdjacentReaction(){let e,t,i=e=>{let t=parseInt(e.getAttribute(“data-button-index-position”)||””);return isNaN(t)?null:t};if(!this.existingReactionGroup)return;let o=i(this.existingReactionGroup);if(o){for(let n of this.reactionGroupsContainer.querySelectorAll(“button”).values()){let s=i(n);if(!s)return;if(so){t=n;break}}t?t.focus():e&&e.focus()}}removeReactionFromGroup(){1===this.existingReactionGroupCount&&(this.existingReactionGroup.setAttribute(“hidden”,””),this.focusOnAdjacentReaction()),this.existingReactionGroupCountContainer.textContent=`${this.existingReactionGroupCount-1}`,this.existingReactionGroup?.classList.remove(“user-has-reacted”),this.removeReactionFromPopoverReactionButtons()}addNewReactionGroup(){let e=this.newEmojiButtonFromTemplate();this.newEmojiButtonTemplateContainer&&e&&this.commentReactionsContainer&&(this.nextButtonGroup?this.reactionGroupsContainer.insertBefore(e,this.nextButtonGroup):this.reactionGroupsContainer.append(e),e.classList.add(this.tooltipPositionClass),this.addReactionToPopoverReactionButtons(),e.focus(),this.commentReactionsContainer.classList.contains(“d-md-none”)&&this.commentReactionsContainer.classList.add(“has-reactions”))}newEmojiButtonFromTemplate(){if(this.newEmojiButtonTemplateContainer){let e=this.newEmojiButtonTemplateContainer.content.querySelector(“.js-reaction-group-button”);if(e)return e.cloneNode(!0)}}get nextButtonGroup(){if(void 0!==this.newEmojiButtonFromTemplatePosition&&null!==this.newEmojiButtonFromTemplatePosition){for(let e of this.reactionGroupsContainer.children)if(Number(e.getAttribute(“data-button-index-position”))>this.newEmojiButtonFromTemplatePosition)return e}}get commentContainer(){return this.clickedReactionButton.closest(“.js-comment”)}get buttonsContainer(){return this.commentContainer.querySelector(“.js-reaction-buttons-container”)}get reactionContent(){return this.clickedReactionButton.getAttribute(“data-reaction-content”)}get reactionGroup(){return this.buttonsContainer.querySelector(`.js-comment-reactions-options g-emoji[alias=’${this.reactionContent}’`)}get existingReactionGroup(){if(this.reactionGroup)return this.reactionGroup.closest(“.js-reaction-group-button”)}get existingReactionGroupCountContainer(){if(this.existingReactionGroup)return this.existingReactionGroup.querySelector(“.js-discussion-reaction-group-count”)}get newEmojiButtonTemplateContainer(){return document.getElementById(`emoji-reaction-button-template-${this.reactionContent}`)}get commentReactionsContainer(){return this.buttonsContainer.closest(“.js-reaction-buttons-container”)}get reactionGroupsContainer(){return this.buttonsContainer.querySelector(“.js-comment-reactions-options”)}get isReactionAlreadyRendered(){return!!this.reactionGroup}get isAddingReaction(){if(this.existingReactionGroup)return!this.existingReactionGroup.classList.contains(“user-has-reacted”)}get existingReactionGroupCount(){return this.existingReactionGroupCountContainer?Number(this.existingReactionGroupCountContainer.innerHTML):0}get newEmojiButtonFromTemplatePosition(){let e=this.newEmojiButtonFromTemplate();if(e)return Number(e.getAttribute(“data-button-index-position”))}get tooltipPositionClass(){return this.buttonsContainer.querySelectorAll(“button”).length>1?”tooltipped-s”:”tooltipped-se”}addReactionToPopoverReactionButtons(){for(let e of this.commentContainer.querySelectorAll(“.js-add-reaction-popover”)){let t=e.querySelector(`button[data-reaction-content=”${this.reactionContent}”]`);t.classList.add(“user-has-reacted”),t.value.match(/unreact/)||(t.value=t.value.replace(/react/,”unreact”)),t.setAttribute(“aria-checked”,”true”)}}removeReactionFromPopoverReactionButtons(){for(let e of this.commentContainer.querySelectorAll(“.js-add-reaction-popover”)){let t=e.querySelector(`button[data-reaction-content=”${this.reactionContent}”]`);t.classList.remove(“user-has-reacted”),t.value.match(/unreact/)&&(t.value=t.value.replace(/unreact/,”react”)),t.setAttribute(“aria-checked”,”false”)}}constructor(e){(0,L._)(this,”clickedReactionButton”,void 0),this.clickedReactionButton=e}};var k=i(56971),x=i(49878);function B(e,t){let i=e.closest(“.js-timeline-discussion-comment”),o=i.querySelector(“.js-discussions-previewable-comment-form-container”);if(!o)return;let n=o.getAttribute(“data-parent-comment-id”),s=o.getAttribute(“data-anchor-id”),r=o.getAttribute(“data-back-page”),a=document.querySelector(“template.js-new-comment-template”);n&&a&&!o.querySelector(“.js-discussion-comment-form”)&&(o.textContent=””,o.appendChild(new h.i4(a,{id:n,anchorId:s,backPage:r}))),t.willFocus&&(0,k.H)(i)}(0,s.lB)(“.js-inline-comment-form-container”,{add:e=>{var t;let i;(i=(t=e).closest(“.discussion-timeline-item.js-comment-container”))&&”true”===i.getAttribute(“data-open-edit-form-after-load”)&&(i.setAttribute(“data-open-edit-form-after-load”,”false”),B(t,{willFocus:!0}))}}),(0,u.on)(“click”,”.js-discussions-previewable-comment-form”,function({currentTarget:e}){B(e,{willFocus:!0}),(0,x.Q)()}),(0,u.on)(“quote-selection”,”.js-discussion-quote-selection”,function(e){let t=e.detail,i=t.closest(“.js-timeline-discussion-comment”);if(!i)return;let o=t.range;B(i,{willFocus:!0}),t.range=o}),(0,r.JW)(“.js-discussions-previewable-comment-form-container .js-discussion-comment-form”,async function(e,t){await t.text(),(0,k.i)(e);let i=e.closest(“.js-discussions-previewable-comment-form-container”);i.querySelector(“.js-comment-form-error”)?.classList.add(“d-none”)});var F=i(5225),I=i(91385),P=i(73855);async function N(e){let t=await fetch(e,{headers:{Accept:”application/json”}});return t.ok?await t.json():void 0}let D=new Map,M=(0,F.A)(N,{cache:D}),O=”query-builder-discussions-search-combobox”;function $(){return document.querySelector(`query-builder#${O}`)}async function G(){return M($().getAttribute(“data-suggestable-authors-path”))}async function U(){return JSON.parse($().getAttribute(“data-suggestable-categories”))}async function H(){return M($().getAttribute(“data-suggestable-labels-path”))}let V=async()=>await G(),Q=async()=>await U(),X=async()=>await H(),z=[“open”,”closed”,”answered”,”unanswered”,”locked”,”unlocked”],J=document.querySelector(“#discussions-search-combobox-form”)?.getAttribute(“action”)||””,W=(e,t)=>e.filter(e=>{if(t&&(0,I.qA)(t,e)||””===t)return e}),Y=class SearchItemProvider extends EventTarget{handleEvent(e){“”!==String(e)&&this.dispatchEvent(new P.CN({priority:1,value:e.toString(),icon:P.m4.Search,scope:”GENERAL”,action:{url:`${J}?discussions_q=${e.toString()}`}}))}constructor(e){super(),(0,L._)(this,”priority”,1),(0,L._)(this,”name”,”Search”),(0,L._)(this,”singularItemName”,”search item”),(0,L._)(this,”value”,”search”),(0,L._)(this,”type”,”search”),(0,L._)(this,”queryBuilder”,void 0),this.queryBuilder=e,this.queryBuilder.addEventListener(“query”,this),this.queryBuilder.attachProvider(this)}},K=class AuthorProvider extends EventTarget{async handleEvent(e){let t=e.parsedQuery.at(-1),i=t?.value||””,o=t?.type,n=t?.filter||””;if(“filter”!==o&&((0,I.qA)(i,this.value)||””===i)&&this.dispatchEvent(new Event(“show”)),”filter”===o&&n===this.value)for(let e of W((await V()).map(e=>e.value),i).slice(0,5))this.dispatchEvent(new P.qi({filter:”author”,value:e}))}constructor(e){super(),(0,L._)(this,”name”,”Authors”),(0,L._)(this,”singularItemName”,”author”),(0,L._)(this,”value”,”author”),(0,L._)(this,”priority”,2),(0,L._)(this,”type”,”filter”),(0,L._)(this,”queryBuilder”,void 0),this.queryBuilder=e,this.queryBuilder.addEventListener(“query”,this),this.queryBuilder.attachProvider(this)}},Z=class CategoryProvider extends EventTarget{async handleEvent(e){let t=e.parsedQuery.at(-1),i=t?.value||””,o=t?.type,n=t?.filter||””;if(“filter”!==o&&((0,I.qA)(i,this.value)||””===i)&&this.dispatchEvent(new Event(“show”)),”filter”===o&&n===this.value)for(let e of W((await Q()).map(e=>e.value?.replace(/”/g,””)),i))this.dispatchEvent(new P.qi({filter:”category”,value:e}))}constructor(e){super(),(0,L._)(this,”name”,”Categories”),(0,L._)(this,”singularItemName”,”category”),(0,L._)(this,”value”,”category”),(0,L._)(this,”priority”,3),(0,L._)(this,”type”,”filter”),(0,L._)(this,”queryBuilder”,void 0),this.queryBuilder=e,this.queryBuilder.addEventListener(“query”,this),this.queryBuilder.attachProvider(this)}},ee=class StateProvider extends EventTarget{handleEvent(e){let t=e.parsedQuery.at(-1),i=t?.value||””,o=t?.type,n=t?.filter||””,s=W(z,i);if(“filter”!==o&&((0,I.qA)(i,this.value)||””===i)&&this.dispatchEvent(new Event(“show”)),”filter”===o&&n===this.value)for(let e of s)this.dispatchEvent(new P.qi({filter:”is”,value:e}))}constructor(e){super(),(0,L._)(this,”name”,”States”),(0,L._)(this,”singularItemName”,”state”),(0,L._)(this,”value”,”is”),(0,L._)(this,”priority”,4),(0,L._)(this,”type”,”filter”),(0,L._)(this,”queryBuilder”,void 0),this.queryBuilder=e,this.queryBuilder.addEventListener(“query”,this),this.queryBuilder.attachProvider(this)}},et=class LabelProvider extends EventTarget{async handleEvent(e){let t=e.parsedQuery.at(-1),i=t?.value||””,o=t?.type,n=t?.filter||””;if(“filter”!==o&&((0,I.qA)(i,this.value)||””===i)&&this.dispatchEvent(new Event(“show”)),”filter”!==o||n!==this.value)return;let s=(await X()).map(e=>e.value);for(let e of(0===s.length&&(s=this.defaultLabels),W(s,i)))this.dispatchEvent(new P.qi({filter:”label”,value:e}))}constructor(e){super(),(0,L._)(this,”name”,”Labels”),(0,L._)(this,”singularItemName”,”label”),(0,L._)(this,”value”,”label”),(0,L._)(this,”priority”,5),(0,L._)(this,”type”,”filter”),(0,L._)(this,”defaultLabels”,[“bug”,”documentation”,”duplicate”,”enhancement”,”good first issue”,”help wanted”,”invalid”,”question”,”wontfix”]),(0,L._)(this,”queryBuilder”,void 0),this.queryBuilder=e,this.queryBuilder.addEventListener(“query”,this),this.queryBuilder.attachProvider(this)}};document.addEventListener(“query-builder:request-provider”,e=>{let t=e.target;t&&t.id===O&&(new Y(e.target),new K(e.target),new Z(e.target),new ee(e.target),new et(e.target))});var ei=i(45713);(0,s.lB)(“.js-confetti-party”,()=>{(0,ei.A)()});let eo=class DiscussionSpotlightPreviewElement extends HTMLElement{updatePreview(e){let t=e.currentTarget.getAttribute(“style”);this.spotlightElement.setAttribute(“style”,t)}};(0,d.Cg)([m.aC],eo.prototype,”spotlightElement”,void 0),eo=(0,d.Cg)([m.p_],eo),(0,r.JW)(“.js-spotlight-notice-dismiss”,async function(e,t){await t.text(),e.closest(“.js-notice”).remove(),document.querySelector(“.js-discussions-categories”)&&document.querySelector(“.js-discussions-categories”).classList.remove(“v-hidden”)}),(0,u.on)(“click”,”.js-discussion-comment-thread-expand-button”,function({currentTarget:e}){var t;let i,o=e.closest(“.discussion-timeline-item.js-comment-container”);o&&(i=(t=o).querySelector(“.js-inline-comment-form-container”))&&i.classList.contains(“open”)&&t.setAttribute(“data-open-edit-form-after-load”,”true”)}),(0,s.lB)(“.js-remove-error-state-on-click > details”,{add:e=>(function(e){let t=document.getElementById(“discussion_category_id”)?.getAttribute(“value”);if(!t)return;let i=e.querySelector(`.discussion-category-${t}`);i&&i.click()})(e)}),i(41163);var en=i(69759);let es=async(e,t,i,o)=>{let n=new FormData;for(let e of(n.append(“question”,i),o))n.append(“options[]”,e);return await fetch(e,{body:n,method:”POST”,mode:”same-origin”,headers:{“Scoped-CSRF-Token”:t}})},er=class PollFormElement{hide(){this.pollForm.hidden=!0,this.pollForm?.setAttribute(“aria-hidden”,”true”)}show(){this.pollForm.hidden=!1,this.pollForm?.setAttribute(“aria-hidden”,”false”)}getCsrfInputValue(){let e=this.pollForm.querySelector(“.js-poll-preview-url-post-csrf”);return e?e.value:””}getOptions(){let e=[],t=this.pollForm.querySelector(“#poll-option-container”);if(!t)return e;for(let i of t.querySelectorAll(“.js-poll-option”))i.value&&e.push(i.value);return e}getQuestion(){let e=this.pollForm.querySelector(“.js-poll-form-input-question”);return e?e.value:””}constructor(e){(0,L._)(this,”pollForm”,void 0),(0,L._)(this,”pollPreviewUrl”,void 0),this.pollForm=e,this.pollPreviewUrl=this.pollForm.getAttribute(“data-poll-preview-url”)||””}},ea=class Poll{hidePollForm(){this.pollFormElement.hide()}showPollForm(){this.pollFormElement.show()}async getPreview(){let e=this.pollFormElement.getQuestion(),t=this.pollFormElement.getOptions();if(e&&t.length>0){let i=await es(this.pollFormElement.pollPreviewUrl,this.pollFormElement.getCsrfInputValue(),e,t);return await i.text()}return””}constructor(e){(0,L._)(this,”pollFormElement”,void 0),this.pollFormElement=e}};(0,s.lB)(“.js-discussion-poll-form-component”,e=>{o=new ea(new er(e))}),(0,u.on)(“preview:rendered”,”.js-previewable-comment-form”,async function(e){if(!o)return;let t=e.currentTarget.querySelector(“.comment-body”),i=await o.getPreview();t.append((0,en.B)(document,i)),o.hidePollForm()}),(0,u.on)(“poll-preview:toggle:off”,”.js-discussion-poll-form-component”,async function(){o&&o.showPollForm()});let el=async(e,t,i)=>{let o=new FormData;return o.append(“option_id”,i),await fetch(e,{body:o,method:”POST”,mode:”same-origin”,headers:{“Scoped-CSRF-Token”:t}})},eu=class PollOptionsElement{checkedValue(){let e=this.optionsElement?.querySelector(“.js-discussion-poll-option:checked”);return e?.value}hide(){this.optionsElement&&(this.optionsElement.hidden=!0),this.optionsElement?.setAttribute(“aria-hidden”,”true”)}show(){this.optionsElement&&(this.optionsElement.hidden=!1),this.optionsElement?.setAttribute(“aria-hidden”,”false”)}constructor(e){(0,L._)(this,”optionsElement”,void 0),this.optionsElement=e}},ec=class PollResultsElement{hide(){this.resultsElement&&(this.resultsElement.hidden=!0),this.resultsElement?.setAttribute(“aria-hidden”,”true”)}show(){this.resultsElement&&(this.resultsElement.hidden=!1),this.resultsElement?.setAttribute(“aria-hidden”,”false”)}constructor(e){(0,L._)(this,”resultsElement”,void 0),this.resultsElement=e}},ed=class PollFormElement{getCsrfInputValue(){let e=this.pollForm.querySelector(“.js-data-url-post-csrf”);return e?e.value:””}hideResults(){this.resultsElement.hide(),this.optionsElement.show(),this.hideResultsButton&&(this.hideResultsButton.hidden=!0),this.hideResultsButton?.setAttribute(“aria-hidden”,”true”),this.showResultsButton&&(this.showResultsButton.hidden=!1),this.showResultsButton?.setAttribute(“aria-hidden”,”false”),”true”===this.pollLocked?this.voteButton?.setAttribute(“aria-disabled”,”true”):this.voteButton?.setAttribute(“aria-disabled”,”false”),this.pollQuestion&&(this.pollQuestion.textContent&&(this.pollQuestion.textContent=this.pollQuestion.textContent.replace(“Results: “,””)),this.pollQuestion.focus())}showResults(){this.resultsElement.show(),this.optionsElement.hide(),this.hideResultsButton&&(this.hideResultsButton.hidden=!1),this.hideResultsButton?.setAttribute(“aria-hidden”,”false”),this.showResultsButton&&(this.showResultsButton.hidden=!0),this.showResultsButton?.setAttribute(“aria-hidden”,”true”),this.voteButton?.setAttribute(“aria-disabled”,”true”),this.pollQuestion&&(this.pollQuestion.textContent=`Results: ${this.pollQuestion.textContent}`,this.pollQuestion.focus())}constructor(e){(0,L._)(this,”pollForm”,void 0),(0,L._)(this,”resultsElement”,void 0),(0,L._)(this,”optionsElement”,void 0),(0,L._)(this,”showResultsButton”,void 0),(0,L._)(this,”hideResultsButton”,void 0),(0,L._)(this,”voteButton”,void 0),(0,L._)(this,”voteUrl”,void 0),(0,L._)(this,”pollUrl”,void 0),(0,L._)(this,”pollLocked”,void 0),(0,L._)(this,”pollQuestion”,void 0),this.pollForm=e,this.resultsElement=new ec(e.querySelector(“.js-discussion-poll-results”)),this.optionsElement=new eu(e.querySelector(“.js-discussion-poll-options”)),this.hideResultsButton=e.querySelector(“.js-poll-hide-results”),this.showResultsButton=e.querySelector(“.js-poll-show-results”),this.voteButton=e.querySelector(“.js-discussion-poll-vote-button”),this.voteUrl=this.pollForm.getAttribute(“data-vote-url”)||””,this.pollUrl=this.pollForm.getAttribute(“data-poll-url”)||””,this.pollLocked=this.pollForm.getAttribute(“data-poll-locked”)||””,this.pollQuestion=this.pollForm.querySelector(“#poll-question”)}},em=class Poll{bindHideResultsClick(e){e?.addEventListener(“click”,async()=>{this.hideResults()})}bindShowResultsClick(e){e?.addEventListener(“click”,async()=>{this.showResults()})}bindVoteClick(e){e?.addEventListener(“click”,async()=>{this.vote()})}async vote(){let e=this.pollFormElement.optionsElement.checkedValue();if(e&&(await el(this.pollFormElement.voteUrl,this.pollFormElement.getCsrfInputValue(),e)).ok)try{let e=await fetch(this.pollFormElement.pollUrl,{headers:{Accept:”text/html”}}),t=await e.text();this.pollFormElement.pollForm.replaceWith((0,en.B)(document,t));let i=document.querySelector(“#poll-question”);i&&(i.textContent=`Results: ${i.textContent}`,i.focus())}catch{return}}hideResults(){this.pollFormElement.hideResults()}showResults(){this.pollFormElement.showResults()}constructor(e){(0,L._)(this,”pollFormElement”,void 0),this.pollFormElement=e,this.bindHideResultsClick(e.hideResultsButton),this.bindShowResultsClick(e.showResultsButton),this.bindVoteClick(e.voteButton)}};(0,s.lB)(“.js-discussion-poll-component”,e=>{new em(new ed(e))});var eh=i(34095);let ep=new IntersectionObserver(function(e){for(let t of e)t.isIntersecting&&(t.target.hidden=!0)},{root:null,rootMargin:”0px”,threshold:.1});(0,s.lB)(“.js-whats-new”,e=>ep.observe(e)),(0,u.on)(“click”,”.js-whats-new-state”,e=>{(e.target?.parentNode).scrollIntoView({behavior:”smooth”,block:”start”})});let ev=()=>{let e=document.querySelector(“.js-whats-new-state”);e&&(e.hidden=!1)};function ef(e){if(!e||”undefined”===e)return null;let t=Number(e);if(Number.isFinite(t))return new Date(t);if(/^\d{4}-\d{2}-\d{2}$/.test(e)){let t=e.split(“-“).map(Number);if(3===t.length&&t.every(e=>!Number.isNaN(e)))return new Date(t[0],t[1]-1,t[2])}let i=Date.parse(e);return Number.isNaN(i)?null:new Date(i)}function eg(e,t){return”pm”===t&&e<12?e+12:"am"===t&&12===e?0:e}function ey({date:e,hour:t,minute:i,ampm:o,now:n}){if(!e)return{ok:!1,message:"Please pick a date."};if(!t||!i||Number.isNaN(Number(t))||Number.isNaN(Number(i)))return{ok:!1,message:"Please choose both hour and minute."};let s=eg(Number(t),o),r=new Date(e);return(r.setHours(s,Number(i),0,0),r<=n)?{ok:!1,message:"Scheduled time must be in the future."}:{ok:!0,message:""}}document.addEventListener("turbo:load",ev),async function(){await eh.G,setTimeout(ev,1e3)}();let eb=e=>!!e&&e.trim().length>0;function eE(e){if(!e)return!1;let t=e.trim().toLowerCase();return!t.includes(“not set”)&&/^(gmt|utc|[+-]\d{1,2}:?\d{2}|[a-z]+\/[a-z_]+)/i.test(t)}(0,s.lB)(“#schedule-discussion-dialog”,{constructor:HTMLElement,add(e){let t,i=()=>{e.hasAttribute(“open”)?t=function(e){let t,i,o=e.querySelector(‘input.js-discussion-due-date[type=”date”]’);e.querySelector(‘input.js-discussion-timestamp[type=”hidden”]’);let n=e.querySelector(“#js-hour”),s=e.querySelector(“#js-minute”),r=e.querySelector(“#js-ampm”),a=e.querySelector(“.js-schedule-summary”),l=e.querySelector(“#js-schedule-btn”),u=e.closest(“form”).querySelector(“#js-discussion-title”),c=e.closest(“form”).querySelector(“#js-discussion-body”),d=e.querySelector(“.js-timezone-label”),m=d?.textContent?.trim()||””;if(eE(m))t=m,i=m;else{let e=function(){let e,t=2===(e=`; ${document.cookie}`.split(“; tz=”)).length&&e.pop()?.split(“;”).shift()||null;if(t)try{return decodeURIComponent(t)}catch{}try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e)return e}catch{}let i=-new Date().getTimezoneOffset()/60,o=Math.abs(i);return`GMT${i>=0?”+”:”-“}${o}`}();t=e.includes(“/”)?e.split(“/”).pop()?.replace(/_/g,” “)||e:(e.startsWith(“GMT”)||/^[+-]\d{1,2}:?\d{0,2}$/.test(e),e),i=e,d&&(d.textContent=t)}let h=()=>{var o;(()=>{let i=e.querySelector(‘input.js-discussion-due-date[type=”date”]’),o=e.querySelector(‘input.js-discussion-timestamp[type=”hidden”]’),l=ef(i?.value||””),u=n.value,c=s.value,d=r.value;if(l&&u&&c){let e=eg(Number(u),d),t=Number(c);(l.setHours(e,t,0,0),o)&&(o.value=new Date(l.getTime()-6e4*l.getTimezoneOffset()).toISOString().slice(0,19))}else o&&(o.value=””);a.textContent=function({date:e,hour:t,minute:i,ampm:o,tzLabel:n}){let s=e?e.toLocaleDateString(void 0,{year:”numeric”,month:”short”,day:”numeric”}):”\u2014″,r=t&&i?` ${o.toUpperCase()}`:””;return`${s}, ${t||”\u2014″}:${i||”\u2014″}${r} ${n||”\u2014″}`}({date:l,hour:u,minute:c,ampm:d,tzLabel:t})})();let d=e.querySelector(‘input.js-discussion-due-date[type=”date”]’),{ok:m}=ey({date:ef(d?.value||””),hour:n.value,minute:s.value,ampm:r.value,now:new Date});l.disabled=!(eb((o={title:u.value,body:c.value,scheduleOk:m,tzSet:eE(i)}).title)&&eb(o.body)&&o.scheduleOk&&o.tzSet),l.disabled?l.setAttribute(“aria-disabled”,”true”):l.removeAttribute(“aria-disabled”)},p=[n,s,r];for(let e of p)e.addEventListener(“change”,h);return u.addEventListener(“input”,h),c.addEventListener(“input”,h),o&&(o.addEventListener(“change”,h),o.addEventListener(“input”,h)),l.addEventListener(“click”,t=>{if(!eE(i))return void t.preventDefault();let o=e.querySelector(‘input.js-discussion-due-date[type=”date”]’),{ok:a}=ey({date:ef(o?.value||””),hour:n.value,minute:s.value,ampm:r.value,now:new Date});a||t.preventDefault()}),h(),()=>{for(let e of p)e.removeEventListener(“change”,h);u.removeEventListener(“input”,h),c.removeEventListener(“input”,h),o&&(o.removeEventListener(“change”,h),o.removeEventListener(“input”,h))}}(e):(t?.(),t=void 0)};e.addEventListener(“toggle”,i),e.hasAttribute(“open”)&&i()}}),i(20096)},34095:(e,t,i)=>{i.d(t,{G:()=>n,K:()=>s});var o=i(71315);let n=o.XC?.readyState===”interactive”||o.XC?.readyState===”complete”?Promise.resolve():new Promise(e=>{o.XC?.addEventListener(“DOMContentLoaded”,()=>{e()})}),s=o.XC?.readyState===”complete”?Promise.resolve():new Promise(e=>{o.cg?.addEventListener(“load”,e)})},41163:(e,t,i)=>{var o=i(50467),n=i(4559),s=i(21403);let r=async(e,t,i,o)=>{let n=new FormData;return!0===o&&n.append(“upvote”,”true”),await fetch(e,{body:”delete”===i?””:n,method:i,mode:”same-origin”,headers:{“Scoped-CSRF-Token”:t}})},a=class VoteCountElement{getLabel(){return this.voteCountElement?.getAttribute(“data-upvote-label”)||””}getText(){return this.voteCountElement?.textContent||””}constructor(e){(0,o._)(this,”voteCountElement”,void 0),this.voteCountElement=e}},l=class VoteFormElement{isUpvoted(){return”true”===this.voteForm.getAttribute(“data-upvoted”)}getCsrfDeleteInputValue(){let e=this.voteForm.querySelector(“.js-data-url-delete-csrf”);return e?e.value:””}getCsrfPutInputValue(){let e=this.voteForm.querySelector(“.js-data-url-put-csrf”);return e?e.value:””}simulateUpvote(){this.voteForm.setAttribute(“data-upvoted”,”true”),this.voteForm.getAttribute(“data-new-upvote”)&&(this.voteForm.querySelector(“.js-upvote-button”)?.classList.add(“user-has-reacted”,”color-bg-accent”),this.voteForm.querySelector(“.js-upvote-button”)?.classList.remove(“color-fg-muted”)),this.voteForm.classList.add(“is-upvoted”),this.voteButton?.setAttribute(“aria-label”,this.upvotedCountElement.getLabel()),this.voteButton?.setAttribute(“aria-pressed”,”true”),(0,n.i)(`${this.upvotedCountElement.getText()} Upvotes`)}simulateUpvoteDeletion(){this.voteForm.setAttribute(“data-upvoted”,”false”),this.voteForm.getAttribute(“data-new-upvote”)&&(this.voteForm.querySelector(“.js-upvote-button”)?.classList.remove(“user-has-reacted”,”color-bg-accent”),this.voteForm.querySelector(“.js-upvote-button”)?.classList.add(“color-fg-muted”)),this.voteForm.classList.remove(“is-upvoted”),this.voteButton?.setAttribute(“aria-label”,this.defaultVoteCountElement.getLabel()),this.voteButton?.setAttribute(“aria-pressed”,”false”),(0,n.i)(`${this.defaultVoteCountElement.getText()} Upvotes`)}displayUpVoteError(e){let t=this.voteForm.querySelector(“.js-upvote-error”);t instanceof HTMLElement&&(t.textContent=e,t.hidden=!1)}hideVoteErrors(){let e=this.voteForm.querySelector(“.js-upvote-error”);e instanceof HTMLElement&&(e.hidden=!0)}constructor(e){(0,o._)(this,”voteForm”,void 0),(0,o._)(this,”voteButton”,void 0),(0,o._)(this,”defaultVoteCountElement”,void 0),(0,o._)(this,”upvotedCountElement”,void 0),(0,o._)(this,”url”,void 0),this.voteForm=e,this.voteButton=this.voteForm.querySelector(“.js-upvote-button”),this.defaultVoteCountElement=new a(e.querySelector(“.js-default-vote-count”)),this.upvotedCountElement=new a(e.querySelector(“.js-upvoted-vote-count”)),this.url=this.voteForm.getAttribute(“data-url”)||””}},u=class Upvote{animateUpvote(e){e?this.voteFormElement.simulateUpvoteDeletion():this.voteFormElement.simulateUpvote()}animateUpvoteUndo(e){e?this.voteFormElement.simulateUpvote():this.voteFormElement.simulateUpvoteDeletion()}async click(){this.voteFormElement.hideVoteErrors();let e=this.voteFormElement.isUpvoted(),t=e?this.voteFormElement.getCsrfDeleteInputValue():this.voteFormElement.getCsrfPutInputValue();this.animateUpvote(e);let i=await r(this.voteFormElement.url,t,e?”delete”:”put”,!e);if(!i.ok&&422===i.status){let t=await i.json();this.voteFormElement.displayUpVoteError(t.error),this.animateUpvoteUndo(e)}}constructor(e){(0,o._)(this,”voteFormElement”,void 0),this.voteFormElement=e}};(0,s.lB)(“.js-upvote-button”,e=>{if(!(e instanceof HTMLElement)||!(e.closest(“.discussion-vote-form”)instanceof HTMLElement))return;let t=new u(new l(e.closest(“.discussion-vote-form”)));e.addEventListener(“click”,async()=>{await t.click()})})},45713:(e,t,i)=>{let o,n;i.d(t,{A:()=>v});var s=i(50467);let r=Math.random,a=Math.cos,l=Math.sin,u=Math.PI,c=2*u,d=[],m=[“#6a737d”,”#0366d6″,”#28a745″,”#ffd33d”,”#f66a0a”,”#6f42c1″,”#ea4aaa”];function h(){let e=Math.floor(Math.random()*m.length);return m[e]??”#6a737d”}let p=class Confetto{initializeDOM(){this.outer=document.createElement(“div”),this.inner=document.createElement(“div”),this.outer.appendChild(this.inner),this.x=window.innerWidth*r(),this.y=-100,this.outer.style.position=”absolute”,this.outer.style.width=`${3+9*r()}px`,this.outer.style.height=`${3+9*r()}px`,this.outer.style.perspective=”50px”,this.outer.style.transform=`rotate(${360*r()}deg)`,this.outer.style.left=`${this.x}px`,this.outer.style.top=`${this.y}px`,this.inner.style.width=”100%”,this.inner.style.height=”100%”,this.inner.style.backgroundColor=this.themeFunc(),this.inner.style.transform=`${this.axis}${this.theta}deg)`}update(e,t){var i,o;this.frame+=t,this.x+=this.dx*t,this.y+=this.dy*t,this.theta+=this.dTheta*t;let n=this.frame%7777/7777,s=0,r=1;for(;r=(this.splineX[r]??0);)s=r++;let d=(i=this.splineY[s]||0,o=this.splineY[r]||0,(1-a(u*((n-(this.splineX[s]||0))/((this.splineX[r]||0)-(this.splineX[s]||0)))))/2*(o-i)+i);return n*=c,this.inner.style.transform=`${this.axis}${this.theta}deg)`,this.outer.style.left=`${this.x+d*a(n)}px`,this.outer.style.top=`${this.y+d*l(n)}px`,this.y>e+100}constructor(e){(0,s._)(this,”y”,void 0),(0,s._)(this,”x”,void 0),(0,s._)(this,”theta”,void 0),(0,s._)(this,”axis”,void 0),(0,s._)(this,”splineX”,void 0),(0,s._)(this,”splineY”,void 0),(0,s._)(this,”frame”,void 0),(0,s._)(this,”dTheta”,void 0),(0,s._)(this,”dx”,void 0),(0,s._)(this,”dy”,void 0),(0,s._)(this,”inner”,void 0),(0,s._)(this,”outer”,void 0),(0,s._)(this,”themeFunc”,void 0),this.frame=0,this.themeFunc=e,this.theta=360*r(),this.axis=`rotate3D(${a(360*r())},${a(360*r())},0,`,this.dTheta=.4+.29999999999999993*r(),this.dx=l(-.1+.2*r()),this.dy=.13+.18*r(),this.splineX=function(){let e=[.1,.9],t=.8,i=[0,1];for(;t;){let o,n,s,a,l,u=t*r();for(o=0,n=e.length,t=0;o0;o-=2)a=e[n=o-1],l=e[o],a>=c&&ad?e[n]=d:e.splice(n,2):ac&&(l<=d?e[o]=c:e.splice(o,0,c,d));for(o=0,n=e.length,t=0;o{let e=new p(h);d.push(e),t.appendChild(e.outer),o=window.setTimeout(s,40*r())};s();let a=e=>{let s=i?e-i:0;i=e;let r=window.innerHeight;for(let e=d.length-1;e>=0;–e){let i=d[e];i&&i.update(r,s)&&(t.removeChild(i.outer),d.splice(e,1))}if(o||d.length){n=requestAnimationFrame(a);return}document.body.removeChild(t),n=void 0};window.setTimeout(function(){clearTimeout(o),o=void 0},null==e?5e3:e),requestAnimationFrame(a)}}},49878:(e,t,i)=>{i.d(t,{Q:()=>c});var o=i(55150),n=i(70170),s=i(28630),r=i(21403),a=i(82075),l=i(82591);let u=(0,a.A)(“localStorage”,{ttl:3e5,throwQuotaErrorsOnSet:!1,sendCacheStats:!0}),c=()=>{(0,o.o)((0,s.L)()),(0,o.o)((0,s.L)(),{storage:u})},d=()=>{(0,o.YV)((0,s.L)(),{selector:”.js-session-resumable”}),(0,o.YV)((0,s.L)(),{selector:”.js-local-storage-resumable”,storage:u})},m=(0,n.s)(function(){c()},50);window.addEventListener(“submit”,o.Bu,{capture:!0}),window.addEventListener(“pageshow”,function(){c()}),(0,r.lB)(“.js-session-resumable”,function(){document.querySelector(“html”)?.hasAttribute(“data-turbo-preview”)||m()}),window.addEventListener(“pagehide”,function(){d()}),document.addEventListener(l.z.START,function(){d()}),document.addEventListener(l.z.END,function(){c()})},56971:(e,t,i)=>{i.d(t,{H:()=>r,i:()=>a});var o=i(97797),n=i(2025),s=i(87363);function r(e){let t=e.querySelector(“.js-inline-comment-form-container”);t.classList.add(“open”),t.querySelector(“.js-write-tab”)?.click(),t.querySelector(“.js-comment-field”).focus(),(0,o.h)(t,”inlinecomment:focus”)}function a(e){e.reset();let t=e.closest(“.js-inline-comment-form-container”);t.classList.remove(“open”);let i=t.querySelector(“.js-multi-line-preview”);i&&(i.hidden=!0),(0,o.h)(t,”inlinecomment:collapse”)}(0,o.on)(“click”,”.js-toggle-inline-comment-form”,function(e){r(e.currentTarget.closest(“.js-line-comments”))}),(0,o.on)(“quote-selection”,”.js-line-comments”,function(e){r(e.currentTarget),e.stopPropagation()}),(0,s.Ff)(“keydown”,”.js-inline-comment-form-container form .js-comment-field”,function(e){let t=e.target;t.classList.contains(“js-navigation-enable”)||”Escape”===e.key&&0===t.value.length&&(a(t.closest(“form”)),e.preventDefault())}),(0,o.on)(“click”,”.js-hide-inline-comment-form”,function(e){let t=e.currentTarget.closest(“form”);!(0,n.Av)(t)||confirm(e.currentTarget.getAttribute(“data-confirm-cancel-text”))?a(t):e.preventDefault()})},58371:(e,t,i)=>{i.d(t,{Ax:()=>n.Ax,JW:()=>s,ZV:()=>n.ZV});var o=i(51987),n=i(13937);function s(e,t){(0,n.JW)(e,async(e,i,n)=>((0,o.tV)(n.headers),t(e,i,n)))}},69599:(e,t,i)=>{i.d(t,{G7:()=>l,XY:()=>u,fQ:()=>a});var o=i(5225),n=i(21067);function s(){return new Set((0,n._$)().featureFlags)}let r=i(71315).X3||function(){try{return process?.env?.STORYBOOK===”true”}catch{return!1}}()?s:(0,o.A)(s);function a(){return Array.from(r())}function l(e){return r().has(e)}let u={isFeatureEnabled:l}},69759:(e,t,i)=>{i.d(t,{B:()=>o});function o(e,t){let i=e.createElement(“template”);return i.innerHTML=t,e.importNode(i.content,!0)}},73855:(e,t,i)=>{i.d(t,{CN:()=>SearchItem,P$:()=>QueryEvent,VJ:()=>u,dS:()=>FetchDataEvent,k8:()=>s,m4:()=>a,nM:()=>r,o7:()=>n,qi:()=>FilterItem,yk:()=>l});var o=i(50467);let n={DIRECTORY:”Search in this directory”,ORG:”Search in this organization”,OWNER:”Search in this owner”,REPO:”Search in this repository”,ENTERPRISE:”Search in this enterprise”,GITHUB:”Search all of GitHub”,GENERAL:”Submit search”,COMMAND:”Run command”,COPILOT_CHAT:”Start a new Copilot thread”,COPILOT_SEARCH:”Search with Copilot”,EXPLORE:”Learn More”,DEFAULT:”Jump to”},s=”Autocomplete”;let FilterItem=class FilterItem extends Event{constructor({filter:e,value:t,name:i=””,description:n=””,inlineDescription:s=!1,priority:r=1/0,icon:a,avatar:l,action:u}){super(“filter-item”),(0,o._)(this,”name”,void 0),(0,o._)(this,”filter”,void 0),(0,o._)(this,”value”,void 0),(0,o._)(this,”description”,void 0),(0,o._)(this,”inlineDescription”,!1),(0,o._)(this,”action”,void 0),(0,o._)(this,”priority”,void 0),(0,o._)(this,”icon”,void 0),(0,o._)(this,”avatar”,void 0),this.filter=e,this.value=t,this.name=i,this.description=n,this.inlineDescription=s,this.priority=r,this.icon=a,this.avatar=l,this.action=u}};function r(e){return e instanceof Object}let a={Apps:”apps”,Archived:”archived”,Book:”book”,Bookmark:”bookmark”,Branch:”branch”,Calendar:”calendar”,Circle:”circle”,Code:”code”,CodeReview:”code-review”,CodeSquare:”code-square”,Comment:”comment”,CommentDiscussion:”comment-discussion”,Copilot:”copilot”,CopilotError:”copilot-error”,Codespaces:”codespaces”,CreditCard:”credit-card”,Default:”default”,DeviceDesktop:”device-desktop”,DeviceMobile:”device-mobile”,Discussion:”discussion”,Draft:”draft”,FileCode:”file-code”,Filter:”filter”,Forbidden:”forbidden”,Gift:”gift”,Globe:”globe”,Heart:”heart”,History:”history”,Issue:”issue”,IssueOpened:”issue-opened”,IssueClosed:”issueClosed”,Iterations:”iterations”,Mention:”mention”,Merged:”merged”,Milestone:”milestone”,No:”no”,Not:”not”,Organization:”organization”,Package:”package”,Pencil:”pencil”,Person:”person”,Play:”play”,PlusCircle:”plus-circle”,Project:”project”,PullRequest:”pullRequest”,Question:”question”,Reaction:”reaction”,Repo:”repo”,Rocket:”rocket”,Search:”search”,Server:”server”,ShieldCheck:”shield-check”,SingleSelect:”single-select”,Sort:”sort”,Tag:”tag”,Team:”team”,Telescope:”telescope”,Trash:”trash”,Workflow:”workflow”},l={Entity:”–color-prettylights-syntax-entity”,Constant:”–color-prettylights-syntax-constant”,Keyword:”–color-prettylights-syntax-keyword”,Variable:”–color-prettylights-syntax-variable”,String:”–color-prettylights-syntax-string”};let SearchItem=class SearchItem extends Event{constructor({id:e,priority:t,value:i,action:n,description:s=””,icon:r,scope:a=”DEFAULT”,prefixText:l,prefixColor:u,isFallbackSuggestion:c,isUpdate:d}){super(d?”update-item”:”search-item”),(0,o._)(this,”id”,void 0),(0,o._)(this,”priority”,void 0),(0,o._)(this,”value”,void 0),(0,o._)(this,”action”,void 0),(0,o._)(this,”description”,void 0),(0,o._)(this,”icon”,void 0),(0,o._)(this,”scope”,void 0),(0,o._)(this,”prefixText”,void 0),(0,o._)(this,”prefixColor”,void 0),(0,o._)(this,”isFallbackSuggestion”,void 0),this.id=e,this.priority=t,this.value=i,this.prefixText=l,this.prefixColor=u,this.action=n,this.description=s,this.icon=r,this.scope=a,this.isFallbackSuggestion=c||!1}};let u={Normal:”normal”,Entity:”entity”,Constant:”constant”,FilterValue:”filter-value”};let FetchDataEvent=class FetchDataEvent extends Event{constructor(e){super(“fetch-data”),(0,o._)(this,”fetchPromise”,void 0),this.fetchPromise=e}};let QueryEvent=class QueryEvent extends Event{toString(){return this.rawQuery}constructor(e,t,i){super(“query”),(0,o._)(this,”parsedQuery”,void 0),(0,o._)(this,”rawQuery”,void 0),(0,o._)(this,”parsedMetadata”,void 0),this.parsedQuery=e,this.rawQuery=t,this.parsedMetadata=i}};Event},82075:(e,t,i)=>{i.d(t,{A:()=>r,D:()=>a});var o=i(71315),n=i(82518);let s=class NoOpStorage{getItem(){return null}setItem(){}removeItem(){}clear(){}key(){return null}get length(){return 0}};function r(e,t={throwQuotaErrorsOnSet:!1},i=o.cg,a=e=>e,l=e=>e){let u;try{if(!i)throw Error();u=i[e]||new s}catch{u=new s}let{throwQuotaErrorsOnSet:c}=t;function d(e){t.sendCacheStats&&(0,n.iv)({incrementKey:e})}function m(e){try{if(u.removeItem(e),t.ttl){let t=`${e}:expiry`;u.removeItem(t)}}catch{}}return{getItem:function(e,t=Date.now()){try{let i=u.getItem(e);if(!i)return null;let o=`${e}:expiry`,n=Number(u.getItem(o));if(n&&t>n)return m(e),m(o),d(“SAFE_STORAGE_VALUE_EXPIRED”),null;return d(“SAFE_STORAGE_VALUE_WITHIN_TTL”),a(i)}catch{return null}},setItem:function(e,i,o=Date.now()){try{if(u.setItem(e,l(i)),t.ttl){let i=`${e}:expiry`,n=o+t.ttl;u.setItem(i,n.toString())}}catch(e){if(c&&e instanceof Error&&e.message.toLowerCase().includes(“quota”))throw e}},removeItem:m,clear:()=>u.clear(),getKeys:function(){return Object.keys(u)},get length(){return u.length}}}function a(e){return r(e,{throwQuotaErrorsOnSet:!1},o.cg,JSON.parse,JSON.stringify)}},82518:(e,t,i)=>{i.d(t,{Xl:()=>f,au:()=>d,iv:()=>m});var o=i(71315),n=i(34095),s=i(99223),r=i(69599),a=i(21067),l=i(70170);let u={PRS_COMMENT_BOX_INP:{name:”pull_requests.comment_box.inp”,hash:”070a85f091c124d118031ed374badf58df0cd9c2902f9aa4f9e09f6fdcbb91d0″,type:”distribution”},PULL_REQUESTS_FILES_JS_HEAP:{name:”pull_requests.files.js_heap”,hash:”7c5d986de8ccbfd17ae58e0da85158912cf65aeb256aecf28c35ddeb794cd2d3″,type:”distribution”}},c=[];function d({name:e,value:t,tags:i}){m({customMetric:{…u[e],value:t,tags:i},ui:”vite-tss”===s.v})}function m(e,t=!1,i=.5){if(!o.X3&&!0!==(0,r.G7)(“browser_stats_disabled”)){if(i<0||i>1)throw RangeError(“Sampling probability must be between 0 and 1”);void 0===e.timestamp&&(e.timestamp=Date.now()),e.loggedIn=(0,a.M3)(),e.staff=f(),e.bundler=s.v,e.ui=”vite-tss”===s.v,Math.random()JSON.stringify(e));for(;i.length>0;)t.push(function(e){let t=e.shift(),i=[t],o=t.length;for(;e.length>0&&o<=65536;){let t=e[0].length;if(o+t<=65536){let n=e.shift();i.push(n),o+=t}else break}return i}(i));return t}(c)){var t=e,i=`{"stats": [${n.join(",")}], "target": "${o.XC?.head?.querySelector('meta[name="ui-target"]')?.content||"full"}"}`;try{navigator.sendBeacon&&navigator.sendBeacon(t,i)}catch{}}c=[]}}function f(){return!!o.XC?.head?.querySelector('meta[name="user-staff"]')?.content}o.XC?.addEventListener("pagehide",v),o.XC?.addEventListener("visibilitychange",v)},82591:(e,t,i)=>{i.d(t,{z:()=>o});let o=Object.freeze({INITIAL:”soft-nav:initial”,START:”soft-nav:start”,REPLACE_MECHANISM:”soft-nav:replace-mechanism”,SUCCESS:”soft-nav:success”,ERROR:”soft-nav:error”,FRAME_UPDATE:”soft-nav:frame-update”,END:”soft-nav:end”,RENDER:”soft-nav:render”,REACT_DONE:”soft-nav:react-done”,PROGRESS_BAR:{START:”soft-nav:progress-bar:start”,END:”soft-nav:progress-bar:end”}})},87363:(e,t,i)=>{i.d(t,{Ff:()=>l,eC:()=>u,uE:()=>a});var o=i(6986);let n=!1,s=new o.A;function r(e){let t=e.target;if(t instanceof HTMLElement&&t.nodeType!==Node.DOCUMENT_NODE)for(let e of s.matches(t))e.data.call(null,t)}function a(e,t){n||(n=!0,document.addEventListener(“focus”,r,!0)),s.add(e,t),document.activeElement instanceof HTMLElement&&document.activeElement.matches(e)&&t(document.activeElement)}function l(e,t,i){function o(t){let n=t.currentTarget;n&&(n.removeEventListener(e,i),n.removeEventListener(“blur”,o))}a(t,function(t){t.addEventListener(e,i),t.addEventListener(“blur”,o)})}function u(e,t){function i(e){let{currentTarget:o}=e;o&&(o.removeEventListener(“input”,t),o.removeEventListener(“blur”,i))}a(e,function(e){e.addEventListener(“input”,t),e.addEventListener(“blur”,i)})}},99223:(e,t,i)=>{i.d(t,{k:()=>r,v:()=>a});var o=i(5225),n=i(71315);let s=(0,o.A)(function(){return n.XC?.head?.querySelector(‘meta[name=”runtime-environment”]’)?.content||””}),r=(0,o.A)(function(){return”enterprise”===s()}),a=”webpack”}},e=>{e.O(0,[69676,43784,44959,30037,53996,46701,86598],()=>e(e.s=33736)),e.O()}]); //# sourceMappingURL=discussions-8dab639a9309.js.map