hexo-theme-redefine-x 2.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug-chinese.yml +115 -0
- package/.github/ISSUE_TEMPLATE/bug-english.yml +106 -0
- package/.github/ISSUE_TEMPLATE/enhancement-chinese.yml +55 -0
- package/.github/ISSUE_TEMPLATE/enhancement-english.yml +55 -0
- package/.github/workflows/build-and-commit.yml +49 -0
- package/.github/workflows/npm-publish.yml +34 -0
- package/.github/workflows/stale-issues.yml +20 -0
- package/CHANGELOG_REDEFINE_X.md +236 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +51 -0
- package/DONATION.md +82 -0
- package/LICENSE +674 -0
- package/README.md +135 -0
- package/README_zh-CN.md +138 -0
- package/README_zh-TW.md +137 -0
- package/TODO.md +215 -0
- package/_config.yml +489 -0
- package/languages/en.yml +93 -0
- package/languages/es.yml +92 -0
- package/languages/fr.yml +92 -0
- package/languages/ja.yml +92 -0
- package/languages/zh-CN.yml +95 -0
- package/languages/zh-TW.yml +94 -0
- package/layout/404.ejs +1 -0
- package/layout/archive.ejs +1 -0
- package/layout/category.ejs +1 -0
- package/layout/components/comments/comment.ejs +22 -0
- package/layout/components/comments/giscus.ejs +42 -0
- package/layout/components/comments/gitalk.ejs +47 -0
- package/layout/components/comments/twikoo.ejs +50 -0
- package/layout/components/comments/waline.ejs +34 -0
- package/layout/components/footer/footer.ejs +99 -0
- package/layout/components/header/head.ejs +222 -0
- package/layout/components/header/navbar.ejs +163 -0
- package/layout/components/header/preloader.ejs +148 -0
- package/layout/components/header/progress-bar.ejs +12 -0
- package/layout/components/plugins/aplayer.ejs +3 -0
- package/layout/components/scripts.ejs +90 -0
- package/layout/components/sidebar/author.ejs +6 -0
- package/layout/components/sidebar/avatar.ejs +3 -0
- package/layout/components/sidebar/statistics.ejs +14 -0
- package/layout/components/swup.ejs +27 -0
- package/layout/index.ejs +1 -0
- package/layout/layout.ejs +13 -0
- package/layout/page.ejs +57 -0
- package/layout/pages/archive/archive.ejs +3 -0
- package/layout/pages/bookmarks/bookmarks.ejs +68 -0
- package/layout/pages/category/categories.ejs +11 -0
- package/layout/pages/category/category-detail.ejs +6 -0
- package/layout/pages/friends/friends-link.ejs +59 -0
- package/layout/pages/home/home-article.ejs +52 -0
- package/layout/pages/home/home-background.ejs +33 -0
- package/layout/pages/home/home-banner.ejs +234 -0
- package/layout/pages/home/home-content.ejs +62 -0
- package/layout/pages/home/home-sidebar.ejs +78 -0
- package/layout/pages/masonry/masonry.ejs +28 -0
- package/layout/pages/notfound/notfound.ejs +8 -0
- package/layout/pages/page-template.ejs +23 -0
- package/layout/pages/post/article-content.ejs +153 -0
- package/layout/pages/post/article-copyright.ejs +69 -0
- package/layout/pages/post/article-info.ejs +78 -0
- package/layout/pages/post/post-tools.ejs +17 -0
- package/layout/pages/post/toc.ejs +15 -0
- package/layout/pages/shuoshuo/essays.ejs +23 -0
- package/layout/pages/tag/tag-detail.ejs +6 -0
- package/layout/pages/tag/tags.ejs +24 -0
- package/layout/post.ejs +1 -0
- package/layout/tag.ejs +1 -0
- package/layout/tags.ejs +1 -0
- package/layout/utils/image-viewer.ejs +3 -0
- package/layout/utils/local-search.ejs +20 -0
- package/layout/utils/paginator.ejs +8 -0
- package/layout/utils/posts-list.ejs +28 -0
- package/layout/utils/side-tools.ejs +51 -0
- package/package.json +45 -0
- package/scripts/config-export.js +66 -0
- package/scripts/data-handle.js +37 -0
- package/scripts/events/404.js +16 -0
- package/scripts/events/welcome.js +141 -0
- package/scripts/filters/delete-mask-handle.js +27 -0
- package/scripts/filters/encrypt.js +202 -0
- package/scripts/filters/img-handle.js +9 -0
- package/scripts/filters/lazyload-handle.js +350 -0
- package/scripts/filters/lib/hbe.default.js +15 -0
- package/scripts/filters/link-handle.js +42 -0
- package/scripts/filters/stylus-handle.js +9 -0
- package/scripts/filters/table-handle.js +11 -0
- package/scripts/helpers/meta-helpers.js +38 -0
- package/scripts/helpers/page-helpers.js +153 -0
- package/scripts/helpers/recommendation-helpers.js +367 -0
- package/scripts/helpers/theme-helpers.js +251 -0
- package/scripts/helpers/waline-helpers.js +33 -0
- package/scripts/modules/btn.js +85 -0
- package/scripts/modules/btns.js +71 -0
- package/scripts/modules/folding.js +34 -0
- package/scripts/modules/note-large.js +72 -0
- package/scripts/modules/note.js +64 -0
- package/scripts/modules/tabs.js +99 -0
- package/source/assets/hbe.style.css +220 -0
- package/source/assets/odometer-theme-minimal.css +81 -0
- package/source/css/build/tailwind.css +2 -0
- package/source/css/common/animated.styl +71 -0
- package/source/css/common/basic.styl +239 -0
- package/source/css/common/codeblock/code-block.styl +158 -0
- package/source/css/common/codeblock/code-theme.styl +82 -0
- package/source/css/common/codeblock/highlight.styl +189 -0
- package/source/css/common/codeblock/hljs-themes/dark/a11y-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/agate.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/atom-one-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/github-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/monokai-sublime.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/night-owl.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/nord.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/tokyo-night-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/vs2015.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/atom-one-light.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/default.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/github.styl +18 -0
- package/source/css/common/colors.styl +112 -0
- package/source/css/common/markdown.styl +337 -0
- package/source/css/common/redefine-theme.styl +65 -0
- package/source/css/common/theme.styl +72 -0
- package/source/css/common/variables.styl +145 -0
- package/source/css/layout/_modules/aplayer.styl +799 -0
- package/source/css/layout/_modules/buttons.styl +42 -0
- package/source/css/layout/_modules/folding.styl +180 -0
- package/source/css/layout/_modules/notes.styl +181 -0
- package/source/css/layout/_modules/tabs.styl +105 -0
- package/source/css/layout/_partials/404.styl +14 -0
- package/source/css/layout/_partials/archive-list.styl +49 -0
- package/source/css/layout/_partials/article-copyright-info.styl +27 -0
- package/source/css/layout/_partials/article-meta-info.styl +62 -0
- package/source/css/layout/_partials/comments/comment.styl +11 -0
- package/source/css/layout/_partials/comments/gitalk.styl +529 -0
- package/source/css/layout/_partials/comments/twikoo.styl +62 -0
- package/source/css/layout/_partials/comments/waline.styl +1151 -0
- package/source/css/layout/_partials/footer.styl +59 -0
- package/source/css/layout/_partials/home-banner.styl +48 -0
- package/source/css/layout/_partials/image-viewer.styl +37 -0
- package/source/css/layout/_partials/local-search.styl +137 -0
- package/source/css/layout/_partials/navbar.styl +309 -0
- package/source/css/layout/_partials/page-template.styl +147 -0
- package/source/css/layout/_partials/paginator.styl +65 -0
- package/source/css/layout/_partials/post-tools.styl +43 -0
- package/source/css/layout/_partials/progress-bar.styl +33 -0
- package/source/css/layout/_partials/side-tools.styl +87 -0
- package/source/css/layout/_partials/tagcloud.styl +136 -0
- package/source/css/layout/_partials/toc.styl +105 -0
- package/source/css/layout/animations.styl +42 -0
- package/source/css/layout/archive-content.styl +8 -0
- package/source/css/layout/article-content.styl +257 -0
- package/source/css/layout/bookmarks.styl +8 -0
- package/source/css/layout/category-content.styl +21 -0
- package/source/css/layout/category-list.styl +119 -0
- package/source/css/layout/home-content.styl +114 -0
- package/source/css/layout/home-sidebar.styl +126 -0
- package/source/css/layout/page.styl +144 -0
- package/source/css/layout/tag-content.styl +30 -0
- package/source/css/style.styl +26 -0
- package/source/css/tailwind.source.css +236 -0
- package/source/fontawesome/all.min.css +6 -0
- package/source/fontawesome/brands.min.css +6 -0
- package/source/fontawesome/duotone.min.css +6 -0
- package/source/fontawesome/fontawesome.min.css +6 -0
- package/source/fontawesome/light.min.css +6 -0
- package/source/fontawesome/regular.min.css +6 -0
- package/source/fontawesome/sharp-solid.min.css +6 -0
- package/source/fontawesome/solid.min.css +6 -0
- package/source/fontawesome/svg-with-js.min.css +6 -0
- package/source/fontawesome/thin.min.css +6 -0
- package/source/fontawesome/v4-font-face.min.css +6 -0
- package/source/fontawesome/v4-shims.min.css +6 -0
- package/source/fontawesome/v5-font-face.min.css +6 -0
- package/source/fonts/Chillax/Chillax-Variable.eot +0 -0
- package/source/fonts/Chillax/Chillax-Variable.ttf +0 -0
- package/source/fonts/Chillax/Chillax-Variable.woff +0 -0
- package/source/fonts/Chillax/Chillax-Variable.woff2 +0 -0
- package/source/fonts/Chillax/chillax.css +39 -0
- package/source/fonts/Geist/GeistVF.ttf +0 -0
- package/source/fonts/Geist/GeistVF.woff +0 -0
- package/source/fonts/Geist/GeistVF.woff2 +0 -0
- package/source/fonts/Geist/geist.css +16 -0
- package/source/fonts/GeistMono/GeistMonoVF.ttf +0 -0
- package/source/fonts/GeistMono/GeistMonoVF.woff +0 -0
- package/source/fonts/GeistMono/GeistMonoVF.woff2 +0 -0
- package/source/fonts/GeistMono/geist-mono.css +16 -0
- package/source/images/bookmark-placeholder.svg +9 -0
- package/source/images/loading.svg +5 -0
- package/source/images/redefine-avatar.svg +1 -0
- package/source/images/redefine-favicon.svg +1 -0
- package/source/images/redefine-logo.svg +1 -0
- package/source/images/redefine-logo.webp +0 -0
- package/source/images/redefine-og.webp +0 -0
- package/source/images/wallhaven-wqery6-dark.webp +0 -0
- package/source/images/wallhaven-wqery6-light.webp +0 -0
- package/source/js/build/layouts/bookmarkNav.js +2 -0
- package/source/js/build/layouts/bookmarkNav.js.map +1 -0
- package/source/js/build/layouts/categoryList.js +2 -0
- package/source/js/build/layouts/categoryList.js.map +1 -0
- package/source/js/build/layouts/essays.js +2 -0
- package/source/js/build/layouts/essays.js.map +1 -0
- package/source/js/build/layouts/lazyload.js +2 -0
- package/source/js/build/layouts/lazyload.js.map +1 -0
- package/source/js/build/layouts/navbarShrink.js +2 -0
- package/source/js/build/layouts/navbarShrink.js.map +1 -0
- package/source/js/build/layouts/toc.js +2 -0
- package/source/js/build/layouts/toc.js.map +1 -0
- package/source/js/build/libs/APlayer.min.js +2 -0
- package/source/js/build/libs/Swup.min.js +2 -0
- package/source/js/build/libs/SwupPreloadPlugin.min.js +1 -0
- package/source/js/build/libs/SwupProgressPlugin.min.js +1 -0
- package/source/js/build/libs/SwupScriptsPlugin.min.js +1 -0
- package/source/js/build/libs/SwupScrollPlugin.min.js +1 -0
- package/source/js/build/libs/SwupSlideTheme.min.js +1 -0
- package/source/js/build/libs/Typed.min.js +10 -0
- package/source/js/build/libs/anime.min.js +8 -0
- package/source/js/build/libs/mermaid.min.js +2314 -0
- package/source/js/build/libs/minimasonry.min.js +1 -0
- package/source/js/build/libs/moment-with-locales.min.js +2 -0
- package/source/js/build/libs/moment.min.js +2 -0
- package/source/js/build/libs/odometer.min.js +2 -0
- package/source/js/build/libs/pangu.min.js +9 -0
- package/source/js/build/libs/pjax.min.js +1 -0
- package/source/js/build/libs/waline.js +84 -0
- package/source/js/build/main.js +2 -0
- package/source/js/build/main.js.map +1 -0
- package/source/js/build/plugins/aplayer.js +2 -0
- package/source/js/build/plugins/aplayer.js.map +1 -0
- package/source/js/build/plugins/hbe.js +2 -0
- package/source/js/build/plugins/hbe.js.map +1 -0
- package/source/js/build/plugins/masonry.js +2 -0
- package/source/js/build/plugins/masonry.js.map +1 -0
- package/source/js/build/plugins/mermaid.js +2 -0
- package/source/js/build/plugins/mermaid.js.map +1 -0
- package/source/js/build/plugins/pangu.js +2 -0
- package/source/js/build/plugins/pangu.js.map +1 -0
- package/source/js/build/plugins/tabs.js +2 -0
- package/source/js/build/plugins/tabs.js.map +1 -0
- package/source/js/build/plugins/typed.js +2 -0
- package/source/js/build/plugins/typed.js.map +1 -0
- package/source/js/build/tools/codeBlock.js +2 -0
- package/source/js/build/tools/codeBlock.js.map +1 -0
- package/source/js/build/tools/imageViewer.js +2 -0
- package/source/js/build/tools/imageViewer.js.map +1 -0
- package/source/js/build/tools/lightDarkSwitch.js +2 -0
- package/source/js/build/tools/lightDarkSwitch.js.map +1 -0
- package/source/js/build/tools/localSearch.js +2 -0
- package/source/js/build/tools/localSearch.js.map +1 -0
- package/source/js/build/tools/runtime.js +2 -0
- package/source/js/build/tools/runtime.js.map +1 -0
- package/source/js/build/tools/scrollTopBottom.js +2 -0
- package/source/js/build/tools/scrollTopBottom.js.map +1 -0
- package/source/js/build/tools/tocToggle.js +2 -0
- package/source/js/build/tools/tocToggle.js.map +1 -0
- package/source/js/build/utils.js +2 -0
- package/source/js/build/utils.js.map +1 -0
- package/source/js/build.js +148 -0
- package/source/js/layouts/bookmarkNav.js +65 -0
- package/source/js/layouts/categoryList.js +53 -0
- package/source/js/layouts/essays.js +25 -0
- package/source/js/layouts/lazyload.js +199 -0
- package/source/js/layouts/navbarShrink.js +135 -0
- package/source/js/layouts/toc.js +115 -0
- package/source/js/libs/APlayer.min.js +2 -0
- package/source/js/libs/APlayer.min.js.map +1 -0
- package/source/js/libs/Swup.min.js +2 -0
- package/source/js/libs/Swup.min.js.map +1 -0
- package/source/js/libs/SwupPreloadPlugin.min.js +1 -0
- package/source/js/libs/SwupPreloadPlugin.min.js.map +1 -0
- package/source/js/libs/SwupProgressPlugin.min.js +1 -0
- package/source/js/libs/SwupScriptsPlugin.min.js +1 -0
- package/source/js/libs/SwupScrollPlugin.min.js +1 -0
- package/source/js/libs/SwupScrollPlugin.min.js.map +1 -0
- package/source/js/libs/SwupSlideTheme.min.js +1 -0
- package/source/js/libs/Typed.min.js +10 -0
- package/source/js/libs/anime.min.js +8 -0
- package/source/js/libs/mermaid.min.js +2314 -0
- package/source/js/libs/mermaid.min.js.map +7 -0
- package/source/js/libs/minimasonry.min.js +1 -0
- package/source/js/libs/moment-with-locales.min.js +2 -0
- package/source/js/libs/moment.min.js +2 -0
- package/source/js/libs/odometer.min.js +2 -0
- package/source/js/libs/pangu.min.js +9 -0
- package/source/js/libs/pjax.min.js +1 -0
- package/source/js/libs/waline.js +84 -0
- package/source/js/libs/waline.js.map +1 -0
- package/source/js/main.js +95 -0
- package/source/js/plugins/aplayer.js +33 -0
- package/source/js/plugins/hbe.js +350 -0
- package/source/js/plugins/masonry.js +115 -0
- package/source/js/plugins/mermaid.js +7 -0
- package/source/js/plugins/pangu.js +12 -0
- package/source/js/plugins/tabs.js +29 -0
- package/source/js/plugins/typed.js +62 -0
- package/source/js/tools/codeBlock.js +48 -0
- package/source/js/tools/imageViewer.js +194 -0
- package/source/js/tools/lightDarkSwitch.js +165 -0
- package/source/js/tools/localSearch.js +327 -0
- package/source/js/tools/runtime.js +28 -0
- package/source/js/tools/scrollTopBottom.js +34 -0
- package/source/js/tools/tocToggle.js +58 -0
- package/source/js/utils.js +383 -0
- package/source/webfonts/fa-brands-400.ttf +0 -0
- package/source/webfonts/fa-brands-400.woff2 +0 -0
- package/source/webfonts/fa-duotone-900.ttf +0 -0
- package/source/webfonts/fa-duotone-900.woff2 +0 -0
- package/source/webfonts/fa-light-300.ttf +0 -0
- package/source/webfonts/fa-light-300.woff2 +0 -0
- package/source/webfonts/fa-regular-400.ttf +0 -0
- package/source/webfonts/fa-regular-400.woff2 +0 -0
- package/source/webfonts/fa-sharp-solid-900.ttf +0 -0
- package/source/webfonts/fa-sharp-solid-900.woff2 +0 -0
- package/source/webfonts/fa-solid-900.ttf +0 -0
- package/source/webfonts/fa-solid-900.woff2 +0 -0
- package/source/webfonts/fa-thin-100.ttf +0 -0
- package/source/webfonts/fa-thin-100.woff2 +0 -0
- package/source/webfonts/fa-v4compatibility.ttf +0 -0
- package/source/webfonts/fa-v4compatibility.woff2 +0 -0
- package/vercel.json +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).SwupProgressPlugin=e()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t},t.apply(this,arguments)}const e=t=>String(t).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class s{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach(([t,s])=>{if(!function(t,s,i){const r=function(t,e){var s;if("swup"===t)return null!=(s=e.version)?s:"";{var i;const s=e.findPlugin(t);return null!=(i=null==s?void 0:s.version)?i:""}}(t,i);return!!r&&((t,s)=>s.every(s=>{const[,i,r]=s.match(/^([\D]+)?(.*)$/)||[];var n,o;return((t,e)=>{const s={"":t=>0===t,">":t=>t>0,">=":t=>t>=0,"<":t=>t<0,"<=":t=>t<=0};return(s[e]||s[""])(t)})((o=r,n=e(n=t),o=e(o),n.localeCompare(o,void 0,{numeric:!0})),i||">=")}))(r,s)}(t,s=Array.isArray(s)?s:[s],this.swup)){const e=`${t} ${s.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${e}`)}}),!0}on(t,e,s={}){var i;e=!(i=e).name.startsWith("bound ")||i.hasOwnProperty("prototype")?e.bind(this):e;const r=this.swup.hooks.on(t,e,s);return this.handlersToUnregister.push(r),r}once(e,s,i={}){return this.on(e,s,t({},i,{once:!0}))}before(e,s,i={}){return this.on(e,s,t({},i,{before:!0}))}replace(e,s,i={}){return this.on(e,s,t({},i,{replace:!0}))}off(t,e){return this.swup.hooks.off(t,e)}}class i{constructor(t){let{className:e,styleAttr:s,animationDuration:i,minValue:r,initialValue:n,trickleValue:o}=void 0===t?{}:t;this.value=0,this.visible=!1,this.hiding=!1,this.className="progress-bar",this.styleAttr="data-progressbar-styles data-swup-theme",this.animationDuration=300,this.minValue=.1,this.initialValue=.25,this.trickleValue=.03,this.trickleInterval=void 0,this.styleElement=void 0,this.progressElement=void 0,this.trickle=()=>{const t=Math.random()*this.trickleValue;this.setValue(this.value+t)},void 0!==e&&(this.className=String(e)),void 0!==s&&(this.styleAttr=String(s)),void 0!==i&&(this.animationDuration=Number(i)),void 0!==r&&(this.minValue=Number(r)),void 0!==n&&(this.initialValue=Number(n)),void 0!==o&&(this.trickleValue=Number(o)),this.styleElement=this.createStyleElement(),this.progressElement=this.createProgressElement()}get defaultStyles(){return`\n\t\t.${this.className} {\n\t\t\tposition: fixed;\n\t\t\tdisplay: block;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\theight: 3px;\n\t\t\tbackground-color: black;\n\t\t\tz-index: 9999;\n\t\t\ttransition:\n\t\t\t\twidth ${this.animationDuration}ms ease-out,\n\t\t\t\topacity ${this.animationDuration/2}ms ${this.animationDuration/2}ms ease-in;\n\t\t\ttransform: translate3d(0, 0, 0);\n\t\t}\n\t`}show(){this.visible||(this.visible=!0,this.installStyleElement(),this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(t){this.value=Math.min(1,Math.max(this.minValue,t)),this.refresh()}installStyleElement(){document.head.insertBefore(this.styleElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0%",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.progressElement.scrollTop=0,this.setValue(Math.random()*this.initialValue)}fadeProgressElement(t){this.progressElement.style.opacity="0",setTimeout(t,1.5*this.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,this.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=100*this.value+"%"})}createStyleElement(){const t=document.createElement("style");return this.styleAttr.split(" ").forEach(e=>t.setAttribute(e,"")),t.textContent=this.defaultStyles,t}createProgressElement(){const t=document.createElement("div");return t.className=this.className,t}}return class extends s{constructor(t){void 0===t&&(t={}),super(),this.name="SwupProgressPlugin",this.defaults={className:"swup-progress-bar",delay:300,transition:300,minValue:.1,initialValue:.25,finishAnimation:!0},this.options=void 0,this.progressBar=void 0,this.showProgressBarTimeout=void 0,this.hideProgressBarTimeout=void 0,this.options={...this.defaults,...t};const{className:e,minValue:s,initialValue:r,transition:n}=this.options;this.progressBar=new i({className:e,minValue:s,initialValue:r,animationDuration:n})}mount(){this.on("visit:start",this.startShowingProgress),this.on("page:view",this.stopShowingProgress)}startShowingProgress(){this.progressBar.setValue(0),this.showProgressBarAfterDelay()}stopShowingProgress(){this.progressBar.setValue(1),this.options.finishAnimation?this.finishAnimationAndHideProgressBar():this.hideProgressBar()}showProgressBar(){this.cancelHideProgressBarTimeout(),this.progressBar.show()}showProgressBarAfterDelay(){this.cancelShowProgressBarTimeout(),this.cancelHideProgressBarTimeout(),this.showProgressBarTimeout=window.setTimeout(this.showProgressBar.bind(this),this.options.delay)}hideProgressBar(){this.cancelShowProgressBarTimeout(),this.progressBar.hide()}finishAnimationAndHideProgressBar(){this.cancelShowProgressBarTimeout(),this.hideProgressBarTimeout=window.setTimeout(this.hideProgressBar.bind(this),this.options.transition)}cancelShowProgressBarTimeout(){window.clearTimeout(this.showProgressBarTimeout),delete this.showProgressBarTimeout}cancelHideProgressBarTimeout(){window.clearTimeout(this.hideProgressBarTimeout),delete this.hideProgressBarTimeout}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).SwupScriptsPlugin=e()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},t.apply(this,arguments)}const e=t=>String(t).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class r{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach(([t,r])=>{if(!function(t,r,n){const o=function(t,e){var r;if("swup"===t)return null!=(r=e.version)?r:"";{var n;const r=e.findPlugin(t);return null!=(n=null==r?void 0:r.version)?n:""}}(t,n);return!!o&&((t,r)=>r.every(r=>{const[,n,o]=r.match(/^([\D]+)?(.*)$/)||[];var s,i;return((t,e)=>{const r={"":t=>0===t,">":t=>t>0,">=":t=>t>=0,"<":t=>t<0,"<=":t=>t<=0};return(r[e]||r[""])(t)})((i=o,s=e(s=t),i=e(i),s.localeCompare(i,void 0,{numeric:!0})),n||">=")}))(o,r)}(t,r=Array.isArray(r)?r:[r],this.swup)){const e=`${t} ${r.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${e}`)}}),!0}on(t,e,r={}){var n;e=!(n=e).name.startsWith("bound ")||n.hasOwnProperty("prototype")?e.bind(this):e;const o=this.swup.hooks.on(t,e,r);return this.handlersToUnregister.push(o),o}once(e,r,n={}){return this.on(e,r,t({},n,{once:!0}))}before(e,r,n={}){return this.on(e,r,t({},n,{before:!0}))}replace(e,r,n={}){return this.on(e,r,t({},n,{replace:!0}))}off(t,e){return this.swup.hooks.off(t,e)}}return class extends r{constructor(t){void 0===t&&(t={}),super(),this.name="SwupScriptsPlugin",this.requires={swup:">=4"},this.defaults={head:!0,body:!0,optin:!1},this.options={...this.defaults,...t}}mount(){this.on("content:replace",this.runScripts)}runScripts(){const{head:t,body:e,optin:r}=this.options,n=this.getScope({head:t,body:e});if(!n)return;const o=Array.from(n.querySelectorAll(r?"script[data-swup-reload-script]":"script:not([data-swup-ignore-script])"));o.forEach(t=>this.runScript(t)),this.swup.log(`Executed ${o.length} scripts.`)}runScript(t){const e=document.createElement("script");for(const{name:r,value:n}of t.attributes)e.setAttribute(r,n);return e.textContent=t.textContent,t.replaceWith(e),e}getScope(t){let{head:e,body:r}=t;return e&&r?document:e?document.head:r?document.body:null}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t||self).SwupScrollPlugin=o()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t},t.apply(this,arguments)}const o=t=>String(t).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class s{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach(([t,s])=>{if(!function(t,s,i){const n=function(t,o){var s;if("swup"===t)return null!=(s=o.version)?s:"";{var i;const s=o.findPlugin(t);return null!=(i=null==s?void 0:s.version)?i:""}}(t,i);return!!n&&((t,s)=>s.every(s=>{const[,i,n]=s.match(/^([\D]+)?(.*)$/)||[];var e,r;return((t,o)=>{const s={"":t=>0===t,">":t=>t>0,">=":t=>t>=0,"<":t=>t<0,"<=":t=>t<=0};return(s[o]||s[""])(t)})((r=n,e=o(e=t),r=o(r),e.localeCompare(r,void 0,{numeric:!0})),i||">=")}))(n,s)}(t,s=Array.isArray(s)?s:[s],this.swup)){const o=`${t} ${s.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${o}`)}}),!0}on(t,o,s={}){var i;o=!(i=o).name.startsWith("bound ")||i.hasOwnProperty("prototype")?o.bind(this):o;const n=this.swup.hooks.on(t,o,s);return this.handlersToUnregister.push(n),n}once(o,s,i={}){return this.on(o,s,t({},i,{once:!0}))}before(o,s,i={}){return this.on(o,s,t({},i,{before:!0}))}replace(o,s,i={}){return this.on(o,s,t({},i,{replace:!0}))}off(t,o){return this.swup.hooks.off(t,o)}}const i=(t,o=document)=>Array.from(o.querySelectorAll(t));function n(){return n=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t},n.apply(this,arguments)}class e{constructor(t){this._raf=null,this._positionY=0,this._velocityY=0,this._targetPositionY=0,this._targetPositionYWithOffset=0,this._direction=0,this.scrollTo=t=>{if(t&&t.nodeType)this._targetPositionY=Math.round(t.getBoundingClientRect().top+window.pageYOffset);else{if(parseInt(this._targetPositionY)!==this._targetPositionY)return void console.error("Argument must be a number or an element.");this._targetPositionY=Math.round(t)}this._targetPositionY>document.documentElement.scrollHeight-window.innerHeight&&(this._targetPositionY=document.documentElement.scrollHeight-window.innerHeight),this._positionY=document.body.scrollTop||document.documentElement.scrollTop,this._direction=this._positionY>this._targetPositionY?-1:1,this._targetPositionYWithOffset=this._targetPositionY+this._direction,this._velocityY=0,this._positionY!==this._targetPositionY?(this.options.onStart(),this._animate()):this.options.onAlreadyAtPositions()},this._animate=()=>{this._update(),this._render(),1===this._direction&&this._targetPositionY>this._positionY||-1===this._direction&&this._targetPositionY<this._positionY?(this._raf=requestAnimationFrame(this._animate),this.options.onTick()):(this._positionY=this._targetPositionY,this._render(),this._raf=null,this.options.onTick(),this.options.onEnd())},this._update=()=>{const t=this._targetPositionYWithOffset-this._positionY;return this._velocityY+=t*this.options.acceleration,this._velocityY*=this.options.friction,this._positionY+=this._velocityY,Math.abs(t)},this._render=()=>{window.scrollTo(0,this._positionY)},this.options=n({},{onAlreadyAtPositions:()=>{},onCancel:()=>{},onEnd:()=>{},onStart:()=>{},onTick:()=>{},friction:.7,acceleration:.04},t),t&&t.friction&&(this.options.friction=1-t.friction),window.addEventListener("mousewheel",t=>{this._raf&&(this.options.onCancel(),cancelAnimationFrame(this._raf),this._raf=null)},{passive:!0})}}return class extends s{constructor(t){var o;void 0===t&&(t={}),super(),o=this,this.name="SwupScrollPlugin",this.requires={swup:">=4.2.0"},this.scrl=void 0,this.defaults={doScrollingRightAway:!1,animateScroll:{betweenPages:!0,samePageWithHash:!0,samePage:!0},scrollFriction:.3,scrollAcceleration:.04,getAnchorElement:void 0,offset:0,scrollContainers:"[data-swup-scroll-container]",shouldResetScrollPosition:()=>!0},this.options=void 0,this.cachedScrollPositions={},this.previousScrollRestoration=void 0,this.currentCacheKey=void 0,this.getAnchorElement=function(t){return void 0===t&&(t=""),"function"==typeof o.options.getAnchorElement?o.options.getAnchorElement(t):o.swup.getAnchorElement(t)},this.getOffset=t=>t?"function"==typeof this.options.offset?parseInt(String(this.options.offset(t)),10):parseInt(String(this.options.offset),10):0,this.handleScrollToTop=()=>(this.swup.scrollTo?.(0,this.shouldAnimate("samePage")),!0),this.handleScrollToAnchor=(t,o)=>{let{hash:s}=o;return this.maybeScrollToAnchor(s,this.shouldAnimate("samePageWithHash"))},this.onVisitStart=t=>{this.maybeResetScrollPositions(t),this.cacheScrollPositions(t.from.url);const o=t.scroll.target||t.to.hash;t.scroll.scrolledToContent=!1,this.options.doScrollingRightAway&&!o&&(t.scroll.scrolledToContent=!0,this.doScrollingBetweenPages(t))},this.onScrollToContent=t=>{t.scroll.scrolledToContent||this.doScrollingBetweenPages(t),this.restoreScrollContainers(t.to.url)},this.doScrollingBetweenPages=t=>{if(t.history.popstate&&!t.animation.animate)return;if(this.maybeScrollToAnchor(t.scroll.target||t.to.hash,this.shouldAnimate("betweenPages")))return;if(!t.scroll.reset)return;const o=this.getCachedScrollPositions(this.swup.resolveUrl((({hash:t}={})=>location.pathname+location.search+(t?location.hash:""))())),s=o?.window?.top||0;requestAnimationFrame(()=>this.swup.scrollTo?.(s,this.shouldAnimate("betweenPages")))},this.maybeResetScrollPositions=t=>{const{url:o}=t.to,{el:s}=t.trigger;s&&this.options.shouldResetScrollPosition(s)&&this.resetScrollPositions(o)},this.options={...this.defaults,...t}}mount(){var t=this;const o=this.swup;o.hooks.create("scroll:start"),o.hooks.create("scroll:end"),this.scrl=new e({onStart:()=>o.hooks.callSync("scroll:start"),onEnd:()=>o.hooks.callSync("scroll:end"),onCancel:()=>o.hooks.callSync("scroll:end"),friction:this.options.scrollFriction,acceleration:this.options.scrollAcceleration}),o.scrollTo=function(s,i){void 0===i&&(i=!0),i?t.scrl.scrollTo(s):(o.hooks.callSync("scroll:start"),window.scrollTo(0,s),o.hooks.callSync("scroll:end"))},this.previousScrollRestoration=window.history.scrollRestoration,o.options.animateHistoryBrowsing&&(window.history.scrollRestoration="manual"),this.on("visit:start",this.onVisitStart),this.replace("content:scroll",this.onScrollToContent),this.replace("scroll:top",this.handleScrollToTop),this.replace("scroll:anchor",this.handleScrollToAnchor)}unmount(){super.unmount(),this.previousScrollRestoration&&(window.history.scrollRestoration=this.previousScrollRestoration),this.cachedScrollPositions={},delete this.swup.scrollTo,delete this.scrl}shouldAnimate(t){return"boolean"==typeof this.options.animateScroll?this.options.animateScroll:this.options.animateScroll[t]}maybeScrollToAnchor(t,o){if(void 0===o&&(o=!1),!t)return!1;const s=this.getAnchorElement(t);if(!s)return console.warn(`Anchor target ${t} not found`),!1;if(!(s instanceof Element))return console.warn(`Anchor target ${t} is not a DOM node`),!1;const{top:i}=s.getBoundingClientRect(),n=i+window.scrollY-this.getOffset(s);return this.swup.scrollTo?.(n,o),!0}cacheScrollPositions(t){const o=i(this.options.scrollContainers).map(t=>({top:t.scrollTop,left:t.scrollLeft})),s={window:{top:window.scrollY,left:window.scrollX},containers:o};this.cachedScrollPositions[t]=s}resetScrollPositions(t){const o=this.swup.resolveUrl(t);delete this.cachedScrollPositions[o]}getCachedScrollPositions(t){const o=this.swup.resolveUrl(t);return this.cachedScrollPositions[o]}restoreScrollContainers(t){const o=this.getCachedScrollPositions(t);o&&0!==o.containers.length&&i(this.options.scrollContainers).forEach((t,s)=>{const i=o.containers[s];null!=i&&(t.scrollTop=i.top,t.scrollLeft=i.left)})}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).SwupSlideTheme=t()}(this,function(){function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},e.apply(this,arguments)}const t=e=>String(e).split(".").map(e=>String(parseInt(e||"0",10))).concat(["0","0"]).slice(0,3).join(".");class s{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(e=>e()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach(([e,s])=>{if(!function(e,s,n){const r=function(e,t){var s;if("swup"===e)return null!=(s=t.version)?s:"";{var n;const s=t.findPlugin(e);return null!=(n=null==s?void 0:s.version)?n:""}}(e,n);return!!r&&((e,s)=>s.every(s=>{const[,n,r]=s.match(/^([\D]+)?(.*)$/)||[];var i,o;return((e,t)=>{const s={"":e=>0===e,">":e=>e>0,">=":e=>e>=0,"<":e=>e<0,"<=":e=>e<=0};return(s[t]||s[""])(e)})((o=r,i=t(i=e),o=t(o),i.localeCompare(o,void 0,{numeric:!0})),n||">=")}))(r,s)}(e,s=Array.isArray(s)?s:[s],this.swup)){const t=`${e} ${s.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${t}`)}}),!0}on(e,t,s={}){var n;t=!(n=t).name.startsWith("bound ")||n.hasOwnProperty("prototype")?t.bind(this):t;const r=this.swup.hooks.on(e,t,s);return this.handlersToUnregister.push(r),r}once(t,s,n={}){return this.on(t,s,e({},n,{once:!0}))}before(t,s,n={}){return this.on(t,s,e({},n,{before:!0}))}replace(t,s,n={}){return this.on(t,s,e({},n,{replace:!0}))}off(e,t){return this.swup.hooks.off(e,t)}}class n extends s{constructor(...e){super(...e),this._addedStyleElements=[],this._addedHTMLContent=[],this._classNameAddedToElements=[],this._addClassNameToElement=()=>{this._classNameAddedToElements.forEach(e=>{Array.from(document.querySelectorAll(e.selector)).forEach(t=>{t.classList.add(`swup-transition-${e.name}`)})})}}_beforeMount(){this._originalAnimationSelectorOption=String(this.swup.options.animationSelector),this.swup.options.animationSelector='[class*="swup-transition-"]',this.swup.hooks.on("content:replace",this._addClassNameToElement)}_afterUnmount(){this.swup.options.animationSelector=this._originalAnimationSelectorOption,this._addedStyleElements.forEach(e=>{e.outerHTML="",e=null}),this._addedHTMLContent.forEach(e=>{e.outerHTML="",e=null}),this._classNameAddedToElements.forEach(e=>{Array.from(document.querySelectorAll(e.selector)).forEach(e=>{e.className.split(" ").forEach(t=>{new RegExp("^swup-transition-").test(t)&&e.classList.remove(t)})})}),this.swup.hooks.off("content:replace",this._addClassNameToElement)}applyStyles(e){const t=document.createElement("style");t.setAttribute("data-swup-theme",""),t.appendChild(document.createTextNode(e)),document.head.prepend(t),this._addedStyleElements.push(t)}applyHTML(e){const t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t),this._addedHTMLContent.push(t)}addClassName(e,t){this._classNameAddedToElements.push({selector:e,name:t}),this._addClassNameToElement()}}return class extends n{constructor(e){void 0===e&&(e={}),super(),this.name="SwupSlideTheme",this.defaults={mainElement:"#swup",reversed:!1},this.options={...this.defaults,...e}}mount(){this.applyStyles("html{--swup-slide-theme-direction:1;--swup-slide-theme-translate:60px;--swup-slide-theme-duration-fade:.3s;--swup-slide-theme-duration-slide:.4s;--swup-slide-theme-translate-forward:calc(var(--swup-slide-theme-direction)*var(--swup-slide-theme-translate));--swup-slide-theme-translate-backward:calc(var(--swup-slide-theme-translate-forward)*-1)}html.swup-theme-reverse{--swup-slide-theme-direction:-1}html.is-changing .swup-transition-main{opacity:1;transform:translateZ(0);transition:opacity var(--swup-slide-theme-duration-fade),transform var(--swup-slide-theme-duration-slide)}html.is-animating .swup-transition-main{opacity:0;transform:translate3d(0,var(--swup-slide-theme-translate-backward),0)}html.is-animating.is-leaving .swup-transition-main{transform:translate3d(0,var(--swup-slide-theme-translate-forward),0)}"),this.addClassName(this.options.mainElement,"main"),this.options.reversed&&document.documentElement.classList.add("swup-theme-reverse")}unmount(){document.documentElement.classList.remove("swup-theme-reverse")}}});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* typed.js - A JavaScript Typing Animation Library
|
|
4
|
+
* Author: Matt Boldt <me@mattboldt.com>
|
|
5
|
+
* Version: v2.0.12
|
|
6
|
+
* Url: https://github.com/mattboldt/typed.js
|
|
7
|
+
* License(s): MIT
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Typed=e():t.Typed=e()})(this,function(){return function(t){function e(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,s,n){return s&&t(e.prototype,s),n&&t(e,n),e}}(),r=s(1),o=s(3),a=function(){function t(e,s){n(this,t),r.initializer.load(this,s,e),this.begin()}return i(t,[{key:"toggle",value:function(){this.pause.status?this.start():this.stop()}},{key:"stop",value:function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))}},{key:"start",value:function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))}},{key:"destroy",value:function(){this.reset(!1),this.options.onDestroy(this)}},{key:"reset",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,t&&(this.insertCursor(),this.options.onReset(this),this.begin())}},{key:"begin",value:function(){var t=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout(function(){t.currentElContent&&0!==t.currentElContent.length?t.backspace(t.currentElContent,t.currentElContent.length):t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos)},this.startDelay)}},{key:"typewrite",value:function(t,e){var s=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var n=this.humanizer(this.typeSpeed),i=1;return this.pause.status===!0?void this.setPauseStatus(t,e,!0):void(this.timeout=setTimeout(function(){e=o.htmlParser.typeHtmlChars(t,e,s);var n=0,r=t.substr(e);if("^"===r.charAt(0)&&/^\^\d+/.test(r)){var a=1;r=/\d+/.exec(r)[0],a+=r.length,n=parseInt(r),s.temporaryPause=!0,s.options.onTypingPaused(s.arrayPos,s),t=t.substring(0,e)+t.substring(e+a),s.toggleBlinking(!0)}if("`"===r.charAt(0)){for(;"`"!==t.substr(e+i).charAt(0)&&(i++,!(e+i>t.length)););var u=t.substring(0,e),l=t.substring(u.length+1,e+i),c=t.substring(e+i+1);t=u+l+c,i--}s.timeout=setTimeout(function(){s.toggleBlinking(!1),e>=t.length?s.doneTyping(t,e):s.keepTyping(t,e,i),s.temporaryPause&&(s.temporaryPause=!1,s.options.onTypingResumed(s.arrayPos,s))},n)},n))}},{key:"keepTyping",value:function(t,e,s){0===e&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this)),e+=s;var n=t.substr(0,e);this.replaceText(n),this.typewrite(t,e)}},{key:"doneTyping",value:function(t,e){var s=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),this.loop===!1||this.curLoop===this.loopCount)||(this.timeout=setTimeout(function(){s.backspace(t,e)},this.backDelay))}},{key:"backspace",value:function(t,e){var s=this;if(this.pause.status===!0)return void this.setPauseStatus(t,e,!1);if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var n=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){e=o.htmlParser.backSpaceHtmlChars(t,e,s);var n=t.substr(0,e);if(s.replaceText(n),s.smartBackspace){var i=s.strings[s.arrayPos+1];i&&n===i.substr(0,e)?s.stopNum=e:s.stopNum=0}e>s.stopNum?(e--,s.backspace(t,e)):e<=s.stopNum&&(s.arrayPos++,s.arrayPos===s.strings.length?(s.arrayPos=0,s.options.onLastStringBackspaced(),s.shuffleStringsIfNeeded(),s.begin()):s.typewrite(s.strings[s.sequence[s.arrayPos]],e))},n)}},{key:"complete",value:function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0}},{key:"setPauseStatus",value:function(t,e,s){this.pause.typewrite=s,this.pause.curString=t,this.pause.curStrPos=e}},{key:"toggleBlinking",value:function(t){this.cursor&&(this.pause.status||this.cursorBlinking!==t&&(this.cursorBlinking=t,t?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))}},{key:"humanizer",value:function(t){return Math.round(Math.random()*t/2)+t}},{key:"shuffleStringsIfNeeded",value:function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))}},{key:"initFadeOut",value:function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)}},{key:"replaceText",value:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t}},{key:"bindFocusEvents",value:function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(e){t.stop()}),this.el.addEventListener("blur",function(e){t.el.value&&0!==t.el.value.length||t.start()}))}},{key:"insertCursor",value:function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,s){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},o=function(){function t(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,s,n){return s&&t(e.prototype,s),n&&t(e,n),e}}(),a=s(2),u=n(a),l=function(){function t(){i(this,t)}return o(t,[{key:"load",value:function(t,e,s){if("string"==typeof s?t.el=document.querySelector(s):t.el=s,t.options=r({},u["default"],e),t.isInput="input"===t.el.tagName.toLowerCase(),t.attr=t.options.attr,t.bindInputFocusEvents=t.options.bindInputFocusEvents,t.showCursor=!t.isInput&&t.options.showCursor,t.cursorChar=t.options.cursorChar,t.cursorBlinking=!0,t.elContent=t.attr?t.el.getAttribute(t.attr):t.el.textContent,t.contentType=t.options.contentType,t.typeSpeed=t.options.typeSpeed,t.startDelay=t.options.startDelay,t.backSpeed=t.options.backSpeed,t.smartBackspace=t.options.smartBackspace,t.backDelay=t.options.backDelay,t.fadeOut=t.options.fadeOut,t.fadeOutClass=t.options.fadeOutClass,t.fadeOutDelay=t.options.fadeOutDelay,t.isPaused=!1,t.strings=t.options.strings.map(function(t){return t.trim()}),"string"==typeof t.options.stringsElement?t.stringsElement=document.querySelector(t.options.stringsElement):t.stringsElement=t.options.stringsElement,t.stringsElement){t.strings=[],t.stringsElement.style.display="none";var n=Array.prototype.slice.apply(t.stringsElement.children),i=n.length;if(i)for(var o=0;o<i;o+=1){var a=n[o];t.strings.push(a.innerHTML.trim())}}t.strPos=0,t.arrayPos=0,t.stopNum=0,t.loop=t.options.loop,t.loopCount=t.options.loopCount,t.curLoop=0,t.shuffle=t.options.shuffle,t.sequence=[],t.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},t.typingComplete=!1;for(var o in t.strings)t.sequence[o]=o;t.currentElContent=this.getCurrentElContent(t),t.autoInsertCss=t.options.autoInsertCss,this.appendAnimationCss(t)}},{key:"getCurrentElContent",value:function(t){var e="";return e=t.attr?t.el.getAttribute(t.attr):t.isInput?t.el.value:"html"===t.contentType?t.el.innerHTML:t.el.textContent}},{key:"appendAnimationCss",value:function(t){var e="data-typed-js-css";if(t.autoInsertCss&&(t.showCursor||t.fadeOut)&&!document.querySelector("["+e+"]")){var s=document.createElement("style");s.type="text/css",s.setAttribute(e,!0);var n="";t.showCursor&&(n+="\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n "),t.fadeOut&&(n+="\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n "),0!==s.length&&(s.innerHTML=n,document.body.appendChild(s))}}}]),t}();e["default"]=l;var c=new l;e.initializer=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:1/0,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(t){},onComplete:function(t){},preStringTyped:function(t,e){},onStringTyped:function(t,e){},onLastStringBackspaced:function(t){},onTypingPaused:function(t,e){},onTypingResumed:function(t,e){},onReset:function(t){},onStop:function(t,e){},onStart:function(t,e){},onDestroy:function(t){}};e["default"]=s,t.exports=e["default"]},function(t,e){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,s,n){return s&&t(e.prototype,s),n&&t(e,n),e}}(),i=function(){function t(){s(this,t)}return n(t,[{key:"typeHtmlChars",value:function(t,e,s){if("html"!==s.contentType)return e;var n=t.substr(e).charAt(0);if("<"===n||"&"===n){var i="";for(i="<"===n?">":";";t.substr(e+1).charAt(0)!==i&&(e++,!(e+1>t.length)););e++}return e}},{key:"backSpaceHtmlChars",value:function(t,e,s){if("html"!==s.contentType)return e;var n=t.substr(e).charAt(0);if(">"===n||";"===n){var i="";for(i=">"===n?"<":"&";t.substr(e-1).charAt(0)!==i&&(e--,!(e<0)););e--}return e}}]),t}();e["default"]=i;var r=new i;e.htmlParser=r}])});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* anime.js v3.1.0
|
|
3
|
+
* (c) 2019 Julian Garnier
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* animejs.com
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()}(this,function(){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},e={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},r=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],t={CSS:{},springs:{}};function a(n,e,r){return Math.min(Math.max(n,e),r)}function o(n,e){return n.indexOf(e)>-1}function u(n,e){return n.apply(null,e)}var i={arr:function(n){return Array.isArray(n)},obj:function(n){return o(Object.prototype.toString.call(n),"Object")},pth:function(n){return i.obj(n)&&n.hasOwnProperty("totalLength")},svg:function(n){return n instanceof SVGElement},inp:function(n){return n instanceof HTMLInputElement},dom:function(n){return n.nodeType||i.svg(n)},str:function(n){return"string"==typeof n},fnc:function(n){return"function"==typeof n},und:function(n){return void 0===n},hex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},rgb:function(n){return/^rgb/.test(n)},hsl:function(n){return/^hsl/.test(n)},col:function(n){return i.hex(n)||i.rgb(n)||i.hsl(n)},key:function(r){return!n.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&"targets"!==r&&"keyframes"!==r}};function c(n){var e=/\(([^)]+)\)/.exec(n);return e?e[1].split(",").map(function(n){return parseFloat(n)}):[]}function s(n,e){var r=c(n),o=a(i.und(r[0])?1:r[0],.1,100),u=a(i.und(r[1])?100:r[1],.1,100),s=a(i.und(r[2])?10:r[2],.1,100),f=a(i.und(r[3])?0:r[3],.1,100),l=Math.sqrt(u/o),d=s/(2*Math.sqrt(u*o)),p=d<1?l*Math.sqrt(1-d*d):0,h=1,v=d<1?(d*l-f)/p:-f+l;function g(n){var r=e?e*n/1e3:n;return r=d<1?Math.exp(-r*d*l)*(h*Math.cos(p*r)+v*Math.sin(p*r)):(h+v*r)*Math.exp(-r*l),0===n||1===n?n:1-r}return e?g:function(){var e=t.springs[n];if(e)return e;for(var r=0,a=0;;)if(1===g(r+=1/6)){if(++a>=16)break}else a=0;var o=r*(1/6)*1e3;return t.springs[n]=o,o}}function f(n){return void 0===n&&(n=10),function(e){return Math.round(e*n)*(1/n)}}var l,d,p=function(){var n=11,e=1/(n-1);function r(n,e){return 1-3*e+3*n}function t(n,e){return 3*e-6*n}function a(n){return 3*n}function o(n,e,o){return((r(e,o)*n+t(e,o))*n+a(e))*n}function u(n,e,o){return 3*r(e,o)*n*n+2*t(e,o)*n+a(e)}return function(r,t,a,i){if(0<=r&&r<=1&&0<=a&&a<=1){var c=new Float32Array(n);if(r!==t||a!==i)for(var s=0;s<n;++s)c[s]=o(s*e,r,a);return function(n){return r===t&&a===i?n:0===n||1===n?n:o(f(n),t,i)}}function f(t){for(var i=0,s=1,f=n-1;s!==f&&c[s]<=t;++s)i+=e;var l=i+(t-c[--s])/(c[s+1]-c[s])*e,d=u(l,r,a);return d>=.001?function(n,e,r,t){for(var a=0;a<4;++a){var i=u(e,r,t);if(0===i)return e;e-=(o(e,r,t)-n)/i}return e}(t,l,r,a):0===d?l:function(n,e,r,t,a){for(var u,i,c=0;(u=o(i=e+(r-e)/2,t,a)-n)>0?r=i:e=i,Math.abs(u)>1e-7&&++c<10;);return i}(t,i,i+e,r,a)}}}(),h=(l={linear:function(){return function(n){return n}}},d={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var e,r=4;n<((e=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((3*e-2)/22-n,2)}},Elastic:function(n,e){void 0===n&&(n=1),void 0===e&&(e=.5);var r=a(n,1,10),t=a(e,.1,2);return function(n){return 0===n||1===n?n:-r*Math.pow(2,10*(n-1))*Math.sin((n-1-t/(2*Math.PI)*Math.asin(1/r))*(2*Math.PI)/t)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(n,e){d[n]=function(){return function(n){return Math.pow(n,e+2)}}}),Object.keys(d).forEach(function(n){var e=d[n];l["easeIn"+n]=e,l["easeOut"+n]=function(n,r){return function(t){return 1-e(n,r)(1-t)}},l["easeInOut"+n]=function(n,r){return function(t){return t<.5?e(n,r)(2*t)/2:1-e(n,r)(-2*t+2)/2}}}),l);function v(n,e){if(i.fnc(n))return n;var r=n.split("(")[0],t=h[r],a=c(n);switch(r){case"spring":return s(n,e);case"cubicBezier":return u(p,a);case"steps":return u(f,a);default:return u(t,a)}}function g(n){try{return document.querySelectorAll(n)}catch(n){return}}function m(n,e){for(var r=n.length,t=arguments.length>=2?arguments[1]:void 0,a=[],o=0;o<r;o++)if(o in n){var u=n[o];e.call(t,u,o,n)&&a.push(u)}return a}function y(n){return n.reduce(function(n,e){return n.concat(i.arr(e)?y(e):e)},[])}function b(n){return i.arr(n)?n:(i.str(n)&&(n=g(n)||n),n instanceof NodeList||n instanceof HTMLCollection?[].slice.call(n):[n])}function M(n,e){return n.some(function(n){return n===e})}function x(n){var e={};for(var r in n)e[r]=n[r];return e}function w(n,e){var r=x(n);for(var t in n)r[t]=e.hasOwnProperty(t)?e[t]:n[t];return r}function k(n,e){var r=x(n);for(var t in e)r[t]=i.und(n[t])?e[t]:n[t];return r}function O(n){return i.rgb(n)?(r=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e=n))?"rgba("+r[1]+",1)":e:i.hex(n)?(t=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,e,r,t){return e+e+r+r+t+t}),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),"rgba("+parseInt(a[1],16)+","+parseInt(a[2],16)+","+parseInt(a[3],16)+",1)"):i.hsl(n)?function(n){var e,r,t,a=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(n),o=parseInt(a[1],10)/360,u=parseInt(a[2],10)/100,i=parseInt(a[3],10)/100,c=a[4]||1;function s(n,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?n+6*(e-n)*r:r<.5?e:r<2/3?n+(e-n)*(2/3-r)*6:n}if(0==u)e=r=t=i;else{var f=i<.5?i*(1+u):i+u-i*u,l=2*i-f;e=s(l,f,o+1/3),r=s(l,f,o),t=s(l,f,o-1/3)}return"rgba("+255*e+","+255*r+","+255*t+","+c+")"}(n):void 0;var e,r,t,a}function C(n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(n);if(e)return e[1]}function B(n,e){return i.fnc(n)?n(e.target,e.id,e.total):n}function P(n,e){return n.getAttribute(e)}function I(n,e,r){if(M([r,"deg","rad","turn"],C(e)))return e;var a=t.CSS[e+r];if(!i.und(a))return a;var o=document.createElement(n.tagName),u=n.parentNode&&n.parentNode!==document?n.parentNode:document.body;u.appendChild(o),o.style.position="absolute",o.style.width=100+r;var c=100/o.offsetWidth;u.removeChild(o);var s=c*parseFloat(e);return t.CSS[e+r]=s,s}function T(n,e,r){if(e in n.style){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=n.style[e]||getComputedStyle(n).getPropertyValue(t)||"0";return r?I(n,a,r):a}}function D(n,e){return i.dom(n)&&!i.inp(n)&&(P(n,e)||i.svg(n)&&n[e])?"attribute":i.dom(n)&&M(r,e)?"transform":i.dom(n)&&"transform"!==e&&T(n,e)?"css":null!=n[e]?"object":void 0}function E(n){if(i.dom(n)){for(var e,r=n.style.transform||"",t=/(\w+)\(([^)]*)\)/g,a=new Map;e=t.exec(r);)a.set(e[1],e[2]);return a}}function F(n,e,r,t){var a,u=o(e,"scale")?1:0+(o(a=e,"translate")||"perspective"===a?"px":o(a,"rotate")||o(a,"skew")?"deg":void 0),i=E(n).get(e)||u;return r&&(r.transforms.list.set(e,i),r.transforms.last=e),t?I(n,i,t):i}function N(n,e,r,t){switch(D(n,e)){case"transform":return F(n,e,t,r);case"css":return T(n,e,r);case"attribute":return P(n,e);default:return n[e]||0}}function A(n,e){var r=/^(\*=|\+=|-=)/.exec(n);if(!r)return n;var t=C(n)||0,a=parseFloat(e),o=parseFloat(n.replace(r[0],""));switch(r[0][0]){case"+":return a+o+t;case"-":return a-o+t;case"*":return a*o+t}}function L(n,e){if(i.col(n))return O(n);if(/\s/g.test(n))return n;var r=C(n),t=r?n.substr(0,n.length-r.length):n;return e?t+e:t}function j(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function S(n){for(var e,r=n.points,t=0,a=0;a<r.numberOfItems;a++){var o=r.getItem(a);a>0&&(t+=j(e,o)),e=o}return t}function q(n){if(n.getTotalLength)return n.getTotalLength();switch(n.tagName.toLowerCase()){case"circle":return o=n,2*Math.PI*P(o,"r");case"rect":return 2*P(a=n,"width")+2*P(a,"height");case"line":return j({x:P(t=n,"x1"),y:P(t,"y1")},{x:P(t,"x2"),y:P(t,"y2")});case"polyline":return S(n);case"polygon":return r=(e=n).points,S(e)+j(r.getItem(r.numberOfItems-1),r.getItem(0))}var e,r,t,a,o}function $(n,e){var r=e||{},t=r.el||function(n){for(var e=n.parentNode;i.svg(e)&&i.svg(e.parentNode);)e=e.parentNode;return e}(n),a=t.getBoundingClientRect(),o=P(t,"viewBox"),u=a.width,c=a.height,s=r.viewBox||(o?o.split(" "):[0,0,u,c]);return{el:t,viewBox:s,x:s[0]/1,y:s[1]/1,w:u/s[2],h:c/s[3]}}function X(n,e){function r(r){void 0===r&&(r=0);var t=e+r>=1?e+r:0;return n.el.getPointAtLength(t)}var t=$(n.el,n.svg),a=r(),o=r(-1),u=r(1);switch(n.property){case"x":return(a.x-t.x)*t.w;case"y":return(a.y-t.y)*t.h;case"angle":return 180*Math.atan2(u.y-o.y,u.x-o.x)/Math.PI}}function Y(n,e){var r=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,t=L(i.pth(n)?n.totalLength:n,e)+"";return{original:t,numbers:t.match(r)?t.match(r).map(Number):[0],strings:i.str(n)||e?t.split(r):[]}}function Z(n){return m(n?y(i.arr(n)?n.map(b):b(n)):[],function(n,e,r){return r.indexOf(n)===e})}function Q(n){var e=Z(n);return e.map(function(n,r){return{target:n,id:r,total:e.length,transforms:{list:E(n)}}})}function V(n,e){var r=x(e);if(/^spring/.test(r.easing)&&(r.duration=s(r.easing)),i.arr(n)){var t=n.length;2===t&&!i.obj(n[0])?n={value:n}:i.fnc(e.duration)||(r.duration=e.duration/t)}var a=i.arr(n)?n:[n];return a.map(function(n,r){var t=i.obj(n)&&!i.pth(n)?n:{value:n};return i.und(t.delay)&&(t.delay=r?0:e.delay),i.und(t.endDelay)&&(t.endDelay=r===a.length-1?e.endDelay:0),t}).map(function(n){return k(n,r)})}function z(n,e){var r=[],t=e.keyframes;for(var a in t&&(e=k(function(n){for(var e=m(y(n.map(function(n){return Object.keys(n)})),function(n){return i.key(n)}).reduce(function(n,e){return n.indexOf(e)<0&&n.push(e),n},[]),r={},t=function(t){var a=e[t];r[a]=n.map(function(n){var e={};for(var r in n)i.key(r)?r==a&&(e.value=n[r]):e[r]=n[r];return e})},a=0;a<e.length;a++)t(a);return r}(t),e)),e)i.key(a)&&r.push({name:a,tweens:V(e[a],n)});return r}function H(n,e){var r;return n.tweens.map(function(t){var a=function(n,e){var r={};for(var t in n){var a=B(n[t],e);i.arr(a)&&1===(a=a.map(function(n){return B(n,e)})).length&&(a=a[0]),r[t]=a}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}(t,e),o=a.value,u=i.arr(o)?o[1]:o,c=C(u),s=N(e.target,n.name,c,e),f=r?r.to.original:s,l=i.arr(o)?o[0]:f,d=C(l)||C(s),p=c||d;return i.und(u)&&(u=f),a.from=Y(l,p),a.to=Y(A(u,l),p),a.start=r?r.end:0,a.end=a.start+a.delay+a.duration+a.endDelay,a.easing=v(a.easing,a.duration),a.isPath=i.pth(o),a.isColor=i.col(a.from.original),a.isColor&&(a.round=1),r=a,a})}var G={css:function(n,e,r){return n.style[e]=r},attribute:function(n,e,r){return n.setAttribute(e,r)},object:function(n,e,r){return n[e]=r},transform:function(n,e,r,t,a){if(t.list.set(e,r),e===t.last||a){var o="";t.list.forEach(function(n,e){o+=e+"("+n+") "}),n.style.transform=o}}};function R(n,e){Q(n).forEach(function(n){for(var r in e){var t=B(e[r],n),a=n.target,o=C(t),u=N(a,r,o,n),i=A(L(t,o||C(u)),u),c=D(a,r);G[c](a,r,i,n.transforms,!0)}})}function W(n,e){return m(y(n.map(function(n){return e.map(function(e){return function(n,e){var r=D(n.target,e.name);if(r){var t=H(e,n),a=t[t.length-1];return{type:r,property:e.name,animatable:n,tweens:t,duration:a.end,delay:t[0].delay,endDelay:a.endDelay}}}(n,e)})})),function(n){return!i.und(n)})}function J(n,e){var r=n.length,t=function(n){return n.timelineOffset?n.timelineOffset:0},a={};return a.duration=r?Math.max.apply(Math,n.map(function(n){return t(n)+n.duration})):e.duration,a.delay=r?Math.min.apply(Math,n.map(function(n){return t(n)+n.delay})):e.delay,a.endDelay=r?a.duration-Math.max.apply(Math,n.map(function(n){return t(n)+n.duration-n.endDelay})):e.endDelay,a}var K=0;var U,_=[],nn=[],en=function(){function n(){U=requestAnimationFrame(e)}function e(e){var r=_.length;if(r){for(var t=0;t<r;){var a=_[t];if(a.paused){var o=_.indexOf(a);o>-1&&(_.splice(o,1),r=_.length)}else a.tick(e);t++}n()}else U=cancelAnimationFrame(U)}return n}();function rn(r){void 0===r&&(r={});var t,o=0,u=0,i=0,c=0,s=null;function f(n){var e=window.Promise&&new Promise(function(n){return s=n});return n.finished=e,e}var l,d,p,h,v,g,y,b,M=(d=w(n,l=r),p=w(e,l),h=z(p,l),v=Q(l.targets),g=W(v,h),y=J(g,p),b=K,K++,k(d,{id:b,children:[],animatables:v,animations:g,duration:y.duration,delay:y.delay,endDelay:y.endDelay}));f(M);function x(){var n=M.direction;"alternate"!==n&&(M.direction="normal"!==n?"normal":"reverse"),M.reversed=!M.reversed,t.forEach(function(n){return n.reversed=M.reversed})}function O(n){return M.reversed?M.duration-n:n}function C(){o=0,u=O(M.currentTime)*(1/rn.speed)}function B(n,e){e&&e.seek(n-e.timelineOffset)}function P(n){for(var e=0,r=M.animations,t=r.length;e<t;){var o=r[e],u=o.animatable,i=o.tweens,c=i.length-1,s=i[c];c&&(s=m(i,function(e){return n<e.end})[0]||s);for(var f=a(n-s.start-s.delay,0,s.duration)/s.duration,l=isNaN(f)?1:s.easing(f),d=s.to.strings,p=s.round,h=[],v=s.to.numbers.length,g=void 0,y=0;y<v;y++){var b=void 0,x=s.to.numbers[y],w=s.from.numbers[y]||0;b=s.isPath?X(s.value,l*x):w+l*(x-w),p&&(s.isColor&&y>2||(b=Math.round(b*p)/p)),h.push(b)}var k=d.length;if(k){g=d[0];for(var O=0;O<k;O++){d[O];var C=d[O+1],B=h[O];isNaN(B)||(g+=C?B+C:B+" ")}}else g=h[0];G[o.type](u.target,o.property,g,u.transforms),o.currentValue=g,e++}}function I(n){M[n]&&!M.passThrough&&M[n](M)}function T(n){var e=M.duration,r=M.delay,l=e-M.endDelay,d=O(n);M.progress=a(d/e*100,0,100),M.reversePlayback=d<M.currentTime,t&&function(n){if(M.reversePlayback)for(var e=c;e--;)B(n,t[e]);else for(var r=0;r<c;r++)B(n,t[r])}(d),!M.began&&M.currentTime>0&&(M.began=!0,I("begin")),!M.loopBegan&&M.currentTime>0&&(M.loopBegan=!0,I("loopBegin")),d<=r&&0!==M.currentTime&&P(0),(d>=l&&M.currentTime!==e||!e)&&P(e),d>r&&d<l?(M.changeBegan||(M.changeBegan=!0,M.changeCompleted=!1,I("changeBegin")),I("change"),P(d)):M.changeBegan&&(M.changeCompleted=!0,M.changeBegan=!1,I("changeComplete")),M.currentTime=a(d,0,e),M.began&&I("update"),n>=e&&(u=0,M.remaining&&!0!==M.remaining&&M.remaining--,M.remaining?(o=i,I("loopComplete"),M.loopBegan=!1,"alternate"===M.direction&&x()):(M.paused=!0,M.completed||(M.completed=!0,I("loopComplete"),I("complete"),!M.passThrough&&"Promise"in window&&(s(),f(M)))))}return M.reset=function(){var n=M.direction;M.passThrough=!1,M.currentTime=0,M.progress=0,M.paused=!0,M.began=!1,M.loopBegan=!1,M.changeBegan=!1,M.completed=!1,M.changeCompleted=!1,M.reversePlayback=!1,M.reversed="reverse"===n,M.remaining=M.loop,t=M.children;for(var e=c=t.length;e--;)M.children[e].reset();(M.reversed&&!0!==M.loop||"alternate"===n&&1===M.loop)&&M.remaining++,P(M.reversed?M.duration:0)},M.set=function(n,e){return R(n,e),M},M.tick=function(n){i=n,o||(o=i),T((i+(u-o))*rn.speed)},M.seek=function(n){T(O(n))},M.pause=function(){M.paused=!0,C()},M.play=function(){M.paused&&(M.completed&&M.reset(),M.paused=!1,_.push(M),C(),U||en())},M.reverse=function(){x(),C()},M.restart=function(){M.reset(),M.play()},M.reset(),M.autoplay&&M.play(),M}function tn(n,e){for(var r=e.length;r--;)M(n,e[r].animatable.target)&&e.splice(r,1)}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){document.hidden?(_.forEach(function(n){return n.pause()}),nn=_.slice(0),rn.running=_=[]):nn.forEach(function(n){return n.play()})}),rn.version="3.1.0",rn.speed=1,rn.running=_,rn.remove=function(n){for(var e=Z(n),r=_.length;r--;){var t=_[r],a=t.animations,o=t.children;tn(e,a);for(var u=o.length;u--;){var i=o[u],c=i.animations;tn(e,c),c.length||i.children.length||o.splice(u,1)}a.length||o.length||t.pause()}},rn.get=N,rn.set=R,rn.convertPx=I,rn.path=function(n,e){var r=i.str(n)?g(n)[0]:n,t=e||100;return function(n){return{property:n,el:r,svg:$(r),totalLength:q(r)*(t/100)}}},rn.setDashoffset=function(n){var e=q(n);return n.setAttribute("stroke-dasharray",e),e},rn.stagger=function(n,e){void 0===e&&(e={});var r=e.direction||"normal",t=e.easing?v(e.easing):null,a=e.grid,o=e.axis,u=e.from||0,c="first"===u,s="center"===u,f="last"===u,l=i.arr(n),d=l?parseFloat(n[0]):parseFloat(n),p=l?parseFloat(n[1]):0,h=C(l?n[1]:n)||0,g=e.start||0+(l?d:0),m=[],y=0;return function(n,e,i){if(c&&(u=0),s&&(u=(i-1)/2),f&&(u=i-1),!m.length){for(var v=0;v<i;v++){if(a){var b=s?(a[0]-1)/2:u%a[0],M=s?(a[1]-1)/2:Math.floor(u/a[0]),x=b-v%a[0],w=M-Math.floor(v/a[0]),k=Math.sqrt(x*x+w*w);"x"===o&&(k=-x),"y"===o&&(k=-w),m.push(k)}else m.push(Math.abs(u-v));y=Math.max.apply(Math,m)}t&&(m=m.map(function(n){return t(n/y)*y})),"reverse"===r&&(m=m.map(function(n){return o?n<0?-1*n:-n:Math.abs(y-n)}))}return g+(l?(p-d)/y:d)*(Math.round(100*m[e])/100)+h}},rn.timeline=function(n){void 0===n&&(n={});var r=rn(n);return r.duration=0,r.add=function(t,a){var o=_.indexOf(r),u=r.children;function c(n){n.passThrough=!0}o>-1&&_.splice(o,1);for(var s=0;s<u.length;s++)c(u[s]);var f=k(t,w(e,n));f.targets=f.targets||n.targets;var l=r.duration;f.autoplay=!1,f.direction=r.direction,f.timelineOffset=i.und(a)?l:A(a,l),c(r),r.seek(f.timelineOffset);var d=rn(f);c(d),u.push(d);var p=J(u,n);return r.delay=p.delay,r.endDelay=p.endDelay,r.duration=p.duration,r.seek(0),r.reset(),r.autoplay&&r.play(),r},r},rn.easing=v,rn.penner=h,rn.random=function(n,e){return Math.floor(Math.random()*(e-n+1))+n},rn});
|