@primer/view-components 0.0.0-20261125003213 → 0.0.0-20261125013107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/dialog.css +1 -1
- package/app/components/primer/anchored_position.js +68 -27
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";var t,e,i,n,s,o,r,a,l=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},c=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const h=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),i.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,i,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",n).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,i){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",n).call(this):"loading"===e&&this.isConnected&&"eager"!==i&&"eager"===this.loading&&l(this,t,"m",n).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",n).call(this),"lazy"===this.loading&&l(this,i,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){h.delete(this),l(this,t,"m",n).call(this)}}e=new WeakMap,i=new WeakMap,t=new WeakSet,n=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,i,"f").unobserve(this);try{const i=await l(this,t,"m",s).call(this);if(i instanceof Error)throw i;const n=i,o=document.createElement("template");o.innerHTML=n;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,i=h.get(this);if(i&&i.src===e)return i.data;{let i;return i=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),h.set(this,{src:e,data:i}),i}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise((t=>setTimeout(t,0)));for(const i of t)this.dispatchEvent(e?new CustomEvent(i,{detail:{error:e}}):new Event(i))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const i=await this.fetch(this.request()),n=i.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||n&&n.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${n}`);if(200!==i.status)throw new Error(`Failed to load resource: the server responded with a status of ${i.status}`);const s=await i.text();let o=s;if(d){o=(await d).createHTML(s,i)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const m=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=f.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};m.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&f(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=m.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=m.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function f(t,e,i){const n=t.input;if(!n)return;const s=m.get(t);if(!s)return;const o=n.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let h;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let d="";try{h=await async function(t,e,i){try{const n=await fetch(e,i);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),n}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),d=await h.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}h&&h.ok?(a.innerHTML=d,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:i?i.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(i){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(i)}),300)}}function g(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}function b(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function v(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){k(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const i=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)S(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&k(t)}));i.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const n={get closed(){return e},unsubscribe(){e=!0,E.delete(t),i.disconnect()}};return E.set(t,n),n}function k(t){for(const e of t.querySelectorAll("[data-action]"))S(e);t instanceof Element&&t.hasAttribute("data-action")&&S(t)}function L(t){const e=t.currentTarget;for(const i of T(e))if(t.type===i.type){const n=e.closest(i.tag);w.has(n)&&"function"==typeof n[i.method]&&n[i.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(i.tag)){const e=s.host;"function"==typeof e[i.method]&&e[i.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),i=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,i),method:e.slice(i+1)||"handleEvent"}||"handleEvent"}}function S(t){for(const e of T(t))t.addEventListener(e.type,L)}const C=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const i=C(t);if(!i.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return i};const M="attr";function I(t,e){_(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const i=Object.getPrototypeOf(t),n=i?.constructor?.attrPrefix??"data-";e||(e=_(i,M));for(const i of e){const e=t[i],s=x(`${n}${i}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,i,o),i in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const O=new Map,H=new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),N=new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const i={once:!0,passive:!0,signal:e.signal},n=()=>e.abort();document.addEventListener("mousedown",n,i),document.addEventListener("touchstart",n,i),document.addEventListener("keydown",n,i),document.addEventListener("pointerdown",n,i)})),F={ready:()=>H,firstInteraction:()=>N,visible:t=>new Promise((e=>{const i=new IntersectionObserver((t=>{for(const n of t)if(n.isIntersecting)return e(),void i.disconnect()}),{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))i.observe(e)}))},R=new Set;let q,W=null;function V(t){R.add(t),null==W&&(W=requestAnimationFrame((()=>{W=null;const t=new Set(R);if(R.clear(),O.size)t:for(const e of t)for(const t of O.keys()){const i=e instanceof Element&&e.matches(t)?e:e.querySelector(t);if(customElements.get(t)||i){const e=i?.getAttribute("data-load-on")||"ready",n=e in F?F[e]:F.ready;for(const e of O.get(t)||[])n(t).then(e);if(O.delete(t),!O.size)break t}}})))}const B=Symbol.for("catalyst");class ${constructor(t,e){const i=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){i.connectedCallback(this,n)};const s=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){i.disconnectedCallback(this,s)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,e,n){i.attributeChangedCallback(this,t,e,n,o)};let r=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return i.observedAttributes(this,r)},set(t){r=t}}),function(t){let e=t.observedAttributes||[];const i=t.attrPrefix??"data-",n=t=>x(`${i}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[..._(t.prototype,M)].map(n).concat(e),set(t){e=t}})}(t),function(t,e){const i=e||C(t.name).replace(/-element$/,"");try{window.customElements.define(i,t),window[t.name]=customElements.get(i)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t,e)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),k(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){q||(q=new MutationObserver((t=>{if(O.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&V(t)}))),V(t),q.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,i,n,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,i,n)}}function _(t,e){if(!Object.prototype.hasOwnProperty.call(t,B)){const e=t[B],i=t[B]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[B];return i.has(e)||i.set(e,new Set),i.get(e)}function U(t,e){_(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase();if(t.shadowRoot)for(const n of t.shadowRoot.querySelectorAll(`[data-target~="${i}.${e}"]`))if(!n.closest(i))return n;for(const n of t.querySelectorAll(`[data-target~="${i}.${e}"]`))if(n.closest(i)===t)return n}(this,e)}})}function j(t,e){_(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase(),n=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)||n.push(s);for(const s of t.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)===t&&n.push(s);return n}(this,e)}})}function z(t){if("string"==typeof t)return e=>{new $(e,t)};new $(t)}var K;class Y{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const i=t.querySelector(".ActionListItem-truncationTooltip");if(!i)continue;const n=e.scrollWidth>e.clientWidth;i.style.display=n?"":"none"}}}let G=class ActionListElement extends HTMLElement{constructor(){super(...arguments),K.set(this,void 0)}connectedCallback(){v(this,K,new Y(this),"f")}disconnectedCallback(){b(this,K,"f").unobserve(this)}};K=new WeakMap,G=g([z("action-list")],G);const Z={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},J={start:["end","center"],end:["start","center"],center:["end","start"]};function X(t,e,i={}){const{positionedParent:n,clippingNode:s,positionedParentStyle:o,clippingNodeStyle:r}=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return{positionedParent:document.body,clippingNode:document.body,positionedParentStyle:null,clippingNodeStyle:null};let e=null,i=null,n=null,s=null,o=t.parentNode;for(;null!==o&&o!==document.body;){if(o instanceof HTMLElement){const t=getComputedStyle(o);if(e||"static"===t.position||(e=o,n=t),i||"visible"===t.overflow||(i=o,s=t),e&&i)break}o=o.parentNode}return{positionedParent:null!=e?e:document.body,clippingNode:null!=i?i:document.body,positionedParentStyle:n,clippingNodeStyle:s}}(t),a=function(t,e=null){const i=t.getBoundingClientRect(),n=e||getComputedStyle(t),s=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderLeftWidth,10)||0,r=parseInt(n.borderRightWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0;return{top:i.top+s,left:i.left+o,width:i.width-r-o,height:Math.max(i.height-s-a,t===document.body?window.innerHeight:-1/0)}}(s,r),l=o||getComputedStyle(n),c=n.getBoundingClientRect(),[h,d]=[l.borderTopWidth,l.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,i,n,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l,displayInViewport:c},h){let d=t;c&&(d={top:0,left:0,width:h.width,height:h.height});const u={top:d.top-e.top,left:d.left-e.left,width:d.width,height:d.height};let m=tt(i,n,s,o,a,l),f=s,p=o;if(m.top-=e.top,m.left-=e.left,!r){const t=Z[s];let r=0;if(t){let c=s;for(;r<t.length&&et(c,m,u,i);){const s=t[r++];c=s,m=tt(i,n,s,o,a,l),m.top-=e.top,m.left-=e.left,f=s}}const h=J[o];let g=0;if(h){let t=o;for(;g<h.length&&it(t,m,u,i);){const s=h[g++];t=s,m=tt(i,n,f,s,a,l),m.top-=e.top,m.left-=e.left,p=s}}m.top<u.top&&(m.top=u.top),m.left<u.left&&(m.left=u.left),m.left+i.width>d.width+u.left&&(m.left=d.width+u.left-i.width),(c||t&&r<t.length)&&m.top+i.height>d.height+u.top&&(m.top=Math.max(d.height+u.top-i.height,0))}return Object.assign(Object.assign({},m),{anchorSide:f,anchorAlign:p})}(a,{top:c.top+h,left:c.left+d},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,i,n,s,o,r;const a=null!==(e=t.side)&&void 0!==e?e:Q.side,l=null!==(i=t.align)&&void 0!==i?i:Q.align;return{side:a,align:l,anchorOffset:null!==(n=t.anchorOffset)&&void 0!==n?n:"inside-center"===a?0:Q.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==l&&a.startsWith("inside")?Q.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:Q.allowOutOfBounds,displayInViewport:null!==(r=t.displayInViewport)&&void 0!==r?r:Q.displayInViewport}}(i),{width:window.innerWidth,height:window.innerHeight})}const Q={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1,displayInViewport:!1};function tt(t,e,i,n,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===i?l=e.top-s-t.height:"outside-bottom"===i?l=a+s:"outside-left"===i?c=e.left-s-t.width:"outside-right"===i&&(c=r+s),"outside-top"!==i&&"outside-bottom"!==i||(c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==i&&"outside-right"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===i?l=e.top+s:"inside-bottom"===i?l=a-s-t.height:"inside-left"===i?c=e.left+s:"inside-right"===i?c=r-s-t.width:"inside-center"===i&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===i||"inside-bottom"===i?c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==i&&"inside-right"!==i&&"inside-center"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function et(t,e,i,n){return"outside-top"===t||"outside-bottom"===t?e.top<i.top||e.top+n.height>i.height+i.top:e.left<i.left||e.left+n.width>i.width+i.left}function it(t,e,i,n){return"end"===t?e.left<i.left:"start"===t||"center"===t?e.left+n.width>i.left+i.width||e.left<i.left:void 0}function*nt(t,e={}){var i,n;const s=null!==(i=e.strict)&&void 0!==i&&i,o=null!==(n=e.onlyTabbable)&&void 0!==n&&n?at:rt,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function st(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}const ot=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"]);function rt(t,e=!1){if(t.hidden)return!1;if(t.classList.contains("sentinel"))return!1;if(t instanceof HTMLInputElement&&"hidden"===t.type)return!1;if(ot.has(t.tagName)&&t.disabled)return!1;if(e){const e=t.offsetWidth,i=t.offsetHeight,n=t.offsetParent;if(0===e||0===i)return!1;const s=getComputedStyle(t);if("none"===s.display)return!1;if("hidden"===s.visibility||"collapse"===s.visibility)return!1;const o=s.position;if(!n&&"fixed"!==o&&"sticky"!==o)return!1;if(0===t.getClientRects().length)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function at(t,e=!1){return rt(t,e)&&"-1"!==t.getAttribute("tabindex")}let lt=!1;function ct(){}try{const t=Object.create({},{signal:{get(){lt=!0}}});window.addEventListener("test",ct,t),window.removeEventListener("test",ct,t)}catch(t){}function ht(){lt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,i,n){return"object"==typeof n&&"signal"in n&&n.signal instanceof AbortSignal&&t.call(n.signal,"abort",(()=>{this.removeEventListener(e,i,n)})),t.call(this,e,i,n)}}(),lt=!0)}ht();const dt=[];let ut;const mt="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function ft(t){if(!t)return;const e=t.hasAttribute("data-prevent-scroll-on-focus");t.focus({preventScroll:e})}function pt({onFocus:t}){const e=document.createElement("span");return e.setAttribute("class","sentinel"),e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","true"),e.style.cssText=mt,e.onfocus=t,e}function gt(t,e,i){const n=new AbortController,s=null!=i?i:n.signal;t.setAttribute("data-focus-trap","active");const o=pt({onFocus:()=>{ft(st(t,!0))}}),r=pt({onFocus:()=>{ft(st(t))}});null!==t.querySelector(":scope > span.sentinel")||(t.prepend(o),t.append(r));const a=function(t,e){const i=new MutationObserver((i=>{for(const n of i)if("childList"===n.type&&n.addedNodes.length){for(const t of n.addedNodes)if(t instanceof HTMLElement&&"SPAN"===t.tagName&&t.classList.contains("sentinel"))return;const i=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==i?void 0:i.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return i.observe(t,{childList:!0}),i}(t,[o,r]);let l;function c(i){if(i instanceof HTMLElement&&document.contains(t)){if(t.contains(i))return void(l=i);if(l&&at(l)&&t.contains(l))return void ft(l);if(e&&t.contains(e))return void ft(e);return void ft(st(t))}}const h=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(ut){const t=ut;ut.container.setAttribute("data-focus-trap","suspended"),ut.controller.abort(),dt.push(t)}h.signal.addEventListener("abort",(()=>{ut=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const i=dt.findIndex((e=>e.container===t));i>=0&&dt.splice(i,1),a.disconnect(),function(){const t=dt.pop();t&>(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:h.signal,capture:!0}),c(document.activeElement),ut={container:t,controller:h,initialFocus:e,originalSignal:s};const d=dt.findIndex((e=>e.container===t));if(d>=0&&dt.splice(d,1),!i)return n}let bt;function vt(){return void 0===bt&&(bt=/^mac/i.test(window.navigator.platform)),bt}let wt=1e4;const yt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);class Et{constructor(){this._items=[],this._itemSet=new Set,this._indexMap=new Map}insertAt(t,e){let i;if(e.length<=100)i=e.filter(((t,e,i)=>!this._itemSet.has(t)&&i.indexOf(t)===e));else{const t=new Set;i=[];for(let n=0;n<e.length;n++){const s=e[n];this._itemSet.has(s)||t.has(s)||(t.add(s),i.push(s))}}if(0===i.length)return;const n=Math.max(0,Math.min(t,this._items.length));if(n!==this._items.length)if(0!==n){for(let t=this._items.length-1;t>=n;t--)this._indexMap.set(this._items[t],t+i.length);i.length<=1e4?this._items.splice(n,0,...i):this._chunkedInsert(n,i);for(let t=0;t<i.length;t++){const e=i[t];this._itemSet.add(e),this._indexMap.set(e,n+t)}}else{for(let t=0;t<this._items.length;t++)this._indexMap.set(this._items[t],t+i.length);i.length<=1e4?this._items.splice(0,0,...i):this._chunkedInsert(0,i);for(let t=0;t<i.length;t++)this._itemSet.add(i[t]),this._indexMap.set(i[t],t)}else for(let t=0;t<i.length;t++){const e=i[t];this._indexMap.set(e,this._items.length),this._items.push(e),this._itemSet.add(e)}}_chunkedInsert(t,e){for(let i=0;i<e.length;i+=1e4){const n=e.slice(i,i+1e4);this._items.splice(t+i,0,...n)}}delete(t){if(!this._itemSet.has(t))return!1;const e=this._indexMap.get(t);this._items.splice(e,1),this._itemSet.delete(t),this._indexMap.delete(t);for(let t=e;t<this._items.length;t++)this._indexMap.set(this._items[t],t);return!0}has(t){return this._itemSet.has(t)}indexOf(t){var e;return null!==(e=this._indexMap.get(t))&&void 0!==e?e:-1}get(t){return this._items[t]}get size(){return this._items.length}[Symbol.iterator](){return this._items[Symbol.iterator]()}clear(){this._items=[],this._itemSet.clear(),this._indexMap.clear()}find(t){return this._items.find(t)}}var At;ht(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(At||(At={}));const kt={ArrowLeft:At.ArrowHorizontal,ArrowDown:At.ArrowVertical,ArrowUp:At.ArrowVertical,ArrowRight:At.ArrowHorizontal,h:At.HL,j:At.JK,k:At.JK,l:At.HL,a:At.AD,s:At.WS,w:At.WS,d:At.AD,Tab:At.Tab,Home:At.HomeAndEnd,End:At.HomeAndEnd,PageUp:At.PageUpDown,PageDown:At.PageUpDown,Backspace:At.Backspace},Lt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function Tt(t){const e=Lt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const i=vt();if(i&&t.metaKey||!i&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function St(t,e){const i=t.key,n=1===i.length||2===i.length&&i.charCodeAt(0)>=55296&&i.charCodeAt(0)<=56319,s=function(t){var e,i;if(!(t instanceof HTMLElement))return!1;const n=t.nodeName.toLowerCase(),s=null!==(i=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===n||"textarea"===n||"input"===n&&!yt.has(s)||t.isContentEditable)&&!o}(e),o=e instanceof HTMLSelectElement;if(s&&(n||"Home"===i||"End"===i))return!0;if(o){const e=vt();return!("ArrowDown"!==i||!e||t.metaKey)||!("ArrowDown"!==i||e||!t.altKey)}if(s&&!o){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,n=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===i&&!n)return!0;if("ArrowRight"===i&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===i||"PageDown"===i)return!0;if("ArrowUp"===i&&!n)return!0;if("ArrowDown"===i&&!s)return!0}}return!1}const Ct="data-is-active-descendant",xt="activated-directly",Mt="activated-indirectly",It="data-has-active-descendant";function Dt(t,e){var i,n,s,o,r,a,l;const c=new Et,h=new WeakMap,d=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?At.ArrowAll:At.ArrowVertical)|At.HomeAndEnd,u=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",m=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",f=null==e?void 0:e.activeDescendantControl,p=null==e?void 0:e.onActiveDescendantChanged,g=null!==(o=null==e?void 0:e.ignoreHoverEvents)&&void 0!==o&&o,b=null!==(r=null==e?void 0:e.focusPrependedElements)&&void 0!==r&&r;let v,w=!1;const y=null!==(a=null==e?void 0:e.preventScroll)&&void 0!==a&&a,E="initial"===m&&(null==e?void 0:e.activeDescendantControl);function A(){return c.get(0)}function k(t,e=!1){const i=v;v=t,w=e,f?t&&document.activeElement===f?L(i,t,e):T():(i&&i!==t&&h.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function L(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+wt++),e&&e!==i&&e.removeAttribute(Ct),f&&(n||f.getAttribute("aria-activedescendant")!==i.id)&&(f.setAttribute("aria-activedescendant",i.id),t.setAttribute(It,i.id),i.setAttribute(Ct,n?xt:Mt),null==p||p(i,e,n))}function T(e=v){"first"===m&&(v=void 0),null==f||f.removeAttribute("aria-activedescendant"),t.removeAttribute(It),null==e||e.removeAttribute(Ct);const i=t.querySelectorAll(`[${Ct}]`);for(let t=0;t<i.length;t++)i[t].removeAttribute(Ct);null==p||p(void 0,e,!1)}function S(...t){const i=(null==e?void 0:e.focusableElementFilter)?t.filter((t=>e.focusableElementFilter(t))):t;if(0===i.length)return;const n=function(t){const e=t[0];if(0===c.size)return 0;let i=0,n=c.size-1;for(;i<=n;){const t=Math.floor((i+n)/2);x(e,c.get(t))?n=t-1:i=t+1}return i}(i);c.insertAt(n,i);for(const t of i)h.has(t)||h.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");!E&&(b&&0===n&&!w)?C():E||v||k(A())}function C(){const e=[...nt(t,I)];c.clear(),c.insertAt(0,e);for(const t of e)h.has(t)||h.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");k(A())}function x(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function M(...t){for(const e of t){c.delete(e);const t=h.get(e);if(void 0!==t&&(null===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t),h.delete(e)),e===v){k(A())}}}const I={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};S(...nt(t,I));const D="function"==typeof m?m(document.body):A();E||k(D);const P=new MutationObserver((t=>{const e=new Set,i=new Set,n=new Set,s=new Set;for(const o of t)if("childList"===o.type){for(const t of o.removedNodes)t instanceof HTMLElement&&e.add(t);for(const t of o.addedNodes)t instanceof HTMLElement&&i.add(t)}else if("attributes"===o.type&&o.target instanceof HTMLElement){const t=o.attributeName;!!t&&o.target.hasAttribute(t)?n.add(o.target):s.add(o.target)}if(e.size>0){const t=[];for(const i of e)for(const e of nt(i))t.push(e);t.length>0&&M(...t)}if(n.size>0&&M(...n),i.size>0){const t=[];for(const e of i)for(const i of nt(e,I))t.push(i);t.length>0&&(b?C():S(...t))}s.size>0&&S(...s)}));P.observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const O=new AbortController,H=null!==(l=null==e?void 0:e.abortSignal)&&void 0!==l?l:O.signal;let N;H.addEventListener("abort",(()=>{P.disconnect(),M(...c),c.clear()})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(N=c.indexOf(t.target))}),{signal:H}),f?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&c.has(t.target)&&(f.focus({preventScroll:y}),k(t.target))}),{signal:H}),g||t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;if(t instanceof HTMLElement&&c.has(t))return void k(t);const e=c.find((e=>e.contains(t)));e&&k(e)}),{signal:H,capture:!0}),f.addEventListener("focusin",(()=>{v?L(void 0,v):E||k(A())}),{signal:H}),f.addEventListener("focusout",(()=>{T()}),{signal:H})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==N){if(N>=0){const t=c.get(N);t&&t!==v&&k(t)}N=void 0}else if("previous"===m)k(e.target);else if("closest"===m||"first"===m){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===R?c.size-1:0,e=c.get(t);return void(null==e||e.focus({preventScroll:y}))}k(e.target)}else if("function"==typeof m)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=m(e.relatedTarget);if(t&&c.has(t))return void t.focus({preventScroll:y});console.warn("Element requested is not a known focusable element.")}else k(e.target);R=void 0}),{signal:H});const F=null!=f?f:t;let R;return"closest"===m&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(R=Tt(t))}),{signal:H,capture:!0}),F.addEventListener("keydown",(i=>{var n;if(i.key in Lt){const s=kt[i.key];if(!i.defaultPrevented&&(s&d)>0&&!St(i,document.activeElement)){const s=Tt(i);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(n=document.activeElement)&&void 0!==n?n:void 0,i)),!o){const e=function(){if(!v)return E?-1:0;const e=c.indexOf(v);return-1!==e?e:v===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=c.size-1,n<0&&(n="wrap"===u&&"Tab"!==i.key?c.size-1:0),n>=c.size&&(n="wrap"===u&&"Tab"!==i.key?0:c.size-1),e!==n&&(o=c.get(n))}f?k(o||v,!0):o&&(R=s,o.focus({preventScroll:y})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:H}),O}var Pt,Ot,Ht,Nt,Ft,Rt,qt,Wt;const Vt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof $t&&t.update()}})),Bt=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof $t&&t.update()}}));let $t=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Pt.add(this),Ot.set(this,null),Ht.set(this,!1)}connectedCallback(){Bt.observe(this),Vt.observe(this),this.style.overflow="visible",this.update()}disconnectedCallback(){Bt.unobserve(this),Vt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}update(){b(this,Ht,"f")||(v(this,Ht,!0,"f"),requestAnimationFrame((()=>{v(this,Ht,!1,"f"),b(this,Pt,"m",Nt).call(this)})))}};Ot=new WeakMap,Ht=new WeakMap,Pt=new WeakSet,Nt=function(){const t=b(this,Pt,"a",Ft);if(!t)return;const e=t.getBoundingClientRect().top,i=b(this,Pt,"a",Wt),n=Array.from(this.items,(t=>({top:t.getBoundingClientRect().top,isDivider:t.classList.contains("ActionBar-divider")})));let s=!1;for(let t=0;t<n.length;t++){const o=n[t];o.isDivider?s=!0:(o.top>e?(b(this,Pt,"m",qt).call(this,t,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),s&&b(this,Pt,"m",qt).call(this,t-1,i)):(b(this,Pt,"m",Rt).call(this,t,i),t===this.items.length-1&&(this.moreMenu.hidden=!0),s&&b(this,Pt,"m",Rt).call(this,t-1,i)),s=!1)}b(this,Ot,"f")&&b(this,Ot,"f").abort(),v(this,Ot,Dt(this,{bindKeys:At.ArrowHorizontal|At.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),i=e>-1&&"visible"===this.items[e].style.visibility,n=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return i||n}}),"f")},Ft=function(){return this.items.find((t=>!t.classList.contains("ActionBar-divider")))??null},Rt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","visible"),n.hidden=!0)},qt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","hidden"),n.hidden=!1)},Wt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},g([j],$t.prototype,"items",void 0),g([U],$t.prototype,"itemContainer",void 0),g([U],$t.prototype,"moreMenu",void 0),$t=g([z("action-bar")],$t),window.ActionBarElement=$t;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const i=[jt(t,"compositionstart",(t=>ee(this,t))),jt(t,"compositionend",(t=>ee(this,t))),jt(t,"click",(e=>Jt(t,e))),jt(t,"change",(e=>Jt(t,e))),jt(t,"keydown",(e=>function(t,e,i){if(!(i instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const n=_t.get(e);if(!n||n.isComposing)return;const s=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":t.hasAttribute("open")&&(te(t),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Gt(t,!0);e&&e.focus(),i.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Gt(t,!1);e&&e.focus(),i.preventDefault()}break;case"n":if(Zt&&i.ctrlKey){const e=Gt(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(Zt&&i.ctrlKey){const e=Gt(t,!1);e&&e.focus(),i.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&Qt(e)&&e.closest("details")===t&&(i.preventDefault(),i.stopPropagation(),e.click())}}}(t,this,e))),jt(t,"toggle",(()=>zt(t,this)),{once:!0}),jt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const i=e.closest("details");i&&i!==t&&!i.contains(t)&&i.removeAttribute("open")}}(t))),this.preload?jt(t,"mouseover",(()=>zt(t,this)),{once:!0}):Ut,...Kt(t)];_t.set(this,{subscriptions:i,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=_t.get(this);if(t){_t.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const _t=new WeakMap,Ut={unsubscribe(){}};function jt(t,e,i,n=!1){return t.addEventListener(e,i,n),{unsubscribe:()=>{t.removeEventListener(e,i,n)}}}function zt(t,e){const i=e.getAttribute("src");if(!i)return;const n=_t.get(e);if(!n)return;if(n.loaded)return;n.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>Yt(t))),s.setAttribute("src",i))}function Kt(t){let e=!1;return[jt(t,"mousedown",(()=>e=!0)),jt(t,"keydown",(()=>e=!1)),jt(t,"toggle",(()=>{t.hasAttribute("open")&&(Yt(t)||e||function(t){const e=document.activeElement;if(e&&Qt(e)&&t.contains(e))return;const i=Gt(t,!0);i&&i.focus()}(t))}))]}function Yt(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Gt(t,e){const i=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),n=document.activeElement,s=n instanceof HTMLElement?i.indexOf(n):-1,o=e?i[s+1]:i[s-1],r=e?i[0]:i[i.length-1];return o||r}const Zt=navigator.userAgent.match(/Macintosh/);function Jt(t,e){const i=e.target;if(i instanceof Element&&i.closest("details")===t)if("click"===e.type){const e=i.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const n=e.querySelector("input");if("LABEL"===e.tagName&&i===n)return;"LABEL"===e.tagName&&n&&!n.checked||Xt(e,t)}else if("change"===e.type){const e=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Xt(e,t)}}function Xt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const i=t.closest("details-menu");if(!i)return;i.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const i=e.querySelector("[data-menu-button]");if(!i)return;const n=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(n)i.textContent=n;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(i.innerHTML=e)}}(t,e),function(t,e){for(const i of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=i.querySelector('input[type="radio"], input[type="checkbox"]');let n=(i===t).toString();e instanceof HTMLInputElement&&(n=e.indeterminate?"mixed":e.checked.toString()),i.setAttribute("aria-checked",n)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&te(e),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function Qt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function te(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function ee(t,e){const i=_t.get(t);i&&(i.isComposing="compositionstart"===e.type)}var ie,ne,se,oe,re,ae,le,ce,he,de,ue,me;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const fe={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},pe={start:["end","center"],end:["start","center"],center:["end","start"]},ge=(()=>{const t=new Set,e=new Set;let i=null,n=null;function s(){for(const i of e)(i.displayInViewport?i.checkVisibility():t.has(i))&&i.update()}function o(){for(const t of e)t.displayInViewport&&t.checkVisibility()&&t.update()}function r(t){const i=t.target;if(i instanceof Node)for(const t of e)t.displayInViewport&&!t.contains(i)&&i.contains(t.anchorElement)&&t.checkVisibility()&&t.update()}return a=>{e.add(a),window.addEventListener("resize",s),window.addEventListener("scroll",s),window.addEventListener("scroll",r,!0);const l=a.ownerDocument.defaultView?.visualViewport;return l?.addEventListener("resize",o),l?.addEventListener("scroll",o),i||(i=new IntersectionObserver((i=>{for(const n of i){const i=n.target;n.isIntersecting&&e.has(i)?(i.update(),t.add(i)):t.delete(i)}}))),n||(n=new ResizeObserver(s)),n.observe(a.ownerDocument.documentElement),n.observe(a),i.observe(a),()=>{e.delete(a),t.delete(a),n?.unobserve(a),i?.unobserve(a)}}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),ie.add(this),ne.set(this,null),se.set(this,void 0),oe.set(this,(()=>this.update())),ae.set(this,void 0),le.set(this,null),ce.set(this,null),he.set(this,null),me.set(this,(()=>{const t=b(this,ie,"m",ue).call(this),e=b(this,le,"f");t&&e&&t.id===e.id&&(t.clientWidth!==e.clientWidth||t.clientHeight!==e.clientHeight||t.scrollHeight!==e.scrollHeight||t.top!==e.top||t.height!==e.height)||v(this,le,t,"f")}))}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,ne,"f"))return b(this,ne,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,ne,t,"f"),b(this,ne,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}get displayInViewport(){return this.hasAttribute("display-in-viewport")}set displayInViewport(t){this.toggleAttribute("display-in-viewport",t)}connectedCallback(){this.addEventListener("beforetoggle",b(this,oe,"f")),this.addEventListener("scroll",b(this,me,"f")),v(this,se,ge(this),"f"),this.update()}disconnectedCallback(){b(this,se,"f")?.call(this),v(this,se,void 0,"f"),b(this,ce,"f")?.disconnect(),v(this,he,null,"f"),this.removeEventListener("beforetoggle",b(this,oe,"f")),this.removeEventListener("scroll",b(this,me,"f")),cancelAnimationFrame(b(this,ae,"f")),v(this,le,null,"f")}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,ae,"f")),v(this,ae,requestAnimationFrame((()=>{const t=this.anchorElement,e=this.displayInViewport?t:null;b(this,he,"f")!==e&&(b(this,ce,"f")?.disconnect(),v(this,he,e,"f"),v(this,le,null,"f"),e&&(v(this,ce,b(this,ce,"f")||new MutationObserver((t=>{b(this,me,"f").call(this),t.some((t=>"attributes"!==t.type))&&this.displayInViewport&&this.checkVisibility()&&this.update()})),"f"),b(this,ce,"f").observe(e,{attributes:!0,attributeFilter:["aria-activedescendant"]}),b(this,ce,"f").observe(this,{childList:!0,characterData:!0,subtree:!0}))),b(this,me,"f").call(this);const i=b(this,le,"f"),n=this.ownerDocument.defaultView?.visualViewport,s=new DOMRect(n?.offsetLeft??0,n?.offsetTop??0,n?.width??this.ownerDocument.documentElement.clientWidth,n?.height??this.ownerDocument.documentElement.clientHeight);if(this.classList.toggle("not-anchored",!t),t&&this.displayInViewport){const e=t.getBoundingClientRect(),i=this.scrollTop;this.style.setProperty("--anchored-position-available-width",`${s.width}px`);let n=Math.min(s.height,Math.max(e.top-s.top-this.anchorOffset,s.bottom-e.bottom-this.anchorOffset,0)),o=0;for(const t of this.querySelectorAll('[role="option"], [data-no-result-found]'))o=Math.max(o,t.getBoundingClientRect().height);const r=Math.max(e.left-s.left-this.anchorOffset,s.right-e.right-this.anchorOffset);if(n<o){const t=parseFloat(getComputedStyle(this).minWidth)||0;!this.allowOutOfBounds&&r>=t&&this.style.setProperty("--anchored-position-available-width",`${Math.min(s.width,r)}px`),this.getBoundingClientRect().width<=r&&(n=s.height)}this.style.setProperty("--anchored-position-available-height",`${n}px`),this.scrollTop=i}else this.style.removeProperty("--anchored-position-available-width"),this.style.removeProperty("--anchored-position-available-height");if(t){const{left:e,top:n}=this.displayInViewport&&!this.allowOutOfBounds?b(this,ie,"m",re).call(this,t,s):X(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto";const o=this.clientHeight,r=b(this,ie,"m",de).call(this);if(this.displayInViewport&&o>0&&r&&i?.visible&&r.id===i.id){const t=this.getBoundingClientRect().top+this.clientTop,e=t+o,i=r.getBoundingClientRect();i.top<t?this.scrollTop+=i.top-t:i.bottom>e&&(this.scrollTop+=i.bottom-e)}v(this,le,b(this,ie,"m",ue).call(this),"f")}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0",v(this,le,null,"f")})),"f"))}}var be,ve,we;function ye(t){t.body.style.getPropertyValue("--dialog-scrollgutter")||t.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-t.body.clientWidth+"px")}function Ee(t){t.body.classList.toggle("has-modal",Boolean(t.querySelector("dialog[open]"))),t.body.classList.toggle("has-modal-disable-scroll",Boolean(t.querySelector("dialog[open].Overlay--disableScroll")))}function Ae(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){const e=document.getElementById(n);if(e instanceof HTMLDialogElement){ye(e.ownerDocument),e.showModal(),t.preventDefault();let n=i,s=!1;for(;n;)n=n.parentElement?.closest("[popover]"),n&&"auto"===n.popover&&(n.classList.add("dialog-inside-popover-fix"),n.popover="manual",n.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0})),Ee(e.ownerDocument)}}if(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n){const t=document.getElementById(n);t instanceof HTMLDialogElement&&t.open&&(t.close(),Ee(t.ownerDocument))}}ne=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,ce=new WeakMap,he=new WeakMap,me=new WeakMap,ie=new WeakSet,re=function(t,e){const i={side:this.side,align:this.align,anchorOffset:this.anchorOffset,alignmentOffset:this.alignmentOffset,allowOutOfBounds:!0};let n=X(this,t,i);const s=t.getBoundingClientRect();if(s.bottom<=e.top||s.top>=e.bottom||s.right<=e.left||s.left>=e.right)return n;const o=X(this,e,{side:"inside-top",align:"start",anchorOffset:0,alignmentOffset:0,allowOutOfBounds:!0}),{width:r,height:a}=this.getBoundingClientRect(),l=o.left+e.width,c=o.top+e.height;for(const e of fe[this.side]||[]){if("outside-top"===n.anchorSide||"outside-bottom"===n.anchorSide?n.top>=o.top&&n.top+a<=c:n.left>=o.left&&n.left+r<=l)break;n=X(this,t,{...i,side:e})}for(const e of pe[this.align]){if(n.left>=o.left&&n.left+r<=l)break;n=X(this,t,{...i,side:n.anchorSide,align:e})}return{top:Math.max(o.top,Math.min(n.top,c-a)),left:Math.max(o.left,Math.min(n.left,l-r))}},de=function(){const t=this.anchorElement?.getAttribute("aria-activedescendant"),e=t?this.ownerDocument.getElementById(t):null;return e&&this.contains(e)?e:null},ue=function(){if(!this.isConnected||!this.displayInViewport||!this.checkVisibility())return null;const t=b(this,ie,"m",de).call(this);if(!t)return null;const e=t.getBoundingClientRect(),i=this.getBoundingClientRect(),n=i.top+this.clientTop,s=i.left+this.clientLeft;return{id:t.id,clientWidth:this.clientWidth,clientHeight:this.clientHeight,scrollHeight:this.scrollHeight,top:e.top-n+this.scrollTop,height:e.height,visible:e.height>0&&e.width>0&&e.top>=n&&e.bottom<=n+this.clientHeight&&e.left>=s&&e.right<=s+this.clientWidth}},AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds","display-in-viewport"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),be.add(this),ve.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,ve,new AbortController,"f");document.addEventListener("click",Ae,!0),document.addEventListener("click",this,{signal:t}),this.dialog?.addEventListener("close",(()=>Ee(this.dialog.ownerDocument)),{signal:t}),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,be,"m",we).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,be,"m",we).call(this)}disconnectedCallback(){b(this,ve,"f")?.abort()}handleEvent(t){const e=t.target,i=this.dialog;if(e!==i||!i?.open)return;if(i.querySelector("form"))return;const n=i.getBoundingClientRect();n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width||i.close()}}ve=new WeakMap,be=new WeakSet,we=function(){if(!this.dialog)return;const{ownerDocument:t}=this.dialog;this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),ye(t),this.dialog.showModal()),Ee(t)},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var ke=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:i="",...n}={}){super(t,n),this.oldState=String(e||""),this.newState=String(i||"")}},Le=new WeakMap;function Te(t,e,i){Le.set(t,setTimeout((()=>{Le.has(t)&&t.dispatchEvent(new ke("toggle",{cancelable:!1,oldState:e,newState:i}))}),0))}var Se=globalThis.ShadowRoot||function(){},Ce=globalThis.HTMLDialogElement||function(){},xe=new WeakMap,Me=new WeakMap,Ie=new WeakMap;function De(t){return Ie.get(t)||"hidden"}var Pe=new WeakMap;function Oe(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===De(t))&&(!(!e&&"hidden"!==De(t))&&(!(t instanceof Ce&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function He(t){return t?Array.from(Me.get(t.ownerDocument)||[]).indexOf(t)+1:0}function Ne(t){const e=qe(t),i=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||Re(t))instanceof Se&&(t=t.host),t instanceof Document)return}}(t);return He(e)>He(i)?e:i}function Fe(t){const e=Me.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function Re(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?Re(t.parentNode):t}function qe(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Ie.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||Re(t))instanceof Se&&(t=t.host),t instanceof Document)return}}function We(t){return!(t.hidden||t instanceof Se)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function Ve(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let i=e.querySelector("[autofocus]");if(i)return i;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(i=e.querySelector("[autofocus]"),i)return i}}}const n=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){if(We(s))return s;s=n.nextNode()}})(t)?.focus()}var Be=new WeakMap;function $e(t){if(!Oe(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new ke("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Oe(t,!1))return;let i=!1;if("auto"===t.popover){const i=t.getAttribute("popover");if(je(function(t){const e=new Map;let i=0;for(const n of Me.get(t.ownerDocument)||[])e.set(n,i),i+=1;e.set(t,i),i+=1;let n=null;return function(t){const i=qe(t);if(null===i)return null;const s=e.get(i);(null===n||e.get(n)<s)&&(n=i)}(t.parentElement||Re(t)),n}(t)||e,!1,!0),i!==t.getAttribute("popover")||!Oe(t,!1))return}Fe(e)||(i=!0),Be.delete(t);const n=e.activeElement;t.classList.add(":popover-open"),Ie.set(t,"showing"),xe.has(e)||xe.set(e,new Set),xe.get(e).add(t),Ve(t),"auto"===t.popover&&(Me.has(e)||Me.set(e,new Set),Me.get(e).add(t),Ge(Pe.get(t),!0)),i&&n&&"auto"===t.popover&&Be.set(t,n),Te(t,"closed","open")}function _e(t,e=!1,i=!1){if(!Oe(t,!0))return;const n=t.ownerDocument;if("auto"===t.popover&&(je(t,e,i),!Oe(t,!0)))return;if(Ge(Pe.get(t),!1),Pe.delete(t),i&&(t.dispatchEvent(new ke("beforetoggle",{oldState:"open",newState:"closed"})),!Oe(t,!0)))return;xe.get(n)?.delete(t),Me.get(n)?.delete(t),t.classList.remove(":popover-open"),Ie.set(t,"hidden"),i&&Te(t,"open","closed");const s=Be.get(t);s&&(Be.delete(t),e&&s.focus())}function Ue(t,e=!1,i=!1){let n=Fe(t);for(;n;)_e(n,e,i),n=Fe(t)}function je(t,e,i){const n=t.ownerDocument||t;if(t instanceof Document)return Ue(n,e,i);let s=null,o=!1;for(const e of Me.get(n)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return Ue(n,e,i);for(;s&&"showing"===De(s)&&Me.get(n)?.size;)_e(s,e,i)}var ze=new WeakMap;function Ke(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const i=e.ownerDocument;if(!Fe(i))return;const n=Ne(e);if(n&&"pointerdown"===t.type)ze.set(i,n);else if("pointerup"===t.type){const t=ze.get(i)===n;ze.delete(i),t&&je(n||i,!1,!0)}}var Ye=new WeakMap;function Ge(t,e=!1){if(!t)return;Ye.has(t)||Ye.set(t,t.getAttribute("aria-expanded"));const i=t.popoverTargetElement;if(i instanceof HTMLElement&&"auto"===i.popover)t.setAttribute("aria-expanded",String(e));else{const e=Ye.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var Ze=globalThis.ShadowRoot||function(){};function Je(t,e,i){const n=t[e];Object.defineProperty(t,e,{value(t){return n.call(this,i(t))}})}var Xe=/(^|[^\\]):popover-open\b/g;function Qe(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var ti,ei,ii,ni,si=null;function oi(t){const e=Qe();if(null===si)try{(si=new CSSStyleSheet).replaceSync(e)}catch{si=!1}if(!1===si){const i=document.createElement("style");i.textContent=e,t instanceof Document?t.head.prepend(i):t.prepend(i)}else t.adoptedStyleSheets=[si,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Xe,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||ke,Je(Document.prototype,"querySelector",t),Je(Document.prototype,"querySelectorAll",t),Je(Element.prototype,"querySelector",t),Je(Element.prototype,"querySelectorAll",t),Je(Element.prototype,"matches",t),Je(Element.prototype,"closest",t),Je(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){$e(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){_e(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===Ie.get(this)&&void 0===t||!1===t?_e(this,!0,!0):void 0!==t&&!0!==t||$e(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const i=e.call(this,t);return oi(i),i}}});const i=HTMLElement.prototype.attachInternals;i&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=i.call(this);return t.shadowRoot&&oi(t.shadowRoot),t}}});const n=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),n.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),n.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=n.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return n.delete(this),null;const e=Re(this),i=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof Ze)&&i&&e.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),i=e[0];if(!(i instanceof Element)||i?.shadowRoot)return;const n=Re(i);if(!(n instanceof Ze||n instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const i=De(e);"show"===t.popoverTargetAction&&"showing"===i||"hide"===t.popoverTargetAction&&"hidden"===i||("showing"===i?_e(e,!0,!0):Oe(e,!1)&&(Pe.set(e,t),$e(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,i=t.target;t.defaultPrevented||!i||"Escape"!==e&&"Esc"!==e||je(i.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Ke),t.addEventListener("pointerup",Ke)})(document),oi(document)}();const ri=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),ai=t=>t.textContent?.trim()[0].toLowerCase(),li=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),ti.add(this),ei.set(this,null),ii.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,ii,new AbortController,"f");const{signal:t}=b(this,ii,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,ii,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(ri)){b(this,ei,"f")?.abort();const{signal:e}=v(this,ei,new AbortController,"f");for(const i of b(this,ti,"a",ni)){i.setAttribute("tabindex",i===t.target?"0":"-1");const n=t.target.closest("[popover]");i===t.target&&"auto"===n?.popover&&n.closest("focus-group")===this&&n.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,ei,"f")?.abort(),i.setAttribute("tabindex","-1"),n.id)){const t=this.querySelector(`[popovertarget="${n.id}"]`);t?t.setAttribute("tabindex","0"):b(this,ti,"a",ni)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const n=Array.from(b(this,ti,"a",ni));let s=n.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=n.length-1,t.preventDefault();else{if(!this.mnemonics||!li.test(o))return;{const e=o.toLowerCase(),r=s>0&&ai(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&ai(t)===e)),s<0&&!i&&(s=n.findIndex((t=>ai(t)===e)))}}i&&s<0&&(s=0),!i&&s>=n.length&&(s=0);const r=n.at(Math.min(s,n.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}ei=new WeakMap,ii=new WeakMap,ti=new WeakSet,ni=function(){return this.querySelectorAll(ri)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let ci=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],ci.prototype,"hasOverflow",void 0),g([I],ci.prototype,"labelledBy",void 0),ci=g([z("scrollable-region")],ci),window.ScrollableRegionElement=ci;const hi=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var di,ui,mi,fi;function pi(t){document.activeElement!==t&&t?.focus()}const gi=[];function bi(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){t.stopPropagation();const e=document.getElementById(n);if(e instanceof ModalDialogElement)return e.openButton=i,e.show(),void t.preventDefault()}if(gi.length&&(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n)){const t=document.getElementById(n);if(t instanceof ModalDialogElement){const e=gi.findIndex((t=>t.id===n));gi.splice(e,1),t.close(i.hasAttribute("data-submit-dialog-id"))}}}function vi(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||bi(t)}function wi(t){const e=t.target;if(e?.closest("button"))return;const i=gi[gi.length-1];if(!i)return;!e.closest(`#${i.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(gi.pop(),i.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),di.add(this),ui.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,di,"a",mi)?.classList.remove("Overlay--hidden"),b(this,ui,"f").signal.aborted&&v(this,ui,new AbortController,"f"),gt(this,this.querySelector("[autofocus]"),b(this,ui,"f").signal),gi.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,di,"a",mi)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,ui,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");pi(t?st(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",bi),document.addEventListener("keydown",vi),document.addEventListener("mousedown",wi),this.addEventListener("keydown",(t=>b(this,di,"m",fi).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var yi,Ei,Ai,ki,Li,Ti,Si,Ci;ui=new WeakMap,di=new WeakSet,mi=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},fi=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let xi=class NavListElement extends HTMLElement{constructor(){super(...arguments),yi.add(this),Ei.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Ei,new Y(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Ei,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,yi,"m",Ai).call(this,t);return!!e&&(b(this,yi,"m",Ti).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,yi,"m",ki).call(this,t);return!!e&&(b(this,yi,"m",Ti).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,yi,"m",Li).call(this);return!!t&&(b(this,yi,"m",Ti).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const i=e.closest("button");i&&(this.itemIsExpanded(i)?this.collapseItem(i):this.expandItem(i),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let i=e.closest("button");if(!i){const t=e.getAttribute("aria-labelledby");if(!t)return;i=document.getElementById(t)}this.itemIsExpanded(i)&&"Escape"===t.key&&this.collapseItem(i),t.stopPropagation()}};var Mi,Ii,Di;Ei=new WeakMap,yi=new WeakSet,Ai=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},ki=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},Li=function(){return b(this,yi,"m",ki).call(this,window.location.pathname)},Ti=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,yi,"m",Si).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const i=b(this,yi,"m",Ci).call(this,t);i&&(this.expandItem(i),i.classList.add("ActionListContent--hasActiveSubItem"))},Si=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,yi,"m",Ci).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},Ci=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([j],xi.prototype,"items",void 0),g([U],xi.prototype,"topLevelList",void 0),xi=g([z("nav-list")],xi);let Pi=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),Mi.add(this),Di.set(this,new Y(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const i=await fetch(t);if(!i.ok)return;e=await i.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const i=b(this,Mi,"m",Ii).call(this,document,e);i?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const n=t.target.closest("button").getAttribute("data-list-id");document.getElementById(n).append(i),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var Oi,Hi;Di=new WeakMap,Mi=new WeakSet,Ii=function(t,e){const i=t.createElement("template");return i.innerHTML=e,t.importNode(i.content,!0)},g([U],Pi.prototype,"showMoreItem",void 0),g([j],Pi.prototype,"focusMarkers",void 0),Pi=g([z("nav-list-group")],Pi),window.NavListGroupElement=Pi;let Ni=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),Oi.add(this)}connectedCallback(){b(this,Oi,"m",Hi).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true")}};Oi=new WeakSet,Hi=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([j],Ni.prototype,"items",void 0),Ni=g([z("segmented-control")],Ni),window.customElements.get("segmented-control")||(window.SegmentedControlElement=Ni,window.customElements.define("segmented-control",Ni));let Fi=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const i={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(i.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:i,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const n=e.headers.get("Content-Type");window.Turbo&&this.turbo&&n?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var Ri,qi,Wi,Vi,Bi,$i,_i,Ui,ji,zi,Ki,Yi;g([U],Fi.prototype,"switch",void 0),g([U],Fi.prototype,"loadingSpinner",void 0),g([U],Fi.prototype,"errorIcon",void 0),g([I],Fi.prototype,"turbo",void 0),Fi=g([z("toggle-switch")],Fi),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=Fi,window.customElements.define("toggle-switch",Fi));const Gi=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),Zi="sr-only",Ji=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Xi(t){for(const e of nn)e!==t&&(Gi(e)?e.hidePopover():nn.delete(e))}function Qi(){Xi()}function tn(t){setTimeout((()=>{for(const e of nn)Gi(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const en=new Set,nn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),Ri.add(this),qi.set(this,void 0),Wi.set(this,"center"),Vi.set(this,"outside-bottom"),Bi.set(this,!1),$i.set(this,"mouse"),_i.set(this,!1)}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: min(var(--overlay-width-small), 100vw);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,$i,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Gi(this)?this.hidePopover():t||Gi(this)||this.showPopover()}get hiddenFromView(){return!Gi(this)}connectedCallback(){if(en.add(this),b(this,Ri,"m",zi).call(this),b(this,Ri,"m",Ki).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,Ri,"m",Ui).call(this,!1),v(this,Bi,!0,"f"),b(this,Ri,"m",ji).call(this)}disconnectedCallback(){en.delete(this),nn.delete(this),b(this,qi,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Gi(this);"beforetoggle"===t.type&&t.currentTarget!==this&&v(this,_i,"open"===t.newState,"f");const i=("mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")))&&!b(this,_i,"f"),n="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this&&"open"===t.newState,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||Gi(this)?e&&a&&Gi(this)&&this.hidePopover():(v(this,$i,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,Ri,"m",Ui).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,Ri,"m",ji).call(this):"id"===t||"data-type"===t?b(this,Ri,"m",zi).call(this):"data-direction"===t&&b(this,Ri,"m",Ki).call(this))}}var sn,on;qi=new WeakMap,Wi=new WeakMap,Vi=new WeakMap,Bi=new WeakMap,$i=new WeakMap,_i=new WeakMap,Ri=new WeakSet,Ui=function(t){t?(nn.add(this),this.classList.remove(Zi),Xi(this),b(this,Ri,"m",Yi).call(this)):(nn.delete(this),this.classList.remove(...Ji),this.classList.add(Zi))},ji=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,qi,"f")?.abort(),v(this,qi,new AbortController,"f");const{signal:t}=b(this,qi,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Qi),this.ownerDocument.addEventListener("focusin",tn),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},zi=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Ki=function(){this.classList.remove(...Ji);const t=this.direction;"n"===t?(v(this,Wi,"center","f"),v(this,Vi,"outside-top","f")):"ne"===t?(v(this,Wi,"end","f"),v(this,Vi,"outside-top","f")):"e"===t?(v(this,Wi,"center","f"),v(this,Vi,"outside-right","f")):"se"===t?(v(this,Wi,"end","f"),v(this,Vi,"outside-bottom","f")):"s"===t?(v(this,Wi,"center","f"),v(this,Vi,"outside-bottom","f")):"sw"===t?(v(this,Wi,"start","f"),v(this,Vi,"outside-bottom","f")):"w"===t?(v(this,Wi,"center","f"),v(this,Vi,"outside-left","f")):"nw"===t&&(v(this,Wi,"start","f"),v(this,Vi,"outside-top","f"))},Yi=function(){if(!this.control)return;if(!b(this,Bi,"f")||!Gi(this))return;const t=X(this,this.control,{side:b(this,Vi,"f"),align:b(this,Wi,"f"),anchorOffset:0}),e=t.anchorSide,i=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let n="s";n="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===i?"n":"start"===i?"ne":"nw":"center"===i?"s":"start"===i?"se":"sw",this.classList.add(`tooltip-${n}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let rn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),sn.add(this)}dismiss(){if("remove"===b(this,sn,"a",on)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};sn=new WeakSet,on=function(){return this.getAttribute("data-dismiss-scheme")},g([U],rn.prototype,"titleText",void 0),rn=g([z("x-banner")],rn),window.customElements.get("x-banner")||(window.XBannerElement=rn,window.customElements.define("x-banner",rn));class an{constructor(t,e,{tabInsertsSuggestions:i,defaultFirstOption:n}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==i||i,this.defaultFirstOption=null!=n&&n,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)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":cn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&cn(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=>function(t,e){e.isComposing="compositionstart"===t.type;const i=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!i)return;e.clearSelection()}(t,this),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",ln),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",ln)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(hn)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(hn)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(hn),n=i.indexOf(e);if(n===i.length-1&&1===t||0===n&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:i.length-1;if(e&&n>=0){const e=n+t;e>=0&&e<i.length&&(s=e)}const o=i[s];if(o)for(const t of i)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),dn(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function ln(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function cn(t,e){const i=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!i&&("true"===i.getAttribute("aria-disabled")||i.click(),!0)}function hn(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function dn(t,e){(function(t,e){const i=t.scrollTop,n=i+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=i&&o<=n})(t,e)||(t.scrollTop=e.offsetTop)}const un=window.testScreenReaderDelay||100;class mn{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new an(e,i,{defaultFirstOption:n}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=n,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=i.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 i;return function(...n){clearTimeout(i),i=window.setTimeout((()=>{clearTimeout(i),t(...n)}),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===(s=this.clearButton)||void 0===s||s.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}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const i=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=i,i||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(const 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)}),un)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const i=new URL(e,window.location.href),n=new URLSearchParams(i.search.slice(1));n.append("q",t),i.search=n.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(i).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),i=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,n=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${n} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${n||"No"} results.`),i?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 fn,pn,gn,bn,vn,wn=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},yn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},En=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i};const An=globalThis.HTMLElement||null;class kn extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,En(e,["relatedTarget"])),this.relatedTarget=i}}const Ln=new WeakMap;let Tn=null;class AutoCompleteElement extends An{constructor(){super(...arguments),fn.add(this),pn.set(this,null),gn.set(this,null),vn.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Tn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=wn(this,pn,"f"))||void 0===t?void 0:t.isConnected)return wn(this,pn,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){yn(this,pn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=wn(this,gn,"f"))||void 0===t?void 0:t.isConnected)?wn(this,gn,"f"):this.querySelector("input")}set inputElement(t){yn(this,gn,t,"f"),wn(this,fn,"m",bn).call(this)}connectedCallback(){this.isConnected&&(wn(this,fn,"m",bn).call(this),new MutationObserver((()=>{Ln.get(this)||wn(this,fn,"m",bn).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=Ln.get(this);t&&(t.destroy(),Ln.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=wn(this,vn,"f"))||void 0===e||e.abort();const{signal:i}=yn(this,vn,new AbortController,"f"),n=await fetch(t.toString(),{signal:i,headers:{Accept:"text/fragment+html"}});if(!n.ok)throw new Error(await n.text());if(Tn){return(await Tn).createHTML(await n.text(),n)}return await n.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,i){var n,s;if(e===i)return;const o=Ln.get(this);if(o)switch(this.forElement===(null===(n=Ln.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=Ln.get(this))||void 0===s?void 0:s.input)||wn(this,fn,"m",bn).call(this),t){case"open":null===i?o.close():o.open();break;case"value":null!==i&&(o.input.value=i),this.dispatchEvent(new kn("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}pn=new WeakMap,gn=new WeakMap,vn=new WeakMap,fn=new WeakSet,bn=function(){var t;null===(t=Ln.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");Ln.set(this,new mn(this,i,e,n)),e.setAttribute("role","listbox")};const Sn="undefined"!=typeof globalThis?globalThis:window;try{Sn.AutocompleteElement=Sn.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(Sn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Cn(t){const e=function(t){return t.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g," ").replace(/[\u200B-\u200D\u2060\uFEFF\u180E]/g,"")}(t);if("clipboard"in navigator)return navigator.clipboard.writeText(e);const i=document.body;if(!i)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(e);return i.appendChild(n),function(t){const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const i=document.createRange();i.selectNodeContents(t),e.addRange(i),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}(n),i.removeChild(n),Promise.resolve()}async function xn(t){const e=t.getAttribute("for"),i=t.getAttribute("value");function n(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(i)await Cn(i),n();else if(e){const i="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const o=i.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?Cn(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?Cn(s.href):function(t){return Cn(t.textContent||"")}(s)),n())}}function Mn(t){const e=t.currentTarget;e instanceof HTMLElement&&xn(e)}function In(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),xn(e))}}function Dn(t){t.currentTarget.addEventListener("keydown",In)}function Pn(t){t.currentTarget.removeEventListener("keydown",In)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",Mn),this.addEventListener("focus",Dn),this.addEventListener("blur",Pn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const On="undefined"!=typeof globalThis?globalThis:window;try{On.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(On.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Hn(t){t.style.display="inline-block"}function Nn(t){t.style.display="none"}const Fn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=Fn.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),Fn.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(Nn(e),Hn(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),Fn.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(Hn(e),Nn(i))}(t),Fn.delete(t)}),2e3))}));var Rn,qn=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};class Wn{constructor(t=100){this.max=t,Rn.set(this,new Map)}get(t){const e=qn(this,Rn,"f").get(t);return void 0!==e&&(qn(this,Rn,"f").delete(t),qn(this,Rn,"f").set(t,e)),e}set(t,e){qn(this,Rn,"f").delete(t),qn(this,Rn,"f").set(t,e),qn(this,Rn,"f").size>this.max&&qn(this,Rn,"f").delete(qn(this,Rn,"f").keys().next().value)}clear(){qn(this,Rn,"f").clear()}}Rn=new WeakMap;const Vn=[];function Bn(t){const e=new Wn(t);return Vn.push(e),e}function $n(t,e){return`${t}\0${e?JSON.stringify(e):""}`}"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("languagechange",(function(){for(const t of Vn)t.clear()}));const _n=Bn();function Un(t,e){const i=$n(t,e);let n=_n.get(i);return n||_n.set(i,n=new Intl.DateTimeFormat(t,e)),n}const jn=Bn();function zn(t,e){const i=$n(t,e);let n=jn.get(i);return n||jn.set(i,n=new Intl.RelativeTimeFormat(t,e)),n}const Kn=Bn();function Yn(t,e){const i=$n(t,e);let n=Kn.get(i);return n||Kn.set(i,n=new Intl.NumberFormat(t,e)),n}const Gn=Bn();var Zn,Jn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},Xn=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};const Qn="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const i of t)e.push({type:"element",value:i}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ts=Bn();const es=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],is={minimumIntegerDigits:2};class ns{constructor(t,e={}){Zn.set(this,void 0);let i=String(e.style||"short");"long"!==i&&"short"!==i&&"narrow"!==i&&"digital"!==i&&(i="short");let n="digital"===i?"numeric":i;const s=e.hours||n;n="2-digit"===s?"numeric":s;const o=e.minutes||n;n="2-digit"===o?"numeric":o;const r=e.seconds||n;n="2-digit"===r?"numeric":r;const a=e.milliseconds||n;Jn(this,Zn,{locale:t,style:i,years:e.years||"digital"===i?"short":i,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===i?"short":i,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===i?"short":i,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===i?"short":i,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===i?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===i?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===i?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return Xn(this,Zn,"f")}formatToParts(t){const e=[],i=Xn(this,Zn,"f"),n=i.style,s=i.locale;for(const[o,r]of es){const a=t[o];if("auto"===i[`${o}Display`]&&!a)continue;const l=i[o];let c=Yn(s,"2-digit"===l?is:"numeric"===l?{}:{style:"unit",unit:r,unitDisplay:l}).format(a);"months"===o&&("narrow"===l||"narrow"===n&&c.endsWith("m"))&&(c=c.replace(/(\d+)m$/,"$1mo")),e.push(c)}return function(t,e){const i=`${t}\0${JSON.stringify(e)}`;let n=ts.get(i);return n||ts.set(i,n=new Qn(t,e)),n}(s,{type:"unit",style:"digital"===n?"short":n}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}Zn=new WeakMap;const ss=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,os=Bn(),rs=["style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay"];const as=["year","month","week","day","hour","minute","second","millisecond"],ls=t=>ss.test(t);class cs{constructor(t=0,e=0,i=0,n=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=i,this.days=n,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new cs(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const i=String(t).trim(),n=i.startsWith("-")?-1:1,s=null===(e=i.match(ss))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new cs(...s):new cs}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new cs(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(hs(i,cs.from(t)).getTime()-i),s=Math.abs(hs(i,cs.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){const i=function(t,e){var i;let n=t;for(const t of rs)n+=`\0${null!==(i=e[t])&&void 0!==i?i:""}`;return n}(t,e);let n=os.get(i);return n||os.set(i,n=new ns(t,e)),n.format(this)}}function hs(t,e){const i=new Date(t);return e.sign<0?(i.setUTCSeconds(i.getUTCSeconds()+e.seconds),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCFullYear(i.getUTCFullYear()+e.years)):(i.setUTCFullYear(i.getUTCFullYear()+e.years),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCSeconds(i.getUTCSeconds()+e.seconds)),i}function ds(t,e="second",i=Date.now()){const n=t.getTime()-i;if(0===n)return new cs;const s=Math.sign(n),o=Math.abs(n),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),h=Math.floor(c/30),d=Math.floor(h/12),u=as.indexOf(e);return new cs(u>=0?d*s:0,u>=1?(h-12*d)*s:0,0,u>=3?(c-30*h)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}function us(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const i=t.sign;let n=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),h=Math.abs(t.milliseconds);h>=900&&(c+=Math.round(h/1e3)),(c||l||a||r||o||s||n)&&(h=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||n)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||n)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||n)&&(a=0);const d=e.getFullYear(),u=e.getMonth(),m=e.getDate();if(r>=27||n+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*i+1),t.setDate(0);const a=Math.max(0,m-t.getDate()),l=new Date(e);l.setFullYear(d+n*i),l.setDate(m-a),l.setMonth(u+s*i),l.setDate(m-a+r*i);const c=l.getFullYear()-e.getFullYear(),h=l.getMonth()-e.getMonth(),f=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+h);f<27?(r>=6?(o+=Math.round(r/7),r=0):r=f,s=n=0):p<=11?(s=p,n=0):(s=0,n=c*i),(s||n)&&(r=0)}return n&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||n)&&(o=0),r&&o&&!s&&!n&&(o+=Math.round(r/7),r=0),new cs(n*i,s*i,o*i,r*i,a*i,l*i,c*i,h*i)}function ms(t,e){const i=us(t,e);if(i.blank)return[0,"second"];for(const t of as){if("millisecond"===t)continue;const e=i[`${t}s`];if(e)return[e,t]}return[0,"second"]}var fs,ps,gs,bs,vs,ws,ys,Es,As,ks,Ls,Ts,Ss,Cs,xs,Ms,Is,Ds,Ps,Os=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},Hs=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const Ns=globalThis.HTMLElement||null,Fs=new cs,Rs=new cs(0,0,0,0,0,1);class qs extends Event{constructor(t,e,i,n){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=i,this.newTitle=n}}function Ws(t){const e=t.date;if(!e)return 1/0;const i=Date.now();if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const n=Math.abs(i-e.getTime());let s=36e5;n<6e4?s=1e3:n<36e5&&(s=6e4);const o=Vs(t);if("micro"===t.format&&o){const t=cs.from(o),n=e.getTime()>i?new cs(-(r=t).years,-r.months,-r.weeks,-r.days,-r.hours,-r.minutes,-r.seconds,-r.milliseconds):t,a=hs(e,n).getTime()-i;a>0&&(s=Math.min(s,a))}var r;return s}function Vs(t){const e=t.getAttribute("threshold");return e&&ls(e)?e:null}let Bs;"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("languagechange",(()=>{Bs=void 0}));const $s=new class{constructor(){this.elements=new Set,this.time=1/0,this.updating=!1,this.timer=-1}observe(t){if(this.elements.add(t),this.updating)return;const e=t.date;if(e&&e.getTime()){const e=Ws(t),i=Date.now()+e;(i<this.time||this.time<=Date.now())&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=i)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;this.updating=!0;try{for(const e of this.elements)t=Math.min(t,Ws(e)),e.update()}finally{this.updating=!1}this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Ns{constructor(){super(...arguments),fs.add(this),ps.set(this,!1),gs.set(this,!1),vs.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Ps.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}get timeZone(){var t;return(null===(t=this.closest("[time-zone]"))||void 0===t?void 0:t.getAttribute("time-zone"))||this.ownerDocument.documentElement.getAttribute("time-zone")||void 0}get hourCycle(){var t;const e=(null===(t=this.closest("[hour-cycle]"))||void 0===t?void 0:t.getAttribute("hour-cycle"))||this.ownerDocument.documentElement.getAttribute("hour-cycle");return"h11"===e||"h12"===e||"h23"===e||"h24"===e?e:function(){if(void 0===Bs)try{Bs=!0===new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions().hour12}catch(t){Bs=!1}return Bs}()?"h12":"h23"}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden","time-zone","hour-cycle"]}get onRelativeTimeUpdated(){return Os(this,Ps,"f")}set onRelativeTimeUpdated(t){Os(this,Ps,"f")&&this.removeEventListener("relative-time-updated",Os(this,Ps,"f")),Hs(this,Ps,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&ls(t)?t:"P30D"}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return as.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){$s.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&Hs(this,ps,null!==i&&(this.date&&Os(this,fs,"m",ws).call(this,this.date,Os(this,fs,"a",bs),this.timeZone,this.hourCycle))!==i,"f"),Os(this,gs,"f")||"title"===t&&Os(this,ps,"f")||Hs(this,gs,(async()=>{await Promise.resolve(),this.update(),Hs(this,gs,!1,"f")})(),"f"))}update(){const t=Os(this,vs,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(Os(this,vs,"f").textContent=t);const s=Date.now(),o=Os(this,fs,"a",bs),r=this.timeZone,a=this.hourCycle;Os(this,ps,"f")||(i=Os(this,fs,"m",ws).call(this,n,o,r,a)||"",i&&!this.noTitle&&i!==e&&this.setAttribute("title",i));const l=ds(n,this.precision,s),c=Os(this,fs,"m",Es).call(this,l,ds(n,"millisecond",s));let h=t;const d=Os(this,fs,"m",Ds).call(this,c);h=d?Os(this,fs,"m",Ms).call(this,n,o,r,a):"duration"===c?"micro"===this.format&&"auto"!==this.tense&&Intl.RelativeTimeFormat?Os(this,fs,"m",ks).call(this,l,o):Os(this,fs,"m",Ls).call(this,l,o):"relative"===c?Os(this,fs,"m",Ts).call(this,l,o):Os(this,fs,"m",Ss).call(this,n,o,r,a),h?Os(this,fs,"m",Is).call(this,h):this.shadowRoot===Os(this,vs,"f")&&this.textContent&&Os(this,fs,"m",Is).call(this,this.textContent),h===t&&i===e||this.dispatchEvent(new qs(t,h,e,i));!d&&("relative"===c||"duration"===c)||"micro"===this.format&&Boolean(Os(this,fs,"m",ys).call(this))&&n.getTime()>s||d&&(Os(this,fs,"m",Cs).call(this,n,o,r)||Os(this,fs,"m",xs).call(this,n,o,r))?$s.observe(this):$s.unobserve(this)}}ps=new WeakMap,gs=new WeakMap,vs=new WeakMap,Ps=new WeakMap,fs=new WeakSet,bs=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");if(!e)return"default";try{return function(t){let e=Gn.get(t);return e||Gn.set(t,e=new Intl.Locale(t)),e}(e).toString()}catch(t){return"default"}},ws=function(t,e,i,n){return Un(e,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:i,hourCycle:n}).format(t)},ys=function(){return Vs(this)},Es=function(t,e=t){const i=this.format;if("datetime"===i)return"datetime";if("duration"===i)return"duration";if("elapsed"===i)return"duration";if("micro"===i){const t=Os(this,fs,"m",ys).call(this);return t&&-1===cs.compare(e,t)?"datetime":"duration"}if(("auto"===i||"relative"===i)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===cs.compare(t,this.threshold))return"relative"}return"datetime"},As=function(t){return 0===(t=us(t)).months&&("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)?Rs:t},ks=function(t,e){const i=zn(e,{numeric:"always",style:"narrow"});t=Os(this,fs,"m",As).call(this,t);const[n,s]=ms(t.blank?Rs:t);return i.format(Math.abs(n)*("past"===this.tense?-1:1),s)},Ls=function(t,e){const i=this.format,n=this.formatStyle,s=this.tense;let o=Fs;"micro"===i?(t=Os(this,fs,"m",As).call(this,t),o=Rs):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:n,[r]:"always"}):t.abs().toLocaleString(e,{style:n})},Ts=function(t,e){const i=zn(e,{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Fs),"past"===n&&-1!==t.sign&&(t=Fs);const[s,o]=ms(t);return"second"===o&&s<10?i.format(0,"millisecond"===this.precision?"second":this.precision):i.format(s,o)},Ss=function(t,e,i,n){const s=Un(e,{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName,timeZone:i,hourCycle:n});return`${this.prefix} ${s.format(t)}`.trim()},Cs=function(t,e,i){const n=new Date,s=Un(e,{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"});return s.format(n)===s.format(t)},xs=function(t,e,i){const n=new Date,s=Un(e,{timeZone:i,year:"numeric"});return s.format(n)===s.format(t)},Ms=function(t,e,i,n){const s={hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:i,hourCycle:n};if(Os(this,fs,"m",Cs).call(this,t,e,i)){let i=zn(e,{numeric:"auto"}).format(0,"day");i=i.charAt(0).toLocaleUpperCase(e)+i.slice(1);return`${i} ${Un(e,s).format(t)}`}const o=Object.assign(Object.assign({},s),{day:"numeric",month:"short"});return Os(this,fs,"m",xs).call(this,t,e,i)?Un(e,o).format(t):Un(e,Object.assign(Object.assign({},o),{year:"numeric"})).format(t)},Is=function(t){const e=Os(this,vs,"f"),i=this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden");let n=e.firstElementChild;n&&"root"===n.getAttribute("part")&&1===e.childNodes.length||(n=document.createElement("span"),n.setAttribute("part","root"),e.replaceChildren(n)),i?"true"!==n.getAttribute("aria-hidden")&&n.setAttribute("aria-hidden","true"):n.hasAttribute("aria-hidden")&&n.removeAttribute("aria-hidden"),n.textContent!==t&&(n.textContent=t)},Ds=function(t){var e;return("duration"!==t||"micro"===this.format)&&("true"===this.ownerDocument.documentElement.getAttribute("data-prefers-absolute-time")||"true"===(null===(e=this.ownerDocument.body)||void 0===e?void 0:e.getAttribute("data-prefers-absolute-time")))};const _s="undefined"!=typeof globalThis?globalThis:window;try{_s.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(_s.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Us(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const i=t.target;if(!(i instanceof HTMLElement))return;if(i.closest(this.tagName)!==this)return;if("tab"!==i.getAttribute("role")&&!i.closest('[role="tablist"]'))return;const n=Us(this),s=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=i.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=n.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Us(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const i=t.target.closest('[role="tab"]');if(!(i instanceof HTMLElement&&i.closest('[role="tablist"]')))return;const n=e.indexOf(i);this.selectTab(n)}));for(const t of Us(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Us(this),i=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const n=e[t],s=i[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of i)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),n.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const js="undefined"!=typeof globalThis?globalThis:window;try{js.TabContainerElement=TabContainerElement.define()}catch(t){if(!(js.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let zs=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Ks(t,e=0,{start:i=!1,middle:n=!1,once:s=!1}={}){return function(t,e=0,{start:i=!0,middle:n=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const h=Date.now()-r;r=Date.now(),i?(i=!1,t.apply(this,c),s&&l.cancel()):(n&&h<e||!n)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),n?e-h:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:i,middle:n,once:s})}g([j],zs.prototype,"fields",void 0),zs=g([z("primer-multi-input")],zs),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:zs}),window.customElements.define("primer-multi-input",zs));var Ys,Gs,Zs=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},Js=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};!function(t){t.GET="GET",t.POST="POST"}(Gs||(Gs={}));const Xs=new WeakMap;class Qs extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class to extends Qs{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class eo extends Qs{constructor(){super("complete")}}class io extends Qs{constructor(t){super("success"),this.response=t}}class no extends to{constructor(){super("start","Verifying…")}}class so extends to{constructor(t){super("error","Validation failed"),this.response=t}}class oo extends Qs{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),Ys.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Zs(this,Ys,"f")}set onloadend(t){Zs(this,Ys,"f")&&this.removeEventListener("loadend",Zs(this,Ys,"f")),Js(this,Ys,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Ks(lo.bind(null,this),300),i={check:e,controller:null};Xs.set(this,i);const n=ro.bind(null,e);t.addEventListener("blur",n),t.addEventListener("input",n),t.addEventListener("triggervalidation",n),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=Xs.get(this);e&&(Xs.delete(this),t.removeEventListener("input",ao),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return Gs[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function ro(t,e){const i=e.currentTarget;if(!(i instanceof HTMLInputElement))return;const n=i.closest("auto-check");n instanceof AutoCheckElement&&("input"===e.type&&n.setAttribute("dirty",""),0!==i.value.length&&("blur"===e.type&&!n.validateOnKeystroke&&n.hasAttribute("dirty")||"input"===e.type&&n.validateOnKeystroke||"triggervalidation"===e.type)&&(ao(e),t()))}function ao(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const i=e.closest("auto-check");if(!(i instanceof AutoCheckElement))return;const n=i.src,s=i.csrf,o=i.httpMethod,r=Xs.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new no;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function lo(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=Xs.get(t),r=t.httpMethod;if(!n||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(n,window.location.origin);"POST"===r?(a.append(i,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new oo(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const i=await async function(t,e,i){"GET"===i.method&&delete i.body;try{const n=await fetch(e,i);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),n}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(i.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new io(i.clone()));else{t.validateOnKeystroke=!0;const n=new so(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new eo)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new eo))}}Ys=new WeakMap;const co="undefined"!=typeof globalThis?globalThis:window;try{co.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(co.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}class ho{constructor(t,e,i){this.inputElement=t,this.characterLimitElement=e,this.characterLimitSrElement=i,this.SCREEN_READER_DELAY=500,this.announceTimeout=null,this.isInitialLoad=!0}initialize(t){this.inputElement.addEventListener("keyup",(()=>this.updateCharacterCount()),t?{signal:t}:void 0),this.inputElement.addEventListener("paste",(()=>setTimeout((()=>this.updateCharacterCount()),50)),t?{signal:t}:void 0),this.updateCharacterCount(),this.isInitialLoad=!1}cleanup(){this.announceTimeout&&clearTimeout(this.announceTimeout)}pluralize(t,e){return 1===t?e:`${e}s`}updateCharacterCount(){if(!this.characterLimitElement)return;const t=this.characterLimitElement.getAttribute("data-max-length");if(!t)return;const e=parseInt(t,10)-this.inputElement.value.length;let i="";if(e>=0){i=`${e} ${this.pluralize(e,"character")} remaining`;const t=this.characterLimitElement.querySelector(".FormControl-caption-text");t&&(t.textContent=i),this.clearError()}else{const t=-e;i=`${t} ${this.pluralize(t,"character")} over`;const n=this.characterLimitElement.querySelector(".FormControl-caption-text");n&&(n.textContent=i),this.setError()}this.isInitialLoad||this.announceToScreenReader(i)}announceToScreenReader(t){this.announceTimeout&&clearTimeout(this.announceTimeout),this.announceTimeout=window.setTimeout((()=>{this.characterLimitSrElement&&(this.characterLimitSrElement.textContent=t)}),this.SCREEN_READER_DELAY)}setError(){this.inputElement.setAttribute("invalid","true"),this.inputElement.setAttribute("aria-invalid","true"),this.characterLimitElement.classList.add("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.removeAttribute("hidden")}clearError(){this.inputElement.removeAttribute("invalid"),this.inputElement.removeAttribute("aria-invalid"),this.characterLimitElement.classList.remove("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.setAttribute("hidden","")}}var uo,mo;let fo=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),uo.set(this,void 0),mo.set(this,null)}connectedCallback(){b(this,uo,"f")?.abort();const{signal:t}=v(this,uo,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t}),this.characterLimitElement&&(v(this,mo,new ho(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,mo,"f").initialize(t))}disconnectedCallback(){b(this,uo,"f")?.abort(),b(this,mo,"f")?.cleanup()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const i=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(i)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};var po;uo=new WeakMap,mo=new WeakMap,g([U],fo.prototype,"inputElement",void 0),g([U],fo.prototype,"validationElement",void 0),g([U],fo.prototype,"validationMessageElement",void 0),g([U],fo.prototype,"validationSuccessIcon",void 0),g([U],fo.prototype,"validationErrorIcon",void 0),g([U],fo.prototype,"leadingVisual",void 0),g([U],fo.prototype,"leadingSpinner",void 0),g([U],fo.prototype,"characterLimitElement",void 0),g([U],fo.prototype,"characterLimitSrElement",void 0),fo=g([z("primer-text-field")],fo);let go=class PrimerTextAreaElement extends HTMLElement{constructor(){super(...arguments),po.set(this,null)}connectedCallback(){this.characterLimitElement&&(v(this,po,new ho(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,po,"f").initialize())}disconnectedCallback(){b(this,po,"f")?.cleanup()}};po=new WeakMap,g([U],go.prototype,"inputElement",void 0),g([U],go.prototype,"characterLimitElement",void 0),g([U],go.prototype,"characterLimitSrElement",void 0),go=g([z("primer-text-area")],go),window.customElements.get("primer-text-area")||(Object.assign(window,{PrimerTextAreaElement:go}),window.customElements.define("primer-text-area",go));let bo=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var vo,wo,yo,Eo,Ao,ko,Lo,To,So,Co,xo,Mo,Io,Do,Po,Oo,Ho,No,Fo,Ro,qo;g([U],bo.prototype,"validationElement",void 0),g([U],bo.prototype,"validationMessageElement",void 0),bo=g([z("toggle-switch-input")],bo);const Wo=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'],Vo=Wo.map((t=>`:not([hidden]) > ${t}`));let Bo=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),vo.add(this),wo.set(this,void 0),yo.set(this,""),Eo.set(this,""),Ao.set(this,!1),ko.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const i of t){const t=i.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:i?.getAttribute("data-value"),element:i})}return e}connectedCallback(){const{signal:t}=v(this,wo,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.popoverElement?.addEventListener("toggle",this,{signal:t}),b(this,vo,"m",Fo).call(this),b(this,vo,"m",Ro).call(this),b(this,vo,"m",Lo).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,vo,"m",No).call(this)&&this.overlay?.update()};v(this,ko,new IntersectionObserver((t=>{for(const i of t){i.target===this.invokerElement&&(i.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),hi(this,(()=>Boolean(this.invokerElement)),(()=>b(this,ko,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true")}disconnectedCallback(){b(this,wo,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,vo,"m",Co).call(this,t);if("toggle"===t.type&&"open"===t.newState&&window.requestAnimationFrame((()=>{b(this,vo,"a",qo)?.focus()})),e&&"mousedown"===t.type)return void v(this,Ao,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,vo,"m",xo).call(this,t),void v(this,Ao,!1,"f");if("focusout"===t.type){if(b(this,Ao,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,vo,"m",Po).call(this)}))}const n=t.target.closest(Vo.join(","));if(null!==n&&i){if(b(this,vo,"m",To).call(this,t))return;const e=n.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e))return void b(this,vo,"m",Mo).call(this,t,i)}return b(this,vo,"m",So).call(this,t)&&(t.preventDefault(),n.click()),void b(this,vo,"m",Io).call(this,n)}"include-fragment-replaced"===t.type&&b(this,vo,"m",Do).call(this)}get items(){return Array.from(this.querySelectorAll(Vo.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,vo,"m",Io).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,vo,"m",Io).call(this,e)}}};wo=new WeakMap,yo=new WeakMap,Eo=new WeakMap,Ao=new WeakMap,ko=new WeakMap,vo=new WeakSet,Lo=function(){const{signal:t}=b(this,wo,"f");for(const e of this.querySelectorAll(Wo.join(",")))e.addEventListener("click",b(this,vo,"m",To).bind(this),{signal:t}),e.addEventListener("keydown",b(this,vo,"m",To).bind(this),{signal:t})},To=function(t){if(!b(this,vo,"m",Co).call(this,t))return!1;const e=t.target.closest(Vo.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},So=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Co=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,vo,"m",So).call(this,t)},xo=function(t){t.preventDefault(),t.stopPropagation(),b(this,vo,"m",No).call(this)?b(this,vo,"m",Ho).call(this):b(this,vo,"m",Oo).call(this)},Mo=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,vo,"m",No).call(this)&&b(this,vo,"m",Ho).call(this));const t=this.ownerDocument.activeElement,n=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(n||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},Io=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,vo,"m",No).call(this)&&b(this,vo,"m",Ho).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,vo,"m",Fo).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,vo,"m",Ro).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Do=function(){b(this,vo,"a",qo)?.focus(),b(this,vo,"m",Lo).call(this),this.setAttribute("data-ready","true")},Po=function(){b(this,vo,"m",Ho).call(this)},Oo=function(){this.popoverElement?.showPopover()},Ho=function(){this.popoverElement?.hidePopover()},No=function(){return this.popoverElement?.matches(":popover-open")},Fo=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,yo,b(this,yo,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=this.dynamicLabelPrefix,n.textContent=e.textContent||"",t.replaceChildren(i,n)}else t.textContent=b(this,yo,"f")},Ro=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,Eo,b(this,Eo,"f")||e[0].name,"f");for(const e of this.selectedItems){const i=document.createElement("input");i.setAttribute("data-list-input","true"),i.type="hidden",i.autocomplete="off",i.name=b(this,Eo,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},qo=function(){return this.querySelector(Vo.join(","))},g([U],Bo.prototype,"includeFragment",void 0),g([U],Bo.prototype,"overlay",void 0),Bo=g([z("action-menu")],Bo),window.customElements.get("action-menu")||(window.ActionMenuElement=Bo,window.customElements.define("action-menu",Bo));const $o="less",_o="equal",Uo="greater";var jo,zo,Ko,Yo,Go,Zo=t=>{throw TypeError(t)},Jo=(t,e,i)=>e.has(t)||Zo("Cannot "+i),Xo=(t,e,i)=>(Jo(t,e,"read from private field"),i?i.call(t):e.get(t)),Qo=(t,e,i)=>e.has(t)?Zo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),tr=(t,e,i,n)=>(Jo(t,e,"write to private field"),e.set(t,i),i),er=(t,e,i)=>(Jo(t,e,"access private method"),i);class ir{constructor({compareFn:t}){Qo(this,Ko),Qo(this,jo),Qo(this,zo),tr(this,jo,t),tr(this,zo,[])}insert(t){Xo(this,zo).push(t),er(this,Ko,Go).call(this)}pop(){const t=Xo(this,zo)[0];return Xo(this,zo)[Xo(this,zo).length-1]&&(Xo(this,zo)[0]=Xo(this,zo)[Xo(this,zo).length-1],Xo(this,zo).pop()),er(this,Ko,Yo).call(this),t}peek(){return Xo(this,zo)[0]}delete(t){const e=Xo(this,zo).indexOf(t);-1!==e&&(ur(Xo(this,zo),e,Xo(this,zo).length-1),Xo(this,zo).pop(),er(this,Ko,Yo).call(this))}clear(){tr(this,zo,[])}get size(){return Xo(this,zo).length}}function nr(t){return 2*t+1}function sr(t){return 2*t+2}function or(t){return Math.floor((t-1)/2)}function rr(t,e){return nr(t)<e}function ar(t,e){return sr(t)<e}function lr(t){return t>0}function cr(t,e){return t[nr(e)]}function hr(t,e){return t[sr(e)]}function dr(t,e){return t[or(e)]}function ur(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}jo=new WeakMap,zo=new WeakMap,Ko=new WeakSet,Yo=function(){let t=0;for(;rr(t,Xo(this,zo).length);){let e=nr(t);if(ar(t,Xo(this,zo).length)&&Xo(this,jo).call(this,hr(Xo(this,zo),t),cr(Xo(this,zo),t))===$o&&(e=sr(t)),Xo(this,jo).call(this,Xo(this,zo)[t],Xo(this,zo)[e])===$o)break;ur(Xo(this,zo),t,e),t=e}},Go=function(){let t=Xo(this,zo).length-1;for(;lr(t)&&Xo(this,jo).call(this,Xo(this,zo)[t],dr(Xo(this,zo),t))===$o;)ur(Xo(this,zo),t,or(t)),t=or(t)};var mr,fr,pr,gr,br=Object.defineProperty,vr=t=>{throw TypeError(t)},wr=(t,e,i)=>((t,e,i)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),yr=(t,e,i)=>e.has(t)||vr("Cannot "+i),Er=(t,e,i)=>(yr(t,e,"read from private field"),i?i.call(t):e.get(t)),Ar=(t,e,i)=>e.has(t)?vr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),kr=(t,e,i,n)=>(yr(t,e,"write to private field"),e.set(t,i),i);mr=Symbol.toStringTag;class Lr{constructor(){wr(this,mr,"Deferred"),Ar(this,fr),Ar(this,pr),Ar(this,gr),kr(this,fr,new Promise(((t,e)=>{kr(this,pr,t),kr(this,gr,e)})))}then(t,e){return Promise.prototype.then.apply(Er(this,fr),[t,e])}catch(t){return Promise.prototype.catch.apply(Er(this,fr),[t])}finally(t){return Promise.prototype.finally.apply(Er(this,fr),[t])}resolve(t){Er(this,pr).call(this,t)}reject(t){Er(this,gr).call(this,t)}getPromise(){return Er(this,fr)}}fr=new WeakMap,pr=new WeakMap,gr=new WeakMap;var Tr,Sr,Cr,xr,Mr,Ir,Dr=t=>{throw TypeError(t)},Pr=(t,e,i)=>e.has(t)||Dr("Cannot "+i),Or=(t,e,i)=>(Pr(t,e,"read from private field"),i?i.call(t):e.get(t)),Hr=(t,e,i)=>e.has(t)?Dr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Nr=(t,e,i,n)=>(Pr(t,e,"write to private field"),e.set(t,i),i),Fr=(t,e,i)=>(Pr(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),Hr(this,xr),Hr(this,Tr),Hr(this,Sr),Hr(this,Cr),!this.shadowRoot){const t=function(){if(Rr)return Rr;return Rr=document.createElement("template"),Rr.innerHTML=qr,Rr}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Nr(this,Tr,!1),Nr(this,Cr,null),Nr(this,Sr,new ir({compareFn:Wr}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:i,politeness:n="polite"}=e,s=Date.now(),o=new Lr,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Or(this,Sr).insert(r),Fr(this,xr,Mr).call(this),{...o.getPromise(),cancel:()=>{Or(this,Sr).delete(r),o.resolve()}}}announceFromElement(t,e){const i=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==i)return this.announce(i,e);return{...Promise.resolve(),cancel:Vr}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==Or(this,Cr)&&(clearTimeout(Or(this,Cr)),Nr(this,Cr,null)),Nr(this,Tr,!1),Or(this,Sr).clear()}}Tr=new WeakMap,Sr=new WeakMap,Cr=new WeakMap,xr=new WeakSet,Mr=function(){if(Or(this,Tr))return;let t=Or(this,Sr).peek();if(!t)return;null!==Or(this,Cr)&&(clearTimeout(Or(this,Cr)),Nr(this,Cr,null));const e=Date.now();if(t.scheduled<=e)return t=Or(this,Sr).pop(),t&&Fr(this,xr,Ir).call(this,t),void Fr(this,xr,Mr).call(this);const i=t.scheduled-e;Nr(this,Cr,window.setTimeout((()=>{Nr(this,Cr,null),Fr(this,xr,Mr).call(this)}),i))},Ir=function(t){Nr(this,Tr,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw Nr(this,Tr,!1),new Error(`Unable to find container for message. Expected a container with id="${n}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==Or(this,Cr)&&clearTimeout(Or(this,Cr)),i.resolve(),this.delay>0?Nr(this,Cr,window.setTimeout((()=>{Nr(this,Cr,null),Nr(this,Tr,!1),Fr(this,xr,Mr).call(this)}),this.delay)):(Nr(this,Cr,null),Nr(this,Tr,!1),Fr(this,xr,Mr).call(this))};let Rr=null;const qr='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function Wr(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?_o:t.scheduled<e.scheduled?$o:Uo:"assertive"===t.politeness&&"assertive"!==e.politeness?$o:"assertive"!==t.politeness&&"assertive"===e.politeness?Uo:_o}function Vr(){}var Br,$r,_r,Ur,jr,zr,Kr,Yr,Gr,Zr,Jr,Xr,Qr,ta,ea,ia,na,sa,oa,ra,aa,la,ca,ha,da,ua,ma,fa,pa,ga,ba,va,wa,ya,Ea,Aa,ka,La,Ta,Sa;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Ca=['[role="option"]'],xa=Ca.join(","),Ma=Ca.map((t=>`:not([hidden]) > ${t}`)).join(",");var Ia,Da;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Ia||(Ia={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Da||(Da={}));const Pa=(()=>{const t=new Set;let e=null;function i(){for(const e of t)e.updateAnchorPosition()}return n=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(n.ownerDocument.documentElement),n.addEventListener("dialog:close",(()=>{n.invokerElement?.setAttribute("aria-expanded","false"),t.delete(n)})),n.addEventListener("dialog:open",(()=>{t.add(n)}))}})();let Oa=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),Br.add(this),$r.set(this,void 0),_r.set(this,void 0),Ur.set(this,""),jr.set(this,""),zr.set(this,new Map),Kr.set(this,null),Yr.set(this,null),Gr.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,zr,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=X(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,_r,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,Br,"m",Ea).call(this),b(this,Br,"m",Aa).call(this),b(this,Br,"m",Zr).call(this),Pa(this),hi(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),hi(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,$r,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,Br,"a",pa)===Ia.LOCAL&&b(this,Br,"m",ha).call(this))}})),"f"),hi(this,(()=>Boolean(this.dialog)),(()=>{b(this,$r,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,Br,"a",pa)===Ia.LOCAL&&hi(this,(()=>this.items.length>0),(()=>{b(this,Br,"m",ha).call(this),b(this,Br,"m",Aa).call(this)}))}disconnectedCallback(){b(this,_r,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,Br,"m",ca).call(this,t);if(t.target===this.remoteInput)return void b(this,Br,"m",aa).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,Br,"m",ta).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return void b(this,Br,"m",va).call(this,t);if(i&&n)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Ma)){const e=t.ctrlKey||t.altKey||t.metaKey,i=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&i&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Ma)?.parentElement;if(null!=s&&n){if(b(this,Br,"m",Xr).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e)&&this.contains(i))return void b(this,Br,"m",wa).call(this,t,i)}return b(this,Br,"m",Qr).call(this,t)&&(t.preventDefault(),b(this,Br,"m",Sa).call(this,s)?.click()),void b(this,Br,"m",ya).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,Br,"m",oa).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Ma)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(xa)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,Br,"m",Sa).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,Br,"m",Sa).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,Br,"m",Sa).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,Br,"m",Sa).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,Br,"m",ya).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,Br,"m",ya).call(this,t)}};$r=new WeakMap,_r=new WeakMap,Ur=new WeakMap,jr=new WeakMap,zr=new WeakMap,Kr=new WeakMap,Yr=new WeakMap,Gr=new WeakMap,Br=new WeakSet,Zr=function(){const{signal:t}=b(this,_r,"f");for(const e of this.querySelectorAll(Ca.join(",")))e.addEventListener("click",b(this,Br,"m",Xr).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Br,"m",Xr).bind(this),{signal:t})},Jr=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,Br,"m",Sa).call(this,e);i&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?i.setAttribute("tabindex","-1"):(i.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,Br,"m",Sa).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,Br,"a",ka)&&b(this,Br,"m",Sa).call(this,b(this,Br,"a",ka))?.setAttribute("tabindex","0")},Xr=function(t){if(!b(this,Br,"m",ta).call(this,t))return!1;const e=t.target.closest(Ma);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Qr=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},ta=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Br,"m",Qr).call(this,t)},ea=function(){for(const t of this.items){const e=b(this,Br,"m",Sa).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,zr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,Br,"m",Aa).call(this)},ia=function(t){const e=b(this,Br,"m",Sa).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,zr,"f").set(i,{value:i,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},na=function(t){const e=b(this,Br,"m",Sa).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,zr,"f").delete(i)},sa=function(){b(this,Br,"a",ga)&&(b(this,Kr,"f")&&clearTimeout(b(this,Kr,"f")),b(this,Yr,"f")&&clearTimeout(b(this,Yr,"f")),v(this,Yr,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,Kr,setTimeout((()=>{b(this,Br,"a",ga)?.showLeadingSpinner()}),1e3),"f"))},oa=function(t){switch(t.type){case"include-fragment-replaced":b(this,Br,"m",ha).call(this);break;case"loadstart":b(this,Br,"m",ra).call(this,!1);break;case"loadend":b(this,Br,"a",ga)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,Br,"m",ra).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},ra=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},aa=function(t){switch(t.type){case"remote-input-success":b(this,Br,"m",ma).call(this),b(this,Br,"m",ha).call(this),b(this,Br,"m",ea).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,Br,"m",ua).call(this,Da.BODY):b(this,Br,"m",ua).call(this,Da.BANNER);break;case"loadstart":if(!b(this,Br,"m",ba).call(this)){if(b(this,Br,"m",ma).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,Br,"m",sa).call(this)}break;case"loadend":b(this,Br,"a",ga)?.hideLeadingSpinner(),b(this,Yr,"f")&&clearTimeout(b(this,Yr,"f")),b(this,Kr,"f")&&clearTimeout(b(this,Kr,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},la=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},ca=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,Br,"m",Sa).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,Br,"m",Sa).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const i=b(this,Br,"m",Sa).call(this,e);i&&i.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],i=b(this,Br,"m",Sa).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,Br,"m",ba).call(this)||b(this,Br,"m",sa).call(this),b(this,Br,"a",pa)===Ia.LOCAL||b(this,Br,"a",pa)===Ia.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,Br,"m",ha).call(this)}},ha=function(){if(!this.list)return;let t=!1;if(b(this,Br,"m",ba).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,Br,"m",la);for(const n of this.items)i(n,e)?(b(this,Br,"m",Ta).call(this,n),t=!0):b(this,Br,"m",La).call(this,n)}else t=this.items.length>0;b(this,Br,"m",Jr).call(this),b(this,Br,"m",fa).call(this);for(const t of this.items){const e=b(this,Br,"m",Sa).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,Gr,"f")?i&&!b(this,zr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,zr,"f").has(i)&&this.isItemChecked(t)&&b(this,Br,"m",ia).call(this,t)}v(this,Gr,!0,"f"),this.noResults&&(b(this,Br,"m",da).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},da=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},ua=function(t){let e=this.fragmentErrorElement;t===Da.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},ma=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},fa=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},pa=function(){if(!this.list)return Ia.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Ia.LOCAL;case"eventually_local":return Ia.EVENTUALLY_LOCAL;default:return Ia.REMOTE}},ga=function(){return this.filterInputTextField?.closest("primer-text-field")},ba=function(){return b(this,Br,"a",pa)===Ia.LOCAL||b(this,Br,"a",pa)===Ia.EVENTUALLY_LOCAL},va=function(t){this.invokerElement?.dispatchEvent(new CustomEvent("invokerClicked",{bubbles:!0})),t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},wa=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,n=this.contains(t);(e||n)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},ya=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),i=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:i,value:b(this,Br,"m",Sa).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,Br,"m",Sa).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,Br,"m",Sa).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,zr,"f").clear(),i&&(b(this,Br,"m",ia).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,Br,"m",Ea).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,Br,"m",ia).call(this,t):b(this,Br,"m",na).call(this,t);b(this,Br,"m",Aa).call(this),b(this,Br,"m",Jr).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,Br,"m",Sa).call(this,t)?.getAttribute("data-value")}}))},Ea=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Ur,b(this,Ur,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,Ur,"f");if(e){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=`${this.dynamicLabelPrefix} `,n.textContent=e,t.replaceChildren(i,n),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,Ur,"f")},Aa=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,Gr,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const i=e.querySelectorAll("input");i.length>0&&v(this,jr,b(this,jr,"f")||i[0].name,"f");for(const i of this.selectedItems){const n=document.createElement("input");n.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),n.type="hidden",n.autocomplete="off",n.name=i.inputName||b(this,jr,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},ka=function(){return this.querySelector(Ma)?.parentElement||null},La=function(t){t&&t.setAttribute("hidden","hidden")},Ta=function(t){t&&t.removeAttribute("hidden")},Sa=function(t){return t.querySelector(".ActionListContent")},g([U],Oa.prototype,"includeFragment",void 0),g([U],Oa.prototype,"dialog",void 0),g([U],Oa.prototype,"filterInputTextField",void 0),g([U],Oa.prototype,"remoteInput",void 0),g([U],Oa.prototype,"list",void 0),g([U],Oa.prototype,"noResults",void 0),g([U],Oa.prototype,"fragmentErrorElement",void 0),g([U],Oa.prototype,"bannerErrorElement",void 0),g([U],Oa.prototype,"bodySpinner",void 0),g([U],Oa.prototype,"liveRegion",void 0),Oa=g([z("select-panel")],Oa),window.customElements.get("select-panel")||(window.SelectPanelElement=Oa,window.customElements.define("select-panel",Oa));let Ha=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function Na(t){Dt(t,{bindKeys:At.ArrowVertical|At.ArrowHorizontal|At.HomeAndEnd|At.Backspace,getNextFocusable:(t,e,i)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return qa(t)}switch(e.key){case"ArrowUp":return Fa(t,"previous");case"ArrowDown":return Fa(t,"next");case"Backspace":return qa(t)}}(e,i)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const i=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:i instanceof HTMLElement?i:void 0}})}function Fa(t,e){const i=t.closest("[role=tree]");if(!i)return;const n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,(t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP));let s=n.firstChild();for(;s!==t;)s=n.nextNode();let o="next"===e?n.nextNode():n.previousNode();for(;o instanceof HTMLElement&&Ra(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function Ra(t,e){for(const i of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==i&&i.closest("li")?.contains(t))return i;return null}function qa(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var Wa,Va,Ba,$a,_a,Ua,ja,za,Ka,Ya,Ga;g([U],Ha.prototype,"detailsTarget",void 0),g([U],Ha.prototype,"summaryTarget",void 0),Ha=g([z("details-toggle")],Ha),window.DetailsToggleElement=Ha;let Za=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),Wa.add(this),Va.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,Va,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Na(this),new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,Wa,"m",Ba).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;if(!t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue)))return;const e=[];for(const t of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const i=this.formInputPrototype.cloneNode();i.removeAttribute("data-target"),i.removeAttribute("form");const n={path:this.getNodePath(t)},s=this.getFormInputValueForNode(t);s&&(n.value=s),i.value=JSON.stringify(n),e.push(i)}this.formInputContainer.replaceChildren(...e)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,Wa,"m",Ba).call(this,this)}))}disconnectedCallback(){b(this,Va,"f").abort()}handleEvent(t){const e=b(this,Wa,"m",_a).call(this,t);e&&b(this,Wa,"m",Ua).call(this,e,t)}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),i=this.querySelector(`[data-path="${CSS.escape(e)}"`);i&&(this.currentNode?.setAttribute("aria-current","false"),i.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const i=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(i)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}infoFromNode(t,e){const i=this.getNodeType(t);if(!i)return null;const n=this.getNodeCheckedValue(t);return{node:t,type:i,path:this.getNodePath(t),checkedValue:e||n,previousCheckedValue:n}}};var Ja,Xa;Va=new WeakMap,Wa=new WeakSet,Ba=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},$a=function(t){return"click"===t.type},_a=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},Ua=function(t,e){b(this,Wa,"m",ja).call(this,e,t)?b(this,Wa,"m",za).call(this,e,t):b(this,Wa,"m",$a).call(this,e)?b(this,Wa,"m",Ka).call(this,e,t):"focusin"===e.type?b(this,Wa,"m",Ya).call(this,t):e instanceof KeyboardEvent&&b(this,Wa,"m",Ga).call(this,e,t)},ja=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},za=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"))},Ka=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},Ya=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},Ga=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}this.nodeHasCheckBox(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):e instanceof HTMLAnchorElement&&e.click()}},g([U],Za.prototype,"formInputContainer",void 0),g([U],Za.prototype,"formInputPrototype",void 0),Za=g([z("tree-view")],Za),window.customElements.get("tree-view")||(window.TreeViewElement=Za,window.customElements.define("tree-view",Za));let Qa=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),Ja.add(this)}connectedCallback(){hi(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,Ja,"m",Xa).call(this)}showCollapsed(){this.expanded=!1,b(this,Ja,"m",Xa).call(this)}toggle(){this.expanded=!this.expanded,b(this,Ja,"m",Xa).call(this)}};var tl,el,il,nl,sl,ol,rl,al,ll,cl,hl,dl,ul;Ja=new WeakSet,Xa=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([U],Qa.prototype,"expandedIcon",void 0),g([U],Qa.prototype,"collapsedIcon",void 0),Qa=g([z("tree-view-icon-pair")],Qa),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=Qa,window.customElements.define("tree-view-icon-pair",Qa));let ml=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),tl.add(this),el.set(this,null),il.set(this,"success"),nl.set(this,void 0),sl.set(this,!1)}connectedCallback(){hi(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,tl,"m",hl).call(this)}));const{signal:t}=v(this,nl,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),hi(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",(t=>{b(this,tl,"m",rl).call(this,t)}),{signal:t})})),hi(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,tl,"m",al).call(this,t)}),{signal:t})}));new MutationObserver((()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,el,"f")&&v(this,el,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,el,"f")}set expanded(t){v(this,el,t,"f"),b(this,tl,"m",hl).call(this)}get loadingState(){return b(this,il,"f")}set loadingState(t){v(this,il,t,"f"),b(this,tl,"m",hl).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}disconnectedCallback(){b(this,nl,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,tl,"m",ol).call(this,t):t.target===this.includeFragment?b(this,tl,"m",rl).call(this,t):t instanceof KeyboardEvent?b(this,tl,"m",ll).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,tl,"a",ul)&&b(this,tl,"m",cl).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),b(this,tl,"m",dl).call(this)&&"0"===this.subTree.getAttribute("tabindex")&&this.subTree.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],i=this.treeView?.infoFromNode(this.node,t);if(i&&e.push(i),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const i of this.eachDescendantNode()){const n=this.treeView?.infoFromNode(i,t);n&&e.push(n)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const i of e)i.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}};el=new WeakMap,il=new WeakMap,nl=new WeakMap,sl=new WeakMap,tl=new WeakSet,ol=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},rl=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,sl,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),!b(this,sl,"f")&&document.activeElement===this.subTree&&b(this,tl,"m",dl).call(this)&&v(this,sl,!0,"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,sl,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,sl,!1,"f")}},al=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},ll=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,tl,"a",ul)?this.toggleChecked():this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,tl,"a",ul)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},cl=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},hl=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),b(this,tl,"m",dl).call(this)&&(this.subTree.setAttribute("role","treeitem"),this.subTree.hasAttribute("tabindex")||this.subTree.setAttribute("tabindex","-1")),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),b(this,tl,"m",dl).call(this)&&(this.subTree.removeAttribute("role"),this.subTree.removeAttribute("tabindex")),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},dl=function(){return this.subTree?.getAttribute("data-target")?.includes("tree-view-sub-tree-node.includeFragment")??!1},ul=function(){return this.querySelector(".TreeViewItemCheckbox")},g([U],ml.prototype,"node",void 0),g([U],ml.prototype,"subTree",void 0),g([U],ml.prototype,"iconPair",void 0),g([U],ml.prototype,"toggleButton",void 0),g([U],ml.prototype,"expandedToggleIcon",void 0),g([U],ml.prototype,"collapsedToggleIcon",void 0),g([U],ml.prototype,"includeFragment",void 0),g([U],ml.prototype,"loadingIndicator",void 0),g([U],ml.prototype,"loadingFailureMessage",void 0),g([U],ml.prototype,"retryButton",void 0),ml=g([z("tree-view-sub-tree-node")],ml),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=ml,window.customElements.define("tree-view-sub-tree-node",ml));let fl=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};fl=g([z("tree-view-include-fragment")],fl),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=fl,window.customElements.define("tree-view-include-fragment",fl))}();
|
|
1
|
+
!function(){"use strict";var t,e,i,n,s,o,r,a,l=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},c=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const h=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),i.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,i,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",n).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,i){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",n).call(this):"loading"===e&&this.isConnected&&"eager"!==i&&"eager"===this.loading&&l(this,t,"m",n).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",n).call(this),"lazy"===this.loading&&l(this,i,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){h.delete(this),l(this,t,"m",n).call(this)}}e=new WeakMap,i=new WeakMap,t=new WeakSet,n=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,i,"f").unobserve(this);try{const i=await l(this,t,"m",s).call(this);if(i instanceof Error)throw i;const n=i,o=document.createElement("template");o.innerHTML=n;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,i=h.get(this);if(i&&i.src===e)return i.data;{let i;return i=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),h.set(this,{src:e,data:i}),i}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise((t=>setTimeout(t,0)));for(const i of t)this.dispatchEvent(e?new CustomEvent(i,{detail:{error:e}}):new Event(i))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const i=await this.fetch(this.request()),n=i.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||n&&n.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${n}`);if(200!==i.status)throw new Error(`Failed to load resource: the server responded with a status of ${i.status}`);const s=await i.text();let o=s;if(d){o=(await d).createHTML(s,i)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=f.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function m(t,e,i){const n=t.input;if(!n)return;const s=f.get(t);if(!s)return;const o=n.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let h;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let d="";try{h=await async function(t,e,i){try{const n=await fetch(e,i);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),n}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),d=await h.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}h&&h.ok?(a.innerHTML=d,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:i?i.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(i){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(i)}),300)}}function g(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}function b(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function v(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){L(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const i=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)S(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&L(t)}));i.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const n={get closed(){return e},unsubscribe(){e=!0,E.delete(t),i.disconnect()}};return E.set(t,n),n}function L(t){for(const e of t.querySelectorAll("[data-action]"))S(e);t instanceof Element&&t.hasAttribute("data-action")&&S(t)}function k(t){const e=t.currentTarget;for(const i of T(e))if(t.type===i.type){const n=e.closest(i.tag);w.has(n)&&"function"==typeof n[i.method]&&n[i.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(i.tag)){const e=s.host;"function"==typeof e[i.method]&&e[i.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),i=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,i),method:e.slice(i+1)||"handleEvent"}||"handleEvent"}}function S(t){for(const e of T(t))t.addEventListener(e.type,k)}const C=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const i=C(t);if(!i.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return i};const M="attr";function I(t,e){_(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const i=Object.getPrototypeOf(t),n=i?.constructor?.attrPrefix??"data-";e||(e=_(i,M));for(const i of e){const e=t[i],s=x(`${n}${i}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,i,o),i in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const O=new Map,H=new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),N=new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const i={once:!0,passive:!0,signal:e.signal},n=()=>e.abort();document.addEventListener("mousedown",n,i),document.addEventListener("touchstart",n,i),document.addEventListener("keydown",n,i),document.addEventListener("pointerdown",n,i)})),F={ready:()=>H,firstInteraction:()=>N,visible:t=>new Promise((e=>{const i=new IntersectionObserver((t=>{for(const n of t)if(n.isIntersecting)return e(),void i.disconnect()}),{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))i.observe(e)}))},R=new Set;let q,W=null;function V(t){R.add(t),null==W&&(W=requestAnimationFrame((()=>{W=null;const t=new Set(R);if(R.clear(),O.size)t:for(const e of t)for(const t of O.keys()){const i=e instanceof Element&&e.matches(t)?e:e.querySelector(t);if(customElements.get(t)||i){const e=i?.getAttribute("data-load-on")||"ready",n=e in F?F[e]:F.ready;for(const e of O.get(t)||[])n(t).then(e);if(O.delete(t),!O.size)break t}}})))}const B=Symbol.for("catalyst");class ${constructor(t,e){const i=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){i.connectedCallback(this,n)};const s=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){i.disconnectedCallback(this,s)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,e,n){i.attributeChangedCallback(this,t,e,n,o)};let r=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return i.observedAttributes(this,r)},set(t){r=t}}),function(t){let e=t.observedAttributes||[];const i=t.attrPrefix??"data-",n=t=>x(`${i}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[..._(t.prototype,M)].map(n).concat(e),set(t){e=t}})}(t),function(t,e){const i=e||C(t.name).replace(/-element$/,"");try{window.customElements.define(i,t),window[t.name]=customElements.get(i)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t,e)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),L(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){q||(q=new MutationObserver((t=>{if(O.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&V(t)}))),V(t),q.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,i,n,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,i,n)}}function _(t,e){if(!Object.prototype.hasOwnProperty.call(t,B)){const e=t[B],i=t[B]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[B];return i.has(e)||i.set(e,new Set),i.get(e)}function U(t,e){_(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase();if(t.shadowRoot)for(const n of t.shadowRoot.querySelectorAll(`[data-target~="${i}.${e}"]`))if(!n.closest(i))return n;for(const n of t.querySelectorAll(`[data-target~="${i}.${e}"]`))if(n.closest(i)===t)return n}(this,e)}})}function j(t,e){_(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase(),n=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)||n.push(s);for(const s of t.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)===t&&n.push(s);return n}(this,e)}})}function z(t){if("string"==typeof t)return e=>{new $(e,t)};new $(t)}var K;class Y{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const i=t.querySelector(".ActionListItem-truncationTooltip");if(!i)continue;const n=e.scrollWidth>e.clientWidth;i.style.display=n?"":"none"}}}let G=class ActionListElement extends HTMLElement{constructor(){super(...arguments),K.set(this,void 0)}connectedCallback(){v(this,K,new Y(this),"f")}disconnectedCallback(){b(this,K,"f").unobserve(this)}};K=new WeakMap,G=g([z("action-list")],G);const Z={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},J={start:["end","center"],end:["start","center"],center:["end","start"]};function X(t,e,i={}){const{positionedParent:n,clippingNode:s,positionedParentStyle:o,clippingNodeStyle:r}=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return{positionedParent:document.body,clippingNode:document.body,positionedParentStyle:null,clippingNodeStyle:null};let e=null,i=null,n=null,s=null,o=t.parentNode;for(;null!==o&&o!==document.body;){if(o instanceof HTMLElement){const t=getComputedStyle(o);if(e||"static"===t.position||(e=o,n=t),i||"visible"===t.overflow||(i=o,s=t),e&&i)break}o=o.parentNode}return{positionedParent:null!=e?e:document.body,clippingNode:null!=i?i:document.body,positionedParentStyle:n,clippingNodeStyle:s}}(t),a=function(t,e=null){const i=t.getBoundingClientRect(),n=e||getComputedStyle(t),s=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderLeftWidth,10)||0,r=parseInt(n.borderRightWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0;return{top:i.top+s,left:i.left+o,width:i.width-r-o,height:Math.max(i.height-s-a,t===document.body?window.innerHeight:-1/0)}}(s,r),l=o||getComputedStyle(n),c=n.getBoundingClientRect(),[h,d]=[l.borderTopWidth,l.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,i,n,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l,displayInViewport:c},h){let d=t;c&&(d={top:0,left:0,width:h.width,height:h.height});const u={top:d.top-e.top,left:d.left-e.left,width:d.width,height:d.height};let f=tt(i,n,s,o,a,l),m=s,p=o;if(f.top-=e.top,f.left-=e.left,!r){const t=Z[s];let r=0;if(t){let c=s;for(;r<t.length&&et(c,f,u,i);){const s=t[r++];c=s,f=tt(i,n,s,o,a,l),f.top-=e.top,f.left-=e.left,m=s}}const h=J[o];let g=0;if(h){let t=o;for(;g<h.length&&it(t,f,u,i);){const s=h[g++];t=s,f=tt(i,n,m,s,a,l),f.top-=e.top,f.left-=e.left,p=s}}f.top<u.top&&(f.top=u.top),f.left<u.left&&(f.left=u.left),f.left+i.width>d.width+u.left&&(f.left=d.width+u.left-i.width),(c||t&&r<t.length)&&f.top+i.height>d.height+u.top&&(f.top=Math.max(d.height+u.top-i.height,0))}return Object.assign(Object.assign({},f),{anchorSide:m,anchorAlign:p})}(a,{top:c.top+h,left:c.left+d},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,i,n,s,o,r;const a=null!==(e=t.side)&&void 0!==e?e:Q.side,l=null!==(i=t.align)&&void 0!==i?i:Q.align;return{side:a,align:l,anchorOffset:null!==(n=t.anchorOffset)&&void 0!==n?n:"inside-center"===a?0:Q.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==l&&a.startsWith("inside")?Q.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:Q.allowOutOfBounds,displayInViewport:null!==(r=t.displayInViewport)&&void 0!==r?r:Q.displayInViewport}}(i),{width:window.innerWidth,height:window.innerHeight})}const Q={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1,displayInViewport:!1};function tt(t,e,i,n,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===i?l=e.top-s-t.height:"outside-bottom"===i?l=a+s:"outside-left"===i?c=e.left-s-t.width:"outside-right"===i&&(c=r+s),"outside-top"!==i&&"outside-bottom"!==i||(c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==i&&"outside-right"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===i?l=e.top+s:"inside-bottom"===i?l=a-s-t.height:"inside-left"===i?c=e.left+s:"inside-right"===i?c=r-s-t.width:"inside-center"===i&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===i||"inside-bottom"===i?c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==i&&"inside-right"!==i&&"inside-center"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function et(t,e,i,n){return"outside-top"===t||"outside-bottom"===t?e.top<i.top||e.top+n.height>i.height+i.top:e.left<i.left||e.left+n.width>i.width+i.left}function it(t,e,i,n){return"end"===t?e.left<i.left:"start"===t||"center"===t?e.left+n.width>i.left+i.width||e.left<i.left:void 0}function*nt(t,e={}){var i,n;const s=null!==(i=e.strict)&&void 0!==i&&i,o=null!==(n=e.onlyTabbable)&&void 0!==n&&n?at:rt,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function st(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}const ot=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"]);function rt(t,e=!1){if(t.hidden)return!1;if(t.classList.contains("sentinel"))return!1;if(t instanceof HTMLInputElement&&"hidden"===t.type)return!1;if(ot.has(t.tagName)&&t.disabled)return!1;if(e){const e=t.offsetWidth,i=t.offsetHeight,n=t.offsetParent;if(0===e||0===i)return!1;const s=getComputedStyle(t);if("none"===s.display)return!1;if("hidden"===s.visibility||"collapse"===s.visibility)return!1;const o=s.position;if(!n&&"fixed"!==o&&"sticky"!==o)return!1;if(0===t.getClientRects().length)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function at(t,e=!1){return rt(t,e)&&"-1"!==t.getAttribute("tabindex")}let lt=!1;function ct(){}try{const t=Object.create({},{signal:{get(){lt=!0}}});window.addEventListener("test",ct,t),window.removeEventListener("test",ct,t)}catch(t){}function ht(){lt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,i,n){return"object"==typeof n&&"signal"in n&&n.signal instanceof AbortSignal&&t.call(n.signal,"abort",(()=>{this.removeEventListener(e,i,n)})),t.call(this,e,i,n)}}(),lt=!0)}ht();const dt=[];let ut;const ft="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function mt(t){if(!t)return;const e=t.hasAttribute("data-prevent-scroll-on-focus");t.focus({preventScroll:e})}function pt({onFocus:t}){const e=document.createElement("span");return e.setAttribute("class","sentinel"),e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","true"),e.style.cssText=ft,e.onfocus=t,e}function gt(t,e,i){const n=new AbortController,s=null!=i?i:n.signal;t.setAttribute("data-focus-trap","active");const o=pt({onFocus:()=>{mt(st(t,!0))}}),r=pt({onFocus:()=>{mt(st(t))}});null!==t.querySelector(":scope > span.sentinel")||(t.prepend(o),t.append(r));const a=function(t,e){const i=new MutationObserver((i=>{for(const n of i)if("childList"===n.type&&n.addedNodes.length){for(const t of n.addedNodes)if(t instanceof HTMLElement&&"SPAN"===t.tagName&&t.classList.contains("sentinel"))return;const i=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==i?void 0:i.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return i.observe(t,{childList:!0}),i}(t,[o,r]);let l;function c(i){if(i instanceof HTMLElement&&document.contains(t)){if(t.contains(i))return void(l=i);if(l&&at(l)&&t.contains(l))return void mt(l);if(e&&t.contains(e))return void mt(e);return void mt(st(t))}}const h=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(ut){const t=ut;ut.container.setAttribute("data-focus-trap","suspended"),ut.controller.abort(),dt.push(t)}h.signal.addEventListener("abort",(()=>{ut=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const i=dt.findIndex((e=>e.container===t));i>=0&&dt.splice(i,1),a.disconnect(),function(){const t=dt.pop();t&>(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:h.signal,capture:!0}),c(document.activeElement),ut={container:t,controller:h,initialFocus:e,originalSignal:s};const d=dt.findIndex((e=>e.container===t));if(d>=0&&dt.splice(d,1),!i)return n}let bt;function vt(){return void 0===bt&&(bt=/^mac/i.test(window.navigator.platform)),bt}let wt=1e4;const yt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);class Et{constructor(){this._items=[],this._itemSet=new Set,this._indexMap=new Map}insertAt(t,e){let i;if(e.length<=100)i=e.filter(((t,e,i)=>!this._itemSet.has(t)&&i.indexOf(t)===e));else{const t=new Set;i=[];for(let n=0;n<e.length;n++){const s=e[n];this._itemSet.has(s)||t.has(s)||(t.add(s),i.push(s))}}if(0===i.length)return;const n=Math.max(0,Math.min(t,this._items.length));if(n!==this._items.length)if(0!==n){for(let t=this._items.length-1;t>=n;t--)this._indexMap.set(this._items[t],t+i.length);i.length<=1e4?this._items.splice(n,0,...i):this._chunkedInsert(n,i);for(let t=0;t<i.length;t++){const e=i[t];this._itemSet.add(e),this._indexMap.set(e,n+t)}}else{for(let t=0;t<this._items.length;t++)this._indexMap.set(this._items[t],t+i.length);i.length<=1e4?this._items.splice(0,0,...i):this._chunkedInsert(0,i);for(let t=0;t<i.length;t++)this._itemSet.add(i[t]),this._indexMap.set(i[t],t)}else for(let t=0;t<i.length;t++){const e=i[t];this._indexMap.set(e,this._items.length),this._items.push(e),this._itemSet.add(e)}}_chunkedInsert(t,e){for(let i=0;i<e.length;i+=1e4){const n=e.slice(i,i+1e4);this._items.splice(t+i,0,...n)}}delete(t){if(!this._itemSet.has(t))return!1;const e=this._indexMap.get(t);this._items.splice(e,1),this._itemSet.delete(t),this._indexMap.delete(t);for(let t=e;t<this._items.length;t++)this._indexMap.set(this._items[t],t);return!0}has(t){return this._itemSet.has(t)}indexOf(t){var e;return null!==(e=this._indexMap.get(t))&&void 0!==e?e:-1}get(t){return this._items[t]}get size(){return this._items.length}[Symbol.iterator](){return this._items[Symbol.iterator]()}clear(){this._items=[],this._itemSet.clear(),this._indexMap.clear()}find(t){return this._items.find(t)}}var At;ht(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(At||(At={}));const Lt={ArrowLeft:At.ArrowHorizontal,ArrowDown:At.ArrowVertical,ArrowUp:At.ArrowVertical,ArrowRight:At.ArrowHorizontal,h:At.HL,j:At.JK,k:At.JK,l:At.HL,a:At.AD,s:At.WS,w:At.WS,d:At.AD,Tab:At.Tab,Home:At.HomeAndEnd,End:At.HomeAndEnd,PageUp:At.PageUpDown,PageDown:At.PageUpDown,Backspace:At.Backspace},kt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function Tt(t){const e=kt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const i=vt();if(i&&t.metaKey||!i&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function St(t,e){const i=t.key,n=1===i.length||2===i.length&&i.charCodeAt(0)>=55296&&i.charCodeAt(0)<=56319,s=function(t){var e,i;if(!(t instanceof HTMLElement))return!1;const n=t.nodeName.toLowerCase(),s=null!==(i=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===n||"textarea"===n||"input"===n&&!yt.has(s)||t.isContentEditable)&&!o}(e),o=e instanceof HTMLSelectElement;if(s&&(n||"Home"===i||"End"===i))return!0;if(o){const e=vt();return!("ArrowDown"!==i||!e||t.metaKey)||!("ArrowDown"!==i||e||!t.altKey)}if(s&&!o){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,n=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===i&&!n)return!0;if("ArrowRight"===i&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===i||"PageDown"===i)return!0;if("ArrowUp"===i&&!n)return!0;if("ArrowDown"===i&&!s)return!0}}return!1}const Ct="data-is-active-descendant",xt="activated-directly",Mt="activated-indirectly",It="data-has-active-descendant";function Dt(t,e){var i,n,s,o,r,a,l;const c=new Et,h=new WeakMap,d=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?At.ArrowAll:At.ArrowVertical)|At.HomeAndEnd,u=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",f=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",m=null==e?void 0:e.activeDescendantControl,p=null==e?void 0:e.onActiveDescendantChanged,g=null!==(o=null==e?void 0:e.ignoreHoverEvents)&&void 0!==o&&o,b=null!==(r=null==e?void 0:e.focusPrependedElements)&&void 0!==r&&r;let v,w=!1;const y=null!==(a=null==e?void 0:e.preventScroll)&&void 0!==a&&a,E="initial"===f&&(null==e?void 0:e.activeDescendantControl);function A(){return c.get(0)}function L(t,e=!1){const i=v;v=t,w=e,m?t&&document.activeElement===m?k(i,t,e):T():(i&&i!==t&&h.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function k(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+wt++),e&&e!==i&&e.removeAttribute(Ct),m&&(n||m.getAttribute("aria-activedescendant")!==i.id)&&(m.setAttribute("aria-activedescendant",i.id),t.setAttribute(It,i.id),i.setAttribute(Ct,n?xt:Mt),null==p||p(i,e,n))}function T(e=v){"first"===f&&(v=void 0),null==m||m.removeAttribute("aria-activedescendant"),t.removeAttribute(It),null==e||e.removeAttribute(Ct);const i=t.querySelectorAll(`[${Ct}]`);for(let t=0;t<i.length;t++)i[t].removeAttribute(Ct);null==p||p(void 0,e,!1)}function S(...t){const i=(null==e?void 0:e.focusableElementFilter)?t.filter((t=>e.focusableElementFilter(t))):t;if(0===i.length)return;const n=function(t){const e=t[0];if(0===c.size)return 0;let i=0,n=c.size-1;for(;i<=n;){const t=Math.floor((i+n)/2);x(e,c.get(t))?n=t-1:i=t+1}return i}(i);c.insertAt(n,i);for(const t of i)h.has(t)||h.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");!E&&(b&&0===n&&!w)?C():E||v||L(A())}function C(){const e=[...nt(t,I)];c.clear(),c.insertAt(0,e);for(const t of e)h.has(t)||h.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");L(A())}function x(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function M(...t){for(const e of t){c.delete(e);const t=h.get(e);if(void 0!==t&&(null===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t),h.delete(e)),e===v){L(A())}}}const I={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};S(...nt(t,I));const D="function"==typeof f?f(document.body):A();E||L(D);const P=new MutationObserver((t=>{const e=new Set,i=new Set,n=new Set,s=new Set;for(const o of t)if("childList"===o.type){for(const t of o.removedNodes)t instanceof HTMLElement&&e.add(t);for(const t of o.addedNodes)t instanceof HTMLElement&&i.add(t)}else if("attributes"===o.type&&o.target instanceof HTMLElement){const t=o.attributeName;!!t&&o.target.hasAttribute(t)?n.add(o.target):s.add(o.target)}if(e.size>0){const t=[];for(const i of e)for(const e of nt(i))t.push(e);t.length>0&&M(...t)}if(n.size>0&&M(...n),i.size>0){const t=[];for(const e of i)for(const i of nt(e,I))t.push(i);t.length>0&&(b?C():S(...t))}s.size>0&&S(...s)}));P.observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const O=new AbortController,H=null!==(l=null==e?void 0:e.abortSignal)&&void 0!==l?l:O.signal;let N;H.addEventListener("abort",(()=>{P.disconnect(),M(...c),c.clear()})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(N=c.indexOf(t.target))}),{signal:H}),m?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&c.has(t.target)&&(m.focus({preventScroll:y}),L(t.target))}),{signal:H}),g||t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;if(t instanceof HTMLElement&&c.has(t))return void L(t);const e=c.find((e=>e.contains(t)));e&&L(e)}),{signal:H,capture:!0}),m.addEventListener("focusin",(()=>{v?k(void 0,v):E||L(A())}),{signal:H}),m.addEventListener("focusout",(()=>{T()}),{signal:H})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==N){if(N>=0){const t=c.get(N);t&&t!==v&&L(t)}N=void 0}else if("previous"===f)L(e.target);else if("closest"===f||"first"===f){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===R?c.size-1:0,e=c.get(t);return void(null==e||e.focus({preventScroll:y}))}L(e.target)}else if("function"==typeof f)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=f(e.relatedTarget);if(t&&c.has(t))return void t.focus({preventScroll:y});console.warn("Element requested is not a known focusable element.")}else L(e.target);R=void 0}),{signal:H});const F=null!=m?m:t;let R;return"closest"===f&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(R=Tt(t))}),{signal:H,capture:!0}),F.addEventListener("keydown",(i=>{var n;if(i.key in kt){const s=Lt[i.key];if(!i.defaultPrevented&&(s&d)>0&&!St(i,document.activeElement)){const s=Tt(i);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(n=document.activeElement)&&void 0!==n?n:void 0,i)),!o){const e=function(){if(!v)return E?-1:0;const e=c.indexOf(v);return-1!==e?e:v===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=c.size-1,n<0&&(n="wrap"===u&&"Tab"!==i.key?c.size-1:0),n>=c.size&&(n="wrap"===u&&"Tab"!==i.key?0:c.size-1),e!==n&&(o=c.get(n))}m?L(o||v,!0):o&&(R=s,o.focus({preventScroll:y})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:H}),O}var Pt,Ot,Ht,Nt,Ft,Rt,qt,Wt;const Vt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof $t&&t.update()}})),Bt=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof $t&&t.update()}}));let $t=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Pt.add(this),Ot.set(this,null),Ht.set(this,!1)}connectedCallback(){Bt.observe(this),Vt.observe(this),this.style.overflow="visible",this.update()}disconnectedCallback(){Bt.unobserve(this),Vt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}update(){b(this,Ht,"f")||(v(this,Ht,!0,"f"),requestAnimationFrame((()=>{v(this,Ht,!1,"f"),b(this,Pt,"m",Nt).call(this)})))}};Ot=new WeakMap,Ht=new WeakMap,Pt=new WeakSet,Nt=function(){const t=b(this,Pt,"a",Ft);if(!t)return;const e=t.getBoundingClientRect().top,i=b(this,Pt,"a",Wt),n=Array.from(this.items,(t=>({top:t.getBoundingClientRect().top,isDivider:t.classList.contains("ActionBar-divider")})));let s=!1;for(let t=0;t<n.length;t++){const o=n[t];o.isDivider?s=!0:(o.top>e?(b(this,Pt,"m",qt).call(this,t,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),s&&b(this,Pt,"m",qt).call(this,t-1,i)):(b(this,Pt,"m",Rt).call(this,t,i),t===this.items.length-1&&(this.moreMenu.hidden=!0),s&&b(this,Pt,"m",Rt).call(this,t-1,i)),s=!1)}b(this,Ot,"f")&&b(this,Ot,"f").abort(),v(this,Ot,Dt(this,{bindKeys:At.ArrowHorizontal|At.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),i=e>-1&&"visible"===this.items[e].style.visibility,n=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return i||n}}),"f")},Ft=function(){return this.items.find((t=>!t.classList.contains("ActionBar-divider")))??null},Rt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","visible"),n.hidden=!0)},qt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","hidden"),n.hidden=!1)},Wt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},g([j],$t.prototype,"items",void 0),g([U],$t.prototype,"itemContainer",void 0),g([U],$t.prototype,"moreMenu",void 0),$t=g([z("action-bar")],$t),window.ActionBarElement=$t;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const i=[jt(t,"compositionstart",(t=>ee(this,t))),jt(t,"compositionend",(t=>ee(this,t))),jt(t,"click",(e=>Jt(t,e))),jt(t,"change",(e=>Jt(t,e))),jt(t,"keydown",(e=>function(t,e,i){if(!(i instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const n=_t.get(e);if(!n||n.isComposing)return;const s=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":t.hasAttribute("open")&&(te(t),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Gt(t,!0);e&&e.focus(),i.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Gt(t,!1);e&&e.focus(),i.preventDefault()}break;case"n":if(Zt&&i.ctrlKey){const e=Gt(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(Zt&&i.ctrlKey){const e=Gt(t,!1);e&&e.focus(),i.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&Qt(e)&&e.closest("details")===t&&(i.preventDefault(),i.stopPropagation(),e.click())}}}(t,this,e))),jt(t,"toggle",(()=>zt(t,this)),{once:!0}),jt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const i=e.closest("details");i&&i!==t&&!i.contains(t)&&i.removeAttribute("open")}}(t))),this.preload?jt(t,"mouseover",(()=>zt(t,this)),{once:!0}):Ut,...Kt(t)];_t.set(this,{subscriptions:i,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=_t.get(this);if(t){_t.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const _t=new WeakMap,Ut={unsubscribe(){}};function jt(t,e,i,n=!1){return t.addEventListener(e,i,n),{unsubscribe:()=>{t.removeEventListener(e,i,n)}}}function zt(t,e){const i=e.getAttribute("src");if(!i)return;const n=_t.get(e);if(!n)return;if(n.loaded)return;n.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>Yt(t))),s.setAttribute("src",i))}function Kt(t){let e=!1;return[jt(t,"mousedown",(()=>e=!0)),jt(t,"keydown",(()=>e=!1)),jt(t,"toggle",(()=>{t.hasAttribute("open")&&(Yt(t)||e||function(t){const e=document.activeElement;if(e&&Qt(e)&&t.contains(e))return;const i=Gt(t,!0);i&&i.focus()}(t))}))]}function Yt(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Gt(t,e){const i=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),n=document.activeElement,s=n instanceof HTMLElement?i.indexOf(n):-1,o=e?i[s+1]:i[s-1],r=e?i[0]:i[i.length-1];return o||r}const Zt=navigator.userAgent.match(/Macintosh/);function Jt(t,e){const i=e.target;if(i instanceof Element&&i.closest("details")===t)if("click"===e.type){const e=i.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const n=e.querySelector("input");if("LABEL"===e.tagName&&i===n)return;"LABEL"===e.tagName&&n&&!n.checked||Xt(e,t)}else if("change"===e.type){const e=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Xt(e,t)}}function Xt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const i=t.closest("details-menu");if(!i)return;i.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const i=e.querySelector("[data-menu-button]");if(!i)return;const n=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(n)i.textContent=n;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(i.innerHTML=e)}}(t,e),function(t,e){for(const i of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=i.querySelector('input[type="radio"], input[type="checkbox"]');let n=(i===t).toString();e instanceof HTMLInputElement&&(n=e.indeterminate?"mixed":e.checked.toString()),i.setAttribute("aria-checked",n)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&te(e),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function Qt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function te(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function ee(t,e){const i=_t.get(t);i&&(i.isComposing="compositionstart"===e.type)}var ie,ne,se,oe,re,ae,le,ce,he,de,ue,fe,me,pe,ge;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const be={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},ve={start:["end","center"],end:["start","center"],center:["end","start"]};function we(t){return"function"==typeof t.checkVisibility?t.checkVisibility():t.getClientRects().length>0}const ye=(()=>{const t=new Set,e=new Set;let i=null,n=null;function s(){for(const i of e)(i.displayInViewport?we(i):t.has(i))&&i.update()}function o(){for(const t of e)t.displayInViewport&&we(t)&&t.update()}function r(t){const i=t.target;if(i instanceof Node)for(const t of e)t.displayInViewport&&!t.contains(i)&&i.contains(t.anchorElement)&&we(t)&&t.update()}return a=>{e.add(a),window.addEventListener("resize",s),window.addEventListener("scroll",s),window.addEventListener("scroll",r,!0);const l=a.ownerDocument.defaultView?.visualViewport;return l?.addEventListener("resize",o),l?.addEventListener("scroll",o),i||(i=new IntersectionObserver((i=>{for(const n of i){const i=n.target;n.isIntersecting&&e.has(i)?(i.update(),t.add(i)):t.delete(i)}}))),n||(n=new ResizeObserver(s)),n.observe(a.ownerDocument.documentElement),n.observe(a),i.observe(a),()=>{e.delete(a),t.delete(a),n?.unobserve(a),i?.unobserve(a)}}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),ie.add(this),ne.set(this,null),se.set(this,void 0),oe.set(this,(()=>this.update())),ae.set(this,void 0),le.set(this,null),ce.set(this,null),he.set(this,null),de.set(this,null),ue.set(this,new Set),ge.set(this,(()=>{const t=b(this,ie,"m",pe).call(this),e=b(this,le,"f");t&&e&&t.id===e.id&&(t.clientWidth!==e.clientWidth||t.clientHeight!==e.clientHeight||t.scrollHeight!==e.scrollHeight||Math.abs(t.top-e.top)>1||Math.abs(t.height-e.height)>1||t.scrollTop===e.scrollTop&&t.scrollLeft===e.scrollLeft)||v(this,le,t,"f")}))}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,ne,"f"))return b(this,ne,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,ne,t,"f"),b(this,ne,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}get displayInViewport(){return this.hasAttribute("display-in-viewport")}set displayInViewport(t){this.toggleAttribute("display-in-viewport",t)}connectedCallback(){this.addEventListener("beforetoggle",b(this,oe,"f")),this.addEventListener("scroll",b(this,ge,"f")),v(this,se,ye(this),"f"),this.update()}disconnectedCallback(){b(this,se,"f")?.call(this),v(this,se,void 0,"f"),b(this,ce,"f")?.disconnect(),b(this,de,"f")?.disconnect(),b(this,ue,"f").clear(),v(this,he,null,"f"),this.removeEventListener("beforetoggle",b(this,oe,"f")),this.removeEventListener("scroll",b(this,ge,"f")),cancelAnimationFrame(b(this,ae,"f")),v(this,le,null,"f")}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,ae,"f")),v(this,ae,requestAnimationFrame((()=>{const t=this.anchorElement,e=this.displayInViewport?t:null;b(this,he,"f")!==e&&(b(this,ce,"f")?.disconnect(),v(this,he,e,"f"),v(this,le,null,"f"),e&&(v(this,ce,b(this,ce,"f")||new MutationObserver((t=>{b(this,ge,"f").call(this),t.some((t=>"attributes"!==t.type))&&(b(this,ie,"m",fe).call(this),this.displayInViewport&&we(this)&&this.update())})),"f"),b(this,ce,"f").observe(e,{attributes:!0,attributeFilter:["aria-activedescendant"]}),b(this,ce,"f").observe(this,{childList:!0,characterData:!0,subtree:!0}))),b(this,ie,"m",fe).call(this),b(this,ge,"f").call(this);const i=b(this,le,"f"),n=this.ownerDocument.defaultView?.visualViewport,s=new DOMRect(n?.offsetLeft??0,n?.offsetTop??0,n?.width??this.ownerDocument.documentElement.clientWidth,n?.height??this.ownerDocument.documentElement.clientHeight);if(this.classList.toggle("not-anchored",!t),t&&this.displayInViewport&&!this.allowOutOfBounds){const e=t.getBoundingClientRect(),i=this.scrollTop;this.style.setProperty("--anchored-position-available-width",`${s.width}px`);let n=Math.min(s.height,Math.max(e.top-s.top-this.anchorOffset,s.bottom-e.bottom-this.anchorOffset,0)),o=0;for(const t of this.querySelectorAll('[role="option"], [data-no-result-found]'))o=Math.max(o,t.getBoundingClientRect().height);const r=Math.max(e.left-s.left-this.anchorOffset,s.right-e.right-this.anchorOffset);if(n<o){r>=(parseFloat(getComputedStyle(this).minWidth)||0)&&this.style.setProperty("--anchored-position-available-width",`${Math.min(s.width,r)}px`),this.getBoundingClientRect().width<=r&&(n=s.height)}this.style.setProperty("--anchored-position-available-height",`${n}px`),this.scrollTop=i}else this.style.removeProperty("--anchored-position-available-width"),this.style.removeProperty("--anchored-position-available-height");if(t){const{left:e,top:n}=this.displayInViewport&&!this.allowOutOfBounds?b(this,ie,"m",re).call(this,t,s):X(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto";const o=this.clientHeight,r=b(this,ie,"m",me).call(this);if(this.displayInViewport&&o>0&&r&&i?.restore&&r.id===i.id){const t=this.getBoundingClientRect().top+this.clientTop,e=t+o,i=r.getBoundingClientRect();i.height<=o+1&&(i.top<t?this.scrollTop+=i.top-t:i.bottom>e&&(this.scrollTop+=i.bottom-e))}const a=b(this,ie,"m",pe).call(this);a&&i?.restore&&a.id===i.id&&a.height>a.clientHeight+1&&(a.restore=!0),v(this,le,a,"f")}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0",v(this,le,null,"f")})),"f"))}}var Ee,Ae,Le;function ke(t){t.body.style.getPropertyValue("--dialog-scrollgutter")||t.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-t.body.clientWidth+"px")}function Te(t){t.body.classList.toggle("has-modal",Boolean(t.querySelector("dialog[open]"))),t.body.classList.toggle("has-modal-disable-scroll",Boolean(t.querySelector("dialog[open].Overlay--disableScroll")))}function Se(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){const e=document.getElementById(n);if(e instanceof HTMLDialogElement){ke(e.ownerDocument),e.showModal(),t.preventDefault();let n=i,s=!1;for(;n;)n=n.parentElement?.closest("[popover]"),n&&"auto"===n.popover&&(n.classList.add("dialog-inside-popover-fix"),n.popover="manual",n.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0})),Te(e.ownerDocument)}}if(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n){const t=document.getElementById(n);t instanceof HTMLDialogElement&&t.open&&(t.close(),Te(t.ownerDocument))}}ne=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,ce=new WeakMap,he=new WeakMap,de=new WeakMap,ue=new WeakMap,ge=new WeakMap,ie=new WeakSet,re=function(t,e){const i={side:this.side,align:this.align,anchorOffset:this.anchorOffset,alignmentOffset:this.alignmentOffset,allowOutOfBounds:!0};let n=X(this,t,i);const s=t.getBoundingClientRect();if(s.bottom<=e.top||s.top>=e.bottom||s.right<=e.left||s.left>=e.right)return n;const o=X(this,e,{side:"inside-top",align:"start",anchorOffset:0,alignmentOffset:0,allowOutOfBounds:!0}),{width:r,height:a}=this.getBoundingClientRect(),l=o.left+e.width,c=o.top+e.height;for(const e of be[this.side]||[]){if("outside-top"===n.anchorSide||"outside-bottom"===n.anchorSide?n.top>=o.top&&n.top+a<=c:n.left>=o.left&&n.left+r<=l)break;n=X(this,t,{...i,side:e})}for(const e of ve[this.align]){if(n.left>=o.left&&n.left+r<=l)break;n=X(this,t,{...i,side:n.anchorSide,align:e})}return{top:Math.max(o.top,Math.min(n.top,c-a)),left:Math.max(o.left,Math.min(n.left,l-r))}},fe=function(){if(!(this.isConnected&&this.displayInViewport&&this.anchorElement&&we(this)))return b(this,de,"f")?.disconnect(),void b(this,ue,"f").clear();v(this,de,b(this,de,"f")||new ResizeObserver((()=>{this.isConnected&&this.displayInViewport&&we(this)&&this.update()})),"f");const t=new Set(this.querySelectorAll('[role="option"], [data-no-result-found]'));for(const e of b(this,ue,"f"))t.has(e)||b(this,de,"f").unobserve(e);for(const e of t)b(this,ue,"f").has(e)||b(this,de,"f").observe(e,{box:"border-box"});v(this,ue,t,"f")},me=function(){const t=this.anchorElement?.getAttribute("aria-activedescendant"),e=t?this.ownerDocument.getElementById(t):null;return e&&this.contains(e)?e:null},pe=function(){if(!this.isConnected||!this.displayInViewport||!we(this))return null;const t=b(this,ie,"m",me).call(this);if(!t)return null;const e=t.getBoundingClientRect(),i=this.getBoundingClientRect(),n=i.top+this.clientTop,s=i.left+this.clientLeft;return{id:t.id,clientWidth:this.clientWidth,clientHeight:this.clientHeight,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,top:e.top-n+this.scrollTop,height:e.height,restore:e.height>0&&e.width>0&&e.top>=n-1&&e.bottom<=n+this.clientHeight+1&&e.left>=s-1&&e.right<=s+this.clientWidth+1}},AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds","display-in-viewport"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Ee.add(this),Ae.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,Ae,new AbortController,"f");document.addEventListener("click",Se,!0),document.addEventListener("click",this,{signal:t}),this.dialog?.addEventListener("close",(()=>Te(this.dialog.ownerDocument)),{signal:t}),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,Ee,"m",Le).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Ee,"m",Le).call(this)}disconnectedCallback(){b(this,Ae,"f")?.abort()}handleEvent(t){const e=t.target,i=this.dialog;if(e!==i||!i?.open)return;if(i.querySelector("form"))return;const n=i.getBoundingClientRect();n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width||i.close()}}Ae=new WeakMap,Ee=new WeakSet,Le=function(){if(!this.dialog)return;const{ownerDocument:t}=this.dialog;this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),ke(t),this.dialog.showModal()),Te(t)},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var Ce=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:i="",...n}={}){super(t,n),this.oldState=String(e||""),this.newState=String(i||"")}},xe=new WeakMap;function Me(t,e,i){xe.set(t,setTimeout((()=>{xe.has(t)&&t.dispatchEvent(new Ce("toggle",{cancelable:!1,oldState:e,newState:i}))}),0))}var Ie=globalThis.ShadowRoot||function(){},De=globalThis.HTMLDialogElement||function(){},Pe=new WeakMap,Oe=new WeakMap,He=new WeakMap;function Ne(t){return He.get(t)||"hidden"}var Fe=new WeakMap;function Re(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===Ne(t))&&(!(!e&&"hidden"!==Ne(t))&&(!(t instanceof De&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function qe(t){return t?Array.from(Oe.get(t.ownerDocument)||[]).indexOf(t)+1:0}function We(t){const e=$e(t),i=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||Be(t))instanceof Ie&&(t=t.host),t instanceof Document)return}}(t);return qe(e)>qe(i)?e:i}function Ve(t){const e=Oe.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function Be(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?Be(t.parentNode):t}function $e(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===He.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||Be(t))instanceof Ie&&(t=t.host),t instanceof Document)return}}function _e(t){return!(t.hidden||t instanceof Ie)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function Ue(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let i=e.querySelector("[autofocus]");if(i)return i;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(i=e.querySelector("[autofocus]"),i)return i}}}const n=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){if(_e(s))return s;s=n.nextNode()}})(t)?.focus()}var je=new WeakMap;function ze(t){if(!Re(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Ce("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Re(t,!1))return;let i=!1;if("auto"===t.popover){const i=t.getAttribute("popover");if(Ge(function(t){const e=new Map;let i=0;for(const n of Oe.get(t.ownerDocument)||[])e.set(n,i),i+=1;e.set(t,i),i+=1;let n=null;return function(t){const i=$e(t);if(null===i)return null;const s=e.get(i);(null===n||e.get(n)<s)&&(n=i)}(t.parentElement||Be(t)),n}(t)||e,!1,!0),i!==t.getAttribute("popover")||!Re(t,!1))return}Ve(e)||(i=!0),je.delete(t);const n=e.activeElement;t.classList.add(":popover-open"),He.set(t,"showing"),Pe.has(e)||Pe.set(e,new Set),Pe.get(e).add(t),Ue(t),"auto"===t.popover&&(Oe.has(e)||Oe.set(e,new Set),Oe.get(e).add(t),Qe(Fe.get(t),!0)),i&&n&&"auto"===t.popover&&je.set(t,n),Me(t,"closed","open")}function Ke(t,e=!1,i=!1){if(!Re(t,!0))return;const n=t.ownerDocument;if("auto"===t.popover&&(Ge(t,e,i),!Re(t,!0)))return;if(Qe(Fe.get(t),!1),Fe.delete(t),i&&(t.dispatchEvent(new Ce("beforetoggle",{oldState:"open",newState:"closed"})),!Re(t,!0)))return;Pe.get(n)?.delete(t),Oe.get(n)?.delete(t),t.classList.remove(":popover-open"),He.set(t,"hidden"),i&&Me(t,"open","closed");const s=je.get(t);s&&(je.delete(t),e&&s.focus())}function Ye(t,e=!1,i=!1){let n=Ve(t);for(;n;)Ke(n,e,i),n=Ve(t)}function Ge(t,e,i){const n=t.ownerDocument||t;if(t instanceof Document)return Ye(n,e,i);let s=null,o=!1;for(const e of Oe.get(n)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return Ye(n,e,i);for(;s&&"showing"===Ne(s)&&Oe.get(n)?.size;)Ke(s,e,i)}var Ze=new WeakMap;function Je(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const i=e.ownerDocument;if(!Ve(i))return;const n=We(e);if(n&&"pointerdown"===t.type)Ze.set(i,n);else if("pointerup"===t.type){const t=Ze.get(i)===n;Ze.delete(i),t&&Ge(n||i,!1,!0)}}var Xe=new WeakMap;function Qe(t,e=!1){if(!t)return;Xe.has(t)||Xe.set(t,t.getAttribute("aria-expanded"));const i=t.popoverTargetElement;if(i instanceof HTMLElement&&"auto"===i.popover)t.setAttribute("aria-expanded",String(e));else{const e=Xe.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var ti=globalThis.ShadowRoot||function(){};function ei(t,e,i){const n=t[e];Object.defineProperty(t,e,{value(t){return n.call(this,i(t))}})}var ii=/(^|[^\\]):popover-open\b/g;function ni(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var si,oi,ri,ai,li=null;function ci(t){const e=ni();if(null===li)try{(li=new CSSStyleSheet).replaceSync(e)}catch{li=!1}if(!1===li){const i=document.createElement("style");i.textContent=e,t instanceof Document?t.head.prepend(i):t.prepend(i)}else t.adoptedStyleSheets=[li,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ii,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Ce,ei(Document.prototype,"querySelector",t),ei(Document.prototype,"querySelectorAll",t),ei(Element.prototype,"querySelector",t),ei(Element.prototype,"querySelectorAll",t),ei(Element.prototype,"matches",t),ei(Element.prototype,"closest",t),ei(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ze(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Ke(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===He.get(this)&&void 0===t||!1===t?Ke(this,!0,!0):void 0!==t&&!0!==t||ze(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const i=e.call(this,t);return ci(i),i}}});const i=HTMLElement.prototype.attachInternals;i&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=i.call(this);return t.shadowRoot&&ci(t.shadowRoot),t}}});const n=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),n.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),n.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=n.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return n.delete(this),null;const e=Be(this),i=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof ti)&&i&&e.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),i=e[0];if(!(i instanceof Element)||i?.shadowRoot)return;const n=Be(i);if(!(n instanceof ti||n instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const i=Ne(e);"show"===t.popoverTargetAction&&"showing"===i||"hide"===t.popoverTargetAction&&"hidden"===i||("showing"===i?Ke(e,!0,!0):Re(e,!1)&&(Fe.set(e,t),ze(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,i=t.target;t.defaultPrevented||!i||"Escape"!==e&&"Esc"!==e||Ge(i.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Je),t.addEventListener("pointerup",Je)})(document),ci(document)}();const hi=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),di=t=>t.textContent?.trim()[0].toLowerCase(),ui=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),si.add(this),oi.set(this,null),ri.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,ri,new AbortController,"f");const{signal:t}=b(this,ri,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,ri,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(hi)){b(this,oi,"f")?.abort();const{signal:e}=v(this,oi,new AbortController,"f");for(const i of b(this,si,"a",ai)){i.setAttribute("tabindex",i===t.target?"0":"-1");const n=t.target.closest("[popover]");i===t.target&&"auto"===n?.popover&&n.closest("focus-group")===this&&n.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,oi,"f")?.abort(),i.setAttribute("tabindex","-1"),n.id)){const t=this.querySelector(`[popovertarget="${n.id}"]`);t?t.setAttribute("tabindex","0"):b(this,si,"a",ai)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const n=Array.from(b(this,si,"a",ai));let s=n.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=n.length-1,t.preventDefault();else{if(!this.mnemonics||!ui.test(o))return;{const e=o.toLowerCase(),r=s>0&&di(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&di(t)===e)),s<0&&!i&&(s=n.findIndex((t=>di(t)===e)))}}i&&s<0&&(s=0),!i&&s>=n.length&&(s=0);const r=n.at(Math.min(s,n.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}oi=new WeakMap,ri=new WeakMap,si=new WeakSet,ai=function(){return this.querySelectorAll(hi)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let fi=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],fi.prototype,"hasOverflow",void 0),g([I],fi.prototype,"labelledBy",void 0),fi=g([z("scrollable-region")],fi),window.ScrollableRegionElement=fi;const mi=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var pi,gi,bi,vi;function wi(t){document.activeElement!==t&&t?.focus()}const yi=[];function Ei(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){t.stopPropagation();const e=document.getElementById(n);if(e instanceof ModalDialogElement)return e.openButton=i,e.show(),void t.preventDefault()}if(yi.length&&(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n)){const t=document.getElementById(n);if(t instanceof ModalDialogElement){const e=yi.findIndex((t=>t.id===n));yi.splice(e,1),t.close(i.hasAttribute("data-submit-dialog-id"))}}}function Ai(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ei(t)}function Li(t){const e=t.target;if(e?.closest("button"))return;const i=yi[yi.length-1];if(!i)return;!e.closest(`#${i.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(yi.pop(),i.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),pi.add(this),gi.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,pi,"a",bi)?.classList.remove("Overlay--hidden"),b(this,gi,"f").signal.aborted&&v(this,gi,new AbortController,"f"),gt(this,this.querySelector("[autofocus]"),b(this,gi,"f").signal),yi.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,pi,"a",bi)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,gi,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");wi(t?st(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ei),document.addEventListener("keydown",Ai),document.addEventListener("mousedown",Li),this.addEventListener("keydown",(t=>b(this,pi,"m",vi).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var ki,Ti,Si,Ci,xi,Mi,Ii,Di;gi=new WeakMap,pi=new WeakSet,bi=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},vi=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let Pi=class NavListElement extends HTMLElement{constructor(){super(...arguments),ki.add(this),Ti.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Ti,new Y(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Ti,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,ki,"m",Si).call(this,t);return!!e&&(b(this,ki,"m",Mi).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,ki,"m",Ci).call(this,t);return!!e&&(b(this,ki,"m",Mi).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,ki,"m",xi).call(this);return!!t&&(b(this,ki,"m",Mi).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const i=e.closest("button");i&&(this.itemIsExpanded(i)?this.collapseItem(i):this.expandItem(i),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let i=e.closest("button");if(!i){const t=e.getAttribute("aria-labelledby");if(!t)return;i=document.getElementById(t)}this.itemIsExpanded(i)&&"Escape"===t.key&&this.collapseItem(i),t.stopPropagation()}};var Oi,Hi,Ni;Ti=new WeakMap,ki=new WeakSet,Si=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},Ci=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},xi=function(){return b(this,ki,"m",Ci).call(this,window.location.pathname)},Mi=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,ki,"m",Ii).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const i=b(this,ki,"m",Di).call(this,t);i&&(this.expandItem(i),i.classList.add("ActionListContent--hasActiveSubItem"))},Ii=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,ki,"m",Di).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},Di=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([j],Pi.prototype,"items",void 0),g([U],Pi.prototype,"topLevelList",void 0),Pi=g([z("nav-list")],Pi);let Fi=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),Oi.add(this),Ni.set(this,new Y(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const i=await fetch(t);if(!i.ok)return;e=await i.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const i=b(this,Oi,"m",Hi).call(this,document,e);i?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const n=t.target.closest("button").getAttribute("data-list-id");document.getElementById(n).append(i),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var Ri,qi;Ni=new WeakMap,Oi=new WeakSet,Hi=function(t,e){const i=t.createElement("template");return i.innerHTML=e,t.importNode(i.content,!0)},g([U],Fi.prototype,"showMoreItem",void 0),g([j],Fi.prototype,"focusMarkers",void 0),Fi=g([z("nav-list-group")],Fi),window.NavListGroupElement=Fi;let Wi=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),Ri.add(this)}connectedCallback(){b(this,Ri,"m",qi).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true")}};Ri=new WeakSet,qi=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([j],Wi.prototype,"items",void 0),Wi=g([z("segmented-control")],Wi),window.customElements.get("segmented-control")||(window.SegmentedControlElement=Wi,window.customElements.define("segmented-control",Wi));let Vi=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const i={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(i.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:i,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const n=e.headers.get("Content-Type");window.Turbo&&this.turbo&&n?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var Bi,$i,_i,Ui,ji,zi,Ki,Yi,Gi,Zi,Ji,Xi;g([U],Vi.prototype,"switch",void 0),g([U],Vi.prototype,"loadingSpinner",void 0),g([U],Vi.prototype,"errorIcon",void 0),g([I],Vi.prototype,"turbo",void 0),Vi=g([z("toggle-switch")],Vi),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=Vi,window.customElements.define("toggle-switch",Vi));const Qi=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),tn="sr-only",en=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function nn(t){for(const e of an)e!==t&&(Qi(e)?e.hidePopover():an.delete(e))}function sn(){nn()}function on(t){setTimeout((()=>{for(const e of an)Qi(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const rn=new Set,an=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),Bi.add(this),$i.set(this,void 0),_i.set(this,"center"),Ui.set(this,"outside-bottom"),ji.set(this,!1),zi.set(this,"mouse"),Ki.set(this,!1)}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: min(var(--overlay-width-small), 100vw);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,zi,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Qi(this)?this.hidePopover():t||Qi(this)||this.showPopover()}get hiddenFromView(){return!Qi(this)}connectedCallback(){if(rn.add(this),b(this,Bi,"m",Zi).call(this),b(this,Bi,"m",Ji).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,Bi,"m",Yi).call(this,!1),v(this,ji,!0,"f"),b(this,Bi,"m",Gi).call(this)}disconnectedCallback(){rn.delete(this),an.delete(this),b(this,$i,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Qi(this);"beforetoggle"===t.type&&t.currentTarget!==this&&v(this,Ki,"open"===t.newState,"f");const i=("mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")))&&!b(this,Ki,"f"),n="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this&&"open"===t.newState,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||Qi(this)?e&&a&&Qi(this)&&this.hidePopover():(v(this,zi,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,Bi,"m",Yi).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,Bi,"m",Gi).call(this):"id"===t||"data-type"===t?b(this,Bi,"m",Zi).call(this):"data-direction"===t&&b(this,Bi,"m",Ji).call(this))}}var ln,cn;$i=new WeakMap,_i=new WeakMap,Ui=new WeakMap,ji=new WeakMap,zi=new WeakMap,Ki=new WeakMap,Bi=new WeakSet,Yi=function(t){t?(an.add(this),this.classList.remove(tn),nn(this),b(this,Bi,"m",Xi).call(this)):(an.delete(this),this.classList.remove(...en),this.classList.add(tn))},Gi=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,$i,"f")?.abort(),v(this,$i,new AbortController,"f");const{signal:t}=b(this,$i,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",sn),this.ownerDocument.addEventListener("focusin",on),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},Zi=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Ji=function(){this.classList.remove(...en);const t=this.direction;"n"===t?(v(this,_i,"center","f"),v(this,Ui,"outside-top","f")):"ne"===t?(v(this,_i,"end","f"),v(this,Ui,"outside-top","f")):"e"===t?(v(this,_i,"center","f"),v(this,Ui,"outside-right","f")):"se"===t?(v(this,_i,"end","f"),v(this,Ui,"outside-bottom","f")):"s"===t?(v(this,_i,"center","f"),v(this,Ui,"outside-bottom","f")):"sw"===t?(v(this,_i,"start","f"),v(this,Ui,"outside-bottom","f")):"w"===t?(v(this,_i,"center","f"),v(this,Ui,"outside-left","f")):"nw"===t&&(v(this,_i,"start","f"),v(this,Ui,"outside-top","f"))},Xi=function(){if(!this.control)return;if(!b(this,ji,"f")||!Qi(this))return;const t=X(this,this.control,{side:b(this,Ui,"f"),align:b(this,_i,"f"),anchorOffset:0}),e=t.anchorSide,i=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let n="s";n="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===i?"n":"start"===i?"ne":"nw":"center"===i?"s":"start"===i?"se":"sw",this.classList.add(`tooltip-${n}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let hn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),ln.add(this)}dismiss(){if("remove"===b(this,ln,"a",cn)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};ln=new WeakSet,cn=function(){return this.getAttribute("data-dismiss-scheme")},g([U],hn.prototype,"titleText",void 0),hn=g([z("x-banner")],hn),window.customElements.get("x-banner")||(window.XBannerElement=hn,window.customElements.define("x-banner",hn));class dn{constructor(t,e,{tabInsertsSuggestions:i,defaultFirstOption:n}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==i||i,this.defaultFirstOption=null!=n&&n,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)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":fn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&fn(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=>function(t,e){e.isComposing="compositionstart"===t.type;const i=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!i)return;e.clearSelection()}(t,this),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",un),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",un)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(mn)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(mn)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(mn),n=i.indexOf(e);if(n===i.length-1&&1===t||0===n&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:i.length-1;if(e&&n>=0){const e=n+t;e>=0&&e<i.length&&(s=e)}const o=i[s];if(o)for(const t of i)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),pn(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function un(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function fn(t,e){const i=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!i&&("true"===i.getAttribute("aria-disabled")||i.click(),!0)}function mn(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function pn(t,e){(function(t,e){const i=t.scrollTop,n=i+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=i&&o<=n})(t,e)||(t.scrollTop=e.offsetTop)}const gn=window.testScreenReaderDelay||100;class bn{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new dn(e,i,{defaultFirstOption:n}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=n,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=i.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 i;return function(...n){clearTimeout(i),i=window.setTimeout((()=>{clearTimeout(i),t(...n)}),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===(s=this.clearButton)||void 0===s||s.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}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const i=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=i,i||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(const 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)}),gn)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const i=new URL(e,window.location.href),n=new URLSearchParams(i.search.slice(1));n.append("q",t),i.search=n.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(i).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),i=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,n=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${n} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${n||"No"} results.`),i?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 vn,wn,yn,En,An,Ln=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},kn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},Tn=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i};const Sn=globalThis.HTMLElement||null;class Cn extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,Tn(e,["relatedTarget"])),this.relatedTarget=i}}const xn=new WeakMap;let Mn=null;class AutoCompleteElement extends Sn{constructor(){super(...arguments),vn.add(this),wn.set(this,null),yn.set(this,null),An.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Mn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Ln(this,wn,"f"))||void 0===t?void 0:t.isConnected)return Ln(this,wn,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){kn(this,wn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Ln(this,yn,"f"))||void 0===t?void 0:t.isConnected)?Ln(this,yn,"f"):this.querySelector("input")}set inputElement(t){kn(this,yn,t,"f"),Ln(this,vn,"m",En).call(this)}connectedCallback(){this.isConnected&&(Ln(this,vn,"m",En).call(this),new MutationObserver((()=>{xn.get(this)||Ln(this,vn,"m",En).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=xn.get(this);t&&(t.destroy(),xn.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=Ln(this,An,"f"))||void 0===e||e.abort();const{signal:i}=kn(this,An,new AbortController,"f"),n=await fetch(t.toString(),{signal:i,headers:{Accept:"text/fragment+html"}});if(!n.ok)throw new Error(await n.text());if(Mn){return(await Mn).createHTML(await n.text(),n)}return await n.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,i){var n,s;if(e===i)return;const o=xn.get(this);if(o)switch(this.forElement===(null===(n=xn.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=xn.get(this))||void 0===s?void 0:s.input)||Ln(this,vn,"m",En).call(this),t){case"open":null===i?o.close():o.open();break;case"value":null!==i&&(o.input.value=i),this.dispatchEvent(new Cn("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}wn=new WeakMap,yn=new WeakMap,An=new WeakMap,vn=new WeakSet,En=function(){var t;null===(t=xn.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");xn.set(this,new bn(this,i,e,n)),e.setAttribute("role","listbox")};const In="undefined"!=typeof globalThis?globalThis:window;try{In.AutocompleteElement=In.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(In.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Dn(t){const e=function(t){return t.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g," ").replace(/[\u200B-\u200D\u2060\uFEFF\u180E]/g,"")}(t);if("clipboard"in navigator)return navigator.clipboard.writeText(e);const i=document.body;if(!i)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(e);return i.appendChild(n),function(t){const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const i=document.createRange();i.selectNodeContents(t),e.addRange(i),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}(n),i.removeChild(n),Promise.resolve()}async function Pn(t){const e=t.getAttribute("for"),i=t.getAttribute("value");function n(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(i)await Dn(i),n();else if(e){const i="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const o=i.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?Dn(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?Dn(s.href):function(t){return Dn(t.textContent||"")}(s)),n())}}function On(t){const e=t.currentTarget;e instanceof HTMLElement&&Pn(e)}function Hn(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),Pn(e))}}function Nn(t){t.currentTarget.addEventListener("keydown",Hn)}function Fn(t){t.currentTarget.removeEventListener("keydown",Hn)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",On),this.addEventListener("focus",Nn),this.addEventListener("blur",Fn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const Rn="undefined"!=typeof globalThis?globalThis:window;try{Rn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(Rn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function qn(t){t.style.display="inline-block"}function Wn(t){t.style.display="none"}const Vn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=Vn.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),Vn.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(Wn(e),qn(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),Vn.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(qn(e),Wn(i))}(t),Vn.delete(t)}),2e3))}));var Bn,$n=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};class _n{constructor(t=100){this.max=t,Bn.set(this,new Map)}get(t){const e=$n(this,Bn,"f").get(t);return void 0!==e&&($n(this,Bn,"f").delete(t),$n(this,Bn,"f").set(t,e)),e}set(t,e){$n(this,Bn,"f").delete(t),$n(this,Bn,"f").set(t,e),$n(this,Bn,"f").size>this.max&&$n(this,Bn,"f").delete($n(this,Bn,"f").keys().next().value)}clear(){$n(this,Bn,"f").clear()}}Bn=new WeakMap;const Un=[];function jn(t){const e=new _n(t);return Un.push(e),e}function zn(t,e){return`${t}\0${e?JSON.stringify(e):""}`}"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("languagechange",(function(){for(const t of Un)t.clear()}));const Kn=jn();function Yn(t,e){const i=zn(t,e);let n=Kn.get(i);return n||Kn.set(i,n=new Intl.DateTimeFormat(t,e)),n}const Gn=jn();function Zn(t,e){const i=zn(t,e);let n=Gn.get(i);return n||Gn.set(i,n=new Intl.RelativeTimeFormat(t,e)),n}const Jn=jn();function Xn(t,e){const i=zn(t,e);let n=Jn.get(i);return n||Jn.set(i,n=new Intl.NumberFormat(t,e)),n}const Qn=jn();var ts,es=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},is=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};const ns="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const i of t)e.push({type:"element",value:i}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ss=jn();const os=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],rs={minimumIntegerDigits:2};class as{constructor(t,e={}){ts.set(this,void 0);let i=String(e.style||"short");"long"!==i&&"short"!==i&&"narrow"!==i&&"digital"!==i&&(i="short");let n="digital"===i?"numeric":i;const s=e.hours||n;n="2-digit"===s?"numeric":s;const o=e.minutes||n;n="2-digit"===o?"numeric":o;const r=e.seconds||n;n="2-digit"===r?"numeric":r;const a=e.milliseconds||n;es(this,ts,{locale:t,style:i,years:e.years||"digital"===i?"short":i,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===i?"short":i,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===i?"short":i,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===i?"short":i,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===i?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===i?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===i?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return is(this,ts,"f")}formatToParts(t){const e=[],i=is(this,ts,"f"),n=i.style,s=i.locale;for(const[o,r]of os){const a=t[o];if("auto"===i[`${o}Display`]&&!a)continue;const l=i[o];let c=Xn(s,"2-digit"===l?rs:"numeric"===l?{}:{style:"unit",unit:r,unitDisplay:l}).format(a);"months"===o&&("narrow"===l||"narrow"===n&&c.endsWith("m"))&&(c=c.replace(/(\d+)m$/,"$1mo")),e.push(c)}return function(t,e){const i=`${t}\0${JSON.stringify(e)}`;let n=ss.get(i);return n||ss.set(i,n=new ns(t,e)),n}(s,{type:"unit",style:"digital"===n?"short":n}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}ts=new WeakMap;const ls=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,cs=jn(),hs=["style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay"];const ds=["year","month","week","day","hour","minute","second","millisecond"],us=t=>ls.test(t);class fs{constructor(t=0,e=0,i=0,n=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=i,this.days=n,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new fs(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const i=String(t).trim(),n=i.startsWith("-")?-1:1,s=null===(e=i.match(ls))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new fs(...s):new fs}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new fs(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(ms(i,fs.from(t)).getTime()-i),s=Math.abs(ms(i,fs.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){const i=function(t,e){var i;let n=t;for(const t of hs)n+=`\0${null!==(i=e[t])&&void 0!==i?i:""}`;return n}(t,e);let n=cs.get(i);return n||cs.set(i,n=new as(t,e)),n.format(this)}}function ms(t,e){const i=new Date(t);return e.sign<0?(i.setUTCSeconds(i.getUTCSeconds()+e.seconds),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCFullYear(i.getUTCFullYear()+e.years)):(i.setUTCFullYear(i.getUTCFullYear()+e.years),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCSeconds(i.getUTCSeconds()+e.seconds)),i}function ps(t,e="second",i=Date.now()){const n=t.getTime()-i;if(0===n)return new fs;const s=Math.sign(n),o=Math.abs(n),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),h=Math.floor(c/30),d=Math.floor(h/12),u=ds.indexOf(e);return new fs(u>=0?d*s:0,u>=1?(h-12*d)*s:0,0,u>=3?(c-30*h)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}function gs(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const i=t.sign;let n=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),h=Math.abs(t.milliseconds);h>=900&&(c+=Math.round(h/1e3)),(c||l||a||r||o||s||n)&&(h=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||n)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||n)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||n)&&(a=0);const d=e.getFullYear(),u=e.getMonth(),f=e.getDate();if(r>=27||n+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*i+1),t.setDate(0);const a=Math.max(0,f-t.getDate()),l=new Date(e);l.setFullYear(d+n*i),l.setDate(f-a),l.setMonth(u+s*i),l.setDate(f-a+r*i);const c=l.getFullYear()-e.getFullYear(),h=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+h);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,s=n=0):p<=11?(s=p,n=0):(s=0,n=c*i),(s||n)&&(r=0)}return n&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||n)&&(o=0),r&&o&&!s&&!n&&(o+=Math.round(r/7),r=0),new fs(n*i,s*i,o*i,r*i,a*i,l*i,c*i,h*i)}function bs(t,e){const i=gs(t,e);if(i.blank)return[0,"second"];for(const t of ds){if("millisecond"===t)continue;const e=i[`${t}s`];if(e)return[e,t]}return[0,"second"]}var vs,ws,ys,Es,As,Ls,ks,Ts,Ss,Cs,xs,Ms,Is,Ds,Ps,Os,Hs,Ns,Fs,Rs=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},qs=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const Ws=globalThis.HTMLElement||null,Vs=new fs,Bs=new fs(0,0,0,0,0,1);class $s extends Event{constructor(t,e,i,n){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=i,this.newTitle=n}}function _s(t){const e=t.date;if(!e)return 1/0;const i=Date.now();if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const n=Math.abs(i-e.getTime());let s=36e5;n<6e4?s=1e3:n<36e5&&(s=6e4);const o=Us(t);if("micro"===t.format&&o){const t=fs.from(o),n=e.getTime()>i?new fs(-(r=t).years,-r.months,-r.weeks,-r.days,-r.hours,-r.minutes,-r.seconds,-r.milliseconds):t,a=ms(e,n).getTime()-i;a>0&&(s=Math.min(s,a))}var r;return s}function Us(t){const e=t.getAttribute("threshold");return e&&us(e)?e:null}let js;"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("languagechange",(()=>{js=void 0}));const zs=new class{constructor(){this.elements=new Set,this.time=1/0,this.updating=!1,this.timer=-1}observe(t){if(this.elements.add(t),this.updating)return;const e=t.date;if(e&&e.getTime()){const e=_s(t),i=Date.now()+e;(i<this.time||this.time<=Date.now())&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=i)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;this.updating=!0;try{for(const e of this.elements)t=Math.min(t,_s(e)),e.update()}finally{this.updating=!1}this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Ws{constructor(){super(...arguments),vs.add(this),ws.set(this,!1),ys.set(this,!1),As.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Fs.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}get timeZone(){var t;return(null===(t=this.closest("[time-zone]"))||void 0===t?void 0:t.getAttribute("time-zone"))||this.ownerDocument.documentElement.getAttribute("time-zone")||void 0}get hourCycle(){var t;const e=(null===(t=this.closest("[hour-cycle]"))||void 0===t?void 0:t.getAttribute("hour-cycle"))||this.ownerDocument.documentElement.getAttribute("hour-cycle");return"h11"===e||"h12"===e||"h23"===e||"h24"===e?e:function(){if(void 0===js)try{js=!0===new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions().hour12}catch(t){js=!1}return js}()?"h12":"h23"}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden","time-zone","hour-cycle"]}get onRelativeTimeUpdated(){return Rs(this,Fs,"f")}set onRelativeTimeUpdated(t){Rs(this,Fs,"f")&&this.removeEventListener("relative-time-updated",Rs(this,Fs,"f")),qs(this,Fs,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&us(t)?t:"P30D"}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return ds.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){zs.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&qs(this,ws,null!==i&&(this.date&&Rs(this,vs,"m",Ls).call(this,this.date,Rs(this,vs,"a",Es),this.timeZone,this.hourCycle))!==i,"f"),Rs(this,ys,"f")||"title"===t&&Rs(this,ws,"f")||qs(this,ys,(async()=>{await Promise.resolve(),this.update(),qs(this,ys,!1,"f")})(),"f"))}update(){const t=Rs(this,As,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(Rs(this,As,"f").textContent=t);const s=Date.now(),o=Rs(this,vs,"a",Es),r=this.timeZone,a=this.hourCycle;Rs(this,ws,"f")||(i=Rs(this,vs,"m",Ls).call(this,n,o,r,a)||"",i&&!this.noTitle&&i!==e&&this.setAttribute("title",i));const l=ps(n,this.precision,s),c=Rs(this,vs,"m",Ts).call(this,l,ps(n,"millisecond",s));let h=t;const d=Rs(this,vs,"m",Ns).call(this,c);h=d?Rs(this,vs,"m",Os).call(this,n,o,r,a):"duration"===c?"micro"===this.format&&"auto"!==this.tense&&Intl.RelativeTimeFormat?Rs(this,vs,"m",Cs).call(this,l,o):Rs(this,vs,"m",xs).call(this,l,o):"relative"===c?Rs(this,vs,"m",Ms).call(this,l,o):Rs(this,vs,"m",Is).call(this,n,o,r,a),h?Rs(this,vs,"m",Hs).call(this,h):this.shadowRoot===Rs(this,As,"f")&&this.textContent&&Rs(this,vs,"m",Hs).call(this,this.textContent),h===t&&i===e||this.dispatchEvent(new $s(t,h,e,i));!d&&("relative"===c||"duration"===c)||"micro"===this.format&&Boolean(Rs(this,vs,"m",ks).call(this))&&n.getTime()>s||d&&(Rs(this,vs,"m",Ds).call(this,n,o,r)||Rs(this,vs,"m",Ps).call(this,n,o,r))?zs.observe(this):zs.unobserve(this)}}ws=new WeakMap,ys=new WeakMap,As=new WeakMap,Fs=new WeakMap,vs=new WeakSet,Es=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");if(!e)return"default";try{return function(t){let e=Qn.get(t);return e||Qn.set(t,e=new Intl.Locale(t)),e}(e).toString()}catch(t){return"default"}},Ls=function(t,e,i,n){return Yn(e,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:i,hourCycle:n}).format(t)},ks=function(){return Us(this)},Ts=function(t,e=t){const i=this.format;if("datetime"===i)return"datetime";if("duration"===i)return"duration";if("elapsed"===i)return"duration";if("micro"===i){const t=Rs(this,vs,"m",ks).call(this);return t&&-1===fs.compare(e,t)?"datetime":"duration"}if(("auto"===i||"relative"===i)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===fs.compare(t,this.threshold))return"relative"}return"datetime"},Ss=function(t){return 0===(t=gs(t)).months&&("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)?Bs:t},Cs=function(t,e){const i=Zn(e,{numeric:"always",style:"narrow"});t=Rs(this,vs,"m",Ss).call(this,t);const[n,s]=bs(t.blank?Bs:t);return i.format(Math.abs(n)*("past"===this.tense?-1:1),s)},xs=function(t,e){const i=this.format,n=this.formatStyle,s=this.tense;let o=Vs;"micro"===i?(t=Rs(this,vs,"m",Ss).call(this,t),o=Bs):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:n,[r]:"always"}):t.abs().toLocaleString(e,{style:n})},Ms=function(t,e){const i=Zn(e,{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Vs),"past"===n&&-1!==t.sign&&(t=Vs);const[s,o]=bs(t);return"second"===o&&s<10?i.format(0,"millisecond"===this.precision?"second":this.precision):i.format(s,o)},Is=function(t,e,i,n){const s=Yn(e,{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName,timeZone:i,hourCycle:n});return`${this.prefix} ${s.format(t)}`.trim()},Ds=function(t,e,i){const n=new Date,s=Yn(e,{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"});return s.format(n)===s.format(t)},Ps=function(t,e,i){const n=new Date,s=Yn(e,{timeZone:i,year:"numeric"});return s.format(n)===s.format(t)},Os=function(t,e,i,n){const s={hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:i,hourCycle:n};if(Rs(this,vs,"m",Ds).call(this,t,e,i)){let i=Zn(e,{numeric:"auto"}).format(0,"day");i=i.charAt(0).toLocaleUpperCase(e)+i.slice(1);return`${i} ${Yn(e,s).format(t)}`}const o=Object.assign(Object.assign({},s),{day:"numeric",month:"short"});return Rs(this,vs,"m",Ps).call(this,t,e,i)?Yn(e,o).format(t):Yn(e,Object.assign(Object.assign({},o),{year:"numeric"})).format(t)},Hs=function(t){const e=Rs(this,As,"f"),i=this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden");let n=e.firstElementChild;n&&"root"===n.getAttribute("part")&&1===e.childNodes.length||(n=document.createElement("span"),n.setAttribute("part","root"),e.replaceChildren(n)),i?"true"!==n.getAttribute("aria-hidden")&&n.setAttribute("aria-hidden","true"):n.hasAttribute("aria-hidden")&&n.removeAttribute("aria-hidden"),n.textContent!==t&&(n.textContent=t)},Ns=function(t){var e;return("duration"!==t||"micro"===this.format)&&("true"===this.ownerDocument.documentElement.getAttribute("data-prefers-absolute-time")||"true"===(null===(e=this.ownerDocument.body)||void 0===e?void 0:e.getAttribute("data-prefers-absolute-time")))};const Ks="undefined"!=typeof globalThis?globalThis:window;try{Ks.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Ks.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Ys(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const i=t.target;if(!(i instanceof HTMLElement))return;if(i.closest(this.tagName)!==this)return;if("tab"!==i.getAttribute("role")&&!i.closest('[role="tablist"]'))return;const n=Ys(this),s=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=i.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=n.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Ys(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const i=t.target.closest('[role="tab"]');if(!(i instanceof HTMLElement&&i.closest('[role="tablist"]')))return;const n=e.indexOf(i);this.selectTab(n)}));for(const t of Ys(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Ys(this),i=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const n=e[t],s=i[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of i)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),n.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const Gs="undefined"!=typeof globalThis?globalThis:window;try{Gs.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Gs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let Zs=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Js(t,e=0,{start:i=!1,middle:n=!1,once:s=!1}={}){return function(t,e=0,{start:i=!0,middle:n=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const h=Date.now()-r;r=Date.now(),i?(i=!1,t.apply(this,c),s&&l.cancel()):(n&&h<e||!n)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),n?e-h:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:i,middle:n,once:s})}g([j],Zs.prototype,"fields",void 0),Zs=g([z("primer-multi-input")],Zs),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:Zs}),window.customElements.define("primer-multi-input",Zs));var Xs,Qs,to=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},eo=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};!function(t){t.GET="GET",t.POST="POST"}(Qs||(Qs={}));const io=new WeakMap;class no extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class so extends no{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class oo extends no{constructor(){super("complete")}}class ro extends no{constructor(t){super("success"),this.response=t}}class ao extends so{constructor(){super("start","Verifying…")}}class lo extends so{constructor(t){super("error","Validation failed"),this.response=t}}class co extends no{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),Xs.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return to(this,Xs,"f")}set onloadend(t){to(this,Xs,"f")&&this.removeEventListener("loadend",to(this,Xs,"f")),eo(this,Xs,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Js(fo.bind(null,this),300),i={check:e,controller:null};io.set(this,i);const n=ho.bind(null,e);t.addEventListener("blur",n),t.addEventListener("input",n),t.addEventListener("triggervalidation",n),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=io.get(this);e&&(io.delete(this),t.removeEventListener("input",uo),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return Qs[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function ho(t,e){const i=e.currentTarget;if(!(i instanceof HTMLInputElement))return;const n=i.closest("auto-check");n instanceof AutoCheckElement&&("input"===e.type&&n.setAttribute("dirty",""),0!==i.value.length&&("blur"===e.type&&!n.validateOnKeystroke&&n.hasAttribute("dirty")||"input"===e.type&&n.validateOnKeystroke||"triggervalidation"===e.type)&&(uo(e),t()))}function uo(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const i=e.closest("auto-check");if(!(i instanceof AutoCheckElement))return;const n=i.src,s=i.csrf,o=i.httpMethod,r=io.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new ao;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function fo(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=io.get(t),r=t.httpMethod;if(!n||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(n,window.location.origin);"POST"===r?(a.append(i,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new co(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const i=await async function(t,e,i){"GET"===i.method&&delete i.body;try{const n=await fetch(e,i);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),n}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(i.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new ro(i.clone()));else{t.validateOnKeystroke=!0;const n=new lo(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new oo)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new oo))}}Xs=new WeakMap;const mo="undefined"!=typeof globalThis?globalThis:window;try{mo.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(mo.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}class po{constructor(t,e,i){this.inputElement=t,this.characterLimitElement=e,this.characterLimitSrElement=i,this.SCREEN_READER_DELAY=500,this.announceTimeout=null,this.isInitialLoad=!0}initialize(t){this.inputElement.addEventListener("keyup",(()=>this.updateCharacterCount()),t?{signal:t}:void 0),this.inputElement.addEventListener("paste",(()=>setTimeout((()=>this.updateCharacterCount()),50)),t?{signal:t}:void 0),this.updateCharacterCount(),this.isInitialLoad=!1}cleanup(){this.announceTimeout&&clearTimeout(this.announceTimeout)}pluralize(t,e){return 1===t?e:`${e}s`}updateCharacterCount(){if(!this.characterLimitElement)return;const t=this.characterLimitElement.getAttribute("data-max-length");if(!t)return;const e=parseInt(t,10)-this.inputElement.value.length;let i="";if(e>=0){i=`${e} ${this.pluralize(e,"character")} remaining`;const t=this.characterLimitElement.querySelector(".FormControl-caption-text");t&&(t.textContent=i),this.clearError()}else{const t=-e;i=`${t} ${this.pluralize(t,"character")} over`;const n=this.characterLimitElement.querySelector(".FormControl-caption-text");n&&(n.textContent=i),this.setError()}this.isInitialLoad||this.announceToScreenReader(i)}announceToScreenReader(t){this.announceTimeout&&clearTimeout(this.announceTimeout),this.announceTimeout=window.setTimeout((()=>{this.characterLimitSrElement&&(this.characterLimitSrElement.textContent=t)}),this.SCREEN_READER_DELAY)}setError(){this.inputElement.setAttribute("invalid","true"),this.inputElement.setAttribute("aria-invalid","true"),this.characterLimitElement.classList.add("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.removeAttribute("hidden")}clearError(){this.inputElement.removeAttribute("invalid"),this.inputElement.removeAttribute("aria-invalid"),this.characterLimitElement.classList.remove("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.setAttribute("hidden","")}}var go,bo;let vo=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),go.set(this,void 0),bo.set(this,null)}connectedCallback(){b(this,go,"f")?.abort();const{signal:t}=v(this,go,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t}),this.characterLimitElement&&(v(this,bo,new po(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,bo,"f").initialize(t))}disconnectedCallback(){b(this,go,"f")?.abort(),b(this,bo,"f")?.cleanup()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const i=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(i)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};var wo;go=new WeakMap,bo=new WeakMap,g([U],vo.prototype,"inputElement",void 0),g([U],vo.prototype,"validationElement",void 0),g([U],vo.prototype,"validationMessageElement",void 0),g([U],vo.prototype,"validationSuccessIcon",void 0),g([U],vo.prototype,"validationErrorIcon",void 0),g([U],vo.prototype,"leadingVisual",void 0),g([U],vo.prototype,"leadingSpinner",void 0),g([U],vo.prototype,"characterLimitElement",void 0),g([U],vo.prototype,"characterLimitSrElement",void 0),vo=g([z("primer-text-field")],vo);let yo=class PrimerTextAreaElement extends HTMLElement{constructor(){super(...arguments),wo.set(this,null)}connectedCallback(){this.characterLimitElement&&(v(this,wo,new po(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,wo,"f").initialize())}disconnectedCallback(){b(this,wo,"f")?.cleanup()}};wo=new WeakMap,g([U],yo.prototype,"inputElement",void 0),g([U],yo.prototype,"characterLimitElement",void 0),g([U],yo.prototype,"characterLimitSrElement",void 0),yo=g([z("primer-text-area")],yo),window.customElements.get("primer-text-area")||(Object.assign(window,{PrimerTextAreaElement:yo}),window.customElements.define("primer-text-area",yo));let Eo=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var Ao,Lo,ko,To,So,Co,xo,Mo,Io,Do,Po,Oo,Ho,No,Fo,Ro,qo,Wo,Vo,Bo,$o;g([U],Eo.prototype,"validationElement",void 0),g([U],Eo.prototype,"validationMessageElement",void 0),Eo=g([z("toggle-switch-input")],Eo);const _o=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'],Uo=_o.map((t=>`:not([hidden]) > ${t}`));let jo=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Ao.add(this),Lo.set(this,void 0),ko.set(this,""),To.set(this,""),So.set(this,!1),Co.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const i of t){const t=i.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:i?.getAttribute("data-value"),element:i})}return e}connectedCallback(){const{signal:t}=v(this,Lo,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.popoverElement?.addEventListener("toggle",this,{signal:t}),b(this,Ao,"m",Vo).call(this),b(this,Ao,"m",Bo).call(this),b(this,Ao,"m",xo).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,Ao,"m",Wo).call(this)&&this.overlay?.update()};v(this,Co,new IntersectionObserver((t=>{for(const i of t){i.target===this.invokerElement&&(i.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),mi(this,(()=>Boolean(this.invokerElement)),(()=>b(this,Co,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true")}disconnectedCallback(){b(this,Lo,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,Ao,"m",Do).call(this,t);if("toggle"===t.type&&"open"===t.newState&&window.requestAnimationFrame((()=>{b(this,Ao,"a",$o)?.focus()})),e&&"mousedown"===t.type)return void v(this,So,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,Ao,"m",Po).call(this,t),void v(this,So,!1,"f");if("focusout"===t.type){if(b(this,So,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,Ao,"m",Fo).call(this)}))}const n=t.target.closest(Uo.join(","));if(null!==n&&i){if(b(this,Ao,"m",Mo).call(this,t))return;const e=n.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e))return void b(this,Ao,"m",Oo).call(this,t,i)}return b(this,Ao,"m",Io).call(this,t)&&(t.preventDefault(),n.click()),void b(this,Ao,"m",Ho).call(this,n)}"include-fragment-replaced"===t.type&&b(this,Ao,"m",No).call(this)}get items(){return Array.from(this.querySelectorAll(Uo.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,Ao,"m",Ho).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,Ao,"m",Ho).call(this,e)}}};Lo=new WeakMap,ko=new WeakMap,To=new WeakMap,So=new WeakMap,Co=new WeakMap,Ao=new WeakSet,xo=function(){const{signal:t}=b(this,Lo,"f");for(const e of this.querySelectorAll(_o.join(",")))e.addEventListener("click",b(this,Ao,"m",Mo).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Ao,"m",Mo).bind(this),{signal:t})},Mo=function(t){if(!b(this,Ao,"m",Do).call(this,t))return!1;const e=t.target.closest(Uo.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Io=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Do=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Ao,"m",Io).call(this,t)},Po=function(t){t.preventDefault(),t.stopPropagation(),b(this,Ao,"m",Wo).call(this)?b(this,Ao,"m",qo).call(this):b(this,Ao,"m",Ro).call(this)},Oo=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,Ao,"m",Wo).call(this)&&b(this,Ao,"m",qo).call(this));const t=this.ownerDocument.activeElement,n=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(n||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},Ho=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,Ao,"m",Wo).call(this)&&b(this,Ao,"m",qo).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,Ao,"m",Vo).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,Ao,"m",Bo).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},No=function(){b(this,Ao,"a",$o)?.focus(),b(this,Ao,"m",xo).call(this),this.setAttribute("data-ready","true")},Fo=function(){b(this,Ao,"m",qo).call(this)},Ro=function(){this.popoverElement?.showPopover()},qo=function(){this.popoverElement?.hidePopover()},Wo=function(){return this.popoverElement?.matches(":popover-open")},Vo=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,ko,b(this,ko,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=this.dynamicLabelPrefix,n.textContent=e.textContent||"",t.replaceChildren(i,n)}else t.textContent=b(this,ko,"f")},Bo=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,To,b(this,To,"f")||e[0].name,"f");for(const e of this.selectedItems){const i=document.createElement("input");i.setAttribute("data-list-input","true"),i.type="hidden",i.autocomplete="off",i.name=b(this,To,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},$o=function(){return this.querySelector(Uo.join(","))},g([U],jo.prototype,"includeFragment",void 0),g([U],jo.prototype,"overlay",void 0),jo=g([z("action-menu")],jo),window.customElements.get("action-menu")||(window.ActionMenuElement=jo,window.customElements.define("action-menu",jo));const zo="less",Ko="equal",Yo="greater";var Go,Zo,Jo,Xo,Qo,tr=t=>{throw TypeError(t)},er=(t,e,i)=>e.has(t)||tr("Cannot "+i),ir=(t,e,i)=>(er(t,e,"read from private field"),i?i.call(t):e.get(t)),nr=(t,e,i)=>e.has(t)?tr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),sr=(t,e,i,n)=>(er(t,e,"write to private field"),e.set(t,i),i),or=(t,e,i)=>(er(t,e,"access private method"),i);class rr{constructor({compareFn:t}){nr(this,Jo),nr(this,Go),nr(this,Zo),sr(this,Go,t),sr(this,Zo,[])}insert(t){ir(this,Zo).push(t),or(this,Jo,Qo).call(this)}pop(){const t=ir(this,Zo)[0];return ir(this,Zo)[ir(this,Zo).length-1]&&(ir(this,Zo)[0]=ir(this,Zo)[ir(this,Zo).length-1],ir(this,Zo).pop()),or(this,Jo,Xo).call(this),t}peek(){return ir(this,Zo)[0]}delete(t){const e=ir(this,Zo).indexOf(t);-1!==e&&(gr(ir(this,Zo),e,ir(this,Zo).length-1),ir(this,Zo).pop(),or(this,Jo,Xo).call(this))}clear(){sr(this,Zo,[])}get size(){return ir(this,Zo).length}}function ar(t){return 2*t+1}function lr(t){return 2*t+2}function cr(t){return Math.floor((t-1)/2)}function hr(t,e){return ar(t)<e}function dr(t,e){return lr(t)<e}function ur(t){return t>0}function fr(t,e){return t[ar(e)]}function mr(t,e){return t[lr(e)]}function pr(t,e){return t[cr(e)]}function gr(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}Go=new WeakMap,Zo=new WeakMap,Jo=new WeakSet,Xo=function(){let t=0;for(;hr(t,ir(this,Zo).length);){let e=ar(t);if(dr(t,ir(this,Zo).length)&&ir(this,Go).call(this,mr(ir(this,Zo),t),fr(ir(this,Zo),t))===zo&&(e=lr(t)),ir(this,Go).call(this,ir(this,Zo)[t],ir(this,Zo)[e])===zo)break;gr(ir(this,Zo),t,e),t=e}},Qo=function(){let t=ir(this,Zo).length-1;for(;ur(t)&&ir(this,Go).call(this,ir(this,Zo)[t],pr(ir(this,Zo),t))===zo;)gr(ir(this,Zo),t,cr(t)),t=cr(t)};var br,vr,wr,yr,Er=Object.defineProperty,Ar=t=>{throw TypeError(t)},Lr=(t,e,i)=>((t,e,i)=>e in t?Er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),kr=(t,e,i)=>e.has(t)||Ar("Cannot "+i),Tr=(t,e,i)=>(kr(t,e,"read from private field"),i?i.call(t):e.get(t)),Sr=(t,e,i)=>e.has(t)?Ar("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Cr=(t,e,i,n)=>(kr(t,e,"write to private field"),e.set(t,i),i);br=Symbol.toStringTag;class xr{constructor(){Lr(this,br,"Deferred"),Sr(this,vr),Sr(this,wr),Sr(this,yr),Cr(this,vr,new Promise(((t,e)=>{Cr(this,wr,t),Cr(this,yr,e)})))}then(t,e){return Promise.prototype.then.apply(Tr(this,vr),[t,e])}catch(t){return Promise.prototype.catch.apply(Tr(this,vr),[t])}finally(t){return Promise.prototype.finally.apply(Tr(this,vr),[t])}resolve(t){Tr(this,wr).call(this,t)}reject(t){Tr(this,yr).call(this,t)}getPromise(){return Tr(this,vr)}}vr=new WeakMap,wr=new WeakMap,yr=new WeakMap;var Mr,Ir,Dr,Pr,Or,Hr,Nr=t=>{throw TypeError(t)},Fr=(t,e,i)=>e.has(t)||Nr("Cannot "+i),Rr=(t,e,i)=>(Fr(t,e,"read from private field"),i?i.call(t):e.get(t)),qr=(t,e,i)=>e.has(t)?Nr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Wr=(t,e,i,n)=>(Fr(t,e,"write to private field"),e.set(t,i),i),Vr=(t,e,i)=>(Fr(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),qr(this,Pr),qr(this,Mr),qr(this,Ir),qr(this,Dr),!this.shadowRoot){const t=function(){if(Br)return Br;return Br=document.createElement("template"),Br.innerHTML=$r,Br}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Wr(this,Mr,!1),Wr(this,Dr,null),Wr(this,Ir,new rr({compareFn:_r}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:i,politeness:n="polite"}=e,s=Date.now(),o=new xr,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Rr(this,Ir).insert(r),Vr(this,Pr,Or).call(this),{...o.getPromise(),cancel:()=>{Rr(this,Ir).delete(r),o.resolve()}}}announceFromElement(t,e){const i=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==i)return this.announce(i,e);return{...Promise.resolve(),cancel:Ur}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==Rr(this,Dr)&&(clearTimeout(Rr(this,Dr)),Wr(this,Dr,null)),Wr(this,Mr,!1),Rr(this,Ir).clear()}}Mr=new WeakMap,Ir=new WeakMap,Dr=new WeakMap,Pr=new WeakSet,Or=function(){if(Rr(this,Mr))return;let t=Rr(this,Ir).peek();if(!t)return;null!==Rr(this,Dr)&&(clearTimeout(Rr(this,Dr)),Wr(this,Dr,null));const e=Date.now();if(t.scheduled<=e)return t=Rr(this,Ir).pop(),t&&Vr(this,Pr,Hr).call(this,t),void Vr(this,Pr,Or).call(this);const i=t.scheduled-e;Wr(this,Dr,window.setTimeout((()=>{Wr(this,Dr,null),Vr(this,Pr,Or).call(this)}),i))},Hr=function(t){Wr(this,Mr,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw Wr(this,Mr,!1),new Error(`Unable to find container for message. Expected a container with id="${n}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==Rr(this,Dr)&&clearTimeout(Rr(this,Dr)),i.resolve(),this.delay>0?Wr(this,Dr,window.setTimeout((()=>{Wr(this,Dr,null),Wr(this,Mr,!1),Vr(this,Pr,Or).call(this)}),this.delay)):(Wr(this,Dr,null),Wr(this,Mr,!1),Vr(this,Pr,Or).call(this))};let Br=null;const $r='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function _r(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?Ko:t.scheduled<e.scheduled?zo:Yo:"assertive"===t.politeness&&"assertive"!==e.politeness?zo:"assertive"!==t.politeness&&"assertive"===e.politeness?Yo:Ko}function Ur(){}var jr,zr,Kr,Yr,Gr,Zr,Jr,Xr,Qr,ta,ea,ia,na,sa,oa,ra,aa,la,ca,ha,da,ua,fa,ma,pa,ga,ba,va,wa,ya,Ea,Aa,La,ka,Ta,Sa,Ca,xa,Ma,Ia;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Da=['[role="option"]'],Pa=Da.join(","),Oa=Da.map((t=>`:not([hidden]) > ${t}`)).join(",");var Ha,Na;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Ha||(Ha={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Na||(Na={}));const Fa=(()=>{const t=new Set;let e=null;function i(){for(const e of t)e.updateAnchorPosition()}return n=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(n.ownerDocument.documentElement),n.addEventListener("dialog:close",(()=>{n.invokerElement?.setAttribute("aria-expanded","false"),t.delete(n)})),n.addEventListener("dialog:open",(()=>{t.add(n)}))}})();let Ra=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),jr.add(this),zr.set(this,void 0),Kr.set(this,void 0),Yr.set(this,""),Gr.set(this,""),Zr.set(this,new Map),Jr.set(this,null),Xr.set(this,null),Qr.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,Zr,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=X(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,Kr,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,jr,"m",Ta).call(this),b(this,jr,"m",Sa).call(this),b(this,jr,"m",ta).call(this),Fa(this),mi(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),mi(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,zr,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,jr,"a",wa)===Ha.LOCAL&&b(this,jr,"m",ma).call(this))}})),"f"),mi(this,(()=>Boolean(this.dialog)),(()=>{b(this,zr,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,jr,"a",wa)===Ha.LOCAL&&mi(this,(()=>this.items.length>0),(()=>{b(this,jr,"m",ma).call(this),b(this,jr,"m",Sa).call(this)}))}disconnectedCallback(){b(this,Kr,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,jr,"m",fa).call(this,t);if(t.target===this.remoteInput)return void b(this,jr,"m",da).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,jr,"m",sa).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return void b(this,jr,"m",Aa).call(this,t);if(i&&n)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Oa)){const e=t.ctrlKey||t.altKey||t.metaKey,i=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&i&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Oa)?.parentElement;if(null!=s&&n){if(b(this,jr,"m",ia).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e)&&this.contains(i))return void b(this,jr,"m",La).call(this,t,i)}return b(this,jr,"m",na).call(this,t)&&(t.preventDefault(),b(this,jr,"m",Ia).call(this,s)?.click()),void b(this,jr,"m",ka).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,jr,"m",ca).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Oa)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(Pa)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,jr,"m",Ia).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,jr,"m",Ia).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,jr,"m",Ia).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,jr,"m",Ia).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,jr,"m",ka).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,jr,"m",ka).call(this,t)}};zr=new WeakMap,Kr=new WeakMap,Yr=new WeakMap,Gr=new WeakMap,Zr=new WeakMap,Jr=new WeakMap,Xr=new WeakMap,Qr=new WeakMap,jr=new WeakSet,ta=function(){const{signal:t}=b(this,Kr,"f");for(const e of this.querySelectorAll(Da.join(",")))e.addEventListener("click",b(this,jr,"m",ia).bind(this),{signal:t}),e.addEventListener("keydown",b(this,jr,"m",ia).bind(this),{signal:t})},ea=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,jr,"m",Ia).call(this,e);i&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?i.setAttribute("tabindex","-1"):(i.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,jr,"m",Ia).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,jr,"a",Ca)&&b(this,jr,"m",Ia).call(this,b(this,jr,"a",Ca))?.setAttribute("tabindex","0")},ia=function(t){if(!b(this,jr,"m",sa).call(this,t))return!1;const e=t.target.closest(Oa);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},na=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},sa=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,jr,"m",na).call(this,t)},oa=function(){for(const t of this.items){const e=b(this,jr,"m",Ia).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,Zr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,jr,"m",Sa).call(this)},ra=function(t){const e=b(this,jr,"m",Ia).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Zr,"f").set(i,{value:i,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},aa=function(t){const e=b(this,jr,"m",Ia).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Zr,"f").delete(i)},la=function(){b(this,jr,"a",ya)&&(b(this,Jr,"f")&&clearTimeout(b(this,Jr,"f")),b(this,Xr,"f")&&clearTimeout(b(this,Xr,"f")),v(this,Xr,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,Jr,setTimeout((()=>{b(this,jr,"a",ya)?.showLeadingSpinner()}),1e3),"f"))},ca=function(t){switch(t.type){case"include-fragment-replaced":b(this,jr,"m",ma).call(this);break;case"loadstart":b(this,jr,"m",ha).call(this,!1);break;case"loadend":b(this,jr,"a",ya)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,jr,"m",ha).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},ha=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},da=function(t){switch(t.type){case"remote-input-success":b(this,jr,"m",ba).call(this),b(this,jr,"m",ma).call(this),b(this,jr,"m",oa).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,jr,"m",ga).call(this,Na.BODY):b(this,jr,"m",ga).call(this,Na.BANNER);break;case"loadstart":if(!b(this,jr,"m",Ea).call(this)){if(b(this,jr,"m",ba).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,jr,"m",la).call(this)}break;case"loadend":b(this,jr,"a",ya)?.hideLeadingSpinner(),b(this,Xr,"f")&&clearTimeout(b(this,Xr,"f")),b(this,Jr,"f")&&clearTimeout(b(this,Jr,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},ua=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},fa=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,jr,"m",Ia).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,jr,"m",Ia).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const i=b(this,jr,"m",Ia).call(this,e);i&&i.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],i=b(this,jr,"m",Ia).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,jr,"m",Ea).call(this)||b(this,jr,"m",la).call(this),b(this,jr,"a",wa)===Ha.LOCAL||b(this,jr,"a",wa)===Ha.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,jr,"m",ma).call(this)}},ma=function(){if(!this.list)return;let t=!1;if(b(this,jr,"m",Ea).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,jr,"m",ua);for(const n of this.items)i(n,e)?(b(this,jr,"m",Ma).call(this,n),t=!0):b(this,jr,"m",xa).call(this,n)}else t=this.items.length>0;b(this,jr,"m",ea).call(this),b(this,jr,"m",va).call(this);for(const t of this.items){const e=b(this,jr,"m",Ia).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,Qr,"f")?i&&!b(this,Zr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,Zr,"f").has(i)&&this.isItemChecked(t)&&b(this,jr,"m",ra).call(this,t)}v(this,Qr,!0,"f"),this.noResults&&(b(this,jr,"m",pa).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},pa=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},ga=function(t){let e=this.fragmentErrorElement;t===Na.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},ba=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},va=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},wa=function(){if(!this.list)return Ha.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Ha.LOCAL;case"eventually_local":return Ha.EVENTUALLY_LOCAL;default:return Ha.REMOTE}},ya=function(){return this.filterInputTextField?.closest("primer-text-field")},Ea=function(){return b(this,jr,"a",wa)===Ha.LOCAL||b(this,jr,"a",wa)===Ha.EVENTUALLY_LOCAL},Aa=function(t){this.invokerElement?.dispatchEvent(new CustomEvent("invokerClicked",{bubbles:!0})),t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},La=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,n=this.contains(t);(e||n)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},ka=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),i=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:i,value:b(this,jr,"m",Ia).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,jr,"m",Ia).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,jr,"m",Ia).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,Zr,"f").clear(),i&&(b(this,jr,"m",ra).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,jr,"m",Ta).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,jr,"m",ra).call(this,t):b(this,jr,"m",aa).call(this,t);b(this,jr,"m",Sa).call(this),b(this,jr,"m",ea).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,jr,"m",Ia).call(this,t)?.getAttribute("data-value")}}))},Ta=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Yr,b(this,Yr,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,Yr,"f");if(e){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=`${this.dynamicLabelPrefix} `,n.textContent=e,t.replaceChildren(i,n),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,Yr,"f")},Sa=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,Qr,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const i=e.querySelectorAll("input");i.length>0&&v(this,Gr,b(this,Gr,"f")||i[0].name,"f");for(const i of this.selectedItems){const n=document.createElement("input");n.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),n.type="hidden",n.autocomplete="off",n.name=i.inputName||b(this,Gr,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},Ca=function(){return this.querySelector(Oa)?.parentElement||null},xa=function(t){t&&t.setAttribute("hidden","hidden")},Ma=function(t){t&&t.removeAttribute("hidden")},Ia=function(t){return t.querySelector(".ActionListContent")},g([U],Ra.prototype,"includeFragment",void 0),g([U],Ra.prototype,"dialog",void 0),g([U],Ra.prototype,"filterInputTextField",void 0),g([U],Ra.prototype,"remoteInput",void 0),g([U],Ra.prototype,"list",void 0),g([U],Ra.prototype,"noResults",void 0),g([U],Ra.prototype,"fragmentErrorElement",void 0),g([U],Ra.prototype,"bannerErrorElement",void 0),g([U],Ra.prototype,"bodySpinner",void 0),g([U],Ra.prototype,"liveRegion",void 0),Ra=g([z("select-panel")],Ra),window.customElements.get("select-panel")||(window.SelectPanelElement=Ra,window.customElements.define("select-panel",Ra));let qa=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function Wa(t){Dt(t,{bindKeys:At.ArrowVertical|At.ArrowHorizontal|At.HomeAndEnd|At.Backspace,getNextFocusable:(t,e,i)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return $a(t)}switch(e.key){case"ArrowUp":return Va(t,"previous");case"ArrowDown":return Va(t,"next");case"Backspace":return $a(t)}}(e,i)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const i=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:i instanceof HTMLElement?i:void 0}})}function Va(t,e){const i=t.closest("[role=tree]");if(!i)return;const n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,(t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP));let s=n.firstChild();for(;s!==t;)s=n.nextNode();let o="next"===e?n.nextNode():n.previousNode();for(;o instanceof HTMLElement&&Ba(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function Ba(t,e){for(const i of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==i&&i.closest("li")?.contains(t))return i;return null}function $a(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var _a,Ua,ja,za,Ka,Ya,Ga,Za,Ja,Xa,Qa;g([U],qa.prototype,"detailsTarget",void 0),g([U],qa.prototype,"summaryTarget",void 0),qa=g([z("details-toggle")],qa),window.DetailsToggleElement=qa;let tl=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),_a.add(this),Ua.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,Ua,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Wa(this),new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,_a,"m",ja).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;if(!t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue)))return;const e=[];for(const t of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const i=this.formInputPrototype.cloneNode();i.removeAttribute("data-target"),i.removeAttribute("form");const n={path:this.getNodePath(t)},s=this.getFormInputValueForNode(t);s&&(n.value=s),i.value=JSON.stringify(n),e.push(i)}this.formInputContainer.replaceChildren(...e)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,_a,"m",ja).call(this,this)}))}disconnectedCallback(){b(this,Ua,"f").abort()}handleEvent(t){const e=b(this,_a,"m",Ka).call(this,t);e&&b(this,_a,"m",Ya).call(this,e,t)}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),i=this.querySelector(`[data-path="${CSS.escape(e)}"`);i&&(this.currentNode?.setAttribute("aria-current","false"),i.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const i=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(i)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}infoFromNode(t,e){const i=this.getNodeType(t);if(!i)return null;const n=this.getNodeCheckedValue(t);return{node:t,type:i,path:this.getNodePath(t),checkedValue:e||n,previousCheckedValue:n}}};var el,il;Ua=new WeakMap,_a=new WeakSet,ja=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},za=function(t){return"click"===t.type},Ka=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},Ya=function(t,e){b(this,_a,"m",Ga).call(this,e,t)?b(this,_a,"m",Za).call(this,e,t):b(this,_a,"m",za).call(this,e)?b(this,_a,"m",Ja).call(this,e,t):"focusin"===e.type?b(this,_a,"m",Xa).call(this,t):e instanceof KeyboardEvent&&b(this,_a,"m",Qa).call(this,e,t)},Ga=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},Za=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"))},Ja=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},Xa=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},Qa=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}this.nodeHasCheckBox(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):e instanceof HTMLAnchorElement&&e.click()}},g([U],tl.prototype,"formInputContainer",void 0),g([U],tl.prototype,"formInputPrototype",void 0),tl=g([z("tree-view")],tl),window.customElements.get("tree-view")||(window.TreeViewElement=tl,window.customElements.define("tree-view",tl));let nl=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),el.add(this)}connectedCallback(){mi(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,el,"m",il).call(this)}showCollapsed(){this.expanded=!1,b(this,el,"m",il).call(this)}toggle(){this.expanded=!this.expanded,b(this,el,"m",il).call(this)}};var sl,ol,rl,al,ll,cl,hl,dl,ul,fl,ml,pl,gl;el=new WeakSet,il=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([U],nl.prototype,"expandedIcon",void 0),g([U],nl.prototype,"collapsedIcon",void 0),nl=g([z("tree-view-icon-pair")],nl),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=nl,window.customElements.define("tree-view-icon-pair",nl));let bl=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),sl.add(this),ol.set(this,null),rl.set(this,"success"),al.set(this,void 0),ll.set(this,!1)}connectedCallback(){mi(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,sl,"m",ml).call(this)}));const{signal:t}=v(this,al,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),mi(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",(t=>{b(this,sl,"m",hl).call(this,t)}),{signal:t})})),mi(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,sl,"m",dl).call(this,t)}),{signal:t})}));new MutationObserver((()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,ol,"f")&&v(this,ol,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,ol,"f")}set expanded(t){v(this,ol,t,"f"),b(this,sl,"m",ml).call(this)}get loadingState(){return b(this,rl,"f")}set loadingState(t){v(this,rl,t,"f"),b(this,sl,"m",ml).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}disconnectedCallback(){b(this,al,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,sl,"m",cl).call(this,t):t.target===this.includeFragment?b(this,sl,"m",hl).call(this,t):t instanceof KeyboardEvent?b(this,sl,"m",ul).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,sl,"a",gl)&&b(this,sl,"m",fl).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),b(this,sl,"m",pl).call(this)&&"0"===this.subTree.getAttribute("tabindex")&&this.subTree.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],i=this.treeView?.infoFromNode(this.node,t);if(i&&e.push(i),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const i of this.eachDescendantNode()){const n=this.treeView?.infoFromNode(i,t);n&&e.push(n)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const i of e)i.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}};ol=new WeakMap,rl=new WeakMap,al=new WeakMap,ll=new WeakMap,sl=new WeakSet,cl=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},hl=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,ll,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),!b(this,ll,"f")&&document.activeElement===this.subTree&&b(this,sl,"m",pl).call(this)&&v(this,ll,!0,"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,ll,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,ll,!1,"f")}},dl=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},ul=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,sl,"a",gl)?this.toggleChecked():this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,sl,"a",gl)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},fl=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},ml=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),b(this,sl,"m",pl).call(this)&&(this.subTree.setAttribute("role","treeitem"),this.subTree.hasAttribute("tabindex")||this.subTree.setAttribute("tabindex","-1")),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),b(this,sl,"m",pl).call(this)&&(this.subTree.removeAttribute("role"),this.subTree.removeAttribute("tabindex")),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},pl=function(){return this.subTree?.getAttribute("data-target")?.includes("tree-view-sub-tree-node.includeFragment")??!1},gl=function(){return this.querySelector(".TreeViewItemCheckbox")},g([U],bl.prototype,"node",void 0),g([U],bl.prototype,"subTree",void 0),g([U],bl.prototype,"iconPair",void 0),g([U],bl.prototype,"toggleButton",void 0),g([U],bl.prototype,"expandedToggleIcon",void 0),g([U],bl.prototype,"collapsedToggleIcon",void 0),g([U],bl.prototype,"includeFragment",void 0),g([U],bl.prototype,"loadingIndicator",void 0),g([U],bl.prototype,"loadingFailureMessage",void 0),g([U],bl.prototype,"retryButton",void 0),bl=g([z("tree-view-sub-tree-node")],bl),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=bl,window.customElements.define("tree-view-sub-tree-node",bl));let vl=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};vl=g([z("tree-view-include-fragment")],vl),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=vl,window.customElements.define("tree-view-include-fragment",vl))}();
|
|
2
2
|
//# sourceMappingURL=primer_view_components.js.map
|