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BAAiB,aAAe,SAAS,cAAc,SAAS,aAAe,EAAO,aACrI,EAAO,UAAU,OAAO,eAAgB,GAAmB,OAAO,YACpE,CAN+B,WAA3B,OAAO,QAAQ,SAAsB,EAAoB,OAQ7D,IACA,OAAO,iBAAiB,SAAU,GAClC,OAAO,iBAAiB,SAAU,EAAsB,CAAE,SAAS,GAAO","file":"/npm/hexo-theme-next@8.12.3/source/js/schemes/muse.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/hexo-theme-next@8.12.3/source/js/schemes/muse.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* global CONFIG */\n\ndocument.addEventListener('DOMContentLoaded', () => {\n\n  const isRight = CONFIG.sidebar.position === 'right';\n\n  const sidebarToggleMotion = {\n    mouse: {},\n    init : function() {\n      window.addEventListener('mousedown', this.mousedownHandler.bind(this));\n      window.addEventListener('mouseup', this.mouseupHandler.bind(this));\n      document.querySelector('.sidebar-dimmer').addEventListener('click', this.clickHandler.bind(this));\n      document.querySelector('.sidebar-toggle').addEventListener('click', this.clickHandler.bind(this));\n      window.addEventListener('sidebar:show', this.showSidebar);\n      window.addEventListener('sidebar:hide', this.hideSidebar);\n    },\n    mousedownHandler: function(event) {\n      this.mouse.X = event.pageX;\n      this.mouse.Y = event.pageY;\n    },\n    mouseupHandler: function(event) {\n      const deltaX = event.pageX - this.mouse.X;\n      const deltaY = event.pageY - this.mouse.Y;\n      const clickingBlankPart = Math.hypot(deltaX, deltaY) < 20 && event.target.matches('.main');\n      // Fancybox has z-index property, but medium-zoom does not, so the sidebar will overlay the zoomed image.\n      if (clickingBlankPart || event.target.matches('img.medium-zoom-image')) {\n        this.hideSidebar();\n      }\n    },\n    clickHandler: function() {\n      document.body.classList.contains('sidebar-active') ? this.hideSidebar() : this.showSidebar();\n    },\n    showSidebar: function() {\n      document.body.classList.add('sidebar-active');\n      const animateAction = isRight ? 'fadeInRight' : 'fadeInLeft';\n      document.querySelectorAll('.sidebar .animated').forEach((element, index) => {\n        element.style.animationDelay = (100 * index) + 'ms';\n        element.classList.remove(animateAction);\n        setTimeout(() => {\n          // Trigger a DOM reflow\n          element.classList.add(animateAction);\n        });\n      });\n    },\n    hideSidebar: function() {\n      document.body.classList.remove('sidebar-active');\n    }\n  };\n  if (CONFIG.sidebar.display !== 'remove') sidebarToggleMotion.init();\n\n  function updateFooterPosition() {\n    const footer = document.querySelector('.footer');\n    const containerHeight = document.querySelector('header.header').offsetHeight + document.querySelector('.main').offsetHeight + footer.offsetHeight;\n    footer.classList.toggle('footer-fixed', containerHeight <= window.innerHeight);\n  }\n\n  updateFooterPosition();\n  window.addEventListener('resize', updateFooterPosition);\n  window.addEventListener('scroll', updateFooterPosition, { passive: true });\n});\n"]}