18:32:00 [INFO] Running com.gargoylesoftware.htmlunit.ExternalTest 18:32:03 ERROR 18:32:03,004 com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter: error: message=[TypeError: redeclaration of formal parameter t.] sourceName=[https://github.githubassets.com/assets/frameworks-6b1e5c0082cc318bd85fc3f598b31949.js] line=[1] lineSource=[!function(){"use strict";window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)};const t="interactive"===document.readyState||"complete"===document.readyState?Promise.resolve():new Promise(t=>{document.addEventListener("DOMContentLoaded",()=>{t()})}),e="complete"===document.readyState?Promise.resolve():new Promise(t=>{window.addEventListener("load",t)});var n=Object.freeze({ready:t,loaded:e});const r=[],o="text/plain",i=["application/x-www-form-urlencoded","multipart/form-data",o];let a,s=!1;"sendBeacon"in window.navigator?s=!0:navigator.sendBeacon=function(t,e){return e instanceof Blob?(function(t){const e=new FileReader,n=new Promise(function(t,n){e.onload=(()=>{"string"==typeof e.result?t(e.result):n(new Error("readAsText yielded non-string result"))}),e.onerror=(()=>{n(e.error)})});return e.readAsText(t),n}(e).then(function(n){const r="string"==typeof e.type&&""!==e.type?e.type:o;l(t,n,r)}),!0):(l(t,e,o),!0)};let c=!1;function l(t,e,n){const o={url:String(t),data:e,type:n};if(c){const t=d()||[];t.push(o),h(t)}else r.push(o),a&&clearTimeout(a),a=setTimeout(function(){u(r),r.length=0},20);return!0}function u(t){for(const n of t){const t=new XMLHttpRequest;try{t.open("POST",n.url,!0),t.setRequestHeader("Content-Type",n.type),t.send(n.data)}catch(e){}}}window.addEventListener("beforeunload",function(t){setTimeout(function(){t.defaultPrevented||(c=!0,a&&clearTimeout(a),r.length>0&&h(r))})}),async function(){await t;const e=d();e&&(u(e),function(){try{sessionStorage.removeItem(f)}catch(t){}}())}();const f="send-beacon-queue";function d(){let t;try{t=sessionStorage.getItem(f)}catch(e){}if(t)return JSON.parse(t)}function h(t){const e=JSON.stringify(t);try{sessionStorage.setItem(f,e)}catch(n){}}var p=Object.freeze({guaranteedPost:function(t,e,n){s&&navigator.sendBeacon&&function(t){const e=t.split(";")[0];return i.indexOf(e)>-1}(n)?navigator.sendBeacon(t,new Blob([e],{type:n})):l(t,e,n)}});function m(t,e){return t(e={exports:{}},e.exports),e.exports}m(function(t,e){!function(){var e=window,n=document;t.exports={polyfill:function(){if(!("scrollBehavior"in n.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var t,r=e.HTMLElement||e.Element,o=468,i=(t=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(t)?1:0),a={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?p.call(e,n.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):a.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?a.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,n.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var t=arguments[0].left,e=arguments[0].top;p.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value couldn't be converted");a.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):a.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var t=function(t){var e;do{e=(t=t.parentNode)===n.body}while(!1===e&&!1===d(t));return e=null,t}(this),r=t.getBoundingClientRect(),o=this.getBoundingClientRect();t!==n.body?(p.call(this,t,t.scrollLeft+o.left-r.left,t.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(t).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else a.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(t,e){this.scrollLeft=t,this.scrollTop=e}function l(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(t,e){return"Y"===e?t.clientHeight+i1?1:c,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(t,r,o){var i,l,u,f,d=s();t===n.body?(i=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=a.scroll):(i=t,l=t.scrollLeft,u=t.scrollTop,f=c),h({scrollable:i,method:f,startTime:d,startX:l,startY:u,x:r,y:o})}}}}()}).polyfill;function v(t,e){const n=t.head;if(!n)return"";for(const r of n.getElementsByTagName("meta"))if(r.name===e)return r.content;return""}window.getSelection&&!function(){const t=document.createElement("div");return t.style.cssText="-ms-user-select: element; user-select: contain;","element"===t.style.getPropertyValue("-ms-user-select")||"contain"===t.style.getPropertyValue("-ms-user-select")||"contain"===t.style.getPropertyValue("user-select")}()&&document.addEventListener("click",function(t){if(!(t.target instanceof Element))return;const e=t.target.closest(".user-select-contain");if(!e)return;const n=window.getSelection();if(!n.rangeCount)return;const r=n.getRangeAt(0).commonAncestorContainer;e.contains(r)||n.selectAllChildren(e)});var g=Object.freeze({getMetadataByName:v});function b(t){const e=v(t,"expected-hostname");return!!e&&e.replace(/\.$/,"").split(".").slice(-2).join(".")!==t.location.hostname.replace(/\.$/,"").split(".").slice(-2).join(".")}var w=Object.freeze({default:b});let y=0;function E(t){C()&&x(function(t){const e=t.message,n=t.filename,r=t.lineno,o=t.colno;return j(t.error,{message:e,filename:n,lineno:r,colno:o})}(t))}function k(t){C()&&t.promise&&t.promise.catch(t=>{const e={};if(t&&t.response instanceof Response){if(/^HTTP (401|403|405|429|502)/.test(t.message))return;e.dataRemoteUrl=t.response.url}T(t,e)})}function _(t){const e=t.body||{},n=new Error("ReportingObserverError");x({bucket:"github-js-reports",error:{columnNumber:e.columnNumber,fileName:""===e.sourceFile?n.fileName:e.sourceFile,lineNumber:e.lineNumber,message:e.message||n.message,name:e.id,stack:n.stack},url:t.url})}function T(t){x(j(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}function x(t){const e=v(document,"browser-errors-url");e&&(y++,window.fetch(e,{method:"post",body:JSON.stringify(t)}).catch(function(){}))}const L=(new Date).getTime();function j(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){let r;if(t.stack){const e=t.framesToPop;r=function(t,e){let n=t.split("\n");n.length>=2&&A.test(n[0])&&O.test(n[1])&&n.shift();null!=e&&(n=n.slice(e));return n.join("\n")}(t.stack,e)}else{let e=t.fileName,o=t.lineNumber,i=t.columnNumber;null==e&&(e=String(n.filename)),null==o&&(o=n.lineno||0),null==i&&(i=n.colno||0),r=`${e}:${o}:${i}`}e={message:t.message,name:t.name,stack:r,toString:t.toString()}}return Object.assign({error:e,filename:"",lineno:0,colno:0,url:window.location.href,readyState:document.readyState,referrer:document.referrer,timeSinceLoad:Math.round((new Date).getTime()-L),user:M()},n)}const A=/^\S/,O=/^\s+at /;function M(){const t=v(document,"user-login");if(t)return t;const e=window._octo&&window._octo._clientId();return e?`anonymous-${e}`:null}let S=!1;function C(){return!S&&y<10&&"undefined"!=typeof customElements&&"undefined"!=typeof Intl&&"undefined"!=typeof MutationObserver&&!b(document)}window.addEventListener("pageshow",()=>{S=!1}),window.addEventListener("pagehide",()=>{S=!0});var D=Object.freeze({reportEvent:E,reportPromiseRejectionEvent:k,reportIntervention:_,reportError:T});window.addEventListener("error",E),window.addEventListener("unhandledrejection",k),"#b00m"===window.location.hash&&setTimeout(()=>{throw new Error("b00m")}),function(){const t=window.ReportingObserver;t&&new t(t=>{for(const e of t)_(e)},{buffered:!0}).observe()}(),window.Element&&!Element.prototype.toggleAttribute&&(Element.prototype.toggleAttribute=function(t,e){var n=!!e,r=2===arguments.length&&!e;return null!==this.getAttribute(t)?!!n||(this.removeAttribute(t),!1):!r&&(this.setAttribute(t,""),!0)});var P=function(t,e,n,r,o,i,a,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],u=0;(c=new Error(e.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}};function H(){if(!(this instanceof H))return new H;this.size=0,this.uid=0,this.selectors=[],this.indexes=Object.create(this.indexes),this.activeIndexes=[]}var R=window.document.documentElement,I=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector;H.prototype.matchesSelector=function(t,e){return I.call(t,e)},H.prototype.querySelectorAll=function(t,e){return e.querySelectorAll(t)},H.prototype.indexes=[];var B=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;H.prototype.indexes.push({name:"ID",selector:function(t){var e;if(e=t.match(B))return e[0].slice(1)},element:function(t){if(t.id)return[t.id]}});var q=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;H.prototype.indexes.push({name:"CLASS",selector:function(t){var e;if(e=t.match(q))return e[0].slice(1)},element:function(t){var e=t.className;if(e){if("string"==typeof e)return e.split(/\s/);if("object"==typeof e&&"baseVal"in e)return e.baseVal.split(/\s/)}}});var N,F=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;H.prototype.indexes.push({name:"TAG",selector:function(t){var e;if(e=t.match(F))return e[0].toUpperCase()},element:function(t){return[t.nodeName.toUpperCase()]}}),H.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}},N="function"==typeof window.Map?window.Map:function(){function t(){this.map={}}return t.prototype.get=function(t){return this.map[t+" "]},t.prototype.set=function(t,e){this.map[t+" "]=e},t}();var U=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function z(t,e){var n,r,o,i,a,s,c=(t=t.slice(0).concat(t.default)).length,l=e,u=[];do{if(U.exec(""),(o=U.exec(l))&&(l=o[3],o[2]||!l))for(n=0;n3&&void 0!==arguments[3]?arguments[3]:{}).capture,o=r?Y:V,i=o[t];i||(i=new H,o[t]=i,document.addEventListener(t,rt,r)),i.add(e,n)}function it(t,e,n){return t.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}var at=Object.freeze({on:ot,off:function(t,e,n){var r=!!(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).capture,o=r?Y:V,i=o[t];i&&(i.remove(e,n),i.size||(delete o[t],document.removeEventListener(t,rt,r)))},fire:it});const st=new WeakMap;function ct(t){P(t instanceof CustomEvent,"app/assets/modules/github/code-editor.js:18");const e=t.detail.editor;return st.set(t.target,e),e}ot("codeEditor:ready",".js-code-editor",ct);var lt=Object.freeze({getCodeEditor:function(t){return st.get(t)},getAsyncCodeEditor:async function(t){return st.get(t)||ct(await(e=t,n="codeEditor:ready",new Promise(t=>{e.addEventListener(n,t,{once:!0})})));var e,n}});document.addEventListener("click",function(t){if(!(t.target instanceof Element))return;const e=t.target.closest("a[data-confirm], input[type=submit][data-confirm], input[type=checkbox][data-confirm], button[data-confirm]");if(!e)return;const n=e.getAttribute("data-confirm");n&&(e instanceof HTMLInputElement&&e.hasAttribute("data-confirm-checked")&&!e.checked||confirm(n)||(t.stopImmediatePropagation(),t.preventDefault()))},!0);var ut=Object.freeze({default:function(t,e){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i{clearTimeout(n),t(...o)},e)}}});function ft(t){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dt(t,e){return!e||"object"!==ft(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ht(t){var e="function"==typeof Map?new Map:void 0;return(ht=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return pt(t,arguments,vt(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),mt(r,t)})(t)}function pt(t,e,n){return(pt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&mt(o,n.prototype),o}).apply(null,arguments)}function mt(t,e){return(mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gt=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=dt(this,vt(e).call(this,t))).name="QueryError",n.framesToPop=1,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&mt(t,e)}(e,ht(Error)),e}();function bt(t,e,n){var r=n||HTMLElement,o=t.closest(e);if(o instanceof r)return o;throw new gt("Element not found: <".concat(r.name,"> ").concat(e))}function wt(t,e,n){var r=n||HTMLElement,o=t.querySelector(e);if(o instanceof r)return o;throw new gt("Element not found: <".concat(r.name,"> ").concat(e))}function yt(t,e,n){var r=n||HTMLElement,o=[],i=!0,a=!1,s=void 0;try{for(var c,l=t.querySelectorAll(e)[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;u instanceof r&&o.push(u)}}catch(f){a=!0,s=f}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return o}function Et(t,e){var n=t.getAttribute(e);if(null!=n)return n;throw new gt("Attribute not found on element: ".concat(e))}var kt=Object.freeze({closest:bt,query:wt,querySelectorAll:yt,namedItem:function(t,e,n){var r=n||HTMLInputElement,o=t.elements.namedItem(e);if(o instanceof r)return o;throw new gt("Element not found by name: <".concat(r.name,"> ").concat(e))},getAttribute:Et});const _t=[];let Tt=0;function xt(e){!async function(){_t.push(e),await t,function(){const t=Tt;Tt=_t.length,Lt(_t.slice(t),null,window.location.href)}()}()}function Lt(t,e,n){const r=window.location.hash.slice(1),o={oldURL:e,newURL:n,target:r&&document.getElementById(r)};for(const i of t)i.call(null,o)}xt.clear=(()=>{_t.length=Tt=0});let jt=window.location.href;window.addEventListener("popstate",function(){jt=window.location.href}),window.addEventListener("hashchange",function(t){const e=window.location.href;try{Lt(_t,t.oldURL||jt,e)}finally{jt=e}});let At=null;document.addEventListener("pjax:start",function(){At=window.location.href}),document.addEventListener("pjax:end",function(){Lt(_t,At,window.location.href)});var Ot=Object.freeze({default:xt});const Mt="ontransitionend"in window;function St(t,e){if(!Mt)return void e();const n=Array.from(t.querySelectorAll(".js-transitionable"));t.classList.add("js-transitionable")&&n.push(t);for(const r of n){const t=Ct(r);r.addEventListener("transitionend",()=>{r.style.display="",r.style.visibility="",t&&Dt(r,function(){r.style.height=""})},{once:!0}),r.style.boxSizing="content-box",r.style.display="block",r.style.visibility="visible",t&&Dt(r,function(){r.style.height=getComputedStyle(r).height}),r.offsetHeight}e();for(const r of n)if(Ct(r)){const t=getComputedStyle(r).height;r.style.boxSizing="",r.style.height="0px"===t?`${r.scrollHeight}px`:"0px"}}function Ct(t){return"height"===getComputedStyle(t).transitionProperty}function Dt(t,e){t.style.transition="none",e(),t.offsetHeight,t.style.transition=""}function Pt(t){const e=t.getAttribute("data-details-container")||".js-details-container",n=bt(t,e);St(n,()=>{n.classList.toggle("open"),n.classList.toggle("Details--on"),t.setAttribute("aria-expanded",n.classList.contains("Details--on").toString()),Promise.resolve().then(()=>{!function(t){const e=t.querySelectorAll("input[autofocus], textarea[autofocus]"),n=e[e.length-1];n&&document.activeElement!==n&&n.focus()}(n),function(t){t.classList.contains("tooltipped")&&(t.classList.remove("tooltipped"),t.addEventListener("mouseleave",()=>{t.classList.add("tooltipped"),t.blur()},{once:!0}))}(t),function(t){const e=t.closest(".js-edit-repository-meta");e instanceof HTMLFormElement&&e.reset()}(t);const e=new CustomEvent("details:toggled",{bubbles:!0,cancelable:!1,detail:{open:n.classList.contains("Details--on")}});n.dispatchEvent(e)})})}function Ht(t){let e=!1,n=t.parentElement;for(;n;)n.classList.contains("Details-content--shown")&&(e=!0),n.classList.contains("js-details-container")&&(n.classList.toggle("open",!e),n.classList.toggle("Details--on",!e),e=!1),n=n.parentElement}ot("click",".js-details-target",function(t){const e=t.currentTarget;P(e instanceof HTMLElement,"app/assets/modules/github/details.js:131"),Pt(e),t.preventDefault()}),xt(function(t){let e=t.target;e&&Ht(e)});var Rt=Object.freeze({toggleDetailsTarget:Pt,isDetailsTargetExpanded:function(t){const e=t.getAttribute("data-details-container")||".js-details-container",n=bt(t,e).classList;return n.contains("Details--on")||n.contains("open")},ensureExpanded:Ht});async function It(t){const e=wt(document,"#site-details-dialog",HTMLTemplateElement).content.cloneNode(!0),n=wt(e,"details"),r=wt(n,"details-dialog"),o=wt(n,".js-details-dialog-spinner");t.dialogClass&&r.classList.add(...t.dialogClass.split(" ")),P(document.body,"app/assets/modules/github/details-dialog.js:20"),document.body.append(e);const i=await t.content;return o.remove(),r.prepend(i),n.addEventListener("toggle",()=>{n.hasAttribute("open")||(it(r,"dialog:remove"),n.remove())}),r}var Bt=Object.freeze({dialog:It});function qt(t){let e=t;const n=e.ownerDocument;if(!n)return;if(!e.offsetParent)return;const r=n.defaultView.HTMLElement;if(e!==n.body){for(;e!==n.body;){if(!(e.parentElement instanceof r))return;e=e.parentElement;const t=getComputedStyle(e),n=t.position,o=t.overflowY,i=t.overflowX;if("fixed"===n||"auto"===o||"auto"===i||"scroll"===o||"scroll"===i)break}return e instanceof Document?null:e}}function Nt(t,e){let n=e;const r=t.ownerDocument;if(!r)return;if(!r.body)return;const o=r.documentElement;if(!o)return;if(t===o)return;const i=Ft(t,n);if(!i)return;const a=(n=i._container)===r.documentElement?{top:r.defaultView.pageYOffset,left:r.defaultView.pageXOffset}:{top:n.scrollTop,left:n.scrollLeft},s=i.top-a.top,c=i.left-a.left,l=n.clientHeight,u=n.clientWidth;return{top:s,left:c,bottom:l-(s+t.offsetHeight),right:u-(c+t.offsetWidth),height:l,width:u}}function Ft(t,e){let n=t;const r=n.ownerDocument;if(!r)return;const o=r.documentElement;if(!o)return;const i=r.body;if(!i)return;const a=r.defaultView.HTMLElement;let s=0,c=0;const l=n.offsetHeight,u=n.offsetWidth;for(;n!==r.body&&n!==e;){if(s+=n.offsetTop||0,c+=n.offsetLeft||0,!(n.offsetParent instanceof a))return;n=n.offsetParent}let f,d,h;if(e&&e!==r&&e!==r.defaultView&&e!==r.documentElement&&e!==r.body){if(!(e instanceof a))return;h=e,f=e.scrollHeight,d=e.scrollWidth}else h=o,f=function(t,e){return Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight)}(i,o),d=function(t,e){return Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)}(i,o);return{top:s,left:c,bottom:f-(s+l),right:d-(c+u),_container:h}}var Ut=Object.freeze({offset:function(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},overflowParent:qt,overflowOffset:Nt,positionedOffset:Ft});var zt=Object.freeze({microtask:function(){return Promise.resolve()},animationFrame:function(){return new Promise(window.requestAnimationFrame)}});function Xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Vt(t){const e=t.querySelector("meta[name=html-safe-nonce]");if(null==e||!(e instanceof HTMLMetaElement))throw new Error("could not find html-safe-nonce on document");const n=e.content;if(n)return n;throw new Error("could not find html-safe-nonce on document")}class Yt extends Error{constructor(t,e){super(`${t} for HTTP ${e.status}`),Xt(this,"response",void 0),this.response=e}}function $t(t,e){const n=e.headers.get("content-type")||"";if(!n.startsWith("text/html"))throw new Yt(`expected response with text/html, but was ${n}`,e);const r=e.headers.get("x-html-safe");if(!r)throw new Yt("missing X-HTML-Safe nonce",e);if(r!==t)throw new Yt("response X-HTML-Safe nonce did not match",e)}function Gt(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)}var Kt=Object.freeze({parseHTML:Gt});class Jt extends Error{constructor(){super(...arguments),Xt(this,"response",void 0),Xt(this,"framesToPop",1)}}function Zt(t,e){if(t.status>=200&&t.status<300)return t;{e.response=t;const n=t.statusText?` ${t.statusText}`:"";throw e.message=`HTTP ${t.status}${n}`,e}}function Qt(t,e){const n=e?Object.assign({},e):{};n.credentials||(n.credentials="same-origin");const r=new Request(t,n);if(r.headers.append("X-Requested-With","XMLHttpRequest"),/#csrf-token=/.test(r.url))throw new TypeError("URL with encoded CSRF token was passed to fetch() without using the csrfRequest(url) helper");return r}function te(t,e){const n=Qt(t,e),r=new Jt;return self.fetch(n).then(t=>Zt(t,r))}function ee(t,e){const n=Qt(t,e),r=new Jt;return self.fetch(n).then(t=>(Zt(t,r),t.text()))}function ne(t,e,n){const r=Qt(e,n),o=new Jt;return self.fetch(r).then(e=>(Zt(e,o),$t(Vt(t),e),e.text())).then(e=>Gt(t,e))}var re=Object.freeze({ResponseError:Jt,checkStatus:Zt,csrfRequest:function(t,e){const n=new URL(t,window.location.origin),r=e?Object.assign({},e):{},o=n.hash.match(/^#csrf-token=([A-Za-z0-9+\/=]+)$/);if(!o)throw new TypeError("Expected csrfRequest(url) to have an associated #csrf-token");n.hash="";const i=n.toString();r.mode="same-origin";const a=new Request(i,r);return a.headers.append("Scoped-CSRF-Token",o[1]),a},makeRequest:Qt,fetch:te,fetchText:ee,fetchForm:function(t){return te(t.action,{method:t.method,body:new FormData(t)})},fetchSafeDocumentFragment:ne,fetchPoll:function(t,e){return new Promise(function(n,r){!function o(i){te(t,e).then(function(t){switch(t.status){case 200:n(t);break;case 202:setTimeout(()=>o(1.5*i),i);break;default:r(new Jt(t))}},r)}(1e3)})}});function oe(t,e){const n=Qt(t,e);n.headers.set("Accept","application/json");const r=new Jt;return self.fetch(n).then(t=>(Zt(t,r),t.json()))}var ie=Object.freeze({fetchJSON:oe}),ae="function"==typeof FormData&&"entries"in FormData.prototype?function(t){return Array.from(new FormData(t).entries())}:function(t){for(var e=[],n=t.elements,r=0;r",o),e.push([s,""])):e.push([s,o.value])}}return e};function se(t){const e=t.querySelector("input.is-submit-button-value");return e instanceof HTMLInputElement?e:null}function ce(t){const e=t.closest("form");if(!(e instanceof HTMLFormElement))return;let n=se(e);if(t.name){const r=t.matches("input[type=submit]")?"Submit":"",o=t.value||r;n||((n=document.createElement("input")).type="hidden",n.classList.add("is-submit-button-value"),e.prepend(n)),n.name=t.name,n.value=o}else n&&n.remove()}var le=Object.freeze({findPersistedSubmitButtonValue:se,persistSubmitButtonValue:ce});function ue(t,e,n){return t.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:n}))}function fe(t,e){e&&ce(e),ue(t,"submit",!0)&&t.submit()}function de(t){if(!(t instanceof HTMLElement))return!1;const e=t.nodeName.toLowerCase(),n=(t.getAttribute("type")||"").toLowerCase();return"select"===e||"textarea"===e||"input"===e&&"submit"!==n&&"reset"!==n||t.isContentEditable}function he(t){const e=new URLSearchParams;for(const r of ae(t)){var n=Wt(r,2);const t=n[0],o=n[1];e.append(t,o)}return e.toString()}var pe=Object.freeze({submit:fe,changeValue:function(t,e){if("boolean"==typeof e){if(!(t instanceof HTMLInputElement))throw new TypeError("only checkboxes can be set to boolean value");t.checked=e}else{if("checkbox"===t.type)throw new TypeError("checkbox can't be set to string value");t.value=e}ue(t,"change",!1)},fillFormValues:function(t,e){for(const n in e){const r=e[n],o=t.elements.namedItem(n);o instanceof HTMLInputElement?o.value=r:o instanceof HTMLTextAreaElement&&(o.value=r)}},isFormField:de,serialize:he});function me(t){return ve(t,ge(arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.hash))}function ve(t,e){if(""!==e)return t.getElementById(e)||t.getElementsByName(e)[0]}function ge(t){try{return decodeURIComponent(t.slice(1))}catch(e){return""}}var be=Object.freeze({findFragmentTarget:me,findElementByFragmentName:ve,decodeFragmentValue:ge});!function(){var t=function(t){this.w=t||[]};t.prototype.set=function(t){this.w[t]=!0},t.prototype.encode=function(){for(var t=[],e=0;e<\/script>')):((n=_.createElement("script")).type="text/javascript",n.async=!0,n.src=t,r&&(n.onload=r),e&&(n.id=e),(t=_.getElementsByTagName("script")[0]).parentNode.insertBefore(n,t)))},g=function(){return"https:"==_.location.protocol},b=function(t,e){return(t=t.match("(?:&|#|\\?)"+h(e).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==t.length?t[1]:""},w=function(){var t=""+_.location.hostname;return 0==t.indexOf("www.")?t.substring(4):t},y=function(t,e){if(1==e.length&&null!=e[0]&&"object"==typeof e[0])return e[0];for(var n={},r=Math.min(t.length+1,e.length),o=0;o=e.length)P(t,e,n);else{if(!(8192>=e.length))throw I("len",e.length),new C(e.length);R(t,e,n)||H(t,e,n)||P(t,e,n)}},P=function(t,e,n){var r=f(t+"?"+e);r.onload=r.onerror=function(){r.onload=null,r.onerror=null,n()}},H=function(t,e,n){var r=k.XMLHttpRequest;if(!r)return!1;var o=new r;return"withCredentials"in o&&(o.open("POST",t,!0),o.withCredentials=!0,o.setRequestHeader("Content-Type","text/plain"),o.onreadystatechange=function(){4==o.readyState&&(n(),o=null)},o.send(e),!0)},R=function(t,e,n){return!!k.navigator.sendBeacon&&(!!k.navigator.sendBeacon(t,e)&&(n(),!0))},I=function(t,e,n){1<=100*Math.random()||x("?")||(t=["t=error","_e="+t,"_v=j48","sr=1"],e&&t.push("_f="+e),n&&t.push("_m="+h(n.substring(0,100))),t.push("aip=1"),t.push("z="+G()),P(S()+"/collect",t.join("&"),d))},B=function(t){var e=k.gaData=k.gaData||{};return e[t]=e[t]||{}},q=function(){this.M=[]};function N(t){if(100!=t.get(Re)&&Jn(et(t,_e))%1e4>=100*nt(t,Re))throw"abort"}function F(t){if(x(et(t,Le)))throw"abort"}function U(){var t=_.location.protocol;if("http:"!=t&&"https:"!=t)throw"abort"}function z(t){try{k.navigator.sendBeacon?n(42):k.XMLHttpRequest&&"withCredentials"in new k.XMLHttpRequest&&n(40)}catch(r){}t.set(ie,o(t),!0),t.set(yt,nt(t,yt)+1);var e=[];Q.map(function(n,r){r.F&&(null!=(n=t.get(n))&&n!=r.defaultValue&&("boolean"==typeof n&&(n*=1),e.push(r.F+"="+h(""+n))))}),e.push("z="+K()),t.set(gt,e.join("&"),!0)}function X(t){var e=et(t,qe)||S()+"/collect",n=et(t,wt);if(!n&&t.get(bt)&&(n="beacon"),n){var r=et(t,gt),o=(o=t.get(vt))||d;"image"==n?P(e,r,o):"xhr"==n&&H(e,r,o)||"beacon"==n&&R(e,r,o)||D(e,r,o)}else D(e,et(t,gt),t.get(vt));e=t.get(Le),n=(e=B(e)).hitcount,e.hitcount=n?n+1:1,e=t.get(Le),delete B(e).pending_experiments,t.set(vt,d,!0)}function W(t){var e;(k.gaData=k.gaData||{}).expId&&t.set(Kt,(k.gaData=k.gaData||{}).expId),(k.gaData=k.gaData||{}).expVar&&t.set(Jt,(k.gaData=k.gaData||{}).expVar);var n=t.get(Le);if(n=B(n).pending_experiments){var r=[];for(e in n)n.hasOwnProperty(e)&&n[e]&&r.push(encodeURIComponent(e)+"."+encodeURIComponent(n[e]));e=r.join("!")}else e=void 0;e&&t.set(Zt,e,!0)}function V(){if(k.navigator&&"preview"==k.navigator.loadPurpose)throw"abort"}function Y(t){var e=k.gaDevIds;s(e)&&0!=e.length&&t.set("&did",e.join(","),!0)}function $(t){if(!t.get(Le))throw"abort"}q.prototype.add=function(t){this.M.push(t)},q.prototype.D=function(t){try{for(var e=0;e=r)throw"abort";t.set(oe,--r)}t.set(ne,++e)}var Z=function(){this.data=new E},Q=new E,tt=[];Z.prototype.get=function(t){var e=it(t),n=this.data.get(t);return e&&null==n&&(n=a(e.defaultValue)?e.defaultValue():e.defaultValue),e&&e.Z?e.Z(this,t,n):n};var et=function(t,e){return null==(t=t.get(e))?"":""+t},nt=function(t,e){return null==(t=t.get(e))||""===t?0:1*t};Z.prototype.set=function(t,e,n){if(t)if("object"==typeof t)for(var r in t)t.hasOwnProperty(r)&&rt(this,r,t[r],n);else rt(this,t,e,n)};var rt=function(t,e,n,r){if(null!=n)switch(e){case Le:Ln.test(n)}var o=it(e);o&&o.o?o.o(t,e,n,r):t.data.set(e,n,r)},ot=function(t,e,n,r,o){this.name=t,this.F=e,this.Z=r,this.o=o,this.defaultValue=n},it=function(t){var e=Q.get(t);if(!e)for(var n=0;nn)&&(t[e]=void 0)},$e=function(t){return function(e){if("pageview"==e.get(mt)&&!t.I){t.I=!0;var n=function(t){var e=Math.min(nt(t,Ie),100);return!(Jn(et(t,_e))%100>=e)}(e);e=0=t&&r.push({hash:a[0],R:o[i],O:a})}if(0!=r.length)return 1==r.length?r[0]:an(e,r)||an(n,r)||an(null,r)||r[0]}function an(t,e){var n;null==t?n=t=1:(n=Jn(t),t=Jn(l(t,".")?t.substring(1):"."+t));for(var r=0;ro.length)){r=[];for(var i=0;i=s[0]||0>=s[1]?"":s.join("x"),t.set(At,r),t.set(Mt,function(){var t,e,n;if((n=(n=k.navigator)?n.plugins:null)&&n.length)for(var r=0;rarguments.length||("string"==typeof arguments[0]?(e=arguments[0],r=[].slice.call(arguments,1)):(e=arguments[0]&&arguments[0][mt],r=arguments),e&&((r=y(Mn[e]||[],r))[mt]=e,this.b.set(r,void 0,!0),this.filters.D(this.b),this.b.data.m={},ze(this.ra,this.b)&&function(t){var e=k.performance;if(e&&e.getEntriesByName){n(35);var r="https://www.google-analytics.com/analytics.js?wpid="+t;v(r,void 0,void 0,function(){try{var o=1,i=e.getEntriesByName("https://www.google-analytics.com/analytics.js");i&&0!=i.length||(i=e.getEntriesByName("http://www.google-analytics.com/analytics.js"),o=0);var a=e.getEntriesByName(r);if(i&&1==i.length&&a&&1==a.length){n(37);var s=i[0],c=a[0],l={tid:t,ad:xn(s.duration),bd:xn(c.duration),ar:xn(s.responseEnd-s.requestStart),br:xn(c.responseEnd-c.requestStart),an:xn(s.domainLookupEnd-s.domainLookupStart),bn:xn(c.domainLookupEnd-c.domainLookupStart),ac:xn(s.connectEnd-s.connectStart),bc:xn(c.connectEnd-c.connectStart),as:o};for(var u in(o=[]).push("_v=j48"),o.push("id=10"),l)l.hasOwnProperty(u)&&o.push(u+"="+h(l[u]));o.push("z="+G()),P("https://www.google-analytics.com/u/d",o.join("&"),d)}}catch(f){}})}}(this.b.get(Le))))},jn.prototype.ma=function(t,e){var n=this;Nn(t,n,e)||(Un(t,function(){Nn(t,n,e)}),Fn(String(n.get(ke)),t,void 0,e,!0))};var Sn,Cn,Dn,Pn,Hn=function(t){return"prerender"!=_.visibilityState&&(t(),!0)},Rn=function(t){if(!Hn(t)){n(16);var e=!1,r=function(){if(!e&&Hn(t)){e=!0;var n=r,o=_;o.removeEventListener?o.removeEventListener("visibilitychange",n,!1):o.detachEvent&&o.detachEvent("onvisibilitychange",n)}};p(_,"visibilitychange",r)}},In=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,Bn=function(t){if(a(t[0]))this.u=t[0];else{var e=In.exec(t[0]);if(null!=e&&4==e.length&&(this.c=e[1]||"t0",this.K=e[2]||"",this.C=e[3],this.a=[].slice.call(t,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(c(this.a[1])?this.X=this.a[1]:this.W=this.a[1]))),e=t[1],t=t[2],!this.C)throw"abort";if(this.i&&(!c(e)||""==e))throw"abort";if(this.g&&(!c(e)||""==e||!a(t)))throw"abort";if(qn(this.c)||qn(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort"}};function qn(t){return 0<=t.indexOf(".")||0<=t.indexOf(":")}Sn=new E,Dn=new E,Pn=new E,Cn={ec:45,ecommerce:46,linkid:47};var Nn=function(t,e,n){e==Yn||e.get(ke);var r=Sn.get(t);return!!a(r)&&(e.plugins_=e.plugins_||new E,!!e.plugins_.get(t)||(e.plugins_.set(t,new r(e,n||{})),!0))},Fn=function(t,e,r,o,i){if(!a(Sn.get(e))&&!Dn.get(e)){if(Cn.hasOwnProperty(e)&&n(Cn[e]),mn.test(e)){if(n(52),!(t=Yn.j(t)))return!0;o={id:e,B:(r=o||{}).dataLayer||"dataLayer",ia:!!t.get("anonymizeIp"),na:i,G:!1},t.get(">m")==e&&(o.G=!0);var s=String(t.get("name"));"t0"!=s&&(o.target=s),x(String(t.get("trackingId")))||(o.ja=String(t.get(_e)),o.ka=Number(t.get(Te)),r=r.palindrome?gn:vn,r=(r=_.cookie.replace(/^|(; +)/g,";").match(r))?r.sort().join("").substring(1):void 0,o.la=r,o.qa=b(t.b.get(Et)||"","gclid")),t=o.B,r=(new Date).getTime(),k[t]=k[t]||[],r={"gtm.start":r},i||(r.event="gtm.js"),k[t].push(r),r=function(t){function e(t,e){e&&(n+="&"+t+"="+h(e))}var n="https://www.google-analytics.com/gtm/js?id="+h(t.id);return"dataLayer"!=t.B&&e("l",t.B),e("t",t.target),e("cid",t.ja),e("cidt",t.ka),e("gac",t.la),e("aip",t.ia),t.na&&e("m","sync"),e("cycle",t.G),t.qa&&e("gclid",t.qa),n}(o)}!r&&Cn.hasOwnProperty(e)?(n(39),r=e+".js"):n(43),r&&(r&&0<=r.indexOf("/")||(r=(ft||g()?"https:":"http:")+"//www.google-analytics.com/plugins/ua/"+r),t=(o=Wn(r)).protocol,r=_.location.protocol,("https:"==t||t==r||"http:"==t&&"http:"==r)&&Xn(o)&&(v(o.url,void 0,i),Dn.set(e,!0)))}},Un=function(t,e){var n=Pn.get(t)||[];n.push(e),Pn.set(t,n)},zn=function(t,e){Sn.set(t,e),e=Pn.get(t)||[];for(var n=0;nt.split("/")[0].indexOf(":")&&(t=a+o[2].substring(0,o[2].lastIndexOf("/"))+"/"+t),n.href=t,r=e(n),{protocol:(n.protocol||"").toLowerCase(),host:r[0],port:r[1],path:r[2],query:n.search||"",url:t||""}},Vn={ga:function(){Vn.f=[]}};Vn.ga(),Vn.D=function(t){var e=Vn.J.apply(Vn,arguments);e=Vn.f.concat(e);for(Vn.f=[];0r;r++){var o=e[r].src;if(o&&0==o.indexOf("https://www.google-analytics.com/analytics")){n(33),e=!0;break t}}e=!1}e&&(ft=!0)}g()||ft||!ze(new Ue(1e4))||(n(36),ft=!0),(k.gaplugins=k.gaplugins||{}).Linker=un,e=un.prototype,zn("linker",un),Fe("decorate",e,e.ca,20),Fe("autoLink",e,e.S,25),zn("displayfeatures",_n),zn("adfeatures",_n),t=t&&t.q,s(t)?Vn.D.apply(Yn,t):n(50)}},Yn.da=function(){for(var t=Yn.getAll(),e=0;e>21:r;return r}Kn&&Kn.r?Gn():Rn(Gn),Rn(function(){Vn.D(["provide","render",d])})}(window),function(){var t=window,e="push",n="length",r="prototype",o=function(t){if(t.get&&t.set){this.clear();var e=t.get("buildHitTask");t.set("buildHitTask",f(this,e)),t.set("_rlt",d(this,t.get("_rlt")))}},i={action:"pa",promoAction:"promoa",id:"ti",affiliation:"ta",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",step:"cos",label:"col",option:"col",options:"col",list:"pal",listSource:"pls"},a={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",quantity:"qt",coupon:"cc","dimension(\\d+)":"cd","metric(\\d+)":"cm"},s={id:"id",name:"nm",creative:"cr",position:"ps"},c=function(t,e){this.name=t,this.source=e,this.e=[]},l="detail checkout checkout_option click add remove purchase refund".split(" ");o[r].clear=function(){this.b=void 0,this.f=[],this.a=[],this.g=[],this.d=void 0},o[r].h=function(t,e){var n=e||{};"promo_click"==t?n.promoAction="click":n.action=t,this.b=h(n)},o[r].j=function(t){(t=h(t))&&this.f[e](t)},o[r].i=function(t){var r=h(t);if(r){var o,i=t.list||"";t=t.listSource||"";for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{};e.page=t,window.ga("send","pageview",e)},setDimension:function(t,e){window.ga("set",t,e)},setGlobalLocation:function(t){window.ga("set",{location:t})},setGlobalTitle:function(t){window.ga("set",{title:t})},setGlobalAccount:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};window.ga("create",t,e,n),window.ga("set","transport","sendBeacon"in window.navigator?"beacon":"xhr")},providePlugin:function(t,e){const n=window[window.GoogleAnalyticsObject||"ga"];"function"==typeof n&&n("provide",t,e)},requirePlugin:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.ga(()=>{window.ga("require",t,e)})},trackEvent:function(t){void 0===t.interactive&&(t.interactive=!0),window.ga("send","event",t.category,t.action,t.label,t.value,{nonInteraction:!t.interactive})}});function ye(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ee(t)||function(t,e){const n=t.ownerDocument.activeElement;if(!n)return!1;if(e&&n===t)return!1;return de(n)&&t===n||t.contains(n)}(t,e)||function(t){return t.matches(":active")}(t)||function(t){return!(!t.closest(".is-dirty")&&!t.querySelector(".is-dirty"))}(t)}function Ee(t){for(const e of t.querySelectorAll("input, textarea"))if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&ke(e))return!0;return!1}function ke(t){if(t instanceof HTMLInputElement&&("checkbox"===t.type||"radio"===t.type)){if(t.checked!==t.defaultChecked)return!0}else if(t.value!==t.defaultValue)return!0;return!1}var _e=Object.freeze({hasInteractions:ye,hasDirtyFields:Ee});function Te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xe(t,e){for(var n=0;n1||0===t?"s":"")},pluralizeNode:function(t,e){const n=1===t?"data-singular-string":"data-plural-string",r=e.getAttribute(n);null!=r&&(e.textContent=r)}});let yn=null;function En(t){yn&&kn(yn),it(t,"menu:activate")&&(document.addEventListener("keydown",Tn),document.addEventListener("click",_n),yn=t,St(t,()=>{t.classList.add("active");const e=t.querySelector(".js-menu-content [tabindex]");e&&e.focus();const n=t.querySelector(".js-menu-target");n&&(n.setAttribute("aria-expanded","true"),n.hasAttribute("data-no-toggle")||n.classList.add("selected"))}),it(t,"menu:activated"))}function kn(t){it(t,"menu:deactivate")&&(document.removeEventListener("keydown",Tn),document.removeEventListener("click",_n),yn=null,St(t,()=>{t.classList.remove("active");const e=t.querySelector(".js-menu-content");e&&e.setAttribute("aria-expanded","false");const n=t.querySelector(".js-menu-target");n&&(n.setAttribute("aria-expanded","false"),n.hasAttribute("data-no-toggle")||n.classList.remove("selected"))}),it(t,"menu:deactivated"))}function _n(t){if(!yn)return;const e=t.target;P(e instanceof Element,"app/assets/modules/github/menu.js:111");const n=e.closest("#facebox, .facebox-overlay, details[open], details-dialog"),r=!!n&&!n.contains(yn);yn.contains(e)||r||(t.preventDefault(),kn(yn))}function Tn(t){if(!yn)return;const e=document.activeElement;e&&"Escape"===t.key&&(yn.contains(e)&&e.blur(),t.preventDefault(),kn(yn))}ot("click",".js-menu-container",function(t){const e=t.currentTarget;P(e instanceof HTMLElement,"app/assets/modules/github/menu.js:157"),t.target.closest(".js-menu-target")instanceof HTMLElement?(t.preventDefault(),e===yn?kn(e):En(e)):t.target.closest(".js-menu-content")||e===yn&&(t.preventDefault(),kn(e))}),ot("click",".js-menu-container .js-menu-close",function(t){const e=t.currentTarget.closest(".js-menu-container");P(e instanceof HTMLElement,"expected container to be .js-menu-container -- app/assets/modules/github/menu.js:184"),kn(e),t.preventDefault()}),un(".js-menu-container.active",{add(){const t=document.body;P(t,"app/assets/modules/github/menu.js:193"),t.classList.add("menu-active")},remove(){const t=document.body;P(t,"app/assets/modules/github/menu.js:198"),t.classList.remove("menu-active")}});var xn=Object.freeze({activate:En,deactivate:kn});class Ln{constructor(t){Xt(this,"closed",void 0),Xt(this,"unsubscribe",void 0),this.closed=!1,this.unsubscribe=(()=>{t(),this.closed=!0})}}function jn(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.addEventListener(e,n,r),new Ln(()=>{t.removeEventListener(e,n,r)})}var An=Object.freeze({fromEvent:jn});function On(t){return`${t.ctrlKey?"Control+":""}${t.altKey?"Alt+":""}${t.metaKey?"Meta+":""}${t.key}`}var Mn=Object.freeze({default:On});function Sn(t,e){let n=t;const r=e||{},o=t.ownerDocument;n!==o&&n!==o.defaultView&&n!==o.documentElement&&n!==o.body||(n=o);const i=o.defaultView.Document,a=o.defaultView.HTMLElement;if(null==r.top&&null==r.left)if(r.target){const t=Ft(r.target,n);null!=t&&(r.top=t.top,r.left=t.left)}else if(n instanceof a){const t=Ft(n,n.offsetParent);n=n.offsetParent,null!=t&&(r.top=t.top,r.left=t.left)}if(n instanceof i||n===o.body){const t=null!=r.top?r.top:o.defaultView.pageYOffset,e=null!=r.left?r.left:o.defaultView.pageXOffset;o.defaultView.scrollTo(e,t)}else P(n instanceof a,"container is not HTMLElement -- app/assets/modules/github/scrollto.js:56"),null!=r.top&&(n.scrollTop=r.top),null!=r.left&&(n.scrollLeft=r.left)}var Cn=Object.freeze({default:Sn});function Dn(t){return!function(t){return t.offsetWidth<=0&&t.offsetHeight<=0}(t)}var Pn=Object.freeze({default:Dn});const Hn=navigator.userAgent.match(/Macintosh/),Rn=Hn?"metaKey":"ctrlKey",In=Hn?"Meta":"Control";let Bn=!1,qn={x:0,y:0};function Nn(t){t instanceof MouseEvent&&(qn.x===t.clientX&&qn.y===t.clientY||(Bn=!1),qn={x:t.clientX,y:t.clientY})}function Fn(t){if(Bn)return;const e=t.currentTarget,n=t.target;if(!(n instanceof Element&&e instanceof HTMLElement&&e.closest(".js-active-navigation-container")))return;const r=n.closest(".js-navigation-item");r&&Qn(r,e)}un(".js-navigation-container:not(.js-navigation-container-no-mouse)",{subscribe:t=>jn(t,"mouseover",Nn)}),un(".js-navigation-container:not(.js-navigation-container-no-mouse)",{subscribe:t=>jn(t,"mouseover",Fn)});let Un=0;function zn(t){if(t.target!==document.body&&t.target instanceof HTMLElement&&!t.target.classList.contains("js-navigation-enable"))return;Bn=!0;const e=tr();let n;if(e){n=it(e.querySelector('.js-navigation-item[aria-selected="true"]')||e,"navigation:keydown",{hotkey:On(t),originalEvent:t,originalTarget:t.target})}n||t.preventDefault()}function Xn(t){it(t.currentTarget,"navigation:open",{modifierKey:t.modifierKey||t.altKey||t.ctrlKey||t.metaKey,shiftKey:t.shiftKey})||t.preventDefault()}function Wn(t){const e=tr();t!==e&&(e&&Vn(e),t.classList.add("js-active-navigation-container"))}function Vn(t){t.classList.remove("js-active-navigation-container")}un(".js-active-navigation-container",{add(){1===++Un&&document.addEventListener("keydown",zn)},remove(){0===--Un&&document.removeEventListener("keydown",zn)}}),ot("navigation:keydown",".js-active-navigation-container",function(t){P(t instanceof CustomEvent,"app/assets/modules/github/navigation.js:232");const e=t.currentTarget,n=t.detail.originalTarget.matches("input, textarea"),r=t.target;if(r.classList.contains("js-navigation-item"))if(n){if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":Jn(r,e);break;case"Control+p":Kn(r,e)}switch(On(t.detail.originalEvent)){case"ArrowUp":Kn(r,e);break;case"ArrowDown":Jn(r,e);break;case"Enter":case`${In}+Enter`:Zn(r,t.detail.originalEvent[Rn])}}else{if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":Jn(r,e);break;case"Control+p":Kn(r,e);break;case"Alt+v":!function(t,e){const n=er(e);let r=n.indexOf(t);const o=qt(t);if(null==o)return;let i,a;for(;(i=n[r-1])&&(a=Nt(i,o))&&a.top>=0;)r--;if(i){const t=Qn(i,e);if(t)return;rr(o,i)}}(r,e);break;case"Control+v":!function(t,e){const n=er(e);let r=n.indexOf(t);const o=qt(t);if(null==o)return;let i,a;for(;(i=n[r+1])&&(a=Nt(i,o))&&a.bottom>=0;)r++;if(i){const t=Qn(i,e);if(t)return;rr(o,i)}}(r,e)}switch(On(t.detail.originalEvent)){case"j":case"J":Jn(r,e);break;case"k":case"K":Kn(r,e);break;case"o":case"Enter":case`${In}+Enter`:Zn(r,t.detail[Rn])}}else{const r=er(e)[0];if(r)if(n){if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":Qn(r,e)}switch(On(t.detail.originalEvent)){case"ArrowDown":Qn(r,e)}}else{if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":case"Control+v":Qn(r,e)}switch(On(t.detail.originalEvent)){case"j":Qn(r,e)}}}if(n){if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":case"Control+p":t.preventDefault()}switch(On(t.detail.originalEvent)){case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Enter":t.preventDefault()}}else{if(Hn)switch(On(t.detail.originalEvent)){case"Control+n":case"Control+p":case"Control+v":case"Alt+v":t.preventDefault()}switch(On(t.detail.originalEvent)){case"j":case"k":t.preventDefault();break;case"o":case"Enter":case`${Rn}+Enter`:t.preventDefault()}}}),ot("click",".js-active-navigation-container .js-navigation-item",function(t){P(t instanceof MouseEvent,"app/assets/modules/github/navigation.js:388"),Xn(t)}),ot("navigation:keyopen",".js-active-navigation-container .js-navigation-item",function(t){P(t instanceof CustomEvent,"app/assets/modules/github/navigation.js:394");const e=t.currentTarget.classList.contains("js-navigation-open")?t.currentTarget:t.currentTarget.querySelector(".js-navigation-open");if(e){if(t.detail.modifierKey)window.open(e.href,"_blank"),window.focus();else{e.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))&&e.click()}t.preventDefault()}else Xn(t)});const Yn=[];function $n(t,e){e||(e=t);const n=er(t)[0],r=e.closest(".js-navigation-item")||n;if(Wn(t),r instanceof HTMLElement){if(Qn(r,t))return;const e=qt(r);P(e,"app/assets/modules/github/navigation.js:495"),or(e,r)}}function Gn(t){const e=t.querySelectorAll(".js-navigation-item[aria-selected]");for(const n of e)n.classList.remove("navigation-focus"),n.setAttribute("aria-selected","false")}function Kn(t,e){const n=er(e),r=n.indexOf(t),o=n[r-1];if(o){if(Qn(o,e))return;const t=qt(o);P(t,"app/assets/modules/github/navigation.js:543"),"page"===nr(e)?rr(t,o):or(t,o)}}function Jn(t,e){const n=er(e),r=n.indexOf(t),o=n[r+1];if(o){if(Qn(o,e))return;const t=qt(o);P(t,"app/assets/modules/github/navigation.js:570"),"page"===nr(e)?rr(t,o):or(t,o)}}function Zn(t){it(t,"navigation:keyopen",{modifierKey:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})}function Qn(t,e){return!it(t,"navigation:focus")||(Gn(e),t.classList.add("navigation-focus"),t.setAttribute("aria-selected","true"),!1)}function tr(){return document.querySelector(".js-active-navigation-container")}function er(t){return Array.from(t.querySelectorAll(".js-navigation-item")).filter(Dn)}function nr(t){return t.getAttribute("data-navigation-scroll")||"item"}function rr(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r=Nt(e,t);r&&(r.bottom<=0?e.scrollIntoView({behavior:n,block:"start"}):r.top<=0&&e.scrollIntoView({behavior:n,block:"end"}))}function or(t,e){const n=Ft(e,t),r=Nt(e,t);if(null!=n&&null!=r)if(r.bottom<=0&&document.body){Sn(t,{top:(null!=t.offsetParent?t.scrollHeight:document.body.scrollHeight)-(n.bottom+r.height)})}else r.top<=0&&Sn(t,{top:n.top})}var ir=Object.freeze({activate:Wn,deactivate:Vn,push:function(t){const e=tr();e&&Yn.push(e),Wn(t)},pop:function(t){Vn(t),Gn(t);const e=Yn.pop();e&&Wn(e)},focus:$n,clear:Gn,refocus:function(t,e){Gn(t),$n(t,e)}});var ar=Object.freeze({formatNumber:function(t){return`${t}`.replace(/(^|[^\w.])(\d{4,})/g,(t,e,n)=>e+n.replace(/\d(?=(?:\d\d\d)+(?!\d))/g,"$&,"))},parseFormattedNumber:function(t){let e=t;return"string"==typeof e&&(e=e.replace(/,/g,"")),parseFloat(e)}});let sr=!1;const cr=new H;function lr(t){const e=t.target;if(e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE)for(const n of cr.matches(e))n.data.call(null,e)}function ur(t,e){sr||(sr=!0,document.addEventListener("focus",lr,!0)),cr.add(t,e),document.activeElement&&document.activeElement.matches(t)&&e(document.activeElement)}var fr=Object.freeze({onFocus:ur,onKey:function(t,e,n){function r(e){e.currentTarget.removeEventListener(t,n),e.currentTarget.removeEventListener("blur",r)}ur(e,function(e){e.addEventListener(t,n),e.addEventListener("blur",r)})},onInput:function(t,e){function n(t){t.currentTarget.removeEventListener("input",e),t.currentTarget.removeEventListener("blur",n)}ur(t,function(t){t.addEventListener("input",e),t.addEventListener("blur",n)})}});const dr=[];let hr,pr=0;function mr(){return hr}function vr(){try{return Math.min(Math.max(0,history.length)||0,9007199254740991)}catch(t){return 0}}function gr(){return vr()-1+pr}function br(t){hr=t;const e=location.href;dr[gr()]={url:e,state:hr},dr.length=vr(),window.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!1}))}function wr(){return(new Date).getTime()}function yr(t,e,n){pr=0;const r=Object.assign({},{_id:wr()},t);history.pushState(r,e,n),br(r)}function Er(t,e,n){const r=Object.assign({},{_id:mr()._id},t);history.replaceState(r,e,n),br(r)}hr=function(){const t={_id:(new Date).getTime()};return br(t),t}(),window.addEventListener("popstate",function(t){if(!t.state||!t.state._id)return;t.state._iddr.length){const t={_id:wr()};history.replaceState(t,"",location.href),br(t)}},!0);var kr=Object.freeze({getState:mr,pushState:yr,replaceState:Er,getBackURL:function(){const t=dr[gr()-1];if(t)return t.url},getForwardURL:function(){const t=dr[gr()+1];if(t)return t.url}});function _r(){}class Tr{constructor(){Xt(this,"previousReceiver",void 0),this.previousReceiver={resolve:_r,reject:_r}}push(t){return this.previousReceiver.resolve=this.previousReceiver.reject=_r,new Promise((e,n)=>{const r={resolve:e,reject:n};this.previousReceiver=r,t.then(function(){r.resolve.apply(this,arguments)},function(){r.reject.apply(this,arguments)})})}}var xr=Object.freeze({default:Tr});function Lr(t){const e=[];let n=t;for(;n&&(e.push(jr(n)),9!==n.nodeType&&!n.id);)n=n.parentNode;return e.reverse().join(" > ")}function jr(t){if(t===window)return"window";const e=[t.nodeName.toLowerCase()],n=t.id;if(n&&e.push(`#${n}`),"function"==typeof t.getAttribute&&t.getAttribute("class")){const n=(t.getAttribute("class")||"").trim().split(/\s+/).join(".");n&&e.push(`.${n}`)}return e.join("")}var Ar=Object.freeze({default:Lr});const Or=new WeakMap;function Mr(t,e){const n=function(t,e){const n=yt(t,"link[rel=pjax-prefetch]",HTMLLinkElement);for(const r of n)if(r.href===e)return r}(t,e);if(n){const t=Or.get(n);return n.remove(),Or.delete(n),t}}var Sr=Object.freeze({popPrefetchResponseForRequest:Mr,setPrefetchResponse:function(t,e){Or.set(t,e),e.catch(()=>{})}});const Cr={container:null,timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0},Dr=20;let Pr;const Hr=new Tr;function Rr(t,e,n){return t.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}function Ir(t){Br({url:t.url,container:t.container})}function Br(t){const e={url:"",container:null};Object.assign(e,Cr,t),P("string"==typeof e.url,"app/assets/modules/github/pjax.js:178"),e.requestUrl=e.url;const n=Wr(e.url),r=n.hash,o=e.container;P(o,"app/assets/modules/github/pjax.js:184");const i=Yr(o);"GET"===e.type&&(n.search+=`${n.search?"&":""}_pjax=${encodeURIComponent(i)}`,e.url=n.toString()),Pr||Er(Pr={id:zr(),url:window.location.href,title:document.title,container:i,fragment:e.fragment,timeout:e.timeout},Pr.title,Pr.url),Ir.options=e,P("string"==typeof e.requestUrl,"app/assets/modules/github/pjax.js:326");let a=Mr(o,e.requestUrl);var s,c;a||(P(e.url,"app/assets/modules/github/pjax.js:329"),a=te(e.url,{method:e.type,body:e.data,headers:{Accept:"text/html","X-PJAX":"true","X-PJAX-Container":i}}),"GET"===e.type&&"number"==typeof e.timeout&&e.timeout>0&&(a=Promise.race([a,new Promise((t,n)=>{setTimeout(()=>{Rr(o,"pjax:timeout")&&n(new Error("timeout"))},e.timeout)})]))),!0===e.push&&!0!==e.replace&&(s=Pr.id,c=Xr(o),Jr[s]=c,Qr.push(s),to(Zr,0),to(Qr,Dr),P("string"==typeof e.requestUrl,"app/assets/modules/github/pjax.js:357"),yr(null,"",e.requestUrl)),Rr(o,"pjax:start",{url:e.url}),Rr(o,"pjax:send"),Hr.push(a).then(async function(t){const n=Pr,a=function(){for(const t of document.getElementsByTagName("meta")){const e=t.getAttribute("http-equiv");if(e&&"X-PJAX-VERSION"===e.toUpperCase())return t.content}}(),s=t.headers.get("X-PJAX-Version"),c=function(t,e,n){P("string"==typeof n.requestUrl,"app/assets/modules/github/pjax.js:614");const r={url:Kr(e,n.requestUrl),title:""},o=/]*>([\s\S.]*)<\/head>/i),n=t.match(/]*>([\s\S.]*)<\/body>/i);i=e?Array.from(Gt(document,e[0]).childNodes):[],a=n?Array.from(Gt(document,n[0]).childNodes):[]}else i=a=Array.from(Gt(document,t).childNodes);if(0===a.length)return r;const s=$r(i,"title",HTMLTitleElement);let c;if(r.title=s.length>0?s[s.length-1].textContent:"",n.fragment){if("body"===n.fragment)c=a;else{const t=$r(a,n.fragment,Element);c=t.length>0?[t[0]]:[]}if(c.length&&("body"===n.fragment?r.contents=c:r.contents=c.reduce((t,e)=>t.concat(Array.from(e.childNodes)),[]),!r.title)){const t=c[0];t instanceof Element&&(r.title=t.getAttribute("title")||t.getAttribute("data-title")||"")}}else o||(r.contents=a);if(r.contents){r.contents=r.contents.filter(function(t){return!(t instanceof Element&&t.matches("title"))});for(const e of r.contents)if(e instanceof Element)for(const t of e.querySelectorAll("title"))t.remove();const t=$r(r.contents,"script[src]",HTMLScriptElement);for(const e of t)e.remove();r.scripts=t,P(r.contents,"app/assets/modules/github/pjax.js:706"),r.contents=r.contents.filter(e=>-1===t.indexOf(e))}return r.title&&(r.title=r.title.trim()),r}(await t.text(),t,e),l=c.contents,u=Wr(c.url);if(r&&(u.hash=r,c.url=u.href),a&&s&&a!==s)return void qr(c.url);if(!l)return void qr(c.url);Pr={id:null!=e.id?e.id:zr(),url:c.url,title:c.title,container:i,fragment:e.fragment,timeout:e.timeout},!0!==e.push&&!0!==e.replace||Er(Pr,c.title,c.url);const f=document.activeElement,d=null!=e.container&&e.container.contains(f);if(f&&d)try{f.blur()}catch(m){}c.title&&(document.title=c.title),Rr(o,"pjax:beforeReplace",{contents:l,state:Pr,previousState:n}),Gr(o,l);const h=yt(o,"input[autofocus], textarea[autofocus]").pop();h&&document.activeElement!==h&&h.focus(),function(t){if(!t)return;const e=yt(document,"script[src]",HTMLScriptElement);for(const n of t){const t=n.src;if(e.some(e=>e.src===t))return;const r=document.createElement("script"),o=n.getAttribute("type");o&&(r.type=o),r.src=t,document.head&&document.head.appendChild(r)}}(c.scripts);let p=e.scrollTo;if(r){const t=me(document,r);t&&(p=t.getBoundingClientRect().top+window.pageYOffset)}"number"==typeof p&&window.scrollTo(window.pageXOffset,p),Rr(o,"pjax:success"),Rr(o,"pjax:complete"),Rr(o,"pjax:end")},function(t){let n=e.requestUrl;P("string"==typeof n,"app/assets/modules/github/pjax.js:198"),t.response&&(n=Kr(t.response,n));const r=Rr(o,"pjax:error");"GET"===e.type&&r&&qr(n),Rr(o,"pjax:complete"),Rr(o,"pjax:end")})}function qr(t){P(Pr,"app/assets/modules/github/pjax.js:408"),Er(null,"",Pr.url),window.location.replace(t)}let Nr=!0;const Fr=window.location.href,Ur=window.history.state;function zr(){return(new Date).getTime()}function Xr(t){const e=t.cloneNode(!0);return[Yr(t),Array.from(e.childNodes)]}function Wr(t){const e=document.createElement("a");return e.href=t,e}function Vr(t){return t.href.replace(/#.*/,"")}function Yr(t){if(t.id)return`#${t.id}`;throw new Error("pjax container has no id")}function $r(t,e,n){let r=[];for(const o of t)o instanceof Element&&(o instanceof n&&o.matches(e)&&r.push(o),r=r.concat(yt(o,e,n)));return r}function Gr(t,e){t.innerHTML="";for(const n of e)null!=n&&t.appendChild(n)}function Kr(t,e){const n=t.headers.get("X-PJAX-URL");return n?((r=Wr(n)).search=r.search.replace(/([?&])(_pjax|_)=[^&]*/g,""),r.href.replace(/\?($|#)/,"$1")):e;var r}Ur&&Ur.container&&(Pr=Ur),"state"in window.history&&(Nr=!1);const Jr={},Zr=[],Qr=[];function to(t,e){for(;t.length>e;)delete Jr[t.shift()]}window.addEventListener("popstate",function(t){Nr||Hr.push(Promise.resolve(new Response));const e=Pr,n=t.state;let r;if(n&&n.container){if(Nr&&Fr===n.url)return;if(e){if(e.id===n.id)return;r=e.id-1&&Vr(n)===Vr(location))return;if(t.defaultPrevented)return;const r={url:n.href,container:null,target:n};Object.assign(r,e),Rr(n,"pjax:click",{options:r,relatedEvent:t})&&(Br(r),t.preventDefault(),Rr(n,"pjax:clicked",{options:r}))},submit:function(t,e){const n=t.currentTarget;P(n instanceof HTMLFormElement,"app/assets/modules/github/pjax.js:127");const r={type:(n.method||"GET").toUpperCase(),url:n.action,container:null,target:n};if(Object.assign(r,e),"GET"===r.type){if(n.querySelector("input[type=file]"))return;P("string"==typeof r.url,"app/assets/modules/github/pjax.js:143");const t=Wr(r.url);t.search+=(t.search?"&":"")+he(n),r.url=t.toString()}else r.data=new FormData(n);Br(r),t.preventDefault()},default:Ir,fetch:function(t,e){const n=t.closest("[data-pjax-container]");if(!n)throw new Error(`no pjax container for ${Lr(t)}`);const r=Yr(n),o=Wr(t.href);return o.search+=`${o.search?"&":""}_pjax=${encodeURIComponent(r)}`,te(o.href,{headers:Object.assign({Accept:"text/html","X-PJAX":"true","X-PJAX-Container":r},e&&e.headers)})},getState:function(){return Pr}});class PollIncludeFragmentElement extends IncludeFragmentElement{async fetch(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;const n=await super.fetch(t);return 202===n.status?(await new Promise(t=>setTimeout(t,e)),this.fetch(t,1.5*e)):n}}function no(t){const e=document.querySelector(".sso-modal");e&&(e.classList.remove("success","error"),t?e.classList.add("success"):e.classList.add("error"))}async function ro(){const t=wt(document,"link[rel=sso-modal]",HTMLLinkElement),e=await It({content:ne(document,t.href),dialogClass:"sso-modal"});let n=null;var r;if(window.external.ssoComplete=function(t){t.error?no(n=!1):(no(n=!0),function(t){const e=document.querySelector("meta[name=sso-expires-around]");e&&e.setAttribute("content",t)}(t.expiresAround),window.focus()),window.external.ssoComplete=null},await(r=e,new Promise(t=>{r.addEventListener("dialog:remove",t,{once:!0})})),!n)throw new Error("sso prompt canceled")}async function oo(){const t=document.querySelector("link[rel=sso-session]"),e=document.querySelector("meta[name=sso-expires-around]");if(!(t instanceof HTMLLinkElement))return!0;if(!function(t){if(!(t instanceof HTMLMetaElement))return!0;const e=parseInt(t.content);return(new Date).getTime()/1e3>e}(e))return!0;const n=t.href,r=await te(n,{headers:{Accept:"application/json"}});return await r.json()}window.customElements.get("poll-include-fragment")||(window.PollIncludeFragmentElement=PollIncludeFragmentElement,window.customElements.define("poll-include-fragment",PollIncludeFragmentElement)),un(".js-sso-modal-complete",function(t){if(window.opener&&window.opener.external.ssoComplete){const e=t.getAttribute("data-error"),n=t.getAttribute("data-expires-around");window.opener.external.ssoComplete({error:e,expiresAround:n}),window.close()}else{const e=t.getAttribute("data-fallback-url");window.location=e}});let io=null;function ao(){io=null}async function so(){await oo()||(io||(io=ro().then(ao).catch(ao)),await io)}var co=Object.freeze({default:so});class lo extends Error{constructor(t,e){super(t),Xt(this,"response",void 0),this.response=e}}function uo(){let t,e;const n=new Promise(function(n,r){t=n,e=r});return P("function"==typeof t,"app/assets/modules/github/remote-form.js:26"),P("function"==typeof e,"app/assets/modules/github/remote-form.js:27"),[n,t,e]}let fo;const ho=[];function po(t,e){fo||(fo=new H,document.addEventListener("submit",mo)),fo.add(t,e)}function mo(t){if(!(t.target instanceof HTMLFormElement))return;const e=t.target,n=fo&&fo.matches(e);if(!n||0===n.length)return;const r=function(t){const e={method:t.method||"GET",url:t.action,headers:new Headers({"X-Requested-With":"XMLHttpRequest"}),body:null};if("GET"===e.method.toUpperCase()){const n=he(t);n&&(e.url+=(~e.url.indexOf("?")?"&":"?")+n)}else e.body=new FormData(t);return e}(e),o=Wt(uo(),3),i=o[0],a=o[1],s=o[2];t.preventDefault(),async function(t,e,n,r){let o=!1;for(const i of t){const t=uo(),a=Wt(t,2),s=a[0],c=a[1],l=()=>(o=!0,c(),r),u={text:l,json:()=>(n.headers.set("Accept","application/json"),l()),html:()=>(n.headers.set("Accept","text/html"),l())};await Promise.race([s,i.data.call(null,e,u,n)])}return o}(n,e,r,i).then(t=>{t?async function(t){await so();const e=await window.fetch(t.url,{method:t.method,body:null!==t.body?t.body:void 0,headers:t.headers,credentials:"same-origin"}),n={url:e.url,status:e.status,statusText:e.statusText,headers:e.headers,text:"",get json(){const t=JSON.parse(this.text);return delete this.json,this.json=t,this.json},get html(){$t(Vt(document),this);const t=Gt(document,this.text);return delete this.html,this.html=t,this.html}},r=await e.text();if(n.text=r,n.status<300)return n;throw new lo("request failed",n)}(r).then(a,s).catch(()=>{}).then(()=>{for(const t of ho)t(e)}):e.submit()},t=>{e.submit(),setTimeout(()=>{throw t})})}var vo=Object.freeze({afterRemote:function(t){ho.push(t)},remoteForm:po,remoteUninstall:function(t,e){fo&&fo.remove(t,e)}});const go=new WeakMap;async function bo(t){const e=t.currentTarget;P(e instanceof Element,"app/assets/modules/github/select-menu/loading.js:40"),e.classList.remove("js-load-contents"),e.classList.add("is-loading"),e.classList.remove("has-error");const n=Et(e,"data-contents-url"),r=new URL(n,window.location.origin),o=go.get(e);if(o){const t=new URLSearchParams(r.search.slice(1));for(const e of o)t.append(e[0],e[1]);r.search=t.toString()}const i=e.querySelector(".js-select-menu-deferred-content");let a;try{await so(),a=i?await ee(r):await oe(r)}catch(s){return void e.classList.add("has-error")}finally{e.classList.remove("is-loading")}i?i.innerHTML=a:it(e,"selectmenu:data",{data:a}),(e.classList.contains("active")||e.hasAttribute("open"))&&it(e,"selectmenu:load")}un(".js-select-menu.js-load-contents",{add(t){t.addEventListener("mouseenter",bo),t.addEventListener("menu:activate",bo)},remove(t){t.removeEventListener("mouseenter",bo),t.removeEventListener("menu:activate",bo)}});var wo=Object.freeze({setLoadingData:function(t,e){go.set(t,e)}});var yo=Object.freeze({getItem:function(t){try{return sessionStorage.getItem(t)}catch(e){return}},setItem:function(t,e){try{sessionStorage.setItem(t,e)}catch(n){}},removeItem:function(t){try{sessionStorage.removeItem(t)}catch(e){}}});let Eo=!1;async function ko(){if(Eo)return!1;Eo=!0;let t=!1;const e=await async function(){const t=document.body;P(t,"app/assets/modules/github/sudo.js:15");const e=wt(document,"link[rel=sudo-modal]",HTMLLinkElement),n=document.querySelector(".js-sudo-prompt");if(n instanceof HTMLTemplateElement)return n;if(e){const n=await ne(document,e.href);return t.appendChild(n),wt(document,".js-sudo-prompt",HTMLTemplateElement)}throw new Error("couldn't load sudo prompt")}(),n=await It({content:e.content.cloneNode(!0)});return po(".js-sudo-form",async function(e,n){try{await n.text()}catch(r){if(!r.response)throw r;let t;switch(r.response.status){case 401:t="Incorrect password.";break;case 429:t="Too many password attempts. Please wait and try again later.";break;default:t="Failed to receive a response. Please try again later."}return wt(e,".js-sudo-error").textContent=t,wt(e,".js-sudo-error").hidden=!1,void(wt(e,".js-sudo-password",HTMLInputElement).value="")}t=!0,bt(e,"details").removeAttribute("open")}),await new Promise(t=>{n.addEventListener("dialog:remove",function(){Eo=!1,t()},{once:!0})}),t}var _o=Object.freeze({default:async function(t){const e="low"===(n=t)||"medium"===n||"high"===n||"two_factor"===n?n:null;var n;return P(e,"app/assets/modules/github/sudo.js:85"),await oe(`/sessions/in_sudo.json?requested_access_level=${e}`)||await ko()}}),To=-1/0,xo=1/0,Lo=-.005,jo=-.005,Ao=-.01,Oo=1,Mo=.9,So=.8,Co=.7,Do=.6;function Po(t){return t.toUpperCase()===t}function Ho(t,e,n,r){for(var o=t.length,i=e.length,a=t.toLowerCase(),s=e.toLowerCase(),c=function(t){for(var e,n=t.length,r=new Array(n),o="/",i=0;i1024)return To;var o=new Array(n),i=new Array(n);return Ho(t,e,o,i),i[n-1][r-1]},positions:function(t,e){var n=t.length,r=e.length,o=new Array(n);if(!n||!r)return o;if(n===r){for(var i=0;i1024)return o;var a=new Array(n),s=new Array(n);Ho(t,e,a,s);for(var c=!1,l=(i=n-1,r-1);i>=0;i--)for(;l>=0;l--)if(a[i][l]!==To&&(c||a[i][l]===s[i][l])){c=i&&l&&s[i][l]===a[i-1][l-1]+Oo,o[i]=l--;break}return o},hasMatch:function(t,e){t=t.toLowerCase(),e=e.toLowerCase();for(var n=t.length,r=0,o=0;r{t.innerHTML="";let r=0;for(const o of Ro.positions(e,n)){""!==n.slice(r,o)&&t.appendChild(document.createTextNode(n.slice(r,o))),r=o+1;const e=document.createElement("mark");e.textContent=n[o],t.appendChild(e)}t.appendChild(document.createTextNode(n.slice(r)))},Bo=new WeakMap,qo=new WeakMap,No=t=>{if(!qo.has(t)&&t instanceof HTMLElement){const e=t.getAttribute("data-value")||t.textContent||"";return qo.set(t,e),e}return qo.get(t)||""};class FuzzyListElement extends HTMLElement{connectedCallback(){const t=this.querySelector("ul");if(!(t instanceof HTMLUListElement))return;const e=new Set(t.querySelectorAll("li")),n=new MutationObserver(t=>{let n=!1;for(const r of t)if("childList"===r.type&&r.addedNodes.length)for(const t of r.addedNodes)n=n||!e.has(t),e.add(t);n&&this.sort()});n.observe(t,{childList:!0});const r={handler:n,items:e,timer:null};Bo.set(this,r)}disconnectedCallback(){const t=Bo.get(this);t&&(t.handler.disconnect(),Bo.delete(this))}sort(){const t=this.threshold,e=this.mark,n=this.limit,r=this.value;if(!r)return;const o=Bo.get(this);if(!o)return;if(!this.dispatchEvent(new CustomEvent("fuzzy-list-will-sort",{cancelable:!0,detail:r})))return;const i=o.items,a=this.hasAttribute("data-mark"),s=[];for(const c of i){const e=No(c);if(!Ro.hasMatch(r,e))continue;const n=Ro.score(r,e);ne.score-t.score).splice(n),requestAnimationFrame(()=>{const t=this.querySelector("ul");if(!(t instanceof HTMLUListElement))return;t.innerHTML="";const n=document.createDocumentFragment();for(const o of s){const t=o.item;a&&t instanceof HTMLElement&&Io(e&&t.querySelector(e)||t,a?r:"",No(t)),n.appendChild(t)}t.appendChild(n),this.dispatchEvent(new CustomEvent("fuzzy-list-sorted",{detail:s.length}))})}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get mark(){return this.getAttribute("data-mark")||""}set mark(t){t?this.setAttribute("data-mark",!0===t?"":t):this.removeAttribute("data-mark")}get threshold(){return Number(this.getAttribute("data-threshold")||0)}set threshold(t){Number.isNaN(t)||this.setAttribute("data-threshold",String(t))}get limit(){return Number(this.getAttribute("data-limit")||1/0)}set limit(t){Number.isNaN(t)||this.setAttribute("data-limit",String(t))}static get observedAttributes(){return["value","data-mark","data-threshold","data-limit"]}attributeChangedCallback(t,e,n){if(e===n)return;const r=Bo.get(this);r&&(r.timer&&clearTimeout(r.timer),r.timer=setTimeout(()=>this.sort(),100))}}window.customElements.get("fuzzy-list")||(window.FuzzyListElement=FuzzyListElement,window.customElements.define("fuzzy-list",FuzzyListElement));var Fo=new WeakMap,Uo=null;function zo(t,e){return t.closest("task-lists")===e.closest("task-lists")}function Xo(t){if(t.currentTarget===t.target){var e=t.currentTarget;if(e instanceof Element){var n=e.closest(".contains-task-list");if(n&&(e.classList.add("is-ghost"),t.dataTransfer&&t.dataTransfer.setData("text/plain",e.textContent.trim()),e.parentElement)){var r=Array.from(e.parentElement.children),o=r.indexOf(e),i=Fo.get(e);i&&i.sortStarted(n),Uo={didDrop:!1,dragging:e,dropzone:e,sourceList:n,sourceSibling:r[o+1]||null,sourceIndex:o}}}}}function Wo(t){if(Uo){var e=t.currentTarget;e instanceof Element&&(zo(Uo.dragging,e)?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),Uo.dropzone!==e&&(Uo.dragging.classList.add("is-dragging"),Uo.dropzone=e,!function(t,e){if(t.parentNode===e.parentNode)for(var n=t;n;){if(n===e)return!0;n=n.previousElementSibling}return!1}(Uo.dragging,e)?e.after(Uo.dragging):e.before(Uo.dragging))):t.stopPropagation())}}function Vo(t){if(Uo){t.preventDefault(),t.stopPropagation();var e=t.currentTarget;if(e instanceof Element&&(Uo.didDrop=!0,Uo.dragging.parentElement)){var n=Array.from(Uo.dragging.parentElement.children).indexOf(Uo.dragging),r=e.closest(".contains-task-list");if(r&&(Uo.sourceIndex!==n||Uo.sourceList!==r)){Uo.sourceList===r&&Uo.sourceIndex\n \n ';var ni=new WeakMap;function ri(t){if(!ni.get(t)){ni.set(t,!0);var e=t.closest("task-lists");if(e instanceof ti&&!(e.querySelectorAll(".task-list-item").length<=1)){var n=ei.content.cloneNode(!0),r=n.querySelector(".handle");if(t.prepend(n),!r)throw new Error("handle not found");r.addEventListener("mouseenter",mi),r.addEventListener("mouseleave",vi),function(t,e,n){Fo.set(t,{sortStarted:e,sortFinished:n}),t.addEventListener("dragstart",Xo),t.addEventListener("dragenter",Wo),t.addEventListener("dragend",Yo),t.addEventListener("drop",Vo),t.addEventListener("dragover",$o)}(t,hi,pi),t.addEventListener("mouseenter",oi),t.addEventListener("mouseleave",ii)}}}function oi(t){var e=t.currentTarget;if(e instanceof Element){var n=e.closest("task-lists");n instanceof ti&&n.sortable&&!n.disabled&&e.classList.add("hovered")}}function ii(t){var e=t.currentTarget;e instanceof Element&&e.classList.remove("hovered")}function ai(t){var e=si(t);if(!e)throw new Error(".contains-task-list not found");var n=Array.from(e.children).indexOf(t.closest(".task-list-item"));return[fi(e),n]}function si(t){var e=t.parentElement;return e?e.closest(".contains-task-list"):null}function ci(t){return si(t)===function t(e){var n=si(e);return n?t(n)||n:null}(t)}function li(t){var e=t.querySelectorAll(".contains-task-list > .task-list-item"),n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;ci(s)&&ri(s)}}catch(c){r=!0,o=c}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}ui(t)}function ui(t){var e=!0,n=!1,r=void 0;try{for(var o,i=t.querySelectorAll(".task-list-item")[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){o.value.classList.toggle("enabled",!t.disabled)}}catch(d){n=!0,r=d}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}var a=!0,s=!1,c=void 0;try{for(var l,u=t.querySelectorAll(".task-list-item-checkbox")[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var f=l.value;f instanceof HTMLInputElement&&(f.disabled=t.disabled)}}catch(d){s=!0,c=d}finally{try{!a&&u.return&&u.return()}finally{if(s)throw c}}}function fi(t){var e=t.closest("task-lists");if(!e)throw new Error("parent not found");return Array.from(e.querySelectorAll("ol, ul")).indexOf(t)}var di=new WeakMap;function hi(t){var e=t.closest("task-lists");if(!e)throw new Error("parent not found");di.set(e,Array.from(e.querySelectorAll("ol, ul")))}function pi(t){var e=t.src,n=t.dst,r=e.list.closest("task-lists");if(r){var o=di.get(r);o&&(di.delete(r),r.dispatchEvent(new CustomEvent("task-lists:move",{bubbles:!0,detail:{src:[o.indexOf(e.list),e.index],dst:[o.indexOf(n.list),n.index]}})))}}function mi(t){var e=t.currentTarget;if(e instanceof Element){var n=e.closest(".task-list-item");if(n){var r=n.closest("task-lists");r instanceof ti&&r.sortable&&!r.disabled&&n.setAttribute("draggable","true")}}}function vi(t){if(!Uo){var e=t.currentTarget;if(e instanceof Element){var n=e.closest(".task-list-item");n&&n.setAttribute("draggable","false")}}}function gi(t){if(t.querySelector(".js-task-list-field"))for(const e of yt(t,"task-lists",ti))e.disabled=!1}function bi(t,e,n){const r=wt(t,".js-comment-update",HTMLFormElement);!function(t){for(const e of yt(t,"task-lists",ti))e.disabled=!0}(t);const o=r.elements.namedItem("task_list_track");o&&o.remove();const i=r.elements.namedItem("task_list_operation");i&&i.remove();const a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","task_list_track"),a.setAttribute("value",e),r.appendChild(a);const s=document.createElement("input");if(s.setAttribute("type","hidden"),s.setAttribute("name","task_list_operation"),s.setAttribute("value",JSON.stringify(n)),r.appendChild(s),!r.elements.namedItem("task_list_key")){const t=Et(wt(r,".js-task-list-field"),"name").split("[")[0],e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","task_list_key"),e.setAttribute("value",t),r.appendChild(e)}t.classList.remove("is-comment-stale"),fe(r)}window.customElements.get("task-lists")||(window.TaskListsElement=ti,window.customElements.define("task-lists",ti)),un(".js-task-list-container .js-task-list-field",function(t){gi(bt(t,".js-task-list-container"))}),ot("task-lists:move","task-lists",function(t){P(t instanceof CustomEvent,"app/assets/modules/github/task-list.js:68");const e=t.detail,n=e.src,r=e.dst;bi(bt(t.currentTarget,".js-task-list-container"),"reordered",{operation:"move",src:n,dst:r})}),ot("task-lists:check","task-lists",function(t){P(t instanceof CustomEvent,"app/assets/modules/github/task-list.js:75");const e=t.detail,n=e.position,r=e.checked;bi(bt(t.currentTarget,".js-task-list-container"),`checked:${r?1:0}`,{operation:"check",position:n,checked:r})}),po(".js-task-list-container .js-comment-update",async function(t,e){const n=bt(t,".js-task-list-container"),r=t.elements.namedItem("task_list_track");r&&r.remove();const o=t.elements.namedItem("task_list_operation");let i;o&&o.remove();try{i=await e.json()}catch(a){let t;try{t=JSON.parse(a.response.text)}catch(s){}if(t&&t.stale){const e=t.updated_markdown,r=t.updated_html,o=t.version;if(e&&r&&o){const t=wt(n,".js-comment-body"),i=wt(n,".js-body-version"),a=wt(n,".js-task-list-field",HTMLTextAreaElement);t.innerHTML=r,a.value=e,n.setAttribute("data-body-version",o),i instanceof HTMLInputElement&&(i.value=o)}}else window.location.reload()}i&&(o&&i.json.source&&(wt(n,".js-task-list-field",HTMLTextAreaElement).value=i.json.source),gi(n))});var wi=Object.freeze({enableTaskList:gi});function yi(t){return t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1}))}var Ei=Object.freeze({getUtf8StringLength:function(t){const e=t.split("‍");let n=0;for(const r of e)n+=Array.from(r.split(/[\ufe00-\ufe0f]/).join("")).length;return n/e.length},replaceText:function(t,e,n){let r=t.value.substring(0,t.selectionEnd),o=t.value.substring(t.selectionEnd);r=r.replace(e,n),o=o.replace(e,n),t.value=r+o,t.selectionStart=r.length,t.selectionEnd=r.length,yi(t)},insertText:function(t,e){const n=t.selectionEnd,r=t.value.substring(0,n),o=t.value.substring(n),i=""===t.value||r.match(/\n$/)?"":"\n";t.value=r+i+e+o,t.selectionStart=n+e.length,t.selectionEnd=n+e.length,yi(t),t.focus()}});const ki=new WeakMap;function _i(t){const e=ki.get(t);P(e,"app/assets/modules/github/throttled-input.js:24"),null!=e.timer&&clearTimeout(e.timer),e.timer=setTimeout(()=>{null!=e.timer&&(e.timer=null),e.inputed=!1,e.listener.call(null,t)},e.wait)}function Ti(t){const e=ki.get(t.currentTarget);P(e,"app/assets/modules/github/throttled-input.js:36"),e.keypressed=!0,null!=e.timer&&clearTimeout(e.timer)}function xi(t){const e=ki.get(t.currentTarget);P(e,"app/assets/modules/github/throttled-input.js:45"),P(t.currentTarget instanceof HTMLInputElement||t.currentTarget instanceof HTMLTextAreaElement,"app/assets/modules/github/throttled-input.js:46"),e.keypressed=!1,e.inputed&&_i(t.currentTarget)}function Li(t){const e=ki.get(t.currentTarget);P(e,"app/assets/modules/github/throttled-input.js:55"),P(t.currentTarget instanceof HTMLInputElement||t.currentTarget instanceof HTMLTextAreaElement,"app/assets/modules/github/throttled-input.js:56"),e.inputed=!0,e.keypressed||_i(t.currentTarget)}var ji=Object.freeze({addThrottledInputEventListener:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ki.set(t,{keypressed:!1,inputed:!1,timer:void 0,listener:e,wait:null!=n.wait?n.wait:100}),t.addEventListener("keydown",Ti),t.addEventListener("keyup",xi),t.addEventListener("input",Li)},removeThrottledInputEventListener:function(t,e){t.removeEventListener("keydown",Ti),t.removeEventListener("keyup",xi),t.removeEventListener("input",Li);const n=ki.get(t);n&&(null!=n.timer&&n.listener===e&&clearTimeout(n.timer),ki.delete(t))},dispatchThrottledInputEvent:function(t){const e=ki.get(t);e&&e.listener.call(null,t)}});function Ai(t,e){return Oi(Mi(t),e)}function Oi(t,e){var n=t;if(!n)return Promise.resolve(e());var r=n.ownerDocument.documentElement;var o=function(t){for(var e=[];t;){var n=t.getBoundingClientRect(),r=n.top,o=n.left;e.push({element:t,top:r,left:o}),t=t.parentElement}return e}(n);return Promise.resolve(e()).then(function(t){var e=function(t){for(var e=0;e2&&void 0!==arguments[2]&&arguments[2];return Ai(document,()=>{const r=Gt(document,e.trim()),o=n&&t===t.ownerDocument.activeElement?r.querySelector("*"):null;t.replaceWith(r),o&&o.focus()})}var Pi=Object.freeze({updateContent:async function(t){if(Ci.get(t))return;const e=new XMLHttpRequest,n=Et(t,"data-url"),r=t.hasAttribute("data-retain-focus");e.open("GET",n),e.setRequestHeader("Accept","text/html"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Ci.set(t,e);try{const n=await function(t,e){return new Promise((n,r)=>{t.onload=(()=>{200===t.status?n(t.responseText):r(new Error(`XMLHttpRequest ${t.statusText}`))}),t.onerror=r,t.send(e||null)})}(e);if(ye(t,r))throw new Error("element had interactions");return Di(t,n,r)}catch(o){"XMLHttpRequest abort"!==o.message&&console.warn("Failed to update content",t,o)}finally{Ci.delete(t)}},replaceContent:async function(t,e){const n=Ci.get(t);return n&&n.abort(),Di(t,e)}}),Hi=m(function(t){var e;e=function(){if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,r,o,i,a,s,c,l,u,f,d,h,p,m,v,g,b,w,y,E,k={},_=/\s+/g,T=/left|right|inline/,x="Sortable"+(new Date).getTime(),L=window,j=L.document,A=L.parseInt,O=L.setTimeout,M=L.jQuery||L.Zepto,S=L.Polymer,C=!1,D="draggable"in j.createElement("div"),P=!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie)/i)&&((E=j.createElement("x")).style.cssText="pointer-events:auto","auto"===E.style.pointerEvents),H=!1,R=Math.abs,I=Math.min,B=[],q=[],N=function(){return!1},F=it(function(t,e,n){if(n&&e.scroll){var r,o,i,a,s,f,d=n[x],h=e.scrollSensitivity,p=e.scrollSpeed,m=t.clientX,v=t.clientY,g=window.innerWidth,b=window.innerHeight;if(l!==n&&(c=e.scroll,l=n,u=e.scrollFn,!0===c)){c=n;do{if(c.offsetWidth-1:o==t)}:N}var n={},r=t.group;r&&"object"==typeof r||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n};try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){C={capture:!1,passive:!1}}}))}catch(lt){}function z(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=at({},e),t[x]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==z.supportPointer};for(var r in n)!(r in e)&&(e[r]=n[r]);for(var o in U(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&D,Y(t,"mousedown",this._onTapStart),Y(t,"touchstart",this._onTapStart),e.supportPointer&&Y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Y(t,"dragover",this),Y(t,"dragenter",this)),q.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function X(e,n){"clone"!==e.lastPullMode&&(n=!0),o&&o.state!==n&&(K(o,"display",n?"none":""),n||o.state&&(e.options.group.revertClone?(i.insertBefore(o,a),e._animate(t,o)):i.insertBefore(o,t)),o.state=n)}function W(t,e,n){if(t){n=n||j;do{if(">*"===e&&t.parentNode===n||ot(t,e))return t}while(t=V(t))}return null}function V(t){var e=t.host;return e&&e.nodeType?e:t.parentNode}function Y(t,e,n){t.addEventListener(e,n,C)}function $(t,e,n){t.removeEventListener(e,n,C)}function G(t,e,n){if(t)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(_," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(_," ")}}function K(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return j.defaultView&&j.defaultView.getComputedStyle?n=j.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function J(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o*"!==e&&!ot(t,e)||n++;return n}function ot(t,e){if(t){var n=(e=e.split(".")).shift().toUpperCase(),r=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");return!(""!==n&&t.nodeName.toUpperCase()!=n||e.length&&((" "+t.className+" ").match(r)||[]).length!=e.length)}return!1}function it(t,e){var n,r;return function(){void 0===n&&(n=arguments,r=this,O(function(){1===n.length?t.call(r,n[0]):t.apply(r,n),n=void 0},e))}}function at(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function st(t){return O(t,0)}function ct(t){return clearTimeout(t)}return z.prototype={constructor:z,_onTapStart:function(e){var n,r=this,o=this.el,i=this.options,a=i.preventOnFilter,c=e.type,l=e.touches&&e.touches[0],u=(l||e).target,f=e.target.shadowRoot&&e.path&&e.path[0]||u,d=i.filter;if(function(t){B.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&B.push(r)}}(o),!t&&!(/mousedown|pointerdown/.test(c)&&0!==e.button||i.disabled)&&!f.isContentEditable&&(u=W(u,i.draggable,o))&&s!==u){if(n=rt(u,i.draggable),"function"==typeof d){if(d.call(this,e,u,this))return Z(r,f,"filter",u,o,o,n),void(a&&e.preventDefault())}else if(d&&(d=d.split(",").some(function(t){if(t=W(f,t.trim(),o))return Z(r,t,"filter",u,o,o,n),!0})))return void(a&&e.preventDefault());i.handle&&!W(f,i.handle,o)||this._prepareDragStart(e,l,u,n)}},_prepareDragStart:function(r,o,c,l){var u,f=this,d=f.el,h=f.options,m=d.ownerDocument;c&&!t&&c.parentNode===d&&(b=r,i=d,t=c,h.handleReplacedDragElement&&(e=c.getAttribute("id")),n=t.parentNode,a=t.nextSibling,s=c,v=h.group,p=l,this._lastX=(o||r).clientX,this._lastY=(o||r).clientY,t.style["will-change"]="all",u=function(){f._disableDelayedDrag(),t.draggable=f.nativeDraggable,G(t,h.chosenClass,!0),f._triggerDragStart(r,o),Z(f,i,"choose",t,i,i,p)},h.ignore.split(",").forEach(function(e){J(t,e.trim(),tt)}),Y(m,"mouseup",f._onDrop),Y(m,"touchend",f._onDrop),Y(m,"touchcancel",f._onDrop),Y(m,"selectstart",f),h.supportPointer&&Y(m,"pointercancel",f._onDrop),h.delay?(Y(m,"mouseup",f._disableDelayedDrag),Y(m,"touchend",f._disableDelayedDrag),Y(m,"touchcancel",f._disableDelayedDrag),Y(m,"mousemove",f._disableDelayedDrag),Y(m,"touchmove",f._disableDelayedDrag),h.supportPointer&&Y(m,"pointermove",f._disableDelayedDrag),f._dragStartTimer=O(u,h.delay)):u())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),$(t,"mouseup",this._disableDelayedDrag),$(t,"touchend",this._disableDelayedDrag),$(t,"touchcancel",this._disableDelayedDrag),$(t,"mousemove",this._disableDelayedDrag),$(t,"touchmove",this._disableDelayedDrag),$(t,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(e,n){(n=n||("touch"==e.pointerType?e:null))?(b={target:t,clientX:n.clientX,clientY:n.clientY},this._onDragStart(b,"touch")):this.nativeDraggable?(Y(t,"dragend",this),Y(i,"dragstart",this._onDragStart)):this._onDragStart(b,!0);try{j.selection?st(function(){j.selection.empty()}):window.getSelection().removeAllRanges()}catch(lt){}},_dragStarted:function(){if(i&&t){var e=this.options;G(t,e.ghostClass,!0),G(t,e.dragClass,!1),z.active=this,Z(this,i,"start",t,i,i,p)}else this._nulling()},_emulateDragOver:function(){if(w){if(this._lastX===w.clientX&&this._lastY===w.clientY)return;this._lastX=w.clientX,this._lastY=w.clientY,P||K(r,"display","none");var t=j.elementFromPoint(w.clientX,w.clientY),e=t,n=q.length;if(t&&t.shadowRoot&&(e=t=t.shadowRoot.elementFromPoint(w.clientX,w.clientY)),e)do{if(e[x]){for(;n--;)q[n]({clientX:w.clientX,clientY:w.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);P||K(r,"display","")}},_onTouchMove:function(t){if(b){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,a=i.clientX-b.clientX+o.x,s=i.clientY-b.clientY+o.y,c=t.touches?"translate3d("+a+"px,"+s+"px,0)":"translate("+a+"px,"+s+"px)";if(!z.active){if(n&&I(R(i.clientX-this._lastX),R(i.clientY-this._lastY))5||e.clientX-(n.left+n.width)>5}(m,s)){if(0!==m.children.length&&m.children[0]!==r&&m===s.target&&(c=m.lastElementChild),c){if(c.animated)return;u=c.getBoundingClientRect()}X(E,k),!1!==Q(i,m,t,l,c,u,s)&&(t.contains(m)||(m.appendChild(t),n=m),this._animate(l,t),c&&this._animate(u,c))}else if(c&&!c.animated&&c!==t&&void 0!==c.parentNode[x]){f!==c&&(f=c,d=K(c),h=K(c.parentNode));var A=(u=c.getBoundingClientRect()).right-u.left,M=u.bottom-u.top,S=T.test(d.cssFloat+d.display)||"flex"==h.display&&0===h["flex-direction"].indexOf("row"),C=c.offsetWidth>t.offsetWidth,D=c.offsetHeight>t.offsetHeight,P=(S?(s.clientX-u.left)/A:(s.clientY-u.top)/M)>.5,R=c.nextElementSibling,I=!1;if(S){var B=t.offsetTop,q=c.offsetTop;I=B===q?c.previousElementSibling===t&&!C||P&&C:c.previousElementSibling===t||t.previousElementSibling===c?(s.clientY-u.top)/M>.5:q>B}else _||(I=R!==t&&!D||P&&D);var N=Q(i,m,t,l,c,u,s,I);!1!==N&&(1!==N&&-1!==N||(I=1===N),H=!0,O(et,30),X(E,k),t.contains(m)||(I&&!R?m.appendChild(t):c.parentNode.insertBefore(t,I?R:c)),n=t.parentNode,this._animate(l,t),this._animate(u,c))}}},_animate:function(t,e){var n=this.options.animation;if(n){var r=e.getBoundingClientRect();1===t.nodeType&&(t=t.getBoundingClientRect()),K(e,"transition","none"),K(e,"transform","translate3d("+(t.left-r.left)+"px,"+(t.top-r.top)+"px,0)"),e.offsetWidth,K(e,"transition","all "+n+"ms"),K(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=O(function(){K(e,"transition",""),K(e,"transform",""),e.animated=!1},n)}},_offUpEvents:function(){var t=this.el.ownerDocument;$(j,"touchmove",this._onTouchMove),$(j,"pointermove",this._onTouchMove),$(t,"mouseup",this._onDrop),$(t,"touchend",this._onDrop),$(t,"pointerup",this._onDrop),$(t,"touchcancel",this._onDrop),$(t,"pointercancel",this._onDrop),$(t,"selectstart",this)},_onDrop:function(e){var s=this.el,c=this.options;clearInterval(this._loopId),clearInterval(k.pid),clearTimeout(this._dragStartTimer),ct(this._cloneId),ct(this._dragStartId),$(j,"mouseover",this),$(j,"mousemove",this._onTouchMove),this.nativeDraggable&&($(j,"drop",this),$(s,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(y&&(e.preventDefault(),!c.dropBubble&&e.stopPropagation()),r&&r.parentNode&&r.parentNode.removeChild(r),i!==n&&"clone"===z.active.lastPullMode||o&&o.parentNode&&o.parentNode.removeChild(o),t&&(this.nativeDraggable&&$(t,"dragend",this),tt(t),t.style["will-change"]="",G(t,this.options.ghostClass,!1),G(t,this.options.chosenClass,!1),Z(this,i,"unchoose",t,n,i,p),i!==n?(m=rt(t,c.draggable))>=0&&(Z(null,n,"add",t,n,i,p,m),Z(this,i,"remove",t,n,i,p,m),Z(null,n,"sort",t,n,i,p,m),Z(this,i,"sort",t,n,i,p,m)):t.nextSibling!==a&&(m=rt(t,c.draggable))>=0&&(Z(this,i,"update",t,n,i,p,m),Z(this,i,"sort",t,n,i,p,m)),z.active&&(null!=m&&-1!==m||(m=p),Z(this,i,"end",t,n,i,p,m),this.save()))),this._nulling()},_nulling:function(){i=t=n=r=a=o=s=c=l=b=w=y=m=f=d=g=v=z.active=null,B.forEach(function(t){t.checked=!0}),B.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragover":case"dragenter":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.preventDefault()}(e));break;case"mouseover":this._onDrop(e);break;case"selectstart":e.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r=200&&t.status<300?e(t.responseText):n(new Error(t.responseText))},t.onerror=n,t.send()})}(e);return o.then(r,r),o}(t,n)}var qi=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ni=function(){function t(t,e){for(var n=0;n=n&&i<=r})(t,e)||(t.scrollTop=e.offsetTop)}(this.results,t)}},{key:"onKeydown",value:function(t){switch(t.key){case"Escape":this.container.open&&(this.container.open=!1,t.stopPropagation(),t.preventDefault());break;case"ArrowDown":var e=this.sibling(!0);e&&this.select(e),t.preventDefault();break;case"ArrowUp":var n=this.sibling(!1);n&&this.select(n),t.preventDefault();break;case"n":if(Ui&&t.ctrlKey){var r=this.sibling(!0);r&&this.select(r),t.preventDefault()}break;case"p":if(Ui&&t.ctrlKey){var o=this.sibling(!1);o&&this.select(o),t.preventDefault()}break;case"Tab":var i=this.results.querySelector('[aria-selected="true"]');i&&this.commit(i);break;case"Enter":var a=this.results.querySelector('[aria-selected="true"]');a&&this.container.open&&(this.commit(a),t.preventDefault())}}},{key:"onInputFocus",value:function(){this.fetchResults()}},{key:"onInputBlur",value:function(){this.mouseDown||(this.container.open=!1)}},{key:"commit",value:function(t){if("true"!==t.getAttribute("aria-disabled")){if(t instanceof HTMLAnchorElement)return t.click(),void(this.container.open=!1);var e=t.getAttribute("data-autocomplete-value")||t.textContent;this.container.value=e,this.container.open=!1}}},{key:"onResultsClick",value:function(t){if(t.target instanceof Element){var e=t.target.closest('[role="option"]');e&&this.commit(e)}}},{key:"onResultsMouseDown",value:function(){var t=this;this.mouseDown=!0,this.results.addEventListener("mouseup",function(){return t.mouseDown=!1},{once:!0})}},{key:"onInputChange",value:function(){this.container.removeAttribute("value"),this.fetchResults()}},{key:"identifyOptions",value:function(){var t=0,e=!0,n=!1,r=void 0;try{for(var o,i=this.results.querySelectorAll('[role="option"]:not([id])')[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){o.value.id=this.results.id+"-option-"+t++}}catch(a){n=!0,r=a}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}}},{key:"fetchResults",value:function(){var t=this,e=this.input.value.trim();if(e){var n=this.container.src;if(n){var r=new URL(n,window.location.href),o=new URLSearchParams(r.search.slice(1));o.append("q",e),r.search=o.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),Bi(this.input,r.toString()).then(function(e){t.results.innerHTML=e,t.identifyOptions();var n=!!t.results.querySelector('[role="option"]');t.container.open=n,t.container.dispatchEvent(new CustomEvent("load")),t.container.dispatchEvent(new CustomEvent("loadend"))}).catch(function(){t.container.dispatchEvent(new CustomEvent("error")),t.container.dispatchEvent(new CustomEvent("loadend"))})}}else this.container.open=!1}},{key:"open",value:function(){this.results.hidden&&(this.results.hidden=!1,this.container.setAttribute("aria-expanded","true"),this.container.dispatchEvent(new CustomEvent("toggle",{detail:{input:this.input,results:this.results}})))}},{key:"close",value:function(){this.results.hidden||(this.results.hidden=!0,this.input.removeAttribute("aria-activedescendant"),this.container.setAttribute("aria-expanded","false"),this.container.dispatchEvent(new CustomEvent("toggle",{detail:{input:this.input,results:this.results}})))}}]),t}();function Xi(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(Xi.prototype,HTMLElement.prototype),Object.setPrototypeOf(Xi,HTMLElement);var Wi=new WeakMap,Vi=function(t){function AutocompleteElement(){return qi(this,AutocompleteElement),Fi(this,(AutocompleteElement.__proto__||Object.getPrototypeOf(AutocompleteElement)).call(this))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(AutocompleteElement,Xi),Ni(AutocompleteElement,[{key:"connectedCallback",value:function(){var t=this.getAttribute("aria-owns");if(t){var e=this.querySelector("input"),n=document.getElementById(t);e instanceof HTMLInputElement&&n&&(Wi.set(this,new zi(this,e,n)),this.setAttribute("role","combobox"),this.setAttribute("aria-haspopup","listbox"),this.setAttribute("aria-expanded","false"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-controls",t),n.setAttribute("role","listbox"))}}},{key:"disconnectedCallback",value:function(){var t=Wi.get(this);t&&(t.destroy(),Wi.delete(this))}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n){var r=Wi.get(this);if(r)switch(t){case"open":null===n?r.close():r.open();break;case"value":null!==n&&(r.input.value=n),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}}}},{key:"src",get:function(){return this.getAttribute("src")||""},set:function(t){this.setAttribute("src",t)}},{key:"value",get:function(){return this.getAttribute("value")||""},set:function(t){this.setAttribute("value",t)}},{key:"open",get:function(){return this.hasAttribute("open")},set:function(t){t?this.setAttribute("open",""):this.removeAttribute("open")}}],[{key:"observedAttributes",get:function(){return["open","value"]}}]),AutocompleteElement}();function Yi(t){return(Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $i(t,e){for(var n=0;n details-menu")[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value.closest("details");s&&s!==e&&!s.contains(e)&&s.removeAttribute("open")}}catch(c){r=!0,o=c}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}}function oa(t){if(t.hasAttribute("open")){var e=t.querySelector("[autofocus]");e&&e.focus()}}function ia(t,e){var n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled]):not([aria-disabled="true"])')),r=document.activeElement,o=n.indexOf(r),i=e?n[o+1]:n[o-1],a=e?n[0]:n[n.length-1];return i||a}var aa=navigator.userAgent.match(/Macintosh/);function sa(t){var e=t.target;if(e instanceof Element){var n=t.currentTarget;if(n instanceof Element&&e.closest("details")===n){var r="change"===t.type?e.closest('[role="menuitemradio"], [role="menuitemcheckbox"]'):e.closest('[role="menuitem"], [role="menuitemradio"]');r&&function(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;if(!t.dispatchEvent(new CustomEvent("details-menu-select",{bubbles:!0,cancelable:!0})))return;(function(t,e){var n=e.querySelector("[data-menu-button]");if(n){var r=function(t){if(!t)return null;var 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(r)n.textContent=r;else{var o=function(t){if(!t)return null;var e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);o&&(n.innerHTML=o)}}})(t,e),function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,c=s.querySelector('input[type="radio"], input[type="checkbox"]');s.setAttribute("aria-checked",(c instanceof HTMLInputElement?c.checked:s===t).toString())}}catch(l){r=!0,o=l}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&ua(e);t.dispatchEvent(new CustomEvent("details-menu-selected",{bubbles:!0}))}(r,n)}}}function ca(t){var e=t.currentTarget;if(e instanceof Element){var n=t.target instanceof Element&&"SUMMARY"===t.target.tagName;if(!e.querySelector("details[open]"))switch(t.key){case"Escape":ua(e),t.preventDefault();break;case"ArrowDown":n&&!e.hasAttribute("open")&&e.setAttribute("open","");var r=ia(e,!0);r&&r.focus(),t.preventDefault();break;case"ArrowUp":n&&!e.hasAttribute("open")&&e.setAttribute("open","");var o=ia(e,!1);o&&o.focus(),t.preventDefault();break;case"n":if(aa&&t.ctrlKey){var i=ia(e,!0);i&&i.focus(),t.preventDefault()}break;case"p":if(aa&&t.ctrlKey){var a=ia(e,!1);a&&a.focus(),t.preventDefault()}break;case" ":case"Enter":var s=document.activeElement;s&&la(s)&&s.closest("details")===e&&(t.preventDefault(),t.stopPropagation(),s.click())}}}function la(t){var e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function ua(t){t.removeAttribute("open");var e=t.querySelector("summary");e&&e.focus()}window.customElements.get("details-menu")||(window.DetailsMenuElement=Qi,window.customElements.define("details-menu",Qi));var fa=/\bWindows NT 6.1\b/.test(navigator.userAgent),da=/\bWindows NT 6.2\b/.test(navigator.userAgent),ha=/\bWindows NT 6.3\b/.test(navigator.userAgent),pa=/\bLinux\b/.test(navigator.userAgent),ma=/\bFreeBSD\b/.test(navigator.userAgent);var va=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ga=function(){function t(t,e){for(var n=0;n=0&&e.classList.add("nwse"),["ne","sw"].indexOf(n)>=0&&e.classList.add("nesw"),e.startX=e.box.offsetLeft+(["se","ne"].indexOf(n)>=0?0:e.box.offsetWidth),e.startY=e.box.offsetTop+(["se","sw"].indexOf(n)>=0?0:e.box.offsetHeight),xa(t)}else e.addEventListener("mousemove",Ta)}function ja(t,e,n){var r=Math.max(Math.abs(e),Math.abs(n),t.minWidth);r=Math.min(r,n>0?t.image.height-t.startY:t.startY,e>0?t.image.width-t.startX:t.startX);var o=Math.round(Math.max(0,e>0?t.startX:t.startX-r)),i=Math.round(Math.max(0,n>0?t.startY:t.startY-r));t.box.style.left=o+"px",t.box.style.top=i+"px",t.box.style.width=r+"px",t.box.style.height=r+"px",Ma(t,{x:o,y:i,width:r,height:r})}function Aa(t){var e=t.currentTarget.closest("image-crop");e.loaded=!0;var n=t.target,r=Math.round(n.clientWidth>n.clientHeight?n.clientHeight:n.clientWidth);e.startX=(n.clientWidth-r)/2,e.startY=(n.clientHeight-r)/2,ja(e,r,r)}function Oa(t){var e=t.currentTarget;e.dragStartX=e.dragStartY=null,e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",xa),e.removeEventListener("mousemove",Ta)}function Ma(t,e){var n=t.image.naturalWidth/t.image.width;for(var r in e){var o=Math.round(e[r]*n);e[r]=o;var i=t.querySelector("[data-image-crop-input='"+r+"']");i&&(i.value=o)}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}_a.innerHTML='\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n';var Sa=function(t){function ImageCropElement(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,ImageCropElement);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(ImageCropElement.__proto__||Object.getPrototypeOf(ImageCropElement)).call(this));return t.startX=null,t.startY=null,t.minWidth=10,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(ImageCropElement,ka),Ea(ImageCropElement,[{key:"connectedCallback",value:function(){this.constructed||(this.constructed=!0,this.appendChild(document.importNode(_a.content,!0)),this.image=this.querySelector("img"),this.box=this.querySelector("[data-crop-box]"),this.image.addEventListener("load",Aa),this.addEventListener("mouseleave",Oa),this.addEventListener("mouseup",Oa),this.box.addEventListener("mousedown",La),this.src&&(this.image.src=this.src))}},{key:"attributeChangedCallback",value:function(t,e,n){"src"===t&&(this.loaded=!1,this.image&&(this.image.src=n))}},{key:"src",get:function(){return this.getAttribute("src")},set:function(t){t?this.setAttribute("src",t):this.removeAttribute("src")}},{key:"loaded",get:function(){return this.hasAttribute("loaded")},set:function(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}}],[{key:"observedAttributes",get:function(){return["src"]}}]),ImageCropElement}();window.customElements.get("image-crop")||window.customElements.define("image-crop",Sa);var Ca=Object.assign||function(t){for(var e=1;e ",multiline:!0,surroundWithNewlines:!0}),t}return Ra(MarkdownQuoteButtonElement,qa),MarkdownQuoteButtonElement}();window.customElements.get("md-quote")||(window.MarkdownQuoteButtonElement=za,window.customElements.define("md-quote",za));var Xa=function(t){function MarkdownCodeButtonElement(){Pa(this,MarkdownCodeButtonElement);var t=Ha(this,(MarkdownCodeButtonElement.__proto__||Object.getPrototypeOf(MarkdownCodeButtonElement)).call(this));return Ba.set(t,{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"}),t}return Ra(MarkdownCodeButtonElement,qa),MarkdownCodeButtonElement}();window.customElements.get("md-code")||(window.MarkdownCodeButtonElement=Xa,window.customElements.define("md-code",Xa));var Wa=function(t){function MarkdownLinkButtonElement(){Pa(this,MarkdownLinkButtonElement);var t=Ha(this,(MarkdownLinkButtonElement.__proto__||Object.getPrototypeOf(MarkdownLinkButtonElement)).call(this));return t.setAttribute("hotkey","k"),Ba.set(t,{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"}),t}return Ra(MarkdownLinkButtonElement,qa),MarkdownLinkButtonElement}();window.customElements.get("md-link")||(window.MarkdownLinkButtonElement=Wa,window.customElements.define("md-link",Wa));var Va=function(t){function MarkdownUnorderedListButtonElement(){Pa(this,MarkdownUnorderedListButtonElement);var t=Ha(this,(MarkdownUnorderedListButtonElement.__proto__||Object.getPrototypeOf(MarkdownUnorderedListButtonElement)).call(this));return Ba.set(t,{prefix:"- ",multiline:!0,surroundWithNewlines:!0}),t}return Ra(MarkdownUnorderedListButtonElement,qa),MarkdownUnorderedListButtonElement}();window.customElements.get("md-unordered-list")||(window.MarkdownUnorderedListButtonElement=Va,window.customElements.define("md-unordered-list",Va));var Ya=function(t){function MarkdownOrderedListButtonElement(){Pa(this,MarkdownOrderedListButtonElement);var t=Ha(this,(MarkdownOrderedListButtonElement.__proto__||Object.getPrototypeOf(MarkdownOrderedListButtonElement)).call(this));return Ba.set(t,{prefix:"1. ",multiline:!0,orderedList:!0}),t}return Ra(MarkdownOrderedListButtonElement,qa),MarkdownOrderedListButtonElement}();window.customElements.get("md-ordered-list")||(window.MarkdownOrderedListButtonElement=Ya,window.customElements.define("md-ordered-list",Ya));var $a=function(t){function MarkdownTaskListButtonElement(){Pa(this,MarkdownTaskListButtonElement);var t=Ha(this,(MarkdownTaskListButtonElement.__proto__||Object.getPrototypeOf(MarkdownTaskListButtonElement)).call(this));return t.setAttribute("hotkey","L"),Ba.set(t,{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0}),t}return Ra(MarkdownTaskListButtonElement,qa),MarkdownTaskListButtonElement}();window.customElements.get("md-task-list")||(window.MarkdownTaskListButtonElement=$a,window.customElements.define("md-task-list",$a));var Ga=function(t){function MarkdownMentionButtonElement(){Pa(this,MarkdownMentionButtonElement);var t=Ha(this,(MarkdownMentionButtonElement.__proto__||Object.getPrototypeOf(MarkdownMentionButtonElement)).call(this));return Ba.set(t,{prefix:"@",prefixSpace:!0}),t}return Ra(MarkdownMentionButtonElement,qa),MarkdownMentionButtonElement}();window.customElements.get("md-mention")||(window.MarkdownMentionButtonElement=Ga,window.customElements.define("md-mention",Ga));var Ka=function(t){function MarkdownRefButtonElement(){Pa(this,MarkdownRefButtonElement);var t=Ha(this,(MarkdownRefButtonElement.__proto__||Object.getPrototypeOf(MarkdownRefButtonElement)).call(this));return Ba.set(t,{prefix:"#",prefixSpace:!0}),t}return Ra(MarkdownRefButtonElement,qa),MarkdownRefButtonElement}();window.customElements.get("md-ref")||(window.MarkdownRefButtonElement=Ka,window.customElements.define("md-ref",Ka));var Ja=navigator.userAgent.match(/Macintosh/)?"Meta":"Control",Za=function(t){function MarkdownToolbarElement(){return Pa(this,MarkdownToolbarElement),Ha(this,(MarkdownToolbarElement.__proto__||Object.getPrototypeOf(MarkdownToolbarElement)).call(this))}return Ra(MarkdownToolbarElement,Ia),Da(MarkdownToolbarElement,[{key:"connectedCallback",value:function(){var t=function(t,e){if(e.metaKey&&"Meta"===Ja||e.ctrlKey&&"Control"===Ja){var n=t.querySelector('[hotkey="'+e.key+'"]');n&&(n.click(),e.preventDefault())}}.bind(null,this);this.field&&(this.field.addEventListener("keydown",t),Qa.set(this,t))}},{key:"disconnectedCallback",value:function(){var t=Qa.get(this);t&&this.field&&(this.field.removeEventListener("keydown",t),Qa.delete(this))}},{key:"field",get:function(){var t=this.getAttribute("for");if(t){var e=document.getElementById(t);return e instanceof HTMLTextAreaElement?e:null}}}]),MarkdownToolbarElement}(),Qa=new WeakMap;function ts(t){return t.trim().split("\n").length>1}function es(t,e){return Array(e+1).join(t)}window.customElements.get("markdown-toolbar")||(window.MarkdownToolbarElement=Za,window.customElements.define("markdown-toolbar",Za));var ns=null;function rs(t,e){var n=t.value.slice(t.selectionStart,t.selectionEnd),r=void 0;r=e.orderedList?function(t){var e=/^\d+\.\s+/,n=void 0,r=void 0,o=t.value.slice(t.selectionStart,t.selectionEnd),i=o.split("\n");if(i.every(function(t){return e.test(t)}))i=i.map(function(t){return t.replace(e,"")}),o=i.join("\n");else{i=function(){var t=void 0,e=void 0,n=void 0,r=[];for(n=t=0,e=i.length;t0?a+"\n":o,v=ts(p)&&s.length>0?"\n"+s:i;if(l){var g=t.value[t.selectionStart-1];0===t.selectionStart||null==g||g.match(/\s/)||(m=" "+m)}p=function(t,e,n){if(t.selectionStart===t.selectionEnd)t.selectionStart=function(t,e){for(;t[e]&&null!=t[e-1]&&!t[e-1].match(/\s/);)e--;return e}(t.value,t.selectionStart),t.selectionEnd=function(t,e){for(;t[e]&&!t[e].match(/\s/);)e++;return e}(t.value,t.selectionEnd);else{var r=t.selectionStart-e.length,o=t.selectionEnd+n.length,i=t.value.slice(r,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,o)===n;i&&a&&(t.selectionStart=r,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,m,v);var b=t.selectionStart,w=t.selectionEnd,y=c.length>0&&v.indexOf(c)>-1&&p.length>0;if(f){var E=os(t);n=E.newlinesToAppend,r=E.newlinesToPrepend,m=n+o,v+=r}if(p.startsWith(m)&&p.endsWith(v)){var k=p.slice(m.length,p.length-v.length);if(d===h){var _=d-m.length;_=Math.max(_,b),_=Math.min(_,b+k.length),b=w=_}else w=b+k.length;return{text:k,selectionStart:b,selectionEnd:w}}if(y){if(u.length>0&&p.match(u)){v=v.replace(c,p);var T=m+v;return b=w=b+m.length,{text:T,selectionStart:b,selectionEnd:w}}var x=m+p+v;return b=b+m.length+p.length+v.indexOf(c),w=b+c.length,{text:x,selectionStart:b,selectionEnd:w}}var L=m+p+v;b=d+m.length,w=h+m.length;var j=p.match(/^\s*|\s*$/g);if(e.trimFirst&&j){var A=j[0]||"",O=j[1]||"";L=A+m+p.trim()+v+O,b+=A.length,w-=O.length}return{text:L,selectionStart:b,selectionEnd:w}}(t,e),function(t,e){var n=e.text,r=e.selectionStart,o=e.selectionEnd,i=t.selectionStart,a=t.value.slice(0,i),s=t.value.slice(t.selectionEnd);if(null===ns||!0===ns){t.contentEditable="true";try{ns=document.execCommand("insertText",!1,n)}catch(c){ns=!1}t.contentEditable="false"}if(ns&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(ns=!1),!ns){try{document.execCommand("ms-beginUndoUnit")}catch(l){}t.value=a+n+s;try{document.execCommand("ms-endUndoUnit")}catch(l){}t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}null!=r&&null!=o?t.setSelectionRange(r,o):t.setSelectionRange(i,t.selectionEnd)}(t,r)}function os(t){var e=t.value.slice(0,t.selectionStart),n=t.value.slice(t.selectionEnd),r=e.match(/\n*$/),o=n.match(/^\n*/),i=r?r[0].length:0,a=o?o[0].length:0,s=void 0,c=void 0;return e.match(/\S/)&&i<2&&(s=es("\n",2-i)),n.match(/\S/)&&a<2&&(c=es("\n",2-a)),null==s&&(s=""),null==c&&(c=""),{newlinesToAppend:s,newlinesToPrepend:c}}function is(t,e){var n=t.closest("markdown-toolbar");if(n instanceof Za){var r=Ca({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,trimFirst:!1},e),o=n.field;o&&(o.focus(),rs(o,r))}}var as=function(){function t(t,e){for(var n=0;n=r.length&&(i=0),t.selectTab(i)}else if("ArrowLeft"===e.code){var a=o-1;a<0&&(a=r.length-1),t.selectTab(a)}else"Home"===e.code?(t.selectTab(0),e.preventDefault()):"End"===e.code&&(t.selectTab(r.length-1),e.preventDefault())}}),t.addEventListener("click",function(e){var n=Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]'));if(e.target instanceof Element){var r=e.target.closest('[role="tab"]');if(r&&r.closest('[role="tablist"]')){var o=n.indexOf(r);t.selectTab(o)}}}),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(TabContainerElement,ss),as(TabContainerElement,[{key:"selectTab",value:function(t){var e=this.querySelectorAll('[role="tablist"] [role="tab"]'),n=this.querySelectorAll('[role="tabpanel"]'),r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var c=a.value;c.setAttribute("aria-selected","false"),c.setAttribute("tabindex","-1")}}catch(g){o=!0,i=g}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}var l=!0,u=!1,f=void 0;try{for(var d,h=n[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var p=d.value;p.hidden=!0,p.setAttribute("tabindex","0")}}catch(g){u=!0,f=g}finally{try{!l&&h.return&&h.return()}finally{if(u)throw f}}var m=e[t],v=n[t];m.setAttribute("aria-selected","true"),m.removeAttribute("tabindex"),m.focus(),v.hidden=!1,v.dispatchEvent(new CustomEvent("tabcontainer:tabchange"))}}]),TabContainerElement}();window.customElements.get("tab-container")||(window.TabContainerElement=cs,window.customElements.define("tab-container",cs));var ls=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],us=["January","February","March","April","May","June","July","August","September","October","November","December"];function fs(t){return("0"+t).slice(-2)}function ds(t,e){var n=t.getDay(),r=t.getDate(),o=t.getMonth(),i=t.getFullYear(),a=t.getHours(),s=t.getMinutes(),c=t.getSeconds();return e.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g,function(e){var l=void 0;switch(e[1]){case"%":return"%";case"a":return ls[n].slice(0,3);case"A":return ls[n];case"b":return us[o].slice(0,3);case"B":return us[o];case"c":return t.toString();case"d":return fs(r);case"e":return r;case"H":return fs(a);case"I":return fs(ds(t,"%l"));case"l":return 0===a||12===a?12:(a+12)%12;case"m":return fs(o+1);case"M":return fs(s);case"p":return a>11?"PM":"AM";case"P":return a>11?"pm":"am";case"S":return fs(c);case"w":return n;case"y":return fs(i%100);case"Y":return i;case"Z":return(l=t.toString().match(/\((\w+)\)$/))?l[1]:"";case"z":return(l=t.toString().match(/\w([+-]\d\d\d\d) /))?l[1]:""}})}function hs(t){var e=void 0;return function(){if(e)return e;if("Intl"in window)try{return e=new Intl.DateTimeFormat(void 0,t)}catch(n){if(!(n instanceof RangeError))throw n}}}var ps=null,ms=hs({day:"numeric",month:"short"});function vs(){if(null!==ps)return ps;var t=ms();if(t){var e=t.format(new Date(0));return ps=!!e.match(/^\d/)}return!1}var gs=null,bs=hs({day:"numeric",month:"short",year:"numeric"});var ws=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ys=function(){function t(t,e){for(var n=0;n=0&&o<30?this.timeAgoFromMs(t):null}},{key:"timeAhead",value:function(){var t=this.date.getTime()-(new Date).getTime(),e=Math.round(t/1e3),n=Math.round(e/60),r=Math.round(n/60),o=Math.round(r/24);return t>=0&&o<30?this.timeUntil():null}},{key:"timeAgo",value:function(){var t=(new Date).getTime()-this.date.getTime();return this.timeAgoFromMs(t)}},{key:"timeAgoFromMs",value:function(t){var e=Math.round(t/1e3),n=Math.round(e/60),r=Math.round(n/60),o=Math.round(r/24),i=Math.round(o/30),a=Math.round(i/12);return t<0?"just now":e<10?"just now":e<45?e+" seconds ago":e<90?"a minute ago":n<45?n+" minutes ago":n<90?"an hour ago":r<24?r+" hours ago":r<36?"a day ago":o<30?o+" days ago":o<45?"a month ago":i<12?i+" months ago":i<18?"a year ago":a+" years ago"}},{key:"microTimeAgo",value:function(){var t=(new Date).getTime()-this.date.getTime(),e=Math.round(t/1e3),n=Math.round(e/60),r=Math.round(n/60),o=Math.round(r/24),i=Math.round(o/30),a=Math.round(i/12);return n<1?"1m":n<60?n+"m":r<24?r+"h":o<365?o+"d":a+"y"}},{key:"timeUntil",value:function(){var t=this.date.getTime()-(new Date).getTime();return this.timeUntilFromMs(t)}},{key:"timeUntilFromMs",value:function(t){var e=Math.round(t/1e3),n=Math.round(e/60),r=Math.round(n/60),o=Math.round(r/24),i=Math.round(o/30),a=Math.round(i/12);return i>=18?a+" years from now":i>=12?"a year from now":o>=45?i+" months from now":o>=30?"a month from now":r>=36?o+" days from now":r>=24?"a day from now":n>=90?r+" hours from now":n>=45?"an hour from now":e>=90?n+" minutes from now":e>=45?"a minute from now":e>=10?e+" seconds from now":"just now"}},{key:"microTimeUntil",value:function(){var t=this.date.getTime()-(new Date).getTime(),e=Math.round(t/1e3),n=Math.round(e/60),r=Math.round(n/60),o=Math.round(r/24),i=Math.round(o/30),a=Math.round(i/12);return o>=365?a+"y":r>=24?o+"d":n>=60?r+"h":n>1?n+"m":"1m"}},{key:"formatDate",value:function(){var t,e=vs()?"%e %b":"%b %e";return t=this.date,(new Date).getUTCFullYear()!==t.getUTCFullYear()&&(e+=function(){if(null!==gs)return gs;var t=bs();if(t){var e=t.format(new Date(0));return gs=!!e.match(/\d,/)}return!0}()?", %Y":" %Y"),ds(this.date,e)}},{key:"formatTime",value:function(){var t=Os();return t?t.format(this.date):ds(this.date,"%l:%M%P")}}]),t}(),Os=hs({hour:"numeric",minute:"2-digit"}),Ms=function(t){function RelativeTimeElement(){return ws(this,RelativeTimeElement),ks(this,(RelativeTimeElement.__proto__||Object.getPrototypeOf(RelativeTimeElement)).apply(this,arguments))}return Es(RelativeTimeElement,Ts),ys(RelativeTimeElement,[{key:"getFormattedDate",value:function(){if(this._date)return new As(this._date).toString()}},{key:"connectedCallback",value:function(){Ss.push(this),Cs||(Ds(),Cs=setInterval(Ds,6e4))}},{key:"disconnectedCallback",value:function(){var t=Ss.indexOf(this);-1!==t&&Ss.splice(t,1),Ss.length||Cs&&(clearInterval(Cs),Cs=null)}}]),RelativeTimeElement}(),Ss=[],Cs=void 0;function Ds(){var t,e=void 0,n=void 0;for(n=0,t=Ss.length;n=0&&(i=s%n.length)}}n[i].focus()}(t))}function tc(t){return!(t.disabled||t.hidden||t.type&&"hidden"===t.type||t.closest("[hidden]"))}function ec(t){var e=t.querySelector("details-dialog");return!(e instanceof ac)||e.dispatchEvent(new CustomEvent("details-dialog:will-close",{bubbles:!0,cancelable:!0}))}function nc(t){if(t.currentTarget instanceof Element){var e=t.currentTarget.closest("details[open]");e&&(ec(e)||(t.preventDefault(),t.stopPropagation()))}}function rc(t){var e=t.currentTarget;if(e instanceof Element){var n,r,o=e.querySelector("details-dialog");if(o instanceof ac)if(e.hasAttribute("open"))document.activeElement&&ic.set(o,{details:e,activeElement:document.activeElement}),(r=(n=o).querySelector("[autofocus]"))||(r=n,n.setAttribute("tabindex","-1")),r.focus(),e.addEventListener("keydown",Qs);else{var i=!0,a=!1,s=void 0;try{for(var c,l=o.querySelectorAll("form")[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;u instanceof HTMLFormElement&&u.reset()}}catch(d){a=!0,s=d}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var f=function(t,e){var n=ic.get(e);return n&&n.activeElement instanceof HTMLElement?n.activeElement:t.querySelector("summary")}(e,o);f&&f.focus(),e.removeEventListener("keydown",Qs)}}}function oc(t,e){e!==t.hasAttribute("open")&&(e?t.setAttribute("open",""):ec(t)&&t.removeAttribute("open"))}var ic=new WeakMap,ac=function(t){function DetailsDialogElement(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,DetailsDialogElement);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(DetailsDialogElement.__proto__||Object.getPrototypeOf(DetailsDialogElement)).call(this));return ic.set(t,{details:null,activeElement:null}),t.addEventListener("click",function(t){var e=t.target;if(e instanceof Element){var n=e.closest("details");n&&e.closest(Js)&&oc(n,!1)}}),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(DetailsDialogElement,Ks),Gs(DetailsDialogElement,null,[{key:"CLOSE_ATTR",get:function(){return"data-close-dialog"}},{key:"CLOSE_SELECTOR",get:function(){return Js}},{key:"INPUT_SELECTOR",get:function(){return Zs}}]),Gs(DetailsDialogElement,[{key:"connectedCallback",value:function(){this.setAttribute("role","dialog");var t=ic.get(this);if(t){var e=this.parentElement;if(e){var n=e.querySelector("summary");n&&(n.setAttribute("aria-haspopup","dialog"),n.addEventListener("click",nc,{capture:!0})),e.addEventListener("toggle",rc),t.details=e}}}},{key:"disconnectedCallback",value:function(){var t=ic.get(this);if(t){var e=t.details;if(e){e.removeEventListener("toggle",rc);var n=e.querySelector("summary");n&&n.removeEventListener("click",nc,{capture:!0}),t.details=null}}}},{key:"toggle",value:function(t){var e=ic.get(this);if(e){var n=e.details;n&&oc(n,t)}}}]),DetailsDialogElement}();window.customElements.get("details-dialog")||(window.DetailsDialogElement=ac,window.customElements.define("details-dialog",ac));var sc=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},cc=function(){function t(t,e){for(var n=0;n=200&&t.status<300?n(t.responseText):r(new fc(t.status,t.responseText,t.getResponseHeader("Content-Type")))},t.onerror=function(){r(new fc(t.status,t.responseText,t.getResponseHeader("Content-Type")))},t.send(e)})}(i,e);return a.then(o,o),a}(this.input,e,this.src).then(function(e){t.dispatchEvent(new CustomEvent("load"));var n=e?e.trim():null;t.required&&t.input.setCustomValidity(""),t.input.dispatchEvent(new CustomEvent("autocheck:success",{detail:{message:n},bubbles:!0}))}).catch(function(e){t.required&&t.input.setCustomValidity(vc(e)||"Something went wrong"),t.dispatchEvent(new CustomEvent("error")),t.input.dispatchEvent(new CustomEvent("autocheck:error",{detail:{message:vc(e)},bubbles:!0}))}).then(r,r)}else this.input.dispatchEvent(new CustomEvent("autocheck:complete",{bubbles:!0}))}},{key:"src",get:function(){var t=this.getAttribute("src");if(!t)return"";var e=this.ownerDocument.createElement("a");return e.href=t,e.href},set:function(t){this.setAttribute("src",t)}},{key:"csrf",get:function(){return this.getAttribute("csrf")||""},set:function(t){this.setAttribute("csrf",t)}},{key:"required",get:function(){return this.hasAttribute("required")},set:function(t){this.input.required=t,t?this.setAttribute("required",""):this.removeAttribute("required")}}]),AutoCheckElement}();function vc(t){if(422===t.statusCode&&t.responseText&&t.contentType.includes("text/html; fragment"))return t.responseText}window.customElements.get("auto-check")||(window.AutoCheckElement=mc,window.customElements.define("auto-check",mc));const gc={};function bc(t){if(t in gc)return gc[t];throw new Error(`dependency not found: ${t}`)}self.define=function(t,e,n){if(t in gc)return void console.error(`module redefined: ${t}`);let r,o;if("function"==typeof e)o=e,r=[];else{if(null==n)throw new Error(`evaluating module ${t}: invalid arguments`);r=e,o=n}const i=[];for(let s=0;s(t.value&&t.type&&e[t.type]++,e),{Repositories:0,Users:0,Code:0,Issues:0}),i=o.reduce((e,t)=>`${e} ${function(e){let t=e.prefix,n=e.value;return""===t?"":n?`${t}${n}`:""}(t)}`.trim(),""),a=e.query(document,".js-advanced-search-input",HTMLInputElement).value;e.query(document,".js-type-value",HTMLInputElement).value=function(e){let t=0,n="Repositories";for(const s in e)e[s]>t&&(t=e[s],n=s);return n}(r),e.query(document,".js-search-query",HTMLInputElement).value=`${a} ${i}`.trim();const c=e.query(document,".js-advanced-query");c.innerHTML="",c.textContent=i;const l=document.createElement("span");l.textContent=a.trim(),c.prepend(l," ")}function Q(e){return-1!==e.search(/\s/g)?`"${e}"`:e}function X(t){return t.map(t=>{const n=t.value.trim(),s=e.getAttribute(t,"data-search-prefix"),o=t.getAttribute("data-search-type");return""===s?{prefix:s,value:n,type:o}:-1!==n.search(/,/g)&&"location"!==s?n.split(/,/).map(e=>({prefix:s,value:Q(e.trim()),type:o})):{prefix:s,value:Q(n),type:o}}).reduce((e,t)=>e.concat(t),[])}E=E&&E.hasOwnProperty("default")?E.default:E,q=q&&q.hasOwnProperty("default")?q.default:q,M=M&&M.hasOwnProperty("default")?M.default:M,F=F&&F.hasOwnProperty("default")?F.default:F,D=D&&D.hasOwnProperty("default")?D.default:D,B=B&&B.hasOwnProperty("default")?B.default:B,U=U&&U.hasOwnProperty("default")?U.default:U,t.observe(".js-account-membership",function(t){const n=e.query(t,".select-menu-item.selected",HTMLElement);n&&J(n)}),n.on("selectmenu:selected",".js-account-membership .select-menu-item",function(e){J(e.currentTarget)}),s.onInput(".js-advanced-search-prefix",function(){G()}),n.on("change",".js-advanced-search-prefix",G),s.onFocus(".js-advanced-search-input",function(t){const n=e.closest(t,".js-advanced-search-label");n.classList.add("focus"),t.addEventListener("blur",()=>n.classList.remove("focus"),{once:!0})}),t.observe(".js-advanced-search-input",function(){G()});const Y=new o;function Z(e){return i(e instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:16"),e.querySelectorAll(".js-integrations-install-repo-picked .js-repository-picker-result").length}function ee(e){i(e instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:32");const t=e.querySelector("input.js-no-repositories-radio"),n=e.querySelector("input.js-all-repositories-radio");return i(n instanceof HTMLInputElement,"app/assets/modules/github/apps/installation-repo-selection.js:35"),t instanceof HTMLInputElement&&t.checked||n.checked||function(e){return Z(e)>0}(e)}function te(){return document.querySelector(".js-apps-install-select-repositories-container")}function ne(){const e=te();return e&&e.querySelector(".js-filterable-field")}function se(e){return function(){const t=e.querySelector("button.js-integrations-install-form-submit");i(t instanceof HTMLButtonElement,"app/assets/modules/github/apps/installation-repo-selection.js:53"),t.disabled=!ee(e);const n=e.querySelector(".flash");n&&n.classList.toggle("d-none",!function(e){const t=+e.getAttribute("data-max-repos");if(t)return Z(e)>=t}(e))}}function oe(){let e=0;0!==document.querySelectorAll(".js-integrations-install-repo-picked:not(.d-none)").length&&(e=document.querySelectorAll(".js-repository-picker-result:not(.d-none)").length);let t="";if(e>0){t=`Selected ${e} ${e>1?"repositories":"repository"}`}const n=document.querySelector(".js-integration-total-repos");i(n instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:79"),n.textContent=t}function re(e,t){const n=e.querySelector(".js-app-logo-with-bgcolor");n&&(n.style.backgroundColor=`#${t}`)}function ie(e,t){const n=e.nextElementSibling;if(n)return i(n instanceof HTMLElement,"app/assets/modules/github/find-next-element-sibling.js:8"),n.classList.contains(t)?n:ie(n,t)}function ae(){const e=document.getElementById("ajax-error-message");e&&e.classList.add("visible")}function ce(){const e=document.getElementById("ajax-error-message");e&&e.classList.remove("visible")}t.observe(".js-integrations-install-form",function(t){const s=te();if(!s)return;const o=s.querySelector(".js-navigation-container");async function c(e){try{const t=ne();let n=t&&t.getAttribute("data-alternate-search-url");i(n,"app/assets/modules/github/apps/installation-repo-selection.js:126");const s=Array.prototype.slice.call(document.querySelectorAll(".js-integrations-install-repo-picked .js-selected-repository-field")).map(function(e){return i(e instanceof HTMLInputElement,"app/assets/modules/github/apps/installation-repo-selection.js:131"),e.value});n+=~n.indexOf("?")?"&":"?",n+=`q=${encodeURIComponent(e)}`;const c=await Y.push(r.fetchText(n)),u=a.parseHTML(document,c.trim());for(const e of u.querySelectorAll(".js-navigation-item")){const t=e.getAttribute("data-autocomplete-value");s.includes(t)&&e.remove()}for(;o.firstChild;)o.removeChild(o.firstChild);o.append(u)}finally{const e=te();e&&e.classList.remove("is-loading"),l=null}}i(o,"app/assets/modules/github/apps/installation-repo-selection.js:87"),t.addEventListener("change",se(t)),n.on("selectmenu:selected",".js-apps-install-select-repositories-container",function(n){n.target.classList.add("d-none");const s=t.querySelector(".js-integrations-install-repo-picked"),o=n.target.querySelector(".js-repository-picker-result");i(o instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:100");const r=a.parseHTML(document,o.outerHTML.trim()).querySelector(".js-repository-picker-result");i(r instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:104"),r.classList.remove("d-none"),i(s,"app/assets/modules/github/apps/installation-repo-selection.js:107"),s.insertBefore(r,s.firstChild),e.query(document,".js-min-repository-error").classList.add("d-none"),oe(),se(t).call(),c("")});let l=null;n.on("filterable:change",".js-apps-install-select-repositories-container",function(e){if(l)return;l=e;const t=te();t&&t.classList.add("is-loading"),o.classList.contains("filterable-active")?setTimeout(function(){const e=ne();if(e instanceof HTMLInputElement){c(e.value.trim())}},1e3):(t&&t.classList.remove("is-loading"),l=null)}),n.on("click",".js-repository-picker-remove",function(n){const s=n.target.closest(".js-repository-picker-result");i(s instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:199");const o=n.target.closest("svg.js-repository-picker-remove");if(o){const e=o.getAttribute("data-repo-id");if(e){const t=te(),n=t&&t.querySelector(`.js-navigation-item[data-repo-id="${e}"]`);n&&(n.classList.remove("selected"),n.classList.remove("d-none"))}}if(s.remove(),0===e.query(document,".js-integrations-install-repo-picked").children.length){const e=Array.from(document.querySelectorAll(".js-min-repository-error"));for(const t of e)t.classList.remove("d-none")}return oe(),c(""),se(t).call()}),n.on("click",".js-apps-install-select-repositories-container .js-menu-target",function(){return e.query(document,".js-select-repositories-radio",HTMLInputElement).checked=!0,se(t).call()}),n.on("click",".js-no-repositories-radio",function(){e.query(document,".js-integrations-install-repo-picked, .js-min-repository-error").classList.add("d-none"),oe()}),n.on("click",".js-all-repositories-radio",function(){e.query(document,".js-integrations-install-repo-picked, .js-min-repository-error").classList.add("d-none"),oe()}),n.on("click",".js-select-repositories-radio",function(){e.query(document,".js-integrations-install-repo-picked").classList.remove("d-none"),oe()})}),n.on("submit",".js-integrations-install-form",function(e){const t=e.target.querySelector(".js-all-repositories-radio");if(t instanceof HTMLInputElement)if(t.checked){const t=Array.from(e.target.querySelectorAll('input[name="repository_ids[]"]'));for(const e of t)e.remove()}else{const e=te();if(!e)return;const t=e.querySelector(".js-navigation-container");for(i(t instanceof HTMLElement,"app/assets/modules/github/apps/installation-repo-selection.js:276");t.firstChild;)t.removeChild(t.firstChild)}}),l.remoteForm(".js-app-bgcolor-form",async function(e,t){const n=e.querySelector(".js-app-bgcolor-save-notice");if(!n)return;let s;try{s=await t.html()}catch(o){n.classList.remove("visible")}s&&(n.classList.add("visible"),setTimeout(()=>n.classList.remove("visible"),1500))}),s.onInput(".js-app-bgcolor-input",function(t){const n=t.target;i(n instanceof HTMLInputElement,"app/assets/modules/github/apps.js:46");const s=e.closest(n,"form",HTMLFormElement),o=n.value.replace(/^#/,"");if(o.length<1)return n.classList.remove("text-red"),void re(s,n.defaultValue);n.checkValidity()?(n.classList.remove("text-red"),re(s,o),s.classList.contains("js-app-bgcolor-form")&&c(()=>(function(e,t){t.checkValidity()&&u.submit(e)})(s,n),400)()):(n.classList.add("text-red"),re(s,n.defaultValue))}),n.on("click",".js-banner .js-next",function(t){const n=e.closest(t.currentTarget,".js-banner"),s=e.query(n,".js-dismiss",HTMLButtonElement),o=e.query(n,".js-next",HTMLButtonElement),r=e.query(n,".js-page.d-block"),a=ie(r,"js-page");i(a,"app/assets/modules/github/banner.js:43"),r.classList.remove("d-block"),r.classList.add("d-none"),a.classList.remove("d-none"),a.classList.add("d-block"),ie(a,"js-page")||(o.classList.add("d-none"),s.classList.remove("d-none"))}),t.observe(".js-banner",function(t){const n=e.query(t,".js-dismiss",HTMLButtonElement);if(t.querySelectorAll(".js-page").length>0){const s=e.query(t,".js-next",HTMLButtonElement),o=e.query(t,".js-page.d-block",HTMLDivElement);o&&!ie(o,"js-page")?n.classList.remove("d-none"):s.classList.remove("d-none")}else n.classList.remove("d-none")}),n.on("deprecatedAjaxError","[data-remote]",function(e){i(e instanceof CustomEvent,"app/assets/modules/github/behaviors/ajax-error.js:25");const t=e.detail,n=t.error,s=t.text;e.currentTarget===e.target&&"abort"!==n&&"canceled"!==n&&(/{i(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/html-validation.js:21");let t=e.checkValidity();function n(){const n=e.checkValidity();n!==t&&e.form&&de(e.form),t=n}e.addEventListener("input",n),e.addEventListener("blur",function t(){e.removeEventListener("input",n),e.removeEventListener("blur",t)})});const ue=new WeakMap;function de(t){const n=t.checkValidity();for(const s of e.querySelectorAll(t,"button[data-disable-invalid]",HTMLButtonElement))s.disabled=!n}t.observe("button[data-disable-invalid]",{constructor:HTMLButtonElement,initialize(e){const t=e.form;t&&(!function(e){ue.get(e)||(e.addEventListener("change",()=>de(e)),ue.set(e,!0))}(t),e.disabled=!t.checkValidity())}}),t.observe("input[data-required-change], textarea[data-required-change]",function(e){function t(){e.setCustomValidity(e.value===e.defaultValue?"unchanged":"")}i(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/html-validation.js:68"),e.addEventListener("input",t),e.addEventListener("change",t),t(),e.form&&de(e.form)}),document.addEventListener("reset",function(e){if(e.target instanceof HTMLFormElement){const t=e.target;setTimeout(()=>de(t))}}),n.on("submit","form.js-normalize-submit",function(e){const t=e.currentTarget;i(t instanceof HTMLFormElement,"app/assets/modules/github/behaviors/html-validation.js:97"),t.checkValidity()||e.preventDefault()});const me=new WeakMap;function fe(e,t){t.classList.remove("is-loading","successed","errored","warn"),e.classList.remove("is-autocheck-loading","is-autocheck-successful","is-autocheck-errored");const n=t.querySelector("p.note");if(n){const e=me.get(n);e&&(n.innerHTML=e)}const s=t.querySelector("dd.error");s&&s.remove();const o=t.querySelector("dd.warning");o&&o.remove()}function pe(e){const t=e.closest("form");if(!t)return;const n=t.querySelector(".js-auto-complete-button");n instanceof HTMLButtonElement&&(n.disabled=!e.value)}t.observe("auto-check",function(t){const n=e.query(t,"input",HTMLInputElement),s=e.closest(n,"dl.form-group"),o=n.form;i(o,"app/assets/modules/github/behaviors/autocheck.js:16");const r=s.querySelector("p.note");r&&me.set(r,r.innerHTML),t.addEventListener("loadstart",()=>{fe(n,s),s.classList.add("is-loading"),n.classList.add("is-autocheck-loading"),de(o)}),t.addEventListener("loadend",()=>{s.classList.remove("is-loading"),n.classList.remove("is-autocheck-loading")}),n.addEventListener("autocheck:success",e=>{i(e instanceof CustomEvent,"app/assets/modules/github/behaviors/autocheck.js:35"),n.classList.add("is-autocheck-successful"),s.classList.add("successed"),de(o);const t=e.detail.message;if(t)if(r)r.innerHTML=t;else{const e=document.createElement("dd");e.classList.add("warning"),e.innerHTML=t,s.append(e),s.classList.add("warn")}}),n.addEventListener("autocheck:error",e=>{if(i(e instanceof CustomEvent,"app/assets/modules/github/behaviors/autocheck.js:56"),n.classList.add("is-autocheck-errored"),s.classList.add("errored"),de(o),r)r.innerHTML=e.detail.message||"Something went wrong";else{const t=e.detail.message||"Something went wrong",n=document.createElement("dd");n.classList.add("error"),n.innerHTML=t,s.append(n)}}),n.addEventListener("input",()=>{n.value||fe(n,s)})}),t.observe("auto-complete",function(e){e.addEventListener("loadstart",()=>e.classList.add("is-auto-complete-loading")),e.addEventListener("loadend",()=>e.classList.remove("is-auto-complete-loading"))}),t.observe("auto-complete",{constructor:AutocompleteElement,initialize:pe}),n.on("change","auto-complete",function(e){i(e.currentTarget instanceof AutocompleteElement,"app/assets/modules/github/behaviors/autocomplete.js:18"),pe(e.currentTarget)});const ge=new o;async function he(e){const t=e.form;i(t,"app/assets/modules/github/behaviors/autosearch-form.js:34"),t.classList.add("is-sending");try{const e=u.serialize(t),n=`${t.action}&${e}`.replace(/[?&]/,"?"),s=await ge.push(r.fetchText(n)),o=t.getAttribute("data-results-container"),i=o?document.getElementById(o):null;i&&(i.innerHTML=s),m.replaceState(null,"",`?${e}`)}finally{t.classList.remove("is-sending")}}function be(){if("Intl"in window)try{return(new window.Intl.DateTimeFormat).resolvedOptions().timeZone}catch(e){if(!(e instanceof RangeError))throw e}}function ye(e,t){return!!(e&&t in e&&(n=e[t],"function"==typeof n&&n.toString().match(/native code/)));var n}s.onFocus(".js-autosearch-field",e=>{const t=e;i(t instanceof HTMLInputElement,"app/assets/modules/github/behaviors/autosearch-form.js:54"),d.addThrottledInputEventListener(t,he),t.addEventListener("blur",()=>d.removeThrottledInputEventListener(t,he),{once:!0})}),s.onFocus("input[data-autoselect]",async function(e){i(e instanceof HTMLInputElement,"app/assets/modules/github/behaviors/autoselect.js:10"),await f.microtask(),e.select()}),n.on("change","form[data-autosubmit]",function(e){const t=e.currentTarget;i(t instanceof HTMLFormElement,"app/assets/modules/github/behaviors/autosubmit.js:20"),u.submit(t)}),n.on("change","input[data-autosubmit]",function(e){let t=e.currentTarget;i(t instanceof HTMLInputElement,"app/assets/modules/github/behaviors/autosubmit.js:25");const n=t.form;i(n,"app/assets/modules/github/behaviors/autosubmit.js:27"),u.submit(n)});const ve={beacon:ye(window.navigator,"sendBeacon"),customElements:ye(window.customElements,"define"),highResolutionTime:ye(window.performance,"now"),stringEndsWith:ye(String.prototype,"endsWith"),stringStartsWith:ye(String.prototype,"startsWith"),timezone:!!be(),userTimingEntries:ye(window.performance,"getEntries"),userTimingMark:ye(window.performance,"mark")};let je=[];function Le(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0===e.timestamp&&(e.timestamp=(new Date).getTime()),je.push(e),t?we():async function(){await b.loaded,null==Ee&&(Ee=requestIdleCallback(we))}()}let Ee=null;function we(){if(Ee=null,p(document))return;const e=g.getMetadataByName(document,"browser-stats-url");e&&(h.guaranteedPost(e,JSON.stringify({stats:je}),"text/plain"),je=[])}function Te(e){e.preventDefault(),e.stopPropagation()}Le({features:ve}),t.observe("a.btn.disabled",{subscribe:e=>y.fromEvent(e,"click",Te)}),(async()=>{await b.loaded;const e=function(e){try{return JSON.parse(window.localStorage.getItem(e))}catch(t){return{}}}("bundle-urls")||{},t=function(){const e={};for(const t of document.getElementsByTagName("script")){const n=t.src.match(/\/([\w-]+)-[0-9a-f]{32,}\.js$/);n&&(e[`${n[1]}.js`]=t.src)}for(const t of document.getElementsByTagName("link")){const n=t.href.match(/\/([\w-]+)-[0-9a-f]{32,}\.css$/);n&&(e[`${n[1]}.css`]=t.href)}return e}();!function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){}}("bundle-urls",t);const n=Object.keys(t).filter(n=>{const s=t[n];return e[n]!==s});n.length&&Le({downloadedBundles:n})})();var qe=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],s=!0,o=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(s=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);s=!0);}catch(c){o=!0,r=c}finally{try{!s&&a.return&&a.return()}finally{if(o)throw r}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function Ae(e){const t=e.querySelector(".js-clipboard-clippy-icon"),n=e.querySelector(".js-clipboard-check-icon");e.classList.toggle("ClipboardButton--success"),e.classList.toggle("tooltipped"),e.classList.toggle("tooltipped-s"),t&&t.classList.toggle("d-none"),n&&n.classList.toggle("d-none")}function ke(e,t){const n=e.closest(".js-write-bucket");n&&n.classList.toggle("focused",t)}function Se(e){const t=e.currentTarget;t instanceof Element&&ke(t,!1)}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],s=!0,o=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(s=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);s=!0);}catch(c){o=!0,r=c}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function He(t){const n=e.closest(t,".js-previewable-comment-form"),s=t.classList.contains("js-preview-tab");if(s){const t=e.query(n,".js-write-bucket");e.query(n,".js-preview-body").style.minHeight=`${t.clientHeight}px`}n.classList.toggle("preview-selected",s),n.classList.toggle("write-selected",!s);const o=e.query(n,".tabnav-tab.selected");o.setAttribute("aria-selected","false"),o.classList.remove("selected"),t.classList.add("selected"),t.setAttribute("aria-selected","true");const r=e.query(n,".js-write-tab");return s?r.setAttribute("data-hotkey","Control+P,Meta+P"):r.removeAttribute("data-hotkey"),n}t.observe(".js-check-all-container",{subscribe:function(e){var t=!1,n=null;function s(e,t,n,s){t instanceof HTMLInputElement&&(t.indeterminate=s,t.checked!==n&&(t.checked=n,setTimeout(function(){var n=new CustomEvent("change",{bubbles:!0,cancelable:!1,detail:{relatedTarget:e}});t.dispatchEvent(n)})))}function o(o){var r=o.target;r instanceof Element&&(r.hasAttribute("data-check-all")?function(t){if(t instanceof CustomEvent){var o=t.detail.relatedTarget;if(o&&o.hasAttribute("data-check-all-item"))return}var r=t.target;if(r instanceof HTMLInputElement){n=null;var a=!0,c=!1,l=void 0;try{for(var u,d=e.querySelectorAll("[data-check-all-item]")[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var m=u.value;s(r,m,r.checked,!1)}}catch(f){c=!0,l=f}finally{try{!a&&d.return&&d.return()}finally{if(c)throw l}}i()}}(o):r.hasAttribute("data-check-all-item")&&function(o){if(o instanceof CustomEvent){var r=o.detail.relatedTarget;if(r.hasAttribute("data-check-all")||r.hasAttribute("data-check-all-item"))return}var a=o.target;if(a instanceof HTMLInputElement){var c=e.querySelector("[data-check-all]");if(c){var l=Array.from(e.querySelectorAll("[data-check-all-item]"));if(t&&n){var u=[l.indexOf(n),l.indexOf(a)].sort(),d=qe(u,2),m=d[0],f=d[1],p=!0,g=!1,h=void 0;try{for(var b,y=l.slice(m,+f+1||9e9)[Symbol.iterator]();!(p=(b=y.next()).done);p=!0){var v=b.value;s(a,v,a.checked,!1)}}catch(E){g=!0,h=E}finally{try{!p&&y.return&&y.return()}finally{if(g)throw h}}}t=!1,n=a;var j=l.length,L=l.filter(function(e){return e instanceof HTMLInputElement&&e.checked}).length;s(a,c,L===j,j>L&&L>0),i()}}}(o))}function r(e){e.target instanceof Element&&e.target.hasAttribute("data-check-all-item")&&(t=e.shiftKey)}function i(){var t=e.querySelector("[data-check-all-count]");if(t){var n=e.querySelectorAll("[data-check-all-item]:checked").length;t.textContent=n.toString()}}return e.addEventListener("mousedown",r),e.addEventListener("change",o),{unsubscribe:function(){e.removeEventListener("mousedown",r),e.removeEventListener("change",o)}}}}),n.on("copy",".js-clipboard-copy",function(e){Ae(e.target),setTimeout(()=>Ae(e.target),2e3)}),l.remoteForm(".js-new-comment-form",async function(t,n){let s;!function(e){const t=e.querySelector(".js-comment-form-error");t&&(t.style.display="none")}(t);try{s=await n.json()}catch(r){!function(e,t){let n="You can't comment at this time";if(t.response&&422===t.response.status){const e=t.response.json;e.errors&&(n+=` — your comment ${e.errors.join(", ")}`)}n+=". ";const s=e.querySelector(".js-comment-form-error");s&&(s.style.display="block",s.classList.remove("d-none"),s.textContent=n)}(t,r)}if(!s)return;t.reset();for(const i of e.querySelectorAll(t,".js-resettable-field",HTMLInputElement))u.changeValue(i,i.getAttribute("data-reset-value")||"");e.query(t,".js-write-tab").click();const o=s.json.updateContent;for(const e in o){const t=o[e],n=document.querySelector(e);n?v.replaceContent(n,t):console.warn(`couldn't find ${e} for immediate update`)}}),t.observe(".js-comment-and-button",{constructor:HTMLButtonElement,initialize(t){i(t.form,"app/assets/modules/github/behaviors/commenting/close.js:29");const n=e.query(t.form,".js-comment-field"),s=t.textContent;let o=!1;function r(n){const r=n.currentTarget;i(r instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/close.js:36");const a=r.value.trim();a!==o&&(o=a,t.textContent=a?e.getAttribute(t,"data-comment-text"):s)}return{add(){n.addEventListener("input",r),n.addEventListener("change",r)},remove(){n.removeEventListener("input",r),n.removeEventListener("change",r)}}}}),n.on("click",".js-comment-edit-button",function(t){const s=e.closest(t.currentTarget,".js-comment");s.classList.add("is-comment-editing"),e.query(s,".js-write-tab").click();const o=e.query(s,".js-comment-field");i(o instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/edit.js:18"),o.focus(),n.fire(o,"change");const r=t.currentTarget.closest(".js-dropdown-details");r&&r.removeAttribute("open")}),n.on("click",".js-comment-hide-button",function(t){const n=e.closest(t.currentTarget,".js-comment").querySelector(".js-minimize-comment");n&&n.classList.remove("d-none");const s=t.currentTarget.closest(".js-dropdown-details");s&&s.removeAttribute("open")}),n.on("click",".js-comment-hide-minimize-form",function(t){e.closest(t.currentTarget,".js-minimize-comment").classList.add("d-none")}),n.on("click",".js-comment-cancel-button",function(t){const n=e.closest(t.currentTarget,"form",HTMLFormElement),s=e.getAttribute(t.currentTarget,"data-confirm-text");if(j.hasDirtyFields(n)&&!confirm(s))return!1;for(const e of n.querySelectorAll("input, textarea"))i(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/edit.js:57"),e.value=e.defaultValue;const o=t.currentTarget.closest(".js-comment");o&&o.classList.remove("is-comment-editing")}),l.remoteForm(".js-comment-delete, .js-comment .js-comment-update, .js-issue-update, .js-comment-minimize, .js-comment-unminimize",function(t,n,s){const o=e.closest(t,".js-comment");o.classList.add("is-comment-loading");const r=o.getAttribute("data-body-version");r&&s.headers.set("X-Body-Version",r)}),l.remoteForm(".js-comment .js-comment-update",async function(t,n){let s;const o=e.closest(t,".js-comment");try{s=await n.json()}catch(m){if(422!==m.response.status)throw m;{const e=JSON.parse(m.response.text);if(e.errors){const t=o.querySelector(".js-comment-update-error");return void(t&&(t.textContent=`There was an error posting your comment: ${e.errors.join(", ")}`,t.style.display="block"))}}}if(!s)return;const a=s.json,c=o.querySelector(".js-comment-body");c&&(c.innerHTML=a.body);const l=o.querySelector(".js-comment-update-error");l&&(l.style.display="none"),o.setAttribute("data-body-version",a.newBodyVersion);const u=o.querySelector(".js-body-version");u instanceof HTMLInputElement&&(u.value=a.newBodyVersion);for(const e of o.querySelectorAll("input, textarea"))i(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/edit.js:121"),e.defaultValue=e.value;o.classList.remove("is-comment-stale","is-comment-editing");const d=o.querySelector(".js-comment-edit-history");if(d instanceof IncludeFragmentElement)d.setAttribute("src",a.editUrl);else{const e=o.querySelector(".js-comment-fragment");if(e){const t=await r.fetchSafeDocumentFragment(document,a.editUrl);e.innerHTML="",e.append(t)}}}),l.remoteForm(".js-comment .js-comment-delete, .js-comment .js-comment-update, .js-comment-minimize, .js-comment-unminimize",async function(t,n){const s=e.closest(t,".js-comment");try{await n.text()}catch(o){if(422!==o.response.status)throw o;{let e;try{e=JSON.parse(o.response.text)}catch(r){}e&&e.stale&&s.classList.add("is-comment-stale")}}s.classList.remove("is-comment-loading")}),l.remoteForm(".js-comment-delete",async function(t,n){await n.json();let s=t.closest(".js-comment-delete-container");s||(s=t.closest(".js-comment-container")||t.closest(".js-line-comments"))&&1!==s.querySelectorAll(".js-comment").length&&(s=e.closest(t,".js-comment")),i(s,"app/assets/modules/github/behaviors/commenting/edit.js:180"),s.remove()}),l.remoteForm(".js-issue-update",async function(t,n){const s=e.closest(t,".js-details-container");s.classList.remove("open");const o=(await n.json()).json;if(null!=o.issue_title){e.query(s,".js-issue-title").textContent=o.issue_title;const t=s.closest(".js-issues-results");if(t){const e=t.querySelector(".js-merge-pull-request textarea");e instanceof HTMLTextAreaElement&&e.value===e.defaultValue&&(e.value=e.defaultValue=o.issue_title)}}document.title=o.page_title;for(const e of t.elements)(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.defaultValue=e.value)}),l.remoteForm(".js-repository-advisory-title-update",async function(t,n){e.closest(t,".js-details-container").classList.remove("open");const s=(await n.json()).json;document.title=s.page_title;for(const e of t.elements)(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.defaultValue=e.value)}),l.remoteForm(".js-repository-advisory-update",async function(t){e.closest(t,".previewable-edit").classList.remove("is-comment-editing");for(const e of t.elements)(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.defaultValue=e.value)}),l.remoteForm(".js-comment-minimize",async function(t,n){await n.json();const s=e.closest(t,".js-comment").querySelector(".js-minimize-comment");s&&s.classList.add("d-none");const o=e.closest(t,".unminimized-comment");o.classList.add("d-none"),o.classList.remove("js-comment");const r=e.closest(t,".js-minimizable-comment-group").querySelector(".minimized-comment");r&&r.classList.remove("d-none"),r&&r.classList.add("js-comment")}),l.remoteForm(".js-comment-unminimize",async function(t,n){await n.json();const s=e.closest(t,".js-minimizable-comment-group"),o=s.querySelector(".unminimized-comment");o&&o.classList.remove("d-none"),o&&o.classList.add("js-comment");const r=s.querySelector(".minimized-comment");r&&r.classList.add("d-none"),r&&r.classList.remove("js-comment")}),s.onFocus(".js-comment-field",function(e){ke(e,!0),e.addEventListener("blur",Se,{once:!0})}),n.on("click",".js-write-tab",function(t){const n=t.currentTarget,s=He(n);setTimeout(()=>{e.query(s,".js-comment-field").focus()});const o=e.closest(n,".js-previewable-comment-form").querySelector("markdown-toolbar");null!=o&&o.classList.remove("d-none")}),n.on("click",".js-preview-tab",function(t){const n=t.currentTarget,s=He(n);setTimeout(()=>{Fe(s)});const o=e.closest(n,".js-previewable-comment-form").querySelector("markdown-toolbar");null!=o&&o.classList.add("d-none"),t.stopPropagation(),t.preventDefault()}),n.on("preview:render",".js-previewable-comment-form",function(t){const n=He(e.query(t.target,".js-preview-tab"));setTimeout(()=>{Fe(n)})});const Ie=new o,Ce=new WeakMap;let _e=!1;async function $e(t,s,o,i,a){const c={};c.text=s,c.authenticity_token=function(t){const n=t.getAttribute("data-preview-authenticity-token"),s=e.closest(t,"form",HTMLFormElement).elements.namedItem("authenticity_token");return null!=n?n:s instanceof HTMLInputElement?s.value:void 0}(t),i&&(c.path=i),o&&(c.original_line=o),a&&(c.line_number=a);const l={url:e.getAttribute(t,"data-preview-url"),data:c};n.fire(t,"preview:setup",l);const u=JSON.stringify(l),d=xe(Ce.get(t)||[],2),m=d[0],f=d[1];if(m===u)return f;_e=!1;const p=Ie.push(function(e){const t=new FormData;for(const n in e.data)null!==e.data[n]&&t.append(n,e.data[n]);return r.fetchText(e.url,{method:"post",body:t})}(l));Ce.set(t,[u,p]);const g=await p;return _e=!0,g}async function Fe(t){const n=e.query(t,".js-comment-field",HTMLTextAreaElement),s=e.query(t,".comment-body"),o=t.querySelector(".js-original-line"),r=t.querySelector(".js-path"),i=t.querySelector(".js-line-number"),a=o instanceof HTMLInputElement?o.value:null,c=r instanceof HTMLInputElement?r.value:null,l=i instanceof HTMLInputElement?i.value:null;_e||(s.innerHTML="

Loading preview…

");try{const e=await $e(t,n.value,a,c,l);s.innerHTML=e||"

Nothing to preview

"}catch(u){s.innerHTML="

Error rendering preview

"}}t.observe(".js-preview-tab",function(t){let n,s,o,r,i;t.addEventListener("mouseenter",()=>{!async function(){if(!n){n=e.closest(t,".js-previewable-comment-form"),s=e.query(n,".js-comment-field",HTMLTextAreaElement);const a=n.querySelector(".js-original-line"),c=n.querySelector(".js-path"),l=n.querySelector(".js-line-number");o=a instanceof HTMLInputElement?a.value:null,r=c instanceof HTMLInputElement?c.value:null,i=l instanceof HTMLInputElement?l.value:null}try{await $e(n,s.value,o,r,i)}catch(a){}}()})}),s.onKey("keydown",".js-comment-field",function(t){const n=t.target;if(i(n instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/preview.js:238"),(t.ctrlKey||t.metaKey)&&"P"===t.key){const s=e.closest(n,".js-previewable-comment-form");s.classList.contains("write-selected")&&(n.blur(),s.dispatchEvent(new CustomEvent("preview:render",{bubbles:!0,cancelable:!1})),t.preventDefault(),t.stopImmediatePropagation())}});const Ne=/^(>[^\n]\n|\s*\n)*\s*(\+1|-1|:\+1*|:-1*)\s*$/m;function Re(t){const n=t.target;i(n instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/commenting/reaction-suggestion.js:27");const s=n.value,o=e.closest(n,".js-reaction-suggestion");if(o)if(Ne.test(s)){o.classList.remove("hide-reaction-suggestion"),o.classList.add("reaction-suggestion");const t=e.getAttribute(o,"data-reaction-markup");o.setAttribute("data-reaction-suggestion-message",t)}else Pe(o)}function Pe(e){e.classList.remove("reaction-suggestion"),e.classList.add("hide-reaction-suggestion"),e.removeAttribute("data-reaction-suggestion-message")}n.on("focusout","#new_comment_field",function(t){const n=t.currentTarget;Pe(e.closest(n,".js-reaction-suggestion"))}),n.on("focusin","#new_comment_field",function(e){Re(e)}),s.onKey("keyup","#new_comment_field",function(e){Re(e)});const De=new WeakMap,Oe=["input[type=submit][data-disable-with]","button[data-disable-with]"].join(", ");function Be(e,t){e instanceof HTMLInputElement?e.value=t:e.innerHTML=t}function Ue(e){for(const t of e.querySelectorAll(Oe)){const n=De.get(t);null!=n&&(i(t instanceof HTMLInputElement||t instanceof HTMLButtonElement,"app/assets/modules/github/behaviors/disable-with.js:56"),Be(t,n),t.hasAttribute("data-disable-invalid")&&!e.checkValidity()||(t.disabled=!1),De.delete(t))}}n.on("submit","form",function(e){for(const n of e.currentTarget.querySelectorAll(Oe)){i(n instanceof HTMLInputElement||n instanceof HTMLButtonElement,"app/assets/modules/github/behaviors/disable-with.js:40"),De.set(n,(t=n)instanceof HTMLInputElement?t.value||"Submit":t.innerHTML||"");const e=n.getAttribute("data-disable-with");e&&Be(n,e),n.disabled=!0}var t},{capture:!0}),n.on("deprecatedAjaxComplete","form",function(e){let t=e.currentTarget,n=e.target;i(t instanceof HTMLFormElement,"app/assets/modules/github/behaviors/disable-with.js:70"),t===n&&Ue(t)}),l.afterRemote(Ue),n.on("menu:activate",".js-select-menu",function(e){e.currentTarget.classList.add("is-dirty")}),n.on("menu:deactivate",".js-select-menu",function(e){e.currentTarget.classList.remove("is-dirty")});const Ve={OS:"Meta",Win:"Meta",Windows:"Meta",Scroll:"ScrollLock",SpaceBar:" ",Left:"ArrowLeft",Right:"ArrowRight",Down:"ArrowDown",Up:"ArrowUp",Del:"Delete",Esc:"Escape"};const ze=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key");if(ze){let e=e=>ze.get.apply(e);/Macintosh.*Safari/.test(navigator.userAgent)&&(e=(e=>{return function(e,t){return t&&/^[a-z]$/.test(e)?e.toUpperCase():e}(ze.get.apply(e),e.shiftKey)})),Object.defineProperty(KeyboardEvent.prototype,"key",{enumerable:!0,configurable:!0,get(){return t=e(this),Ve[t]||t;var t}})}const We=new WeakMap;function Ke(e){return We.has(e)}function Je(t,n,s){const o=s.limit,r=e.query(t,"template",HTMLTemplateElement),a={};for(const i of e.querySelectorAll(t,"input[type=hidden]",HTMLInputElement))a[`${i.name}${i.value}`]=i;let c=r.nextElementSibling;for(;c;){const e=c;c=e.nextElementSibling,e.classList.contains("selected")||e.classList.contains("select-menu-divider")?e.classList.add("d-none"):e.remove()}const l=We.get(t);i(null!=l,"app/assets/modules/github/substring-memory-filter-list.js:69");let u=0,d=document.createDocumentFragment();const m=t.querySelector(".js-divider-suggestions"),f=t.querySelector(".js-divider-rest");function p(t){const s=!(null!=o&&u>=o)&&function(e){return`${e.login} ${e.name}`.toLowerCase().trim()}(t).indexOf(n)>=0;if(s||t.selected){const n=function(t,n,s){if(null!=t.element)return t.element;const o=n.content.cloneNode(!0),r=e.query(o,"input[type=checkbox]",HTMLInputElement);t.type&&(r.name=`reviewer_${t.type}_ids[]`);r.value=t.id;const i=`${r.name}${t.id}`;let a=t.selected;s[i]&&(a=!0,s[i].remove(),delete s[i]);const c=e.query(o,".js-navigation-item");a&&(c.classList.add("selected"),r.checked=!0);t.disabled&&c.classList.add("disabled");const l=o.querySelector(".js-username");l&&(l.textContent=t.login);const u=o.querySelector(".js-description");u&&(u.textContent=t.name);const d=o.querySelector(".js-extended-description");d&&(t.description?d.textContent=t.description:d.remove());return e.query(o,".js-avatar",HTMLImageElement).src=t.avatar,t.element=c,t.element}(t,r,a);n.classList.toggle("d-none",!s),s&&u++,d.appendChild(n)}}if(m&&l.suggestions){for(const e of l.suggestions)p(e);d.childNodes.length&&(m.after(d),m.classList.toggle("d-none",0===u),d=document.createDocumentFragment())}const g=u;for(const e of l.users)p(e);return t.append(d),f&&f.classList.toggle("d-none",u===g||0===g),u}function Ge(e,t){let n=Ze(e,t);if(n&&-1===t.indexOf("/")){n+=Ze(e.substring(e.lastIndexOf("/")+1),t)}return n}function Qe(e,t){const n=e[0],s=t[0],o=e[1],r=t[1];return o>r?-1:os?1:0}function Xe(e){const t=e.toLowerCase().split("");let n="";for(let s=0;s"),o=!0):o&&(r.push(""),o=!1),r.push(t))}e.innerHTML=r.join("")}else{const t=e.innerHTML.trim(),n=t.replace(/<\/?mark>/g,"");t!==n&&(e.innerHTML=n)}}function Ze(e,t){let n=e;if(n===t)return 1;const s=n.length;let o=0,r=0;for(let l=0;l-1?c:Math.max(i,a);if(-1===u)return 0;o+=.1,n[u]===e&&(o+=.1),0===u&&(o+=.8,0===l&&(r=1))," "===n.charAt(u-1)&&(o+=.8),n=n.substring(u+1,s)}const i=t.length,a=o/i;let c=(a*(i/s)+a)/2;return r&&c+.1<1&&(c+=.1),c}const et=new WeakMap,tt=new WeakMap,nt=new WeakMap;function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return 0;const s=t.toLowerCase(),o=null!=n.text?n.text:rt,r=n.limit,i=n.score;let a=et.get(e);const c=Array.from(e.children);a||(a=Array.from(e.children),et.set(e,a));for(const f of c)e.removeChild(f),f.style.display="";const l=document.createDocumentFragment();let u=0,d=0;if(s){const e=Array.from(a);for(const n of e){null==tt.get(n)&&tt.set(n,o(n));const e=i?i(tt.get(n)||"",s,n):Ge(tt.get(n)||"",s);nt.set(n,String(e))}e.sort(ot);const t=Xe(s);for(const o of e)(null==r||u0&&(d++,!0===n.mark&&(Ye(o),Ye(o,s,t)),l.appendChild(o)),u++}else for(const f of a)(null==r||u0));return d}function ot(e,t){const n=parseFloat(nt.get(e)),s=parseFloat(nt.get(t)),o=tt.get(e)||"",r=tt.get(t)||"";return n>s?-1:nr?1:0}function rt(e){if(e.hasAttribute("data-filter-value")){return(e.getAttribute("data-filter-value")||"").toLowerCase().trim()}return e.textContent.toLowerCase().trim()}function it(e){return e.textContent.toLowerCase().trim()}function at(e,t){const n=e.innerHTML;if(t){const s=new RegExp(t,"i");e.innerHTML=n.replace(s,"$&")}else{const t=n.replace(/<\/?mark>/g,"");n!==t&&(e.innerHTML=t)}}function ct(e){return e.textContent.toLowerCase().trim()}function lt(e,t){const n=e.innerHTML;if(t){const s=new RegExp(t,"i");e.innerHTML=n.replace(s,"$&")}else{const t=n.replace(/<\/?mark>/g,"");n!==t&&(e.innerHTML=t)}}function ut(e,t){const n=e.hasAttribute("data-filterable-highlight"),s=parseInt(e.getAttribute("data-filterable-limit"),10)||null;let o=0;switch(e.getAttribute("data-filterable-type")){case"fuzzy":o=st(e,t,{mark:n,limit:s});break;case"substring":o=function(e,t){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return;const o=t.toLowerCase(),r=null!=s.text?s.text:ct,i=s.limit,a=Array.from(e.children).filter(e=>!e.classList.contains("select-menu-no-results"));!0===s.mark?n=lt:"function"==typeof s.mark&&(n=s.mark);let c=0;for(const l of a)-1!==r(l).indexOf(o)?null!=i&&c>=i?(l.style.display="none",l.hidden=!0):(c++,l.style.display="",l.hidden=!1,n&&(n(l),n(l,o))):(l.style.display="none",l.hidden=!0);return c}(e,t,{mark:n,limit:s});break;case"substring-memory":o=Je(e,t,{limit:s});break;default:o=function(e,t){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return;const o=t.toLowerCase(),r=null!=s.text?s.text:it,i=s.limit;!0===s.mark?n=at:"function"==typeof s.mark&&(n=s.mark);let a=0;for(const c of e.children)0===r(c).indexOf(o)?null!=i&&a>=i?(c.style.display="none",c.hidden=!0):(a++,c.style.display="",c.hidden=!1,n&&(n(c),n(c,o))):(c.style.display="none",c.hidden=!0);return a}(e,t,{mark:n,limit:s})}!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.closest(".js-select-menu, details-menu");if(!n)return;const s=function(e){let t=e.querySelector("[data-filterable-notice]");return t||((t=document.createElement("div")).classList.add("sr-only"),t.setAttribute("data-filterable-notice",""),t.setAttribute("aria-live","polite"),e.append(t),t)}(n);s.textContent="",s.textContent=`${t} results found.`}(e,o),e.classList.toggle("filterable-active",t.length>0),e.classList.toggle("filterable-empty",0===o)}t.observe(".js-filterable-field",{constructor:HTMLInputElement,initialize(e){let t=e.value;async function s(e){t!==e.value&&(t=e.value,await f.microtask(),n.fire(e,"filterable:change"))}async function o(){t=e.value,await f.microtask(),n.fire(e,"filterable:change")}return{add(e){e.addEventListener("focus",o),d.addThrottledInputEventListener(e,s),document.activeElement===e&&o()},remove(e){e.removeEventListener("focus",o),d.removeThrottledInputEventListener(e,s)}}}}),n.on("filterable:change",".js-filterable-field",function(e){const t=e.currentTarget;i(t instanceof HTMLInputElement,"app/assets/modules/github/behaviors/filterable.js:84");const n=t.value.trim().toLowerCase(),s=document.querySelectorAll(`[data-filterable-for=${t.id}]`);for(const o of s){if("substring-memory"===o.getAttribute("data-filterable-type")&&!Ke(o))continue;ut(o,n);const e=new CustomEvent("filterable:change",{bubbles:!0,cancelable:!1,detail:{inputField:t}});o.dispatchEvent(e)}}),document.addEventListener("selectmenu:data",function(e){i(e instanceof CustomEvent,"app/assets/modules/github/behaviors/filterable.js:159");const t=e.target,s=e.detail;i(t instanceof HTMLElement,"app/assets/modules/github/behaviors/filterable.js:161");const o=t.querySelector('[data-filterable-type="substring-memory"]');if(o){!function(e,t){We.set(e,t)}(o,s.data);const e=t.querySelector(".js-filterable-field");e&&e===document.activeElement&&n.fire(e,"filterable:change")}});class FilterableInputElement extends HTMLElement{constructor(){super(...arguments),Me(this,"currentQuery",void 0),Me(this,"debounceInputChange",void 0),Me(this,"boundFetchResults",void 0)}connectedCallback(){const e=this.input;e&&(e.setAttribute("autocomplete","off"),e.setAttribute("spellcheck","false"),this.debounceInputChange=c(this.fetchResults.bind(this),300),this.boundFetchResults=this.fetchResults.bind(this),e.addEventListener("focus",this.boundFetchResults),e.addEventListener("change",this.boundFetchResults),e.addEventListener("input",this.debounceInputChange))}disconnectedCallback(){const e=this.input;e&&(e.removeEventListener("focus",this.boundFetchResults),e.removeEventListener("change",this.boundFetchResults),e.removeEventListener("input",this.debounceInputChange))}get input(){const e=this.querySelector("input");return e instanceof HTMLInputElement?e:null}get resultsContainer(){return document.getElementById(this.getAttribute("aria-owns")||"")}get src(){return this.getAttribute("src")||""}set src(e){this.setAttribute("src",e)}async fetchResults(){if(!this.input)return;const e=this.input.value.trim();if(this.currentQuery===e)return;this.currentQuery=e;const t=this.src;if(!t)return;const n=this.resultsContainer;if(!n)return;const s=new URL(t,window.location.origin),o=new URLSearchParams(s.search);o.append("q",e),s.search=o.toString(),this.dispatchEvent(new CustomEvent("loadstart")),this.setAttribute("loading","");try{const e=await r.fetchSafeDocumentFragment(document,s);this.dispatchEvent(new CustomEvent("load")),n.innerHTML="",n.append(e)}catch(i){this.dispatchEvent(new CustomEvent("error"))}this.removeAttribute("loading"),this.dispatchEvent(new CustomEvent("loadend"))}}window.customElements.get("filterable-input")||(window.FilterableInputElement=FilterableInputElement,window.customElements.define("filterable-input",FilterableInputElement)),t.observe("details-menu filterable-input",{constructor:FilterableInputElement,initialize(e){const t=document.getElementById(e.getAttribute("aria-owns")||"");if(!t)return;let n;e.addEventListener("load",()=>{n=document.activeElement&&t.contains(document.activeElement)&&document.activeElement.id?document.activeElement.id:null}),e.addEventListener("loadend",()=>{if(n){const s=t.querySelector(`#${n}`)||t.querySelector('[role^="menu"]');s?s.focus():e.input&&e.input.focus()}})}}),n.on("click",".js-flash-close",function(e){const t=e.currentTarget.closest(".flash-messages"),n=e.currentTarget.closest(".flash");i(n,"app/assets/modules/github/behaviors/flash.js:24"),n.remove(),t&&!t.querySelector(".flash")&&t.remove()});const dt=new WeakMap;function mt(e,t){return!!e&&e.length>=t}function ft(e){return!!e&&/\d/.test(e)}function pt(e){return!!e&&/[a-z]/.test(e)}function gt(e){return null==e.getAttribute("data-pjax-preserve-scroll")&&0}function ht(e){let t=e;for(;t;){const e=t.getAttribute("data-pjax");if(e&&"true"!==e)return document.querySelector(e);t=t.parentElement&&t.parentElement.closest("[data-pjax]")}return e.closest("[data-pjax-container]")}document.addEventListener("focus",function(e){const t=e.target;dt.get(t)||(n.fire(t,"focusin:delay"),dt.set(t,!0))},{capture:!0}),document.addEventListener("blur",function(e){setTimeout(function(){const t=e.target;t!==document.activeElement&&(n.fire(t,"focusout:delay"),dt.delete(e.target))},200)},{capture:!0}),l.remoteForm(".js-immediate-updates",async function(e,t){let n;try{n=(await t.json()).json.updateContent}catch(s){s.response.json&&(n=s.response.json.updateContent)}if(n)for(const o in n){const e=n[o],t=document.querySelector(o);t&&v.replaceContent(t,e)}}),l.remoteForm(".js-notice-dismiss",async function(t,n){await n.text(),e.closest(t,".js-notice").remove()}),t.observe("password-strength",function(t){const n=e.query(t,"input",HTMLInputElement),s=Number(t.getAttribute("data-minimum-character-count")),o=Number(t.getAttribute("data-passphrase-length")),r=t.querySelector("p.note")||t.querySelector(".form-control-note");n.addEventListener("keyup",()=>{r&&function(t,n,s,o){const r=e.query(t,"span.js-more-than-n-chars"),i=e.query(t,"span.js-min-chars"),a=e.query(t,"span.js-number-requirement"),c=e.query(t,"span.js-letter-requirement");if(function(e){for(const t of e)t.classList.remove("text-green","text-red")}([r,i,a,c]),mt(n,o))r.classList.add("text-green");else if(function(e,t){return mt(e,t)&&ft(e)&&pt(e)}(n,s))i.classList.add("text-green"),a.classList.add("text-green"),c.classList.add("text-green");else{const e=mt(n,s)?"text-green":"text-red",t=ft(n)?"text-green":"text-red",o=pt(n)?"text-green":"text-red";r.classList.add("text-red"),i.classList.add(e),a.classList.add(t),c.classList.add(o)}}(r,n.value,s,o)})}),n.on("click",".js-permalink-shortcut",function(e){const t=e.currentTarget;i(t instanceof HTMLAnchorElement,"app/assets/modules/github/behaviors/permalink.js:16");try{m.replaceState(null,"",t.href+window.location.hash)}catch(n){window.location=t.href+window.location.hash}e.preventDefault()}),n.on("click","[data-pjax] a, a[data-pjax]",function(e){i(e instanceof MouseEvent,"app/assets/modules/github/behaviors/pjax.js:54");const t=e.currentTarget;if(t instanceof HTMLAnchorElement){if(null!=t.getAttribute("data-skip-pjax"))return;if(null!=t.getAttribute("data-remote"))return;const n=ht(t);n&&L.click(e,{container:n,scrollTo:gt(t)})}}),n.on("submit","form[data-pjax]",function(e){i(e instanceof Event,"app/assets/modules/github/behaviors/pjax.js:75");const t=e.target,n=ht(t);n&&L.submit(e,{container:n,scrollTo:gt(t)})}),n.on("change","select[data-pjax]",function(e){const t=e.currentTarget;i(t instanceof HTMLSelectElement,"app/assets/modules/github/behaviors/pjax.js:88");const n=ht(t);n&&K({url:t.value,container:n})}),async function(){await b.ready;const e=document.getElementById("js-pjax-loader-bar");if(!e)return;const t=e.firstElementChild;if(!(t instanceof HTMLElement))return;let n=0,s=null,o=null;function r(e){0===e&&(null==o&&(o=getComputedStyle(t).transition),t.style.transition="none"),n=e,t.style.width=`${n}%`,0===e&&(t.clientWidth,t.style.transition=o||"")}function i(){0===n&&(n=12),r(Math.min(n+3,95)),s=setTimeout(i,500)}document.addEventListener("pjax:start",function(){r(0),e.classList.add("is-loading"),s=setTimeout(i,0)}),document.addEventListener("pjax:end",function(){s&&clearTimeout(s),r(100),e.classList.remove("is-loading")}),document.addEventListener("pjax:timeout",function(e){e.preventDefault()})}();let bt=null;const yt="last_pjax_request",vt="pjax_start",jt="pjax_end";function Lt(e,t){return e.split("/",3).join("/")===t.split("/",3).join("/")}window.performance.getEntriesByName&&(document.addEventListener("pjax:start",function(e){e instanceof CustomEvent&&e.detail&&e.detail.url&&(window.performance.mark(vt),bt=e.detail.url)}),document.addEventListener("pjax:end",async function(){if(await f.microtask(),!window.performance.getEntriesByName(vt).length)return;window.performance.mark(jt),window.performance.measure(yt,vt,jt);const e=window.performance.getEntriesByName(yt).pop(),t=e?e.duration:null;t&&(bt&&Le({requestUrl:bt,pjaxDuration:Math.round(t)}),window.performance.clearMarks(vt),window.performance.clearMarks(jt),window.performance.clearMeasures(yt))})),document.addEventListener("pjax:click",function(e){if(window.onbeforeunload)return e.preventDefault()}),n.on("pjax:click","#js-repo-pjax-container a[href]",function(e){i(e.currentTarget instanceof HTMLAnchorElement,"app/assets/modules/github/behaviors/pjax/exceptions.js:25");const t=e.currentTarget.pathname;Lt(t,location.pathname)?function(e){const t=e.split("/")[3];return-1!==["projects","releases","tags","wiki","community"].indexOf(t)&&Lt(e,location.pathname)}(t)&&e.preventDefault():e.preventDefault()}),n.on("pjax:click",".js-comment-body",function(e){const t=e.target;t instanceof HTMLAnchorElement&&"files"===t.pathname.split("/")[3]&&e.preventDefault()});const Et={};function wt(e){const t=e.target;if(i(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement,"app/assets/modules/github/behaviors/quick-submit.js:18"),(e.ctrlKey||e.metaKey)&&"Enter"===e.key){const n=t.form;i(n instanceof HTMLFormElement,"app/assets/modules/github/behaviors/quick-submit.js:22");const s=n.querySelector("input[type=submit], button[type=submit]");if(e.shiftKey){const e=n.querySelector(".js-quick-submit-alternative");(e instanceof HTMLInputElement||e instanceof HTMLButtonElement)&&!e.disabled&&u.submit(n,e)}else(s instanceof HTMLInputElement||s instanceof HTMLButtonElement)&&s.disabled||u.submit(n);e.preventDefault()}}function Tt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s{await b.ready,Et[document.location.pathname]=Array.from(document.querySelectorAll("head [data-pjax-transient]"))})(),document.addEventListener("pjax:beforeReplace",function(e){i(e instanceof CustomEvent,"app/assets/modules/github/behaviors/pjax/head.js:14");const t=e.detail.contents;for(let n=0;n/g,">")}var St={INPUT:function(e){return e instanceof HTMLInputElement&&e.checked?"[x] ":"[ ] "},CODE:function(e){var t=e.textContent;return e.parentNode&&"PRE"===e.parentNode.nodeName?(e.textContent="```\n"+t.replace(/\n+$/,"")+"\n```",e):t.indexOf("`")>=0?"`` "+t+" ``":"`"+t+"`"},PRE:function(e){var t=e.parentNode;if(t instanceof HTMLElement&&"DIV"===t.nodeName&&t.classList.contains("highlight")){var n=t.className.match(/highlight-source-(\S+)/),s=n?n[1]:"",o=e.textContent.replace(/\n+$/,"");e.textContent="```"+s+"\n"+o+"\n```",e.append("\n\n")}return e},STRONG:function(e){return"**"+e.textContent+"**"},EM:function(e){return"_"+e.textContent+"_"},BLOCKQUOTE:function(e){var t=e.textContent.trim().replace(/^/gm,"> "),n=document.createElement("pre");return n.textContent=t+"\n\n",n},A:function(e){var t=e.textContent,n=e.getAttribute("href");return Tt(e,"user-mention","team-mention")?t:Tt(e,"issue-link")&&/^#\d+$/.test(t)?t:/^https?:/.test(t)&&t===n?t:n?"["+t+"]("+n+")":t},IMG:function(e){var t=e.getAttribute("alt")||"";if(t&&Tt(e,"emoji"))return t;var n=e.getAttribute("src");if(!n)throw new Error;var s=e.hasAttribute("width")?' width="'+kt(e.getAttribute("width")||"")+'"':"",o=e.hasAttribute("height")?' height="'+kt(e.getAttribute("height")||"")+'"':"";return s||o?''+kt(t)+'':"!["+t+"]("+n+")"},LI:function(e){var t=e.parentNode;if(!t)throw new Error;var n,s,o,r="";(s=(n=e).childNodes[0],o=n.childNodes[1],s&&n.childNodes.length<3&&!("OL"!==s.nodeName&&"UL"!==s.nodeName||o&&(o.nodeType!==Node.TEXT_NODE||o.textContent.trim())))||(r="OL"===t.nodeName?At>0&&!t.previousSibling?qt(e)+At+1+"\\. ":qt(e)+1+". ":"* ");var i=r.replace(/\S/g," "),a=e.textContent.trim().replace(/^/gm,i),c=document.createElement("pre");return c.textContent=a.replace(i,r),c},OL:function(e){var t=document.createElement("li");return t.appendChild(document.createElement("br")),e.append(t),e},H1:function(e){var t=parseInt(e.nodeName.slice(1));return e.prepend(Array(t+1).join("#")+" "),e},UL:function(e){return e}};St.UL=St.OL;for(var Mt=2;Mt<=6;++Mt)St["H"+Mt]=St.H1;function xt(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return e.nodeName in St&&!function(e){return e instanceof HTMLAnchorElement&&1===e.childNodes.length&&e.childNodes[0]instanceof HTMLImageElement&&e.childNodes[0].src===e.href}(e)&&(function(e){return"IMG"===e.nodeName||null!=e.firstChild}(e)||function(e){return"INPUT"===e.nodeName&&e instanceof HTMLInputElement&&"checkbox"===e.type}(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),s=[],o=n.nextNode();o;)o instanceof HTMLElement&&s.push(o),o=n.nextNode();s.reverse();var r=!0,i=!1,a=void 0;try{for(var c,l=s[Symbol.iterator]();!(r=(c=l.next()).done);r=!0)t(o=c.value,St[o.nodeName](o))}catch(u){i=!0,a=u}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}}var Ht=new WeakMap,It=0;function Ct(e){for(var t=e;t=t.parentElement;)if(Ht.has(t))return t}function _t(e){var t,n=!0,s=!1,o=void 0;try{for(var r,i=e.querySelectorAll("textarea")[Symbol.iterator]();!(n=(r=i.next()).done);n=!0){var a=r.value;if(a instanceof HTMLTextAreaElement&&!((t=a).offsetWidth<=0&&t.offsetHeight<=0))return a}}catch(c){s=!0,o=c}finally{try{!n&&i.return&&i.return()}finally{if(s)throw o}}}function $t(e){if(!function(e){return e.defaultPrevented||"r"!==e.key||e.metaKey||e.altKey||e.shiftKey||e.ctrlKey||e.target instanceof HTMLElement&&(t=e.target,n=t.nodeName.toLowerCase(),s=(t.getAttribute("type")||"").toLowerCase(),"select"===n||"textarea"===n||"input"===n&&"submit"!==s&&"reset"!==s||t.isContentEditable);var t,n,s}(e)){var t=window.getSelection(),n=void 0;try{n=t.getRangeAt(0)}catch(s){return}Ft(t.toString(),n)&&e.preventDefault()}}function Ft(e,t){var n=e.trim();if(!n)return!1;var s=t.startContainer;if(!s)return!1;if(s.nodeType!==Node.ELEMENT_NODE&&(s=s.parentNode),!(s instanceof Element))return!1;var o=Ct(s);if(!o)return!1;var r=o.getAttribute("data-quote-markdown");if(null!=r)try{n=function(e){var t=document.body;if(!t)return"";var n=document.createElement("div");n.appendChild(e),n.style.cssText="position:absolute;left:-9999px;",t.appendChild(n);var s="";try{var o=window.getSelection(),r=document.createRange();r.selectNodeContents(n),o.removeAllRanges(),o.addRange(r),s=o.toString(),o.removeAllRanges(),r.detach()}finally{t.removeChild(n)}return s}(function(e,t){var n=e.startContainer;if(!(n&&n.parentNode&&n.parentNode instanceof HTMLElement))throw new Error("the range must start within an HTMLElement");var s=n.parentNode,o=e.cloneContents();if(t){var r=o.querySelector(t);r&&(o=document.createDocumentFragment()).appendChild(r)}At=0;var i=s.closest("li");if(i&&i.parentNode&&("OL"===i.parentNode.nodeName&&(At=qt(i)),!o.querySelector("li"))){var a=document.createElement("li");if(!i.parentNode)throw new Error;var c=document.createElement(i.parentNode.nodeName);a.appendChild(o),c.appendChild(a),(o=document.createDocumentFragment()).appendChild(c)}return xt(o,function(e,t){return e.replaceWith(t)}),o}(t,r)).replace(/^\n+/,"").replace(/\s+$/,"")}catch(c){setTimeout(function(){throw c})}if(!o.dispatchEvent(new CustomEvent("quote-selection",{bubbles:!0,cancelable:!0,detail:{range:t,selectionText:n}})))return!0;var i=_t(o);if(!i)return!1;var a="> "+n.replace(/\n/g,"\n> ")+"\n\n";return i.value&&(a=i.value+"\n\n"+a),i.value=a,i.focus(),i.selectionStart=i.value.length,i.scrollTop=i.scrollHeight,!0}function Nt(e){const t=e||window.location,n=document.head&&document.head.querySelector("meta[name=session-resume-id]");return n instanceof HTMLMetaElement&&n.content||t.pathname}t.observe(".js-quote-selection-container",{subscribe:function(e){return function(e){It+=Ht.has(e)?0:1,Ht.set(e,1),document.addEventListener("keydown",$t)}(e),{unsubscribe:function(){!function(e){It-=Ht.has(e)?1:0,Ht.delete(e),It||document.removeEventListener("keydown",$t)}(e)}}}}),n.on("click",".js-comment-quote-reply",function(t){let n=t.currentTarget;const s=document.body;i(s,"app/assets/modules/github/behaviors/quote-selection.js:13");const o=e.closest(n,".js-comment"),r=e.query(o,".js-comment-body"),a=window.getSelection();"Range"===a.type&&r.contains(a.anchorNode)||(a.removeAllRanges(),a.selectAllChildren(r)),Ft(a.toString(),a.getRangeAt(0))}),document.addEventListener("toggle",function(e){const t=e.target;if(!(t instanceof Element&&t.hasAttribute("open")))return;const n=t.querySelector(".js-comment-quote-reply.d-none");if(!n)return;const s=Ct(t);s&&(s.querySelector(".js-inline-comment-form-container")||_t(s))&&n.classList.remove("d-none")},{capture:!0}),t.observe(".has-removed-contents",function(){let e;return{add(t){e=Array.from(t.childNodes);for(const n of e)t.removeChild(n);const s=t.closest("form");s&&n.fire(s,"change")},remove(t){for(const n of e)t.appendChild(n);const s=t.closest("form");s&&n.fire(s,"change")}}});let Rt=null;function Pt(e){const t=`session-resume:${e}`,n=[];for(const r of document.querySelectorAll(".js-session-resumable"))(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)&&n.push(r);const s=n.filter(e=>(function(e){return e.id&&e.value!==e.defaultValue&&e.form!==Rt})(e)).map(e=>[e.id,e.value]);if(s.length)try{sessionStorage.setItem(t,JSON.stringify(s))}catch(o){}}async function Dt(e){const t=`session-resume:${e}`;let n;try{n=sessionStorage.getItem(t)}catch(r){}if(!n)return;try{sessionStorage.removeItem(t)}catch(r){}const s=[];for(const i of JSON.parse(n)){var o=xe(i,2);const e=o[0],t=o[1],n=new CustomEvent("session:resume",{bubbles:!0,cancelable:!0,detail:{targetId:e,targetValue:t}});if(document.dispatchEvent(n)){const n=document.getElementById(e);n&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.value===n.defaultValue&&(n.value=t,s.push(n))}}await Promise.resolve();for(const i of s)i.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))}window.addEventListener("submit",async e=>{Rt=e.target,await Promise.resolve(),e.defaultPrevented&&(Rt=null)},{capture:!0}),window.addEventListener("pageshow",function(){Dt(Nt())}),window.addEventListener("pjax:end",function(){Dt(Nt())}),window.addEventListener("pagehide",function(){Pt(Nt())}),window.addEventListener("pjax:beforeReplace",function(e){const t=e.detail.previousState,n=t?t.url:null;if(n)Pt(Nt(new URL(n)));else{const e=new Error("pjax:beforeReplace event.detail.previousState.url is undefined");setTimeout(function(){throw e})}}),t.observe("textarea.js-size-to-fit",{constructor:HTMLTextAreaElement,subscribe:function(e){var t=null,n=!1,s=void 0,o=void 0,r=void 0;function i(t){if(s!==t.clientX||o!==t.clientY){var a=e.style.height;r&&r!==a&&(n=!0,e.style.maxHeight="",e.removeEventListener("mousemove",i)),r=a}s=t.clientX,o=t.clientY}var a=e.ownerDocument,c=a.documentElement;function l(){if(!(n||e.value===t||e.offsetWidth<=0&&e.offsetHeight<=0)){var s=function(){for(var t=0,n=e;n!==a.body&&null!==n;)t+=n.offsetTop||0,n=n.offsetParent;var s=t-a.defaultView.pageYOffset;return{top:s,bottom:c.clientHeight-(s+e.offsetHeight)}}(),o=s.top,i=s.bottom;if(!(o<0||i<0)){var l=Number(getComputedStyle(e).height.replace(/px/,""))+i;e.style.maxHeight=l-100+"px";var u=e.parentElement;if(u instanceof HTMLElement){var d=u.style.height;u.style.height=getComputedStyle(u).height,e.style.height="auto",e.style.height=e.scrollHeight+"px",u.style.height=d,r=e.style.height}t=e.value}}}function u(){n=!1,e.style.height="",e.style.maxHeight=""}e.addEventListener("mousemove",i),e.addEventListener("input",l),e.addEventListener("change",l);var d=e.form;return d&&d.addEventListener("reset",u),e.value&&l(),{unsubscribe:function(){e.removeEventListener("mousemove",i),e.removeEventListener("input",l),e.removeEventListener("change",l),d&&d.removeEventListener("reset",u)}}}}),l.remoteForm(".js-social-form",async function(t,n){const s=await n.json(),o=e.closest(t,".js-social-container");for(const e of o.querySelectorAll(".js-social-count"))e.textContent=s.json.count});const Ot=new Map,Bt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s3&&void 0!==arguments[3]?arguments[3]:rn;this.strings=e,this.values=t,this.type=n,this.partCallback=s}getHTML(){const e=this.strings.length-1;let t="",n=!0;for(let s=0;s-1?o=\/]+)[ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*)$/;function Gt(e){const t=e.lastIndexOf(">");return e.indexOf("<",t+1)>-1?e.length:t}class Qt{constructor(e,t,n,s,o){this.type=e,this.index=t,this.name=n,this.rawName=s,this.strings=o}}const Xt=e=>-1!==e.index;class Yt{constructor(e,t){this.parts=[],this.element=t;const n=this.element.content,s=document.createTreeWalker(n,133,null,!1);let o=-1,r=0;const i=[];let a,c;for(;s.nextNode();){o++,a=c;const t=c=s.currentNode;if(1===t.nodeType){if(!t.hasAttributes())continue;const n=t.attributes;let s=0;for(let e=0;e=0&&s++;for(;s-- >0;){const s=e.strings[r],i=Jt.exec(s)[1],a=n.getNamedItem(i),c=a.value.split(Kt);this.parts.push(new Qt("attribute",o,a.name,i,c)),t.removeAttribute(a.name),r+=c.length-1}}else if(3===t.nodeType){const e=t.nodeValue;if(e.indexOf(zt)<0)continue;const n=t.parentNode,s=e.split(Kt),a=s.length-1;r+=a;for(let r=0;ren(t)?(t=t(e),tn):null===t?void 0:t,en=e=>"function"==typeof e&&!0===e.__litDirective,tn={},nn=e=>null===e||!("object"==typeof e||"function"==typeof e);class sn{constructor(e,t,n,s){this.instance=e,this.element=t,this.name=n,this.strings=s,this.size=s.length-1,this._previousValues=[]}_interpolate(e,t){const n=this.strings,s=n.length-1;let o="";for(let r=0;r0){s=t[n-1].endNode=document.createTextNode(""),this._insert(s)}e=new on(this.instance,s,this.endNode),t.push(e)}e.setValue(s),n++}if(0===n)this.clear(),this._previousValue=void 0;else if(n{this._previousValue===e&&this.setValue(t)})}clear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.startNode;cn(this.startNode.parentNode,e.nextSibling,this.endNode)}}const rn=(e,t,n)=>{if("attribute"===t.type)return new sn(e,n,t.name,t.strings);if("node"===t.type)return new on(e,n,n.nextSibling);throw new Error(`Unknown part type ${t.type}`)};class an{constructor(e,t,n){this._parts=[],this.template=e,this._partCallback=t,this._getTemplate=n}update(e){let t=0;for(const n of this._parts)n?void 0===n.size?(n.setValue(e[t]),t++):(n.setValue(e,t),t+=n.size):t++}_clone(){const e=this.template.element.content.cloneNode(!0),t=this.template.parts;if(t.length>0){const n=document.createTreeWalker(e,133,null,!1);let s=-1;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:null,s=t;for(;s!==n;){const t=s.nextSibling;e.removeChild(s),s=t}};function ln(e,t){e.addEventListener("compositionstart",yn),e.addEventListener("compositionend",yn),e.addEventListener("keydown",fn),t.addEventListener("click",pn)}function un(e,t){e.removeAttribute("aria-activedescendant"),e.removeEventListener("compositionstart",yn),e.removeEventListener("compositionend",yn),e.removeEventListener("keydown",fn),t.removeEventListener("click",pn)}var dn=!1,mn=!!navigator.userAgent.match(/Macintosh/);function fn(e){if(!(e.shiftKey||e.metaKey||e.altKey)){var t=e.currentTarget;if((t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement)&&!dn){var n=document.getElementById(t.getAttribute("aria-owns")||"");if(n)switch(e.key){case"Enter":case"Tab":(function(e,t){var n=t.querySelector('[aria-selected="true"]');return!(!n||"true"===n.getAttribute("aria-disabled")||(gn(n),0))})(0,n)&&e.preventDefault();break;case"Escape":bn(n);break;case"ArrowDown":hn(t,n,1),e.preventDefault();break;case"ArrowUp":hn(t,n,-1),e.preventDefault();break;case"n":mn&&e.ctrlKey&&(hn(t,n,1),e.preventDefault());break;case"p":mn&&e.ctrlKey&&(hn(t,n,-1),e.preventDefault())}}}}function pn(e){if(e.target instanceof Element){var t=e.target.closest('[role="option"]');t&&(gn(t),e.preventDefault())}}function gn(e){e.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0}))}function hn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t.querySelector('[aria-selected="true"]'),o=Array.from(t.querySelectorAll('[role="option"]')),r=o.indexOf(s),i=1===n?0:o.length-1;if(s&&r>=0){var a=r+n;a>=0&&a1&&void 0!==arguments[1]?arguments[1]:t.selectionEnd),s=e.query(n,".text-field-mirror-marker"),o=n.getBoundingClientRect(),r=s.getBoundingClientRect();return setTimeout(()=>{n.remove()},5e3),{top:r.top-o.top,left:r.left-o.left}}const wn=new WeakMap,Tn={};class qn{constructor(e){Me(this,"setupHandler",void 0),Me(this,"teardownHandler",void 0),Me(this,"textarea",void 0),Me(this,"types",void 0),Me(this,"suggester",void 0),Me(this,"suggestions",void 0),Me(this,"justPasted",void 0),Me(this,"currentSearch",void 0),Me(this,"suggestionsLoadedHandler",void 0),Me(this,"deactivateHandler",void 0),Me(this,"pasteHandler",void 0),Me(this,"inputHandler",void 0),Me(this,"escapeHandler",void 0),Me(this,"commitHandler",void 0),this.setupHandler=this.setup.bind(this),this.teardownHandler=this.teardown.bind(this),this.textarea=e.input,this.types=e.types,this.suggester=e.suggester,this.suggestions=document.createElement("div"),this.suggestionsLoadedHandler=this.onSuggestionsLoaded.bind(this),this.deactivateHandler=this.deactivate.bind(this),this.pasteHandler=this.onPaste.bind(this),this.inputHandler=this.onInput.bind(this),this.escapeHandler=this.onEscapeKeydown.bind(this),this.commitHandler=this.onComboboxCommit.bind(this)}setup(){const e=this.textarea.form;i(e,"app/assets/modules/github/suggester.js:103"),e.addEventListener("reset",this.deactivateHandler),this.textarea.addEventListener("paste",this.pasteHandler),this.textarea.addEventListener("input",this.inputHandler),this.textarea.addEventListener("keydown",this.escapeHandler),this.suggester.addEventListener("combobox-commit",this.commitHandler),this.textarea.addEventListener("focusout:delay",this.teardownHandler),this.loadSuggestions()}teardown(){this.deactivate();const e=this.textarea.form;i(e,"app/assets/modules/github/suggester.js:119"),e.removeEventListener("reset",this.deactivateHandler),this.textarea.removeEventListener("paste",this.pasteHandler),this.textarea.removeEventListener("input",this.inputHandler),this.textarea.removeEventListener("keydown",this.escapeHandler),this.suggester.removeEventListener("combobox-commit",this.commitHandler),this.textarea.removeEventListener("focusout:delay",this.teardownHandler),this.suggestionsLoadedHandler=function(){}}onPaste(){this.deactivate(),this.justPasted=!0}onInput(){this.justPasted?this.justPasted=!1:this.checkQuery()}onEscapeKeydown(e){this.suggester.hidden||"Escape"===e.key&&(this.deactivate(),e.stopImmediatePropagation(),e.preventDefault())}_getDataValue(e){return this.currentSearch&&this.currentSearch.type.getValue?this.currentSearch.type.getValue(e):e.getAttribute("data-value")}_findIndexOfPick(e,t){let n=1;for(const s of e){if(this._getDataValue(s)===t)return n;n++}return-1}onComboboxCommit(e){let t=e.target;if(i(t instanceof HTMLElement,"app/assets/modules/github/suggester.js:176"),!t.hasAttribute("data-value"))return;const n=this._getDataValue(t);if(!n)return;const s=this.currentSearch;if(!s)return;let o=this.textarea.value.substring(0,s.endIndex);const r=this.textarea.value.substring(s.endIndex);o=o.replace(s.type.match,s.type.replace.replace("$value",n)),this.textarea.value=o+r,this.deactivate(),this.textarea.focus(),this.textarea.selectionStart=o.length,this.textarea.selectionEnd=o.length}mentionData(){const t=this.suggestions.querySelector("[data-mentions-json]");if(!t)return;let n=wn.get(t);if(!n){const s=e.getAttribute(t,"data-mentions-json");n=JSON.parse(s),wn.set(t,n)}return n}async checkQuery(){const e=this.searchQuery();if(e){const t="mention"===e.type.typeid?this.mentionData():null;if(this.currentSearch&&this.currentSearch===e.query)return;return this.currentSearch=e,void(await this.search(t)?this.activate(e.startIndex):this.deactivate())}this.currentSearch=null,this.deactivate()}renderResults(e,t){const n=e=>{const t="user"===e.type?e.login:e.name,n="user"===e.type?e.name:e.description,s=`${t} ${n}`;return Bt`] lineOffset=[1587] 18:32:07 [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.216 s - in com.gargoylesoftware.htmlunit.ExternalTest