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ACvB,EAAY,SAAQ,IAClB,EAAQ,UAAU,IAAI,WAAW,IAG9B,EACT,EAEA,SAAU,WACR,MAAM,EAAW,IACX,WAAE,EAAU,YAAE,EAAW,UAAE,EAAS,YAAE,GAAgB,OAAO,OAAO,WAE1E,SAAS,EAAQ,EAAW,GACrB,GACL,SAAS,iBAAiB,GAAU,SAAQ,IAC1C,EAAS,KAAK,CACZ,UACA,SAAU,IAAM,EAAQ,UAAU,IAAI,WAAY,GAClD,OAAU,SACV,GAEN,CAOA,OALA,EAAQ,EAAY,uCACpB,EAAQ,EAAa,sBACrB,EAAQ,EAAa,gBACrB,EAAQ,EAAW,cAEZ,CACT,EAEA,QAAS,WACP,MAAM,EAAU,SAAS,cAAc,YACjC,EAAoB,OAAO,OAAO,WAAW,QAEnD,OAAI,GAAwC,WAAlB,OAAO,QAAyC,WAAlB,OAAO,OAMxD,GALE,CAAC,CACN,QAAU,EACV,SAAU,IAAM,EAAQ,UAAU,IAAI,WAAY,IAIxD,EAEA,OAAQ,WACN,MAAO,CAAC,CACN,QAAS,SAAS,cAAc,WAChC,QAAS,GAEb","file":"/npm/hexo-theme-next@8.13.1/source/js/motion.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/hexo-theme-next@8.13.1/source/js/motion.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 */\n\nNexT.motion = {};\n\nNexT.motion.integrator = {\n  queue: [],\n  init : function() {\n    this.queue = [];\n    return this;\n  },\n  add: function(fn) {\n    const sequence = fn();\n    if (CONFIG.motion.async) this.queue.push(sequence);\n    else this.queue = this.queue.concat(sequence);\n    return this;\n  },\n  bootstrap: function() {\n    if (!CONFIG.motion.async) this.queue = [this.queue];\n    this.queue.forEach(sequence => {\n      const timeline = window.anime.timeline({\n        duration: 200,\n        easing  : 'linear'\n      });\n      sequence.forEach(item => {\n        if (item.deltaT) timeline.add(item, item.deltaT);\n        else timeline.add(item);\n      });\n    });\n  }\n};\n\nNexT.motion.middleWares = {\n  header: function() {\n    const sequence = [];\n\n    function getMistLineSettings(targets) {\n      sequence.push({\n        targets,\n        scaleX  : [0, 1],\n        duration: 500,\n        deltaT  : '-=200'\n      });\n    }\n\n    function pushToSequence(targets, sequenceQueue = false) {\n      sequence.push({\n        targets,\n        opacity: 1,\n        top    : 0,\n        deltaT : sequenceQueue ? '-=200' : '-=0'\n      });\n    }\n\n    pushToSequence('header.header');\n    CONFIG.scheme === 'Mist' && getMistLineSettings('.logo-line');\n    CONFIG.scheme === 'Muse' && pushToSequence('.custom-logo-image');\n    pushToSequence('.site-title');\n    pushToSequence('.site-brand-container .toggle', true);\n    pushToSequence('.site-subtitle');\n    (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && pushToSequence('.custom-logo-image');\n\n    document.querySelectorAll('.menu-item').forEach(targets => {\n      sequence.push({\n        targets,\n        complete: () => targets.classList.add('animated', 'fadeInDown'),\n        deltaT  : '-=200'\n      });\n    });\n\n    return sequence;\n  },\n\n  subMenu: function() {\n    const subMenuItem = document.querySelectorAll('.sub-menu .menu-item');\n    if (subMenuItem.length > 0) {\n      subMenuItem.forEach(element => {\n        element.classList.add('animated');\n      });\n    }\n    return [];\n  },\n\n  postList: function() {\n    const sequence = [];\n    const { post_block, post_header, post_body, coll_header } = CONFIG.motion.transition;\n\n    function animate(animation, selector) {\n      if (!animation) return;\n      document.querySelectorAll(selector).forEach(targets => {\n        sequence.push({\n          targets,\n          complete: () => targets.classList.add('animated', animation),\n          deltaT  : '-=100'\n        });\n      });\n    }\n\n    animate(post_block, '.post-block, .pagination, .comments');\n    animate(coll_header, '.collection-header');\n    animate(post_header, '.post-header');\n    animate(post_body, '.post-body');\n\n    return sequence;\n  },\n\n  sidebar: function() {\n    const sidebar = document.querySelector('.sidebar');\n    const sidebarTransition = CONFIG.motion.transition.sidebar;\n    // Only for Pisces | Gemini.\n    if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) {\n      return [{\n        targets : sidebar,\n        complete: () => sidebar.classList.add('animated', sidebarTransition)\n      }];\n    }\n    return [];\n  },\n\n  footer: function() {\n    return [{\n      targets: document.querySelector('.footer'),\n      opacity: 1\n    }];\n  }\n};\n"]}