(function(){/*! medium-zoom 1.0.4 | MIT License | https://github.com/francoischalifour/medium-zoom */var_extends=Object.assign||function(a){for(varb,c=1;c<arguments.length;c++){for(vardinb=arguments[c],b){Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);}}returna},isSupported=function(a){return'IMG'===a.tagName},isNodeList=function(a){returnNodeList.prototype.isPrototypeOf(a)},isNode=function(a){returna&&1===a.nodeType},isSvg=function(a){varb=a.currentSrc||a.src;return'.svg'===b.substr(-4).toLowerCase()},getImagesFromSelector=function(a){try{returnArray.isArray(a)?a.filter(isSupported):isNodeList(a)?[].slice.call(a).filter(isSupported):isNode(a)?[a].filter(isSupported):'string'==typeofa?[].slice.call(document.querySelectorAll(a)).filter(isSupported):[]}catch(a){thrownewTypeError('The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom')}},createOverlay=function(a){varb=document.createElement('div');returnb.classList.add('medium-zoom-overlay'),b.style.background=a,b},cloneTarget=function(a){varb=a.getBoundingClientRect(),c=b.top,d=b.left,e=b.width,f=b.height,g=a.cloneNode(),h=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,i=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;returng.removeAttribute('id'),g.style.position='absolute',g.style.top=c+h+'px',g.style.left=d+i+'px',g.style.width=e+'px',g.style.height=f+'px',g.style.transform='',g},createCustomEvent=function(a,b){varc=_extends({bubbles:!1,cancelable:!1,detail:void0},b);if('function'==typeofwindow.CustomEvent){returnnewCustomEvent(a,c);}vard=document.createEvent('CustomEvent');returnd.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d},mediumZoom=functiona(b){varc=1<arguments.length&&arguments[1]!==void0?arguments[1]:{},d=window.Promise||function(a){functionb(){}a(b,b);},e=function(a){varb=a.target;returnb===x?voidn():void(-1===r.indexOf(b)||o({target:b}))},f=function(){if(!t&&w.original){vara=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(u-a)>v.scrollOffset&&setTimeout(n,150);}},g=function(){vara=0<arguments.length&&void0!==arguments[0]?arguments[0]:{},b=a;if(a.background&&(x.style.background=a.background),a.container&&a.containerinstanceofObject&&(b.container=_extends({},v.container,a.container)),a.template){varc=isNode(a.template)?a.template:document.querySelector(a.template);b.template=c;}returnv=_extends({},v,b),r.forEach(function(a){a.dispatchEvent(createCustomEvent('medium-zoom:update',{detail:{zoom:y}}));}),y},h=function(){varb=0<arguments.length&&arguments[0]!==void0?arguments[0]:{};returna(_extends({},v,b))},i=function(){vararguments$1=arguments;for(vara=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments$1[c];}vard=b.reduce(function(a,b){return[].concat(a,getImagesFromSelector(b))},[]);returnd.filter(function(a){return-1===r.indexOf(a)}).forEach(function(a){r.push(a),a.classList.add('medium-zoom-image');}),s.forEach(function(a){varb=a.type,c=a.listener,e=a.options;d.forEach(function(a){a.addEventListener(b,c,e);});}),y},j=function(){vararguments$1=arguments;for(vara=arguments.length,b=Array(a),c=0;c<a;c++){b[c]=arguments$1[c];}w.zoomed&&n();vard=0<b.length?b.reduce(function(a,b){return[].concat(a,getImagesFromSelector(b))},[]):r;returnd.forEach(function(a){a.classList.remove('medium-zoom-image'),a.dispatchEvent(createCustomEvent('medium-zoom:detach',{detail:{zoom:y}}));}),r=r.filter(function(a){return-1===d.indexOf(a)}),y},k=function(a,b){varc=2<arguments.length&&void0!==arguments[2]?arguments[2]:{};returnr.forEach(function(d){d.addEventListener('medium-zoom:'+a,b,c);}),s.push({type:'medium-zoom:'+a,listener:b,options:c}),y},l=function(a,b){varc=2<arguments.length&&void0!==arguments[2]?arguments[2]:{};returnr.forEach(function(d){d.removeEventListener('medium-zoom:'+a,b,c);}),s=s.filter(function(c){returnc.type!=='medium-zoom:'+a||c.listener.toString()!==b.toString()}),y},m=function(){vara=0<arguments.length&&arguments[0]!==void0?arguments[0]:{},b=a.target,c=function(){vara=Math.min,b={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},c=void0,d=void0;if(v.container){if(v.containerinstanceofObject){b=_extends({},b,v.container),c=b.width-b.left-b.right-2*v.margin,d=b.height-b.top-b.bottom-2*v.margin;}else{vare=isNode(v.container)?v.container:document.querySelector(v.container),f=e.getBoundingClientRect(),g=f.width,h=f.height,i=f.left,j=f.top;b=_extends({},b,{width:g,height:h,left:i,top:j});}}c=c||b.width-2*v.margin,d=d||b.height-2*v.margin;vark=w.zoomedHd||w.original,l=isSvg(k)?c:k.naturalWidth||c,m=isSvg(k)?d:k.naturalHeight||d,n=k.getBoundingClientRect(),o=n.top,p=n.left,q=n.width,r=n.height,s=a(l,c)/q,t=a(m,d)/r,u=a(s,t),x=(-p+(c-q)/2+v.margin+b.left)/u,y=(-o+(d-r)/2+v.margin+b.top)/u,z='scale('+u+') translate3d('+x+'px, '+y+'px, 0)';w.zoomed.style.transform=z,w.zoomedHd&&(w.zoomedHd.style.transform=z);};returnnewd(function(a){if(b&&-1===r.indexOf(b)){returnvoida(y);}if(w.zoomed){returnvoida(y);}if(b){w.original=b;}elseif(0<r.length){vard=r;w.original=d[0];}else{returnvoida(y);}if(w.original.dispatchEvent(createCustomEvent('medium-zoom:open',{detail:{zoom:y}})),u=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,t=!0,w.zoomed=cloneTarget(w.original),document.body.appendChild(x),v.template){vare=isNode(v.template)?v.template:document.querySelector(v.template);w.template=document.createElement('div'),w.template.appendChild(e.content.cloneNode(!0)),document.body.appendChild(w.template);}if(document.body.appendChild(w.zoomed),window.requestAnimationFrame(function(){document.body.classList.add('medium-zoom--opened');}),w.original.classList.add('medium-zoom-image--hidden'),w.zoomed.classList.add('medium-zoom-image--opened'),w.zoomed.addEventListener('click',n),w.zoomed.addEventListener('transitionend',functionb(){t=!1,w.zoomed.removeEventListener('transitionend',b),w.original.dispatchEvent(createCustomEvent('medium-zoom:opened',{detail:{zoom:y}})),a(y);}),w.original.getAttribute('data-zoom-src')){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute('srcset'),w.zoomedHd.removeAttribute('sizes'),w.zoomedHd.src=w.zoomed.getAttribute('data-zoom-src'),w.zoomedHd.onerror=function(){clearInterval(f),console.warn('Unable to reach the zoom image target '+w.zoomedHd.src),w.zoomedHd=null,c();};varf=setInterval(function(){w.zoomedHd.complete&&(clearInterval(f),w.zoomedHd.classList.add('medium-zoom-image--opened'),w.zoomedHd.addEventListener('click',n),document.body.appendChild(w.zoomedHd),c());},10);}elseif(w.original.hasAttribute('srcset')){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute('sizes');varg=w.zoomedHd.addEventListener('load',function(){w.zoomedHd.removeEventListener('load',g),w.zoomedHd.classList.add('medium-zoom-image--opened'),w.zoomedHd.addEventListener('click',n),document.body.appendChild(w.zoomedHd),c();});}else{c();}})},n=function(){returnnewd(function(a){if(t||!w.original){returnvoida(y);}t=!0,document.body.classList.remove('medium-zoom--opened'),w.zoomed.style.transform='',w.zoomedHd&&(w.zoomedHd.style.transform=''),w.template&&(w.template.style.transition='opacity 150ms',w.template.style.opacity=0),w.original.dispatchEvent(createCustomEvent('medium-zoom:close',{detail:{zoom:y}})),w.zoomed.addEventListener('transitionend',functionb(){w.original.classList.remove('medium-zoom-image--hidden'),document.body.removeChild(w.zoomed),w.zoomedHd&&document.body.removeChild(w.zoomedHd),document.body.removeChild(x),w.zoomed.classList.remove('medium-zoom-image--opened'),w.template&&document.body.removeChild(w.template),t=!1,w.zoomed.removeEventListener('transitionend',b),w.original.dispatchEvent(createCustomEvent('medium-zoom:closed',{detail:{zoom:y}})),w.original=null,w.zoomed=null,w.zoomedHd=null,w.template=null,a(y);});})},o=function(){vara=0<arguments.length&&arguments[0]!==void0?arguments[0]:{},b=a.target;returnw.original?n():m({target:b})},p=function(){returnv},q=function(){returnr},r=[],s=[],t=!1,u=0,v=c,w={original:null,zoomed:null,zoomedHd:null,template:null};'[object Object]'===Object.prototype.toString.call(b)?v=b:(b||'string'==typeofb)&&i(b),v=_extends({margin:0,background:'#fff',scrollOffset:40,container:null,template:null},v);varx=createOverlay(v.background);document.addEventListener('click',e),document.addEventListener('keyup',function(a){27===(a.keyCode||a.which)&&n();}),document.addEventListener('scroll',f),window.addEventListener('resize',n);vary={open:m,close:n,toggle:o,update:g,clone:h,attach:i,detach:j,on:k,off:l,getOptions:p,getImages:q,getZoomedImage:function(){returnw.original}};returny};functionstyleInject(a,b){void0===b&&(b={});varc=b.insertAt;if(a&&'undefined'!=typeofdocument){vard=document.head||document.getElementsByTagName('head')[0],e=document.createElement('style');e.type='text/css','top'===c?d.firstChild?d.insertBefore(e,d.firstChild):d.appendChild(e):d.appendChild(e),e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a));}}styleInject('.medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}');varmatchesSelector=Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.msMatchesSelector;functioninstall(hook){varzoom;hook.doneEach(function(_){varelms=Array.apply(null,document.querySelectorAll('.markdown-section img:not(.emoji):not([data-no-zoom])'));elms=elms.filter(function(elm){returnmatchesSelector.call(elm,'a img')===false;});if(zoom){zoom.detach();}zoom=mediumZoom(elms);});}$docsify.plugins=[].concat(install,$docsify.plugins);}());