티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[4013,19973,74911],{31635:(t,e,n)=>{n.d(e,{AQ:()=>s,Cg:()=>o,Me:()=>a,N3:()=>r,Tt:()=>i,xN:()=>l});function i(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&”function”==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(t);oe.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n}function o(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a–)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s}function r(t){return this instanceof r?(this.v=t,this):new r(t)}function s(t,e,n){if(!Symbol.asyncIterator)throw TypeError(“Symbol.asyncIterator is not defined.”);var i,o=n.apply(t,e||[]),s=[];return i=Object.create((“function”==typeof AsyncIterator?AsyncIterator:Object).prototype),a(“next”),a(“throw”),a(“return”,function(t){return function(e){return Promise.resolve(e).then(t,c)}}),i[Symbol.asyncIterator]=function(){return this},i;function a(t,e){o[t]&&(i[t]=function(e){return new Promise(function(n,i){s.push([t,e,n,i])>1||l(t,e)})},e&&(i[t]=e(i[t])))}function l(t,e){try{var n;(n=o[t](e)).value instanceof r?Promise.resolve(n.value.v).then(u,c):d(s[0][2],n)}catch(t){d(s[0][3],t)}}function u(t){l(“next”,t)}function c(t){l(“throw”,t)}function d(t,e){t(e),s.shift(),s.length&&l(s[0][0],s[0][1])}}function a(t){var e,n;return e={},i(“next”),i(“throw”,function(t){throw t}),i(“return”),e[Symbol.iterator]=function(){return this},e;function i(i,o){e[i]=t[i]?function(e){return(n=!n)?{value:r(t[i](e)),done:!1}:o?o(e):e}:o}}function l(t){if(!Symbol.asyncIterator)throw TypeError(“Symbol.asyncIterator is not defined.”);var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function(t){var e=”function”==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&”number”==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(e?”Object is not iterable.”:”Symbol.iterator is not defined.”)}(t),e={},i(“next”),i(“throw”),i(“return”),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise(function(i,o){var r,s,a;r=i,s=o,a=(e=t[n](e)).done,Promise.resolve(e.value).then(function(t){r({value:t,done:a})},s)})}}}”function”==typeof SuppressedError&&SuppressedError},39595:(t,e,n)=>{let i;n.d(e,{CF:()=>b,p_:()=>T,FB:()=>d,Se:()=>k,aC:()=>O,zV:()=>D});let o=new WeakSet,r=new WeakMap;function s(t=document){if(r.has(t))return r.get(t);let e=!1,n=new MutationObserver(t=>{for(let e of t)if(“attributes”===e.type&&e.target instanceof Element)c(e.target);else if(“childList”===e.type&&e.addedNodes.length)for(let t of e.addedNodes)t instanceof Element&&a(t)});n.observe(t,{childList:!0,subtree:!0,attributeFilter:[“data-action”]});let i={get closed(){return e},unsubscribe(){e=!0,r.delete(t),n.disconnect()}};return r.set(t,i),i}function a(t){for(let e of t.querySelectorAll(“[data-action]”))c(e);t instanceof Element&&t.hasAttribute(“data-action”)&&c(t)}function l(t){let e=t.currentTarget;for(let n of u(e))if(t.type===n.type){let i=e.closest(n.tag);o.has(i)&&”function”==typeof i[n.method]&&i[n.method](t);let r=e.getRootNode();if(r instanceof ShadowRoot&&o.has(r.host)&&r.host.matches(n.tag)){let e=r.host;”function”==typeof e[n.method]&&e[n.method](t)}}}function*u(t){for(let e of(t.getAttribute(“data-action”)||””).trim().split(/\s+/)){let t=e.lastIndexOf(“:”),n=Math.max(0,e.lastIndexOf(“#”))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||”handleEvent”}}}function c(t){for(let e of u(t))t.addEventListener(e.type,l)}function d(t,e){let n=t.tagName.toLowerCase();if(t.shadowRoot){for(let i of t.shadowRoot.querySelectorAll(`[data-target~=”${n}.${e}”]`))if(!i.closest(n))return i}for(let i of t.querySelectorAll(`[data-target~=”${n}.${e}”]`))if(i.closest(n)===t)return i}let h=t=>String(“symbol”==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,”-$1″).replace(/–/g,”-“).replace(/^-|-$/,””).toLowerCase(),p=(t,e=”property”)=>{let n=h(t);if(!n.includes(“-“))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,”SyntaxError”);return n},f=”attr”;function b(t,e){x(t,f).add(e)}let m=new WeakSet;function v(t,e){if(m.has(t))return;m.add(t);let n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??”data-“;for(let o of(e||(e=x(n,f)),e)){let e=t[o],n=p(`${i}${o}`),r={configurable:!0,get(){return this.getAttribute(n)||””},set(t){this.setAttribute(n,t||””)}};”number”==typeof e?r={configurable:!0,get(){return Number(this.getAttribute(n)||0)},set(t){this.setAttribute(n,t)}}:”boolean”==typeof e&&(r={configurable:!0,get(){return this.hasAttribute(n)},set(t){this.toggleAttribute(n,t)}}),Object.defineProperty(t,o,r),o in t&&!t.hasAttribute(n)&&r.set.call(t,e)}}let g=new Map,y=new Promise(t=>{“loading”!==document.readyState?t():document.addEventListener(“readystatechange”,()=>t(),{once:!0})}),E=new Promise(t=>{let e=new AbortController;e.signal.addEventListener(“abort”,()=>t());let n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener(“mousedown”,i,n),document.addEventListener(“touchstart”,i,n),document.addEventListener(“keydown”,i,n),document.addEventListener(“pointerdown”,i,n)}),w={ready:()=>y,firstInteraction:()=>E,visible:t=>new Promise(e=>{let n=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){e(),n.disconnect();return}},{rootMargin:”0px 0px 256px 0px”,threshold:.01});for(let e of document.querySelectorAll(t))n.observe(e)})},A=new WeakMap;function S(t){cancelAnimationFrame(A.get(t)||0),A.set(t,requestAnimationFrame(()=>{for(let e of g.keys()){let n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){let i=n?.getAttribute(“data-load-on”)||”ready”,o=i in w?w[i]:w.ready;for(let t of g.get(e)||[])o(e).then(t);g.delete(e),A.delete(t)}}}))}function k(t,e){for(let[n,i]of(“string”==typeof t&&e&&(t={[t]:e}),Object.entries(t)))g.has(n)||g.set(n,new Set),g.get(n).add(i);C(document)}function C(t){i||(i=new MutationObserver(t=>{if(g.size)for(let e of t)for(let t of e.addedNodes)t instanceof Element&&S(t)})),S(t),i.observe(t,{subtree:!0,childList:!0})}let L=Symbol.for(“catalyst”);let CatalystDelegate=class CatalystDelegate{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,o)};let r=t.observedAttributes||[];Object.defineProperty(t,”observedAttributes”,{configurable:!0,get(){return e.observedAttributes(this,r)},set(t){r=t}}),function(t){let e=t.observedAttributes||[],n=t.attrPrefix??”data-“,i=t=>p(`${n}${t}`);Object.defineProperty(t,”observedAttributes”,{configurable:!0,get:()=>[…x(t.prototype,f)].map(i).concat(e),set(t){e=t}})}(t),function(t){let e=h(t.name).replace(/-element$/,””);try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&”NotSupportedError”===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){var n,i;for(let e of(t.toggleAttribute(“data-catalyst”,!0),customElements.upgrade(t),t.querySelectorAll(“template[data-shadowroot]”)))e.parentElement===t&&t.attachShadow({mode:”closed”===e.getAttribute(“data-shadowroot”)?”closed”:”open”}).append(e.content.cloneNode(!0));(v(t),o.add(t),t.shadowRoot&&(a(i=t.shadowRoot),s(i)),a(t),s(t.ownerDocument),e?.call(t),t.shadowRoot)&&(a(n=t.shadowRoot),s(n),C(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,o){v(t),”data-catalyst”!==e&&o&&o.call(t,e,n,i)}};function x(t,e){if(!Object.prototype.hasOwnProperty.call(t,L)){let e=t[L],n=t[L]=new Map;if(e)for(let[t,i]of e)n.set(t,new Set(i))}let n=t[L];return n.has(e)||n.set(e,new Set),n.get(e)}function O(t,e){x(t,”target”).add(e),Object.defineProperty(t,e,{configurable:!0,get(){return d(this,e)}})}function D(t,e){x(t,”targets”).add(e),Object.defineProperty(t,e,{configurable:!0,get(){let t=this.tagName.toLowerCase(),n=[];if(this.shadowRoot)for(let i of this.shadowRoot.querySelectorAll(`[data-targets~=”${t}.${e}”]`))i.closest(t)||n.push(i);for(let i of this.querySelectorAll(`[data-targets~=”${t}.${e}”]`))i.closest(t)===this&&n.push(i);return n}})}function T(t){new CatalystDelegate(t)}},74057:(t,e,n)=>{n.d(e,{A:()=>m});let i=”data-close-dialog”,o=`[${i}]`;function r(t){let e=Array.from(t.querySelectorAll(“[autofocus]”)).filter(a)[0];e||(e=t,t.setAttribute(“tabindex”,”-1″)),e.focus()}function s(t){let e=t.currentTarget;e instanceof Element&&(“Escape”===t.key||”Esc”===t.key?(d(e,!1),t.stopPropagation()):”Tab”===t.key&&function(t){if(!(t.currentTarget instanceof Element))return;let e=t.currentTarget.querySelector(“details-dialog”);if(!e)return;t.preventDefault();let n=Array.from(e.querySelectorAll(“*”)).filter(a);if(0===n.length)return;let i=t.shiftKey?-1:1,o=e.getRootNode(),r=e.contains(o.activeElement)?o.activeElement:null,s=-1===i?-1:0;if(r instanceof HTMLElement){let t=n.indexOf(r);-1!==t&&(s=t+i)}s<0?s=n.length-1:s%=n.length,n[s].focus()}(t))}function a(t){var e;return t.tabIndex>=0&&!t.disabled&&!(e=t).hidden&&(!e.type||”hidden”!==e.type)&&(e.offsetWidth>0||e.offsetHeight>0)}function l(t){let e=t.querySelector(“details-dialog”);return!(e instanceof DetailsDialogElement)||e.dispatchEvent(new CustomEvent(“details-dialog-close”,{bubbles:!0,cancelable:!0}))}function u(t){if(!(t.currentTarget instanceof Element))return;let e=t.currentTarget.closest(“details”);e&&e.hasAttribute(“open”)&&(l(e)||(t.preventDefault(),t.stopPropagation()))}function c(t){let e=t.currentTarget;if(!(e instanceof Element))return;let n=e.querySelector(“details-dialog”);if(n instanceof DetailsDialogElement)if(e.hasAttribute(“open”)){let t=”getRootNode”in n?n.getRootNode():document;t.activeElement instanceof HTMLElement&&b.set(n,{details:e,activeElement:t.activeElement}),r(n),e.addEventListener(“keydown”,s)}else{var i,o;let t;for(let t of n.querySelectorAll(“form”))t.reset();let r=(i=e,o=n,(t=b.get(o))&&t.activeElement instanceof HTMLElement?t.activeElement:i.querySelector(“summary”));r&&r.focus(),e.removeEventListener(“keydown”,s)}}function d(t,e){e!==t.hasAttribute(“open”)&&(e?t.setAttribute(“open”,””):l(t)&&t.removeAttribute(“open”))}function h(t){let e=t.currentTarget;if(!(e instanceof Element))return;let n=e.querySelector(“details-dialog”);if(!(n instanceof DetailsDialogElement))return;let i=n.querySelector(“include-fragment:not([src])”);if(!i)return;let o=n.src;null!==o&&(i.addEventListener(“loadend”,()=>{e.hasAttribute(“open”)&&r(n)}),i.setAttribute(“src”,o),f(e))}function p(t,e,n){f(t),e&&t.addEventListener(“toggle”,h,{once:!0}),e&&n&&t.addEventListener(“mouseover”,h,{once:!0})}function f(t){t.removeEventListener(“toggle”,h),t.removeEventListener(“mouseover”,h)}let b=new WeakMap;let DetailsDialogElement=class DetailsDialogElement extends HTMLElement{static get CLOSE_ATTR(){return i}static get CLOSE_SELECTOR(){return o}constructor(){super(),b.set(this,{details:null,activeElement:null}),this.addEventListener(“click”,function({target:t}){if(!(t instanceof Element))return;let e=t.closest(“details”);e&&t.closest(o)&&d(e,!1)})}get src(){return this.getAttribute(“src”)}set src(t){this.setAttribute(“src”,t||””)}get preload(){return this.hasAttribute(“preload”)}set preload(t){t?this.setAttribute(“preload”,””):this.removeAttribute(“preload”)}connectedCallback(){this.setAttribute(“role”,”dialog”),this.setAttribute(“aria-modal”,”true”);let t=b.get(this);if(!t)return;let e=this.parentElement;if(!e)return;let n=e.querySelector(“summary”);n&&(n.hasAttribute(“role”)||n.setAttribute(“role”,”button”),n.addEventListener(“click”,u,{capture:!0})),e.addEventListener(“toggle”,c),t.details=e,p(e,this.src,this.preload)}disconnectedCallback(){let t=b.get(this);if(!t)return;let{details:e}=t;if(!e)return;e.removeEventListener(“toggle”,c),f(e);let n=e.querySelector(“summary”);n&&n.removeEventListener(“click”,u,{capture:!0}),t.details=null}toggle(t){let e=b.get(this);if(!e)return;let{details:n}=e;n&&d(n,t)}static get observedAttributes(){return[“src”,”preload”]}attributeChangedCallback(){let t=b.get(this);if(!t)return;let{details:e}=t;e&&p(e,this.src,this.preload)}};let m=DetailsDialogElement;window.customElements.get(“details-dialog”)||(window.DetailsDialogElement=DetailsDialogElement,window.customElements.define(“details-dialog”,DetailsDialogElement))},96907:(t,e,n)=>{n.d(e,{Ay:()=>y});let Combobox=class Combobox{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i,scrollIntoViewOptions:r}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.scrollIntoViewOptions=null!=r?r:{block:”nearest”,inline:”nearest”},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>(function(t,e){if(!t.shiftKey&&!t.metaKey&&!t.altKey&&(e.ctrlBindings||!t.ctrlKey)&&!e.isComposing)switch(t.key){case”Enter”:o(e.input,e.list)&&t.preventDefault();break;case”Tab”:e.tabInsertsSuggestions&&o(e.input,e.list)&&t.preventDefault();break;case”Escape”:e.clearSelection();break;case”ArrowDown”:e.navigate(1),t.preventDefault();break;case”ArrowUp”:e.navigate(-1),t.preventDefault();break;case”n”:e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case”p”:e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}})(t,this),this.compositionEventHandler=t=>{var e,n;return e=t,n=this,void(n.isComposing=”compositionstart”===e.type,document.getElementById(n.input.getAttribute(“aria-controls”)||””)&&n.clearSelection())},this.inputHandler=this.clearSelection.bind(this),t.setAttribute(“role”,”combobox”),t.setAttribute(“aria-controls”,e.id),t.setAttribute(“aria-expanded”,”false”),t.setAttribute(“aria-autocomplete”,”list”),t.setAttribute(“aria-haspopup”,”listbox”)}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute(“role”),this.input.removeAttribute(“aria-controls”),this.input.removeAttribute(“aria-expanded”),this.input.removeAttribute(“aria-autocomplete”),this.input.removeAttribute(“aria-haspopup”)}start(){this.input.setAttribute(“aria-expanded”,”true”),this.input.addEventListener(“compositionstart”,this.compositionEventHandler),this.input.addEventListener(“compositionend”,this.compositionEventHandler),this.input.addEventListener(“input”,this.inputHandler),this.input.addEventListener(“keydown”,this.keyboardEventHandler),this.list.addEventListener(“click”,i),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute(“aria-expanded”,”false”),this.input.removeEventListener(“compositionstart”,this.compositionEventHandler),this.input.removeEventListener(“compositionend”,this.compositionEventHandler),this.input.removeEventListener(“input”,this.inputHandler),this.input.removeEventListener(“keydown”,this.keyboardEventHandler),this.list.removeEventListener(“click”,i)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null==(t=Array.from(this.list.querySelectorAll(‘[role=”option”]:not([aria-disabled=”true”])’)).filter(r)[0])||t.setAttribute(“data-combobox-option-default”,”true”))}navigate(t=1){let e=Array.from(this.list.querySelectorAll(‘[aria-selected=”true”]’)).filter(r)[0],n=Array.from(this.list.querySelectorAll(‘[role=”option”]’)).filter(r),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t){this.clearSelection(),this.input.focus();return}let o=1===t?0:n.length-1;if(e&&i>=0){let e=i+t;e>=0&&e0||t.offsetHeight>0)}let s=window.testScreenReaderDelay||100;let Autocomplete=class Autocomplete{constructor(t,e,n,i=!1){var o;if(this.container=t,this.input=e,this.results=n,this.combobox=new Combobox(e,n,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll(“[role=option]”),this.feedback&&(this.feedback.setAttribute(“aria-live”,”polite”),this.feedback.setAttribute(“aria-atomic”,”true”)),this.clearButton&&!this.clearButton.getAttribute(“aria-label”)){const t=document.querySelector(`label[for=”${this.input.name}”]`);this.clearButton.setAttribute(“aria-label”,”clear:”),this.clearButton.setAttribute(“aria-labelledby”,`${this.clearButton.id} ${(null==t?void 0:t.id)||””}`)}this.input.getAttribute(“aria-expanded”)||this.input.setAttribute(“aria-expanded”,”false”),this.results.popover?this.results.matches(“:popover-open”)&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute(“aria-label”)||this.results.setAttribute(“aria-label”,”results”),this.input.setAttribute(“autocomplete”,”off”),this.input.setAttribute(“spellcheck”,”false”),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(…i){clearTimeout(n),n=window.setTimeout(()=>{clearTimeout(n),t(…i)},e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener(“keydown”,this.onKeydown),this.input.addEventListener(“focus”,this.onInputFocus),this.input.addEventListener(“blur”,this.onInputBlur),this.input.addEventListener(“input”,this.onInputChange),this.results.addEventListener(“mousedown”,this.onResultsMouseDown),this.results.addEventListener(“combobox-commit”,this.onCommit),null==(o=this.clearButton)||o.addEventListener(“click”,this.handleClear)}destroy(){this.input.removeEventListener(“keydown”,this.onKeydown),this.input.removeEventListener(“focus”,this.onInputFocus),this.input.removeEventListener(“blur”,this.onInputBlur),this.input.removeEventListener(“input”,this.onInputChange),this.results.removeEventListener(“mousedown”,this.onResultsMouseDown),this.results.removeEventListener(“combobox-commit”,this.onCommit)}handleClear(t){t.preventDefault(),”true”===this.input.getAttribute(“aria-expanded”)&&(this.input.setAttribute(“aria-expanded”,”false”),this.updateFeedbackForScreenReaders(“Results hidden.”)),this.input.value=””,this.container.value=””,this.input.focus(),this.input.dispatchEvent(new Event(“change”)),this.close()}onKeydown(t){if(“Escape”===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&”ArrowUp”===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&”ArrowDown”===t.key&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){if(!(t instanceof HTMLElement)||(this.close(),t instanceof HTMLAnchorElement))return;let e=t.getAttribute(“data-autocomplete-value”)||t.textContent;this.updateFeedbackForScreenReaders(`${t.textContent||””} selected.`),this.container.value=e,e||this.updateFeedbackForScreenReaders(“Results hidden.”)}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=””),this.container.removeAttribute(“value”),this.fetchResults()}identifyOptions(){let t=0;for(let e of this.results.querySelectorAll(‘[role=”option”]:not([id])’))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout(()=>{this.feedback&&(this.feedback.textContent=t)},s)}fetchResults(){let t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();let e=this.container.src;if(!e)return;let n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append(“q”,t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent(“loadstart”)),this.container.fetchResult(n).then(t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();let e=this.results.querySelectorAll(‘[role=”option”]’),n=!!e.length||!!this.results.querySelectorAll(‘[data-no-result-found=”true”]’).length,i=e.length,[o]=e,r=null==o?void 0:o.textContent;this.autoselectEnabled&&r?this.updateFeedbackForScreenReaders(`${i} results. ${r} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||”No”} results.`),n?this.open():this.close(),this.container.dispatchEvent(new CustomEvent(“load”)),this.container.dispatchEvent(new CustomEvent(“loadend”))}).catch(()=>{this.container.dispatchEvent(new CustomEvent(“error”)),this.container.dispatchEvent(new CustomEvent(“loadend”))})}open(){(this.results.popover?!this.results.matches(“:popover-open”):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(“:popover-open”):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}};var a,l,u,c,d,h=function(t,e,n,i){if(“a”===n&&!i)throw TypeError(“Private accessor was defined without a getter”);if(“function”==typeof e?t!==e||!i:!e.has(t))throw TypeError(“Cannot read private member from an object whose class did not declare it”);return”m”===n?i:”a”===n?i.call(t):i?i.value:e.get(t)},p=function(t,e,n,i,o){if(“m”===i)throw TypeError(“Private method is not writable”);if(“a”===i&&!o)throw TypeError(“Private accessor was defined without a setter”);if(“function”==typeof e?t!==e||!o:!e.has(t))throw TypeError(“Cannot write private member to an object whose class did not declare it”);return”a”===i?o.call(t,n):o?o.value=n:e.set(t,n),n},f=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&”function”==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(t);oe.indexOf(i[o])&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n};let b=globalThis.HTMLElement||null;let AutoCompleteEvent=class AutoCompleteEvent extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,f(e,[“relatedTarget”])),this.relatedTarget=n}};let m=new WeakMap,v=null;let auto_complete_element_AutoCompleteElement=class auto_complete_element_AutoCompleteElement extends b{constructor(){super(…arguments),a.add(this),l.set(this,null),u.set(this,null),d.set(this,void 0)}static define(t=”auto-complete”,e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){v=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null==(t=h(this,l,”f”))?void 0:t.isConnected)return h(this,l,”f”);let e=this.getAttribute(“for”),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){p(this,l,t,”f”),this.setAttribute(“for”,””)}get inputElement(){var t;return(null==(t=h(this,u,”f”))?void 0:t.isConnected)?h(this,u,”f”):this.querySelector(“input”)}set inputElement(t){p(this,u,t,”f”),h(this,a,”m”,c).call(this)}connectedCallback(){this.isConnected&&(h(this,a,”m”,c).call(this),new MutationObserver(()=>{m.get(this)||h(this,a,”m”,c).call(this)}).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){let t=m.get(this);t&&(t.destroy(),m.delete(this))}get src(){return this.getAttribute(“src”)||””}set src(t){this.setAttribute(“src”,t)}get value(){return this.getAttribute(“value”)||””}set value(t){this.setAttribute(“value”,t)}get open(){return this.hasAttribute(“open”)}set open(t){t?this.setAttribute(“open”,””):this.removeAttribute(“open”)}get fetchOnEmpty(){return this.hasAttribute(“fetch-on-empty”)}set fetchOnEmpty(t){this.toggleAttribute(“fetch-on-empty”,t)}async fetchResult(t){var e;null==(e=h(this,d,”f”))||e.abort();let{signal:n}=p(this,d,new AbortController,”f”),i=await fetch(t.toString(),{signal:n,headers:{Accept:”text/fragment+html”}});if(!i.ok)throw Error(await i.text());return v?(await v).createHTML(await i.text(),i):await i.text()}static get observedAttributes(){return[“open”,”value”,”for”]}attributeChangedCallback(t,e,n){var i,o;if(e===n)return;let r=m.get(this);if(r)switch((this.forElement!==(null==(i=m.get(this))?void 0:i.results)||this.inputElement!==(null==(o=m.get(this))?void 0:o.input))&&h(this,a,”m”,c).call(this),t){case”open”:null===n?r.close():r.open();break;case”value”:null!==n&&(r.input.value=n),this.dispatchEvent(new AutoCompleteEvent(“auto-complete-change”,{bubbles:!0,relatedTarget:r.input}))}}};l=new WeakMap,u=new WeakMap,d=new WeakMap,a=new WeakSet,c=function(){var t;null==(t=m.get(this))||t.destroy();let{forElement:e,inputElement:n}=this;if(!e||!n)return;let i=”true”===this.getAttribute(“data-autoselect”);m.set(this,new Autocomplete(this,n,e,i)),e.setAttribute(“role”,”listbox”)};let g=”undefined”!=typeof globalThis?globalThis:window;try{g.AutocompleteElement=g.AutoCompleteElement=auto_complete_element_AutoCompleteElement.define()}catch(t){if(!(g.DOMException&&t instanceof DOMException&&”NotSupportedError”===t.name)&&!(t instanceof ReferenceError))throw t}let y=auto_complete_element_AutoCompleteElement}}]);
//# sourceMappingURL=74911-60c53b4e4d84.js.map