"use strict";(()=>{var dt=Object.defineProperty;var o=(z,U)=>dt(z,"name",{value:U,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[9244],{76745:(z,U,F)=>{F.d(U,{Z:()=>k});function T(b){const l=document.createElement("pre");return l.style.width="1px",l.style.height="1px",l.style.position="fixed",l.style.top="5px",l.textContent=b,l}o(T,"createNode");function H(b){if("clipboard"in navigator)return navigator.clipboard.writeText(b.textContent);const l=getSelection();if(l==null)return Promise.reject(new Error);l.removeAllRanges();const c=document.createRange();return c.selectNodeContents(b),l.addRange(c),document.execCommand("copy"),l.removeAllRanges(),Promise.resolve()}o(H,"copyNode");function N(b){if("clipboard"in navigator)return navigator.clipboard.writeText(b);const l=document.body;if(!l)return Promise.reject(new Error);const c=T(b);return l.appendChild(c),H(c),l.removeChild(c),Promise.resolve()}o(N,"copyText");function P(b){const l=b.getAttribute("for"),c=b.getAttribute("value");function u(){b.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(o(u,"trigger"),c)N(c).then(u);else if(l){const E="getRootNode"in Element.prototype?b.getRootNode():b.ownerDocument;if(!(E instanceof Document||"ShadowRoot"in window&&E instanceof ShadowRoot))return;const L=E.getElementById(l);L&&j(L).then(u)}}o(P,"copy");function j(b){return b instanceof HTMLInputElement||b instanceof HTMLTextAreaElement?N(b.value):b instanceof HTMLAnchorElement&&b.hasAttribute("href")?N(b.href):H(b)}o(j,"copyTarget");function Y(b){const l=b.currentTarget;l instanceof HTMLElement&&P(l)}o(Y,"clicked");function R(b){if(b.key===" "||b.key==="Enter"){const l=b.currentTarget;l instanceof HTMLElement&&(b.preventDefault(),P(l))}}o(R,"keydown");function X(b){b.currentTarget.addEventListener("keydown",R)}o(X,"focused");function C(b){b.currentTarget.removeEventListener("keydown",R)}o(C,"blurred");class m extends HTMLElement{constructor(){super();this.addEventListener("click",Y),this.addEventListener("focus",X),this.addEventListener("blur",C)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(l){this.setAttribute("value",l)}}o(m,"ClipboardCopyElement"),window.customElements.get("clipboard-copy")||(window.ClipboardCopyElement=m,window.customElements.define("clipboard-copy",m));const k=m},57260:(z,U,F)=>{F.d(U,{P:()=>T});class T{constructor(i,f){this.file=i,this.directory=f,this.state="pending",this.id=null,this.href=null,this.name=null,this.percent=0}static traverse(i,f){return H(i,f)}static from(i){const f=[];for(const x of i)if(x instanceof File)f.push(new T(x));else if(x instanceof T)f.push(x);else throw new Error("Unexpected type");return f}get fullPath(){return this.directory?`${this.directory}/${this.file.name}`:this.file.name}isImage(){return["image/gif","image/png","image/jpg","image/jpeg","image/svg+xml"].indexOf(this.file.type)>-1}isVideo(){return["video/mp4","video/quicktime"].indexOf(this.file.type)>-1}saving(i){if(this.state!=="pending"&&this.state!=="saving")throw new Error(`Unexpected transition from ${this.state} to saving`);this.state="saving",this.percent=i}saved(i){var f,x,O;if(this.state!=="pending"&&this.state!=="saving")throw new Error(`Unexpected transition from ${this.state} to saved`);this.state="saved",this.id=(f=i==null?void 0:i.id)!==null&&f!==void 0?f:null,this.href=(x=i==null?void 0:i.href)!==null&&x!==void 0?x:null,this.name=(O=i==null?void 0:i.name)!==null&&O!==void 0?O:null}isPending(){return this.state==="pending"}isSaving(){return this.state==="saving"}isSaved(){return this.state==="saved"}}o(T,"Attachment");function H(r,i){return i&&X(r)?R("",C(r)):Promise.resolve(P(Array.from(r.files||[])).map(f=>new T(f)))}o(H,"transferredFiles");function N(r){return r.name.startsWith(".")}o(N,"hidden");function P(r){return Array.from(r).filter(i=>!N(i))}o(P,"visible");function j(r){return new Promise(function(i,f){r.file(i,f)})}o(j,"getFile");function Y(r){return new Promise(function(i,f){const x=[],O=r.createReader(),J=o(()=>{O.readEntries(it=>{it.length>0?(x.push(...it),J()):i(x)},f)},"read");J()})}o(Y,"getEntries");async function R(r,i){const f=[];for(const x of P(i))if(x.isDirectory)f.push(...await R(x.fullPath,await Y(x)));else{const O=await j(x);f.push(new T(O,r))}return f}o(R,"traverse");function X(r){return r.items&&Array.from(r.items).some(i=>{const f=i.webkitGetAsEntry&&i.webkitGetAsEntry();return f&&f.isDirectory})}o(X,"isDirectory");function C(r){return Array.from(r.items).map(i=>i.webkitGetAsEntry()).filter(i=>i!=null)}o(C,"roots");class m extends HTMLElement{connectedCallback(){this.addEventListener("dragenter",l),this.addEventListener("dragover",l),this.addEventListener("dragleave",c),this.addEventListener("drop",u),this.addEventListener("paste",I),this.addEventListener("change",B)}disconnectedCallback(){this.removeEventListener("dragenter",l),this.removeEventListener("dragover",l),this.removeEventListener("dragleave",c),this.removeEventListener("drop",u),this.removeEventListener("paste",I),this.removeEventListener("change",B)}get directory(){return this.hasAttribute("directory")}set directory(i){i?this.setAttribute("directory",""):this.removeAttribute("directory")}async attach(i){const f=i instanceof DataTransfer?await T.traverse(i,this.directory):T.from(i);this.dispatchEvent(new CustomEvent("file-attachment-accept",{bubbles:!0,cancelable:!0,detail:{attachments:f}}))&&f.length&&this.dispatchEvent(new CustomEvent("file-attachment-accepted",{bubbles:!0,detail:{attachments:f}}))}}o(m,"FileAttachmentElement");function k(r){return Array.from(r.types).indexOf("Files")>=0}o(k,"hasFile");let b=null;function l(r){const i=r.currentTarget;b&&clearTimeout(b),b=window.setTimeout(()=>i.removeAttribute("hover"),200);const f=r.dataTransfer;!f||!k(f)||(f.dropEffect="copy",i.setAttribute("hover",""),r.preventDefault())}o(l,"onDragenter");function c(r){r.dataTransfer&&(r.dataTransfer.dropEffect="none"),r.currentTarget.removeAttribute("hover"),r.stopPropagation(),r.preventDefault()}o(c,"onDragleave");function u(r){const i=r.currentTarget;if(!(i instanceof m))return;i.removeAttribute("hover");const f=r.dataTransfer;!f||!k(f)||(i.attach(f),r.stopPropagation(),r.preventDefault())}o(u,"onDrop");const E=/^image\/(gif|png|jpeg)$/;function L(r){for(const i of r)if(i.kind==="file"&&E.test(i.type))return i.getAsFile();return null}o(L,"pastedFile");function I(r){if(!r.clipboardData||!r.clipboardData.items)return;const i=r.currentTarget;if(!(i instanceof m))return;const f=L(r.clipboardData.items);if(!f)return;const x=[f];i.attach(x),r.preventDefault()}o(I,"onPaste");function B(r){const i=r.currentTarget;if(!(i instanceof m))return;const f=r.target;if(!(f instanceof HTMLInputElement))return;const x=i.getAttribute("input");if(x&&f.id!==x)return;const O=f.files;!O||O.length===0||(i.attach(O),f.value="")}o(B,"onChange"),window.customElements.get("file-attachment")||(window.FileAttachmentElement=m,window.customElements.define("file-attachment",m));var a=null},66681:(z,U,F)=>{var T=F(46481),H=F(76745);const N=2e3;function P(s){s.style.display="inline-block"}o(P,"showSVG");function j(s){s.style.display="none"}o(j,"hideSVG");function Y(s){const[t,e]=s.querySelectorAll(".octicon");!t||!e||(P(t),j(e))}o(Y,"showCopy");function R(s){const[t,e]=s.querySelectorAll(".octicon");!t||!e||(j(t),P(e))}o(R,"showCheck");const X=new WeakMap;document.addEventListener("clipboard-copy",function({target:s}){if(!(s instanceof HTMLElement)||!s.hasAttribute("data-view-component"))return;const t=X.get(s);t?(clearTimeout(t),X.delete(s)):R(s),X.set(s,setTimeout(()=>{Y(s),X.delete(s)},N))});var C=F(29501),m=F(75329);const k=new WeakMap,b=new WeakMap,l=new WeakMap;function c(s){const t=s.currentTarget;if(!(t instanceof i))return;const{box:e,image:p}=l.get(t)||{};if(!e||!p)return;let h=0,w=0;if(s instanceof KeyboardEvent)s.key==="ArrowUp"?w=-1:s.key==="ArrowDown"?w=1:s.key==="ArrowLeft"?h=-1:s.key==="ArrowRight"&&(h=1);else if(b.has(t)&&s instanceof MouseEvent){const y=b.get(t);h=s.pageX-y.dragStartX,w=s.pageY-y.dragStartY}else if(b.has(t)&&s instanceof TouchEvent){const{pageX:y,pageY:A}=s.changedTouches[0],{dragStartX:_,dragStartY:S}=b.get(t);h=y-_,w=A-S}if(h!==0||w!==0){const y=Math.min(Math.max(0,e.offsetLeft+h),p.width-e.offsetWidth),A=Math.min(Math.max(0,e.offsetTop+w),p.height-e.offsetHeight);e.style.left=`${y}px`,e.style.top=`${A}px`,r(t,{x:y,y:A,width:e.offsetWidth,height:e.offsetHeight})}if(s instanceof MouseEvent)b.set(t,{dragStartX:s.pageX,dragStartY:s.pageY});else if(s instanceof TouchEvent){const{pageX:y,pageY:A}=s.changedTouches[0];b.set(t,{dragStartX:y,dragStartY:A})}}o(c,"moveCropArea");function u(s){const t=s.target;if(!(t instanceof HTMLElement))return;const e=E(t);if(!(e instanceof i))return;const{box:p}=l.get(e)||{};if(!p)return;const h=e.getBoundingClientRect();let w,y,A;if(s instanceof KeyboardEvent){if(s.key==="Escape")return B(e);if(s.key==="-"&&(A=-10),s.key==="="&&(A=10),!A)return;w=p.offsetWidth+A,y=p.offsetHeight+A,k.set(e,{startX:p.offsetLeft,startY:p.offsetTop})}else if(s instanceof MouseEvent){const _=k.get(e);if(!_)return;w=s.pageX-_.startX-h.left-window.pageXOffset,y=s.pageY-_.startY-h.top-window.pageYOffset}else if(s instanceof TouchEvent){const _=k.get(e);if(!_)return;w=s.changedTouches[0].pageX-_.startX-h.left-window.pageXOffset,y=s.changedTouches[0].pageY-_.startY-h.top-window.pageYOffset}w&&y&&I(e,w,y,!(s instanceof KeyboardEvent))}o(u,"updateCropArea");function E(s){const t=s.getRootNode();return t instanceof ShadowRoot?t.host:s}o(E,"getShadowHost");function L(s){const t=s.currentTarget;if(!(t instanceof HTMLElement))return;const e=E(t);if(!(e instanceof i))return;const{box:p}=l.get(e)||{};if(!p)return;const h=s.target;if(h instanceof HTMLElement)if(h.hasAttribute("data-direction")){const w=h.getAttribute("data-direction")||"";e.addEventListener("mousemove",u),e.addEventListener("touchmove",u,{passive:!0}),["nw","se"].indexOf(w)>=0&&e.classList.add("nwse"),["ne","sw"].indexOf(w)>=0&&e.classList.add("nesw"),k.set(e,{startX:p.offsetLeft+(["se","ne"].indexOf(w)>=0?0:p.offsetWidth),startY:p.offsetTop+(["se","sw"].indexOf(w)>=0?0:p.offsetHeight)}),u(s)}else e.addEventListener("mousemove",c),e.addEventListener("touchmove",c,{passive:!0})}o(L,"startUpdate");function I(s,t,e,p=!0){let h=Math.max(Math.abs(t),Math.abs(e),10);const w=k.get(s);if(!w)return;const{box:y,image:A}=l.get(s)||{};if(!y||!A)return;h=Math.min(h,e>0?A.height-w.startY:w.startY,t>0?A.width-w.startX:w.startX);const _=p?Math.round(Math.max(0,t>0?w.startX:w.startX-h)):y.offsetLeft,S=p?Math.round(Math.max(0,e>0?w.startY:w.startY-h)):y.offsetTop;y.style.left=`${_}px`,y.style.top=`${S}px`,y.style.width=`${h}px`,y.style.height=`${h}px`,r(s,{x:_,y:S,width:h,height:h})}o(I,"updateDimensions");function B(s){const{image:t}=l.get(s)||{};if(!t)return;const e=Math.round(t.clientWidth>t.clientHeight?t.clientHeight:t.clientWidth);k.set(s,{startX:(t.clientWidth-e)/2,startY:(t.clientHeight-e)/2}),I(s,e,e)}o(B,"setInitialPosition");function a(s){const t=s.currentTarget;t instanceof i&&(b.delete(t),t.classList.remove("nwse","nesw"),t.removeEventListener("mousemove",u),t.removeEventListener("mousemove",c),t.removeEventListener("touchmove",u),t.removeEventListener("touchmove",c))}o(a,"stopUpdate");function r(s,t){const{image:e}=l.get(s)||{};if(!e)return;const p=e.naturalWidth/e.width;for(const h in t){const w=Math.round(t[h]*p);t[h]=w;const y=s.querySelector(`[data-image-crop-input='${h}']`);y instanceof HTMLInputElement&&(y.value=w.toString())}s.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:t}))}o(r,"fireChangeEvent");class i extends HTMLElement{connectedCallback(){if(l.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML=`
`;const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const p=t.querySelector("img");p instanceof HTMLImageElement&&(l.set(this,{box:e,image:p}),p.addEventListener("load",()=>{this.loaded=!0,B(this)}),this.addEventListener("mouseleave",a),this.addEventListener("touchend",a),this.addEventListener("mouseup",a),e.addEventListener("mousedown",L),e.addEventListener("touchstart",L,{passive:!0}),this.addEventListener("keydown",c),this.addEventListener("keydown",u),this.src&&(p.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,p){const{image:h}=l.get(this)||{};t==="src"&&(this.loaded=!1,h&&(h.src=p))}}o(i,"ImageCropElement");const f=null;window.customElements.get("image-crop")||(window.ImageCropElement=i,window.customElements.define("image-crop",i));var x=F(11095);const O={"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"]};function J(s,t,e={}){const p=it(s),h=st(p),w=getComputedStyle(p),y=p.getBoundingClientRect(),[A,_]=[w.borderTopWidth,w.borderLeftWidth].map($=>parseInt($,10)||0),S={top:y.top+A,left:y.left+_};return ct(h,S,s.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,ut(e))}o(J,"getAnchoredPosition");function it(s){let t=s.parentNode;for(;t!==null;){if(t instanceof HTMLElement&&getComputedStyle(t).position!=="static")return t;t=t.parentNode}return document.body}o(it,"getPositionedParent");function st(s){let t=s;for(;t!==null&&!(t===document.body||getComputedStyle(t).overflow!=="visible");)t=t.parentNode;const e=t===document.body||!(t instanceof HTMLElement)?document.body:t,p=e.getBoundingClientRect(),h=getComputedStyle(e),[w,y,A,_]=[h.borderTopWidth,h.borderLeftWidth,h.borderRightWidth,h.borderBottomWidth].map(S=>parseInt(S,10)||0);return{top:p.top+w,left:p.left+y,width:p.width-A-y,height:Math.max(p.height-w-_,e===document.body?window.innerHeight:-1/0)}}o(st,"getClippingRect");const Q={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function ut(s={}){var t,e,p,h,w;const y=(t=s.side)!==null&&t!==void 0?t:Q.side,A=(e=s.align)!==null&&e!==void 0?e:Q.align;return{side:y,align:A,anchorOffset:(p=s.anchorOffset)!==null&&p!==void 0?p:y==="inside-center"?0:Q.anchorOffset,alignmentOffset:(h=s.alignmentOffset)!==null&&h!==void 0?h:A!=="center"&&y.startsWith("inside")?Q.alignmentOffset:0,allowOutOfBounds:(w=s.allowOutOfBounds)!==null&&w!==void 0?w:Q.allowOutOfBounds}}o(ut,"getDefaultSettings");function ct(s,t,e,p,{side:h,align:w,allowOutOfBounds:y,anchorOffset:A,alignmentOffset:_}){const S={top:s.top-t.top,left:s.left-t.left,width:s.width,height:s.height};let $=rt(e,p,h,w,A,_),at=h;if($.top-=t.top,$.left-=t.left,!y){const V=O[h];let G=0;if(V){let lt=h;for(;Gs.width+S.left&&($.left=s.width+S.left-e.width),V&&Gs.height+S.top&&($.top=s.height+S.top-e.height)}return Object.assign(Object.assign({},$),{anchorSide:at})}o(ct,"pureCalculateAnchoredPosition");function rt(s,t,e,p,h,w){const y=t.left+t.width,A=t.top+t.height;let _=-1,S=-1;return e==="outside-top"?_=t.top-h-s.height:e==="outside-bottom"?_=A+h:e==="outside-left"?S=t.left-h-s.width:e==="outside-right"&&(S=y+h),(e==="outside-top"||e==="outside-bottom")&&(p==="start"?S=t.left+w:p==="center"?S=t.left-(s.width-t.width)/2+w:S=y-s.width-w),(e==="outside-left"||e==="outside-right")&&(p==="start"?_=t.top+w:p==="center"?_=t.top-(s.height-t.height)/2+w:_=A-s.height-w),e==="inside-top"?_=t.top+h:e==="inside-bottom"?_=A-h-s.height:e==="inside-left"?S=t.left+h:e==="inside-right"?S=y-h-s.width:e==="inside-center"&&(S=(y+t.left)/2-s.width/2+h),e==="inside-top"||e==="inside-bottom"?p==="start"?S=t.left+w:p==="center"?S=t.left-(s.width-t.width)/2+w:S=y-s.width-w:(e==="inside-left"||e==="inside-right"||e==="inside-center")&&(p==="start"?_=t.top+w:p==="center"?_=t.top-(s.height-t.height)/2+w:_=A-s.height-w),{top:_,left:S}}o(rt,"calculatePosition");function tt(s,t,e,p){return s==="outside-top"||s==="outside-bottom"?t.tope.height+e.top:t.lefte.width+e.left}o(tt,"shouldRecalculatePosition");var K=function(s,t,e,p,h){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!h)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?s!==t||!h:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?h.call(s,e):h?h.value=e:t.set(s,e),e},Z=function(s,t,e,p){if(e==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?s!==t||!p:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?p:e==="a"?p.call(s):p?p.value:t.get(s)},et,nt,n,d,g,v,M;const W="tooltip-open",D=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];class q extends HTMLElement{constructor(){super();et.add(this),nt.set(this,void 0),n.set(this,"center"),d.set(this,"outside-bottom"),g.set(this,!1);const t=this.attachShadow({mode:"open"});t.innerHTML=` `}styles(){return` :host { position: absolute; z-index: 1000000; padding: .5em .75em; font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; -webkit-font-smoothing: subpixel-antialiased; color: var(--color-fg-on-emphasis); text-align: center; text-decoration: none; text-shadow: none; text-transform: none; letter-spacing: normal; word-wrap: break-word; white-space: pre; background: var(--color-neutral-emphasis-plus); border-radius: 6px; opacity: 0; max-width: 250px; word-wrap: break-word; white-space: normal } :host:before{ position: absolute; z-index: 1000001; color: var(--color-neutral-emphasis-plus); content: ""; border: 6px solid transparent; opacity: 0 } @keyframes tooltip-appear { from { opacity: 0 } to { opacity: 1 } } :host:after{ position: absolute; display: block; right: 0; left: 0; height: 12px; content: "" } :host(.${W}), :host(.${W}):before { animation-name: tooltip-appear; animation-duration: .1s; animation-fill-mode: forwards; animation-timing-function: ease-in; animation-delay: .4s } :host(.tooltip-s):before, :host(.tooltip-se):before, :host(.tooltip-sw):before { right: 50%; bottom: 100%; margin-right: -6px; border-bottom-color: var(--color-neutral-emphasis-plus) } :host(.tooltip-s):after, :host(.tooltip-se):after, :host(.tooltip-sw):after { bottom: 100% } :host(.tooltip-n):before, :host(.tooltip-ne):before, :host(.tooltip-nw):before { top: 100%; right: 50%; margin-right: -6px; border-top-color: var(--color-neutral-emphasis-plus) } :host(.tooltip-n):after, :host(.tooltip-ne):after, :host(.tooltip-nw):after { top: 100% } :host(.tooltip-se):before, :host(.tooltip-ne):before { right: auto } :host(.tooltip-sw):before, :host(.tooltip-nw):before { right: 0; margin-right: 6px } :host(.tooltip-w):before { top: 50%; bottom: 50%; left: 100%; margin-top: -6px; border-left-color: var(--color-neutral-emphasis-plus) } :host(.tooltip-e):before { top: 50%; right: 100%; bottom: 50%; margin-top: -6px; border-right-color: var(--color-neutral-emphasis-plus) } `}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return this.getAttribute("data-type")==="label"?"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)}connectedCallback(){var t;if(this.hidden=!0,K(this,g,!0,"f"),this.id||(this.id=`tooltip-${Date.now()}-${(Math.random()*1e4).toFixed(0)}`),!this.control)return;this.setAttribute("role","tooltip"),(t=Z(this,nt,"f"))===null||t===void 0||t.abort(),K(this,nt,new AbortController,"f");const{signal:e}=Z(this,nt,"f");this.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("mouseenter",this,{signal:e}),this.control.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("focus",this,{signal:e}),this.control.addEventListener("blur",this,{signal:e}),this.ownerDocument.addEventListener("keydown",this,{signal:e})}disconnectedCallback(){var t;(t=Z(this,nt,"f"))===null||t===void 0||t.abort()}handleEvent(t){!this.control||((t.type==="mouseenter"||t.type==="focus")&&this.hidden?this.hidden=!1:t.type==="blur"?this.hidden=!0:t.type==="mouseleave"&&t.relatedTarget!==this.control&&t.relatedTarget!==this?this.hidden=!0:t.type==="keydown"&&t.key==="Escape"&&!this.hidden&&(this.hidden=!0))}attributeChangedCallback(t){if(t==="id"||t==="data-type"){if(!this.id||!this.control)return;if(this.type==="label")this.control.setAttribute("aria-labelledby",this.id);else{let e=this.control.getAttribute("aria-describedby");e?e=`${e} ${this.id}`:e=this.id,this.control.setAttribute("aria-describedby",e)}}else if(t==="hidden")if(this.hidden)this.classList.remove(W,...D);else{this.classList.add(W);for(const e of this.ownerDocument.querySelectorAll(this.tagName))e!==this&&(e.hidden=!0);Z(this,et,"m",M).call(this)}else if(t==="data-direction"){this.classList.remove(...D);const e=this.direction;e==="n"?(K(this,n,"center","f"),K(this,d,"outside-top","f")):e==="ne"?(K(this,n,"start","f"),K(this,d,"outside-top","f")):e==="e"?(K(this,n,"center","f"),K(this,d,"outside-right","f")):e==="se"?(K(this,n,"start","f"),K(this,d,"outside-bottom","f")):e==="s"?(K(this,n,"center","f"),K(this,d,"outside-bottom","f")):e==="sw"?(K(this,n,"end","f"),K(this,d,"outside-bottom","f")):e==="w"?(K(this,n,"center","f"),K(this,d,"outside-left","f")):e==="nw"&&(K(this,n,"end","f"),K(this,d,"outside-top","f"))}}}o(q,"TooltipElement"),nt=new WeakMap,n=new WeakMap,d=new WeakMap,g=new WeakMap,et=new WeakSet,v=o(function(t){if(!this.control)return;const e=this.getBoundingClientRect(),p=this.control.getBoundingClientRect(),h=e.width,w=e.left+h/2,y=p.x+p.width/2;return Math.abs(w-y)<2||t==="outside-left"||t==="outside-right"?"center":e.left===p.left?"start":e.right===p.right?"end":w{function z(C,m=0,{start:k=!0,middle:b=!0,once:l=!1}={}){var c=0,u,E=!1,L=o(function I(...B){if(!E){var a=Date.now()-c;c=Date.now(),k?(k=!1,C(...B),l&&I.cancel()):(b&&au=L,"setValidity");m.dispatchEvent(new CustomEvent("auto-check-start",{bubbles:!0,detail:{setValidity:E}})),k.required&&m.setCustomValidity(u)}o(H,"setLoadingState");function N(){return"AbortController"in window?new AbortController:{signal:null,abort(){}}}o(N,"makeAbortController");async function P(C,m,k){try{const b=await fetch(m,k);return C.dispatchEvent(new CustomEvent("load")),C.dispatchEvent(new CustomEvent("loadend")),b}catch(b){throw b.name!=="AbortError"&&(C.dispatchEvent(new CustomEvent("error")),C.dispatchEvent(new CustomEvent("loadend"))),b}}o(P,"fetchWithNetworkEvents");async function j(C){const m=C.input;if(!m)return;const k=C.src,b=C.csrf,l=F.get(C);if(!k||!b||!l){C.required&&m.setCustomValidity("");return}if(!m.value.trim()){C.required&&m.setCustomValidity("");return}const c=new FormData;c.append("authenticity_token",b),c.append("value",m.value),m.dispatchEvent(new CustomEvent("auto-check-send",{bubbles:!0,detail:{body:c}})),l.controller?l.controller.abort():C.dispatchEvent(new CustomEvent("loadstart")),l.controller=N();try{const u=await P(C,k,{credentials:"same-origin",signal:l.controller.signal,method:"POST",body:c});u.ok?Y(u,m,C.required):R(u,m,C.required),l.controller=null,m.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0}))}catch(u){u.name!=="AbortError"&&(l.controller=null,m.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0})))}}o(j,"check");function Y(C,m,k){k&&m.setCustomValidity(""),m.dispatchEvent(new CustomEvent("auto-check-success",{bubbles:!0,detail:{response:C.clone()}}))}o(Y,"processSuccess");function R(C,m,k){let b="Validation failed";const l=o(c=>b=c,"setValidity");m.dispatchEvent(new CustomEvent("auto-check-error",{bubbles:!0,detail:{response:C.clone(),setValidity:l}})),k&&m.setCustomValidity(b)}o(R,"processFailure"),window.customElements.get("auto-check")||(window.AutoCheckElement=T,window.customElements.define("auto-check",T));var X=null},11095:()=>{class z extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(r){r?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(r){this.setAttribute("src",r)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const r=this.parentElement;if(!r)return;const i=r.querySelector("summary");i&&(i.setAttribute("aria-haspopup","menu"),i.hasAttribute("role")||i.setAttribute("role","button"));const f=[T(r,"compositionstart",x=>I(this,x)),T(r,"compositionend",x=>I(this,x)),T(r,"click",x=>C(r,x)),T(r,"change",x=>C(r,x)),T(r,"keydown",x=>b(r,this,x)),T(r,"toggle",()=>H(r,this),{once:!0}),T(r,"toggle",()=>P(r)),this.preload?T(r,"mouseover",()=>H(r,this),{once:!0}):F,...N(r)];U.set(this,{subscriptions:f,loaded:!1,isComposing:!1})}disconnectedCallback(){const r=U.get(this);if(!!r){U.delete(this);for(const i of r.subscriptions)i.unsubscribe()}}}o(z,"DetailsMenuElement");const U=new WeakMap,F={unsubscribe(){}};function T(a,r,i,f=!1){return a.addEventListener(r,i,f),{unsubscribe:()=>{a.removeEventListener(r,i,f)}}}o(T,"fromEvent");function H(a,r){const i=r.getAttribute("src");if(!i)return;const f=U.get(r);if(!f||f.loaded)return;f.loaded=!0;const x=r.querySelector("include-fragment");x&&!x.hasAttribute("src")&&(x.addEventListener("loadend",()=>j(a)),x.setAttribute("src",i))}o(H,"loadFragment");function N(a){let r=!1;const i=o(()=>r=!0,"onmousedown"),f=o(()=>r=!1,"onkeydown"),x=o(()=>{!a.hasAttribute("open")||j(a)||r||Y(a)},"ontoggle");return[T(a,"mousedown",i),T(a,"keydown",f),T(a,"toggle",x)]}o(N,"focusOnOpen");function P(a){if(!!a.hasAttribute("open"))for(const r of document.querySelectorAll("details[open] > details-menu")){const i=r.closest("details");i&&i!==a&&!i.contains(a)&&i.removeAttribute("open")}}o(P,"closeCurrentMenu");function j(a){if(!a.hasAttribute("open"))return!1;const r=a.querySelector("details-menu [autofocus]");return r?(r.focus(),!0):!1}o(j,"autofocus");function Y(a){const r=document.activeElement;if(r&&l(r)&&a.contains(r))return;const i=R(a,!0);i&&i.focus()}o(Y,"focusFirstItem");function R(a,r){const i=Array.from(a.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled]):not([aria-disabled="true"])')),f=document.activeElement,x=f instanceof HTMLElement?i.indexOf(f):-1,O=r?i[x+1]:i[x-1],J=r?i[0]:i[i.length-1];return O||J}o(R,"sibling");const X=navigator.userAgent.match(/Macintosh/);function C(a,r){const i=r.target;if(i instanceof Element&&i.closest("details")===a){if(r.type==="click"){const f=i.closest('[role="menuitem"], [role="menuitemradio"]');if(!f)return;const x=f.querySelector("input");if(f.tagName==="LABEL"&&i===x)return;f.tagName==="LABEL"&&x&&!x.checked||k(f,a)}else if(r.type==="change"){const f=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');f&&k(f,a)}}}o(C,"shouldCommit");function m(a,r){for(const i of r.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const f=i.querySelector('input[type="radio"], input[type="checkbox"]');let x=(i===a).toString();f instanceof HTMLInputElement&&(x=f.indeterminate?"mixed":f.checked.toString()),i.setAttribute("aria-checked",x)}}o(m,"updateChecked");function k(a,r){if(a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true")return;const i=a.closest("details-menu");!i||!i.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:a}}))||(u(a,r),m(a,r),a.getAttribute("role")!=="menuitemcheckbox"&&c(r),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:a}})))}o(k,"commit");function b(a,r,i){if(!(i instanceof KeyboardEvent)||a.querySelector("details[open]"))return;const f=U.get(r);if(!f||f.isComposing)return;const x=i.target instanceof Element&&i.target.tagName==="SUMMARY";switch(i.key){case"Escape":a.hasAttribute("open")&&(c(a),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{x&&!a.hasAttribute("open")&&a.setAttribute("open","");const O=R(a,!0);O&&O.focus(),i.preventDefault()}break;case"ArrowUp":{x&&!a.hasAttribute("open")&&a.setAttribute("open","");const O=R(a,!1);O&&O.focus(),i.preventDefault()}break;case"n":if(X&&i.ctrlKey){const O=R(a,!0);O&&O.focus(),i.preventDefault()}break;case"p":if(X&&i.ctrlKey){const O=R(a,!1);O&&O.focus(),i.preventDefault()}break;case" ":case"Enter":{const O=document.activeElement;O instanceof HTMLElement&&l(O)&&O.closest("details")===a&&(i.preventDefault(),i.stopPropagation(),O.click())}break}}o(b,"keydown");function l(a){const r=a.getAttribute("role");return r==="menuitem"||r==="menuitemcheckbox"||r==="menuitemradio"}o(l,"isMenuItem");function c(a){if(!a.hasAttribute("open"))return;a.removeAttribute("open");const i=a.querySelector("summary");i&&i.focus()}o(c,"close");function u(a,r){const i=r.querySelector("[data-menu-button]");if(!i)return;const f=E(a);if(f)i.textContent=f;else{const x=L(a);x&&(i.innerHTML=x)}}o(u,"updateLabel");function E(a){if(!a)return null;const r=a.hasAttribute("data-menu-button-text")?a:a.querySelector("[data-menu-button-text]");return r?r.getAttribute("data-menu-button-text")||r.textContent:null}o(E,"labelText");function L(a){if(!a)return null;const r=a.hasAttribute("data-menu-button-contents")?a:a.querySelector("[data-menu-button-contents]");return r?r.innerHTML:null}o(L,"labelHTML");function I(a,r){const i=U.get(a);!i||(i.isComposing=r.type==="compositionstart")}o(I,"trackComposition");var B=null;window.customElements.get("details-menu")||(window.DetailsMenuElement=z,window.customElements.define("details-menu",z))},73921:()=>{function z(){const l=/\bWindows NT 6.1\b/.test(navigator.userAgent),c=/\bWindows NT 6.2\b/.test(navigator.userAgent),u=/\bWindows NT 6.3\b/.test(navigator.userAgent),E=/\bFreeBSD\b/.test(navigator.userAgent),L=/\bLinux\b/.test(navigator.userAgent)&&!/\bAndroid\b/.test(navigator.userAgent);return!(l||c||u||L||E)}o(z,"isEmojiSupported");const U=new Set(["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F471}\u200D\u2642\uFE0F","\u{1F468}\u200D\u{1F9B0}","\u{1F468}\u200D\u{1F9B1}","\u{1F468}\u200D\u{1F9B3}","\u{1F468}\u200D\u{1F9B2}","\u{1F469}","\u{1F471}\u200D\u2640\uFE0F","\u{1F469}\u200D\u{1F9B0}","\u{1F469}\u200D\u{1F9B1}","\u{1F469}\u200D\u{1F9B3}","\u{1F469}\u200D\u{1F9B2}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64D}\u200D\u2642\uFE0F","\u{1F64D}\u200D\u2640\uFE0F","\u{1F64E}","\u{1F64E}\u200D\u2642\uFE0F","\u{1F64E}\u200D\u2640\uFE0F","\u{1F645}","\u{1F645}\u200D\u2642\uFE0F","\u{1F645}\u200D\u2640\uFE0F","\u{1F646}","\u{1F646}\u200D\u2642\uFE0F","\u{1F646}\u200D\u2640\uFE0F","\u{1F481}","\u{1F481}\u200D\u2642\uFE0F","\u{1F481}\u200D\u2640\uFE0F","\u{1F64B}","\u{1F64B}\u200D\u2642\uFE0F","\u{1F64B}\u200D\u2640\uFE0F","\u{1F9CF}","\u{1F9CF}\u200D\u2642\uFE0F","\u{1F9CF}\u200D\u2640\uFE0F","\u{1F647}","\u{1F647}\u200D\u2642\uFE0F","\u{1F647}\u200D\u2640\uFE0F","\u{1F926}","\u{1F926}\u200D\u2642\uFE0F","\u{1F926}\u200D\u2640\uFE0F","\u{1F937}","\u{1F937}\u200D\u2642\uFE0F","\u{1F937}\u200D\u2640\uFE0F","\u{1F468}\u200D\u2695\uFE0F","\u{1F469}\u200D\u2695\uFE0F","\u{1F468}\u200D\u{1F393}","\u{1F469}\u200D\u{1F393}","\u{1F468}\u200D\u{1F3EB}","\u{1F469}\u200D\u{1F3EB}","\u{1F468}\u200D\u2696\uFE0F","\u{1F469}\u200D\u2696\uFE0F","\u{1F468}\u200D\u{1F33E}","\u{1F469}\u200D\u{1F33E}","\u{1F468}\u200D\u{1F373}","\u{1F469}\u200D\u{1F373}","\u{1F468}\u200D\u{1F527}","\u{1F469}\u200D\u{1F527}","\u{1F468}\u200D\u{1F3ED}","\u{1F469}\u200D\u{1F3ED}","\u{1F468}\u200D\u{1F4BC}","\u{1F469}\u200D\u{1F4BC}","\u{1F468}\u200D\u{1F52C}","\u{1F469}\u200D\u{1F52C}","\u{1F468}\u200D\u{1F4BB}","\u{1F469}\u200D\u{1F4BB}","\u{1F468}\u200D\u{1F3A4}","\u{1F469}\u200D\u{1F3A4}","\u{1F468}\u200D\u{1F3A8}","\u{1F469}\u200D\u{1F3A8}","\u{1F468}\u200D\u2708\uFE0F","\u{1F469}\u200D\u2708\uFE0F","\u{1F468}\u200D\u{1F680}","\u{1F469}\u200D\u{1F680}","\u{1F468}\u200D\u{1F692}","\u{1F469}\u200D\u{1F692}","\u{1F46E}","\u{1F46E}\u200D\u2642\uFE0F","\u{1F46E}\u200D\u2640\uFE0F","\u{1F575}\uFE0F","\u{1F575}\uFE0F\u200D\u2642\uFE0F","\u{1F575}\uFE0F\u200D\u2640\uFE0F","\u{1F482}","\u{1F482}\u200D\u2642\uFE0F","\u{1F482}\u200D\u2640\uFE0F","\u{1F477}","\u{1F477}\u200D\u2642\uFE0F","\u{1F477}\u200D\u2640\uFE0F","\u{1F934}","\u{1F478}","\u{1F473}","\u{1F473}\u200D\u2642\uFE0F","\u{1F473}\u200D\u2640\uFE0F","\u{1F472}","\u{1F9D5}","\u{1F935}","\u{1F470}","\u{1F930}","\u{1F931}","\u{1F47C}","\u{1F385}","\u{1F936}","\u{1F9B8}","\u{1F9B8}\u200D\u2642\uFE0F","\u{1F9B8}\u200D\u2640\uFE0F","\u{1F9B9}","\u{1F9B9}\u200D\u2642\uFE0F","\u{1F9B9}\u200D\u2640\uFE0F","\u{1F9D9}","\u{1F9D9}\u200D\u2642\uFE0F","\u{1F9D9}\u200D\u2640\uFE0F","\u{1F9DA}","\u{1F9DA}\u200D\u2642\uFE0F","\u{1F9DA}\u200D\u2640\uFE0F","\u{1F9DB}","\u{1F9DB}\u200D\u2642\uFE0F","\u{1F9DB}\u200D\u2640\uFE0F","\u{1F9DC}","\u{1F9DC}\u200D\u2642\uFE0F","\u{1F9DC}\u200D\u2640\uFE0F","\u{1F9DD}","\u{1F9DD}\u200D\u2642\uFE0F","\u{1F9DD}\u200D\u2640\uFE0F","\u{1F486}","\u{1F486}\u200D\u2642\uFE0F","\u{1F486}\u200D\u2640\uFE0F","\u{1F487}","\u{1F487}\u200D\u2642\uFE0F","\u{1F487}\u200D\u2640\uFE0F","\u{1F6B6}","\u{1F6B6}\u200D\u2642\uFE0F","\u{1F6B6}\u200D\u2640\uFE0F","\u{1F9CD}","\u{1F9CD}\u200D\u2642\uFE0F","\u{1F9CD}\u200D\u2640\uFE0F","\u{1F9CE}","\u{1F9CE}\u200D\u2642\uFE0F","\u{1F9CE}\u200D\u2640\uFE0F","\u{1F468}\u200D\u{1F9AF}","\u{1F469}\u200D\u{1F9AF}","\u{1F468}\u200D\u{1F9BC}","\u{1F469}\u200D\u{1F9BC}","\u{1F468}\u200D\u{1F9BD}","\u{1F469}\u200D\u{1F9BD}","\u{1F3C3}","\u{1F3C3}\u200D\u2642\uFE0F","\u{1F3C3}\u200D\u2640\uFE0F","\u{1F483}","\u{1F57A}","\u{1F574}\uFE0F","\u{1F9D6}","\u{1F9D6}\u200D\u2642\uFE0F","\u{1F9D6}\u200D\u2640\uFE0F","\u{1F9D7}","\u{1F9D7}\u200D\u2642\uFE0F","\u{1F9D7}\u200D\u2640\uFE0F","\u{1F3C7}","\u{1F3C2}","\u{1F3CC}\uFE0F","\u{1F3CC}\uFE0F\u200D\u2642\uFE0F","\u{1F3CC}\uFE0F\u200D\u2640\uFE0F","\u{1F3C4}","\u{1F3C4}\u200D\u2642\uFE0F","\u{1F3C4}\u200D\u2640\uFE0F","\u{1F6A3}","\u{1F6A3}\u200D\u2642\uFE0F","\u{1F6A3}\u200D\u2640\uFE0F","\u{1F3CA}","\u{1F3CA}\u200D\u2642\uFE0F","\u{1F3CA}\u200D\u2640\uFE0F","\u26F9\uFE0F","\u26F9\uFE0F\u200D\u2642\uFE0F","\u26F9\uFE0F\u200D\u2640\uFE0F","\u{1F3CB}\uFE0F","\u{1F3CB}\uFE0F\u200D\u2642\uFE0F","\u{1F3CB}\uFE0F\u200D\u2640\uFE0F","\u{1F6B4}","\u{1F6B4}\u200D\u2642\uFE0F","\u{1F6B4}\u200D\u2640\uFE0F","\u{1F6B5}","\u{1F6B5}\u200D\u2642\uFE0F","\u{1F6B5}\u200D\u2640\uFE0F","\u{1F938}","\u{1F938}\u200D\u2642\uFE0F","\u{1F938}\u200D\u2640\uFE0F","\u{1F93D}","\u{1F93D}\u200D\u2642\uFE0F","\u{1F93D}\u200D\u2640\uFE0F","\u{1F93E}","\u{1F93E}\u200D\u2642\uFE0F","\u{1F93E}\u200D\u2640\uFE0F","\u{1F939}","\u{1F939}\u200D\u2642\uFE0F","\u{1F939}\u200D\u2640\uFE0F","\u{1F9D8}","\u{1F9D8}\u200D\u2642\uFE0F","\u{1F9D8}\u200D\u2640\uFE0F","\u{1F6C0}","\u{1F6CC}","\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}","\u{1F46D}","\u{1F46B}","\u{1F46C}"]);function F(l){return U.has(l)}o(F,"isModifiable");const T="\u200D",H=65039;function N(l,c){const u=j(l);if(!F(u))return l;const E=X(c);return E?u.split(T).map(L=>F(L)?Y(L,E):L).join(T):l}o(N,"applyTone");function P(l,c){const u=j(l);if(!F(u))return l;const E=c.map(L=>X(L));return u.split(T).map(L=>{if(!F(L))return L;const I=E.shift();return I?Y(L,I):L}).join(T)}o(P,"applyTones");function j(l){return[...l].filter(c=>!R(c.codePointAt(0))).join("")}o(j,"removeTone");function Y(l,c){const u=[...l].map(E=>E.codePointAt(0));return u[1]&&(R(u[1])||u[1]===H)?u[1]=c:u.splice(1,0,c),String.fromCodePoint(...u)}o(Y,"tint");function R(l){return l>=127995&&l<=127999}o(R,"isTone");function X(l){switch(l){case 1:return 127995;case 2:return 127996;case 3:return 127997;case 4:return 127998;case 5:return 127999;default:return null}}o(X,"toneModifier");class C extends HTMLElement{get image(){return this.firstElementChild instanceof HTMLImageElement?this.firstElementChild:null}get tone(){return(this.getAttribute("tone")||"").split(" ").map(c=>{const u=parseInt(c,10);return u>=0&&u<=5?u:0}).join(" ")}set tone(c){this.setAttribute("tone",c)}connectedCallback(){if(this.image===null&&!z()){const c=this.getAttribute("fallback-src");if(c){this.textContent="";const u=k(this);u.src=c,this.appendChild(u)}}this.hasAttribute("tone")&&m(this)}static get observedAttributes(){return["tone"]}attributeChangedCallback(c){switch(c){case"tone":m(this);break}}}o(C,"GEmojiElement");function m(l){if(l.image)return;const c=l.tone.split(" ").map(u=>parseInt(u,10));if(c.length===0)l.textContent=j(l.textContent||"");else if(c.length===1){const u=c[0];l.textContent=u===0?j(l.textContent||""):N(l.textContent||"",u)}else l.textContent=P(l.textContent||"",c)}o(m,"updateTone");function k(l){const c=document.createElement("img");return c.className="emoji",c.alt=l.getAttribute("alias")||"",c.height=20,c.width=20,c}o(k,"emojiImage"),window.customElements.get("g-emoji")||(window.GEmojiElement=C,window.customElements.define("g-emoji",C));var b=null},51941:()=>{const z=["[data-md-button]","md-header","md-bold","md-italic","md-quote","md-code","md-link","md-image","md-unordered-list","md-ordered-list","md-task-list","md-mention","md-ref","md-strikethrough"];function U(n){const d=[];for(const g of n.querySelectorAll(z.join(", ")))g.hidden||g.offsetWidth<=0&&g.offsetHeight<=0||g.closest("markdown-toolbar")===n&&d.push(g);return d}o(U,"getButtons");function F(n){return function(d){(d.key===" "||d.key==="Enter")&&(d.preventDefault(),n(d))}}o(F,"keydown");const T=new WeakMap;class H extends HTMLElement{constructor(){super();const d=o(()=>{const g=T.get(this);!g||et(this,g)},"apply");this.addEventListener("keydown",F(d)),this.addEventListener("click",d)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button")}click(){const d=T.get(this);!d||et(this,d)}}o(H,"MarkdownButtonElement");class N extends H{constructor(){super();const d=parseInt(this.getAttribute("level")||"3",10);if(d<1||d>6)return;const g=`${"#".repeat(d)} `;T.set(this,{prefix:g})}}o(N,"MarkdownHeaderButtonElement"),window.customElements.get("md-header")||(window.MarkdownHeaderButtonElement=N,window.customElements.define("md-header",N));class P extends H{constructor(){super();T.set(this,{prefix:"**",suffix:"**",trimFirst:!0})}}o(P,"MarkdownBoldButtonElement"),window.customElements.get("md-bold")||(window.MarkdownBoldButtonElement=P,window.customElements.define("md-bold",P));class j extends H{constructor(){super();T.set(this,{prefix:"_",suffix:"_",trimFirst:!0})}}o(j,"MarkdownItalicButtonElement"),window.customElements.get("md-italic")||(window.MarkdownItalicButtonElement=j,window.customElements.define("md-italic",j));class Y extends H{constructor(){super();T.set(this,{prefix:"> ",multiline:!0,surroundWithNewlines:!0})}}o(Y,"MarkdownQuoteButtonElement"),window.customElements.get("md-quote")||(window.MarkdownQuoteButtonElement=Y,window.customElements.define("md-quote",Y));class R extends H{constructor(){super();T.set(this,{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"})}}o(R,"MarkdownCodeButtonElement"),window.customElements.get("md-code")||(window.MarkdownCodeButtonElement=R,window.customElements.define("md-code",R));class X extends H{constructor(){super();T.set(this,{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"})}}o(X,"MarkdownLinkButtonElement"),window.customElements.get("md-link")||(window.MarkdownLinkButtonElement=X,window.customElements.define("md-link",X));class C extends H{constructor(){super();T.set(this,{prefix:"![",suffix:"](url)",replaceNext:"url",scanFor:"https?://"})}}o(C,"MarkdownImageButtonElement"),window.customElements.get("md-image")||(window.MarkdownImageButtonElement=C,window.customElements.define("md-image",C));class m extends H{constructor(){super();T.set(this,{prefix:"- ",multiline:!0,unorderedList:!0})}}o(m,"MarkdownUnorderedListButtonElement"),window.customElements.get("md-unordered-list")||(window.MarkdownUnorderedListButtonElement=m,window.customElements.define("md-unordered-list",m));class k extends H{constructor(){super();T.set(this,{prefix:"1. ",multiline:!0,orderedList:!0})}}o(k,"MarkdownOrderedListButtonElement"),window.customElements.get("md-ordered-list")||(window.MarkdownOrderedListButtonElement=k,window.customElements.define("md-ordered-list",k));class b extends H{constructor(){super();T.set(this,{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0})}}o(b,"MarkdownTaskListButtonElement"),window.customElements.get("md-task-list")||(window.MarkdownTaskListButtonElement=b,window.customElements.define("md-task-list",b));class l extends H{constructor(){super();T.set(this,{prefix:"@",prefixSpace:!0})}}o(l,"MarkdownMentionButtonElement"),window.customElements.get("md-mention")||(window.MarkdownMentionButtonElement=l,window.customElements.define("md-mention",l));class c extends H{constructor(){super();T.set(this,{prefix:"#",prefixSpace:!0})}}o(c,"MarkdownRefButtonElement"),window.customElements.get("md-ref")||(window.MarkdownRefButtonElement=c,window.customElements.define("md-ref",c));class u extends H{constructor(){super();T.set(this,{prefix:"~~",suffix:"~~",trimFirst:!0})}}o(u,"MarkdownStrikethroughButtonElement"),window.customElements.get("md-strikethrough")||(window.MarkdownStrikethroughButtonElement=u,window.customElements.define("md-strikethrough",u));class E extends HTMLElement{constructor(){super()}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.addEventListener("keydown",I),this.setAttribute("tabindex","0"),this.addEventListener("focus",L,{once:!0})}disconnectedCallback(){this.removeEventListener("keydown",I)}get field(){const d=this.getAttribute("for");if(!d)return null;const g="getRootNode"in this?this.getRootNode():document;let v;return(g instanceof Document||g instanceof ShadowRoot)&&(v=g.getElementById(d)),v instanceof HTMLTextAreaElement?v:null}}o(E,"MarkdownToolbarElement");function L({target:n}){if(!(n instanceof Element))return;n.removeAttribute("tabindex");let d="0";for(const g of U(n))g.setAttribute("tabindex",d),d==="0"&&(g.focus(),d="-1")}o(L,"onToolbarFocus");function I(n){const d=n.key;if(d!=="ArrowRight"&&d!=="ArrowLeft"&&d!=="Home"&&d!=="End")return;const g=n.currentTarget;if(!(g instanceof HTMLElement))return;const v=U(g),M=v.indexOf(n.target),W=v.length;if(M===-1)return;let D=0;d==="ArrowLeft"&&(D=M-1),d==="ArrowRight"&&(D=M+1),d==="End"&&(D=W-1),D<0&&(D=W-1),D>W-1&&(D=0);for(let q=0;q1}o(B,"isMultipleLines");function a(n,d){return Array(d+1).join(n)}o(a,"repeat");function r(n,d){let g=d;for(;n[g]&&n[g-1]!=null&&!n[g-1].match(/\s/);)g--;return g}o(r,"wordSelectionStart");function i(n,d,g){let v=d;const M=g?/\n/:/\s/;for(;n[v]&&!n[v].match(M);)v++;return v}o(i,"wordSelectionEnd");let f=null;function x(n,{text:d,selectionStart:g,selectionEnd:v}){const M=n.selectionStart,W=n.value.slice(0,M),D=n.value.slice(n.selectionEnd);if(f===null||f===!0){n.contentEditable="true";try{f=document.execCommand("insertText",!1,d)}catch{f=!1}n.contentEditable="false"}if(f&&!n.value.slice(0,n.selectionStart).endsWith(d)&&(f=!1),!f){try{document.execCommand("ms-beginUndoUnit")}catch{}n.value=W+d+D;try{document.execCommand("ms-endUndoUnit")}catch{}n.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}g!=null&&v!=null?n.setSelectionRange(g,v):n.setSelectionRange(M,n.selectionEnd)}o(x,"insertText");function O(n,d){const g=n.value.slice(n.selectionStart,n.selectionEnd);let v;d.orderedList||d.unorderedList?v=Z(n,d):d.multiline&&B(g)?v=ut(n,d):v=Q(n,d),x(n,v)}o(O,"styleSelectedText");function J(n){const d=n.value.split(` `);let g=0;for(let v=0;v=g&&n.selectionStart=g&&n.selectionEnd0?`${D} `:M,_=B(y)&&q.length>0?` ${q}`:W;if(t){const V=n.value[n.selectionStart-1];n.selectionStart!==0&&V!=null&&!V.match(/\s/)&&(A=` ${A}`)}y=it(n,A,_,d.multiline);let S=n.selectionStart,$=n.selectionEnd;const at=s.length>0&&_.indexOf(s)>-1&&y.length>0;if(p){const V=st(n);g=V.newlinesToAppend,v=V.newlinesToPrepend,A=g+M,_+=v}if(y.startsWith(A)&&y.endsWith(_)){const V=y.slice(A.length,y.length-_.length);if(h===w){let G=h-A.length;G=Math.max(G,S),G=Math.min(G,S+V.length),S=$=G}else $=S+V.length;return{text:V,selectionStart:S,selectionEnd:$}}else if(at)if(e.length>0&&y.match(e)){_=_.replace(s,y);const V=A+_;return S=$=S+A.length,{text:V,selectionStart:S,selectionEnd:$}}else{const V=A+y+_;return S=S+A.length+y.length+_.indexOf(s),$=S+s.length,{text:V,selectionStart:S,selectionEnd:$}}else{let V=A+y+_;S=h+A.length,$=w+A.length;const G=y.match(/^\s*|\s*$/g);if(d.trimFirst&&G){const lt=G[0]||"",ot=G[1]||"";V=lt+A+y.trim()+_+ot,S+=lt.length,$-=ot.length}return{text:V,selectionStart:S,selectionEnd:$}}}o(Q,"blockStyle");function ut(n,d){const{prefix:g,suffix:v,surroundWithNewlines:M}=d;let W=n.value.slice(n.selectionStart,n.selectionEnd),D=n.selectionStart,q=n.selectionEnd;const s=W.split(` `);if(s.every(e=>e.startsWith(g)&&e.endsWith(v)))W=s.map(e=>e.slice(g.length,e.length-v.length)).join(` `),q=D+W.length;else if(W=s.map(e=>g+e+v).join(` `),M){const{newlinesToAppend:e,newlinesToPrepend:p}=st(n);D+=e.length,q=D+W.length,W=e+W+p}return{text:W,selectionStart:D,selectionEnd:q}}o(ut,"multilineStyle");function ct(n){const d=n.split(` `),g=/^\d+\.\s+/,v=d.every(W=>g.test(W));let M=d;return v&&(M=d.map(W=>W.replace(g,""))),{text:M.join(` `),processed:v}}o(ct,"undoOrderedListStyle");function rt(n){const d=n.split(` `),g="- ",v=d.every(W=>W.startsWith(g));let M=d;return v&&(M=d.map(W=>W.slice(g.length,W.length))),{text:M.join(` `),processed:v}}o(rt,"undoUnorderedListStyle");function tt(n,d){return d?"- ":`${n+1}. `}o(tt,"makePrefix");function K(n,d){let g,v,M;return n.orderedList?(v=ct(d),g=rt(v.text),M=g.text):(v=rt(d),g=ct(v.text),M=g.text),[v,g,M]}o(K,"clearExistingListStyle");function Z(n,d){const g=n.selectionStart===n.selectionEnd;let v=n.selectionStart,M=n.selectionEnd;J(n);const W=n.value.slice(n.selectionStart,n.selectionEnd),[D,q,s]=K(d,W),t=s.split(` `).map((A,_)=>`${tt(_,d.unorderedList)}${A}`),e=t.reduce((A,_,S)=>A+tt(S,d.unorderedList).length,0),p=t.reduce((A,_,S)=>A+tt(S,!d.unorderedList).length,0);if(D.processed)return g?(v=Math.max(v-tt(0,d.unorderedList).length,0),M=v):(v=n.selectionStart,M=n.selectionEnd-e),{text:s,selectionStart:v,selectionEnd:M};const{newlinesToAppend:h,newlinesToPrepend:w}=st(n),y=h+t.join(` `)+w;return g?(v=Math.max(v+tt(0,d.unorderedList).length+h.length,0),M=v):q.processed?(v=Math.max(n.selectionStart+h.length,0),M=n.selectionEnd+h.length+e-p):(v=Math.max(n.selectionStart+h.length,0),M=n.selectionEnd+h.length+e),{text:y,selectionStart:v,selectionEnd:M}}o(Z,"listStyle");function et(n,d){const g=n.closest("markdown-toolbar");if(!(g instanceof E))return;const M=Object.assign(Object.assign({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),d),W=g.field;W&&(W.focus(),O(W,M))}o(et,"applyStyle");var nt=null},57852:(z,U,F)=>{var T=F(10160);const H=/\s|\(|\[/;function N(l,c,u,{multiWord:E,lookBackIndex:L,lastMatchPosition:I}={multiWord:!1,lookBackIndex:0,lastMatchPosition:null}){let B=l.lastIndexOf(c,u-1);if(B===-1||B=B+c.length+1||l.lastIndexOf(` `,u-1)>B||l.lastIndexOf(".",u-1)>B)return}else if(l.lastIndexOf(" ",u-1)>B)return;const a=l[B-1];return a&&!H.test(a)?void 0:{text:l.substring(B+c.length,u),position:B+c.length}}o(N,"query");const P=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],j=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],Y=new WeakMap;function R(l,c){const u=l.nodeName.toLowerCase();if(u!=="textarea"&&u!=="input")throw new Error("expected textField to a textarea or input");let E=Y.get(l);if(E&&E.parentElement===l.parentElement)E.innerHTML="";else{E=document.createElement("div"),Y.set(l,E);const a=window.getComputedStyle(l),r=P.slice(0);u==="textarea"?r.push("white-space:pre-wrap;"):r.push("white-space:nowrap;");for(let i=0,f=j.length;i{u.remove()},5e3),{top:I.top-L.top,left:I.left-L.left}}o(X,"textFieldSelectionPosition");const C=new WeakMap;class m{constructor(c,u){this.expander=c,this.input=u,this.combobox=null,this.menu=null,this.match=null,this.justPasted=!1,this.lookBackIndex=0,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.interactingWithList=!1,u.addEventListener("paste",this.onpaste),u.addEventListener("input",this.oninput),u.addEventListener("keydown",this.onkeydown),u.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}dismissMenu(){this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex)}activate(c,u){var E,L;if(this.input!==document.activeElement&&this.input!==((L=(E=document.activeElement)===null||E===void 0?void 0:E.shadowRoot)===null||L===void 0?void 0:L.activeElement))return;this.deactivate(),this.menu=u,u.id||(u.id=`text-expander-${Math.floor(Math.random()*1e5).toString()}`),this.expander.append(u),this.combobox=new T.Z(this.input,u);const{top:I,left:B}=X(this.input,c.position);u.style.top=`${I}px`,u.style.left=`${B}px`,this.combobox.start(),u.addEventListener("combobox-commit",this.oncommit),u.addEventListener("mousedown",this.onmousedown),this.combobox.navigate(1)}deactivate(){const c=this.menu;return!c||!this.combobox?!1:(this.menu=null,c.removeEventListener("combobox-commit",this.oncommit),c.removeEventListener("mousedown",this.onmousedown),this.combobox.destroy(),this.combobox=null,c.remove(),!0)}onCommit({target:c}){const u=c;if(!(u instanceof HTMLElement)||!this.combobox)return;const E=this.match;if(!E)return;const L=this.input.value.substring(0,E.position-E.key.length),I=this.input.value.substring(E.position+E.text.length),B={item:u,key:E.key,value:null};if(!this.expander.dispatchEvent(new CustomEvent("text-expander-value",{cancelable:!0,detail:B}))||!B.value)return;const r=`${B.value} `;this.input.value=L+r+I;const i=L.length+r.length;this.deactivate(),this.input.focus({preventScroll:!0}),this.input.selectionStart=i,this.input.selectionEnd=i,this.lookBackIndex=i,this.match=null}onBlur(){if(this.interactingWithList){this.interactingWithList=!1;return}this.deactivate()}onPaste(){this.justPasted=!0}async onInput(){if(this.justPasted){this.justPasted=!1;return}const c=this.findMatch();if(c){this.match=c;const u=await this.notifyProviders(c);if(!this.match)return;u?this.activate(c,u):this.deactivate()}else this.match=null,this.deactivate()}findMatch(){const c=this.input.selectionEnd||0,u=this.input.value;c<=this.lookBackIndex&&(this.lookBackIndex=c-1);for(const{key:E,multiWord:L}of this.expander.keys){const I=N(u,E,c,{multiWord:L,lookBackIndex:this.lookBackIndex,lastMatchPosition:this.match?this.match.position:null});if(I)return{text:I.text,key:E,position:I.position}}}async notifyProviders(c){const u=[],E=o(a=>u.push(a),"provide");return this.expander.dispatchEvent(new CustomEvent("text-expander-change",{cancelable:!0,detail:{provide:E,text:c.text,key:c.key}}))?(await Promise.all(u)).filter(a=>a.matched).map(a=>a.fragment)[0]:void 0}onMousedown(){this.interactingWithList=!0}onKeydown(c){c.key==="Escape"&&(this.match=null,this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex,c.stopImmediatePropagation(),c.preventDefault()))}}o(m,"TextExpander");class k extends HTMLElement{get keys(){const c=this.getAttribute("keys"),u=c?c.split(" "):[],E=this.getAttribute("multiword"),L=E?E.split(" "):[],I=L.length===0&&this.hasAttribute("multiword");return u.map(B=>({key:B,multiWord:I||L.includes(B)}))}connectedCallback(){const c=this.querySelector('input[type="text"], textarea');if(!(c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement))return;const u=new m(this,c);C.set(this,u)}disconnectedCallback(){const c=C.get(this);!c||(c.destroy(),C.delete(this))}dismiss(){const c=C.get(this);!c||c.dismissMenu()}}o(k,"TextExpanderElement"),window.customElements.get("text-expander")||(window.TextExpanderElement=k,window.customElements.define("text-expander",k));var b=null},88823:()=>{const z=function(){return document.readyState==="complete"?Promise.resolve():new Promise(N=>{window.addEventListener("load",N)})}();class U extends HTMLElement{async connectedCallback(){await z,this.content&&await T(this.lines,this.content,this.characterDelay,this.lineDelay),this.cursor&&(this.cursor.hidden=!0),this.dispatchEvent(new CustomEvent("typing:complete",{bubbles:!0,cancelable:!0}))}get content(){return this.querySelector('[data-target="typing-effect.content"]')}get cursor(){return this.querySelector('[data-target="typing-effect.cursor"]')}get lines(){const P=this.getAttribute("data-lines");try{return P?JSON.parse(P):[]}catch{return[]}}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion)").matches}get characterDelay(){return this.prefersReducedMotion?0:Math.max(0,Math.min(Math.floor(Number(this.getAttribute("data-character-delay"))),2147483647))||40}set characterDelay(P){if(P>2147483647||P<0)throw new DOMException("Value is negative or greater than the allowed amount");this.setAttribute("data-character-delay",String(P))}get lineDelay(){return this.prefersReducedMotion?0:Math.max(0,Math.min(Math.floor(Number(this.getAttribute("data-line-delay"))),2147483647))||40}set lineDelay(P){if(P>2147483647||P<0)throw new DOMException("Value is negative or greater than the allowed amount");this.setAttribute("data-line-delay",String(P))}}o(U,"TypingEffectElement");var F=null;window.customElements.get("typing-effect")||(window.TypingEffectElement=U,window.customElements.define("typing-effect",U));async function T(N,P,j,Y){for(let R=0;R{setTimeout(P,N)})}o(H,"wait")}}]);})(); //# sourceMappingURL=9244-740e29706133.js.map