{"version":3,"sources":["jsdelivr-header.js","/npm/hexo-theme-next@8.29.1/source/js/pjax.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,MAAM,KAAO,IAAI,KAAK,CACpB,UAAW,CACT,aACA,4BACA,kCAEA,iBACA,cACA,aACA,SAEF,SAAU,CACR,iBAAiB,EAAS,GACxB,GAAI,EAAQ,cAAc,aACxB,KAAK,SAAS,UAAU,KAAK,KAAM,EAAS,OACvC,CACL,MAAM,EAAS,EAAQ,cAAc,aACjC,GACF,EAAO,UAAU,IAAI,mBAEvB,KAAK,UACP,CACF,GAEF,WAAW,EACX,WAAW,EAEX,UAAW,OAAO,SAAS,QAAiB,IAG9C,SAAS,iBAAiB,eAAgB,KAIxC,GAHA,KAAK,eAAe,SAAS,iBAAiB,sBAC9C,KAAK,KAAK,UAEN,OAAO,OAAO,OAChB,IACE,KAAK,OAAO,WACT,OACA,IAAI,KAAK,OAAO,YAAY,SAE5B,IAAI,KAAK,OAAO,YAAY,SAC5B,IAAI,KAAK,OAAO,YAAY,UAC5B,WACL,CAAE,MAAO,GACP,QAAQ,KAAK,6CAA8C,GAC3D,SAAS,KAAK,UAAU,OAAO,cAC/B,OAAO,OAAO,QAAS,CACzB,CAEF,GAA+B,WAA3B,OAAO,QAAQ,QAAsB,CACvC,MAAM,EAAS,SAAS,cAAc,mCACtC,SAAS,cAAc,kBAAkB,UAAU,OAAO,qBAAsB,GAChF,KAAK,MAAM,qBAAqB,EAAS,EAAI,GAC7C,KAAK,MAAM,uBACb,IAGG,OAAO,OAAM,OAAO,KAAO","file":"/npm/hexo-theme-next@8.29.1/source/js/pjax.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/hexo-theme-next@8.29.1/source/js/pjax.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 NexT, CONFIG, Pjax */\n\nconst pjax = new Pjax({\n  selectors: [\n    'head title',\n    'meta[property=\"og:title\"]',\n    'script[type=\"application/json\"]',\n    // Precede .main-inner to prevent placeholder TOC changes asap\n    '.post-toc-wrap',\n    '.main-inner',\n    '.languages',\n    '.pjax'\n  ],\n  switches: {\n    '.post-toc-wrap'(oldWrap, newWrap) {\n      if (newWrap.querySelector('.post-toc')) {\n        Pjax.switches.outerHTML.call(this, oldWrap, newWrap);\n      } else {\n        const curTOC = oldWrap.querySelector('.post-toc');\n        if (curTOC) {\n          curTOC.classList.add('placeholder-toc');\n        }\n        this.onSwitch();\n      }\n    }\n  },\n  analytics: false,\n  cacheBust: false,\n  // scrollTo accepts a number (vertical offset), a number array ([x, y]), or false (do not scroll).\n  scrollTo : CONFIG.bookmark.enable ? false : 0\n});\n\ndocument.addEventListener('pjax:success', () => {\n  pjax.executeScripts(document.querySelectorAll('script[data-pjax]'));\n  NexT.boot.refresh();\n  // Define Motion Sequence & Bootstrap Motion.\n  if (CONFIG.motion.enable) {\n    try {\n      NexT.motion.integrator\n        .init()\n        .add(NexT.motion.middleWares.subMenu)\n        // Add sidebar-post-related transition.\n        .add(NexT.motion.middleWares.sidebar)\n        .add(NexT.motion.middleWares.postList)\n        .bootstrap();\n    } catch (error) {\n      console.warn('NexT Motion Error, fallback to static mode', error);\n      document.body.classList.remove('use-motion');\n      CONFIG.motion.enable = false;\n    }\n  }\n  if (CONFIG.sidebar.display !== 'remove') {\n    const hasTOC = document.querySelector('.post-toc:not(.placeholder-toc)');\n    document.querySelector('.sidebar-inner').classList.toggle('sidebar-nav-active', hasTOC);\n    NexT.utils.activateSidebarPanel(hasTOC ? 0 : 1);\n    NexT.utils.updateSidebarPosition();\n  }\n});\n\nif (!window.pjax) window.pjax = pjax;\n"]}