blob: 680dc80ece3ca9986ba4e1a8ea5025b567b13d02 [file] [log] [blame]
var R=Object.defineProperty;var ee=e=>R(e,"__esModule",{value:!0});var te=(e,t)=>()=>(e&&(t=e(e=0)),t);var oe=(e,t)=>{ee(e);for(var o in t)R(e,o,{get:t[o],enumerable:!0})};var G={};oe(G,{default:()=>re});function ne(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),o=function(n,i){return!(t[n]===void 0||t[n]===i)};if(t.opacity<1||o("zIndex","auto")||o("transform","none")||o("mixBlendMode","normal")||o("filter","none")||o("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;e=e.parentElement}return!1}function L(e){for(;e;){if(e.localName==="dialog")return e;e=e.parentElement}return null}function U(e){e&&e.blur&&e!==document.body&&e.blur()}function ie(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return!0;return!1}function T(e){return!e||!e.hasAttribute("method")?!1:e.getAttribute("method").toLowerCase()==="dialog"}function B(e){if(this.dialog_=e,this.replacedStyleTop_=!1,this.openAsModal_=!1,e.hasAttribute("role")||e.setAttribute("role","dialog"),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),"returnValue"in e||(e.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(e,{attributes:!0,attributeFilter:["open"]})}else{var o=!1,n=function(){o?this.downgradeModal():this.maybeHideModal(),o=!1}.bind(this),i,a=function(u){if(u.target===e){var p="DOMNodeRemoved";o|=u.type.substr(0,p.length)===p,window.clearTimeout(i),i=window.setTimeout(n,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(u){e.addEventListener(u,a)})}Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("click",this.backdropClick_.bind(this))}var y,s,I,g,z,V,$,F,re,W=te(()=>{y=window.CustomEvent;(!y||typeof y=="object")&&(y=function(t,o){o=o||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!o.bubbles,!!o.cancelable,o.detail||null),n},y.prototype=window.Event.prototype);B.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&document.body.contains(this.dialog_)||this.downgradeModal()},downgradeModal:function(){!this.openAsModal_||(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),s.dm.removeDialog(this))},setOpen:function(e){e?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropClick_:function(e){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var o=document.createEvent("MouseEvents");o.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(o),e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector("[autofocus]:not([disabled])");if(!e&&this.dialog_.tabIndex>=0&&(e=this.dialog_),!e){var t=["button","input","keygen","select","textarea"],o=t.map(function(n){return n+":not([disabled])"});o.push('[tabindex]:not([disabled]):not([tabindex=""])'),e=this.dialog_.querySelector(o.join(", "))}U(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=e,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!document.body.contains(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!s.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");ne(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,s.needsCentering(this.dialog_)?(s.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(e){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),e!==void 0&&(this.dialog_.returnValue=e);var t=new y("close",{bubbles:!1,cancelable:!1});this.dialog_.dispatchEvent(t)}};s={};s.reposition=function(e){var t=document.body.scrollTop||document.documentElement.scrollTop,o=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,o)+"px"};s.isInlinePositionSetByStylesheet=function(e){for(var t=0;t<document.styleSheets.length;++t){var o=document.styleSheets[t],n=null;try{n=o.cssRules}catch(m){}if(!!n)for(var i=0;i<n.length;++i){var a=n[i],u=null;try{u=document.querySelectorAll(a.selectorText)}catch(m){}if(!(!u||!ie(u,e))){var p=a.style.getPropertyValue("top"),w=a.style.getPropertyValue("bottom");if(p&&p!=="auto"||w&&w!=="auto")return!0}}}return!1};s.needsCentering=function(e){var t=window.getComputedStyle(e);return t.position!=="absolute"||e.style.top!=="auto"&&e.style.top!==""||e.style.bottom!=="auto"&&e.style.bottom!==""?!1:!s.isInlinePositionSetByStylesheet(e)};s.forceRegisterDialog=function(e){if((window.HTMLDialogElement||e.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",e),e.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new B(e)};s.registerDialog=function(e){e.showModal||s.forceRegisterDialog(e)};s.DialogManager=function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=1e5+150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var o=[];t.forEach(function(n){for(var i=0,a;a=n.removedNodes[i];++i){if(a instanceof Element)a.localName==="dialog"&&o.push(a);else continue;o=o.concat(a.querySelectorAll("dialog"))}}),o.length&&e(o)}))};s.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})};s.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()};s.DialogManager.prototype.updateStacking=function(){for(var e=this.zIndexHigh_,t=0,o;o=this.pendingDialogStack[t];++t)o.updateZIndex(--e,--e),t===0&&(this.overlay.style.zIndex=--e);var n=this.pendingDialogStack[0];if(n){var i=n.dialog.parentNode||document.body;i.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)};s.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=L(e);){for(var t=0,o;o=this.pendingDialogStack[t];++t)if(o.dialog===e)return t===0;e=e.parentElement}return!1};s.DialogManager.prototype.handleFocus_=function(e){if(!this.containedByTopDialog_(e.target)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),U(e.target),this.forwardTab_!==void 0)){var t=this.pendingDialogStack[0],o=t.dialog,n=o.compareDocumentPosition(e.target);return n&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?t.focus_():e.target!==document.documentElement&&document.documentElement.focus()),!1}};s.DialogManager.prototype.handleKey_=function(e){if(this.forwardTab_=void 0,e.keyCode===27){e.preventDefault(),e.stopPropagation();var t=new y("cancel",{bubbles:!1,cancelable:!0}),o=this.pendingDialogStack[0];o&&o.dialog.dispatchEvent(t)&&o.dialog.close()}else e.keyCode===9&&(this.forwardTab_=!e.shiftKey)};s.DialogManager.prototype.checkDOM_=function(e){var t=this.pendingDialogStack.slice();t.forEach(function(o){e.indexOf(o.dialog)!==-1?o.downgradeModal():o.maybeHideModal()})};s.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(e)===1&&this.blockDocument(),this.updateStacking(),!0)};s.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())};s.dm=new s.DialogManager;s.formSubmitter=null;s.useValue=null;window.HTMLDialogElement===void 0&&(I=document.createElement("form"),I.setAttribute("method","dialog"),I.method!=="dialog"&&(g=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method"),g&&(z=g.get,g.get=function(){return T(this)?"dialog":z.call(this)},V=g.set,g.set=function(e){return typeof e=="string"&&e.toLowerCase()==="dialog"?this.setAttribute("method",e):V.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",g))),document.addEventListener("click",function(e){if(s.formSubmitter=null,s.useValue=null,!e.defaultPrevented){var t=e.target;if(!(!t||!T(t.form))){var o=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!o){if(!(t.localName==="input"&&t.type==="image"))return;s.useValue=e.offsetX+","+e.offsetY}var n=L(t);!n||(s.formSubmitter=t)}}},!1),$=HTMLFormElement.prototype.submit,F=function(){if(!T(this))return $.call(this);var e=L(this);e&&e.close()},HTMLFormElement.prototype.submit=F,document.addEventListener("submit",function(e){if(!e.defaultPrevented){var t=e.target;if(!!T(t)){e.preventDefault();var o=L(t);if(!!o){var n=s.formSubmitter;n&&n.form===t?o.close(s.useValue||n.value):o.close(),s.formSubmitter=null}}}},!1));re=s});function K(){let e=document.querySelector(".js-header"),t=document.querySelectorAll(".js-headerMenuButton");t.forEach(n=>{n.addEventListener("click",i=>{i.preventDefault(),e==null||e.classList.toggle("is-active"),n.setAttribute("aria-expanded",String(e==null?void 0:e.classList.contains("is-active")))})});let o=document.querySelector(".js-scrim");o==null||o.addEventListener("click",n=>{n.preventDefault(),e==null||e.classList.remove("is-active"),t.forEach(i=>{i.setAttribute("aria-expanded",String(e==null?void 0:e.classList.contains("is-active")))})})}function J(){let e=document.querySelector(".js-searchForm"),t=document.querySelector(".js-expandSearch"),o=e==null?void 0:e.querySelector("input"),n=document.querySelector(".js-headerLogo"),i=document.querySelector(".js-headerMenuButton");t==null||t.addEventListener("click",()=>{e==null||e.classList.add("go-SearchForm--expanded"),n==null||n.classList.add("go-Header-logo--hidden"),i==null||i.classList.add("go-Header-navOpen--hidden"),o==null||o.focus()}),document==null||document.addEventListener("click",a=>{(e==null?void 0:e.contains(a.target))||(e==null||e.classList.remove("go-SearchForm--expanded"),n==null||n.classList.remove("go-Header-logo--hidden"),i==null||i.classList.remove("go-Header-navOpen--hidden"))})}var C=class{constructor(t){this.el=t;this.setActive=t=>{this.activeIndex=(t+this.slides.length)%this.slides.length,this.el.setAttribute("data-slide-index",String(this.activeIndex));for(let o of this.dots)o.classList.remove("go-Carousel-dot--active");this.dots[this.activeIndex].classList.add("go-Carousel-dot--active");for(let o of this.slides)o.setAttribute("aria-hidden","true");this.slides[this.activeIndex].removeAttribute("aria-hidden"),this.liveRegion.textContent="Slide "+(this.activeIndex+1)+" of "+this.slides.length};var o;this.slides=Array.from(t.querySelectorAll(".go-Carousel-slide")),this.dots=[],this.liveRegion=document.createElement("div"),this.activeIndex=Number((o=t.getAttribute("data-slide-index"))!=null?o:0),this.initSlides(),this.initArrows(),this.initDots(),this.initLiveRegion()}initSlides(){for(let[t,o]of this.slides.entries())t!==this.activeIndex&&o.setAttribute("aria-hidden","true")}initArrows(){var o,n;let t=document.createElement("ul");t.classList.add("go-Carousel-arrows"),t.innerHTML=`
<li>
<button class="go-Carousel-prevSlide" aria-label="Go to previous slide">
<img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_left_gm_grey_24dp.svg" alt="">
</button>
</li>
<li>
<button class="go-Carousel-nextSlide" aria-label="Go to next slide">
<img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_right_gm_grey_24dp.svg" alt="">
</button>
</li>
`,(o=t.querySelector(".go-Carousel-prevSlide"))==null||o.addEventListener("click",()=>this.setActive(this.activeIndex-1)),(n=t.querySelector(".go-Carousel-nextSlide"))==null||n.addEventListener("click",()=>this.setActive(this.activeIndex+1)),this.el.append(t)}initDots(){let t=document.createElement("ul");t.classList.add("go-Carousel-dots");for(let o=0;o<this.slides.length;o++){let n=document.createElement("li"),i=document.createElement("button");i.classList.add("go-Carousel-dot"),o===this.activeIndex&&i.classList.add("go-Carousel-dot--active"),i.innerHTML=`<span class="go-Carousel-obscured">Slide ${o+1}</span>`,i.addEventListener("click",()=>this.setActive(o)),n.append(i),t.append(n),this.dots.push(i)}this.el.append(t)}initLiveRegion(){this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.setAttribute("class","go-Carousel-obscured"),this.liveRegion.textContent=`Slide ${this.activeIndex+1} of ${this.slides.length}`,this.el.appendChild(this.liveRegion)}};var A=class{constructor(t){this.el=t;var o,n,i,a,u;this.data=(o=t.dataset.toCopy)!=null?o:t.innerText,!this.data&&((n=t.parentElement)==null?void 0:n.classList.contains("go-InputGroup"))&&(this.data=(u=this.data||((a=(i=t.parentElement)==null?void 0:i.querySelector("input"))==null?void 0:a.value))!=null?u:""),t.addEventListener("click",p=>this.handleCopyClick(p))}handleCopyClick(t){t.preventDefault();let o=1e3;if(!navigator.clipboard){this.showTooltipText("Unable to copy",o);return}navigator.clipboard.writeText(this.data).then(()=>{this.showTooltipText("Copied!",o)}).catch(()=>{this.showTooltipText("Unable to copy",o)})}showTooltipText(t,o){this.el.setAttribute("data-tooltip",t),setTimeout(()=>this.el.setAttribute("data-tooltip",""),o)}};var H=class{constructor(t){this.el=t;document.addEventListener("click",o=>{this.el.contains(o.target)||this.el.removeAttribute("open")})}};var D=class{constructor(t){this.el=t;this.el.addEventListener("change",o=>{let n=o.target,i=n.value;n.value.startsWith("/")||(i="/"+i),window.location.href=i})}};var O=class{constructor(t){this.el=t;!window.HTMLDialogElement&&!t.showModal&&Promise.resolve().then(()=>(W(),G)).then(({default:i})=>{i.registerDialog(t)});let o=t.id,n=document.querySelector(`[aria-controls="${o}"]`);n&&n.addEventListener("click",()=>{var i;this.el.showModal?this.el.showModal():this.el.open=!0,(i=t.querySelector("input"))==null||i.focus()});for(let i of this.el.querySelectorAll("[data-modal-close]"))i.addEventListener("click",()=>{this.el.close?this.el.close():this.el.open=!1})}};function _(e,t,o,n){var i;(i=window.dataLayer)!=null||(window.dataLayer=[]),typeof e=="string"?window.dataLayer.push({event:e,event_category:t,event_action:o,event_label:n}):window.dataLayer.push(e)}function X(e){var t;(t=window.dataLayer)!=null||(window.dataLayer=[]),window.dataLayer.push(e)}var Y=class{constructor(){this.handlers={},document.addEventListener("keydown",t=>this.handleKeyPress(t))}on(t,o,n,i){var a,u;return(u=(a=this.handlers)[t])!=null||(a[t]=new Set),this.handlers[t].add({description:o,callback:n,...i}),this}handleKeyPress(t){var o;for(let n of(o=this.handlers[t.key.toLowerCase()])!=null?o:new Set){if(n.target&&n.target!==t.target)return;let i=t.target;if(!n.target&&((i==null?void 0:i.tagName)==="INPUT"||(i==null?void 0:i.tagName)==="SELECT"||(i==null?void 0:i.tagName)==="TEXTAREA")||(i==null?void 0:i.isContentEditable)||n.withMeta&&!(t.ctrlKey||t.metaKey)||!n.withMeta&&(t.ctrlKey||t.metaKey))return;_("keypress","hotkeys",`${t.key} pressed`,n.description),n.callback(t)}}},M=new Y;function Z(){var P;let e=document.querySelector(".JumpDialog"),t=e==null?void 0:e.querySelector(".JumpDialog-body"),o=e==null?void 0:e.querySelector(".JumpDialog-list"),n=e==null?void 0:e.querySelector(".JumpDialog-input"),i=document.querySelector(".js-documentation"),a;function u(){let l=[];if(!!i){for(let r of i.querySelectorAll("[data-kind]"))l.push(p(r));for(let r of l)r.link.addEventListener("click",function(){e==null||e.close()});return l.sort(function(r,c){return r.lower.localeCompare(c.lower)}),l}}function p(l){var E;let r=document.createElement("a"),c=l.getAttribute("id");r.setAttribute("href","#"+c),r.setAttribute("tabindex","-1"),r.setAttribute("data-gtmc","jump to link");let f=l.getAttribute("data-kind");return{link:r,name:c!=null?c:"",kind:f!=null?f:"",lower:(E=c==null?void 0:c.toLowerCase())!=null?E:""}}let w,m=-1;function S(l){for(w=l,a||(a=u()),k(-1);o==null?void 0:o.firstChild;)o.firstChild.remove();if(l){let r=l.toLowerCase(),c=[],f=[],E=[],x=(d,v,b)=>d.name.substring(0,v)+"<b>"+d.name.substring(v,b)+"</b>"+d.name.substring(b);for(let d of a!=null?a:[]){let v=d.name.toLowerCase();if(v===r)d.link.innerHTML=x(d,0,d.name.length),c.push(d);else if(v.startsWith(r))d.link.innerHTML=x(d,0,l.length),f.push(d);else{let b=v.indexOf(r);b>-1&&(d.link.innerHTML=x(d,b,b+l.length),E.push(d))}}for(let d of c.concat(f).concat(E))o==null||o.appendChild(d.link)}else{if(!a||a.length===0){let r=document.createElement("i");r.innerHTML="There are no symbols on this page.",o==null||o.appendChild(r)}for(let r of a!=null?a:[])r.link.innerHTML=r.name+" <i>"+r.kind+"</i>",o==null||o.appendChild(r.link)}t&&(t.scrollTop=0),(a==null?void 0:a.length)&&o&&o.children.length>0&&k(0)}function k(l){let r=o==null?void 0:o.children;if(!(!r||!t)){if(m>=0&&r[m].classList.remove("JumpDialog-active"),l>=r.length&&(l=r.length-1),l>=0){r[l].classList.add("JumpDialog-active");let c=r[l].offsetTop-r[0].offsetTop,f=c+r[l].clientHeight;c<t.scrollTop?t.scrollTop=c:f>t.scrollTop+t.clientHeight&&(t.scrollTop=f-t.clientHeight)}m=l}}function q(l){if(m<0)return;let r=m+l;r<0&&(r=0),k(r)}n==null||n.addEventListener("keyup",function(){n.value.toUpperCase()!=w.toUpperCase()&&S(n.value)}),n==null||n.addEventListener("keydown",function(l){let r=38,c=40,f=13;switch(l.which){case r:q(-1),l.preventDefault();break;case c:q(1),l.preventDefault();break;case f:m>=0&&o&&(o.children[m].click(),l.preventDefault());break}});let h=document.querySelector(".ShortcutsDialog");M.on("f","open jump to modal",l=>{(e==null?void 0:e.open)||(h==null?void 0:h.open)||(l.preventDefault(),n&&(n.value=""),e==null||e.showModal(),n==null||n.focus(),S(""))}).on("?","open shortcuts modal",()=>{(e==null?void 0:e.open)||(h==null?void 0:h.open)||h==null||h.showModal()});let N=document.querySelector(".js-jumpToInput");N&&N.addEventListener("click",()=>{n&&(n.value=""),S(""),!((e==null?void 0:e.open)||(h==null?void 0:h.open))&&(e==null||e.showModal(),n==null||n.focus())}),(P=document.querySelector(".js-openShortcuts"))==null||P.addEventListener("click",()=>{h==null||h.showModal()})}for(let e of document.querySelectorAll(".js-clipboard"))new A(e);for(let e of document.querySelectorAll(".js-modal"))new O(e);for(let e of document.querySelectorAll(".js-tooltip"))new H(e);for(let e of document.querySelectorAll(".js-selectNav"))new D(e);for(let e of document.querySelectorAll(".js-carousel"))new C(e);K();J();window.addEventListener("load",()=>{Z()});M.on("/","focus search",e=>{let t=Array.from(document.querySelectorAll(".js-searchFocus")).pop();t&&!window.navigator.userAgent.includes("Firefox")&&(e.preventDefault(),t.focus())});M.on("y","set canonical url",()=>{var t;let e=(t=document.querySelector(".js-canonicalURLPath"))==null?void 0:t.dataset.canonicalUrlPath;e&&e!==""&&window.history.replaceState(null,"",e)});(function(){_({"gtm.start":new Date().getTime(),event:"gtm.js"})})();function Q(){let e=new URLSearchParams(window.location.search),t=e.get("utm_source");if(t!=="gopls"&&t!=="godoc"&&t!=="pkggodev")return;let o=new URL(window.location.href);e.delete("utm_source"),o.search=e.toString(),window.history.replaceState(null,"",o.toString())}var j;((j=document.querySelector(".js-gtmID"))==null?void 0:j.dataset.gtmid)&&window.dataLayer?X(function(){Q()}):Q();for(let e of document.querySelectorAll(".js-toggleTheme"))e.addEventListener("click",()=>{ae()});function ae(){let e="dark",t=document.documentElement.getAttribute("data-theme");t==="dark"?e="light":t==="light"&&(e="auto"),document.documentElement.setAttribute("data-theme",e),document.cookie=`prefers-color-scheme=${e};path=/;max-age=31536000;`}
/*!
* @license
* Copyright 2019-2020 The Go Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @license
* Copyright 2020 The Go Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @license
* Copyright 2021 The Go Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
//# sourceMappingURL=frontend.js.map