ghost-theme-sd.ai/assets/built/source.js

29 lines
108 KiB
JavaScript

!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){var n;if(e&&t)return-1==(n=(n=this._events=this._events||{})[e]=n[e]||[]).indexOf(t)&&n.push(t),this},t.once=function(e,t){var n;if(e&&t)return this.on(e,t),((n=this._onceEvents=this._onceEvents||{})[e]=n[e]||{})[t]=!0,this},t.off=function(e,t){e=this._events&&this._events[e];if(e&&e.length)return-1!=(t=e.indexOf(t))&&e.splice(t,1),this},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],o=0;o<n.length;o++){var r=n[o];i&&i[r]&&(this.off(e,r),delete i[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(t,n){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(e){return n(t,e)}):"object"==typeof module&&module.exports?module.exports=n(t,require("ev-emitter")):t.imagesLoaded=n(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function r(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){var i,o;return this instanceof a?(i="string"==typeof(i=e)?document.querySelectorAll(e):i)?(this.elements=(o=i,Array.isArray(o)?o:"object"==typeof o&&"number"==typeof o.length?c.call(o):[o]),this.options=r({},this.options),"function"==typeof t?n=t:r(this.options,t),n&&this.on("always",n),this.getImages(),s&&(this.jqDeferred=new s.Deferred),void setTimeout(this.check.bind(this))):void l.error("Bad element for imagesLoaded "+(i||e)):new a(e,t,n)}function n(e){this.img=e}function i(e,t){this.url=e,this.element=t,this.img=new Image}var s=t.jQuery,l=t.console,c=Array.prototype.slice,u=((a.prototype=Object.create(e.prototype)).options={},a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},a.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var o=n[i];this.addImage(o)}if("string"==typeof this.options.background)for(var r=e.querySelectorAll(this.options.background),i=0;i<r.length;i++){var a=r[i];this.addElementBackgroundImages(a)}}},{1:!0,9:!0,11:!0});return a.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(t.backgroundImage);null!==i;){var o=i&&i[2];o&&this.addBackground(o,e),i=n.exec(t.backgroundImage)}},a.prototype.addImage=function(e){e=new n(e);this.images.push(e)},a.prototype.addBackground=function(e,t){e=new i(e,t);this.images.push(e)},a.prototype.check=function(){function t(e,t,n){setTimeout(function(){i.progress(e,t,n)})}var i=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},a.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&l&&l.log("progress: "+n,e,t)},a.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred&&(e=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[e](this))},(n.prototype=Object.create(e.prototype)).check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},n.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(i.prototype=Object.create(n.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},i.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},i.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},(a.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((s=e).fn.imagesLoaded=function(e,t){return new a(this,e,t).jqDeferred.promise(s(this))})})(),a}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(i,s){function e(e){if(S)return!0;e=e||window.event,T.timeToIdle&&T.mouseUsed&&!b&&l();for(var t,n,i=(e.target||e.srcElement).getAttribute("class")||"",o=0;o<M.length;o++)(t=M[o]).onTap&&-1<i.indexOf("pswp__"+t.name)&&(t.onTap(),n=!0);n&&(e.stopPropagation&&e.stopPropagation(),S=!0,e=s.features.isOldAndroid?600:30,setTimeout(function(){S=!1},e))}function n(){var e=1===T.getNumItemsFn();e!==k&&(D(p,"ui--one-slide",e),k=e)}function a(){D(y,"share-modal--hidden",O)}function o(){if((O=!O)?(s.removeClass(y,"pswp__share-modal--fade-in"),setTimeout(function(){O&&a()},300)):(a(),setTimeout(function(){O||s.addClass(y,"pswp__share-modal--fade-in")},30)),!O){for(var e,t,n,i,o="",r=0;r<T.shareButtons.length;r++)e=T.shareButtons[r],t=T.getImageURLForShare(e),n=T.getPageURLForShare(e),i=T.getTextForShare(e),o+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(i))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",T.parseShareButtonOut&&(o=T.parseShareButtonOut(e,o));y.children[0].innerHTML=o,y.children[0].onclick=z}}function r(e){for(var t=0;t<T.closeElClasses.length;t++)if(s.hasClass(e,"pswp__"+T.closeElClasses[t]))return!0}function l(){clearTimeout(_),N=0,b&&F.setIdle(!1)}function c(e){(e=(e=e||window.event).relatedTarget||e.toElement)&&"HTML"!==e.nodeName||(clearTimeout(_),_=setTimeout(function(){F.setIdle(!0)},T.timeToIdleOutside))}function u(e){E!==e&&(D(x,"preloader--active",!e),E=e)}function d(e){var t,n=e.vGap;!i.likelyTouchDevice||T.mouseUsed||screen.width>T.fitControlsWidth?(t=T.barsSize,T.captionEl&&"auto"===t.bottom?(g||((g=s.createEl("pswp__caption pswp__caption--fake")).appendChild(s.createEl("pswp__caption__center")),p.insertBefore(g,f),s.addClass(p,"pswp__ui--fit")),T.addCaptionHTMLFn(e,g,!0)?(e=g.clientHeight,n.bottom=parseInt(e,10)||44):n.bottom=t.top):n.bottom="auto"===t.bottom?0:t.bottom,n.top=t.top):n.top=n.bottom=0}function P(){function e(e){if(e)for(var t=e.length,n=0;n<t;n++){o=e[n],r=o.className;for(var i=0;i<M.length;i++)a=M[i],-1<r.indexOf("pswp__"+a.name)&&(T[a.option]?(s.removeClass(o,"pswp__element--disabled"),a.onInit&&a.onInit(o)):s.addClass(o,"pswp__element--disabled"))}}e(p.children);var o,r,a,t=s.getChildByClass(p,"pswp__top-bar");t&&e(t.children)}var m,p,f,g,t,h,y,v,b,w,x,E,A,k,T,S,C,_,F=this,I=!1,L=!0,O=!0,R={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return i.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return i.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},D=function(e,t,n){s[(n?"add":"remove")+"Class"](e,"pswp__"+t)},z=function(e){var t=(e=e||window.event).target||e.srcElement;return i.shout("shareLinkClick",e,t),!(!t.href||!t.hasAttribute("download")&&(window.open(t.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),O||o(),1))},N=0,M=[{name:"caption",option:"captionEl",onInit:function(e){f=e}},{name:"share-modal",option:"shareEl",onInit:function(e){y=e},onTap:function(){o()}},{name:"button--share",option:"shareEl",onInit:function(e){h=e},onTap:function(){o()}},{name:"button--zoom",option:"zoomEl",onTap:i.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){t=e}},{name:"button--close",option:"closeEl",onTap:i.close},{name:"button--arrow--left",option:"arrowEl",onTap:i.prev},{name:"button--arrow--right",option:"arrowEl",onTap:i.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){m.isFullscreen()?m.exit():m.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){x=e}}];F.init=function(){var t;s.extend(i.options,R,!0),T=i.options,p=s.getChildByClass(i.scrollWrap,"pswp__ui"),(w=i.listen)("onVerticalDrag",function(e){L&&e<.95?F.hideControls():!L&&.95<=e&&F.showControls()}),w("onPinchClose",function(e){L&&e<.9?(F.hideControls(),t=!0):t&&!L&&.9<e&&F.showControls()}),w("zoomGestureEnded",function(){(t=!1)&&!L&&F.showControls()}),w("beforeChange",F.update),w("doubleTap",function(e){var t=i.currItem.initialZoomLevel;i.getZoomLevel()!==t?i.zoomTo(t,e,333):i.zoomTo(T.getDoubleTapZoom(!1,i.currItem),e,333)}),w("preventDragEvent",function(e,t,n){var i=e.target||e.srcElement;i&&i.getAttribute("class")&&-1<e.type.indexOf("mouse")&&(0<i.getAttribute("class").indexOf("__caption")||/(SMALL|STRONG|EM)/i.test(i.tagName))&&(n.prevent=!1)}),w("bindEvents",function(){s.bind(p,"pswpTap click",e),s.bind(i.scrollWrap,"pswpTap",F.onGlobalTap),i.likelyTouchDevice||s.bind(i.scrollWrap,"mouseover",F.onMouseOver)}),w("unbindEvents",function(){O||o(),C&&clearInterval(C),s.unbind(document,"mouseout",c),s.unbind(document,"mousemove",l),s.unbind(p,"pswpTap click",e),s.unbind(i.scrollWrap,"pswpTap",F.onGlobalTap),s.unbind(i.scrollWrap,"mouseover",F.onMouseOver),m&&(s.unbind(document,m.eventK,F.updateFullscreen),m.isFullscreen()&&(T.hideAnimationDuration=0,m.exit()),m=null)}),w("destroy",function(){T.captionEl&&(g&&p.removeChild(g),s.removeClass(f,"pswp__caption--empty")),y&&(y.children[0].onclick=null),s.removeClass(p,"pswp__ui--over-close"),s.addClass(p,"pswp__ui--hidden"),F.setIdle(!1)}),T.showAnimationDuration||s.removeClass(p,"pswp__ui--hidden"),w("initialZoomIn",function(){T.showAnimationDuration&&s.removeClass(p,"pswp__ui--hidden")}),w("initialZoomOut",function(){s.addClass(p,"pswp__ui--hidden")}),w("parseVerticalMargin",d),P(),T.shareEl&&h&&y&&(O=!0),n(),T.timeToIdle&&w("mouseUsed",function(){s.bind(document,"mousemove",l),s.bind(document,"mouseout",c),C=setInterval(function(){2===++N&&F.setIdle(!0)},T.timeToIdle/2)}),T.fullscreenEl&&!s.features.isOldAndroid&&((m=m||F.getFullscreenAPI())?(s.bind(document,m.eventK,F.updateFullscreen),F.updateFullscreen(),s.addClass(i.template,"pswp--supports-fs")):s.removeClass(i.template,"pswp--supports-fs")),T.preloaderEl&&(u(!0),w("beforeChange",function(){clearTimeout(A),A=setTimeout(function(){i.currItem&&i.currItem.loading?i.allowProgressiveImg()&&(!i.currItem.img||i.currItem.img.naturalWidth)||u(!1):u(!0)},T.loadingIndicatorDelay)}),w("imageLoadComplete",function(e,t){i.currItem===t&&u(!0)}))},F.setIdle=function(e){D(p,"ui--idle",b=e)},F.update=function(){I=!(!L||!i.currItem||(F.updateIndexIndicator(),T.captionEl&&(T.addCaptionHTMLFn(i.currItem,f),D(f,"caption--empty",!i.currItem.title)),0)),O||o(),n()},F.updateFullscreen=function(e){e&&setTimeout(function(){i.setScrollOffset(0,s.getScrollY())},50),s[(m.isFullscreen()?"add":"remove")+"Class"](i.template,"pswp--fs")},F.updateIndexIndicator=function(){T.counterEl&&(t.innerHTML=i.getCurrentIndex()+1+T.indexIndicatorSep+T.getNumItemsFn())},F.onGlobalTap=function(e){var t=(e=e||window.event).target||e.srcElement;if(!S)if(e.detail&&"mouse"===e.detail.pointerType)r(t)?i.close():s.hasClass(t,"pswp__img")&&(1===i.getZoomLevel()&&i.getZoomLevel()<=i.currItem.fitRatio?T.clickToCloseNonZoomable&&i.close():i.toggleDesktopZoom(e.detail.releasePoint));else if(T.tapToToggleControls&&(L?F.hideControls():F.showControls()),T.tapToClose&&(s.hasClass(t,"pswp__img")||r(t)))return void i.close()},F.onMouseOver=function(e){e=(e=e||window.event).target||e.srcElement;D(p,"ui--over-close",r(e))},F.hideControls=function(){s.addClass(p,"pswp__ui--hidden"),L=!1},F.showControls=function(){L=!0,I||F.update(),s.removeClass(p,"pswp__ui--hidden")},F.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},F.getFullscreenAPI=function(){var e,t=document.documentElement,n="fullscreenchange";return t.requestFullscreen?e={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:n}:t.mozRequestFullScreen?e={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+n}:t.webkitRequestFullscreen?e={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+n}:t.msRequestFullscreen&&(e={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),e&&(e.enter=function(){return v=T.closeOnScroll,T.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?i.template[this.enterK]():void i.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},e.exit=function(){return T.closeOnScroll=v,document[this.exitK]()},e.isFullscreen=function(){return document[this.elementK]}),e}}}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(m,R,t,z){var p={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var r=0;r<t.length;r++)t[r]&&e[o](t[r],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){t=document.createElement(t||"div");return e&&(t.className=e),t},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){p.bind(e,t,n,!0)},removeClass:function(e,t){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){p.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(p.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(p.features)return p.features;var e,t,n=p.createEl().style,i="",o={};o.oldIE=document.all&&!document.addEventListener,o.touch="ontouchstart"in window,window.requestAnimationFrame&&(o.raf=window.requestAnimationFrame,o.caf=window.cancelAnimationFrame),o.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,o.pointerEvent||(e=navigator.userAgent,/iP(hone|od)/.test(navigator.platform)&&(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(o.isOldIOSPhone=!0),t=(t=e.match(/Android\s([0-9\.]*)/))?t[1]:0,1<=(t=parseFloat(t))&&(t<4.4&&(o.isOldAndroid=!0),o.androidVersion=t),o.isMobileOpera=/opera mini|opera mobi/i.test(e));for(var r,a,s,l=["transform","perspective","animationName"],c=["","webkit","Moz","ms","O"],u=0;u<4;u++){for(var i=c[u],d=0;d<3;d++)r=l[d],a=i+(i?r.charAt(0).toUpperCase()+r.slice(1):r),!o[r]&&a in n&&(o[r]=a);i&&!o.raf&&(i=i.toLowerCase(),o.raf=window[i+"RequestAnimationFrame"],o.raf)&&(o.caf=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"])}return o.raf||(s=0,o.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-s)),i=window.setTimeout(function(){e(t+n)},n);return s=t+n,i},o.caf=function(e){clearTimeout(e)}),o.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p.features=o}},f=(p.detectFeatures(),p.features.oldIE&&(p.bind=function(e,t,n,i){t=t.split(" ");for(var o,r=(i?"detach":"attach")+"Event",a=function(){n.handleEvent.call(n)},s=0;s<t.length;s++)if(o=t[s])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=a;e[r]("on"+o,n["oldIE"+o])}else e[r]("on"+o,n)}),this),H=25,g={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};p.extend(g,z);function e(){return{x:0,y:0}}function $(e,t){p.extend(f,t.publicMethods),Ze.push(e)}function B(e){var t=D();return t-1<e?e-t:e<0?t+e:e}function r(e,t){return Ke[e]||(Ke[e]=[]),Ke[e].push(t)}function j(e,t,n,i){i===f.currItem.initialZoomLevel?n[e]=f.currItem.initialPosition[e]:(n[e]=Je(e,i),n[e]>t.min[e]?n[e]=t.min[e]:n[e]<t.max[e]&&(n[e]=t.max[e]))}function q(e){var t="";g.escKey&&27===e.keyCode?t="close":g.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),!t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,f[t]())}function U(e){e&&(Fe||_e||v||Te)&&(e.preventDefault(),e.stopPropagation())}function Z(){f.setScrollOffset(0,p.getScrollY())}function W(e){var t;"mousedown"===e.type&&0<e.button||(Jt?e.preventDefault():Se&&"mousedown"===e.type||(Lt(e,!0)&&e.preventDefault(),A("pointerDown"),pe&&((t=p.arraySearch(gt,e.pointerId,"id"))<0&&(t=gt.length),gt[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=Ht(e)).length,c=null,ct(),l&&1!==e||(l=Me=!0,p.bind(window,ee,f),ke=ze=Pe=Te=Le=Fe=Ce=_e=!1,Ne=null,A("firstTouchStart",t),C(Be,b),$e.x=$e.y=0,C(L,t[0]),C(ft,L),ht.x=x.x*je,yt=[{x:L.x,y:L.y}],Ee=xe=k(),it(y,!0),St(),Ct()),!u&&1<e&&!v&&!Le&&(ne=y,u=Ce=!(_e=!1),$e.y=$e.x=0,C(Be,b),C(F,t[0]),C(pt,t[1]),Dt(F,pt,At),Et.x=Math.abs(At.x)-b.x,Et.y=Math.abs(At.y)-b.y,Oe=Tt(F,pt))))}function G(e){var t;e.preventDefault(),pe&&-1<(t=p.arraySearch(gt,e.pointerId,"id"))&&((t=gt[t]).x=e.pageX,t.y=e.pageY),l&&(t=Ht(e),Ne||Fe||u?c=t:O.x!==x.x*je?Ne="h":(e=Math.abs(t[0].x-L.x)-Math.abs(t[0].y-L.y),Math.abs(e)>=mt&&(Ne=0<e?"h":"v",c=t)))}function K(e){if(s.isOldAndroid){if(Se&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Se),Se=setTimeout(function(){Se=0},600))}var t;A("pointerUp"),Lt(e,!1)&&e.preventDefault(),pe&&-1<(r=p.arraySearch(gt,e.pointerId,"id"))&&(t=gt.splice(r,1)[0],navigator.msPointerEnabled&&(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type)||(t.type=e.pointerType||"mouse"));var n=(r=Ht(e)).length;if(2===(n="mouseup"===e.type?0:n))return!(c=null);1===n&&C(ft,r[0]),0!==n||Ne||v||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),A("touchRelease",e,t));var i,o,r=-1;if(0===n&&(l=!1,p.unbind(window,ee,f),St(),u?r=0:-1!==xt&&(r=k()-xt)),xt=1===n?k():-1,e=-1!==r&&r<150?"zoom":"swipe",u&&n<2&&(u=!1,1===n&&(e="zoomPointerUp"),A("zoomGestureEnded")),c=null,Fe||_e||v||Te)if(ct(),(Ae=Ae||jt()).calculateSwipeSpeed("x"),Te)Mt()<g.verticalDragRange?f.close():(i=b.y,o=Re,ut("verticalDrag",0,1,300,p.easing.cubic.out,function(e){b.y=(f.currItem.initialPosition.y-i)*e+i,T((1-o)*e+o),S()}),A("onVerticalDrag",1));else{if((Le||v)&&0===n){if(Ut(e,Ae))return;e="zoomPointerUp"}if(!v)return"swipe"!==e?void Wt():void(!Le&&y>f.currItem.fitRatio&&qt(Ae))}}var Y,V,X,h,Q,J,ee,te,i,y,ne,ie,oe,re,ae,a,se,le,ce,ue,de,me,pe,o,fe,ge,he,ye,ve,be,s,we,xe,Ee,Ae,ke,Te,Se,l,Ce,_e,Fe,Ie,Le,c,u,Oe,d,De,v,Ne,Me,Pe,Re,ze,He,$e=e(),Be=e(),b=e(),w={},je=0,qe={},x=e(),E=0,Ue=!0,Ze=[],We={},Ge=!1,Ke={},A=function(e){var t=Ke[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(f,n)}},k=function(){return(new Date).getTime()},T=function(e){Re=e,f.bg.style.opacity=e*g.bgOpacity},Ye=function(e,t,n,i,o){(!Ge||o&&o!==f.currItem)&&(i/=(o||f.currItem).fitRatio),e[me]=ie+t+"px, "+n+"px"+oe+" scale("+i+")"},S=function(e){De&&(e&&(y>f.currItem.fitRatio?Ge||(cn(f.currItem,!1,!0),Ge=!0):Ge&&(cn(f.currItem),Ge=!1)),Ye(De,b.x,b.y,y))},Ve=function(e){e.container&&Ye(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Xe=function(e,t){t[me]=ie+e+"px, 0px"+oe},Qe=function(e,t){var n;!g.loop&&t&&(t=h+(x.x*je-e)/x.x,n=Math.round(e-O.x),t<0&&0<n||t>=D()-1&&n<0)&&(e=O.x+n*g.mainScrollEndFriction),O.x=e,Xe(e,Q)},Je=function(e,t){var n=Et[e]-qe[e];return Be[e]+$e[e]+n-t/ne*n},C=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},et=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},tt=null,nt=function(){tt&&(p.unbind(document,"mousemove",nt),p.addClass(m,"pswp--has_mouse"),g.mouseUsed=!0,A("mouseUsed")),tt=setTimeout(function(){tt=null},100)},it=function(e,t){e=sn(f.currItem,w,e);return t&&(d=e),e},ot=function(e){return(e=e||f.currItem).initialZoomLevel},rt=function(e){return 0<(e=e||f.currItem).w?g.maxSpreadZoom:1},_={},at=0,st=function(e){_[e]&&(_[e].raf&&ge(_[e].raf),at--,delete _[e])},lt=function(e){_[e]&&st(e),_[e]||(at++,_[e]={})},ct=function(){for(var e in _)_.hasOwnProperty(e)&&st(e)},ut=function(e,t,n,i,o,r,a){function s(){_[e]&&(l=k()-c,i<=l?(st(e),r(n),a&&a()):(r((n-t)*o(l/i)+t),_[e].raf=fe(s)))}var l,c=k();lt(e);s()},z={shout:A,listen:r,viewportSize:w,options:g,isMainScrollAnimating:function(){return v},getZoomLevel:function(){return y},getCurrentIndex:function(){return h},isDragging:function(){return l},isZooming:function(){return u},setScrollOffset:function(e,t){qe.x=e,be=qe.y=t,A("updateScrollOffset",qe)},applyZoomPan:function(e,t,n,i){b.x=t,b.y=n,y=e,S(i)},init:function(){if(!Y&&!V){f.framework=p,f.template=m,f.bg=p.getChildByClass(m,"pswp__bg"),he=m.className,Y=!0,s=p.detectFeatures(),fe=s.raf,ge=s.caf,me=s.transform,ve=s.oldIE,f.scrollWrap=p.getChildByClass(m,"pswp__scroll-wrap"),f.container=p.getChildByClass(f.scrollWrap,"pswp__container"),Q=f.container.style,f.itemHolders=a=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],a[0].el.style.display=a[2].el.style.display="none",me?(t=s.perspective&&!o,ie="translate"+(t?"3d(":"("),oe=s.perspective?", 0px)":")"):(me="left",p.addClass(m,"pswp--ie"),Xe=function(e,t){t.left=e+"px"},Ve=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,i=t*e.w,t=t*e.h;n.width=i+"px",n.height=t+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},S=function(){var e,t,n,i;De&&(e=De,n=(i=1<(t=f.currItem).fitRatio?1:t.fitRatio)*t.w,i=i*t.h,e.width=n+"px",e.height=i+"px",e.left=b.x+"px",e.top=b.y+"px")}),i={resize:f.updateSize,orientationchange:function(){clearTimeout(we),we=setTimeout(function(){w.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Z,keydown:q,click:U};var e,t=s.isOldIOSPhone||s.isOldAndroid||s.isMobileOpera;for(s.animationName&&s.transform&&!t||(g.showAnimationDuration=g.hideAnimationDuration=0),e=0;e<Ze.length;e++)f["init"+Ze[e]]();R&&(f.ui=new R(f,p)).init(),A("firstUpdate"),h=h||g.index||0,(isNaN(h)||h<0||h>=D())&&(h=0),f.currItem=en(h),(s.isOldIOSPhone||s.isOldAndroid)&&(Ue=!1),m.setAttribute("aria-hidden","false"),g.modal&&(Ue?m.style.position="fixed":(m.style.position="absolute",m.style.top=p.getScrollY()+"px")),void 0===be&&(A("initialLayout"),be=ye=p.getScrollY());var n="pswp--open ";for(g.mainClass&&(n+=g.mainClass+" "),g.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=o?"pswp--touch":"pswp--notouch")+(s.animationName?" pswp--css_animation":""))+(s.svg?" pswp--svg":""),p.addClass(m,n),f.updateSize(),J=-1,E=null,e=0;e<3;e++)Xe((e+J)*x.x,a[e].el.style);ve||p.bind(f.scrollWrap,te,f),r("initialZoomInEnd",function(){f.setContent(a[0],h-1),f.setContent(a[2],h+1),a[0].el.style.display=a[2].el.style.display="block",g.focus&&m.focus(),p.bind(document,"keydown",f),s.transform&&p.bind(f.scrollWrap,"click",f),g.mouseUsed||p.bind(document,"mousemove",nt),p.bind(window,"resize scroll orientationchange",f),A("bindEvents")}),f.setContent(a[1],h),f.updateCurrItem(),A("afterInit"),Ue||(re=setInterval(function(){at||l||u||y!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),p.addClass(m,"pswp--visible")}var t},close:function(){Y&&(V=!(Y=!1),A("close"),p.unbind(window,"resize scroll orientationchange",f),p.unbind(window,"scroll",i.scroll),p.unbind(document,"keydown",f),p.unbind(document,"mousemove",nt),s.transform&&p.unbind(f.scrollWrap,"click",f),l&&p.unbind(window,ee,f),clearTimeout(we),A("unbindEvents"),tn(f.currItem,null,!0,f.destroy))},destroy:function(){A("destroy"),Vt&&clearTimeout(Vt),m.setAttribute("aria-hidden","true"),m.className=he,re&&clearInterval(re),p.unbind(f.scrollWrap,te,f),p.unbind(window,"scroll",f),St(),ct(),Ke=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:e<d.max.x&&(e=d.max.x),t>d.min.y?t=d.min.y:t<d.max.y&&(t=d.max.y)),b.x=e,b.y=t,S()},handleEvent:function(e){e=e||window.event,i[e.type]&&i[e.type](e)},goTo:function(e){var t=(e=B(e))-h;E=t,h=e,f.currItem=en(h),je-=t,Qe(x.x*je),ct(),v=!1,f.updateCurrItem()},next:function(){f.goTo(h+1)},prev:function(){f.goTo(h-1)},updateCurrZoomItem:function(e){var t;e&&A("beforeChange",0),De=a[1].el.children.length&&(t=a[1].el.children[0],p.hasClass(t,"pswp__zoom-wrap"))?t.style:null,d=f.currItem.bounds,ne=y=f.currItem.initialZoomLevel,b.x=d.center.x,b.y=d.center.y,e&&A("afterChange")},invalidateCurrItems:function(){ae=!0;for(var e=0;e<3;e++)a[e].item&&(a[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==E){var t,n=Math.abs(E);if(!(e&&n<2)){f.currItem=en(h),Ge=!1,A("beforeChange",E),3<=n&&(J+=E+(0<E?-3:3),n=3);for(var i=0;i<n;i++)0<E?(t=a.shift(),a[2]=t,Xe((++J+2)*x.x,t.el.style),f.setContent(t,h-n+i+1+1)):(t=a.pop(),a.unshift(t),Xe(--J*x.x,t.el.style),f.setContent(t,h+n-i-1-1));De&&1===Math.abs(E)&&(e=en(se)).initialZoomLevel!==y&&(sn(e,w),cn(e),Ve(e)),E=0,f.updateCurrZoomItem(),se=h,A("afterChange")}}},updateSize:function(e){if(!Ue&&g.modal){var t=p.getScrollY();if(be!==t&&(m.style.top=t+"px",be=t),!e&&We.x===window.innerWidth&&We.y===window.innerHeight)return;We.x=window.innerWidth,We.y=window.innerHeight,m.style.height=We.y+"px"}if(w.x=f.scrollWrap.clientWidth,w.y=f.scrollWrap.clientHeight,Z(),x.x=w.x+Math.round(w.x*g.spacing),x.y=w.y,Qe(x.x*je),A("beforeResize"),void 0!==J){for(var n,i,o,r=0;r<3;r++)n=a[r],Xe((r+J)*x.x,n.el.style),o=h+r-1,g.loop&&2<D()&&(o=B(o)),(i=en(o))&&(ae||i.needsUpdate||!i.bounds)?(f.cleanSlide(i),f.setContent(n,o),1===r&&(f.currItem=i,f.updateCurrZoomItem(!0)),i.needsUpdate=!1):-1===n.index&&0<=o&&f.setContent(n,o),i&&i.container&&(sn(i,w),cn(i),Ve(i));ae=!1}ne=y=f.currItem.initialZoomLevel,(d=f.currItem.bounds)&&(b.x=d.center.x,b.y=d.center.y,S(!0)),A("resize")},zoomTo:function(t,e,n,i,o){e&&(ne=y,Et.x=Math.abs(e.x)-b.x,Et.y=Math.abs(e.y)-b.y,C(Be,b));function r(e){1===e?(y=t,b.x=a.x,b.y=a.y):(y=(t-s)*e+s,b.x=(a.x-l.x)*e+l.x,b.y=(a.y-l.y)*e+l.y),o&&o(e),S(1===e)}var e=it(t,!1),a={},s=(j("x",e,a,t),j("y",e,a,t),y),l={x:b.x,y:b.y};et(a);n?ut("customZoomTo",0,1,n,i||p.easing.sine.inOut,r):r(1)}},dt=30,mt=10,F={},pt={},I={},L={},ft={},gt=[],ht={},yt=[],vt={},bt=0,wt=e(),xt=0,O=e(),Et=e(),At=e(),kt=function(e,t){return e.x===t.x&&e.y===t.y},Tt=function(e,t){return vt.x=Math.abs(e.x-t.x),vt.y=Math.abs(e.y-t.y),Math.sqrt(vt.x*vt.x+vt.y*vt.y)},St=function(){Ie&&(ge(Ie),Ie=null)},Ct=function(){l&&(Ie=fe(Ct),Bt())},_t=function(){return!("fit"===g.scaleMode&&y===f.currItem.initialZoomLevel)},Ft=function(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:Ft(e.parentNode,t))},It={},Lt=function(e,t){return It.prevent=!Ft(e.target,g.isClickableElement),A("preventDragEvent",e,t,It),It.prevent},Ot=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Dt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Nt=function(e,t,n){var i;50<e-Ee&&((i=2<yt.length?yt.shift():{}).x=t,i.y=n,yt.push(i),Ee=e)},Mt=function(){var e=b.y-f.currItem.initialPosition.y;return 1-Math.abs(e/(w.y/2))},Pt={},Rt={},zt=[],Ht=function(e){for(;0<zt.length;)zt.pop();return pe?(He=0,gt.forEach(function(e){0===He?zt[0]=e:1===He&&(zt[1]=e),He++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(zt[0]=Ot(e.touches[0],Pt),1<e.touches.length)&&(zt[1]=Ot(e.touches[1],Rt)):(Pt.x=e.pageX,Pt.y=e.pageY,Pt.id="",zt[0]=Pt),zt},$t=function(e,t){var n,i,o,r=b[e]+t[e],a=0<t[e],s=O.x+t.x,l=O.x-ht.x,c=r>d.min[e]||r<d.max[e]?g.panEndFriction:1,r=b[e]+t[e]*c;return!g.allowPanToNext&&y!==f.currItem.initialZoomLevel||(De?"h"!==Ne||"x"!==e||_e||(a?(r>d.min[e]&&(c=g.panEndFriction,d.min[e],n=d.min[e]-Be[e]),(n<=0||l<0)&&1<D()?(o=s,l<0&&s>ht.x&&(o=ht.x)):d.min.x!==d.max.x&&(i=r)):(r<d.max[e]&&(c=g.panEndFriction,d.max[e],n=Be[e]-d.max[e]),(n<=0||0<l)&&1<D()?(o=s,0<l&&s<ht.x&&(o=ht.x)):d.min.x!==d.max.x&&(i=r))):o=s,"x"!==e)?void(v||Le||y>f.currItem.fitRatio&&(b[e]+=t[e]*c)):(void 0!==o&&(Qe(o,!0),Le=o!==ht.x),d.min.x!==d.max.x&&(void 0!==i?b.x=i:Le||(b.x+=t.x*c)),void 0!==o)},Bt=function(){var e,t,n,i,o,r;c&&0!==(e=c.length)&&(C(F,c[0]),I.x=F.x-L.x,I.y=F.y-L.y,u&&1<e?(L.x=F.x,L.y=F.y,!I.x&&!I.y&&kt(c[1],pt)||(C(pt,c[1]),_e||(_e=!0,A("zoomGestureStarted")),e=Tt(F,pt),(t=Zt(e))>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ze=!0),n=1,i=ot(),o=rt(),t<i?g.pinchToClose&&!ze&&ne<=f.currItem.initialZoomLevel?(T(r=1-(i-t)/(i/1.2)),A("onPinchClose",r),Pe=!0):t=i-(n=1<(n=(i-t)/i)?1:n)*(i/3):o<t&&(t=o+(n=1<(n=(t-o)/(6*i))?1:n)*i),n<0&&(n=0),Dt(F,pt,wt),$e.x+=wt.x-At.x,$e.y+=wt.y-At.y,C(At,wt),b.x=Je("x",t),b.y=Je("y",t),ke=y<t,y=t,S())):Ne&&(Me&&(Me=!1,Math.abs(I.x)>=mt&&(I.x-=c[0].x-ft.x),Math.abs(I.y)>=mt)&&(I.y-=c[0].y-ft.y),L.x=F.x,L.y=F.y,0===I.x&&0===I.y||("v"===Ne&&g.closeOnVerticalDrag&&!_t()?($e.y+=I.y,b.y+=I.y,r=Mt(),Te=!0,A("onVerticalDrag",r),T(r),S()):(Nt(k(),F.x,F.y),Fe=!0,d=f.currItem.bounds,$t("x",I)||($t("y",I),et(b),S())))))},jt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1<yt.length?(t=k()-Ee+50,yt[yt.length-2]):(t=k()-xe,ft))[e],i.lastFlickOffset[e]=L[e]-n,i.lastFlickDist[e]=Math.abs(i.lastFlickOffset[e]),20<i.lastFlickDist[e]?i.lastFlickSpeed[e]=i.lastFlickOffset[e]/t:i.lastFlickSpeed[e]=0,Math.abs(i.lastFlickSpeed[e])<.1&&(i.lastFlickSpeed[e]=0),i.slowDownRatio[e]=.95,i.slowDownRatioReverse[e]=1-i.slowDownRatio[e],i.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(t,e){i.backAnimStarted[t]||(b[t]>d.min[t]?i.backAnimDestination[t]=d.min[t]:b[t]<d.max[t]&&(i.backAnimDestination[t]=d.max[t]),void 0!==i.backAnimDestination[t]&&(i.slowDownRatio[t]=.7,i.slowDownRatioReverse[t]=1-i.slowDownRatio[t],i.speedDecelerationRatioAbs[t]<.05)&&(i.lastFlickSpeed[t]=0,i.backAnimStarted[t]=!0,ut("bounceZoomPan"+t,b[t],i.backAnimDestination[t],e||300,p.easing.sine.out,function(e){b[t]=e,S()})))},calculateAnimOffset:function(e){i.backAnimStarted[e]||(i.speedDecelerationRatio[e]=i.speedDecelerationRatio[e]*(i.slowDownRatio[e]+i.slowDownRatioReverse[e]-i.slowDownRatioReverse[e]*i.timeDiff/10),i.speedDecelerationRatioAbs[e]=Math.abs(i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]),i.distanceOffset[e]=i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]*i.timeDiff,b[e]+=i.distanceOffset[e])},panAnimLoop:function(){_.zoomPan&&(_.zoomPan.raf=fe(i.panAnimLoop),i.now=k(),i.timeDiff=i.now-i.lastNow,i.lastNow=i.now,i.calculateAnimOffset("x"),i.calculateAnimOffset("y"),S(),i.calculateOverBoundsAnimOffset("x"),i.calculateOverBoundsAnimOffset("y"),i.speedDecelerationRatioAbs.x<.05)&&i.speedDecelerationRatioAbs.y<.05&&(b.x=Math.round(b.x),b.y=Math.round(b.y),S(),st("zoomPan"))}};return i},qt=function(e){return e.calculateSwipeSpeed("y"),d=f.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(lt("zoomPan"),e.lastNow=k(),void e.panAnimLoop())},Ut=function(e,t){var n,i,o;v||(bt=h),"swipe"===e&&(e=L.x-ft.x,r=t.lastFlickDist.x<10,dt<e&&(r||20<t.lastFlickOffset.x)?i=-1:e<-dt&&(r||t.lastFlickOffset.x<-20)&&(i=1)),i&&((h+=i)<0?(h=g.loop?D()-1:0,o=!0):h>=D()&&(h=g.loop?0:D()-1,o=!0),o&&!g.loop||(E+=i,je-=i,n=!0));var e=x.x*je,r=Math.abs(e-O.x),a=n||e>O.x==0<t.lastFlickSpeed.x?(a=0<Math.abs(t.lastFlickSpeed.x)?r/Math.abs(t.lastFlickSpeed.x):333,a=Math.min(a,400),Math.max(a,250)):333;return bt===h&&(n=!1),v=!0,A("mainScrollAnimStart"),ut("mainScroll",O.x,e,a,p.easing.cubic.out,Qe,function(){ct(),v=!1,bt=-1,!n&&bt===h||f.updateCurrItem(),A("mainScrollAnimComplete")}),n&&f.updateCurrItem(!0),n},Zt=function(e){return 1/Oe*e*ne},Wt=function(){var e=y,t=ot(),n=rt();y<t?e=t:n<y&&(e=n);var i,o=Re;return Pe&&!ke&&!ze&&y<t?f.close():(Pe&&(i=function(e){T((1-o)*e+o)}),f.zoomTo(e,0,200,p.easing.cubic.out,i)),!0};$("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,i,o){le=e+t,ce=e+n,ue=e+i,de=o?e+o:""}(pe=s.pointerEvent)&&s.touch&&(s.touch=!1),pe?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):s.touch?(e("touch","start","move","end","cancel"),o=!0):e("mouse","down","move","up"),ee=ce+" "+ue+" "+de,te=le,pe&&!o&&(o=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),f.likelyTouchDevice=o,i[le]=W,i[ce]=G,i[ue]=K,de&&(i[de]=i[ue]),s.touch&&(te+=" mousedown",ee+=" mousemove mouseup",i.mousedown=i[le],i.mousemove=i[ce],i.mouseup=i[ue]),o||(g.allowPanToNext=!1)}}});function Gt(e){function t(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=p.createEl("pswp__img","img");n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src}function Kt(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=g.errorMsg.replace("%url%",e.src),1)}function Yt(){if(nn.length){for(var e,t=0;t<nn.length;t++)(e=nn[t]).holder.index===e.index&&ln(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}}var Vt,Xt,Qt,Jt,en,D,tn=function(r,e,a,t){function s(){st("initialZoom"),a?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(T(1),e&&(e.style.display="block"),p.addClass(m,"pswp--animated-in"),A("initialZoom"+(a?"OutEnd":"InEnd"))),t&&t(),Jt=!1}Vt&&clearTimeout(Vt),Qt=Jt=!0,r.initialLayout?(l=r.initialLayout,r.initialLayout=null):l=g.getThumbBoundsFn&&g.getThumbBoundsFn(h);var l,c,u,d=a?g.hideAnimationDuration:g.showAnimationDuration;d&&l&&void 0!==l.x?(c=X,u=!f.currItem.src||f.currItem.loadError||g.showHideOpacity,r.miniImg&&(r.miniImg.style.webkitBackfaceVisibility="hidden"),a||(y=l.w/r.w,b.x=l.x,b.y=l.y-ye,f[u?"template":"bg"].style.opacity=.001,S()),lt("initialZoom"),a&&!c&&p.removeClass(m,"pswp--animated-in"),u&&(a?p[(c?"remove":"add")+"Class"](m,"pswp--animate_opacity"):setTimeout(function(){p.addClass(m,"pswp--animate_opacity")},30)),Vt=setTimeout(function(){var t,n,i,o,e;A("initialZoom"+(a?"Out":"In")),a?(t=l.w/r.w,n={x:b.x,y:b.y},i=y,o=Re,e=function(e){1===e?(y=t,b.x=l.x,b.y=l.y-be):(y=(t-i)*e+i,b.x=(l.x-n.x)*e+n.x,b.y=(l.y-be-n.y)*e+n.y),S(),u?m.style.opacity=1-e:T(o-e*o)},c?ut("initialZoom",0,1,d,p.easing.cubic.out,e,s):(e(1),Vt=setTimeout(s,d+20))):(y=r.initialZoomLevel,C(b,r.initialPosition),S(),T(1),u?m.style.opacity=1:T(1),Vt=setTimeout(s,d+20))},a?25:90)):(A("initialZoom"+(a?"Out":"In")),y=r.initialZoomLevel,C(b,r.initialPosition),S(),m.style.opacity=a?0:1,T(1),d?setTimeout(function(){s()},d):s())},N={},nn=[],on={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Xt.length}},rn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},an=function(e,t,n){var i=e.bounds;i.center.x=Math.round((N.x-t)/2),i.center.y=Math.round((N.y-n)/2)+e.vGap.top,i.max.x=t>N.x?Math.round(N.x-t):i.center.x,i.max.y=n>N.y?Math.round(N.y-n)+e.vGap.top:i.center.y,i.min.x=t>N.x?0:i.center.x,i.min.y=n>N.y?e.vGap.top:i.center.y},sn=function(e,t,n){var i,o;return e.src&&!e.loadError?((i=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),A("parseVerticalMargin",e)),N.x=t.x,N.y=t.y-e.vGap.top-e.vGap.bottom,i&&(t=N.x/e.w,o=N.y/e.h,e.fitRatio=t<o?t:o,"orig"===(t=g.scaleMode)?n=1:"fit"===t&&(n=e.fitRatio),e.initialZoomLevel=n=1<n?1:n,e.bounds||(e.bounds=rn())),n?(an(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0):(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=rn(),e.initialPosition=e.bounds.center,e.bounds)},ln=function(e,t,n,i,o,r){t.loadError||i&&(t.imageAppended=!0,cn(t,i,t===f.currItem&&Ge),n.appendChild(i),r)&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},cn=function(e,t,n){var i;e.src&&(t=t||e.container.lastChild,i=n?e.w:Math.round(e.w*e.fitRatio),n=n?e.h:Math.round(e.h*e.fitRatio),e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=n+"px"),t.style.width=i+"px",t.style.height=n+"px")};$("Controller",{publicMethods:{lazyLoadItem:function(e){e=B(e);var t=en(e);t&&(!t.loaded&&!t.loading||ae)&&(A("gettingData",e,t),t.src)&&Gt(t)},initController:function(){p.extend(g,on,!0),f.items=Xt=t,en=f.getItemAt,D=g.getNumItemsFn,g.loop,D()<3&&(g.loop=!1),r("beforeChange",function(e){for(var t=g.preload,n=null===e||0<=e,i=Math.min(t[0],D()),o=Math.min(t[1],D()),r=1;r<=(n?o:i);r++)f.lazyLoadItem(h+r);for(r=1;r<=(n?i:o);r++)f.lazyLoadItem(h-r)}),r("initialLayout",function(){f.currItem.initialLayout=g.getThumbBoundsFn&&g.getThumbBoundsFn(h)}),r("mainScrollAnimComplete",Yt),r("initialZoomInEnd",Yt),r("destroy",function(){for(var e,t=0;t<Xt.length;t++)(e=Xt[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);nn=null})},getItemAt:function(e){return 0<=e&&void 0!==Xt[e]&&Xt[e]},allowProgressiveImg:function(){return g.forceProgressiveLoading||!o||g.mouseUsed||1200<screen.width},setContent:function(t,n){g.loop&&(n=B(n));var e=f.getItemAt(t.index);e&&(e.container=null);var i,o,r,e=f.getItemAt(n);e?(A("gettingData",n,e),t.index=n,o=(t.item=e).container=p.createEl("pswp__zoom-wrap"),!e.src&&e.html&&(e.html.tagName?o.appendChild(e.html):o.innerHTML=e.html),Kt(e),sn(e,w),!e.src||e.loadError||e.loaded?e.src&&!e.loadError&&((i=p.createEl("pswp__img","img")).style.opacity=1,i.src=e.src,cn(e,i),ln(n,e,o,i,!0)):(e.loadComplete=function(e){if(Y){if(t&&t.index===n){if(Kt(e,!0))return e.loadComplete=e.img=null,sn(e,w),Ve(e),void(t.index===h&&f.updateCurrZoomItem());e.imageAppended?!Jt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):s.transform&&(v||Jt)?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t,clearPlaceholder:!0}):ln(n,e,o,e.img,v||Jt,!0)}e.loadComplete=null,e.img=null,A("imageLoadComplete",n,e)}},p.features.transform&&(r="pswp__img pswp__img--placeholder",r+=e.msrc?"":" pswp__img--placeholder--blank",r=p.createEl(r,e.msrc?"img":""),e.msrc&&(r.src=e.msrc),cn(e,r),o.appendChild(r),e.placeholder=r),e.loading||Gt(e),f.allowProgressiveImg()&&(!Qt&&s.transform?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t}):ln(n,e,o,e.img,!0,!0))),Qt||n!==h?Ve(e):(De=o.style,tn(e,i||e.img)),t.el.innerHTML="",t.el.appendChild(o)):t.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function un(e,t,n){var i=document.createEvent("CustomEvent"),t={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,t),e.target.dispatchEvent(i)}var dn,M,mn={};$("Tap",{publicMethods:{initTap:function(){r("firstTouchStart",f.onTapStart),r("touchRelease",f.onTapRelease),r("destroy",function(){mn={},dn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(dn),dn=null)},onTapRelease:function(e,t){var n,i,o;!t||Fe||Ce||at||(n=t,dn&&(clearTimeout(dn),dn=null,i=n,o=mn,Math.abs(i.x-o.x)<H)&&Math.abs(i.y-o.y)<H?A("doubleTap",n):"mouse"===t.type?un(e,t,"mouse"):"BUTTON"===e.target.tagName.toUpperCase()||p.hasClass(e.target,"pswp__single-tap")?un(e,t):(C(mn,n),dn=setTimeout(function(){un(e,t),dn=null},300)))}}}),$("DesktopZoom",{publicMethods:{initDesktopZoom:function(){ve||(o?r("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(e){M={};var t="wheel mousewheel DOMMouseScroll";r("bindEvents",function(){p.bind(m,t,f.handleMouseWheel)}),r("unbindEvents",function(){M&&p.unbind(m,t,f.handleMouseWheel)}),f.mouseZoomedIn=!1;function n(){f.mouseZoomedIn&&(p.removeClass(m,"pswp--zoomed-in"),f.mouseZoomedIn=!1),y<1?p.addClass(m,"pswp--zoom-allowed"):p.removeClass(m,"pswp--zoom-allowed"),o()}var i,o=function(){i&&(p.removeClass(m,"pswp--dragging"),i=!1)};r("resize",n),r("afterChange",n),r("pointerDown",function(){f.mouseZoomedIn&&(i=!0,p.addClass(m,"pswp--dragging"))}),r("pointerUp",o),e||n()},handleMouseWheel:function(e){if(y<=f.currItem.fitRatio)return g.modal&&(!g.closeOnScroll||at||l?e.preventDefault():me&&2<Math.abs(e.deltaY)&&(X=!0,f.close())),!0;if(e.stopPropagation(),M.x=0,"deltaX"in e)1===e.deltaMode?(M.x=18*e.deltaX,M.y=18*e.deltaY):(M.x=e.deltaX,M.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(M.x=-.16*e.wheelDeltaX),e.wheelDeltaY?M.y=-.16*e.wheelDeltaY:M.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;M.y=e.detail}it(y,!0);var t=b.x-M.x,n=b.y-M.y;(g.modal||t<=d.min.x&&t>=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),f.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:w.x/2+qe.x,y:w.y/2+qe.y};var t=g.getDoubleTapZoom(!0,f.currItem),n=y===t;f.mouseZoomedIn=!n,f.zoomTo(n?f.currItem.initialZoomLevel:t,e,333),p[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}});function pn(){gn&&clearTimeout(gn),yn&&clearTimeout(yn)}function fn(){var e=Sn(),t={};if(!(e.length<5)){var n,i=e.split("&");for(r=0;r<i.length;r++)!i[r]||(n=i[r].split("=")).length<2||(t[n[0]]=n[1]);if(g.galleryPIDs){for(var o=t.pid,r=t.pid=0;r<Xt.length;r++)if(Xt[r].pid===o){t.pid=r;break}}else t.pid=parseInt(t.pid,10)-1;t.pid<0&&(t.pid=0)}return t}var gn,hn,yn,vn,bn,wn,n,xn,En,An,P,kn,Tn={history:!0,galleryUID:1},Sn=function(){return P.hash.substring(1)},Cn=function(){var e,t;yn&&clearTimeout(yn),at||l?yn=setTimeout(Cn,500):(vn?clearTimeout(hn):vn=!0,t=h+1,(e=en(h)).hasOwnProperty("pid")&&(t=e.pid),e=n+"&gid="+g.galleryUID+"&pid="+t,xn||-1===P.hash.indexOf(e)&&(An=!0),t=P.href.split("#")[0]+"#"+e,kn?"#"+e!==window.location.hash&&history[xn?"replaceState":"pushState"]("",document.title,t):xn?P.replace(t):P.hash=e,xn=!0,hn=setTimeout(function(){vn=!1},60))};$("History",{publicMethods:{initHistory:function(){var e,t;p.extend(g,Tn,!0),g.history&&(P=window.location,xn=En=An=!1,n=Sn(),kn="pushState"in history,-1<n.indexOf("gid=")&&(n=(n=n.split("&gid=")[0]).split("?gid=")[0]),r("afterChange",f.updateURL),r("unbindEvents",function(){p.unbind(window,"hashchange",f.onHashChange)}),e=function(){wn=!0,En||(An?history.back():n?P.hash=n:kn?history.pushState("",document.title,P.pathname+P.search):P.hash=""),pn()},r("unbindEvents",function(){X&&e()}),r("destroy",function(){wn||e()}),r("firstUpdate",function(){h=fn().pid}),-1<(t=n.indexOf("pid="))&&"&"===(n=n.substring(0,t)).slice(-1)&&(n=n.slice(0,-1)),setTimeout(function(){Y&&p.bind(window,"hashchange",f.onHashChange)},40))},onHashChange:function(){return Sn()===n?(En=!0,void f.close()):void(vn||(bn=!0,f.goTo(fn().pid),bn=!1))},updateURL:function(){pn(),bn||(xn?gn=setTimeout(Cn,800):Cn())}}}),p.extend(f,z)}});var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(l){var e,n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,i={},I={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof L?new L(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function n(e,i){var o,t;switch(i=i||{},I.util.type(e)){case"Object":if(t=I.util.objId(e),i[t])return i[t];for(var r in o={},i[t]=o,e)e.hasOwnProperty(r)&&(o[r]=n(e[r],i));return o;case"Array":return t=I.util.objId(e),i[t]||(o=[],i[t]=o,e.forEach(function(e,t){o[t]=n(e,i)}),o);default:return e}},getLanguage:function(e){for(;e;){var t=n.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(n,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(e.stack)||[])[1];if(t){var n,i=document.getElementsByTagName("script");for(n in i)if(i[n].src==t)return i[n]}return null}},isActive:function(e,t,n){for(var i="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(i))return!1;e=e.parentElement}return!!n}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(e,t){var n,i=I.util.clone(I.languages[e]);for(n in t)i[n]=t[n];return i},insertBefore:function(n,e,t,i){var o,r=(i=i||I.languages)[n],a={};for(o in r)if(r.hasOwnProperty(o)){if(o==e)for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s]);t.hasOwnProperty(o)||(a[o]=r[o])}var l=i[n];return i[n]=a,I.languages.DFS(I.languages,function(e,t){t===l&&e!=n&&(this[e]=a)}),a},DFS:function e(t,n,i,o){o=o||{};var r,a,s,l=I.util.objId;for(r in t)t.hasOwnProperty(r)&&(n.call(t,r,t[r],i||r),a=t[r],"Object"!==(s=I.util.type(a))||o[l(a)]?"Array"!==s||o[l(a)]||(o[l(a)]=!0,e(a,n,r,o)):(o[l(a)]=!0,e(a,n,null,o)))}},plugins:{},highlightAll:function(e,t){I.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var i={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};I.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),I.hooks.run("before-all-elements-highlight",i);for(var o,r=0;o=i.elements[r++];)I.highlightElement(o,!0===t,i.callback)},highlightElement:function(e,t,n){var i=I.util.getLanguage(e),o=I.languages[i],r=(I.util.setLanguage(e,i),e.parentElement),a=(r&&"pre"===r.nodeName.toLowerCase()&&I.util.setLanguage(r,i),{element:e,language:i,grammar:o,code:e.textContent});function s(e){a.highlightedCode=e,I.hooks.run("before-insert",a),a.element.innerHTML=a.highlightedCode,I.hooks.run("after-highlight",a),I.hooks.run("complete",a),n&&n.call(a.element)}I.hooks.run("before-sanity-check",a),(r=a.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),a.code?(I.hooks.run("before-highlight",a),a.grammar?t&&l.Worker?((i=new Worker(I.filename)).onmessage=function(e){s(e.data)},i.postMessage(JSON.stringify({language:a.language,code:a.code,immediateClose:!0}))):s(I.highlight(a.code,a.grammar,a.language)):s(I.util.encode(a.code))):(I.hooks.run("complete",a),n&&n.call(a.element))},highlight:function(e,t,n){e={code:e,grammar:t,language:n};if(I.hooks.run("before-tokenize",e),e.grammar)return e.tokens=I.tokenize(e.code,e.grammar),I.hooks.run("after-tokenize",e),L.stringify(I.util.encode(e.tokens),e.language);throw new Error('The language "'+e.language+'" has no grammar.')},tokenize:function(e,t){var n=t.rest;if(n){for(var i in n)t[i]=n[i];delete t.rest}for(var o=new c,r=(D(o,o.head,e),function e(t,n,i,o,r,a){for(var s in i)if(i.hasOwnProperty(s)&&i[s]){var l=i[s];l=Array.isArray(l)?l:[l];for(var c=0;c<l.length;++c){if(a&&a.cause==s+","+c)return;var u,d=l[c],m=d.inside,p=!!d.lookbehind,f=!!d.greedy,g=d.alias;f&&!d.pattern.global&&(u=d.pattern.toString().match(/[imsuy]*$/)[0],d.pattern=RegExp(d.pattern.source,u+"g"));for(var h=d.pattern||d,y=o.next,v=r;y!==n.tail&&!(a&&v>=a.reach);v+=y.value.length,y=y.next){var b=y.value;if(n.length>t.length)return;if(!(b instanceof L)){var w,x=1;if(f){if(!(w=O(h,v,t,p))||w.index>=t.length)break;var E=w.index,A=w.index+w[0].length,k=v;for(k+=y.value.length;k<=E;)k+=(y=y.next).value.length;if(v=k-=y.value.length,y.value instanceof L)continue;for(var T=y;T!==n.tail&&(k<A||"string"==typeof T.value);T=T.next)x++,k+=T.value.length;x--,b=t.slice(v,k),w.index-=v}else if(!(w=O(h,0,b,p)))continue;E=w.index;var S=w[0],C=b.slice(0,E),_=b.slice(E+S.length),b=v+b.length,F=(a&&b>a.reach&&(a.reach=b),y.prev);C&&(F=D(n,F,C),v+=C.length),N(n,F,x),y=D(n,F,new L(s,m?I.tokenize(S,m):S,g,S)),_&&D(n,y,_),1<x&&(C={cause:s+","+c,reach:b},e(t,n,i,y.prev,v,C),a)&&C.reach>a.reach&&(a.reach=C.reach)}}}}}(e,o,t,o.head,0),o),a=[],s=r.head.next;s!==r.tail;)a.push(s.value),s=s.next;return a},hooks:{all:{},add:function(e,t){var n=I.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=I.hooks.all[e];if(n&&n.length)for(var i,o=0;i=n[o++];)i(t)}},Token:L};function L(e,t,n,i){this.type=e,this.content=t,this.alias=n,this.length=0|(i||"").length}function O(e,t,n,i){e.lastIndex=t;t=e.exec(n);return t&&i&&t[1]&&(e=t[1].length,t.index+=e,t[0]=t[0].slice(e)),t}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function D(e,t,n){var i=t.next,n={value:n,prev:t,next:i};return t.next=n,i.prev=n,e.length++,n}function N(e,t,n){for(var i=t.next,o=0;o<n&&i!==e.tail;o++)i=i.next;(t.next=i).prev=t,e.length-=o}return(l.Prism=I,L.stringify=function t(e,n){if("string"==typeof e)return e;var i;if(Array.isArray(e))return i="",e.forEach(function(e){i+=t(e,n)}),i;var o,r={type:e.type,content:t(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n},e=e.alias,a=(e&&(Array.isArray(e)?Array.prototype.push.apply(r.classes,e):r.classes.push(e)),I.hooks.run("wrap",r),"");for(o in r.attributes)a+=" "+o+'="'+(r.attributes[o]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+a+">"+r.content+"</"+r.tag+">"},l.document)?((i=I.util.currentScript())&&(I.filename=i.src,i.hasAttribute("data-manual"))&&(I.manual=!0),I.manual||("loading"===(e=document.readyState)||"interactive"===e&&i&&i.defer?document.addEventListener("DOMContentLoaded",o):window.requestAnimationFrame?window.requestAnimationFrame(o):window.setTimeout(o,16))):l.addEventListener&&!I.disableWorkerMessageHandler&&l.addEventListener("message",function(e){var e=JSON.parse(e.data),t=e.language,n=e.code,e=e.immediateClose;l.postMessage(I.highlight(n,I.languages[t],t)),e&&l.close()},!1),I;function o(){I.manual||I.highlightAll()}}(_self);function dropdown(){const i=window.matchMedia("(max-width: 767px)"),o=document.querySelector(".gh-navigation"),r=o.querySelector(".gh-navigation-menu"),a=r?.querySelector(".nav");if(a){const e=document.querySelector(".gh-navigation-logo"),t=a.innerHTML;i.matches&&a.querySelectorAll("li").forEach(function(e,t){e.style.transitionDelay=.03*(t+1)+"s"});const n=function(){if(!i.matches){for(var e=[];a.offsetWidth+64>r.offsetWidth&&a.lastElementChild;)e.unshift(a.lastElementChild),a.lastElementChild.remove();if(e.length){const t=document.createElement("button"),n=(t.setAttribute("class","gh-more-toggle gh-icon-button"),t.setAttribute("aria-label","More"),t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>',document.createElement("div"));n.setAttribute("class","gh-dropdown"),10<=e.length?(o.classList.add("is-dropdown-mega"),n.style.gridTemplateRows=`repeat(${Math.ceil(e.length/2)}, 1fr)`):o.classList.remove("is-dropdown-mega"),e.forEach(function(e){n.appendChild(e)}),t.appendChild(n),a.appendChild(t),o.classList.add("is-dropdown-loaded"),window.addEventListener("click",function(e){o.classList.contains("is-dropdown-open")?o.classList.remove("is-dropdown-open"):t.contains(e.target)&&o.classList.add("is-dropdown-open")})}else o.classList.add("is-dropdown-loaded")}};imagesLoaded(e,function(){n()}),window.addEventListener("load",function(){e||n()}),window.addEventListener("resize",function(){setTimeout(()=>{a.innerHTML=t,n()},1)})}}function lightbox(e){document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",function(e){var t=e;t.preventDefault();for(var n,i=[],o=0,r=t.target.closest(".kg-card").previousElementSibling;r&&(r.classList.contains("kg-image-card")||r.classList.contains("kg-gallery-card"));){var a=[];r.querySelectorAll("img").forEach(function(e){a.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),o+=1}),r=r.previousElementSibling,i=a.concat(i)}t.target.classList.contains("kg-image")?i.push({src:t.target.getAttribute("src"),msrc:t.target.getAttribute("src"),w:t.target.getAttribute("width"),h:t.target.getAttribute("height"),el:t.target}):(n=!1,t.target.closest(".kg-gallery-card").querySelectorAll("img").forEach(function(e){i.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),n||e===t.target?n=!0:o+=1}));for(var s=t.target.closest(".kg-card").nextElementSibling;s&&(s.classList.contains("kg-image-card")||s.classList.contains("kg-gallery-card"));)s.querySelectorAll("img").forEach(function(e){i.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e})}),s=s.nextElementSibling;e=document.querySelectorAll(".pswp")[0];new PhotoSwipe(e,PhotoSwipeUI_Default,i,{bgOpacity:.9,closeOnScroll:!0,fullscreenEl:!1,history:!1,index:o,shareEl:!1,zoomEl:!1,getThumbBoundsFn:function(e){var e=i[e].el,t=window.pageYOffset||document.documentElement.scrollTop,e=e.getBoundingClientRect();return{x:e.left,y:e.top+t,w:e.width}}}).init()})})}"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={},n=(n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]},{});t[e]={pattern:RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+e+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+t.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"],Prism.languages["go-mod"]=Prism.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}},n=(delete e.languages.ruby.function,"(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")"),i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+n+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(){var y,v,b,w,x,o;function E(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function A(e,t){return e.classList.contains(t)}function k(e){e()}function r(e){return!!(e&&/pre/i.test(e.nodeName)&&(e.hasAttribute("data-line")||e.id&&Prism.util.isActive(e,b)))}function a(){var e=location.hash.slice(1),t=(E(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)}),(e.match(/\.([\d,-]+)$/)||[,""])[1]);t&&!document.getElementById(e)&&(e=e.slice(0,e.lastIndexOf(".")),e=document.getElementById(e))&&(e.hasAttribute("data-line")||e.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(e,t,"temporary ")(),x)&&document.querySelector(".temporary.line-highlight").scrollIntoView()}void 0!==Prism&&"undefined"!=typeof document&&document.querySelector&&(v="line-numbers",b="linkable-line-numbers",w=/\n(?!$)/g,x=!0,Prism.plugins.lineHighlight={highlightLines:function(l,e,c){var t,n,e=(e="string"==typeof e?e:l.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),u=+l.getAttribute("data-line-offset")||0,d=(void 0===y&&((i=document.createElement("div")).style.fontSize="13px",i.style.lineHeight="1.5",i.style.padding="0",i.style.border="0",i.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(i),y=38===i.offsetHeight,document.body.removeChild(i)),(y?parseInt:parseFloat)(getComputedStyle(l).lineHeight)),m=Prism.util.isActive(l,v),i=l.querySelector("code"),p=!m&&i||l,f=[],o=i.textContent.match(w),g=o?o.length+1:1,h=i&&p!=i?(o=i,t=getComputedStyle(l),n=getComputedStyle(o),o.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(t.paddingTop)):0;function r(e){return+e.substr(0,e.length-2)}e.forEach(function(e){var t,n,i,o,r=e.split("-"),a=+r[0],s=+r[1]||a;(s=Math.min(g+u,s))<a||(t=l.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div"),f.push(function(){t.setAttribute("aria-hidden","true"),t.setAttribute("data-range",e),t.className=(c||"")+" line-highlight"}),m&&Prism.plugins.lineNumbers?(r=Prism.plugins.lineNumbers.getLine(l,a),n=Prism.plugins.lineNumbers.getLine(l,s),r&&(i=r.offsetTop+h+"px",f.push(function(){t.style.top=i})),n&&(o=n.offsetTop-r.offsetTop+n.offsetHeight+"px",f.push(function(){t.style.height=o}))):f.push(function(){t.setAttribute("data-start",String(a)),a<s&&t.setAttribute("data-end",String(s)),t.style.top=(a-u-1)*d+h+"px",t.textContent=new Array(s-a+2).join(" \n")}),f.push(function(){t.style.width=l.scrollWidth+"px"}),f.push(function(){p.appendChild(t)}))});var a,s=l.id;return m&&Prism.util.isActive(l,b)&&s&&(A(l,b)||f.push(function(){l.classList.add(b)}),a=parseInt(l.getAttribute("data-start")||"1"),E(".line-numbers-rows > span",l).forEach(function(e,t){var n=t+a;e.onclick=function(){x=!1,location.hash=s+"."+n,setTimeout(function(){x=!0},1)}})),function(){f.forEach(k)}}},o=0,Prism.hooks.add("before-sanity-check",function(e){var t,n=e.element.parentElement;r(n)&&(t=0,E(".line-highlight",n).forEach(function(e){t+=e.textContent.length,e.parentNode.removeChild(e)}),t)&&/^(?: \n)+$/.test(e.code.slice(-t))&&(e.code=e.code.slice(0,-t))}),Prism.hooks.add("complete",function e(t){var n,i=t.element.parentElement;r(i)&&(clearTimeout(o),n=Prism.plugins.lineNumbers,t=t.plugins&&t.plugins.lineNumbers,A(i,v)&&n&&!t?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(i)(),o=setTimeout(a,1)))}),window.addEventListener("hashchange",a),window.addEventListener("resize",function(){E("pre").filter(r).map(function(e){return Prism.plugins.lineHighlight.highlightLines(e)}).forEach(k)}))}(),function(){var o,r,e,t;function a(e){0!=(e=e.filter(function(e){e=((e=e)?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null)["white-space"];return"pre-wrap"===e||"pre-line"===e})).length&&((e=e.map(function(e){var t,n=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(n&&i)return i=e.querySelector(".line-numbers-sizer"),t=n.textContent.split(r),i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block",n=i.getBoundingClientRect().height,i.innerHTML="",{element:e,lines:t,lineHeights:[],oneLinerHeight:n,sizer:i}}).filter(Boolean)).forEach(function(e){var i=e.sizer,t=e.lines,o=e.lineHeights,r=e.oneLinerHeight;o[t.length-1]=void 0,t.forEach(function(e,t){var n;e&&1<e.length?((n=i.appendChild(document.createElement("span"))).style.display="block",n.textContent=e):o[t]=r})}),e.forEach(function(e){for(var t=e.sizer,n=e.lineHeights,i=0,o=0;o<n.length;o++)void 0===n[o]&&(n[o]=t.children[i++].getBoundingClientRect().height)}),e.forEach(function(e){var t=e.sizer,n=e.element.querySelector(".line-numbers-rows");t.style.display="none",t.innerHTML="",e.lineHeights.forEach(function(e,t){n.children[t].style.height=e+"px"})}))}void 0!==Prism&&"undefined"!=typeof document&&(o="line-numbers",r=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(o)){var n,i=e.querySelector(".line-numbers-rows");if(i)return n=(t=(n=(e=parseInt(e.getAttribute("data-start"),10)||1)+(i.children.length-1))<(t=t<e?e:t)?n:t)-e,i.children[n]}},resize:function(e){a([e])},assumeViewportIndependence:!0},t=void 0,window.addEventListener("resize",function(){e.assumeViewportIndependence&&t===window.innerWidth||(t=window.innerWidth,a(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))}),Prism.hooks.add("complete",function(e){var t,n,i;e.code&&(t=(i=e.element).parentNode)&&/pre/i.test(t.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,o)&&(i.classList.remove(o),t.classList.add(o),i=(i=e.code.match(r))?i.length+1:1,i=new Array(i+1).join("<span></span>"),(n=document.createElement("span")).setAttribute("aria-hidden","true"),n.className="line-numbers-rows",n.innerHTML=i,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(n),a([t]),Prism.hooks.run("line-numbers",e))}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}(),function(){var r,a,s,e,t;void 0!==Prism&&"undefined"!=typeof document&&(r=[],a={},s=function(){},Prism.plugins.toolbar={},e=Prism.plugins.toolbar.registerButton=function(e,n){var t="function"==typeof n?n:function(e){var t;return"function"==typeof n.onClick?((t=document.createElement("button")).type="button",t.addEventListener("click",function(){n.onClick.call(this,e)})):"string"==typeof n.url?(t=document.createElement("a")).href=n.url:t=document.createElement("span"),n.className&&t.classList.add(n.className),t.textContent=n.text,t};e in a?console.warn('There is a button with the key "'+e+'" registered already.'):r.push(a[e]=t)},t=Prism.plugins.toolbar.hook=function(n){var e,i,t,o=n.element.parentNode;o&&/pre/i.test(o.nodeName)&&!o.parentNode.classList.contains("code-toolbar")&&((e=document.createElement("div")).classList.add("code-toolbar"),o.parentNode.insertBefore(e,o),e.appendChild(o),(i=document.createElement("div")).classList.add("toolbar"),o=r,(o=(t=function(e){for(;e;){var t=e.getAttribute("data-toolbar-order");if(null!=t)return(t=t.trim()).length?t.split(/\s*,\s*/g):[];e=e.parentElement}}(n.element))?t.map(function(e){return a[e]||s}):o).forEach(function(e){var t,e=e(n);e&&((t=document.createElement("div")).classList.add("toolbar-item"),t.appendChild(e),i.appendChild(t))}),e.appendChild(i))},e("label",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-label")){var n,i,o=t.getAttribute("data-label");try{i=document.querySelector("template#"+o)}catch(e){}return i?n=i.content:(t.hasAttribute("data-url")?(n=document.createElement("a")).href=t.getAttribute("data-url"):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",t))}(),function(){function l(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy");setTimeout(function(){n?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}void 0!==Prism&&"undefined"!=typeof document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(e){var t,n=e.element,i=function(e){var t,n={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(t in n){for(var i="data-prismjs-"+t,o=e;o&&!o.hasAttribute(i);)o=o.parentElement;o&&(n[t]=o.getAttribute(i))}return n}(n),o=document.createElement("button"),r=(o.className="copy-to-clipboard-button",o.setAttribute("type","button"),document.createElement("span"));return o.appendChild(r),s("copy"),t={getText:function(){return n.textContent},success:function(){s("copy-success"),a()},error:function(){s("copy-error"),setTimeout(function(){var e;e=n,window.getSelection().selectAllChildren(e)},1),a()}},o.addEventListener("click",function(){var e;e=t,navigator.clipboard?navigator.clipboard.writeText(e.getText()).then(e.success,function(){l(e)}):l(e)}),o;function a(){setTimeout(function(){s("copy")},i["copy-timeout"])}function s(e){r.textContent=i[e],o.setAttribute("data-copy-state",e)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,function(){"use strict";function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t,n){return(i=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),1}catch(e){}}}()?Reflect.construct:function(e,t,n){var i=[null],t=(i.push.apply(i,t),new(Function.bind.apply(e,i)));return n&&o(t,n.prototype),t}).apply(null,arguments)}function Be(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||function(e){var t;if(e)return"string"==typeof e?n(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,void 0):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function je(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(r,t)}var r,a=Object.hasOwnProperty,s=Object.setPrototypeOf,l=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,qe=Object.freeze,e=Object.seal,f=Object.create,t="undefined"!=typeof Reflect&&Reflect,d=(d=t.apply)||function(e,t,n){return e.apply(t,n)},qe=qe||function(e){return e},e=e||function(e){return e},m=(m=t.construct)||function(e,t){return i(e,Be(t))},lt=p(Array.prototype.forEach),Ue=p(Array.prototype.pop),Ze=p(Array.prototype.push),We=p(String.prototype.toLowerCase),Ge=p(String.prototype.toString),ct=p(String.prototype.match),Ke=p(String.prototype.replace),ut=p(String.prototype.indexOf),dt=p(String.prototype.trim),Ye=p(RegExp.prototype.test);r=TypeError;function p(o){return function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return d(o,e,n)}}function Ve(e,t,n){n=n||We,s&&s(e,null);for(var i=t.length;i--;){var o,r=t[i];"string"==typeof r&&(o=n(r))!==r&&(l(t)||(t[i]=o),r=o),e[r]=!0}return e}function Xe(e){var t,n=f(null);for(t in e)d(a,e,[t])&&(n[t]=e[t]);return n}function Qe(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return p(n.get);if("function"==typeof n.value)return p(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var Je=qe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),et=qe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=qe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mt=qe(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nt=qe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),pt=qe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),it=qe(["#text"]),ot=qe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),rt=qe(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),at=qe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),st=qe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ft=e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gt=e(/<%[\w\W]*|[\w\W]*%>/gm),ht=e(/\${[\w\W]*}/gm),yt=e(/^data-[\-\w.\u00B7-\uFFFF]/),vt=e(/^aria-[\-\w]+$/),bt=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wt=e(/^(?:\w+script|data):/i),xt=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Et=e(/^html$/i);return function M(){var s=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,c=function(e){return M(e)};if(c.version="2.4.1",c.removed=[],s&&s.document&&9===s.document.nodeType){var l=s.document,o=s.document,P=s.DocumentFragment,e=s.HTMLTemplateElement,u=s.Node,R=s.Element,t=s.NodeFilter,n=s.NamedNodeMap,z=void 0===n?s.NamedNodeMap||s.MozNamedAttrMap:n,H=s.HTMLFormElement,$=s.DOMParser,d=s.trustedTypes,n=R.prototype,B=Qe(n,"cloneNode"),j=Qe(n,"nextSibling"),q=Qe(n,"childNodes"),m=Qe(n,"parentNode"),p=("function"==typeof e&&(n=o.createElement("template")).content&&n.content.ownerDocument&&(o=n.content.ownerDocument),function(e,t){if("object"!==$e(e)||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix",t="dompurify"+((n=t.currentScript&&t.currentScript.hasAttribute(i)?t.currentScript.getAttribute(i):n)?"#"+n:"");try{return e.createPolicy(t,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+t+" could not be created."),null}}(d,l)),U=p?p.createHTML(""):"",e=o,Z=e.implementation,W=e.createNodeIterator,G=e.createDocumentFragment,K=e.getElementsByTagName,Y=l.importNode,n={};try{n=Xe(o).documentMode?o.documentMode:{}}catch(e){}var i={};c.isSupported="function"==typeof m&&Z&&void 0!==Z.createHTMLDocument&&9!==n;var f,g,V,X=ft,Q=gt,J=ht,ee=yt,te=vt,ne=wt,ie=xt,oe=bt,h=null,re=Ve({},[].concat(Be(Je),Be(et),Be(tt),Be(nt),Be(it))),y=null,ae=Ve({},[].concat(Be(ot),Be(rt),Be(at),Be(st))),v=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),b=null,se=null,le=!0,ce=!0,ue=!1,w=!1,x=!1,de=!1,me=!1,E=!1,A=!1,k=!1,pe=!0,fe=!1,ge="user-content-",he=!0,T=!1,r={},S=null,ye=Ve({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ve=null,be=Ve({},["audio","video","img","source","image","track"]),we=null,xe=Ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),C="http://www.w3.org/1998/Math/MathML",_="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml",I=F,Ee=null,Ae=Ve({},[C,_,F],Ge),ke=["application/xhtml+xml","text/html"],a=null,Te=o.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(e){a&&a===e||(e=Xe(e=e&&"object"===$e(e)?e:{}),f=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,g="application/xhtml+xml"===f?Ge:We,h="ALLOWED_TAGS"in e?Ve({},e.ALLOWED_TAGS,g):re,y="ALLOWED_ATTR"in e?Ve({},e.ALLOWED_ATTR,g):ae,Ee="ALLOWED_NAMESPACES"in e?Ve({},e.ALLOWED_NAMESPACES,Ge):Ae,we="ADD_URI_SAFE_ATTR"in e?Ve(Xe(xe),e.ADD_URI_SAFE_ATTR,g):xe,ve="ADD_DATA_URI_TAGS"in e?Ve(Xe(be),e.ADD_DATA_URI_TAGS,g):be,S="FORBID_CONTENTS"in e?Ve({},e.FORBID_CONTENTS,g):ye,b="FORBID_TAGS"in e?Ve({},e.FORBID_TAGS,g):{},se="FORBID_ATTR"in e?Ve({},e.FORBID_ATTR,g):{},r="USE_PROFILES"in e&&e.USE_PROFILES,le=!1!==e.ALLOW_ARIA_ATTR,ce=!1!==e.ALLOW_DATA_ATTR,ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,w=e.SAFE_FOR_TEMPLATES||!1,x=e.WHOLE_DOCUMENT||!1,E=e.RETURN_DOM||!1,A=e.RETURN_DOM_FRAGMENT||!1,k=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,pe=!1!==e.SANITIZE_DOM,fe=e.SANITIZE_NAMED_PROPS||!1,he=!1!==e.KEEP_CONTENT,T=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||oe,I=e.NAMESPACE||F,e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(v.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(v.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(v.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),w&&(ce=!1),A&&(E=!0),r&&(h=Ve({},Be(it)),y=[],!0===r.html&&(Ve(h,Je),Ve(y,ot)),!0===r.svg&&(Ve(h,et),Ve(y,rt),Ve(y,st)),!0===r.svgFilters&&(Ve(h,tt),Ve(y,rt),Ve(y,st)),!0===r.mathMl)&&(Ve(h,nt),Ve(y,at),Ve(y,st)),e.ADD_TAGS&&Ve(h=h===re?Xe(h):h,e.ADD_TAGS,g),e.ADD_ATTR&&Ve(y=y===ae?Xe(y):y,e.ADD_ATTR,g),e.ADD_URI_SAFE_ATTR&&Ve(we,e.ADD_URI_SAFE_ATTR,g),e.FORBID_CONTENTS&&Ve(S=S===ye?Xe(S):S,e.FORBID_CONTENTS,g),he&&(h["#text"]=!0),x&&Ve(h,["html","head","body"]),h.table&&(Ve(h,["tbody"]),delete b.tbody),qe&&qe(e),a=e)},_e=Ve({},["mi","mo","mn","ms","mtext"]),Fe=Ve({},["foreignobject","desc","title","annotation-xml"]),Ie=Ve({},["title","style","font","a","script"]),L=Ve({},et),Le=(Ve(L,tt),Ve(L,mt),Ve({},nt)),O=(Ve(Le,pt),function(t){Ze(c.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=U}catch(e){t.remove()}}}),Oe=function(e,t){try{Ze(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ze(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!y[e])if(E||A)try{O(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){me?e="<remove></remove>"+e:n=(n=ct(e,/^[\r\n\t ]+/))&&n[0],"application/xhtml+xml"===f&&I===F&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var t,n,i=p?p.createHTML(e):e;if(I===F)try{t=(new $).parseFromString(i,f)}catch(e){}if(!t||!t.documentElement){t=Z.createDocument(I,"template",null);try{t.documentElement.innerHTML=V?"":i}catch(e){}}i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),I===F?K.call(t,x?"html":"body")[0]:x?t.documentElement:i},Ne=function(e){return W.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT,null,!1)},D=function(e){return"object"===$e(u)?e instanceof u:e&&"object"===$e(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},N=function(e,t,n){i[e]&&lt(i[e],function(e){e.call(c,t,n,a)})},Me=function(e){if(N("beforeSanitizeElements",e,null),(!((r=e)instanceof H)||"string"==typeof r.nodeName&&"string"==typeof r.textContent&&"function"==typeof r.removeChild&&r.attributes instanceof z&&"function"==typeof r.removeAttribute&&"function"==typeof r.setAttribute&&"string"==typeof r.namespaceURI&&"function"==typeof r.insertBefore&&"function"==typeof r.hasChildNodes)&&!Ye(/[\u0080-\uFFFF]/,e.nodeName)){var t,n,i,o,r=g(e.nodeName);if(N("uponSanitizeElement",e,{tagName:r,allowedTags:h}),(!e.hasChildNodes()||D(e.firstElementChild)||D(e.content)&&D(e.content.firstElementChild)||!Ye(/<[/\w]/g,e.innerHTML)||!Ye(/<[/\w]/g,e.textContent))&&("select"!==r||!Ye(/<template/i,e.innerHTML))){if(h[r]&&!b[r])return(!(e instanceof R)||((n=m(t=e))&&n.tagName||(n={namespaceURI:I,tagName:"template"}),i=We(t.tagName),o=We(n.tagName),Ee[t.namespaceURI]&&(t.namespaceURI===_?n.namespaceURI===F?"svg"===i:n.namespaceURI===C?"svg"===i&&("annotation-xml"===o||_e[o]):Boolean(L[i]):t.namespaceURI===C?n.namespaceURI===F?"math"===i:n.namespaceURI===_?"math"===i&&Fe[o]:Boolean(Le[i]):t.namespaceURI===F?!(n.namespaceURI===_&&!Fe[o]||n.namespaceURI===C&&!_e[o]||Le[i]||!Ie[i]&&L[i]):"application/xhtml+xml"===f&&Ee[t.namespaceURI])))&&("noscript"!==r&&"noembed"!==r||!Ye(/<\/no(script|embed)/i,e.innerHTML))?(w&&3===e.nodeType&&(n=e.textContent,n=Ke(n,X," "),n=Ke(n,Q," "),n=Ke(n,J," "),e.textContent!==n)&&(Ze(c.removed,{element:e.cloneNode()}),e.textContent=n),N("afterSanitizeElements",e,null),!1):(O(e),!0);if(!b[r]&&Re(r)){if(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,r))return!1;if(v.tagNameCheck instanceof Function&&v.tagNameCheck(r))return!1}if(he&&!S[r]){var a=m(e)||e.parentNode,s=q(e)||e.childNodes;if(s&&a)for(var l=s.length-1;0<=l;--l)a.insertBefore(B(s[l],!0),j(e))}}}return O(e),!0},Pe=function(e,t,n){if(pe&&("id"===t||"name"===t)&&(n in o||n in Te))return!1;if((!ce||se[t]||!Ye(ee,t))&&(!le||!Ye(te,t)))if(!y[t]||se[t]){if(!(Re(e)&&(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,e)||v.tagNameCheck instanceof Function&&v.tagNameCheck(e))&&(v.attributeNameCheck instanceof RegExp&&Ye(v.attributeNameCheck,t)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(t))||"is"===t&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,n)||v.tagNameCheck instanceof Function&&v.tagNameCheck(n))))return!1}else if(!we[t]&&!Ye(oe,Ke(n,ie,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ut(n,"data:")||!ve[e])&&(!ue||Ye(ne,Ke(n,ie,"")))&&n)return!1;return!0},Re=function(e){return 0<e.indexOf("-")},ze=function(e){N("beforeSanitizeAttributes",e,null);var t=e.attributes;if(t){for(var n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:y},i=t.length;i--;){s=t[i];var o=s.name,r=s.namespaceURI,a="value"===o?s.value:dt(s.value),s=g(o);if(n.attrName=s,n.attrValue=a,n.keepAttr=!0,n.forceKeepAttr=void 0,N("uponSanitizeAttribute",e,n),a=n.attrValue,!n.forceKeepAttr&&(Oe(o,e),n.keepAttr))if(Ye(/\/>/i,a))Oe(o,e);else{w&&(a=Ke(a,X," "),a=Ke(a,Q," "),a=Ke(a,J," "));var l=g(e.nodeName);if(Pe(l,s,a)){if(!fe||"id"!==s&&"name"!==s||(Oe(o,e),a=ge+a),p&&"object"===$e(d)&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(l,s)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?e.setAttributeNS(r,o,a):e.setAttribute(o,a),Ue(c.removed)}catch(e){}}}}N("afterSanitizeAttributes",e,null)}},He=function e(t){var n,i=Ne(t);for(N("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)N("uponSanitizeShadowNode",n,null),Me(n)||(n.content instanceof P&&e(n.content),ze(n));N("afterSanitizeShadowDOM",t,null)};c.sanitize=function(e){var t,n,i,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof(e=(V=!e)?"\x3c!--\x3e":e)&&!D(e)){if("function"!=typeof e.toString)throw je("toString is not a function");if("string"!=typeof(e=e.toString()))throw je("dirty is not a string, aborting")}if(!c.isSupported){if("object"===$e(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(D(e))return s.toStaticHTML(e.outerHTML)}return e}if(de||Ce(r),c.removed=[],T="string"==typeof e?!1:T){if(e.nodeName){var r=g(e.nodeName);if(!h[r]||b[r])throw je("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)1===(r=(t=De("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?t=r:t.appendChild(r);else{if(!E&&!w&&!x&&-1===e.indexOf("<"))return p&&k?p.createHTML(e):e;if(!(t=De(e)))return E?null:k?U:""}t&&me&&O(t.firstChild);for(var a=Ne(T?e:t);n=a.nextNode();)3===n.nodeType&&n===i||Me(n)||(n.content instanceof P&&He(n.content),ze(n),i=n);if(i=null,T)return e;if(E){if(A)for(o=G.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return o=y.shadowroot?Y.call(l,o,!0):o}r=x?t.outerHTML:t.innerHTML;return x&&h["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&Ye(Et,t.ownerDocument.doctype.name)&&(r="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+r),w&&(r=Ke(r,X," "),r=Ke(r,Q," "),r=Ke(r,J," ")),p&&k?p.createHTML(r):r},c.setConfig=function(e){Ce(e),de=!0},c.clearConfig=function(){a=null,de=!1},c.isValidAttribute=function(e,t,n){a||Ce({});e=g(e),t=g(t);return Pe(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(i[e]=i[e]||[],Ze(i[e],t))},c.removeHook=function(e){if(i[e])return Ue(i[e])},c.removeHooks=function(e){i[e]&&(i[e]=[])},c.removeAllHooks=function(){i={}}}else c.isSupported=!1;return c}()}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).reframe=t()}(this,function(){"use strict";function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),o=0,t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}return function(e,o){return void 0===o&&(o="js-reframe"),("string"==typeof e?t(document.querySelectorAll(e)):"length"in e?t(e):[e]).forEach(function(e){var t,n,i;-1!==e.className.split(" ").indexOf(o)||-1<e.style.width.indexOf("%")||(t=e.getAttribute("height")||e.offsetHeight,n=e.getAttribute("width")||e.offsetWidth,t=("string"==typeof t?parseInt(t):t)/("string"==typeof n?parseInt(n):n)*100,(n=document.createElement("div")).className=o,(i=n.style).position="relative",i.width="100%",i.paddingTop=t+"%",(i=e.style).position="absolute",i.width="100%",i.height="100%",i.left="0",i.top="0",null!=(t=e.parentNode)&&t.insertBefore(n,e),null!=(i=e.parentNode)&&i.removeChild(e),n.appendChild(e))})}}),function(){const e=document.querySelector(".gh-navigation");var t=e.querySelector(".gh-burger");t&&t.addEventListener("click",function(){e.classList.contains("is-open")?e.classList.remove("is-open"):e.classList.add("is-open")})}(),lightbox(".kg-image-card > .kg-image[width][height], .kg-gallery-image > img"),reframe(document.querySelectorAll(['.gh-content iframe[src*="youtube.com"]','.gh-content iframe[src*="youtube-nocookie.com"]','.gh-content iframe[src*="player.vimeo.com"]','.gh-content iframe[src*="kickstarter.com"][src*="video.html"]',".gh-content object",".gh-content embed"].join(","))),dropdown(),document.body.classList.contains("post-template")||pagination();const MASTODON_ACCOUNT_ID="109285376472065471",MASTODON_HOST="social.sd.ai";async function copyElementTextToClipboard(e){var t=e.textContent;await navigator.clipboard.writeText(t),e.classList.add("tootClick"),setTimeout(()=>{e.classList.remove("tootClick")},600)}function escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function renderMastodonContent(e,t,n){if(t.innerHTML="",Array.isArray(e)&&0!==e.length){for(const o of e)if(!o.sensitive){o.account.display_name=escapeHtml(o.account.display_name),o.account.emojis.forEach(e=>{o.account.display_name=o.account.display_name.replace(`:${e.shortcode}:`,`<img src="${escapeHtml(e.static_url)}" alt="Emoji ${e.shortcode}" class="mastodon-emoji" />`)}),o.emojis.forEach(e=>{o.content=o.content.replace(`:${e.shortcode}:`,`<img src="${escapeHtml(e.static_url)}" alt="Emoji ${e.shortcode}" class="mastodon-emoji" />`)});var i=`<div class="mastodon-comment">
<div class="mastodon-avatar">
<img src="${escapeHtml(o.account.avatar_static)}" height=60 width=60 alt="${escapeHtml(o.account.display_name)}'s avatar">
</div>
<div class="mastodon-body">
<div class="mastodon-meta">
<div class="mastodon-author">
<div class="mastodon-author-link">
<a href="${o.account.url}" target="_blank" rel="nofollow">
<span>${o.account.display_name}</span>
</a>
<br/>
<span class="mastodon-author-uid">(@${escapeHtml("s"===o.account.acct?"s@sd.ai":o.account.acct)})</span>
</div>
</div>
<div class="toot-link">
<a class="date" href="${o.uri}" rel="nofollow" target="_blank">
${o.created_at.substring(0,10)}
</a>
<br/>
</div>
</div>
<div class="mastodon-comment-content">
${o.content}
<span class="tootlink" ${n?"":'style="display: none;"'}>${o.uri}</span>
</div>
</div>
</div>`,i=DOMPurify.sanitize(i,{RETURN_DOM_FRAGMENT:!0});for(const r of i.querySelectorAll(".tootlink"))r.onclick=function(){return copyElementTextToClipboard(this)};t.appendChild(i)}}else document.getElementById("mastodon-comments-list").innerHTML="<div class='mastodon-comment'>No comments (yet)!</div>"}let MASTODON_POST_ID;function pagination(e=!0,s,l=!1){const c=document.querySelector(".gh-feed");if(!c)return;let t=!1;async function n(){var t=document.querySelector("link[rel=next]");if(t)try{var e=await(await fetch(t.href)).text(),n=(new DOMParser).parseFromString(e,"text/html"),i=n.querySelectorAll(".gh-feed:not(.gh-featured):not(.gh-related) > *");const r=document.createDocumentFragment(),a=[];i.forEach(function(e){e=document.importNode(e,!0);l&&(e.style.visibility="hidden"),r.appendChild(e),a.push(e)}),c.appendChild(r),s&&s(a,d);var o=n.querySelector("link[rel=next]");o&&o.href?t.href=o.href:(t.remove(),u&&u.remove())}catch(e){throw t.remove(),e}}const i=c.nextElementSibling||document.querySelector(".gh-footer"),u=document.querySelector(".gh-loadmore"),d=(!document.querySelector("link[rel=next]")&&u&&u.remove(),async function(){i.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]")&&await n()});const o=new IntersectionObserver(async function(e){if(!t){if(t=!0,e[0].isIntersecting)if(l)await n();else for(;i.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]");)await n();t=!1,document.querySelector("link[rel=next]")||o.disconnect()}});e?o.observe(i):u.addEventListener("click",n)}document.addEventListener("DOMContentLoaded",async e=>{let t,n;var i=/bot|google|baidu|bing|msn|teoma|slurp|yandex/i.test(navigator.userAgent),i=(0<document.getElementsByClassName("gh-sidebar").length&&(t=`https://${MASTODON_HOST}/api/v1/accounts/${MASTODON_ACCOUNT_ID}/statuses?exclude_replies=true&exclude_reblogs=true`),MASTODON_POST_ID&&!i&&(t=`https://${MASTODON_HOST}/api/v1/statuses/${MASTODON_POST_ID}/context`,n=!0),document.getElementById("mastodon-comments-list"));if(t&&i){var o=document.getElementById("toot-link-top"),r=document.getElementById("toot-link-clip"),a=`https://${MASTODON_HOST}/@s/`+MASTODON_POST_ID;o&&(o.href=a),r&&(r.innerText=a);let e=await(await fetch(t)).json();n&&(e=e.descendants);o=document.getElementById("mastodon-comments-header");return o&&(o.style.display=""),renderMastodonContent(e,i,n)}});const isOSLight=window.matchMedia("(prefers-color-scheme: light)").matches,localTheme=window.localStorage&&window.localStorage.getItem("lightTheme"),themeToggle=document.querySelector(".theme-toggle");function changeFavicon(){var e=document.documentElement.classList.contains("dark-theme")?"/assets/images/favicon-dark.png":"/assets/images/favicon.png",t=document.createElement("link"),n=document.getElementById("dynamic-favicon");t.id="dynamic-favicon",t.rel="shortcut icon",t.href=e,n&&document.head.removeChild(n),document.head.appendChild(t)}function changeTheme(e){document.documentElement.classList.remove("light-theme","dark-theme","has-light-text","has-dark-text"),e?document.documentElement.classList.add("light-theme","has-dark-text"):document.documentElement.classList.add("dark-theme","has-light-text"),window.localStorage&&window.localStorage.setItem("lightTheme",e?"light":"dark"),changeFavicon()}themeToggle.addEventListener("click",()=>{changeTheme(document.documentElement.classList.contains("dark-theme"))}),"light"===localTheme?changeTheme(!0):changeTheme(isOSLight);
//# sourceMappingURL=source.js.map