System.register(["./chunk-frameworks.js","./chunk-vendor.js"],function(){"use strict";var j,a,u;return{setters:[function(c){j=c.e},function(c){a=c.a,u=c.r}],execute:function(){var c=Object.defineProperty,l=(o,t)=>c(o,"name",{value:t,configurable:!0});a("click",".js-accept-topic-button",function(o){const t=o.currentTarget,e=t.closest(".js-topic-form-area"),n=t.closest(".js-topic-suggestion"),m=e.querySelector(".js-template"),d=e.querySelector(".js-tag-input-selected-tags"),s=m.cloneNode(!0),r=t.getAttribute("data-topic-name")||"";s.querySelector("input").value=r,s.querySelector(".js-placeholder-tag-name").replaceWith(r),s.classList.remove("d-none","js-template"),d.appendChild(s),n.remove(),i(e)}),u(".js-accept-topic-form",async function(o,t){await t.html();const e=o.closest(".js-topic-form-area"),n=o.closest(".js-topic-suggestion"),m=e.querySelector(".js-template"),d=e.querySelector(".js-tag-input-selected-tags"),s=m.cloneNode(!0),r=n.querySelector('input[name="input[name]"]').value;s.querySelector("input").value=r,s.querySelector(".js-placeholder-tag-name").replaceWith(r),s.classList.remove("d-none","js-template"),d.appendChild(s),n.remove(),p(e),i(e),g(o)}),a("click",".js-decline-topic-button",function(o){const t=o.currentTarget,e=t.closest(".js-topic-form-area"),n=t.closest(".js-topic-suggestion");setTimeout(()=>{n.remove(),i(e)},0)}),u(".js-decline-topic-form",async function(o,t){await t.html(),g(o);const e=o.closest(".js-topic-form-area");o.closest(".js-topic-suggestion").remove(),p(e),i(e)});function i(o){const t=o.querySelector(".js-topic-suggestions-box");t.querySelector(".js-topic-suggestion")||t.remove()}l(i,"removeEmptySuggestionList");function g(o){const e=o.closest(".js-topic-save-notice-container").querySelector(".js-repo-topics-save-notice");e.classList.remove("d-none"),e.classList.add("d-inline-block","anim-fade-in"),setTimeout(()=>{e.classList.remove("d-inline-block"),e.classList.add("d-none")},1900)}l(g,"flashNotice");async function p(o){const t=o.querySelector(".js-topic-suggestions-container");if(!t)return;const e=t.getAttribute("data-url");if(!e)throw new Error("could not get url");const n=await j(document,e);t.innerHTML="",t.appendChild(n)}l(p,"refreshSuggestions")}}}); //# sourceMappingURL=topic-suggestions-a4758757.js.map